@halliday-sdk/payments 2.7.2 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/paymentsApiClient/index.cjs.min.js +1 -1
- package/dist/paymentsApiClient/index.cjs.min.js.map +1 -1
- package/dist/paymentsApiClient/index.d.ts +188 -59
- package/dist/paymentsApiClient/index.esm.min.js +1 -1
- package/dist/paymentsApiClient/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/ethers/index.cjs.min.js +1 -1
- package/dist/paymentsWidget/ethers/index.cjs.min.js.map +1 -1
- package/dist/paymentsWidget/ethers/index.d.ts +12 -10
- package/dist/paymentsWidget/ethers/index.esm.min.js +1 -1
- package/dist/paymentsWidget/ethers/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/ethers/index.umd.min.js +1 -1
- package/dist/paymentsWidget/ethers/index.umd.min.js.map +1 -1
- package/dist/paymentsWidget/index.cjs.min.js +1 -1
- package/dist/paymentsWidget/index.cjs.min.js.map +1 -1
- package/dist/paymentsWidget/index.d.ts +42 -36
- package/dist/paymentsWidget/index.esm.min.js +1 -1
- package/dist/paymentsWidget/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/index.umd.min.js +1 -1
- package/dist/paymentsWidget/index.umd.min.js.map +1 -1
- package/dist/paymentsWidget/viem/index.cjs.min.js +1 -1
- package/dist/paymentsWidget/viem/index.cjs.min.js.map +1 -1
- package/dist/paymentsWidget/viem/index.d.ts +12 -10
- package/dist/paymentsWidget/viem/index.esm.min.js +1 -1
- package/dist/paymentsWidget/viem/index.esm.min.js.map +1 -1
- package/dist/paymentsWidget/viem/index.umd.min.js +1 -1
- package/dist/paymentsWidget/viem/index.umd.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"axios";function t(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function n(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function r(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in s.prototype)Object.defineProperty(n,e,{value:s.prototype[e].bind(n)});n._zod.constr=s,n._zod.def=r}const i=n?.Parent??Object;class o extends i{}function s(e){var t;const i=n?.Parent?new o:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(const e of i._zod.deferred)e();return i}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}"function"==typeof SuppressedError&&SuppressedError;class i extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const o={};function s(e){return o}function a(e,t){return"bigint"==typeof t?t.toString():t}function u(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function c(e){return null==e}function d(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function p(e,t,n){Object.defineProperty(e,t,{get(){{const r=n();return e[t]=r,r}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function l(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function f(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let r=0;r<e;r++)n+=t[Math.floor(26*Math.random())];return n}function h(e){return JSON.stringify(e)}function m(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const v=u((()=>{try{return new Function(""),!0}catch(e){return!1}}));function y(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}const _=new Set(["string","number","symbol"]);function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function b(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const k={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function z(e,t=0){for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n].continue)return!0;return!1}function E(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function $(e){return"string"==typeof e?e:e?.message}function O(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=$(e.inst?._zod.def?.error?.(e))??$(t?.error?.(e))??$(n.customError?.(e))??$(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function I(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function R(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const x=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,a,2),enumerable:!0})},P=r("$ZodError",x),A=r("$ZodError",x,{Parent:Error});const T=e=>(t,n,r,o)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},u=t._zod.run({value:n,issues:[]},a);if(u instanceof Promise)throw new i;if(u.issues.length){const t=new(o?.Err??e)(u.issues.map((e=>O(e,a,s()))));throw Error.captureStackTrace(t,o?.callee),t}return u.value},S=e=>async(t,n,r,i)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(i?.Err??e)(a.issues.map((e=>O(e,o,s()))));throw Error.captureStackTrace(t,i?.callee),t}return a.value},Z=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new i;return a.issues.length?{success:!1,error:new(e??P)(a.issues.map((e=>O(e,o,s()))))}:{success:!0,data:a.value}},N=Z(A),j=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map((e=>O(e,i,s()))))}:{success:!0,data:o.value}},C=j(A),M=/^[cC][^\s-]{8,}$/,F=/^[0-9a-z]+$/,V=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,D=/^[0-9a-vA-V]{20}$/,U=/^[A-Za-z0-9]{27}$/,q=/^[a-zA-Z0-9_-]{21}$/,L=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,H=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,W=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,G=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const K=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,B=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,J=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Y=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,X=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Q=/^[A-Za-z0-9_-]*$/,ee=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,te=/^\+(?:[0-9]){6,14}[0-9]$/,ne="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",re=new RegExp(`^${ne}$`);function ie(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}const oe=/^\d+n?$/,se=/^\d+$/,ae=/^-?\d+(?:\.\d+)?/i,ue=/true|false/i,ce=/^[^A-Z]*$/,de=/^[^a-z]*$/,pe=r("$ZodCheck",((e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),le={number:"number",bigint:"bigint",object:"date"},fe=r("$ZodCheckLessThan",((e,t)=>{pe.init(e,t);const n=le[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),he=r("$ZodCheckGreaterThan",((e,t)=>{pe.init(e,t);const n=le[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),me=r("$ZodCheckMultipleOf",((e,t)=>{pe.init(e,t),e._zod.onattach.push((e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)})),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),ve=r("$ZodCheckNumberFormat",((e,t)=>{pe.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=k[t.format];e._zod.onattach.push((e=>{const r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=o,n&&(r.pattern=se)})),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}a<i&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}})),ye=r("$ZodCheckMaxLength",((e,t)=>{pe.init(e,t),e._zod.when=e=>{const t=e.value;return!c(t)&&void 0!==t.length},e._zod.onattach.push((e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const i=I(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,input:r,inst:e,continue:!t.abort})}})),_e=r("$ZodCheckMinLength",((e,t)=>{pe.init(e,t),e._zod.when=e=>{const t=e.value;return!c(t)&&void 0!==t.length},e._zod.onattach.push((e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const i=I(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,input:r,inst:e,continue:!t.abort})}})),ge=r("$ZodCheckLengthEquals",((e,t)=>{pe.init(e,t),e._zod.when=e=>{const t=e.value;return!c(t)&&void 0!==t.length},e._zod.onattach.push((e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=n=>{const r=n.value,i=r.length;if(i===t.length)return;const o=I(r),s=i>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},input:n.value,inst:e,continue:!t.abort})}})),we=r("$ZodCheckStringFormat",((e,t)=>{var n;pe.init(e,t),e._zod.onattach.push((e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))})),(n=e._zod).check??(n.check=n=>{if(!t.pattern)throw new Error("Not implemented.");t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})})})),be=r("$ZodCheckRegex",((e,t)=>{we.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}})),ke=r("$ZodCheckLowerCase",((e,t)=>{t.pattern??(t.pattern=ce),we.init(e,t)})),ze=r("$ZodCheckUpperCase",((e,t)=>{t.pattern??(t.pattern=de),we.init(e,t)})),Ee=r("$ZodCheckIncludes",((e,t)=>{pe.init(e,t);const n=g(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)})),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}})),$e=r("$ZodCheckStartsWith",((e,t)=>{pe.init(e,t);const n=new RegExp(`^${g(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}})),Oe=r("$ZodCheckEndsWith",((e,t)=>{pe.init(e,t);const n=new RegExp(`.*${g(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}})),Ie=r("$ZodCheckOverwrite",((e,t)=>{pe.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));class Re{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter((e=>e)),n=Math.min(...t.map((e=>e.length-e.trimStart().length))),r=t.map((e=>e.slice(n))).map((e=>" ".repeat(2*this.indent)+e));for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map((e=>` ${e}`))].join("\n"))}}const xe={major:4,minor:0,patch:0},Pe=r("$ZodType",((e,t)=>{var n;e??(e={}),e._zod.id=t.type+"_"+f(10),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xe;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{const t=(e,t,n)=>{let r,o=z(e);for(const s of t){if(s._zod.when){if(!s._zod.when(e))continue}else if(o)continue;const t=e.issues.length,a=s._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new i;if(r||a instanceof Promise)r=(r??Promise.resolve()).then((async()=>{await a;e.issues.length!==t&&(o||(o=z(e,t)))}));else{if(e.issues.length===t)continue;o||(o=z(e,t))}}return r?r.then((()=>e)):e};e._zod.run=(n,o)=>{const s=e._zod.parse(n,o);if(s instanceof Promise){if(!1===o.async)throw new i;return s.then((e=>t(e,r,o)))}return t(s,r,o)}}e["~standard"]={validate:t=>{try{const n=N(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return C(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1}})),Ae=r("$ZodString",((e,t)=>{var n;Pe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}})),Te=r("$ZodStringFormat",((e,t)=>{we.init(e,t),Ae.init(e,t)})),Se=r("$ZodGUID",((e,t)=>{t.pattern??(t.pattern=H),Te.init(e,t)})),Ze=r("$ZodUUID",((e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=W(e))}else t.pattern??(t.pattern=W());Te.init(e,t)})),Ne=r("$ZodEmail",((e,t)=>{t.pattern??(t.pattern=G),Te.init(e,t)})),je=r("$ZodURL",((e,t)=>{Te.init(e,t),e._zod.check=n=>{try{const r=new URL(n.value);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ee.source,input:n.value,inst:e})),void(t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e})))}catch(t){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e})}}})),Ce=r("$ZodEmoji",((e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Te.init(e,t)})),Me=r("$ZodNanoID",((e,t)=>{t.pattern??(t.pattern=q),Te.init(e,t)})),Fe=r("$ZodCUID",((e,t)=>{t.pattern??(t.pattern=M),Te.init(e,t)})),Ve=r("$ZodCUID2",((e,t)=>{t.pattern??(t.pattern=F),Te.init(e,t)})),De=r("$ZodULID",((e,t)=>{t.pattern??(t.pattern=V),Te.init(e,t)})),Ue=r("$ZodXID",((e,t)=>{t.pattern??(t.pattern=D),Te.init(e,t)})),qe=r("$ZodKSUID",((e,t)=>{t.pattern??(t.pattern=U),Te.init(e,t)})),Le=r("$ZodISODateTime",((e,t)=>{t.pattern??(t.pattern=function(e){let t=`${ne}T${ie(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}(t)),Te.init(e,t)})),He=r("$ZodISODate",((e,t)=>{t.pattern??(t.pattern=re),Te.init(e,t)})),We=r("$ZodISOTime",((e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ie(t)}$`)),Te.init(e,t)})),Ge=r("$ZodISODuration",((e,t)=>{t.pattern??(t.pattern=L),Te.init(e,t)})),Ke=r("$ZodIPv4",((e,t)=>{t.pattern??(t.pattern=K),Te.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv4"}))})),Be=r("$ZodIPv6",((e,t)=>{t.pattern??(t.pattern=B),Te.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv6"})),e._zod.check=t=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e})}}})),Je=r("$ZodCIDRv4",((e,t)=>{t.pattern??(t.pattern=J),Te.init(e,t)})),Ye=r("$ZodCIDRv6",((e,t)=>{t.pattern??(t.pattern=Y),Te.init(e,t),e._zod.check=t=>{const[n,r]=t.value.split("/");try{if(!r)throw new Error;const e=Number(r);if(`${e}`!==r)throw new Error;if(e<0||e>128)throw new Error;new URL(`http://[${n}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e})}}}));function Xe(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Qe=r("$ZodBase64",((e,t)=>{t.pattern??(t.pattern=X),Te.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64"})),e._zod.check=t=>{Xe(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e})}}));const et=r("$ZodBase64URL",((e,t)=>{t.pattern??(t.pattern=Q),Te.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64url"})),e._zod.check=t=>{(function(e){if(!Q.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return Xe(t.padEnd(4*Math.ceil(t.length/4),"="))})(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e})}})),tt=r("$ZodE164",((e,t)=>{t.pattern??(t.pattern=te),Te.init(e,t)}));const nt=r("$ZodJWT",((e,t)=>{Te.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n,i=JSON.parse(atob(r));return!("typ"in i&&"JWT"!==i?.typ||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e})}})),rt=r("$ZodNumber",((e,t)=>{Pe.init(e,t),e._zod.pattern=e._zod.bag.pattern??ae,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}})),it=r("$ZodNumber",((e,t)=>{ve.init(e,t),rt.init(e,t)})),ot=r("$ZodBoolean",((e,t)=>{Pe.init(e,t),e._zod.pattern=ue,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}})),st=r("$ZodBigInt",((e,t)=>{Pe.init(e,t),e._zod.pattern=oe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}const{value:i}=n;return"bigint"==typeof i||n.issues.push({expected:"bigint",code:"invalid_type",input:i,inst:e}),n}})),at=r("$ZodAny",((e,t)=>{Pe.init(e,t),e._zod.parse=e=>e})),ut=r("$ZodUnknown",((e,t)=>{Pe.init(e,t),e._zod.parse=e=>e})),ct=r("$ZodNever",((e,t)=>{Pe.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}));function dt(e,t,n){e.issues.length&&t.issues.push(...E(n,e.issues)),t.value[n]=e.value}const pt=r("$ZodArray",((e,t)=>{Pe.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const o=[];for(let e=0;e<i.length;e++){const s=i[e],a=t.element._zod.run({value:s,issues:[]},r);a instanceof Promise?o.push(a.then((t=>dt(t,n,e)))):dt(a,n,e)}return o.length?Promise.all(o).then((()=>n)):n}}));function lt(e,t,n){e.issues.length&&t.issues.push(...E(n,e.issues)),t.value[n]=e.value}function ft(e,t,n,r){e.issues.length?void 0===r[n]?t.value[n]=n in r?void 0:e.value:t.issues.push(...E(n,e.issues)):void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}const ht=r("$ZodObject",((e,t)=>{Pe.init(e,t);const n=u((()=>{const e=Object.keys(t.shape);for(const n of e)if(!(t.shape[n]instanceof Pe))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=t.shape,Object.keys(r).filter((e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout)));var r;return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}));p(e._zod,"propValues",(()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n}));let r;const i=m,s=!o.jitless,a=s&&v.value,{catchall:c}=t;let d;e._zod.parse=(o,u)=>{d??(d=n.value);const p=o.value;if(!i(p))return o.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),o;const l=[];if(s&&a&&!1===u?.async&&!0!==u.jitless)r||(r=(e=>{const t=new Re(["shape","payload","ctx"]),{keys:r,optionalKeys:i}=n.value,o=e=>{const t=h(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const s=Object.create(null);for(const e of r)s[e]=f(15);t.write("const newResult = {}");for(const e of r)if(i.has(e)){const n=s[e];t.write(`const ${n} = ${o(e)};`);const r=h(e);t.write(`\n if (${n}.issues.length) {\n if (input[${r}] === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n payload.issues = payload.issues.concat(\n ${n}.issues.map((iss) => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}],\n }))\n );\n }\n } else if (${n}.value === undefined) {\n if (${r} in input) newResult[${r}] = undefined;\n } else {\n newResult[${r}] = ${n}.value;\n }\n `)}else{const n=s[e];t.write(`const ${n} = ${o(e)};`),t.write(`\n if (${n}.issues.length) payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${h(e)}, ...iss.path] : [${h(e)}]\n })));`),t.write(`newResult[${h(e)}] = ${n}.value`)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),o=r(o,u);else{o.value={};const e=d.shape;for(const t of d.keys){const n=e[t],r=n._zod.run({value:p[t],issues:[]},u),i="optional"===n._zod.optin&&"optional"===n._zod.optout;r instanceof Promise?l.push(r.then((e=>i?ft(e,o,t,p):lt(e,o,t)))):i?ft(r,o,t,p):lt(r,o,t)}}if(!c)return l.length?Promise.all(l).then((()=>o)):o;const m=[],v=d.keySet,y=c._zod,_=y.def.type;for(const e of Object.keys(p)){if(v.has(e))continue;if("never"===_){m.push(e);continue}const t=y.run({value:p[e],issues:[]},u);t instanceof Promise?l.push(t.then((t=>lt(t,o,e)))):lt(t,o,e)}return m.length&&o.issues.push({code:"unrecognized_keys",keys:m,input:p,inst:e}),l.length?Promise.all(l).then((()=>o)):o}}));function mt(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((e=>e.issues.map((e=>O(e,r,s())))))}),t}const vt=r("$ZodUnion",((e,t)=>{Pe.init(e,t),p(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),p(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){const e=t.options.map((e=>e._zod.pattern));return new RegExp(`^(${e.map((e=>d(e.source))).join("|")})$`)}})),e._zod.parse=(n,r)=>{let i=!1;const o=[];for(const e of t.options){const t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)o.push(t),i=!0;else{if(0===t.issues.length)return t;o.push(t)}}return i?Promise.all(o).then((t=>mt(t,n,e,r))):mt(o,n,e,r)}})),yt=r("$ZodDiscriminatedUnion",((e,t)=>{vt.init(e,t);const n=e._zod.parse;p(e._zod,"propValues",(()=>{const e={};for(const n of t.options){const r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(const r of n)e[t].add(r)}}return e}));const r=u((()=>{const e=t.options,n=new Map;for(const r of e){const e=r._zod.propValues[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n}));e._zod.parse=(i,o)=>{const s=i.value;if(!m(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;const a=r.value.get(s?.[t.discriminator]);return a?a._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),i)}})),_t=r("$ZodIntersection",((e,t)=>{Pe.init(e,t),e._zod.parse=(e,n)=>{const{value:r}=e,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then((([t,n])=>wt(e,t,n))):wt(e,i,o)}}));function gt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(y(e)&&y(t)){const n=Object.keys(t),r=Object.keys(e).filter((e=>-1!==n.indexOf(e))),i={...e,...t};for(const n of r){const r=gt(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=gt(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function wt(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),z(e))return e;const r=gt(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const bt=r("$ZodRecord",((e,t)=>{Pe.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!y(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const o=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const s=t.valueType._zod.run({value:i[e],issues:[]},r);s instanceof Promise?o.push(s.then((t=>{t.issues.length&&n.issues.push(...E(e,t.issues)),n.value[e]=t.value}))):(s.issues.length&&n.issues.push(...E(e,s.issues)),n.value[e]=s.value)}let a;for(const e in i)s.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:a})}else{n.value={};for(const a of Reflect.ownKeys(i)){if("__proto__"===a)continue;const u=t.keyType._zod.run({value:a,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:u.issues.map((e=>O(e,r,s()))),input:a,path:[a],inst:e}),n.value[u.value]=u.value;continue}const c=t.valueType._zod.run({value:i[a],issues:[]},r);c instanceof Promise?o.push(c.then((e=>{e.issues.length&&n.issues.push(...E(a,e.issues)),n.value[u.value]=e.value}))):(c.issues.length&&n.issues.push(...E(a,c.issues)),n.value[u.value]=c.value)}}return o.length?Promise.all(o).then((()=>n)):n}})),kt=r("$ZodEnum",((e,t)=>{Pe.init(e,t);const n=function(e){const t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,n])=>-1===t.indexOf(+e))).map((([e,t])=>t))}(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter((e=>_.has(typeof e))).map((e=>"string"==typeof e?g(e):e.toString())).join("|")})$`),e._zod.parse=(t,r)=>{const i=t.value;return e._zod.values.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}})),zt=r("$ZodLiteral",((e,t)=>{Pe.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map((e=>"string"==typeof e?g(e):e?e.toString():String(e))).join("|")})$`),e._zod.parse=(n,r)=>{const i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}})),Et=r("$ZodTransform",((e,t)=>{Pe.init(e,t),e._zod.parse=(e,n)=>{const r=t.transform(e.value,e);if(n.async){return(r instanceof Promise?r:Promise.resolve(r)).then((t=>(e.value=t,e)))}if(r instanceof Promise)throw new i;return e.value=r,e}})),$t=r("$ZodOptional",((e,t)=>{Pe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",p(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),p(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${d(e.source)})?$`):void 0})),e._zod.parse=(e,n)=>void 0===e.value?e:t.innerType._zod.run(e,n)})),Ot=r("$ZodNullable",((e,t)=>{Pe.init(e,t),p(e._zod,"optin",(()=>t.innerType._zod.optin)),p(e._zod,"optout",(()=>t.innerType._zod.optout)),p(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${d(e.source)}|null)$`):void 0})),p(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)})),It=r("$ZodDefault",((e,t)=>{Pe.init(e,t),e._zod.optin="optional",p(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((e=>Rt(e,t))):Rt(r,t)}}));function Rt(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const xt=r("$ZodPrefault",((e,t)=>{Pe.init(e,t),e._zod.optin="optional",p(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>(void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))})),Pt=r("$ZodNonOptional",((e,t)=>{Pe.init(e,t),p(e._zod,"values",(()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then((t=>At(t,e))):At(i,e)}}));function At(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Tt=r("$ZodCatch",((e,t)=>{Pe.init(e,t),p(e._zod,"optin",(()=>t.innerType._zod.optin)),p(e._zod,"optout",(()=>t.innerType._zod.optout)),p(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>O(e,n,s())))},input:e.value}),e.issues=[]),e))):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>O(e,n,s())))},input:e.value}),e.issues=[]),e)}})),St=r("$ZodPipe",((e,t)=>{Pe.init(e,t),p(e._zod,"values",(()=>t.in._zod.values)),p(e._zod,"optin",(()=>t.in._zod.optin)),p(e._zod,"optout",(()=>t.out._zod.optout)),e._zod.parse=(e,n)=>{const r=t.in._zod.run(e,n);return r instanceof Promise?r.then((e=>Zt(e,t,n))):Zt(r,t,n)}}));function Zt(e,t,n){return z(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const Nt=r("$ZodReadonly",((e,t)=>{Pe.init(e,t),p(e._zod,"propValues",(()=>t.innerType._zod.propValues)),p(e._zod,"optin",(()=>t.innerType._zod.optin)),p(e._zod,"optout",(()=>t.innerType._zod.optout)),e._zod.parse=(e,n)=>{const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(jt):jt(r)}}));function jt(e){return e.value=Object.freeze(e.value),e}const Ct=r("$ZodCustom",((e,t)=>{pe.init(e,t),Pe.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then((t=>Mt(t,n,r,e)));Mt(i,n,r,e)}}));function Mt(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(R(e))}}class Ft{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}remove(e){return this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function Vt(){return new Ft}const Dt=Vt();function Ut(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function qt(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Lt(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function Ht(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function Wt(e,t){return new fe({check:"less_than",...b(t),value:e,inclusive:!1})}function Gt(e,t){return new fe({check:"less_than",...b(t),value:e,inclusive:!0})}function Kt(e,t){return new he({check:"greater_than",...b(t),value:e,inclusive:!1})}function Bt(e,t){return new he({check:"greater_than",...b(t),value:e,inclusive:!0})}function Jt(e,t){return new me({check:"multiple_of",...b(t),value:e})}function Yt(e,t){return new ye({check:"max_length",...b(t),maximum:e})}function Xt(e,t){return new _e({check:"min_length",...b(t),minimum:e})}function Qt(e,t){return new ge({check:"length_equals",...b(t),length:e})}function en(e){return new Ie({check:"overwrite",tx:e})}const tn=r("ZodISODateTime",((e,t)=>{Le.init(e,t),bn.init(e,t)}));function nn(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}(tn,e)}const rn=r("ZodISODate",((e,t)=>{He.init(e,t),bn.init(e,t)}));function on(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}(rn,e)}const sn=r("ZodISOTime",((e,t)=>{We.init(e,t),bn.init(e,t)}));function an(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}(sn,e)}const un=r("ZodISODuration",((e,t)=>{Ge.init(e,t),bn.init(e,t)}));function cn(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}(un,e)}const dn=(e,t)=>{P.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map((e=>i({issues:e})));else if("invalid_key"===t.code)i({issues:t.issues});else if("invalid_element"===t.code)i({issues:t.issues});else if(0===t.path.length)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){const r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get:()=>0===e.issues.length}})},pn=r("ZodError",dn),ln=r("ZodError",dn,{Parent:Error}),fn=T(ln),hn=S(ln),mn=Z(ln),vn=j(ln),yn=r("ZodType",((e,t)=>(Pe.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),e.clone=(t,n)=>w(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>fn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>mn(e,t,n),e.parseAsync=async(t,n)=>hn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>vn(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...b(n)})}(Rr,e,t)}(t,n)),e.superRefine=t=>e.check(function(e,t){const n=function(e,t){const n=new pe({check:"custom",...b(t)});return n._zod.check=e,n}((t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(R(e,t.value,n._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=t.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),t.issues.push(R(r))}},e(t.value,t))),t);return n}(t)),e.overwrite=t=>e.check(en(t)),e.optional=()=>_r(e),e.nullable=()=>wr(e),e.nullish=()=>_r(wr(e)),e.nonoptional=t=>function(e,t){return new zr({type:"nonoptional",innerType:e,...b(t)})}(e,t),e.array=()=>tr(e),e.or=t=>or([e,t]),e.and=t=>new ur({type:"intersection",left:e,right:t}),e.transform=t=>Or(e,vr(t)),e.default=t=>{return n=t,new br({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.prefault=t=>{return n=t,new kr({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.catch=t=>{return new Er({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Or(e,t),e.readonly=()=>new Ir({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Dt.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Dt.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Dt.get(e);const n=e.clone();return Dt.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e))),_n=r("_ZodString",((e,t)=>{Ae.init(e,t),yn.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new be({check:"string_format",format:"regex",...b(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Ee({check:"string_format",format:"includes",...b(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new $e({check:"string_format",format:"starts_with",...b(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Oe({check:"string_format",format:"ends_with",...b(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Xt(...t)),e.max=(...t)=>e.check(Yt(...t)),e.length=(...t)=>e.check(Qt(...t)),e.nonempty=(...t)=>e.check(Xt(1,...t)),e.lowercase=t=>e.check(function(e){return new ke({check:"string_format",format:"lowercase",...b(e)})}(t)),e.uppercase=t=>e.check(function(e){return new ze({check:"string_format",format:"uppercase",...b(e)})}(t)),e.trim=()=>e.check(en((e=>e.trim()))),e.normalize=(...t)=>e.check(function(e){return en((t=>t.normalize(e)))}(...t)),e.toLowerCase=()=>e.check(en((e=>e.toLowerCase()))),e.toUpperCase=()=>e.check(en((e=>e.toUpperCase())))})),gn=r("ZodString",((e,t)=>{Ae.init(e,t),_n.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}(kn,t)),e.url=t=>e.check(qt($n,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}(Vn,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}(On,t)),e.guid=t=>e.check(Ut(zn,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}(En,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}(En,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}(En,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}(En,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}(In,t)),e.guid=t=>e.check(Ut(zn,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}(Rn,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}(xn,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}(Pn,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}(Cn,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}(Mn,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}(An,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}(Tn,t)),e.ipv4=t=>e.check(Lt(Sn,t)),e.ipv6=t=>e.check(Ht(Zn,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}(Nn,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}(jn,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}(Fn,t)),e.datetime=t=>e.check(nn(t)),e.date=t=>e.check(on(t)),e.time=t=>e.check(an(t)),e.duration=t=>e.check(cn(t))}));function wn(e){return function(e,t){return new e({type:"string",...b(t)})}(gn,e)}const bn=r("ZodStringFormat",((e,t)=>{Te.init(e,t),_n.init(e,t)})),kn=r("ZodEmail",((e,t)=>{Ne.init(e,t),bn.init(e,t)})),zn=r("ZodGUID",((e,t)=>{Se.init(e,t),bn.init(e,t)})),En=r("ZodUUID",((e,t)=>{Ze.init(e,t),bn.init(e,t)})),$n=r("ZodURL",((e,t)=>{je.init(e,t),bn.init(e,t)}));const On=r("ZodEmoji",((e,t)=>{Ce.init(e,t),bn.init(e,t)})),In=r("ZodNanoID",((e,t)=>{Me.init(e,t),bn.init(e,t)})),Rn=r("ZodCUID",((e,t)=>{Fe.init(e,t),bn.init(e,t)})),xn=r("ZodCUID2",((e,t)=>{Ve.init(e,t),bn.init(e,t)})),Pn=r("ZodULID",((e,t)=>{De.init(e,t),bn.init(e,t)})),An=r("ZodXID",((e,t)=>{Ue.init(e,t),bn.init(e,t)})),Tn=r("ZodKSUID",((e,t)=>{qe.init(e,t),bn.init(e,t)})),Sn=r("ZodIPv4",((e,t)=>{Ke.init(e,t),bn.init(e,t)}));const Zn=r("ZodIPv6",((e,t)=>{Be.init(e,t),bn.init(e,t)}));const Nn=r("ZodCIDRv4",((e,t)=>{Je.init(e,t),bn.init(e,t)})),jn=r("ZodCIDRv6",((e,t)=>{Ye.init(e,t),bn.init(e,t)})),Cn=r("ZodBase64",((e,t)=>{Qe.init(e,t),bn.init(e,t)})),Mn=r("ZodBase64URL",((e,t)=>{et.init(e,t),bn.init(e,t)})),Fn=r("ZodE164",((e,t)=>{tt.init(e,t),bn.init(e,t)})),Vn=r("ZodJWT",((e,t)=>{nt.init(e,t),bn.init(e,t)})),Dn=r("ZodNumber",((e,t)=>{rt.init(e,t),yn.init(e,t),e.gt=(t,n)=>e.check(Kt(t,n)),e.gte=(t,n)=>e.check(Bt(t,n)),e.min=(t,n)=>e.check(Bt(t,n)),e.lt=(t,n)=>e.check(Wt(t,n)),e.lte=(t,n)=>e.check(Gt(t,n)),e.max=(t,n)=>e.check(Gt(t,n)),e.int=t=>e.check(Ln(t)),e.safe=t=>e.check(Ln(t)),e.positive=t=>e.check(Kt(0,t)),e.nonnegative=t=>e.check(Bt(0,t)),e.negative=t=>e.check(Wt(0,t)),e.nonpositive=t=>e.check(Gt(0,t)),e.multipleOf=(t,n)=>e.check(Jt(t,n)),e.step=(t,n)=>e.check(Jt(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}));function Un(e){return function(e,t){return new e({type:"number",checks:[],...b(t)})}(Dn,e)}const qn=r("ZodNumberFormat",((e,t)=>{it.init(e,t),Dn.init(e,t)}));function Ln(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}(qn,e)}const Hn=r("ZodBoolean",((e,t)=>{ot.init(e,t),yn.init(e,t)}));function Wn(e){return function(e,t){return new e({type:"boolean",...b(t)})}(Hn,e)}const Gn=r("ZodBigInt",((e,t)=>{st.init(e,t),yn.init(e,t),e.gte=(t,n)=>e.check(Bt(t,n)),e.min=(t,n)=>e.check(Bt(t,n)),e.gt=(t,n)=>e.check(Kt(t,n)),e.gte=(t,n)=>e.check(Bt(t,n)),e.min=(t,n)=>e.check(Bt(t,n)),e.lt=(t,n)=>e.check(Wt(t,n)),e.lte=(t,n)=>e.check(Gt(t,n)),e.max=(t,n)=>e.check(Gt(t,n)),e.positive=t=>e.check(Kt(BigInt(0),t)),e.negative=t=>e.check(Wt(BigInt(0),t)),e.nonpositive=t=>e.check(Gt(BigInt(0),t)),e.nonnegative=t=>e.check(Bt(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(Jt(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null}));function Kn(e){return function(e,t){return new e({type:"bigint",...b(t)})}(Gn,e)}const Bn=r("ZodAny",((e,t)=>{at.init(e,t),yn.init(e,t)}));const Jn=r("ZodUnknown",((e,t)=>{ut.init(e,t),yn.init(e,t)}));function Yn(){return new Jn({type:"unknown"})}const Xn=r("ZodNever",((e,t)=>{ct.init(e,t),yn.init(e,t)}));function Qn(e){return function(e,t){return new e({type:"never",...b(t)})}(Xn,e)}const er=r("ZodArray",((e,t)=>{pt.init(e,t),yn.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Xt(t,n)),e.nonempty=t=>e.check(Xt(1,t)),e.max=(t,n)=>e.check(Yt(t,n)),e.length=(t,n)=>e.check(Qt(t,n)),e.unwrap=()=>e.element}));function tr(e,t){return function(e,t,n){return new e({type:"array",element:t,...b(n)})}(er,e,t)}const nr=r("ZodObject",((e,t)=>{ht.init(e,t),yn.init(e,t),p(e,"shape",(()=>Object.fromEntries(Object.entries(e._zod.def.shape)))),e.keyof=()=>lr(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yn()}),e.strict=()=>e.clone({...e._zod.def,catchall:Qn()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return l(this,"shape",n),n},checks:[]};return w(e,n)}(e,t),e.merge=t=>{return r=t,w(n=e,{...n._zod.def,get shape(){const e={...n._zod.def.shape,...r._zod.def.shape};return l(this,"shape",e),e},catchall:r._zod.def.catchall,checks:[]});var n,r},e.pick=t=>function(e,t){const n={},r=e._zod.def;for(const e in t){if(!(e in r.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=r.shape[e])}return w(e,{...e._zod.def,shape:n,checks:[]})}(e,t),e.omit=t=>function(e,t){const n={...e._zod.def.shape},r=e._zod.def;for(const e in t){if(!(e in r.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return w(e,{...e._zod.def,shape:n,checks:[]})}(e,t),e.partial=(...t)=>function(e,t,n){const r=t._zod.def.shape,i={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)i[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return w(t,{...t._zod.def,shape:i,checks:[]})}(yr,e,t[0]),e.required=(...t)=>function(e,t,n){const r=t._zod.def.shape,i={...r};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)i[t]=new e({type:"nonoptional",innerType:r[t]});return w(t,{...t._zod.def,shape:i,checks:[]})}(zr,e,t[0])}));function rr(e,t){const n={type:"object",get shape(){return l(this,"shape",{...e}),this.shape},...b(t)};return new nr(n)}const ir=r("ZodUnion",((e,t)=>{vt.init(e,t),yn.init(e,t),e.options=t.options}));function or(e,t){return new ir({type:"union",options:e,...b(t)})}const sr=r("ZodDiscriminatedUnion",((e,t)=>{ir.init(e,t),yt.init(e,t)}));function ar(e,t,n){return new sr({type:"union",options:t,discriminator:e,...b(n)})}const ur=r("ZodIntersection",((e,t)=>{_t.init(e,t),yn.init(e,t)}));const cr=r("ZodRecord",((e,t)=>{bt.init(e,t),yn.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}));function dr(e,t,n){return new cr({type:"record",keyType:e,valueType:t,...b(n)})}const pr=r("ZodEnum",((e,t)=>{kt.init(e,t),yn.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const i={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);i[r]=t.entries[r]}return new pr({...t,checks:[],...b(r),entries:i})},e.exclude=(e,r)=>{const i={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete i[t]}return new pr({...t,checks:[],...b(r),entries:i})}}));function lr(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new pr({type:"enum",entries:n,...b(t)})}const fr=r("ZodLiteral",((e,t)=>{zt.init(e,t),yn.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function hr(e,t){return new fr({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const mr=r("ZodTransform",((e,t)=>{Et.init(e,t),yn.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if("string"==typeof r)n.issues.push(R(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),t.continue??(t.continue=!0),n.issues.push(R(t))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then((e=>(n.value=e,n))):(n.value=i,n)}}));function vr(e){return new mr({type:"transform",transform:e})}const yr=r("ZodOptional",((e,t)=>{$t.init(e,t),yn.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function _r(e){return new yr({type:"optional",innerType:e})}const gr=r("ZodNullable",((e,t)=>{Ot.init(e,t),yn.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function wr(e){return new gr({type:"nullable",innerType:e})}const br=r("ZodDefault",((e,t)=>{It.init(e,t),yn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}));const kr=r("ZodPrefault",((e,t)=>{xt.init(e,t),yn.init(e,t),e.unwrap=()=>e._zod.def.innerType}));const zr=r("ZodNonOptional",((e,t)=>{Pt.init(e,t),yn.init(e,t),e.unwrap=()=>e._zod.def.innerType}));const Er=r("ZodCatch",((e,t)=>{Tt.init(e,t),yn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}));const $r=r("ZodPipe",((e,t)=>{St.init(e,t),yn.init(e,t),e.in=t.in,e.out=t.out}));function Or(e,t){return new $r({type:"pipe",in:e,out:t})}const Ir=r("ZodReadonly",((e,t)=>{Nt.init(e,t),yn.init(e,t)}));const Rr=r("ZodCustom",((e,t)=>{Ct.init(e,t),yn.init(e,t)}));const xr="https://v2.prod.halliday.xyz",Pr=/^(https:\/\/(?:[\w-]+\.)*halliday\.xyz(?:\/.*)?|http:\/\/localhost(?::\d+)?(?:\/.*)?|https:\/\/localhost(?::\d+)?(?:\/.*)?)$/,Ar=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,Tr=wn().refine((e=>/^(0|[1-9]\d*)(\.\d+)?$/.test(e)),{message:"Invalid amount"}),Sr=/^(0x|0x[a-fA-F0-9]{40})$/,Zr=wn().refine((e=>Sr.test(e)),{message:"Invalid EVM token address"}),Nr=Zr.refine((e=>"0x"!==e),{message:"Invalid EVM address"}),jr=/^[1-9A-HJ-NP-Za-km-z]{32,44}$/,Cr=/^So[1-2]{41}$/,Mr=wn().refine((e=>jr.test(e)||Cr.test(e)),{message:"Invalid Solana token address"}),Fr=wn().refine((e=>jr.test(e)),{message:"Invalid Solana address"}),Vr=or([Nr,Fr]),Dr=wn().refine((e=>/^[a-zA-Z_]{3,}$/.test(e)),{message:"Invalid fiat"}),Ur=rr({issuer:wn(),name:wn(),alias:wn().optional(),symbol:wn(),decimals:Un()}),qr=wn(),Lr=wn().regex(/^[a-zA-Z]\w{1,7}$/,{message:"Must be a short alpha-numeric symbol"}),Hr=Un().min(0).max(18),Wr=wn().url(),Gr=wn(),Kr=rr({chain:wn(),address:Zr}),Br=rr({chain:hr("solana"),address:Mr}),Jr=rr({chain:wn(),address:wn()}),Yr=or([Kr,Br,Jr]),Xr=wn().refine((e=>{const[t,n]=e.split(":");return Yr.safeParse({chain:t,address:n}).success}),{message:"Invalid token"}),Qr=rr({name:qr,symbol:Lr,decimals:Hr,alias:Lr.optional(),image_url:Wr.optional(),coingecko_id:Gr.optional(),wrapper:Lr.optional(),is_native:Wn().optional()}),ei=Kr.extend(Qr.shape),ti=Br.extend(Qr.shape),ni=or([ei,ti,Jr.extend(Qr.shape)]),ri=or([Xr,Dr]),ii=or([ni,Ur]),oi=ar("type",[rr({type:hr("chain"),chain:wn()}),rr({type:hr("issuer"),issuer:wn()})]),si=wn().transform((e=>e.toLowerCase())),ai=(ui=e=>"string"==typeof e?e.toUpperCase():e,ci=lr(["ONRAMP","OFFRAMP"]),Or(vr(ui),ci));var ui,ci;const di=rr({to:Nr,from:Nr.optional(),nonce:Un().optional(),gasLimit:Kn().optional(),gasPrice:Kn().optional(),maxPriorityFeePerGas:Kn().optional(),maxFeePerGas:Kn().optional(),data:wn().optional(),value:Kn().optional(),chainId:Un()}),pi=rr({transactionHash:wn().optional(),blockHash:wn().optional(),blockNumber:Un().optional(),from:Nr.optional(),to:Nr.optional(),rawReceipt:new Bn({type:"any"})}),li=rr({chain_id:Kn(),network:wn(),native_currency:rr({name:wn(),symbol:wn(),decimals:Un()}),rpc:wn(),image:wn(),is_testnet:Wn(),explorer:wn()}),fi=rr({chain_id:Kn(),network:wn()}),hi=or([li,fi]),mi=lr(["CREDIT_CARD","DEBIT_CARD","ACH","FIAT_BALANCE","TOKEN_BALANCE","APPLE_PAY","PAYPAL","VENMO","REVOLUT","GOOGLE_PAY","SEPA","FASTER_PAYMENTS","PIX","UPI","WIRE"]);class vi{static stringify(e,t){return JSON.stringify(e,this.replacer,t)}static parse(e){return JSON.parse(e,this.reviver)}}vi.replacer=(e,t)=>"bigint"==typeof t?{"#":t.toString()}:t,vi.reviver=(e,t)=>t&&"object"==typeof t&&"#"in t&&1===Object.keys(t).length?BigInt(t["#"]):t;var yi,_i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},gi={};!function(){return yi||(yi=1,function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof _i?_i:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=r(e);function r(e,t){return function(n,r){Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0!==t.Reflect&&(n=r(t.Reflect,n)),function(e,t){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,a={__proto__:[]}instanceof Array,u=!s&&!a,c={create:s?function(){return pe(Object.create(null))}:a?function(){return pe({__proto__:null})}:function(){return pe({})},has:u?function(e,t){return n.call(e,t)}:function(e,t){return t in e},get:u?function(e,t){return n.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},d=Object.getPrototypeOf(Function),p="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:ue(),l="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:ce(),f="function"==typeof WeakMap?WeakMap:de(),h=r?Symbol.for("@reflect-metadata:registry"):void 0,m=ie(),v=oe(m);function y(e,t,n,r){if(C(n)){if(!W(e))throw new TypeError;if(!K(t))throw new TypeError;return I(e,t)}if(!W(e))throw new TypeError;if(!V(t))throw new TypeError;if(!V(r)&&!C(r)&&!M(r))throw new TypeError;return M(r)&&(r=void 0),R(e,t,n=H(n),r)}function _(e,t){function n(n,r){if(!V(n))throw new TypeError;if(!C(r)&&!B(r))throw new TypeError;S(e,t,n,r)}return n}function g(e,t,n,r){if(!V(n))throw new TypeError;return C(r)||(r=H(r)),S(e,t,n,r)}function w(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=H(n)),x(e,t,n)}function b(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=H(n)),P(e,t,n)}function k(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=H(n)),A(e,t,n)}function z(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=H(n)),T(e,t,n)}function E(e,t){if(!V(e))throw new TypeError;return C(t)||(t=H(t)),Z(e,t)}function $(e,t){if(!V(e))throw new TypeError;return C(t)||(t=H(t)),N(e,t)}function O(e,t,n){if(!V(t))throw new TypeError;if(C(n)||(n=H(n)),!V(t))throw new TypeError;C(n)||(n=H(n));var r=ae(t,n,!1);return!C(r)&&r.OrdinaryDeleteMetadata(e,t,n)}function I(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!C(r)&&!M(r)){if(!K(r))throw new TypeError;t=r}}return t}function R(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!C(o)&&!M(o)){if(!V(o))throw new TypeError;r=o}}return r}function x(e,t,n){if(P(e,t,n))return!0;var r=ne(t);return!M(r)&&x(e,r,n)}function P(e,t,n){var r=ae(t,n,!1);return!C(r)&&q(r.OrdinaryHasOwnMetadata(e,t,n))}function A(e,t,n){if(P(e,t,n))return T(e,t,n);var r=ne(t);return M(r)?void 0:A(e,r,n)}function T(e,t,n){var r=ae(t,n,!1);if(!C(r))return r.OrdinaryGetOwnMetadata(e,t,n)}function S(e,t,n,r){ae(n,r,!0).OrdinaryDefineOwnMetadata(e,t,n,r)}function Z(e,t){var n=N(e,t),r=ne(e);if(null===r)return n;var i=Z(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new l,s=[],a=0,u=n;a<u.length;a++){var c=u[a];o.has(c)||(o.add(c),s.push(c))}for(var d=0,p=i;d<p.length;d++){c=p[d];o.has(c)||(o.add(c),s.push(c))}return s}function N(e,t){var n=ae(e,t,!1);return n?n.OrdinaryOwnMetadataKeys(e,t):[]}function j(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function C(e){return void 0===e}function M(e){return null===e}function F(e){return"symbol"==typeof e}function V(e){return"object"==typeof e?null!==e:"function"==typeof e}function D(e,t){switch(j(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n="string",r=Y(e,i);if(void 0!==r){var o=r.call(e,n);if(V(o))throw new TypeError;return o}return U(e)}function U(e,t){var n,r,i=e.toString;if(G(i)&&!V(r=i.call(e)))return r;if(G(n=e.valueOf)&&!V(r=n.call(e)))return r;throw new TypeError}function q(e){return!!e}function L(e){return""+e}function H(e){var t=D(e);return F(t)?t:L(t)}function W(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function G(e){return"function"==typeof e}function K(e){return"function"==typeof e}function B(e){switch(j(e)){case 3:case 4:return!0;default:return!1}}function J(e,t){return e===t||e!=e&&t!=t}function Y(e,t){var n=e[t];if(null!=n){if(!G(n))throw new TypeError;return n}}function X(e){var t=Y(e,o);if(!G(t))throw new TypeError;var n=t.call(e);if(!V(n))throw new TypeError;return n}function Q(e){return e.value}function ee(e){var t=e.next();return!t.done&&t}function te(e){var t=e.return;t&&t.call(e)}function ne(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===d)return t;if(t!==d)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function re(){var e,n,r,i;C(h)||void 0===t.Reflect||h in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=se(t.Reflect));var o=new f,s={registerProvider:a,getProvider:c,setProvider:m};return s;function a(t){if(!Object.isExtensible(s))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case C(n):n=t;break;case n===t:break;case C(r):r=t;break;case r===t:break;default:void 0===i&&(i=new l),i.add(t)}}function u(t,o){if(!C(n)){if(n.isProviderFor(t,o))return n;if(!C(r)){if(r.isProviderFor(t,o))return n;if(!C(i))for(var s=X(i);;){var a=ee(s);if(!a)return;var u=Q(a);if(u.isProviderFor(t,o))return te(s),u}}}if(!C(e)&&e.isProviderFor(t,o))return e}function c(e,t){var n,r=o.get(e);return C(r)||(n=r.get(t)),C(n)?(C(n=u(e,t))||(C(r)&&(r=new p,o.set(e,r)),r.set(t,n)),n):n}function d(e){if(C(e))throw new TypeError;return n===e||r===e||!C(i)&&i.has(e)}function m(e,t,n){if(!d(n))throw new Error("Metadata provider not registered.");var r=c(e,t);if(r!==n){if(!C(r))return!1;var i=o.get(e);C(i)&&(i=new p,o.set(e,i)),i.set(t,n)}return!0}}function ie(){var e;return!C(h)&&V(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[h]),C(e)&&(e=re()),!C(h)&&V(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,h,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function oe(e){var t=new f,n={isProviderFor:function(e,n){var r=t.get(e);return!C(r)&&r.has(n)},OrdinaryDefineOwnMetadata:s,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:u};return m.registerProvider(n),n;function r(r,i,o){var s=t.get(r),a=!1;if(C(s)){if(!o)return;s=new p,t.set(r,s),a=!0}var u=s.get(i);if(C(u)){if(!o)return;if(u=new p,s.set(i,u),!e.setProvider(r,i,n))throw s.delete(i),a&&t.delete(r),new Error("Wrong provider for target.")}return u}function i(e,t,n){var i=r(t,n,!1);return!C(i)&&q(i.has(e))}function o(e,t,n){var i=r(t,n,!1);if(!C(i))return i.get(e)}function s(e,t,n,i){r(n,i,!0).set(e,t)}function a(e,t){var n=[],i=r(e,t,!1);if(C(i))return n;for(var o=X(i.keys()),s=0;;){var a=ee(o);if(!a)return n.length=s,n;var u=Q(a);try{n[s]=u}catch(e){try{te(o)}finally{throw e}}s++}}function u(e,n,i){var o=r(n,i,!1);if(C(o))return!1;if(!o.delete(e))return!1;if(0===o.size){var s=t.get(n);C(s)||(s.delete(i),0===s.size&&t.delete(s))}return!0}}function se(e){var t=e.defineMetadata,n=e.hasOwnMetadata,r=e.getOwnMetadata,i=e.getOwnMetadataKeys,o=e.deleteMetadata,s=new f;return{isProviderFor:function(e,t){var n=s.get(e);return!(C(n)||!n.has(t))||!!i(e,t).length&&(C(n)&&(n=new l,s.set(e,n)),n.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:n,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:o}}function ae(e,t,n){var r=m.getProvider(e,t);if(!C(r))return r;if(n){if(m.setProvider(e,t,v))return v;throw new Error("Illegal state.")}}function ue(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[o]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,J(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,i)},t.prototype.entries=function(){return new n(this._keys,this._values,s)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[o]=function(){return this.entries()},t.prototype._find=function(e,t){if(!J(this._cacheKey,e)){this._cacheIndex=-1;for(var n=0;n<this._keys.length;n++)if(J(this._keys[n],e)){this._cacheIndex=n;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function i(e,t){return t}function s(e,t){return[e,t]}}function ce(){return function(){function e(){this._map=new p}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[o]=function(){return this.keys()},e}()}function de(){var e=16,t=c.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&c.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?c.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+u()}while(c.has(t,e));return t[e]=!0,e}function o(e,t){if(!n.call(e,r)){if(!t)return;Object.defineProperty(e,r,{value:c.create()})}return e[r]}function s(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function a(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):s(t,e),t}return s(new Array(e),e)}function u(){var t=a(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function pe(e){return e.__=void 0,delete e.__,e}e("decorate",y),e("metadata",_),e("defineMetadata",g),e("hasMetadata",w),e("hasOwnMetadata",b),e("getMetadata",k),e("getOwnMetadata",z),e("getMetadataKeys",E),e("getOwnMetadataKeys",$),e("deleteMetadata",O)}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(e||(e={}))),gi;var e}();const wi=Symbol("api-method-metadata"),bi=new Map,ki=e=>(t,n)=>{Reflect.defineMetadata(wi,e,t,n);const r=e.httpVerb,i=e.endpoint,o=`${r.toLowerCase()} ${i}`;bi.set(o,e);const s=t.constructor;"function"!=typeof s.toJSON&&Object.defineProperty(s,"toJSON",{value:e=>Reflect.getMetadata(wi,s.prototype,e),writable:!1,configurable:!1})},zi={enabled:!0,debug:!1},Ei=(e,t=zi)=>{if(t.enabled)try{const n=((e,t=xr)=>{if(!e)return"";let n=new URL(e,t).pathname;return n=n.replace(/\/[0-9a-f]{8}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{12}/gi,""),n})(e.config.url||"");if(!n)return void(t.debug&&console.debug("[HallidayPaymentsApiClient] No endpoint found in URL:",e.config.url));const r=`${e.config.method?.toLowerCase()||"get"} ${n}`,i=bi.get(r)?.outputSchema;if(!i)return void(t.debug&&console.debug(`[HallidayPaymentsApiClient] No validation schema defined for endpoint: ${n}`));const o=i.safeParse(e.data);o.success||(console.warn(`[HallidayPaymentsApiClient] Response validation failed for ${n}. Your SDK version might be outdated - please check for updates.`),t.debug&&console.debug("[HallidayPaymentsApiClient] Response validation error:",o.error))}catch(e){t.debug&&console.debug("[HallidayPaymentsApiClient] Response validation error:",e)}};var $i;!function(e){e.VALIDATION_ERROR="VALIDATION_ERROR",e.API_ERROR="API_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.NETWORK_ERROR="NETWORK_ERROR",e.UNKNOWN_ERROR="UNKNOWN_ERROR"}($i||($i={}));class Oi extends Error{constructor({message:e,code:t,status:n,statusText:r,reqHeaders:i,resHeaders:o,data:s,config:a,request:u,response:c,error:d,validationIssues:p,validationMessage:l}){super(e),this.name="HallidayPaymentsApiClientError",this.validationIssues=null,this.validationMessage=null,this.status=null,this.statusText=null,this.reqHeaders=null,this.resHeaders=null,this.data=null,this.config=null,this.request=null,this.response=null,this.error=null,this.code=t,this.message=e,this.status=n??null,this.statusText=r??null,this.reqHeaders=i??null,this.resHeaders=o??null,this.data=s??null,this.config=a??null,this.request=u??null,this.response=c??null,this.error=d??null,this.validationIssues=p??null,this.validationMessage=l??null,Object.setPrototypeOf(this,Oi.prototype)}static isPaymentsApiClientError(e){return e instanceof Oi}static parseValidationError({message:e,error:t}){return new Oi({message:e??t?.message??"Validation error",code:$i.VALIDATION_ERROR,validationIssues:t instanceof pn?t.issues:null,validationMessage:t instanceof pn?t.message:null,error:t})}static parseAxiosError(e){if(e.response){const t=e.response.status;let n=e.response.data?.errors||[],r=null;Array.isArray(n)||(n=[n]);let i=n.map((e=>"string"!=typeof e?JSON.stringify(e):e)).join("\n")||e.message||"Unknown error",o=e.response?.statusText;return 500===t?new Oi({message:i,code:$i.SERVER_ERROR,status:500,statusText:`${e.code??"500"}: ${o??"Server Error"}`,data:e.response?.data,config:e.config,request:e.request,response:e.response,reqHeaders:e.request?.headers,resHeaders:e.response?.headers}):(400===t?(i=`Bad request: ${i}`,o=`${e.code??"400"}: ${o??"Bad Request"}`,r=n):401===t?(i=`Unauthorized: ${i}`,o=`${e.code??"401"}: ${o??"Unauthorized"}`):403===t?(i=`Forbidden: ${i}`,o=`${e.code??"403"}: ${o??"Forbidden"}`):404===t?(i=`Resource not found: ${i}`,o=`${e.code??"404"}: ${o??"Not Found"}`):(i=`Request failed with status ${t}: ${i}`,o=`${e.code??t}: ${o??"Unexpected error"}`),new Oi({message:i,code:$i.API_ERROR,status:t,statusText:o,data:e.response?.data,config:e.config,request:e.request,response:e.response,reqHeaders:e.request?.headers,resHeaders:e.response?.headers,validationIssues:r}))}return e.request?new Oi({message:e.message||`No response received from the server: ${e.code}`,code:$i.NETWORK_ERROR,config:e.config,request:e.request,reqHeaders:e.request?.headers}):"ERR_CANCELED"===e.code?null:new Oi({message:`${e.code?`${e.code}: `:""}${e.message||"No message"}`,code:$i.NETWORK_ERROR,config:e.config,request:e.request,error:e})}toJSON(){return JSON.stringify({name:this.name,code:this.code,message:this.message,validationIssues:this.validationIssues,status:this.status,statusText:this.statusText,config:this.config,stack:this.stack})}}const Ii=({apiKey:t,baseUrl:n=xr,responseValidationOptions:r=zi})=>{if(!Pr.test(n))throw new Error(`Invalid base URL: ${n}`);if(!t)throw new Error("API key is required");const i=e.create({baseURL:n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},parseReviver:vi.reviver}),o=(s=r,{onFulfilled:e=>(Ei(e,s),e),onRejected:e=>{throw e}});var s;i.interceptors.response.use(o.onFulfilled,o.onRejected);const a={onFulfilled:e=>e,onRejected:t=>{if(e.isAxiosError(t)){const e=Oi.parseAxiosError(t);if(e)throw e;return{data:null}}throw new Oi({message:t.message||"Unknown error",code:$i.UNKNOWN_ERROR,error:t})}};return i.interceptors.response.use(a.onFulfilled,a.onRejected),i},Ri=e=>Object.entries(e).reduce(((e,[t,n])=>{if("sandbox"===t)e.push("sandbox="+(!0===n?"true":"false"));else if(Array.isArray(n))for(const r of n)e.push(`${t}[]=${r}`);else e.push(`${t}=${n}`);return e}),[]).join("&"),xi=wn().refine((e=>Ar.test(e)),{message:"Invalid payment ID"}),Pi=lr(["BETA_EDGES","ORG_BETA_EDGES","ORG_EDGES"]),Ai=rr({onramps:tr(si).optional(),offramps:tr(si).optional(),sandbox:Wn().optional().default(!1),features:tr(Pi).optional()}),Ti=Ai.extend({inputs:tr(ri).optional(),outputs:tr(ri)}),Si=Ai.extend({inputs:tr(ri),outputs:tr(ri).optional()}),Zi=or([Ti,Si]),Ni=rr({asset:ri,amount:Tr}),ji=rr({token:Xr,amount:Tr}),Ci=wn(),Mi=or([Lt(Sn,Fi),function(e){return Ht(Zn,e)}()]);var Fi;const Vi=rr({price_currency:Dr,onramps:tr(si).optional(),onramp_methods:tr(mi).optional(),customer_ip_address:wn().optional(),customer_id:wn().optional(),parent_payment_id:xi.optional(),features:tr(Pi).optional()}),Di=ar("kind",[rr({kind:hr("FIXED_INPUT"),fixed_input_amount:Ni,output_asset:ri})]),Ui=Vi.extend({request:Di}),qi=lr(["USER","DEST","HALLIDAY","SPW","REV_SHARE","BRIDGE"]),Li=lr(["APPROVAL","BALANCE"]),Hi=rr({asset:ri,property:Li}),Wi=rr({account:qi,resource:Hi}),Gi=or([hr("COMPLETE"),hr("UNREACHABLE"),hr("FAILED")]),Ki=or([Gi,hr("PENDING")]),Bi=lr(["PENDING","COMPLETE","FAILED","EXPIRED","WITHDRAWN","TAINTED"]),Ji=rr({consume:tr(Wi),produce:tr(Wi)}),Yi=Wi.extend({amount:Tr}),Xi=Ji.extend({consume:tr(Yi),produce:tr(Yi)}),Qi=dr(ri,wn()),eo=ar("kind",[rr({kind:or([hr("amount"),hr("amount-downstream")]),given:wn(),limits:rr({min:wn().optional(),max:wn().optional()}),source:wn(),message:wn()}),rr({kind:hr("geolocation"),message:wn()}),rr({kind:hr("provider"),message:wn()}),rr({kind:hr("other"),message:wn()}),rr({kind:hr("unknown"),message:wn()})]),to=rr({service_ids:tr(wn()),latency_seconds:Un(),issues:tr(eo).optional()}),no=or([hr("USER_FUND"),hr("ONCHAIN_STEP"),hr("ONRAMP")]),ro=rr({type:no,net_effect:Xi,pieces_info:tr(rr({type:or([hr("onramp"),hr("poll"),hr("bridge"),hr("rev_share"),hr("transfer_out"),hr("convert")])})),step_index:Un().optional()}),io=rr({payment_id:wn(),output_amount:rr({asset:ri,amount:wn()}),onramp:si.optional(),onramp_method:mi.optional(),fees:rr({total_fees:wn(),conversion_fees:wn(),network_fees:wn(),business_fees:wn(),currency_symbol:Dr}),route:tr(ro)}),oo=ro.extend({status:Ki,transaction_hash:wn().optional()}),so=io.omit({payment_id:!0}).partial({output_amount:!0,onramp:!0,onramp_method:!0,fees:!0}).extend({route:tr(oo)}),ao=rr({quote_request:Ui,quotes:tr(io),current_prices:Qi,price_currency:Dr,state_token:wn(),quoted_at:wn(),accept_by:wn(),failures:tr(to)}),uo=rr({payment_id:xi,state_token:wn(),owner_address:Vr,destination_address:Vr,client_redirect_url:wn().optional()}),co=rr({deposit_token:Xr,deposit_chain:wn(),deposit_amount:Tr,deposit_address:Vr}),po=rr({type:lr(["ONRAMP","TRANSFER_IN"]),payment_id:xi,funding_page_url:function(e){return qt($n,e)}(),deposit_info:tr(co)}),lo=rr({payment_id:xi,status:Bi,funded:Wn(),created_at:wn(),updated_at:wn(),initiate_fund_by:wn(),completed_at:wn().optional(),quote_request:Ui,quoted:io.omit({payment_id:!0}),fulfilled:so,current_prices:Qi,price_currency:Dr,customer_id:wn().optional(),processing_addresses:tr(rr({address:Vr,chain:wn()})),owner_address:Vr,destination_address:Vr,next_instruction:po.optional(),parent_payment_id:xi.optional()}),fo=lo,ho=rr({payment_id:xi,redirect_url:wn().optional()}),mo=rr({funding_page_onramp_url:wn(),client_redirect_url:wn().optional(),client_secret:wn().optional()}),vo=rr({id_query:wn().optional(),pagination_key:wn().optional(),dest_address:Vr.optional(),owner_address:Vr.optional(),limit:Un().int().positive().optional(),category:lr(["ALL","NEW_OR_FUNDED"]).optional()}),yo=rr({payment_statuses:tr(fo),next_pagination_key:wn().nullable()}),_o=rr({payment_id:xi.optional(),custom_queries:tr(rr({address:Vr,token:or([Xr,Yr])})).optional()}).refine((e=>!(!e.payment_id&&!e.custom_queries?.length)),{message:"payment_id or custom_queries is required"}),go=rr({balance_results:tr(rr({address:Vr,token:Xr,value:ar("kind",[rr({kind:hr("amount"),amount:Tr}),rr({kind:hr("error")})])}))}),wo=rr({fiat:Dr,tokens:tr(Xr)}),bo=wn(),ko=rr({payment_id:xi,token_amounts:tr(ji),recipient_address:Vr}),zo=rr({payment_id:xi,withdraw_authorization:bo}),Eo=ko.extend({owner_signature:Ci}),$o=rr({payment_id:xi,transaction_hash:wn()});class Oo{constructor(e){this.getChains=async(e=!1)=>{const{data:t}=await this.apiClient.get("/chains?sandbox="+(e?"true":"false"));return t},this.getAssetDetails=async({assets:e=[],sandbox:t})=>{if("boolean"!=typeof t)throw Oi.parseValidationError({message:"Invalid sandbox value"});let n=`sandbox=${t}`;if(e){if(!Array.isArray(e))throw Oi.parseValidationError({message:"Invalid assets"});for(const t of e)try{n+=`&assets[]=${ri.parse(t)}`}catch(e){throw Oi.parseValidationError({message:`Invalid asset: ${t}`,error:e})}}return(await this.apiClient.get(`/assets?${n}`)).data},this.getInputs=async e=>{let t;try{const n=Ti.parse(e);t=Ri(n)}catch(e){throw Oi.parseValidationError({message:"Invalid asset filters",error:e})}return(await this.apiClient.get(`/assets/available-inputs?${t}`)).data},this.getOutputs=async e=>{let t;try{const n=Si.parse(e);t=Ri(n)}catch(e){throw Oi.parseValidationError({message:"Invalid asset filters",error:e})}return(await this.apiClient.get(`/assets/available-outputs?${t}`)).data},this.getQuotes=async(e,t)=>{let n;try{n=Ui.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for quotes",error:e})}return(await this.apiClient.post("/payments/quotes",n,{signal:t})).data},this.confirmQuote=async e=>{let t;try{t=uo.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for confirming quote",error:e})}return(await this.apiClient.post("/payments/confirm",t)).data},this.createPaymentSession=async e=>{let t;try{t=ho.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for onramp session",error:e})}return(await this.apiClient.post("/onramp",t)).data},this.getStatus=async(e,t)=>{try{xi.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid payment ID",error:e})}const n=new URLSearchParams;n.set("payment_id",e);const r=n.toString();return(await this.apiClient.get(`/payments?${r}`,{signal:t})).data},this.getPaymentsHistory=async e=>{let t;try{t=vo.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for payments",error:e})}const n=new URLSearchParams;t.id_query&&n.set("id_query",t.id_query),t.pagination_key&&n.set("pagination_key",t.pagination_key),t.dest_address&&n.set("dest_address",t.dest_address),t.owner_address&&n.set("owner_address",t.owner_address),t.limit&&n.set("limit",t.limit.toString()),t.category&&n.set("category",t.category);let r=n.toString();r&&(r=`?${r}`);return(await this.apiClient.get(`/payments/history${r}`)).data},this.getBalance=async e=>{let t;try{t=_o.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for balance",error:e})}return(await this.apiClient.post("/payments/balances",t)).data},this.getPrices=async e=>{let t;try{t=wo.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for prices",error:e})}return(await this.apiClient.post("/prices",t)).data},this.getWithdrawAuthorization=async e=>{let t;try{t=ko.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for withdraw authorization",error:e})}return(await this.apiClient.post("/payments/withdraw",t)).data},this.withdraw=async e=>{let t;try{t=Eo.parse(e)}catch(e){throw Oi.parseValidationError({message:"Invalid request for withdraw",error:e})}return(await this.apiClient.post("/payments/withdraw/confirm",t)).data};const{apiKey:t,baseUrl:n=xr,responseValidation:r={}}=e,i={...zi,...r};this.apiClient=Ii({baseUrl:n,apiKey:t,responseValidationOptions:i})}static toJSON(e){return Reflect.getMetadata(wi,this.prototype,e)}}t([ki({description:"Retrieves the supported chain configuration.",httpVerb:"GET",endpoint:"/chains",inputSchema:Wn().optional(),outputSchema:dr(wn(),hi)}),n("design:type",Object)],Oo.prototype,"getChains",void 0),t([ki({description:"Retrieves the asset details for all or the specified assets.",httpVerb:"GET",endpoint:"/assets",inputSchema:rr({assets:tr(ri).optional(),sandbox:Wn().optional()}),outputSchema:dr(ri,ii)}),n("design:type",Object)],Oo.prototype,"getAssetDetails",void 0),t([ki({description:"Retrieves the supported inputs for the specified filters.",httpVerb:"GET",endpoint:"/assets/available-inputs",inputSchema:Ti,outputSchema:dr(ri,rr({fiats:tr(Dr),tokens:tr(Xr)}))}),n("design:type",Object)],Oo.prototype,"getInputs",void 0),t([ki({description:"Retrieves the supported outputs for the specified filters.",httpVerb:"GET",endpoint:"/assets/available-outputs",inputSchema:Si,outputSchema:dr(ri,rr({fiats:tr(Dr),tokens:tr(Xr)}))}),n("design:type",Object)],Oo.prototype,"getOutputs",void 0),t([ki({description:"Retrieves quotes for the given input and output asset.",httpVerb:"POST",endpoint:"/payments/quotes",inputSchema:Ui,outputSchema:ao}),n("design:type",Object)],Oo.prototype,"getQuotes",void 0),t([ki({description:"Confirms a quote.",httpVerb:"POST",endpoint:"/payments/confirm",inputSchema:uo,outputSchema:lo}),n("design:type",Object)],Oo.prototype,"confirmQuote",void 0),t([ki({description:"Creates a onramp provider session for a given payment.",httpVerb:"POST",endpoint:"/onramp",inputSchema:ho,outputSchema:mo}),n("design:type",Object)],Oo.prototype,"createPaymentSession",void 0),t([ki({description:"Retrieves the status of a given payment.",httpVerb:"GET",endpoint:"/payments",inputSchema:xi,outputSchema:fo}),n("design:type",Object)],Oo.prototype,"getStatus",void 0),t([ki({description:"Retrieves the payments history of a given destination address.",httpVerb:"GET",endpoint:"/payments/history",inputSchema:vo,outputSchema:yo}),n("design:type",Object)],Oo.prototype,"getPaymentsHistory",void 0),t([ki({description:"Retrieves the balance of a given workflow or spw address.",httpVerb:"POST",endpoint:"/payments/balances",inputSchema:_o,outputSchema:go}),n("design:type",Object)],Oo.prototype,"getBalance",void 0),t([ki({description:"Retrieves the prices tokens in a given fiat currency.",httpVerb:"POST",endpoint:"/prices",inputSchema:wo,outputSchema:Qi}),n("design:type",Object)],Oo.prototype,"getPrices",void 0),t([ki({description:"Retrieves the withdraw authorization for a given workflow.",httpVerb:"POST",endpoint:"/payments/withdraw",inputSchema:ko,outputSchema:zo}),n("design:type",Object)],Oo.prototype,"getWithdrawAuthorization",void 0),t([ki({description:"Submits the owner signature for a withdraw payload.",httpVerb:"POST",endpoint:"/payments/withdraw/confirm",inputSchema:Eo,outputSchema:$o}),n("design:type",Object)],Oo.prototype,"withdraw",void 0);export{qi as Account,Vr as Address,Tr as Amount,ri as Asset,ii as AssetDetails,Zi as AssetFilters,go as BalanceResponse,hi as ChainConfig,Yi as ChangeAmount,lo as ConfirmQuoteResponse,co as DepositInfo,Nr as EVMAddress,li as EVMChainConfig,Zr as EVMTokenAddress,ei as EVMTokenDetails,$i as ErrorCodes,to as Failure,Pi as Feature,Dr as Fiat,Ur as FiatDetails,so as Fulfillment,oo as FulfillmentRoute,vi as HSON,Mi as IPAddressOverride,Ti as InputsAssetFilters,eo as Issue,po as NextInstruction,Ki as ObservedStatus,mi as OnrampMethod,mo as OnrampSessionResponse,Si as OutputsAssetFilters,yo as PaymentHistoryResult,xi as PaymentId,fo as PaymentStatus,Oi as PaymentsApiClientError,Qi as Prices,io as Quote,ro as QuotedRoute,ao as QuotesResponse,si as RampName,ai as RampType,oi as Realm,_o as RequestForBalance,uo as RequestForConfirmQuote,ho as RequestForOnrampSession,vo as RequestForPaymentsHistory,wo as RequestForPrices,Ui as RequestForQuotes,Eo as RequestForWithdraw,ko as RequestForWithdrawAuthorization,no as RouteType,Fr as SolAddress,fi as SolChainConfig,Mr as SolTokenAddress,ti as SolTokenDetails,Xr as Token,ni as TokenDetails,pi as TransactionReceipt,di as TransactionRequest,bo as TypedData,zo as WithdrawAuthorizationResponse,$o as WithdrawResponse,Oo as default};
|
|
1
|
+
import e from"axios";function t(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function n(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function r(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:s,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const o=s.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=o[t].bind(n))}}const o=n?.Parent??Object;class i extends o{}function s(e){var t;const o=n?.Parent?new i:this;r(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const e of o._zod.deferred)e();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}"function"==typeof SuppressedError&&SuppressedError;class o extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class i extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const s={};function a(e){return s}function u(e){const t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,n])=>-1===t.indexOf(+e))).map((([e,t])=>t))}function c(e,t){return"bigint"==typeof t?t.toString():t}function d(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function p(e){return null==e}function l(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const f=Symbol("evaluating");function h(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==f)return void 0===r&&(r=f,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function m(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function y(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function g(e){return JSON.stringify(e)}const _="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function v(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const w=d((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function b(e){if(!1===v(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==v(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function z(e){return b(e)?{...e}:Array.isArray(e)?[...e]:e}const k=new Set(["string","number","symbol"]);function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function S(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const $={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function x(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function T(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function I(e){return"string"==typeof e?e:e?.message}function P(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=I(e.inst?._zod.def?.error?.(e))??I(t?.error?.(e))??I(n.customError?.(e))??I(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function A(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function N(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const R=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,c,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},j=r("$ZodError",R),Z=r("$ZodError",R,{Parent:Error});const C=e=>(t,n,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},u=t._zod.run({value:n,issues:[]},s);if(u instanceof Promise)throw new o;if(u.issues.length){const t=new(i?.Err??e)(u.issues.map((e=>P(e,s,a()))));throw _(t,i?.callee),t}return u.value},M=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(o?.Err??e)(s.issues.map((e=>P(e,i,a()))));throw _(t,o?.callee),t}return s.value},F=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new o;return s.issues.length?{success:!1,error:new(e??j)(s.issues.map((e=>P(e,i,a()))))}:{success:!0,data:s.value}},V=F(Z),D=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map((e=>P(e,o,a()))))}:{success:!0,data:i.value}},U=D(Z),J=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return C(e)(t,n,o)},L=e=>(t,n,r)=>C(e)(t,n,r),q=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return M(e)(t,n,o)},W=e=>async(t,n,r)=>M(e)(t,n,r),B=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return F(e)(t,n,o)},G=e=>(t,n,r)=>F(e)(t,n,r),H=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return D(e)(t,n,o)},K=e=>async(t,n,r)=>D(e)(t,n,r),Y=/^[cC][^\s-]{8,}$/,X=/^[0-9a-z]+$/,Q=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ee=/^[0-9a-vA-V]{20}$/,te=/^[A-Za-z0-9]{27}$/,ne=/^[a-zA-Z0-9_-]{21}$/,re=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,oe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ie=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,se=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const ae=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ue=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ce=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,de=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,le=/^[A-Za-z0-9_-]*$/,fe=/^\+[1-9]\d{6,14}$/,he="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",me=new RegExp(`^${he}$`);function ye(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ge=/^-?\d+n?$/,_e=/^-?\d+$/,ve=/^-?\d+(?:\.\d+)?$/,we=/^(?:true|false)$/i,be=/^undefined$/i,ze=/^[^A-Z]*$/,ke=/^[^a-z]*$/,Oe=r("$ZodCheck",((e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),Ee={number:"number",bigint:"bigint",object:"date"},Se=r("$ZodCheckLessThan",((e,t)=>{Oe.init(e,t);const n=Ee[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),$e=r("$ZodCheckGreaterThan",((e,t)=>{Oe.init(e,t);const n=Ee[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),xe=r("$ZodCheckMultipleOf",((e,t)=>{Oe.init(e,t),e._zod.onattach.push((e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)})),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(0===o&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(o=Number.parseInt(e[1]))}const i=n>o?n:o;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),Te=r("$ZodCheckNumberFormat",((e,t)=>{Oe.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=$[t.format];e._zod.onattach.push((e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=_e)})),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}})),Ie=r("$ZodCheckMaxLength",((e,t)=>{var n;Oe.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!p(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const o=A(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),Pe=r("$ZodCheckMinLength",((e,t)=>{var n;Oe.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!p(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const o=A(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),Ae=r("$ZodCheckLengthEquals",((e,t)=>{var n;Oe.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!p(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=n=>{const r=n.value,o=r.length;if(o===t.length)return;const i=A(r),s=o>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}})),Ne=r("$ZodCheckStringFormat",((e,t)=>{var n,r;Oe.init(e,t),e._zod.onattach.push((e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))})),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})})),Re=r("$ZodCheckRegex",((e,t)=>{Ne.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}})),je=r("$ZodCheckLowerCase",((e,t)=>{t.pattern??(t.pattern=ze),Ne.init(e,t)})),Ze=r("$ZodCheckUpperCase",((e,t)=>{t.pattern??(t.pattern=ke),Ne.init(e,t)})),Ce=r("$ZodCheckIncludes",((e,t)=>{Oe.init(e,t);const n=O(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)})),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}})),Me=r("$ZodCheckStartsWith",((e,t)=>{Oe.init(e,t);const n=new RegExp(`^${O(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}})),Fe=r("$ZodCheckEndsWith",((e,t)=>{Oe.init(e,t);const n=new RegExp(`.*${O(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}})),Ve=r("$ZodCheckOverwrite",((e,t)=>{Oe.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));class De{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter((e=>e)),n=Math.min(...t.map((e=>e.length-e.trimStart().length))),r=t.map((e=>e.slice(n))).map((e=>" ".repeat(2*this.indent)+e));for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map((e=>` ${e}`))].join("\n"))}}const Ue={major:4,minor:3,patch:6},Je=r("$ZodType",((e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ue;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{const t=(e,t,n)=>{let r,i=x(e);for(const s of t){if(s._zod.def.when){if(!s._zod.def.when(e))continue}else if(i)continue;const t=e.issues.length,a=s._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new o;if(r||a instanceof Promise)r=(r??Promise.resolve()).then((async()=>{await a;e.issues.length!==t&&(i||(i=x(e,t)))}));else{if(e.issues.length===t)continue;i||(i=x(e,t))}}return r?r.then((()=>e)):e},n=(n,i,s)=>{if(x(n))return n.aborted=!0,n;const a=t(i,r,s);if(a instanceof Promise){if(!1===s.async)throw new o;return a.then((t=>e._zod.parse(t,s)))}return e._zod.parse(a,s)};e._zod.run=(i,s)=>{if(s.skipChecks)return e._zod.parse(i,s);if("backward"===s.direction){const t=e._zod.parse({value:i.value,issues:[]},{...s,skipChecks:!0});return t instanceof Promise?t.then((e=>n(e,i,s))):n(t,i,s)}const a=e._zod.parse(i,s);if(a instanceof Promise){if(!1===s.async)throw new o;return a.then((e=>t(e,r,s)))}return t(a,r,s)}}h(e,"~standard",(()=>({validate:t=>{try{const n=V(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return U(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1})))})),Le=r("$ZodString",((e,t)=>{var n;Je.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}})),qe=r("$ZodStringFormat",((e,t)=>{Ne.init(e,t),Le.init(e,t)})),We=r("$ZodGUID",((e,t)=>{t.pattern??(t.pattern=oe),qe.init(e,t)})),Be=r("$ZodUUID",((e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ie(e))}else t.pattern??(t.pattern=ie());qe.init(e,t)})),Ge=r("$ZodEmail",((e,t)=>{t.pattern??(t.pattern=se),qe.init(e,t)})),He=r("$ZodURL",((e,t)=>{qe.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}})),Ke=r("$ZodEmoji",((e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),qe.init(e,t)})),Ye=r("$ZodNanoID",((e,t)=>{t.pattern??(t.pattern=ne),qe.init(e,t)})),Xe=r("$ZodCUID",((e,t)=>{t.pattern??(t.pattern=Y),qe.init(e,t)})),Qe=r("$ZodCUID2",((e,t)=>{t.pattern??(t.pattern=X),qe.init(e,t)})),et=r("$ZodULID",((e,t)=>{t.pattern??(t.pattern=Q),qe.init(e,t)})),tt=r("$ZodXID",((e,t)=>{t.pattern??(t.pattern=ee),qe.init(e,t)})),nt=r("$ZodKSUID",((e,t)=>{t.pattern??(t.pattern=te),qe.init(e,t)})),rt=r("$ZodISODateTime",((e,t)=>{t.pattern??(t.pattern=function(e){const t=ye({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${he}T(?:${r})$`)}(t)),qe.init(e,t)})),ot=r("$ZodISODate",((e,t)=>{t.pattern??(t.pattern=me),qe.init(e,t)})),it=r("$ZodISOTime",((e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ye(t)}$`)),qe.init(e,t)})),st=r("$ZodISODuration",((e,t)=>{t.pattern??(t.pattern=re),qe.init(e,t)})),at=r("$ZodIPv4",((e,t)=>{t.pattern??(t.pattern=ae),qe.init(e,t),e._zod.bag.format="ipv4"})),ut=r("$ZodIPv6",((e,t)=>{t.pattern??(t.pattern=ue),qe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}})),ct=r("$ZodCIDRv4",((e,t)=>{t.pattern??(t.pattern=ce),qe.init(e,t)})),dt=r("$ZodCIDRv6",((e,t)=>{t.pattern??(t.pattern=de),qe.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}}));function pt(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const lt=r("$ZodBase64",((e,t)=>{t.pattern??(t.pattern=pe),qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{pt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}));const ft=r("$ZodBase64URL",((e,t)=>{t.pattern??(t.pattern=le),qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!le.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return pt(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}})),ht=r("$ZodE164",((e,t)=>{t.pattern??(t.pattern=fe),qe.init(e,t)}));const mt=r("$ZodJWT",((e,t)=>{qe.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),yt=r("$ZodNumber",((e,t)=>{Je.init(e,t),e._zod.pattern=e._zod.bag.pattern??ve,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}})),gt=r("$ZodNumberFormat",((e,t)=>{Te.init(e,t),yt.init(e,t)})),_t=r("$ZodBoolean",((e,t)=>{Je.init(e,t),e._zod.pattern=we,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}})),vt=r("$ZodBigInt",((e,t)=>{Je.init(e,t),e._zod.pattern=ge,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}})),wt=r("$ZodUndefined",((e,t)=>{Je.init(e,t),e._zod.pattern=be,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const r=t.value;return void 0===r||t.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),t}})),bt=r("$ZodAny",((e,t)=>{Je.init(e,t),e._zod.parse=e=>e})),zt=r("$ZodUnknown",((e,t)=>{Je.init(e,t),e._zod.parse=e=>e})),kt=r("$ZodNever",((e,t)=>{Je.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}));function Ot(e,t,n){e.issues.length&&t.issues.push(...T(n,e.issues)),t.value[n]=e.value}const Et=r("$ZodArray",((e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const s=o[e],a=t.element._zod.run({value:s,issues:[]},r);a instanceof Promise?i.push(a.then((t=>Ot(t,n,e)))):Ot(a,n,e)}return i.length?Promise.all(i).then((()=>n)):n}}));function St(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...T(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function $t(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter((e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout)));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function xt(e,t,n,r,o,i){const s=[],a=o.keySet,u=o.catchall._zod,c=u.def.type,d="optional"===u.optout;for(const o in t){if(a.has(o))continue;if("never"===c){s.push(o);continue}const i=u.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then((e=>St(e,n,o,t,d)))):St(i,n,o,t,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then((()=>n)):n}const Tt=r("$ZodObject",((e,t)=>{Je.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=d((()=>$t(t)));h(e._zod,"propValues",(()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n}));const o=v,i=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=r.value);const a=t.value;if(!o(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const r=c[e],o="optional"===r._zod.optout,i=r._zod.run({value:a[e],issues:[]},n);i instanceof Promise?u.push(i.then((n=>St(n,t,e,a,o)))):St(i,t,e,a,o)}return i?xt(u,a,t,n,r.value,e):u.length?Promise.all(u).then((()=>t)):t}})),It=r("$ZodObjectJIT",((e,t)=>{Tt.init(e,t);const n=e._zod.parse,r=d((()=>$t(t)));let o;const i=v,a=!s.jitless,u=a&&w.value,c=t.catchall;let p;e._zod.parse=(s,d)=>{p??(p=r.value);const l=s.value;return i(l)?a&&u&&!1===d?.async&&!0!==d.jitless?(o||(o=(e=>{const t=new De(["shape","payload","ctx"]),n=r.value,o=e=>{const t=g(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let s=0;for(const e of n.keys)i[e]="key_"+s++;t.write("const newResult = {};");for(const r of n.keys){const n=i[r],s=g(r),a=e[r],u="optional"===a?._zod?.optout;t.write(`const ${n} = ${o(r)};`),u?t.write(`\n if (${n}.issues.length) {\n if (${s} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),s=o(s,d),c?xt([],l,s,d,p,e):s):n(s,d):(s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s)}}));function Pt(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const o=e.filter((e=>!x(e)));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((e=>e.issues.map((e=>P(e,r,a())))))}),t)}const At=r("$ZodUnion",((e,t)=>{Je.init(e,t),h(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),h(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),h(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),h(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){const e=t.options.map((e=>e._zod.pattern));return new RegExp(`^(${e.map((e=>l(e.source))).join("|")})$`)}}));const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:o.value,issues:[]},i);if(t instanceof Promise)a.push(t),s=!0;else{if(0===t.issues.length)return t;a.push(t)}}return s?Promise.all(a).then((t=>Pt(t,o,e,i))):Pt(a,o,e,i)}})),Nt=r("$ZodDiscriminatedUnion",((e,t)=>{t.inclusive=!1,At.init(e,t);const n=e._zod.parse;h(e._zod,"propValues",(()=>{const e={};for(const n of t.options){const r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(const r of n)e[t].add(r)}}return e}));const r=d((()=>{const e=t.options,n=new Map;for(const r of e){const e=r._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n}));e._zod.parse=(o,i)=>{const s=o.value;if(!v(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const a=r.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}})),Rt=r("$ZodIntersection",((e,t)=>{Je.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then((([t,n])=>Zt(e,t,n))):Zt(e,o,i)}}));function jt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(b(e)&&b(t)){const n=Object.keys(t),r=Object.keys(e).filter((e=>-1!==n.indexOf(e))),o={...e,...t};for(const n of r){const r=jt(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};o[n]=r.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=jt(e[r],t[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Zt(e,t,n){const r=new Map;let o;for(const n of t.issues)if("unrecognized_keys"===n.code){o??(o=n);for(const e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);const i=[...r].filter((([,e])=>e.l&&e.r)).map((([e])=>e));if(i.length&&o&&e.issues.push({...o,keys:i}),x(e))return e;const s=jt(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const Ct=r("$ZodRecord",((e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!b(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){a.add("number"==typeof e?e.toString():e);const s=t.valueType._zod.run({value:o[e],issues:[]},r);s instanceof Promise?i.push(s.then((t=>{t.issues.length&&n.issues.push(...T(e,t.issues)),n.value[e]=t.value}))):(s.issues.length&&n.issues.push(...T(e,s.issues)),n.value[e]=s.value)}let u;for(const e in o)a.has(e)||(u=u??[],u.push(e));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u})}else{n.value={};for(const s of Reflect.ownKeys(o)){if("__proto__"===s)continue;let u=t.keyType._zod.run({value:s,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof s&&ve.test(s)&&u.issues.length){const e=t.keyType._zod.run({value:Number(s),issues:[]},r);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(u=e)}if(u.issues.length){"loose"===t.mode?n.value[s]=o[s]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map((e=>P(e,r,a()))),input:s,path:[s],inst:e});continue}const c=t.valueType._zod.run({value:o[s],issues:[]},r);c instanceof Promise?i.push(c.then((e=>{e.issues.length&&n.issues.push(...T(s,e.issues)),n.value[u.value]=e.value}))):(c.issues.length&&n.issues.push(...T(s,c.issues)),n.value[u.value]=c.value)}}return i.length?Promise.all(i).then((()=>n)):n}})),Mt=r("$ZodEnum",((e,t)=>{Je.init(e,t);const n=u(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter((e=>k.has(typeof e))).map((e=>"string"==typeof e?O(e):e.toString())).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}})),Ft=r("$ZodLiteral",((e,t)=>{if(Je.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((e=>"string"==typeof e?O(e):e?O(e.toString()):String(e))).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}})),Vt=r("$ZodTransform",((e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new i(e.constructor.name);const s=t.transform(n.value,n);if(r.async){return(s instanceof Promise?s:Promise.resolve(s)).then((e=>(n.value=e,n)))}if(s instanceof Promise)throw new o;return n.value=s,n}}));function Dt(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Ut=r("$ZodOptional",((e,t)=>{Je.init(e,t),e._zod.optin="optional",e._zod.optout="optional",h(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),h(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${l(e.source)})?$`):void 0})),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((t=>Dt(t,e.value))):Dt(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),Jt=r("$ZodExactOptional",((e,t)=>{Ut.init(e,t),h(e._zod,"values",(()=>t.innerType._zod.values)),h(e._zod,"pattern",(()=>t.innerType._zod.pattern)),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)})),Lt=r("$ZodNullable",((e,t)=>{Je.init(e,t),h(e._zod,"optin",(()=>t.innerType._zod.optin)),h(e._zod,"optout",(()=>t.innerType._zod.optout)),h(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${l(e.source)}|null)$`):void 0})),h(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)})),qt=r("$ZodDefault",((e,t)=>{Je.init(e,t),e._zod.optin="optional",h(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((e=>Wt(e,t))):Wt(r,t)}}));function Wt(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Bt=r("$ZodPrefault",((e,t)=>{Je.init(e,t),e._zod.optin="optional",h(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))})),Gt=r("$ZodNonOptional",((e,t)=>{Je.init(e,t),h(e._zod,"values",(()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then((t=>Ht(t,e))):Ht(o,e)}}));function Ht(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Kt=r("$ZodCatch",((e,t)=>{Je.init(e,t),h(e._zod,"optin",(()=>t.innerType._zod.optin)),h(e._zod,"optout",(()=>t.innerType._zod.optout)),h(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>P(e,n,a())))},input:e.value}),e.issues=[]),e))):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>P(e,n,a())))},input:e.value}),e.issues=[]),e)}})),Yt=r("$ZodPipe",((e,t)=>{Je.init(e,t),h(e._zod,"values",(()=>t.in._zod.values)),h(e._zod,"optin",(()=>t.in._zod.optin)),h(e._zod,"optout",(()=>t.out._zod.optout)),h(e._zod,"propValues",(()=>t.in._zod.propValues)),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then((e=>Xt(e,t.in,n))):Xt(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then((e=>Xt(e,t.out,n))):Xt(r,t.out,n)}}));function Xt(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Qt=r("$ZodReadonly",((e,t)=>{Je.init(e,t),h(e._zod,"propValues",(()=>t.innerType._zod.propValues)),h(e._zod,"values",(()=>t.innerType._zod.values)),h(e._zod,"optin",(()=>t.innerType?._zod?.optin)),h(e._zod,"optout",(()=>t.innerType?._zod?.optout)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(en):en(r)}}));function en(e){return e.value=Object.freeze(e.value),e}const tn=r("$ZodCustom",((e,t)=>{Oe.init(e,t),Je.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then((t=>nn(t,n,r,e)));nn(o,n,r,e)}}));function nn(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(N(e))}}var rn;class on{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(rn=globalThis).__zod_globalRegistry??(rn.__zod_globalRegistry=new on);const sn=globalThis.__zod_globalRegistry;function an(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...S(t)})}function un(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...S(t)})}function cn(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...S(t)})}function dn(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...S(t)})}function pn(e,t){return new Se({check:"less_than",...S(t),value:e,inclusive:!1})}function ln(e,t){return new Se({check:"less_than",...S(t),value:e,inclusive:!0})}function fn(e,t){return new $e({check:"greater_than",...S(t),value:e,inclusive:!1})}function hn(e,t){return new $e({check:"greater_than",...S(t),value:e,inclusive:!0})}function mn(e,t){return new xe({check:"multiple_of",...S(t),value:e})}function yn(e,t){return new Ie({check:"max_length",...S(t),maximum:e})}function gn(e,t){return new Pe({check:"min_length",...S(t),minimum:e})}function _n(e,t){return new Ae({check:"length_equals",...S(t),length:e})}function vn(e){return new Ve({check:"overwrite",tx:e})}function wn(e){const t=function(e,t){const n=new Oe({check:"custom",...S(t)});return n._zod.check=e,n}((n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(N(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(N(r))}},e(n.value,n))));return t}function bn(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??sn,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function zn(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,r);else{const n=s.schema,i=t.processors[o.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}const i=e._zod.parent;i&&(s.ref||(s.ref=i),zn(i,t,r),t.seen.get(i).isParent=!0)}const u=t.metadataRegistry.get(e);u&&Object.assign(s.schema,u),"input"===t.io&&En(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault;return t.seen.get(e).schema}function kn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=r.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}const o=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:o,defId:i}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(n)return{ref:o(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${o("__shared")}#/${r}/${i}`}}if(t[1]===n)return{ref:"#"};const o=`#/${r}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:o+i}})(t);r.def={...r.schema},i&&(r.defId=i);const s=r.schema;for(const e in s)delete s[e];s.$ref=o};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const r=n[1];if(t===n[0]){o(n);continue}if(e.external){const r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){o(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?o(n):(r.cycle||r.count>1&&"ref"===e.reused)&&o(n)}}function On(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const o=n.def??n.schema,i={...o},s=n.ref;if(n.ref=null,s){r(s);const n=e.seen.get(s),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(o,a):(o.allOf=o.allOf??[],o.allOf.push(a)),Object.assign(o,i);if(t._zod.parent===s)for(const e in o)"$ref"!==e&&"allOf"!==e&&(e in i||delete o[e]);if(a.$ref&&n.def)for(const e in o)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(o[e])===JSON.stringify(n.def[e])&&delete o[e]}const a=t._zod.parent;if(a&&a!==s){r(a);const t=e.seen.get(a);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(const e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())r(t[0]);const o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(n)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?o.$defs=i:o.definitions=i);try{const n=JSON.parse(JSON.stringify(o));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Sn(t,"input",e.processors),output:Sn(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function En(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return En(r.element,n);if("set"===r.type)return En(r.valueType,n);if("lazy"===r.type)return En(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return En(r.innerType,n);if("intersection"===r.type)return En(r.left,n)||En(r.right,n);if("record"===r.type||"map"===r.type)return En(r.keyType,n)||En(r.valueType,n);if("pipe"===r.type)return En(r.in,n)||En(r.out,n);if("object"===r.type){for(const e in r.shape)if(En(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(En(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(En(e,n))return!0;return!(!r.rest||!En(r.rest,n))}return!1}const Sn=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=bn({...o??{},target:i,io:t,processors:n});return zn(e,s),kn(s,e),On(s,e)},$n={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},xn=(e,t,n,r)=>{const o=e._zod.def;zn(o.innerType,t,r);t.seen.get(e).ref=o.innerType},Tn=r("ZodISODateTime",((e,t)=>{rt.init(e,t),nr.init(e,t)}));function In(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...S(t)})}(Tn,e)}const Pn=r("ZodISODate",((e,t)=>{ot.init(e,t),nr.init(e,t)}));function An(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...S(t)})}(Pn,e)}const Nn=r("ZodISOTime",((e,t)=>{it.init(e,t),nr.init(e,t)}));function Rn(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...S(t)})}(Nn,e)}const jn=r("ZodISODuration",((e,t)=>{st.init(e,t),nr.init(e,t)}));function Zn(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...S(t)})}(jn,e)}const Cn=(e,t)=>{j.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map((e=>r({issues:e})));else if("invalid_key"===o.code)r({issues:o.issues});else if("invalid_element"===o.code)r({issues:o.issues});else if(0===o.path.length)n._errors.push(t(o));else{let e=n,r=0;for(;r<o.path.length;){const n=o.path[r];r===o.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(o))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,c,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,c,2)}},isEmpty:{get:()=>0===e.issues.length}})},Mn=r("ZodError",Cn),Fn=r("ZodError",Cn,{Parent:Error}),Vn=C(Fn),Dn=M(Fn),Un=F(Fn),Jn=D(Fn),Ln=J(Fn),qn=L(Fn),Wn=q(Fn),Bn=W(Fn),Gn=B(Fn),Hn=G(Fn),Kn=H(Fn),Yn=K(Fn),Xn=r("ZodType",((e,t)=>(Je.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Sn(e,"input"),output:Sn(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=bn({...n,processors:t});return zn(e,r),kn(r,e),On(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(y(t,{checks:[...t.checks??[],...n.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>E(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Vn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Un(e,t,n),e.parseAsync=async(t,n)=>Dn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Jn(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ln(e,t,n),e.decode=(t,n)=>qn(e,t,n),e.encodeAsync=async(t,n)=>Wn(e,t,n),e.decodeAsync=async(t,n)=>Bn(e,t,n),e.safeEncode=(t,n)=>Gn(e,t,n),e.safeDecode=(t,n)=>Hn(e,t,n),e.safeEncodeAsync=async(t,n)=>Kn(e,t,n),e.safeDecodeAsync=async(t,n)=>Yn(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...S(n)})}(fo,e,t)}(t,n)),e.superRefine=t=>e.check(wn(t)),e.overwrite=t=>e.check(vn(t)),e.optional=()=>to(e),e.exactOptional=()=>new no({type:"optional",innerType:e}),e.nullable=()=>oo(e),e.nullish=()=>to(oo(e)),e.nonoptional=t=>function(e,t){return new ao({type:"nonoptional",innerType:e,...S(t)})}(e,t),e.array=()=>Mr(e),e.or=t=>Ur([e,t]),e.and=t=>new qr({type:"intersection",left:e,right:t}),e.transform=t=>po(e,Qr(t)),e.default=t=>{return n=t,new io({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():z(n)}});var n},e.prefault=t=>{return n=t,new so({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():z(n)}});var n},e.catch=t=>{return new uo({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>po(e,t),e.readonly=()=>new lo({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return sn.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>sn.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return sn.get(e);const n=e.clone();return sn.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e))),Qn=r("_ZodString",((e,t)=>{Le.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:o,maximum:i,format:s,patterns:a,contentEncoding:u}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof i&&(r.maxLength=i),s&&(r.format=$n[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),u&&(r.contentEncoding=u),a&&a.size>0){const e=[...a];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map((e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source})))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new Re({check:"string_format",format:"regex",...S(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Ce({check:"string_format",format:"includes",...S(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Me({check:"string_format",format:"starts_with",...S(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Fe({check:"string_format",format:"ends_with",...S(t),suffix:e})}(...t)),e.min=(...t)=>e.check(gn(...t)),e.max=(...t)=>e.check(yn(...t)),e.length=(...t)=>e.check(_n(...t)),e.nonempty=(...t)=>e.check(gn(1,...t)),e.lowercase=t=>e.check(function(e){return new je({check:"string_format",format:"lowercase",...S(e)})}(t)),e.uppercase=t=>e.check(function(e){return new Ze({check:"string_format",format:"uppercase",...S(e)})}(t)),e.trim=()=>e.check(vn((e=>e.trim()))),e.normalize=(...t)=>e.check(function(e){return vn((t=>t.normalize(e)))}(...t)),e.toLowerCase=()=>e.check(vn((e=>e.toLowerCase()))),e.toUpperCase=()=>e.check(vn((e=>e.toUpperCase()))),e.slugify=()=>e.check(vn((e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))))})),er=r("ZodString",((e,t)=>{Le.init(e,t),Qn.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...S(t)})}(rr,t)),e.url=t=>e.check(un(sr,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...S(t)})}(zr,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...S(t)})}(ur,t)),e.guid=t=>e.check(an(or,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...S(t)})}(ir,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...S(t)})}(ir,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...S(t)})}(ir,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...S(t)})}(ir,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...S(t)})}(cr,t)),e.guid=t=>e.check(an(or,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...S(t)})}(dr,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...S(t)})}(pr,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...S(t)})}(lr,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...S(t)})}(vr,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...S(t)})}(wr,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...S(t)})}(fr,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...S(t)})}(hr,t)),e.ipv4=t=>e.check(cn(mr,t)),e.ipv6=t=>e.check(dn(yr,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...S(t)})}(gr,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...S(t)})}(_r,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...S(t)})}(br,t)),e.datetime=t=>e.check(In(t)),e.date=t=>e.check(An(t)),e.time=t=>e.check(Rn(t)),e.duration=t=>e.check(Zn(t))}));function tr(e){return function(e,t){return new e({type:"string",...S(t)})}(er,e)}const nr=r("ZodStringFormat",((e,t)=>{qe.init(e,t),Qn.init(e,t)})),rr=r("ZodEmail",((e,t)=>{Ge.init(e,t),nr.init(e,t)})),or=r("ZodGUID",((e,t)=>{We.init(e,t),nr.init(e,t)})),ir=r("ZodUUID",((e,t)=>{Be.init(e,t),nr.init(e,t)})),sr=r("ZodURL",((e,t)=>{He.init(e,t),nr.init(e,t)}));function ar(e){return un(sr,e)}const ur=r("ZodEmoji",((e,t)=>{Ke.init(e,t),nr.init(e,t)})),cr=r("ZodNanoID",((e,t)=>{Ye.init(e,t),nr.init(e,t)})),dr=r("ZodCUID",((e,t)=>{Xe.init(e,t),nr.init(e,t)})),pr=r("ZodCUID2",((e,t)=>{Qe.init(e,t),nr.init(e,t)})),lr=r("ZodULID",((e,t)=>{et.init(e,t),nr.init(e,t)})),fr=r("ZodXID",((e,t)=>{tt.init(e,t),nr.init(e,t)})),hr=r("ZodKSUID",((e,t)=>{nt.init(e,t),nr.init(e,t)})),mr=r("ZodIPv4",((e,t)=>{at.init(e,t),nr.init(e,t)}));const yr=r("ZodIPv6",((e,t)=>{ut.init(e,t),nr.init(e,t)}));const gr=r("ZodCIDRv4",((e,t)=>{ct.init(e,t),nr.init(e,t)})),_r=r("ZodCIDRv6",((e,t)=>{dt.init(e,t),nr.init(e,t)})),vr=r("ZodBase64",((e,t)=>{lt.init(e,t),nr.init(e,t)})),wr=r("ZodBase64URL",((e,t)=>{ft.init(e,t),nr.init(e,t)})),br=r("ZodE164",((e,t)=>{ht.init(e,t),nr.init(e,t)})),zr=r("ZodJWT",((e,t)=>{mt.init(e,t),nr.init(e,t)})),kr=r("ZodNumber",((e,t)=>{yt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n,{minimum:o,maximum:i,format:s,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c),"number"==typeof o&&(r.minimum=o,"number"==typeof c&&"draft-04"!==t.target&&(c>=o?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u),"number"==typeof i&&(r.maximum=i,"number"==typeof u&&"draft-04"!==t.target&&(u<=i?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof a&&(r.multipleOf=a)})(e,t,n),e.gt=(t,n)=>e.check(fn(t,n)),e.gte=(t,n)=>e.check(hn(t,n)),e.min=(t,n)=>e.check(hn(t,n)),e.lt=(t,n)=>e.check(pn(t,n)),e.lte=(t,n)=>e.check(ln(t,n)),e.max=(t,n)=>e.check(ln(t,n)),e.int=t=>e.check(Sr(t)),e.safe=t=>e.check(Sr(t)),e.positive=t=>e.check(fn(0,t)),e.nonnegative=t=>e.check(hn(0,t)),e.negative=t=>e.check(pn(0,t)),e.nonpositive=t=>e.check(ln(0,t)),e.multipleOf=(t,n)=>e.check(mn(t,n)),e.step=(t,n)=>e.check(mn(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}));function Or(e){return function(e,t){return new e({type:"number",checks:[],...S(t)})}(kr,e)}const Er=r("ZodNumberFormat",((e,t)=>{gt.init(e,t),kr.init(e,t)}));function Sr(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...S(t)})}(Er,e)}const $r=r("ZodBoolean",((e,t)=>{_t.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)}));function xr(e){return function(e,t){return new e({type:"boolean",...S(t)})}($r,e)}const Tr=r("ZodBigInt",((e,t)=>{vt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")})(0,e),e.gte=(t,n)=>e.check(hn(t,n)),e.min=(t,n)=>e.check(hn(t,n)),e.gt=(t,n)=>e.check(fn(t,n)),e.gte=(t,n)=>e.check(hn(t,n)),e.min=(t,n)=>e.check(hn(t,n)),e.lt=(t,n)=>e.check(pn(t,n)),e.lte=(t,n)=>e.check(ln(t,n)),e.max=(t,n)=>e.check(ln(t,n)),e.positive=t=>e.check(fn(BigInt(0),t)),e.negative=t=>e.check(pn(BigInt(0),t)),e.nonpositive=t=>e.check(ln(BigInt(0),t)),e.nonnegative=t=>e.check(hn(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(mn(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null}));function Ir(e){return function(e,t){return new e({type:"bigint",...S(t)})}(Tr,e)}const Pr=r("ZodUndefined",((e,t)=>{wt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")})(0,e)}));const Ar=r("ZodAny",((e,t)=>{bt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}}));const Nr=r("ZodUnknown",((e,t)=>{zt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}}));function Rr(){return new Nr({type:"unknown"})}const jr=r("ZodNever",((e,t)=>{kt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)}));function Zr(e){return function(e,t){return new e({type:"never",...S(t)})}(jr,e)}const Cr=r("ZodArray",((e,t)=>{Et.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(o.minItems=s),"number"==typeof a&&(o.maxItems=a),o.type="array",o.items=zn(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(gn(t,n)),e.nonempty=t=>e.check(gn(1,t)),e.max=(t,n)=>e.check(yn(t,n)),e.length=(t,n)=>e.check(_n(t,n)),e.unwrap=()=>e.element}));function Mr(e,t){return function(e,t,n){return new e({type:"array",element:t,...S(n)})}(Cr,e,t)}const Fr=r("ZodObject",((e,t)=>{It.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const e in s)o.properties[e]=zn(s[e],t,{...r,path:[...r.path,"properties",e]});const a=new Set(Object.keys(s)),u=new Set([...a].filter((e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout})));u.size>0&&(o.required=Array.from(u)),"never"===i.catchall?._zod.def.type?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=zn(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(o.additionalProperties=!1)})(e,t,n,r),h(e,"shape",(()=>t.shape)),e.keyof=()=>Hr(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Rr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Rr()}),e.strict=()=>e.clone({...e._zod.def,catchall:Zr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!b(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return m(this,"shape",n),n}});return E(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!b(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return m(this,"shape",n),n}});return E(e,n)}(e,t),e.merge=t=>function(e,t){const n=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return m(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return E(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return E(e,y(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return m(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=y(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return m(this,"shape",r),r},checks:[]});return E(e,o)}(e,t),e.partial=(...t)=>function(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=y(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return m(this,"shape",o),o},checks:[]});return E(t,o)}(eo,e,t[0]),e.required=(...t)=>function(e,t,n){const r=y(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return m(this,"shape",o),o}});return E(t,r)}(ao,e,t[0])}));function Vr(e,t){const n={type:"object",shape:e??{},...S(t)};return new Fr(n)}const Dr=r("ZodUnion",((e,t)=>{At.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=!1===o.inclusive,s=o.options.map(((e,n)=>zn(e,t,{...r,path:[...r.path,i?"oneOf":"anyOf",n]})));i?n.oneOf=s:n.anyOf=s})(e,t,n,r),e.options=t.options}));function Ur(e,t){return new Dr({type:"union",options:e,...S(t)})}const Jr=r("ZodDiscriminatedUnion",((e,t)=>{Dr.init(e,t),Nt.init(e,t)}));function Lr(e,t,n){return new Jr({type:"union",options:t,discriminator:e,...S(n)})}const qr=r("ZodIntersection",((e,t)=>{Rt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=zn(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=zn(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,u=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=u})(e,t,n,r)}));const Wr=r("ZodRecord",((e,t)=>{Ct.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const s=i.keyType,a=s._zod.bag,u=a?.patterns;if("loose"===i.mode&&u&&u.size>0){const e=zn(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const t of u)o.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(o.propertyNames=zn(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=zn(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const c=s._zod.values;if(c){const e=[...c].filter((e=>"string"==typeof e||"number"==typeof e));e.length>0&&(o.required=e)}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}));function Br(e,t,n){return new Wr({type:"record",keyType:e,valueType:t,...S(n)})}const Gr=r("ZodEnum",((e,t)=>{Mt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=u(e._zod.def.entries);r.every((e=>"number"==typeof e))&&(n.type="number"),r.every((e=>"string"==typeof e))&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new Gr({...t,checks:[],...S(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Gr({...t,checks:[],...S(r),entries:o})}}));function Hr(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new Gr({type:"enum",entries:n,...S(t)})}const Kr=r("ZodLiteral",((e,t)=>{Ft.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every((e=>"number"==typeof e))&&(n.type="number"),o.every((e=>"string"==typeof e))&&(n.type="string"),o.every((e=>"boolean"==typeof e))&&(n.type="boolean"),o.every((e=>null===e))&&(n.type="null"),n.enum=o})(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function Yr(e,t){return new Kr({type:"literal",values:Array.isArray(e)?e:[e],...S(t)})}const Xr=r("ZodTransform",((e,t)=>{Vt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new i(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(N(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(N(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then((e=>(n.value=e,n))):(n.value=o,n)}}));function Qr(e){return new Xr({type:"transform",transform:e})}const eo=r("ZodOptional",((e,t)=>{Ut.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}));function to(e){return new eo({type:"optional",innerType:e})}const no=r("ZodExactOptional",((e,t)=>{Jt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}));const ro=r("ZodNullable",((e,t)=>{Lt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=zn(o.innerType,t,r),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}));function oo(e){return new ro({type:"nullable",innerType:e})}const io=r("ZodDefault",((e,t)=>{qt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;zn(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}));const so=r("ZodPrefault",((e,t)=>{Bt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;zn(o.innerType,t,r),t.seen.get(e).ref=o.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}));const ao=r("ZodNonOptional",((e,t)=>{Gt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;zn(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}));const uo=r("ZodCatch",((e,t)=>{Kt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;let i;zn(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}));const co=r("ZodPipe",((e,t)=>{Yt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i="input"===t.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;zn(i,t,r),t.seen.get(e).ref=i})(e,t,0,r),e.in=t.in,e.out=t.out}));function po(e,t){return new co({type:"pipe",in:e,out:t})}const lo=r("ZodReadonly",((e,t)=>{Qt.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;zn(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}));const fo=r("ZodCustom",((e,t)=>{tn.init(e,t),Xn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)}));const ho="https://v2.prod.halliday.xyz",mo=/^(https:\/\/(?:[\w-]+\.)*halliday\.xyz(?:\/.*)?|http:\/\/localhost(?::\d+)?(?:\/.*)?|https:\/\/localhost(?::\d+)?(?:\/.*)?)$/,yo=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,go=tr().regex(/^0x[a-fA-F0-9]*$/,{message:"Must be a hex string beginning with 0x"}).transform((e=>e)),_o=tr().regex(/^0x[a-fA-F0-9]{40}$/,{message:"Must be a 40-character hex string beginning with 0x"}).transform((e=>e.toLowerCase())),vo=tr(),wo=tr();Vr({EVM:_o,SOL:vo}).keyof();const bo=tr().regex(/^(\d+|\d*\.\d+)$/);Ir().min(0n),Ir().min(0n);const zo=tr().refine((e=>/^[a-zA-Z_]{3,}$/.test(e)),{message:"Invalid fiat"}),ko=Vr({issuer:tr(),name:tr(),alias:tr().optional(),symbol:tr(),decimals:Or()}),Oo=tr(),Eo=tr().regex(/^[a-zA-Z]\w{1,7}$/,{message:"Must be a short alpha-numeric symbol"}),So=Or().min(0).max(18),$o=tr().url(),xo=tr(),To=Vr({chain:tr(),address:go}),Io=Vr({chain:Yr("solana"),address:vo}),Po=Vr({chain:tr(),address:tr()}),Ao=Ur([To,Io,Po]),No=tr().refine((e=>{const[t,n]=e.split(":");return Ao.safeParse({chain:t,address:n}).success}),{message:"Invalid token"}),Ro=Vr({name:Oo,symbol:Eo,decimals:So,alias:Eo.optional(),image_url:$o.optional(),coingecko_id:xo.optional(),wrapper:Eo.optional(),is_native:xr().optional()}),jo=To.extend(Ro.shape),Zo=Io.extend(Ro.shape),Co=Ur([jo,Zo,Po.extend(Ro.shape)]),Mo=Ur([No,zo]),Fo=Ur([Co,ko]),Vo=Lr("type",[Vr({type:Yr("chain"),chain:tr()}),Vr({type:Yr("issuer"),issuer:tr()})]),Do=tr().transform((e=>e.toLowerCase())),Uo=(Jo=e=>"string"==typeof e?e.toUpperCase():e,Lo=Hr(["ONRAMP","OFFRAMP"]),po(Qr(Jo),Lo));var Jo,Lo;const qo=Vr({to:_o,from:_o.optional(),nonce:Or().optional(),gasLimit:Ir().optional(),gasPrice:Ir().optional(),maxPriorityFeePerGas:Ir().optional(),maxFeePerGas:Ir().optional(),data:tr().optional(),value:Ir().optional(),chainId:Or()}),Wo=Vr({transactionHash:tr().optional(),blockHash:tr().optional(),blockNumber:Or().optional(),from:_o.optional(),to:_o.optional(),rawReceipt:new Ar({type:"any"})}),Bo=Vr({chain_id:Ir(),network:tr(),address_family:function(e,t){return new e({type:"undefined",...S(t)})}(Pr,Go),explorer:ar().optional(),image:ar().optional(),is_testnet:xr()});var Go;const Ho=Bo.extend({address_family:Yr("EVM"),native_currency:Vr({name:tr(),symbol:tr(),decimals:Or()}),rpc:tr().optional()}),Ko=Bo.extend({address_family:Yr("SOL")}),Yo=Lr("address_family",[Ho,Ko,Bo]),Xo=Hr(["CREDIT_CARD","DEBIT_CARD","ACH","FIAT_BALANCE","TOKEN_BALANCE","APPLE_PAY","PAYPAL","VENMO","REVOLUT","GOOGLE_PAY","SEPA","FASTER_PAYMENTS","PIX","UPI","WIRE"]);class Qo{static stringify(e,t){return JSON.stringify(e,(this??Qo).replacer,t)}static parse(e){return JSON.parse(e,(this??Qo).reviver)}}Qo.replacer=(e,t)=>"bigint"==typeof t?{"#":t.toString()}:t,Qo.reviver=(e,t)=>t&&"object"==typeof t&&"#"in t&&1===Object.keys(t).length?BigInt(t["#"]):t;var ei,ti="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ni={};!function(){return ei||(ei=1,function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof ti?ti:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=r(e);function r(e,t){return function(n,r){Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0!==t.Reflect&&(n=r(t.Reflect,n)),function(e,t){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,o=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,a={__proto__:[]}instanceof Array,u=!s&&!a,c={create:s?function(){return pe(Object.create(null))}:a?function(){return pe({__proto__:null})}:function(){return pe({})},has:u?function(e,t){return n.call(e,t)}:function(e,t){return t in e},get:u?function(e,t){return n.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},d=Object.getPrototypeOf(Function),p="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:ue(),l="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:ce(),f="function"==typeof WeakMap?WeakMap:de(),h=r?Symbol.for("@reflect-metadata:registry"):void 0,m=oe(),y=ie(m);function g(e,t,n,r){if(C(n)){if(!W(e))throw new TypeError;if(!G(t))throw new TypeError;return $(e,t)}if(!W(e))throw new TypeError;if(!V(t))throw new TypeError;if(!V(r)&&!C(r)&&!M(r))throw new TypeError;return M(r)&&(r=void 0),x(e,t,n=q(n),r)}function _(e,t){function n(n,r){if(!V(n))throw new TypeError;if(!C(r)&&!H(r))throw new TypeError;N(e,t,n,r)}return n}function v(e,t,n,r){if(!V(n))throw new TypeError;return C(r)||(r=q(r)),N(e,t,n,r)}function w(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=q(n)),T(e,t,n)}function b(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=q(n)),I(e,t,n)}function z(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=q(n)),P(e,t,n)}function k(e,t,n){if(!V(t))throw new TypeError;return C(n)||(n=q(n)),A(e,t,n)}function O(e,t){if(!V(e))throw new TypeError;return C(t)||(t=q(t)),R(e,t)}function E(e,t){if(!V(e))throw new TypeError;return C(t)||(t=q(t)),j(e,t)}function S(e,t,n){if(!V(t))throw new TypeError;if(C(n)||(n=q(n)),!V(t))throw new TypeError;C(n)||(n=q(n));var r=ae(t,n,!1);return!C(r)&&r.OrdinaryDeleteMetadata(e,t,n)}function $(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!C(r)&&!M(r)){if(!G(r))throw new TypeError;t=r}}return t}function x(e,t,n,r){for(var o=e.length-1;o>=0;--o){var i=(0,e[o])(t,n,r);if(!C(i)&&!M(i)){if(!V(i))throw new TypeError;r=i}}return r}function T(e,t,n){if(I(e,t,n))return!0;var r=ne(t);return!M(r)&&T(e,r,n)}function I(e,t,n){var r=ae(t,n,!1);return!C(r)&&J(r.OrdinaryHasOwnMetadata(e,t,n))}function P(e,t,n){if(I(e,t,n))return A(e,t,n);var r=ne(t);return M(r)?void 0:P(e,r,n)}function A(e,t,n){var r=ae(t,n,!1);if(!C(r))return r.OrdinaryGetOwnMetadata(e,t,n)}function N(e,t,n,r){ae(n,r,!0).OrdinaryDefineOwnMetadata(e,t,n,r)}function R(e,t){var n=j(e,t),r=ne(e);if(null===r)return n;var o=R(r,t);if(o.length<=0)return n;if(n.length<=0)return o;for(var i=new l,s=[],a=0,u=n;a<u.length;a++){var c=u[a];i.has(c)||(i.add(c),s.push(c))}for(var d=0,p=o;d<p.length;d++){c=p[d];i.has(c)||(i.add(c),s.push(c))}return s}function j(e,t){var n=ae(e,t,!1);return n?n.OrdinaryOwnMetadataKeys(e,t):[]}function Z(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function C(e){return void 0===e}function M(e){return null===e}function F(e){return"symbol"==typeof e}function V(e){return"object"==typeof e?null!==e:"function"==typeof e}function D(e,t){switch(Z(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n="string",r=Y(e,o);if(void 0!==r){var i=r.call(e,n);if(V(i))throw new TypeError;return i}return U(e)}function U(e,t){var n,r,o=e.toString;if(B(o)&&!V(r=o.call(e)))return r;if(B(n=e.valueOf)&&!V(r=n.call(e)))return r;throw new TypeError}function J(e){return!!e}function L(e){return""+e}function q(e){var t=D(e);return F(t)?t:L(t)}function W(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function B(e){return"function"==typeof e}function G(e){return"function"==typeof e}function H(e){switch(Z(e)){case 3:case 4:return!0;default:return!1}}function K(e,t){return e===t||e!=e&&t!=t}function Y(e,t){var n=e[t];if(null!=n){if(!B(n))throw new TypeError;return n}}function X(e){var t=Y(e,i);if(!B(t))throw new TypeError;var n=t.call(e);if(!V(n))throw new TypeError;return n}function Q(e){return e.value}function ee(e){var t=e.next();return!t.done&&t}function te(e){var t=e.return;t&&t.call(e)}function ne(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===d)return t;if(t!==d)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var o=r.constructor;return"function"!=typeof o||o===e?t:o}function re(){var e,n,r,o;C(h)||void 0===t.Reflect||h in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=se(t.Reflect));var i=new f,s={registerProvider:a,getProvider:c,setProvider:m};return s;function a(t){if(!Object.isExtensible(s))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case C(n):n=t;break;case n===t:break;case C(r):r=t;break;case r===t:break;default:void 0===o&&(o=new l),o.add(t)}}function u(t,i){if(!C(n)){if(n.isProviderFor(t,i))return n;if(!C(r)){if(r.isProviderFor(t,i))return n;if(!C(o))for(var s=X(o);;){var a=ee(s);if(!a)return;var u=Q(a);if(u.isProviderFor(t,i))return te(s),u}}}if(!C(e)&&e.isProviderFor(t,i))return e}function c(e,t){var n,r=i.get(e);return C(r)||(n=r.get(t)),C(n)?(C(n=u(e,t))||(C(r)&&(r=new p,i.set(e,r)),r.set(t,n)),n):n}function d(e){if(C(e))throw new TypeError;return n===e||r===e||!C(o)&&o.has(e)}function m(e,t,n){if(!d(n))throw new Error("Metadata provider not registered.");var r=c(e,t);if(r!==n){if(!C(r))return!1;var o=i.get(e);C(o)&&(o=new p,i.set(e,o)),o.set(t,n)}return!0}}function oe(){var e;return!C(h)&&V(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[h]),C(e)&&(e=re()),!C(h)&&V(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,h,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function ie(e){var t=new f,n={isProviderFor:function(e,n){var r=t.get(e);return!C(r)&&r.has(n)},OrdinaryDefineOwnMetadata:s,OrdinaryHasOwnMetadata:o,OrdinaryGetOwnMetadata:i,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:u};return m.registerProvider(n),n;function r(r,o,i){var s=t.get(r),a=!1;if(C(s)){if(!i)return;s=new p,t.set(r,s),a=!0}var u=s.get(o);if(C(u)){if(!i)return;if(u=new p,s.set(o,u),!e.setProvider(r,o,n))throw s.delete(o),a&&t.delete(r),new Error("Wrong provider for target.")}return u}function o(e,t,n){var o=r(t,n,!1);return!C(o)&&J(o.has(e))}function i(e,t,n){var o=r(t,n,!1);if(!C(o))return o.get(e)}function s(e,t,n,o){r(n,o,!0).set(e,t)}function a(e,t){var n=[],o=r(e,t,!1);if(C(o))return n;for(var i=X(o.keys()),s=0;;){var a=ee(i);if(!a)return n.length=s,n;var u=Q(a);try{n[s]=u}catch(e){try{te(i)}finally{throw e}}s++}}function u(e,n,o){var i=r(n,o,!1);if(C(i))return!1;if(!i.delete(e))return!1;if(0===i.size){var s=t.get(n);C(s)||(s.delete(o),0===s.size&&t.delete(s))}return!0}}function se(e){var t=e.defineMetadata,n=e.hasOwnMetadata,r=e.getOwnMetadata,o=e.getOwnMetadataKeys,i=e.deleteMetadata,s=new f;return{isProviderFor:function(e,t){var n=s.get(e);return!(C(n)||!n.has(t))||!!o(e,t).length&&(C(n)&&(n=new l,s.set(e,n)),n.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:n,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:i}}function ae(e,t,n){var r=m.getProvider(e,t);if(!C(r))return r;if(n){if(m.setProvider(e,t,y))return y;throw new Error("Illegal state.")}}function ue(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,o=n+1;o<r;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,K(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,o)},t.prototype.entries=function(){return new n(this._keys,this._values,s)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){if(!K(this._cacheKey,e)){this._cacheIndex=-1;for(var n=0;n<this._keys.length;n++)if(K(this._keys[n],e)){this._cacheIndex=n;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function o(e,t){return t}function s(e,t){return[e,t]}}function ce(){return function(){function e(){this._map=new p}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}()}function de(){var e=16,t=c.create(),r=o();return function(){function e(){this._key=o()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&c.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?c.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=o()},e}();function o(){var e;do{e="@@WeakMap@@"+u()}while(c.has(t,e));return t[e]=!0,e}function i(e,t){if(!n.call(e,r)){if(!t)return;Object.defineProperty(e,r,{value:c.create()})}return e[r]}function s(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function a(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):s(t,e),t}return s(new Array(e),e)}function u(){var t=a(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var o=t[r];4!==r&&6!==r&&8!==r||(n+="-"),o<16&&(n+="0"),n+=o.toString(16).toLowerCase()}return n}}function pe(e){return e.__=void 0,delete e.__,e}e("decorate",g),e("metadata",_),e("defineMetadata",v),e("hasMetadata",w),e("hasOwnMetadata",b),e("getMetadata",z),e("getOwnMetadata",k),e("getMetadataKeys",O),e("getOwnMetadataKeys",E),e("deleteMetadata",S)}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(e||(e={}))),ni;var e}();const ri=Symbol("api-method-metadata"),oi=new Map,ii=e=>(t,n)=>{Reflect.defineMetadata(ri,e,t,n);const r=e.httpVerb,o=e.endpoint,i=`${r.toLowerCase()} ${o}`;oi.set(i,e);const s=t.constructor;"function"!=typeof s.toJSON&&Object.defineProperty(s,"toJSON",{value:e=>Reflect.getMetadata(ri,s.prototype,e),writable:!1,configurable:!1})},si={enabled:!0,debug:!1},ai=(e,t=si)=>{if(t.enabled)try{const n=((e,t=ho)=>{if(!e)return"";let n=new URL(e,t).pathname;return n=n.replace(/\/[0-9a-f]{8}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{12}/gi,""),n})(e.config.url||"");if(!n)return void(t.debug&&console.debug("[HallidayPaymentsApiClient] No endpoint found in URL:",e.config.url));const r=`${e.config.method?.toLowerCase()||"get"} ${n}`,o=oi.get(r)?.outputSchema;if(!o)return void(t.debug&&console.debug(`[HallidayPaymentsApiClient] No validation schema defined for endpoint: ${n}`));const i=o.safeParse(e.data);i.success||(console.warn(`[HallidayPaymentsApiClient] Response validation failed for ${n}. Your SDK version might be outdated - please check for updates.`),t.debug&&console.debug("[HallidayPaymentsApiClient] Response validation error:",i.error))}catch(e){t.debug&&console.debug("[HallidayPaymentsApiClient] Response validation error:",e)}};var ui;!function(e){e.VALIDATION_ERROR="VALIDATION_ERROR",e.API_ERROR="API_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.NETWORK_ERROR="NETWORK_ERROR",e.UNKNOWN_ERROR="UNKNOWN_ERROR"}(ui||(ui={}));class ci extends Error{constructor({message:e,code:t,status:n,statusText:r,reqHeaders:o,resHeaders:i,data:s,config:a,request:u,response:c,error:d,validationIssues:p,validationMessage:l}){super(e),this.name="HallidayPaymentsApiClientError",this.validationIssues=null,this.validationMessage=null,this.status=null,this.statusText=null,this.reqHeaders=null,this.resHeaders=null,this.data=null,this.config=null,this.request=null,this.response=null,this.error=null,this.code=t,this.message=e,this.status=n??null,this.statusText=r??null,this.reqHeaders=o??null,this.resHeaders=i??null,this.data=s??null,this.config=a??null,this.request=u??null,this.response=c??null,this.error=d??null,this.validationIssues=p??null,this.validationMessage=l??null,Object.setPrototypeOf(this,ci.prototype)}static isPaymentsApiClientError(e){return e instanceof ci}static parseValidationError({message:e,error:t}){return new ci({message:e??t?.message??"Validation error",code:ui.VALIDATION_ERROR,validationIssues:t instanceof Mn?t.issues:null,validationMessage:t instanceof Mn?t.message:null,error:t})}static parseAxiosError(e){if(e.response){const t=e.response.status;let n=e.response.data?.errors||[],r=null;Array.isArray(n)||(n=[n]);let o=n.map((e=>"string"!=typeof e?JSON.stringify(e):e)).join("\n")||e.message||"Unknown error",i=e.response?.statusText;return 500===t?new ci({message:o,code:ui.SERVER_ERROR,status:500,statusText:`${e.code??"500"}: ${i??"Server Error"}`,data:e.response?.data,config:e.config,request:e.request,response:e.response,reqHeaders:e.request?.headers,resHeaders:e.response?.headers}):(400===t?(o=`Bad request: ${o}`,i=`${e.code??"400"}: ${i??"Bad Request"}`,r=n):401===t?(o=`Unauthorized: ${o}`,i=`${e.code??"401"}: ${i??"Unauthorized"}`):403===t?(o=`Forbidden: ${o}`,i=`${e.code??"403"}: ${i??"Forbidden"}`):404===t?(o=`Resource not found: ${o}`,i=`${e.code??"404"}: ${i??"Not Found"}`):(o=`Request failed with status ${t}: ${o}`,i=`${e.code??t}: ${i??"Unexpected error"}`),new ci({message:o,code:ui.API_ERROR,status:t,statusText:i,data:e.response?.data,config:e.config,request:e.request,response:e.response,reqHeaders:e.request?.headers,resHeaders:e.response?.headers,validationIssues:r}))}return e.request?new ci({message:e.message||`No response received from the server: ${e.code}`,code:ui.NETWORK_ERROR,config:e.config,request:e.request,reqHeaders:e.request?.headers}):"ERR_CANCELED"===e.code?null:new ci({message:`${e.code?`${e.code}: `:""}${e.message||"No message"}`,code:ui.NETWORK_ERROR,config:e.config,request:e.request,error:e})}toJSON(){return JSON.stringify({name:this.name,code:this.code,message:this.message,validationIssues:this.validationIssues,status:this.status,statusText:this.statusText,config:this.config,stack:this.stack})}}const di=({apiKey:t,baseUrl:n=ho,responseValidationOptions:r=si})=>{if(!mo.test(n))throw new Error(`Invalid base URL: ${n}`);if(!t)throw new Error("API key is required");const o=e.create({baseURL:n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},parseReviver:Qo.reviver}),i=(s=r,{onFulfilled:e=>(ai(e,s),e),onRejected:e=>{throw e}});var s;o.interceptors.response.use(i.onFulfilled,i.onRejected);const a={onFulfilled:e=>e,onRejected:t=>{if(e.isAxiosError(t)){const e=ci.parseAxiosError(t);if(e)throw e;return{data:null}}throw new ci({message:t.message||"Unknown error",code:ui.UNKNOWN_ERROR,error:t})}};return o.interceptors.response.use(a.onFulfilled,a.onRejected),o},pi=e=>Object.entries(e).reduce(((e,[t,n])=>{if("sandbox"===t)e.push("sandbox="+(!0===n?"true":"false"));else if(Array.isArray(n))for(const r of n)e.push(`${t}[]=${r}`);else e.push(`${t}=${n}`);return e}),[]).join("&"),li=tr().refine((e=>yo.test(e)),{message:"Invalid payment ID"}),fi=Hr(["BETA_EDGES","ORG_BETA_EDGES","ORG_EDGES"]),hi=Vr({onramps:Mr(Do).optional(),offramps:Mr(Do).optional(),sandbox:xr().optional().default(!1),features:Mr(fi).optional()}),mi=hi.extend({inputs:Mr(Mo).optional(),outputs:Mr(Mo)}),yi=hi.extend({inputs:Mr(Mo),outputs:Mr(Mo).optional()}),gi=Ur([mi,yi]),_i=Vr({asset:Mo,amount:bo}),vi=Vr({token:No,amount:bo}),wi=tr(),bi=Ur([function(e){return cn(mr,e)}(),function(e){return dn(yr,e)}()]),zi=Vr({price_currency:zo,onramps:Mr(Do).optional(),onramp_methods:Mr(Xo).optional(),customer_ip_address:tr().optional(),customer_id:tr().optional(),label:tr().optional(),parent_payment_id:li.optional(),features:Mr(fi).optional(),rev_share_name:tr().optional(),allow_unsafe_transfer_out:xr().optional(),show_all_issues:xr().optional(),allow_exceed_max_input_limit:xr().optional(),allow_unsafe_slippage:xr().optional()}),ki=Vr({"#":tr()}),Oi=Vr({type:Yr("CallImmediateAction"),target:tr(),value:ki,calldata:tr()}),Ei=Vr({actions:Mr(Oi),user_estimated_gas:ki}),Si=Lr("kind",[Vr({kind:Yr("FIXED_INPUT"),fixed_input_amount:_i,output_asset:Mo,custom_actions:Ei.optional(),dest_address:tr().optional()})]),$i=zi.extend({request:Si}),xi=Hr(["USER","DEST","HALLIDAY","SPW","REV_SHARE","BRIDGE"]),Ti=Hr(["APPROVAL","BALANCE"]),Ii=Vr({asset:Mo,property:Ti}),Pi=Vr({account:xi,resource:Ii}),Ai=Ur([Yr("COMPLETE"),Yr("UNREACHABLE"),Yr("FAILED")]),Ni=Ur([Ai,Yr("PENDING")]),Ri=Hr(["PENDING","COMPLETE","FAILED","EXPIRED","WITHDRAWN","TAINTED"]),ji=Vr({consume:Mr(Pi),produce:Mr(Pi)}),Zi=Pi.extend({amount:bo}),Ci=ji.extend({consume:Mr(Zi),produce:Mr(Zi)}),Mi=Br(Mo,tr()),Fi=Lr("kind",[Vr({kind:Ur([Yr("amount"),Yr("amount-downstream")]),given:tr(),limits:Vr({min:tr().optional(),max:tr().optional()}),source:tr(),message:tr()}),Vr({kind:Yr("geolocation"),message:tr()}),Vr({kind:Yr("provider"),message:tr()}),Vr({kind:Yr("other"),message:tr()}),Vr({kind:Yr("unknown"),message:tr()})]),Vi=Vr({service_ids:Mr(tr()),latency_seconds:Or(),issues:Mr(Fi).optional()}),Di=Ur([Yr("USER_FUND"),Yr("ONCHAIN_STEP"),Yr("ONRAMP")]),Ui=Vr({type:Di,net_effect:Ci,pieces_info:Mr(Vr({type:Ur([Yr("onramp"),Yr("poll"),Yr("bridge"),Yr("rev_share"),Yr("transfer_out"),Yr("convert")])})),step_index:Or().optional()}),Ji=Vr({payment_id:tr(),output_amount:Vr({asset:Mo,amount:tr()}),onramp:Do.optional(),onramp_method:Xo.optional(),fees:Vr({total_fees:tr(),conversion_fees:tr(),network_fees:tr(),business_fees:tr(),currency_symbol:zo}),route:Mr(Ui)}),Li=Ui.extend({status:Ni,transaction_hash:tr().optional()}),qi=Ji.omit({payment_id:!0}).partial({output_amount:!0,onramp:!0,onramp_method:!0,fees:!0}).extend({route:Mr(Li)}),Wi=Vr({quote_request:$i,quotes:Mr(Ji),current_prices:Mi,price_currency:zo,state_token:tr(),quoted_at:tr(),accept_by:tr(),failures:Mr(Vi)}),Bi=Vr({payment_id:li,state_token:tr(),owner_chain:tr().optional(),owner_address:wo,destination_address:wo,client_redirect_url:tr().optional(),allow_unsafe_owner:xr().optional()}),Gi=Vr({deposit_token:No,deposit_chain:tr(),deposit_amount:bo,deposit_address:wo}),Hi=Vr({type:Hr(["ONRAMP","TRANSFER_IN"]),payment_id:li,funding_page_url:ar(),deposit_info:Mr(Gi)}),Ki=Vr({payment_id:li,org_id:tr(),status:Ri,funded:xr(),created_at:tr(),updated_at:tr(),initiate_fund_by:tr(),completed_at:tr().optional(),quote_request:$i,quoted:Ji.omit({payment_id:!0}),fulfilled:qi,current_prices:Mi,price_currency:zo,customer_id:tr().optional(),label:tr().optional(),processing_addresses:Mr(Vr({address:wo,chain:tr()})),owner_chain:tr(),owner_address:wo,destination_address:wo,next_instruction:Hi.optional(),parent_payment_id:li.optional()}),Yi=Ki,Xi=Vr({payment_id:li,redirect_url:tr(),referrer_domain:tr().optional()}),Qi=Vr({funding_page_onramp_url:tr(),client_redirect_url:tr().optional(),client_secret:tr().optional()}),es=Vr({id_query:tr().optional(),pagination_key:tr().optional(),dest_address:wo.optional(),owner_address:wo.optional(),limit:Or().int().positive().optional(),category:Hr(["ALL","NEW_OR_FUNDED"]).optional(),label:tr().optional()}),ts=Vr({payment_statuses:Mr(Yi),next_pagination_key:tr().nullable()}),ns=Vr({payment_id:li.optional(),custom_queries:Mr(Vr({address:wo,token:Ur([No,Ao])})).optional()}).refine((e=>!(!e.payment_id&&!e.custom_queries?.length)),{message:"payment_id or custom_queries is required"}),rs=Vr({balance_results:Mr(Vr({address:wo,token:No,value:Lr("kind",[Vr({kind:Yr("amount"),amount:bo}),Vr({kind:Yr("error")})])}))}),os=Vr({fiat:zo,tokens:Mr(No)}),is=tr(),ss=Vr({payment_id:li,token_amounts:Mr(vi),recipient_address:wo}),as=Vr({payment_id:li,withdraw_authorization:is}),us=ss.extend({owner_signature:wi}),cs=Vr({payment_id:li,transaction_hash:tr()});class ds{constructor(e){this.getChains=async(e=!1)=>{const{data:t}=await this.apiClient.get("/chains?sandbox="+(e?"true":"false"));return t},this.getAssetDetails=async({assets:e=[],sandbox:t})=>{if("boolean"!=typeof t)throw ci.parseValidationError({message:"Invalid sandbox value"});let n=`sandbox=${t}`;if(e){if(!Array.isArray(e))throw ci.parseValidationError({message:"Invalid assets"});for(const t of e)try{n+=`&assets[]=${Mo.parse(t)}`}catch(e){throw ci.parseValidationError({message:`Invalid asset: ${t}`,error:e})}}return(await this.apiClient.get(`/assets?${n}`)).data},this.getInputs=async e=>{let t;try{const n=mi.parse(e);t=pi(n)}catch(e){throw ci.parseValidationError({message:"Invalid asset filters",error:e})}return(await this.apiClient.get(`/assets/available-inputs?${t}`)).data},this.getOutputs=async e=>{let t;try{const n=yi.parse(e);t=pi(n)}catch(e){throw ci.parseValidationError({message:"Invalid asset filters",error:e})}return(await this.apiClient.get(`/assets/available-outputs?${t}`)).data},this.getQuotes=async(e,t)=>{let n;try{n=$i.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for quotes",error:e})}return(await this.apiClient.post("/payments/quotes",n,{signal:t})).data},this.confirmQuote=async e=>{let t;try{t=Bi.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for confirming quote",error:e})}return(await this.apiClient.post("/payments/confirm",t)).data},this.createPaymentSession=async e=>{let t;try{t=Xi.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for onramp session",error:e})}return(await this.apiClient.post("/onramp",t)).data},this.getStatus=async(e,t)=>{try{li.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid payment ID",error:e})}const n=new URLSearchParams;n.set("payment_id",e);const r=n.toString();return(await this.apiClient.get(`/payments?${r}`,{signal:t})).data},this.getPaymentsHistory=async e=>{let t;try{t=es.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for payments",error:e})}const n=new URLSearchParams;t.id_query&&n.set("id_query",t.id_query),t.pagination_key&&n.set("pagination_key",t.pagination_key),t.dest_address&&n.set("dest_address",t.dest_address),t.owner_address&&n.set("owner_address",t.owner_address),t.limit&&n.set("limit",t.limit.toString()),t.category&&n.set("category",t.category),t.label&&n.set("label",t.label);let r=n.toString();r&&(r=`?${r}`);return(await this.apiClient.get(`/payments/history${r}`)).data},this.getBalance=async e=>{let t;try{t=ns.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for balance",error:e})}return(await this.apiClient.post("/payments/balances",t)).data},this.getPrices=async e=>{let t;try{t=os.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for prices",error:e})}return(await this.apiClient.post("/prices",t)).data},this.getWithdrawAuthorization=async e=>{let t;try{t=ss.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for withdraw authorization",error:e})}return(await this.apiClient.post("/payments/withdraw",t)).data},this.withdraw=async e=>{let t;try{t=us.parse(e)}catch(e){throw ci.parseValidationError({message:"Invalid request for withdraw",error:e})}return(await this.apiClient.post("/payments/withdraw/confirm",t)).data};const{apiKey:t,baseUrl:n=ho,responseValidation:r={}}=e,o={...si,...r};this.apiClient=di({baseUrl:n,apiKey:t,responseValidationOptions:o})}static toJSON(e){return Reflect.getMetadata(ri,this.prototype,e)}}t([ii({description:"Retrieves the supported chain configuration.",httpVerb:"GET",endpoint:"/chains",inputSchema:xr().optional(),outputSchema:Br(tr(),Yo)}),n("design:type",Object)],ds.prototype,"getChains",void 0),t([ii({description:"Retrieves the asset details for all or the specified assets.",httpVerb:"GET",endpoint:"/assets",inputSchema:Vr({assets:Mr(Mo).optional(),sandbox:xr().optional()}),outputSchema:Br(Mo,Fo)}),n("design:type",Object)],ds.prototype,"getAssetDetails",void 0),t([ii({description:"Retrieves the supported inputs for the specified filters.",httpVerb:"GET",endpoint:"/assets/available-inputs",inputSchema:mi,outputSchema:Br(Mo,Vr({fiats:Mr(zo),tokens:Mr(No)}))}),n("design:type",Object)],ds.prototype,"getInputs",void 0),t([ii({description:"Retrieves the supported outputs for the specified filters.",httpVerb:"GET",endpoint:"/assets/available-outputs",inputSchema:yi,outputSchema:Br(Mo,Vr({fiats:Mr(zo),tokens:Mr(No)}))}),n("design:type",Object)],ds.prototype,"getOutputs",void 0),t([ii({description:"Retrieves quotes for the given input and output asset.",httpVerb:"POST",endpoint:"/payments/quotes",inputSchema:$i,outputSchema:Wi}),n("design:type",Object)],ds.prototype,"getQuotes",void 0),t([ii({description:"Confirms a quote.",httpVerb:"POST",endpoint:"/payments/confirm",inputSchema:Bi,outputSchema:Ki}),n("design:type",Object)],ds.prototype,"confirmQuote",void 0),t([ii({description:"Creates a onramp provider session for a given payment.",httpVerb:"POST",endpoint:"/onramp",inputSchema:Xi,outputSchema:Qi}),n("design:type",Object)],ds.prototype,"createPaymentSession",void 0),t([ii({description:"Retrieves the status of a given payment.",httpVerb:"GET",endpoint:"/payments",inputSchema:li,outputSchema:Yi}),n("design:type",Object)],ds.prototype,"getStatus",void 0),t([ii({description:"Retrieves the payments history of a given destination address.",httpVerb:"GET",endpoint:"/payments/history",inputSchema:es,outputSchema:ts}),n("design:type",Object)],ds.prototype,"getPaymentsHistory",void 0),t([ii({description:"Retrieves the balance of a given workflow or spw address.",httpVerb:"POST",endpoint:"/payments/balances",inputSchema:ns,outputSchema:rs}),n("design:type",Object)],ds.prototype,"getBalance",void 0),t([ii({description:"Retrieves the prices tokens in a given fiat currency.",httpVerb:"POST",endpoint:"/prices",inputSchema:os,outputSchema:Mi}),n("design:type",Object)],ds.prototype,"getPrices",void 0),t([ii({description:"Retrieves the withdraw authorization for a given workflow.",httpVerb:"POST",endpoint:"/payments/withdraw",inputSchema:ss,outputSchema:as}),n("design:type",Object)],ds.prototype,"getWithdrawAuthorization",void 0),t([ii({description:"Submits the owner signature for a withdraw payload.",httpVerb:"POST",endpoint:"/payments/withdraw/confirm",inputSchema:us,outputSchema:cs}),n("design:type",Object)],ds.prototype,"withdraw",void 0);export{xi as Account,wo as Address,bo as Amount,Mo as Asset,Fo as AssetDetails,gi as AssetFilters,rs as BalanceResponse,Yo as ChainConfig,Zi as ChangeAmount,Ki as ConfirmQuoteResponse,Gi as DepositInfo,_o as EVMAddress,Ho as EVMChainConfig,go as EVMTokenAddress,jo as EVMTokenDetails,ui as ErrorCodes,Vi as Failure,fi as Feature,zo as Fiat,ko as FiatDetails,qi as Fulfillment,Li as FulfillmentRoute,Qo as HSON,bi as IPAddressOverride,mi as InputsAssetFilters,Fi as Issue,Hi as NextInstruction,Ni as ObservedStatus,Xo as OnrampMethod,Qi as OnrampSessionResponse,yi as OutputsAssetFilters,ts as PaymentHistoryResult,li as PaymentId,Yi as PaymentStatus,ci as PaymentsApiClientError,Mi as Prices,Ji as Quote,Ui as QuotedRoute,Wi as QuotesResponse,Do as RampName,Uo as RampType,Vo as Realm,ns as RequestForBalance,Bi as RequestForConfirmQuote,Xi as RequestForOnrampSession,es as RequestForPaymentsHistory,os as RequestForPrices,$i as RequestForQuotes,us as RequestForWithdraw,ss as RequestForWithdrawAuthorization,Di as RouteType,vo as SolAddress,Ko as SolChainConfig,vo as SolTokenAddress,Zo as SolTokenDetails,No as Token,Co as TokenDetails,Wo as TransactionReceipt,qo as TransactionRequest,is as TypedData,as as WithdrawAuthorizationResponse,cs as WithdrawResponse,ds as default};
|
|
2
2
|
//# sourceMappingURL=index.esm.min.js.map
|