@adland/embed 0.3.0 → 0.5.0

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.
@@ -1,74 +1,74 @@
1
1
  (function(){'use strict';globalThis.process||(globalThis.process={env:{}});
2
- var oN=Object.create;var Cp=Object.defineProperty;var iN=Object.getOwnPropertyDescriptor;var sN=Object.getOwnPropertyNames;var aN=Object.getPrototypeOf,cN=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Er=(e,t)=>{for(var r in t)Cp(e,r,{get:t[r],enumerable:true});},HE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sN(t))!cN.call(e,n)&&n!==r&&Cp(e,n,{get:()=>t[n],enumerable:!(o=iN(t,n))||o.enumerable});return e};var Ko=(e,t,r)=>(r=e!=null?oN(aN(e)):{},HE(t||!e||!e.__esModule?Cp(r,"default",{value:e,enumerable:true}):r,e)),VE=e=>HE(Cp({},"__esModule",{value:true}),e);var _I=Kr(Xm=>{Xm.byteLength=iL;Xm.toByteArray=aL;Xm.fromByteArray=fL;var So=[],Nn=[],oL=typeof Uint8Array<"u"?Uint8Array:Array,vw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ua=0,vI=vw.length;ua<vI;++ua)So[ua]=vw[ua],Nn[vw.charCodeAt(ua)]=ua;var ua,vI;Nn[45]=62;Nn[95]=63;function wI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return [r,o]}function iL(e){var t=wI(e),r=t[0],o=t[1];return (r+o)*3/4-o}function sL(e,t,r){return (t+r)*3/4-r}function aL(e){var t,r=wI(e),o=r[0],n=r[1],i=new oL(sL(e,o,n)),s=0,a=n>0?o-4:o,c;for(c=0;c<a;c+=4)t=Nn[e.charCodeAt(c)]<<18|Nn[e.charCodeAt(c+1)]<<12|Nn[e.charCodeAt(c+2)]<<6|Nn[e.charCodeAt(c+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return n===2&&(t=Nn[e.charCodeAt(c)]<<2|Nn[e.charCodeAt(c+1)]>>4,i[s++]=t&255),n===1&&(t=Nn[e.charCodeAt(c)]<<10|Nn[e.charCodeAt(c+1)]<<4|Nn[e.charCodeAt(c+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function cL(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function uL(e,t,r){for(var o,n=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),n.push(cL(o));return n.join("")}function fL(e){for(var t,r=e.length,o=r%3,n=[],i=16383,s=0,a=r-o;s<a;s+=i)n.push(uL(e,s,s+i>a?a:s+i));return o===1?(t=e[r-1],n.push(So[t>>2]+So[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],n.push(So[t>>10]+So[t>>4&63]+So[t<<2&63]+"=")),n.join("")}});var EI=Kr(ww=>{ww.read=function(e,t,r,o,n){var i,s,a=n*8-o-1,c=(1<<a)-1,u=c>>1,f=-7,d=r?n-1:0,g=r?-1:1,h=e[t+d];for(d+=g,i=h&(1<<-f)-1,h>>=-f,f+=a;f>0;i=i*256+e[t+d],d+=g,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=o;f>0;s=s*256+e[t+d],d+=g,f-=8);if(i===0)i=1-u;else {if(i===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-u;}return (h?-1:1)*s*Math.pow(2,i-o)};ww.write=function(e,t,r,o,n,i){var s,a,c,u=i*8-n-1,f=(1<<u)-1,d=f>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,v=o?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=g/c:t+=g*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=f?(a=0,s=f):s+d>=1?(a=(t*c-1)*Math.pow(2,n),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=a&255,h+=v,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;e[r+h]=s&255,h+=v,s/=256,u-=8);e[r+h-v]|=E*128;};});var Rl=Kr(zc=>{var _w=_I(),Bc=EI(),SI=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;zc.Buffer=V;zc.SlowBuffer=gL;zc.INSPECT_MAX_BYTES=50;var Qm=2147483647;zc.kMaxLength=Qm;V.TYPED_ARRAY_SUPPORT=lL();!V.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function lL(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return false}}Object.defineProperty(V.prototype,"parent",{enumerable:true,get:function(){if(V.isBuffer(this))return this.buffer}});Object.defineProperty(V.prototype,"offset",{enumerable:true,get:function(){if(V.isBuffer(this))return this.byteOffset}});function ii(e){if(e>Qm)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,V.prototype),t}function V(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Aw(e)}return RI(e,t,r)}V.poolSize=8192;function RI(e,t,r){if(typeof e=="string")return pL(e,t);if(ArrayBuffer.isView(e))return mL(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Io(e,ArrayBuffer)||e&&Io(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Io(e,SharedArrayBuffer)||e&&Io(e.buffer,SharedArrayBuffer)))return Sw(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return V.from(o,t,r);let n=hL(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return V.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}V.from=function(e,t,r){return RI(e,t,r)};Object.setPrototypeOf(V.prototype,Uint8Array.prototype);Object.setPrototypeOf(V,Uint8Array);function TI(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function dL(e,t,r){return TI(e),e<=0?ii(e):t!==void 0?typeof r=="string"?ii(e).fill(t,r):ii(e).fill(t):ii(e)}V.alloc=function(e,t,r){return dL(e,t,r)};function Aw(e){return TI(e),ii(e<0?0:kw(e)|0)}V.allocUnsafe=function(e){return Aw(e)};V.allocUnsafeSlow=function(e){return Aw(e)};function pL(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!V.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=$I(e,t)|0,o=ii(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function Ew(e){let t=e.length<0?0:kw(e.length)|0,r=ii(t);for(let o=0;o<t;o+=1)r[o]=e[o]&255;return r}function mL(e){if(Io(e,Uint8Array)){let t=new Uint8Array(e);return Sw(t.buffer,t.byteOffset,t.byteLength)}return Ew(e)}function Sw(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,V.prototype),o}function hL(e){if(V.isBuffer(e)){let t=kw(e.length)|0,r=ii(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Tw(e.length)?ii(0):Ew(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ew(e.data)}function kw(e){if(e>=Qm)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Qm.toString(16)+" bytes");return e|0}function gL(e){return +e!=e&&(e=0),V.alloc(+e)}V.isBuffer=function(t){return t!=null&&t._isBuffer===true&&t!==V.prototype};V.compare=function(t,r){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),Io(r,Uint8Array)&&(r=V.from(r,r.offset,r.byteLength)),!V.isBuffer(t)||!V.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let o=t.length,n=r.length;for(let i=0,s=Math.min(o,n);i<s;++i)if(t[i]!==r[i]){o=t[i],n=r[i];break}return o<n?-1:n<o?1:0};V.isEncoding=function(t){switch(String(t).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "latin1":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return true;default:return false}};V.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return V.alloc(0);let o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;let n=V.allocUnsafe(r),i=0;for(o=0;o<t.length;++o){let s=t[o];if(Io(s,Uint8Array))i+s.length>n.length?(V.isBuffer(s)||(s=V.from(s)),s.copy(n,i)):Uint8Array.prototype.set.call(n,s,i);else if(V.isBuffer(s))s.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length;}return n};function $I(e,t){if(V.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Io(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,o=arguments.length>2&&arguments[2]===true;if(!o&&r===0)return 0;let n=false;for(;;)switch(t){case "ascii":case "latin1":case "binary":return r;case "utf8":case "utf-8":return Iw(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return MI(e).length;default:if(n)return o?-1:Iw(e).length;t=(""+t).toLowerCase(),n=true;}}V.byteLength=$I;function yL(e,t,r){let o=false;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return "";for(e||(e="utf8");;)switch(e){case "hex":return kL(this,t,r);case "utf8":case "utf-8":return NI(this,t,r);case "ascii":return IL(this,t,r);case "latin1":case "binary":return AL(this,t,r);case "base64":return EL(this,t,r);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return RL(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=true;}}V.prototype._isBuffer=true;function fa(e,t,r){let o=e[t];e[t]=e[r],e[r]=o;}V.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)fa(this,r,r+1);return this};V.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)fa(this,r,r+3),fa(this,r+1,r+2);return this};V.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)fa(this,r,r+7),fa(this,r+1,r+6),fa(this,r+2,r+5),fa(this,r+3,r+4);return this};V.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?NI(this,0,t):yL.apply(this,arguments)};V.prototype.toLocaleString=V.prototype.toString;V.prototype.equals=function(t){if(!V.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?true:V.compare(this,t)===0};V.prototype.inspect=function(){let t="",r=zc.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};SI&&(V.prototype[SI]=V.prototype.inspect);V.prototype.compare=function(t,r,o,n,i){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),!V.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),r<0||o>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=o)return 0;if(n>=i)return -1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,i>>>=0,this===t)return 0;let s=i-n,a=o-r,c=Math.min(s,a),u=this.slice(n,i),f=t.slice(r,o);for(let d=0;d<c;++d)if(u[d]!==f[d]){s=u[d],a=f[d];break}return s<a?-1:a<s?1:0};function OI(e,t,r,o,n){if(e.length===0)return -1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Tw(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1;}else if(r<0)if(n)r=0;else return -1;if(typeof t=="string"&&(t=V.from(t,o)),V.isBuffer(t))return t.length===0?-1:II(e,t,r,o,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):II(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function II(e,t,r,o,n){let i=1,s=e.length,a=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return -1;i=2,s/=2,a/=2,r/=2;}function c(f,d){return i===1?f[d]:f.readUInt16BE(d*i)}let u;if(n){let f=-1;for(u=r;u<s;u++)if(c(e,u)===c(t,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===a)return f*i}else f!==-1&&(u-=u-f),f=-1;}else for(r+a>s&&(r=s-a),u=r;u>=0;u--){let f=true;for(let d=0;d<a;d++)if(c(e,u+d)!==c(t,d)){f=false;break}if(f)return u}return -1}V.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};V.prototype.indexOf=function(t,r,o){return OI(this,t,r,o,true)};V.prototype.lastIndexOf=function(t,r,o){return OI(this,t,r,o,false)};function bL(e,t,r,o){r=Number(r)||0;let n=e.length-r;o?(o=Number(o),o>n&&(o=n)):o=n;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let a=parseInt(t.substr(s*2,2),16);if(Tw(a))return s;e[r+s]=a;}return s}function xL(e,t,r,o){return eh(Iw(t,e.length-r),e,r,o)}function vL(e,t,r,o){return eh(NL(t),e,r,o)}function wL(e,t,r,o){return eh(MI(t),e,r,o)}function _L(e,t,r,o){return eh(PL(t,e.length-r),e,r,o)}V.prototype.write=function(t,r,o,n){if(r===void 0)n="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")n=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=false;for(;;)switch(n){case "hex":return bL(this,t,r,o);case "utf8":case "utf-8":return xL(this,t,r,o);case "ascii":case "latin1":case "binary":return vL(this,t,r,o);case "base64":return wL(this,t,r,o);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return _L(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=true;}};V.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function EL(e,t,r){return t===0&&r===e.length?_w.fromByteArray(e):_w.fromByteArray(e.slice(t,r))}function NI(e,t,r){r=Math.min(e.length,r);let o=[],n=t;for(;n<r;){let i=e[n],s=null,a=i>239?4:i>223?3:i>191?2:1;if(n+a<=r){let c,u,f,d;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[n+1],(c&192)===128&&(d=(i&31)<<6|c&63,d>127&&(s=d));break;case 3:c=e[n+1],u=e[n+2],(c&192)===128&&(u&192)===128&&(d=(i&15)<<12|(c&63)<<6|u&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:c=e[n+1],u=e[n+2],f=e[n+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(d=(i&15)<<18|(c&63)<<12|(u&63)<<6|f&63,d>65535&&d<1114112&&(s=d));}}s===null?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),n+=a;}return SL(o)}var AI=4096;function SL(e){let t=e.length;if(t<=AI)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=AI));return r}function IL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]&127);return o}function AL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]);return o}function kL(e,t,r){let o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);let n="";for(let i=t;i<r;++i)n+=BL[e[i]];return n}function RL(e,t,r){let o=e.slice(t,r),n="";for(let i=0;i<o.length-1;i+=2)n+=String.fromCharCode(o[i]+o[i+1]*256);return n}V.prototype.slice=function(t,r){let o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,V.prototype),n};function sr(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}V.prototype.readUintLE=V.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return n};V.prototype.readUintBE=V.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t+--r],i=1;for(;r>0&&(i*=256);)n+=this[t+--r]*i;return n};V.prototype.readUint8=V.prototype.readUInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]};V.prototype.readUint16LE=V.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]|this[t+1]<<8};V.prototype.readUint16BE=V.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]<<8|this[t+1]};V.prototype.readUint32LE=V.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};V.prototype.readUint32BE=V.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};V.prototype.readBigUInt64LE=Yi(function(t){t=t>>>0,Cc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))});V.prototype.readBigUInt64BE=Yi(function(t){t=t>>>0,Cc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return (BigInt(n)<<BigInt(32))+BigInt(i)});V.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n};V.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=r,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};V.prototype.readInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};V.prototype.readInt16LE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};V.prototype.readInt16BE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};V.prototype.readInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};V.prototype.readInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};V.prototype.readBigInt64LE=Yi(function(t){t=t>>>0,Cc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return (BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});V.prototype.readBigInt64BE=Yi(function(t){t=t>>>0,Cc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return (BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});V.prototype.readFloatLE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Bc.read(this,t,true,23,4)};V.prototype.readFloatBE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Bc.read(this,t,false,23,4)};V.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Bc.read(this,t,true,52,8)};V.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Bc.read(this,t,false,52,8)};function tn(e,t,r,o,n,i){if(!V.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}V.prototype.writeUintLE=V.prototype.writeUIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;tn(this,t,r,o,a,0);}let i=1,s=0;for(this[r]=t&255;++s<o&&(i*=256);)this[r+s]=t/i&255;return r+o};V.prototype.writeUintBE=V.prototype.writeUIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;tn(this,t,r,o,a,0);}let i=o-1,s=1;for(this[r+i]=t&255;--i>=0&&(s*=256);)this[r+i]=t/s&255;return r+o};V.prototype.writeUint8=V.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,1,255,0),this[r]=t&255,r+1};V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function PI(e,t,r,o,n){UI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function BI(e,t,r,o,n){UI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}V.prototype.writeBigUInt64LE=Yi(function(t,r=0){return PI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeBigUInt64BE=Yi(function(t,r=0){return BI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);tn(this,t,r,o,c-1,-c);}let i=0,s=1,a=0;for(this[r]=t&255;++i<o&&(s*=256);)t<0&&a===0&&this[r+i-1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);tn(this,t,r,o,c-1,-c);}let i=o-1,s=1,a=0;for(this[r+i]=t&255;--i>=0&&(s*=256);)t<0&&a===0&&this[r+i+1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};V.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};V.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};V.prototype.writeBigInt64LE=Yi(function(t,r=0){return PI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V.prototype.writeBigInt64BE=Yi(function(t,r=0){return BI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function CI(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function zI(e,t,r,o,n){return t=+t,r=r>>>0,n||CI(e,t,r,4),Bc.write(e,t,r,o,23,4),r+4}V.prototype.writeFloatLE=function(t,r,o){return zI(this,t,r,true,o)};V.prototype.writeFloatBE=function(t,r,o){return zI(this,t,r,false,o)};function LI(e,t,r,o,n){return t=+t,r=r>>>0,n||CI(e,t,r,8),Bc.write(e,t,r,o,52,8),r+8}V.prototype.writeDoubleLE=function(t,r,o){return LI(this,t,r,true,o)};V.prototype.writeDoubleBE=function(t,r,o){return LI(this,t,r,false,o)};V.prototype.copy=function(t,r,o,n){if(!V.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<o&&(n=o),n===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-o&&(n=t.length-r+o);let i=n-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,n):Uint8Array.prototype.set.call(t,this.subarray(o,n),r),i};V.prototype.fill=function(t,r,o,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,o=this.length):typeof o=="string"&&(n=o,o=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!V.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let s=t.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(t=s);}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i<o;++i)this[i]=t;else {let s=V.isBuffer(t)?t:V.from(t,n),a=s.length;if(a===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-r;++i)this[i+r]=s[i%a];}return this};var Pc={};function Rw(e,t,r){Pc[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:true,configurable:true}),this.name=`${this.name} [${e}]`,this.stack,delete this.name;}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:true,enumerable:true,value:n,writable:true});}toString(){return `${this.name} [${e}]: ${this.message}`}};}Rw("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Rw("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Rw("ERR_OUT_OF_RANGE",function(e,t,r){let o=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=kI(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=kI(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function kI(e){let t="",r=e.length,o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return `${e.slice(0,r)}${t}`}function TL(e,t,r){Cc(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&kl(t,e.length-(r+1));}function UI(e,t,r,o,n,i){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",a;throw t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`,new Pc.ERR_OUT_OF_RANGE("value",a,e)}TL(o,n,i);}function Cc(e,t){if(typeof e!="number")throw new Pc.ERR_INVALID_ARG_TYPE(t,"number",e)}function kl(e,t,r){throw Math.floor(e)!==e?(Cc(e,r),new Pc.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new Pc.ERR_BUFFER_OUT_OF_BOUNDS:new Pc.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${t}`,e)}var $L=/[^+/0-9A-Za-z-_]/g;function OL(e){if(e=e.split("=")[0],e=e.trim().replace($L,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function Iw(e,t){t=t||1/0;let r,o=e.length,n=null,i=[];for(let s=0;s<o;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536;}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r);}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128);}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return i}function NL(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function PL(e,t){let r,o,n,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),o=r>>8,n=r%256,i.push(n),i.push(o);return i}function MI(e){return _w.toByteArray(OL(e))}function eh(e,t,r,o){let n;for(n=0;n<o&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Io(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Tw(e){return e!==e}var BL=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let o=r*16;for(let n=0;n<16;++n)t[o+n]=e[r]+e[n];}return t})();function Yi(e){return typeof BigInt>"u"?CL:e}function CL(){throw new Error("BigInt not supported")}});var la,DI=F(()=>{la=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;});function zL(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function da(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ao(e,...t){if(!zL(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function jI(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");da(e.outputLen),da(e.blockLen);}function si(e,t=true){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function th(e,t){Ao(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function FI(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Pn(...e){for(let t=0;t<e.length;t++)e[t].fill(0);}function rh(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ro(e,t){return e<<32-t|e>>>t}function UL(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function ML(e){for(let t=0;t<e.length;t++)e[t]=UL(e[t]);return e}function HI(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function pa(e){return typeof e=="string"&&(e=HI(e)),Ao(e),e}function Ow(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];Ao(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function Tl(e){let t=o=>e().update(pa(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Lc(e=32){if(la&&typeof la.getRandomValues=="function")return la.getRandomValues(new Uint8Array(e));if(la&&typeof la.randomBytes=="function")return Uint8Array.from(la.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var LL,$w,Xi,ai=F(()=>{DI();LL=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;$w=LL?e=>e:ML;Xi=class{};});function DL(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);let n=BigInt(32),i=BigInt(4294967295),s=Number(r>>n&i),a=Number(r&i),c=o?4:0,u=o?0:4;e.setUint32(t+c,s,o),e.setUint32(t+u,a,o);}function VI(e,t,r){return e&t^~e&r}function ZI(e,t,r){return e&t^e&r^t&r}var $l,ci,hr,GI=F(()=>{ai();$l=class extends Xi{constructor(t,r,o,n){super(),this.finished=false,this.length=0,this.pos=0,this.destroyed=false,this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=n,this.buffer=new Uint8Array(t),this.view=rh(this.buffer);}update(t){si(this),t=pa(t),Ao(t);let{view:r,buffer:o,blockLen:n}=this,i=t.length;for(let s=0;s<i;){let a=Math.min(n-this.pos,i-s);if(a===n){let c=rh(t);for(;n<=i-s;s+=n)this.process(c,s);continue}o.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(r,0),this.pos=0);}return this.length+=t.length,this.roundClean(),this}digestInto(t){si(this),th(t,this),this.finished=true;let{buffer:r,view:o,blockLen:n,isLE:i}=this,{pos:s}=this;r[s++]=128,Pn(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(o,0),s=0);for(let d=s;d<n;d++)r[d]=0;DL(o,n-8,BigInt(this.length*8),i),this.process(o,0);let a=rh(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,f[d],i);}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:o,length:n,finished:i,destroyed:s,pos:a}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=a,n%r&&t.buffer.set(o),t}clone(){return this._cloneInto()}},ci=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),hr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function jL(e,t=false){return t?{h:Number(e&nh),l:Number(e>>qI&nh)}:{h:Number(e>>qI&nh)|0,l:Number(e&nh)|0}}function oh(e,t=false){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i<r;i++){let{h:s,l:a}=jL(e[i],t);[o[i],n[i]]=[s,a];}return [o,n]}function ko(e,t,r,o){let n=(t>>>0)+(o>>>0);return {h:e+r+(n/2**32|0)|0,l:n|0}}var nh,qI,Nw,Pw,ma,ha,Ol,Nl,WI,KI,JI,YI,XI,QI,eA,tA,rA,nA,Bw=F(()=>{nh=BigInt(4294967295),qI=BigInt(32);Nw=(e,t,r)=>e>>>r,Pw=(e,t,r)=>e<<32-r|t>>>r,ma=(e,t,r)=>e>>>r|t<<32-r,ha=(e,t,r)=>e<<32-r|t>>>r,Ol=(e,t,r)=>e<<64-r|t>>>r-32,Nl=(e,t,r)=>e>>>r-32|t<<64-r,WI=(e,t,r)=>e<<r|t>>>32-r,KI=(e,t,r)=>t<<r|e>>>32-r,JI=(e,t,r)=>t<<r-32|e>>>64-r,YI=(e,t,r)=>e<<r-32|t>>>64-r;XI=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),QI=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,eA=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),tA=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,rA=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),nA=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var HL,Qi,ih,oA,VL,ZL,es,ts,Cw,ga,iA,sh=F(()=>{GI();Bw();ai();HL=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Qi=new Uint32Array(64),ih=class extends $l{constructor(t=32){super(64,t,8,false),this.A=ci[0]|0,this.B=ci[1]|0,this.C=ci[2]|0,this.D=ci[3]|0,this.E=ci[4]|0,this.F=ci[5]|0,this.G=ci[6]|0,this.H=ci[7]|0;}get(){let{A:t,B:r,C:o,D:n,E:i,F:s,G:a,H:c}=this;return [t,r,o,n,i,s,a,c]}set(t,r,o,n,i,s,a,c){this.A=t|0,this.B=r|0,this.C=o|0,this.D=n|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=c|0;}process(t,r){for(let d=0;d<16;d++,r+=4)Qi[d]=t.getUint32(r,false);for(let d=16;d<64;d++){let g=Qi[d-15],h=Qi[d-2],v=ro(g,7)^ro(g,18)^g>>>3,E=ro(h,17)^ro(h,19)^h>>>10;Qi[d]=E+Qi[d-7]+v+Qi[d-16]|0;}let{A:o,B:n,C:i,D:s,E:a,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){let g=ro(a,6)^ro(a,11)^ro(a,25),h=f+g+VI(a,c,u)+HL[d]+Qi[d]|0,E=(ro(o,2)^ro(o,13)^ro(o,22))+ZI(o,n,i)|0;f=u,u=c,c=a,a=s+h|0,s=i,i=n,n=o,o=h+E|0;}o=o+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(o,n,i,s,a,c,u,f);}roundClean(){Pn(Qi);}destroy(){this.set(0,0,0,0,0,0,0,0),Pn(this.buffer);}},oA=oh(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),VL=oA[0],ZL=oA[1],es=new Uint32Array(80),ts=new Uint32Array(80),Cw=class extends $l{constructor(t=64){super(128,t,16,false),this.Ah=hr[0]|0,this.Al=hr[1]|0,this.Bh=hr[2]|0,this.Bl=hr[3]|0,this.Ch=hr[4]|0,this.Cl=hr[5]|0,this.Dh=hr[6]|0,this.Dl=hr[7]|0,this.Eh=hr[8]|0,this.El=hr[9]|0,this.Fh=hr[10]|0,this.Fl=hr[11]|0,this.Gh=hr[12]|0,this.Gl=hr[13]|0,this.Hh=hr[14]|0,this.Hl=hr[15]|0;}get(){let{Ah:t,Al:r,Bh:o,Bl:n,Ch:i,Cl:s,Dh:a,Dl:c,Eh:u,El:f,Fh:d,Fl:g,Gh:h,Gl:v,Hh:E,Hl:R}=this;return [t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R]}set(t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R){this.Ah=t|0,this.Al=r|0,this.Bh=o|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=d|0,this.Fl=g|0,this.Gh=h|0,this.Gl=v|0,this.Hh=E|0,this.Hl=R|0;}process(t,r){for(let O=0;O<16;O++,r+=4)es[O]=t.getUint32(r),ts[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){let I=es[O-15]|0,P=ts[O-15]|0,L=ma(I,P,1)^ma(I,P,8)^Nw(I,P,7),C=ha(I,P,1)^ha(I,P,8)^Pw(I,P,7),D=es[O-2]|0,q=ts[O-2]|0,H=ma(D,q,19)^Ol(D,q,61)^Nw(D,q,6),Z=ha(D,q,19)^Nl(D,q,61)^Pw(D,q,6),re=eA(C,Z,ts[O-7],ts[O-16]),S=tA(re,L,H,es[O-7],es[O-16]);es[O]=S|0,ts[O]=re|0;}let{Ah:o,Al:n,Bh:i,Bl:s,Ch:a,Cl:c,Dh:u,Dl:f,Eh:d,El:g,Fh:h,Fl:v,Gh:E,Gl:R,Hh:$,Hl:N}=this;for(let O=0;O<80;O++){let I=ma(d,g,14)^ma(d,g,18)^Ol(d,g,41),P=ha(d,g,14)^ha(d,g,18)^Nl(d,g,41),L=d&h^~d&E,C=g&v^~g&R,D=rA(N,P,C,ZL[O],ts[O]),q=nA(D,$,I,L,VL[O],es[O]),H=D|0,Z=ma(o,n,28)^Ol(o,n,34)^Ol(o,n,39),re=ha(o,n,28)^Nl(o,n,34)^Nl(o,n,39),S=o&i^o&a^i&a,l=n&s^n&c^s&c;$=E|0,N=R|0,E=h|0,R=v|0,h=d|0,v=g|0,{h:d,l:g}=ko(u|0,f|0,q|0,H|0),u=a|0,f=c|0,a=i|0,c=s|0,i=o|0,s=n|0;let m=XI(H,re,l);o=QI(m,q,Z,S),n=m|0;}(({h:o,l:n}=ko(this.Ah|0,this.Al|0,o|0,n|0))),{h:i,l:s}=ko(this.Bh|0,this.Bl|0,i|0,s|0),{h:a,l:c}=ko(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l:f}=ko(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=ko(this.Eh|0,this.El|0,d|0,g|0),{h,l:v}=ko(this.Fh|0,this.Fl|0,h|0,v|0),{h:E,l:R}=ko(this.Gh|0,this.Gl|0,E|0,R|0),{h:$,l:N}=ko(this.Hh|0,this.Hl|0,$|0,N|0),this.set(o,n,i,s,a,c,u,f,d,g,h,v,E,R,$,N);}roundClean(){Pn(es,ts);}destroy(){Pn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},ga=Tl(()=>new ih),iA=Tl(()=>new Cw);});function Uc(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function fi(e){if(!Uc(e))throw new Error("Uint8Array expected")}function Ro(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Pl(e){let t=e.toString(16);return t.length&1?"0"+t:t}function cA(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Mw:BigInt("0x"+e)}function rs(e){if(fi(e),uA)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=GL[e[r]];return t}function sA(e){if(e>=ui._0&&e<=ui._9)return e-ui._0;if(e>=ui.A&&e<=ui.F)return e-(ui.A-10);if(e>=ui.a&&e<=ui.f)return e-(ui.a-10)}function Bl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(uA)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let o=new Uint8Array(r);for(let n=0,i=0;n<r;n++,i+=2){let s=sA(e.charCodeAt(i)),a=sA(e.charCodeAt(i+1));if(s===void 0||a===void 0){let c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}o[n]=s*16+a;}return o}function rn(e){return cA(rs(e))}function ya(e){return fi(e),cA(rs(Uint8Array.from(e).reverse()))}function To(e,t){return Bl(e.toString(16).padStart(t*2,"0"))}function Mc(e,t){return To(e,t).reverse()}function Ge(e,t,r){let o;if(typeof t=="string")try{o=Bl(t);}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(Uc(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");let n=o.length;if(typeof r=="number"&&n!==r)throw new Error(e+" of length "+r+" expected, got "+n);return o}function ar(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];fi(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function ah(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function ba(e,t,r){return zw(e)&&zw(t)&&zw(r)&&t<=e&&e<r}function Dr(e,t,r,o){if(!ba(t,r,o))throw new Error("expected valid "+e+": "+r+" <= n < "+o+", got "+t)}function fA(e){let t;for(t=0;e>Mw;e>>=Uw,t+=1);return t}function lA(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=Lw(e),n=Lw(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=Lw(0))=>{n=a(aA([0]),d),o=a(),d.length!==0&&(n=a(aA([1]),d),o=a());},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,g=[];for(;d<t;){o=a();let h=o.slice();g.push(h),d+=o.length;}return ar(...g)};return (d,g)=>{s(),c(d);let h;for(;!(h=g(u()));)c();return s(),h}}function no(e,t,r={}){let o=(n,i,s)=>{let a=qL[i];if(typeof a!="function")throw new Error("invalid validator function");let c=e[n];if(!(s&&c===void 0)&&!a(c,e))throw new Error("param "+String(n)+" is invalid. Expected "+i+", got "+c)};for(let[n,i]of Object.entries(t))o(n,i,false);for(let[n,i]of Object.entries(r))o(n,i,true);return e}function Dc(e){let t=new WeakMap;return (r,...o)=>{let n=t.get(r);if(n!==void 0)return n;let i=e(r,...o);return t.set(r,i),i}}var Mw,Uw,uA,GL,ui,zw,xa,Lw,aA,qL,va=F(()=>{Mw=BigInt(0),Uw=BigInt(1);uA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",GL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));ui={_0:48,_9:57,A:65,F:70,a:97,f:102};zw=e=>typeof e=="bigint"&&Mw<=e;xa=e=>(Uw<<BigInt(e))-Uw,Lw=e=>new Uint8Array(e),aA=e=>Uint8Array.from(e);qL={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Uc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};});function Ue(e,t){let r=e%t;return r>=jr?r:t+r}function at(e,t,r){let o=e;for(;t-- >jr;)o*=o,o%=r;return o}function ch(e,t){if(e===jr)throw new Error("invert: expected non-zero number");if(t<=jr)throw new Error("invert: expected positive modulus, got "+t);let r=Ue(e,t),o=t,n=jr,s=cr;for(;r!==jr;){let u=o/r,f=o%r,d=n-s*u;o=r,r=f,n=s,s=d;}if(o!==cr)throw new Error("invert: does not exist");return Ue(n,t)}function gA(e,t){let r=(e.ORDER+cr)/pA,o=e.pow(t,r);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function KL(e,t){let r=(e.ORDER-mA)/hA,o=e.mul(t,wa),n=e.pow(o,r),i=e.mul(t,n),s=e.mul(e.mul(i,wa),n),a=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function JL(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-cr,r=0;for(;t%wa===jr;)t/=wa,r++;let o=wa,n=di(e);for(;dA(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return gA;let i=n.pow(o,t),s=(t+cr)/wa;return function(c,u){if(c.is0(u))return u;if(dA(c,u)!==1)throw new Error("Cannot find square root");let f=r,d=c.mul(c.ONE,i),g=c.pow(u,t),h=c.pow(u,s);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let v=1,E=c.sqr(g);for(;!c.eql(E,c.ONE);)if(v++,E=c.sqr(E),v===f)throw new Error("Cannot find square root");let R=cr<<BigInt(f-v-1),$=c.pow(d,R);f=v,d=c.sqr($),g=c.mul(g,d),h=c.mul(h,$);}return h}}function YL(e){return e%pA===WL?gA:e%hA===mA?KL:JL(e)}function uh(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=XL.reduce((o,n)=>(o[n]="function",o),t);return no(e,r)}function QL(e,t,r){if(r<jr)throw new Error("invalid exponent, negatives unsupported");if(r===jr)return e.ONE;if(r===cr)return t;let o=e.ONE,n=t;for(;r>jr;)r&cr&&(o=e.mul(o,n)),n=e.sqr(n),r>>=cr;return o}function li(e,t,r=false){let o=new Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((s,a,c)=>e.is0(a)?s:(o[c]=s,e.mul(s,a)),e.ONE),i=e.inv(n);return t.reduceRight((s,a,c)=>e.is0(a)?s:(o[c]=e.mul(s,o[c]),e.mul(s,a)),i),o}function dA(e,t){let r=(e.ORDER-cr)/wa,o=e.pow(t,r),n=e.eql(o,e.ONE),i=e.eql(o,e.ZERO),s=e.eql(o,e.neg(e.ONE));if(!n&&!i&&!s)throw new Error("invalid Legendre symbol result");return n?1:i?0:-1}function Dw(e,t){t!==void 0&&da(t);let r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return {nBitLength:r,nByteLength:o}}function di(e,t,r=false,o={}){if(e<=jr)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:n,nByteLength:i}=Dw(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s,a=Object.freeze({ORDER:e,isLE:r,BITS:n,BYTES:i,MASK:xa(n),ZERO:jr,ONE:cr,create:c=>Ue(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return jr<=c&&c<e},is0:c=>c===jr,isOdd:c=>(c&cr)===cr,neg:c=>Ue(-c,e),eql:(c,u)=>c===u,sqr:c=>Ue(c*c,e),add:(c,u)=>Ue(c+u,e),sub:(c,u)=>Ue(c-u,e),mul:(c,u)=>Ue(c*u,e),pow:(c,u)=>QL(a,c,u),div:(c,u)=>Ue(c*ch(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>ch(c,e),sqrt:o.sqrt||(c=>(s||(s=YL(e)),s(a,c))),toBytes:c=>r?Mc(c,i):To(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?ya(c):rn(c)},invertBatch:c=>li(a,c),cmov:(c,u,f)=>f?u:c});return Object.freeze(a)}function bA(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function jw(e){let t=bA(e);return t+Math.ceil(t/2)}function xA(e,t,r=false){let o=e.length,n=bA(t),i=jw(t);if(o<16||o<i||o>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+o);let s=r?ya(e):rn(e),a=Ue(s,t-cr)+cr;return r?Mc(a,n):To(a,n)}var jr,cr,wa,WL,pA,mA,hA,yA,XL,_a=F(()=>{ai();va();jr=BigInt(0),cr=BigInt(1),wa=BigInt(2),WL=BigInt(3),pA=BigInt(4),mA=BigInt(5),hA=BigInt(8);yA=(e,t)=>(Ue(e,t)&cr)===cr,XL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];});function Fw(e,t){let r=t.negate();return e?r:t}function _A(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Hw(e,t){_A(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=xa(e),s=BigInt(e);return {windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function wA(e,t,r){let{windowSize:o,mask:n,maxNumber:i,shiftBy:s}=r,a=Number(e&n),c=e>>s;a>o&&(a-=i,c+=Gw);let u=t*o,f=u+Math.abs(a)-1,d=a===0,g=a<0,h=t%2!==0;return {nextN:c,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:u}}function e9(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,o)=>{if(!(r instanceof t))throw new Error("invalid point at index "+o)});}function t9(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+o)});}function Zw(e){return EA.get(e)||1}function fh(e,t){return {constTimeNegate:Fw,hasPrecomputes(r){return Zw(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>vA;)o&Gw&&(n=n.add(i)),i=i.double(),o>>=Gw;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=Hw(o,t),s=[],a=r,c=a;for(let u=0;u<n;u++){c=a,s.push(c);for(let f=1;f<i;f++)c=c.add(a),s.push(c);a=c.double();}return s},wNAF(r,o,n){let i=e.ZERO,s=e.BASE,a=Hw(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:v}=wA(n,c,a);n=u,d?s=s.add(Fw(h,o[v])):i=i.add(Fw(g,o[f]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=Hw(r,t);for(let a=0;a<s.windows&&n!==vA;a++){let{nextN:c,offset:u,isZero:f,isNeg:d}=wA(n,a,s);if(n=c,!f){let g=o[u];i=i.add(d?g.negate():g);}}return i},getPrecomputes(r,o,n){let i=Vw.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&Vw.set(o,n(i))),i},wNAFCached(r,o,n){let i=Zw(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=Zw(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){_A(o,t),EA.set(r,o),Vw.delete(r);}}}function lh(e,t,r,o){e9(r,e),t9(o,t);let n=r.length,i=o.length;if(n!==i)throw new Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=fA(BigInt(n)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let u=xa(c),f=new Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,g=s;for(let h=d;h>=0;h-=c){f.fill(s);for(let E=0;E<i;E++){let R=o[E],$=Number(R>>BigInt(h)&u);f[$]=f[$].add(r[E]);}let v=s;for(let E=f.length-1,R=s;E>0;E--)R=R.add(f[E]),v=v.add(R);if(g=g.add(v),h!==0)for(let E=0;E<c;E++)g=g.double();}return g}function Cl(e){return uh(e.Fp),no(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Dw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var vA,Gw,Vw,EA,qw=F(()=>{_a();va();vA=BigInt(0),Gw=BigInt(1);Vw=new WeakMap,EA=new WeakMap;});function ns(e,t){if(zl(e),zl(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function s9(e,t){let r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function zl(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function a9(e,t,r,o){fi(e),fi(t),zl(r),t.length>255&&(t=o(ar(ah("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:i}=o,s=Math.ceil(r/n);if(r>65535||s>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=ar(t,ns(t.length,1)),c=ns(0,i),u=ns(r,2),f=new Array(s),d=o(ar(c,e,u,ns(0,1),a));f[0]=o(ar(d,ns(1,1),a));for(let h=1;h<=s;h++){let v=[s9(d,f[h-1]),ns(h+1,1),a];f[h]=o(ar(...v));}return ar(...f).slice(0,r)}function c9(e,t,r,o,n){if(fi(e),fi(t),zl(r),t.length>255){let i=Math.ceil(2*o/8);t=n.create({dkLen:i}).update(ah("H2C-OVERSIZE-DST-")).update(t).digest();}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(ns(r,2)).update(t).update(ns(t.length,1)).digest()}function AA(e,t,r){no(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:o,k:n,m:i,hash:s,expand:a,DST:c}=r;fi(e),zl(t);let u=typeof c=="string"?ah(c):c,f=o.toString(2).length,d=Math.ceil((f+n)/8),g=t*i*d,h;if(a==="xmd")h=a9(e,u,g,s);else if(a==="xof")h=c9(e,u,g,n,s);else if(a==="_internal_pass")h=e;else throw new Error('expand must be "xmd" or "xof"');let v=new Array(t);for(let E=0;E<t;E++){let R=new Array(i);for(let $=0;$<i;$++){let N=d*($+E*i),O=h.subarray(N,N+d);R[$]=Ue(i9(O),o);}v[E]=R;}return v}function kA(e,t){let r=t.map(o=>Array.from(o).reverse());return (o,n)=>{let[i,s,a,c]=r.map(d=>d.reduce((g,h)=>e.add(e.mul(g,o),h))),[u,f]=li(e,[s,c],true);return o=e.mul(i,u),n=e.mul(n,e.mul(a,f)),{x:o,y:n}}}function RA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");function o(i){return e.fromAffine(t(i))}function n(i){let s=i.clearCofactor();return s.equals(e.ZERO)?e.ZERO:(s.assertValidity(),s)}return {defaults:r,hashToCurve(i,s){let a=AA(i,2,{...r,DST:r.DST,...s}),c=o(a[0]),u=o(a[1]);return n(c.add(u))},encodeToCurve(i,s){let a=AA(i,1,{...r,DST:r.encodeDST,...s});return n(o(a[0]))},mapToCurve(i){if(!Array.isArray(i))throw new Error("expected array of bigints");for(let s of i)if(typeof s!="bigint")throw new Error("expected array of bigints");return n(o(i))}}}var i9,TA=F(()=>{_a();va();i9=rn;});var PA=Kr(()=>{});var Jw=Kr((BA,Kw)=>{(function(e,t){function r(S,l){if(!S)throw new Error(l||"Assertion failed")}function o(S,l){S.super_=l;var m=function(){};m.prototype=l.prototype,S.prototype=new m,S.prototype.constructor=S;}function n(S,l,m){if(n.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((l==="le"||l==="be")&&(m=l,l=10),this._init(S||0,l||10,m||"be"));}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var i;try{typeof window<"u"&&typeof window.Buffer<"u"?i=window.Buffer:i=PA().Buffer;}catch{}n.isBN=function(l){return l instanceof n?true:l!==null&&typeof l=="object"&&l.constructor.wordSize===n.wordSize&&Array.isArray(l.words)},n.max=function(l,m){return l.cmp(m)>0?l:m},n.min=function(l,m){return l.cmp(m)<0?l:m},n.prototype._init=function(l,m,y){if(typeof l=="number")return this._initNumber(l,m,y);if(typeof l=="object")return this._initArray(l,m,y);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),l=l.toString().replace(/\s+/g,"");var b=0;l[0]==="-"&&(b++,this.negative=1),b<l.length&&(m===16?this._parseHex(l,b,y):(this._parseBase(l,m,b),y==="le"&&this._initArray(this.toArray(),m,y)));},n.prototype._initNumber=function(l,m,y){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),m,y);},n.prototype._initArray=function(l,m,y){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x,_,k=0;if(y==="be")for(b=l.length-1,x=0;b>=0;b-=3)_=l[b]|l[b-1]<<8|l[b-2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);else if(y==="le")for(b=0,x=0;b<l.length;b+=3)_=l[b]|l[b+1]<<8|l[b+2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);return this._strip()};function s(S,l){var m=S.charCodeAt(l);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(false,"Invalid character in "+S);}function a(S,l,m){var y=s(S,m);return m-1>=l&&(y|=s(S,m-1)<<4),y}n.prototype._parseHex=function(l,m,y){this.length=Math.ceil((l.length-m)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x=0,_=0,k;if(y==="be")for(b=l.length-1;b>=m;b-=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;else {var w=l.length-m;for(b=w%2===0?m+1:m;b<l.length;b+=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;}this._strip();};function c(S,l,m,y){for(var b=0,x=0,_=Math.min(S.length,m),k=l;k<_;k++){var w=S.charCodeAt(k)-48;b*=y,w>=49?x=w-49+10:w>=17?x=w-17+10:x=w,r(w>=0&&x<y,"Invalid character"),b+=x;}return b}n.prototype._parseBase=function(l,m,y){this.words=[0],this.length=1;for(var b=0,x=1;x<=67108863;x*=m)b++;b--,x=x/m|0;for(var _=l.length-y,k=_%b,w=Math.min(_,_-k)+y,p=0,A=y;A<w;A+=b)p=c(l,A,A+b,m),this.imuln(x),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(k!==0){var G=1;for(p=c(l,A,l.length,m),A=0;A<k;A++)G*=m;this.imuln(G),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);}this._strip();},n.prototype.copy=function(l){l.words=new Array(this.length);for(var m=0;m<this.length;m++)l.words[m]=this.words[m];l.length=this.length,l.negative=this.negative,l.red=this.red;};function u(S,l){S.words=l.words,S.length=l.length,S.negative=l.negative,S.red=l.red;}if(n.prototype._move=function(l){u(l,this);},n.prototype.clone=function(){var l=new n(null);return this.copy(l),l},n.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f;}catch{n.prototype.inspect=f;}else n.prototype.inspect=f;function f(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(l,m){l=l||10,m=m|0||1;var y;if(l===16||l==="hex"){y="";for(var b=0,x=0,_=0;_<this.length;_++){var k=this.words[_],w=((k<<b|x)&16777215).toString(16);x=k>>>24-b&16777215,b+=2,b>=26&&(b-=26,_--),x!==0||_!==this.length-1?y=d[6-w.length]+w+y:y=w+y;}for(x!==0&&(y=x.toString(16)+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(l===(l|0)&&l>=2&&l<=36){var p=g[l],A=h[l];y="";var G=this.clone();for(G.negative=0;!G.isZero();){var J=G.modrn(A).toString(l);G=G.idivn(A),G.isZero()?y=J+y:y=d[p-J.length]+J+y;}for(this.isZero()&&(y="0"+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(false,"Base should be between 2 and 36");},n.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(false,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},n.prototype.toJSON=function(){return this.toString(16,2)},i&&(n.prototype.toBuffer=function(l,m){return this.toArrayLike(i,l,m)}),n.prototype.toArray=function(l,m){return this.toArrayLike(Array,l,m)};var v=function(l,m){return l.allocUnsafe?l.allocUnsafe(m):new l(m)};n.prototype.toArrayLike=function(l,m,y){this._strip();var b=this.byteLength(),x=y||Math.max(1,b);r(b<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0");var _=v(l,x),k=m==="le"?"LE":"BE";return this["_toArrayLike"+k](_,b),_},n.prototype._toArrayLikeLE=function(l,m){for(var y=0,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y++]=k&255,y<l.length&&(l[y++]=k>>8&255),y<l.length&&(l[y++]=k>>16&255),_===6?(y<l.length&&(l[y++]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y<l.length)for(l[y++]=b;y<l.length;)l[y++]=0;},n.prototype._toArrayLikeBE=function(l,m){for(var y=l.length-1,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y--]=k&255,y>=0&&(l[y--]=k>>8&255),y>=0&&(l[y--]=k>>16&255),_===6?(y>=0&&(l[y--]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y>=0)for(l[y--]=b;y>=0;)l[y--]=0;},Math.clz32?n.prototype._countBits=function(l){return 32-Math.clz32(l)}:n.prototype._countBits=function(l){var m=l,y=0;return m>=4096&&(y+=13,m>>>=13),m>=64&&(y+=7,m>>>=7),m>=8&&(y+=4,m>>>=4),m>=2&&(y+=2,m>>>=2),y+m},n.prototype._zeroBits=function(l){if(l===0)return 26;var m=l,y=0;return (m&8191)===0&&(y+=13,m>>>=13),(m&127)===0&&(y+=7,m>>>=7),(m&15)===0&&(y+=4,m>>>=4),(m&3)===0&&(y+=2,m>>>=2),(m&1)===0&&y++,y},n.prototype.bitLength=function(){var l=this.words[this.length-1],m=this._countBits(l);return (this.length-1)*26+m};function E(S){for(var l=new Array(S.bitLength()),m=0;m<l.length;m++){var y=m/26|0,b=m%26;l[m]=S.words[y]>>>b&1;}return l}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,m=0;m<this.length;m++){var y=this._zeroBits(this.words[m]);if(l+=y,y!==26)break}return l},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},n.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var m=0;m<l.length;m++)this.words[m]=this.words[m]|l.words[m];return this._strip()},n.prototype.ior=function(l){return r((this.negative|l.negative)===0),this.iuor(l)},n.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},n.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},n.prototype.iuand=function(l){var m;this.length>l.length?m=l:m=this;for(var y=0;y<m.length;y++)this.words[y]=this.words[y]&l.words[y];return this.length=m.length,this._strip()},n.prototype.iand=function(l){return r((this.negative|l.negative)===0),this.iuand(l)},n.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},n.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},n.prototype.iuxor=function(l){var m,y;this.length>l.length?(m=this,y=l):(m=l,y=this);for(var b=0;b<y.length;b++)this.words[b]=m.words[b]^y.words[b];if(this!==m)for(;b<m.length;b++)this.words[b]=m.words[b];return this.length=m.length,this._strip()},n.prototype.ixor=function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},n.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},n.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},n.prototype.inotn=function(l){r(typeof l=="number"&&l>=0);var m=Math.ceil(l/26)|0,y=l%26;this._expand(m),y>0&&m--;for(var b=0;b<m;b++)this.words[b]=~this.words[b]&67108863;for(y>0&&(this.words[b]=~this.words[b]&67108863>>26-y,b++);b<this.length;b++)this.words[b]=0;return this._strip()},n.prototype.notn=function(l){return this.clone().inotn(l)},n.prototype.setn=function(l,m){r(typeof l=="number"&&l>=0);var y=l/26|0,b=l%26;return this._expand(y+1),m?this.words[y]=this.words[y]|1<<b:this.words[y]=this.words[y]&~(1<<b),this._strip()},n.prototype.iadd=function(l){var m;if(this.negative!==0&&l.negative===0)return this.negative=0,m=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,m=this.isub(l),l.negative=1,m._normSign();var y,b;this.length>l.length?(y=this,b=l):(y=l,b=this);for(var x=0,_=0;_<b.length;_++)m=(y.words[_]|0)+(b.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;for(;x!==0&&_<y.length;_++)m=(y.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;if(this.length=y.length,x!==0)this.words[this.length]=x,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(l){var m;return l.negative!==0&&this.negative===0?(l.negative=0,m=this.sub(l),l.negative^=1,m):l.negative===0&&this.negative!==0?(this.negative=0,m=l.sub(this),this.negative=1,m):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},n.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var m=this.iadd(l);return l.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var y=this.cmp(l);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,x;y>0?(b=this,x=l):(b=l,x=this);for(var _=0,k=0;k<x.length;k++)m=(b.words[k]|0)-(x.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;for(;_!==0&&k<b.length;k++)m=(b.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;if(_===0&&k<b.length&&b!==this)for(;k<b.length;k++)this.words[k]=b.words[k];return this.length=Math.max(this.length,k),b!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(l){return this.clone().isub(l)};function R(S,l,m){m.negative=l.negative^S.negative;var y=S.length+l.length|0;m.length=y,y=y-1|0;var b=S.words[0]|0,x=l.words[0]|0,_=b*x,k=_&67108863,w=_/67108864|0;m.words[0]=k;for(var p=1;p<y;p++){for(var A=w>>>26,G=w&67108863,J=Math.min(p,l.length-1),Q=Math.max(0,p-S.length+1);Q<=J;Q++){var ae=p-Q|0;b=S.words[ae]|0,x=l.words[Q]|0,_=b*x+G,A+=_/67108864|0,G=_&67108863;}m.words[p]=G|0,w=A|0;}return w!==0?m.words[p]=w|0:m.length--,m._strip()}var $=function(l,m,y){var b=l.words,x=m.words,_=y.words,k=0,w,p,A,G=b[0]|0,J=G&8191,Q=G>>>13,ae=b[1]|0,he=ae&8191,ye=ae>>>13,Ke=b[2]|0,Se=Ke&8191,_e=Ke>>>13,tr=b[3]|0,Ce=tr&8191,je=tr>>>13,Mi=b[4]|0,mt=Mi&8191,gt=Mi>>>13,Bp=b[5]|0,yt=Bp&8191,bt=Bp>>>13,TE=b[6]|0,At=TE&8191,kt=TE>>>13,$E=b[7]|0,Rt=$E&8191,Tt=$E>>>13,OE=b[8]|0,$t=OE&8191,Ot=OE>>>13,NE=b[9]|0,Nt=NE&8191,Pt=NE>>>13,PE=x[0]|0,Bt=PE&8191,Ct=PE>>>13,BE=x[1]|0,zt=BE&8191,Lt=BE>>>13,CE=x[2]|0,Ut=CE&8191,Mt=CE>>>13,zE=x[3]|0,Dt=zE&8191,jt=zE>>>13,LE=x[4]|0,Ft=LE&8191,Ht=LE>>>13,UE=x[5]|0,Vt=UE&8191,Zt=UE>>>13,ME=x[6]|0,Gt=ME&8191,qt=ME>>>13,DE=x[7]|0,Wt=DE&8191,Kt=DE>>>13,jE=x[8]|0,Jt=jE&8191,Yt=jE>>>13,FE=x[9]|0,Xt=FE&8191,Qt=FE>>>13;y.negative=l.negative^m.negative,y.length=19,w=Math.imul(J,Bt),p=Math.imul(J,Ct),p=p+Math.imul(Q,Bt)|0,A=Math.imul(Q,Ct);var Fy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Fy>>>26)|0,Fy&=67108863,w=Math.imul(he,Bt),p=Math.imul(he,Ct),p=p+Math.imul(ye,Bt)|0,A=Math.imul(ye,Ct),w=w+Math.imul(J,zt)|0,p=p+Math.imul(J,Lt)|0,p=p+Math.imul(Q,zt)|0,A=A+Math.imul(Q,Lt)|0;var Hy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Hy>>>26)|0,Hy&=67108863,w=Math.imul(Se,Bt),p=Math.imul(Se,Ct),p=p+Math.imul(_e,Bt)|0,A=Math.imul(_e,Ct),w=w+Math.imul(he,zt)|0,p=p+Math.imul(he,Lt)|0,p=p+Math.imul(ye,zt)|0,A=A+Math.imul(ye,Lt)|0,w=w+Math.imul(J,Ut)|0,p=p+Math.imul(J,Mt)|0,p=p+Math.imul(Q,Ut)|0,A=A+Math.imul(Q,Mt)|0;var Vy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Vy>>>26)|0,Vy&=67108863,w=Math.imul(Ce,Bt),p=Math.imul(Ce,Ct),p=p+Math.imul(je,Bt)|0,A=Math.imul(je,Ct),w=w+Math.imul(Se,zt)|0,p=p+Math.imul(Se,Lt)|0,p=p+Math.imul(_e,zt)|0,A=A+Math.imul(_e,Lt)|0,w=w+Math.imul(he,Ut)|0,p=p+Math.imul(he,Mt)|0,p=p+Math.imul(ye,Ut)|0,A=A+Math.imul(ye,Mt)|0,w=w+Math.imul(J,Dt)|0,p=p+Math.imul(J,jt)|0,p=p+Math.imul(Q,Dt)|0,A=A+Math.imul(Q,jt)|0;var Zy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Zy>>>26)|0,Zy&=67108863,w=Math.imul(mt,Bt),p=Math.imul(mt,Ct),p=p+Math.imul(gt,Bt)|0,A=Math.imul(gt,Ct),w=w+Math.imul(Ce,zt)|0,p=p+Math.imul(Ce,Lt)|0,p=p+Math.imul(je,zt)|0,A=A+Math.imul(je,Lt)|0,w=w+Math.imul(Se,Ut)|0,p=p+Math.imul(Se,Mt)|0,p=p+Math.imul(_e,Ut)|0,A=A+Math.imul(_e,Mt)|0,w=w+Math.imul(he,Dt)|0,p=p+Math.imul(he,jt)|0,p=p+Math.imul(ye,Dt)|0,A=A+Math.imul(ye,jt)|0,w=w+Math.imul(J,Ft)|0,p=p+Math.imul(J,Ht)|0,p=p+Math.imul(Q,Ft)|0,A=A+Math.imul(Q,Ht)|0;var Gy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Gy>>>26)|0,Gy&=67108863,w=Math.imul(yt,Bt),p=Math.imul(yt,Ct),p=p+Math.imul(bt,Bt)|0,A=Math.imul(bt,Ct),w=w+Math.imul(mt,zt)|0,p=p+Math.imul(mt,Lt)|0,p=p+Math.imul(gt,zt)|0,A=A+Math.imul(gt,Lt)|0,w=w+Math.imul(Ce,Ut)|0,p=p+Math.imul(Ce,Mt)|0,p=p+Math.imul(je,Ut)|0,A=A+Math.imul(je,Mt)|0,w=w+Math.imul(Se,Dt)|0,p=p+Math.imul(Se,jt)|0,p=p+Math.imul(_e,Dt)|0,A=A+Math.imul(_e,jt)|0,w=w+Math.imul(he,Ft)|0,p=p+Math.imul(he,Ht)|0,p=p+Math.imul(ye,Ft)|0,A=A+Math.imul(ye,Ht)|0,w=w+Math.imul(J,Vt)|0,p=p+Math.imul(J,Zt)|0,p=p+Math.imul(Q,Vt)|0,A=A+Math.imul(Q,Zt)|0;var qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(qy>>>26)|0,qy&=67108863,w=Math.imul(At,Bt),p=Math.imul(At,Ct),p=p+Math.imul(kt,Bt)|0,A=Math.imul(kt,Ct),w=w+Math.imul(yt,zt)|0,p=p+Math.imul(yt,Lt)|0,p=p+Math.imul(bt,zt)|0,A=A+Math.imul(bt,Lt)|0,w=w+Math.imul(mt,Ut)|0,p=p+Math.imul(mt,Mt)|0,p=p+Math.imul(gt,Ut)|0,A=A+Math.imul(gt,Mt)|0,w=w+Math.imul(Ce,Dt)|0,p=p+Math.imul(Ce,jt)|0,p=p+Math.imul(je,Dt)|0,A=A+Math.imul(je,jt)|0,w=w+Math.imul(Se,Ft)|0,p=p+Math.imul(Se,Ht)|0,p=p+Math.imul(_e,Ft)|0,A=A+Math.imul(_e,Ht)|0,w=w+Math.imul(he,Vt)|0,p=p+Math.imul(he,Zt)|0,p=p+Math.imul(ye,Vt)|0,A=A+Math.imul(ye,Zt)|0,w=w+Math.imul(J,Gt)|0,p=p+Math.imul(J,qt)|0,p=p+Math.imul(Q,Gt)|0,A=A+Math.imul(Q,qt)|0;var Wy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Wy>>>26)|0,Wy&=67108863,w=Math.imul(Rt,Bt),p=Math.imul(Rt,Ct),p=p+Math.imul(Tt,Bt)|0,A=Math.imul(Tt,Ct),w=w+Math.imul(At,zt)|0,p=p+Math.imul(At,Lt)|0,p=p+Math.imul(kt,zt)|0,A=A+Math.imul(kt,Lt)|0,w=w+Math.imul(yt,Ut)|0,p=p+Math.imul(yt,Mt)|0,p=p+Math.imul(bt,Ut)|0,A=A+Math.imul(bt,Mt)|0,w=w+Math.imul(mt,Dt)|0,p=p+Math.imul(mt,jt)|0,p=p+Math.imul(gt,Dt)|0,A=A+Math.imul(gt,jt)|0,w=w+Math.imul(Ce,Ft)|0,p=p+Math.imul(Ce,Ht)|0,p=p+Math.imul(je,Ft)|0,A=A+Math.imul(je,Ht)|0,w=w+Math.imul(Se,Vt)|0,p=p+Math.imul(Se,Zt)|0,p=p+Math.imul(_e,Vt)|0,A=A+Math.imul(_e,Zt)|0,w=w+Math.imul(he,Gt)|0,p=p+Math.imul(he,qt)|0,p=p+Math.imul(ye,Gt)|0,A=A+Math.imul(ye,qt)|0,w=w+Math.imul(J,Wt)|0,p=p+Math.imul(J,Kt)|0,p=p+Math.imul(Q,Wt)|0,A=A+Math.imul(Q,Kt)|0;var Ky=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ky>>>26)|0,Ky&=67108863,w=Math.imul($t,Bt),p=Math.imul($t,Ct),p=p+Math.imul(Ot,Bt)|0,A=Math.imul(Ot,Ct),w=w+Math.imul(Rt,zt)|0,p=p+Math.imul(Rt,Lt)|0,p=p+Math.imul(Tt,zt)|0,A=A+Math.imul(Tt,Lt)|0,w=w+Math.imul(At,Ut)|0,p=p+Math.imul(At,Mt)|0,p=p+Math.imul(kt,Ut)|0,A=A+Math.imul(kt,Mt)|0,w=w+Math.imul(yt,Dt)|0,p=p+Math.imul(yt,jt)|0,p=p+Math.imul(bt,Dt)|0,A=A+Math.imul(bt,jt)|0,w=w+Math.imul(mt,Ft)|0,p=p+Math.imul(mt,Ht)|0,p=p+Math.imul(gt,Ft)|0,A=A+Math.imul(gt,Ht)|0,w=w+Math.imul(Ce,Vt)|0,p=p+Math.imul(Ce,Zt)|0,p=p+Math.imul(je,Vt)|0,A=A+Math.imul(je,Zt)|0,w=w+Math.imul(Se,Gt)|0,p=p+Math.imul(Se,qt)|0,p=p+Math.imul(_e,Gt)|0,A=A+Math.imul(_e,qt)|0,w=w+Math.imul(he,Wt)|0,p=p+Math.imul(he,Kt)|0,p=p+Math.imul(ye,Wt)|0,A=A+Math.imul(ye,Kt)|0,w=w+Math.imul(J,Jt)|0,p=p+Math.imul(J,Yt)|0,p=p+Math.imul(Q,Jt)|0,A=A+Math.imul(Q,Yt)|0;var Jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Jy>>>26)|0,Jy&=67108863,w=Math.imul(Nt,Bt),p=Math.imul(Nt,Ct),p=p+Math.imul(Pt,Bt)|0,A=Math.imul(Pt,Ct),w=w+Math.imul($t,zt)|0,p=p+Math.imul($t,Lt)|0,p=p+Math.imul(Ot,zt)|0,A=A+Math.imul(Ot,Lt)|0,w=w+Math.imul(Rt,Ut)|0,p=p+Math.imul(Rt,Mt)|0,p=p+Math.imul(Tt,Ut)|0,A=A+Math.imul(Tt,Mt)|0,w=w+Math.imul(At,Dt)|0,p=p+Math.imul(At,jt)|0,p=p+Math.imul(kt,Dt)|0,A=A+Math.imul(kt,jt)|0,w=w+Math.imul(yt,Ft)|0,p=p+Math.imul(yt,Ht)|0,p=p+Math.imul(bt,Ft)|0,A=A+Math.imul(bt,Ht)|0,w=w+Math.imul(mt,Vt)|0,p=p+Math.imul(mt,Zt)|0,p=p+Math.imul(gt,Vt)|0,A=A+Math.imul(gt,Zt)|0,w=w+Math.imul(Ce,Gt)|0,p=p+Math.imul(Ce,qt)|0,p=p+Math.imul(je,Gt)|0,A=A+Math.imul(je,qt)|0,w=w+Math.imul(Se,Wt)|0,p=p+Math.imul(Se,Kt)|0,p=p+Math.imul(_e,Wt)|0,A=A+Math.imul(_e,Kt)|0,w=w+Math.imul(he,Jt)|0,p=p+Math.imul(he,Yt)|0,p=p+Math.imul(ye,Jt)|0,A=A+Math.imul(ye,Yt)|0,w=w+Math.imul(J,Xt)|0,p=p+Math.imul(J,Qt)|0,p=p+Math.imul(Q,Xt)|0,A=A+Math.imul(Q,Qt)|0;var Yy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Yy>>>26)|0,Yy&=67108863,w=Math.imul(Nt,zt),p=Math.imul(Nt,Lt),p=p+Math.imul(Pt,zt)|0,A=Math.imul(Pt,Lt),w=w+Math.imul($t,Ut)|0,p=p+Math.imul($t,Mt)|0,p=p+Math.imul(Ot,Ut)|0,A=A+Math.imul(Ot,Mt)|0,w=w+Math.imul(Rt,Dt)|0,p=p+Math.imul(Rt,jt)|0,p=p+Math.imul(Tt,Dt)|0,A=A+Math.imul(Tt,jt)|0,w=w+Math.imul(At,Ft)|0,p=p+Math.imul(At,Ht)|0,p=p+Math.imul(kt,Ft)|0,A=A+Math.imul(kt,Ht)|0,w=w+Math.imul(yt,Vt)|0,p=p+Math.imul(yt,Zt)|0,p=p+Math.imul(bt,Vt)|0,A=A+Math.imul(bt,Zt)|0,w=w+Math.imul(mt,Gt)|0,p=p+Math.imul(mt,qt)|0,p=p+Math.imul(gt,Gt)|0,A=A+Math.imul(gt,qt)|0,w=w+Math.imul(Ce,Wt)|0,p=p+Math.imul(Ce,Kt)|0,p=p+Math.imul(je,Wt)|0,A=A+Math.imul(je,Kt)|0,w=w+Math.imul(Se,Jt)|0,p=p+Math.imul(Se,Yt)|0,p=p+Math.imul(_e,Jt)|0,A=A+Math.imul(_e,Yt)|0,w=w+Math.imul(he,Xt)|0,p=p+Math.imul(he,Qt)|0,p=p+Math.imul(ye,Xt)|0,A=A+Math.imul(ye,Qt)|0;var Xy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Xy>>>26)|0,Xy&=67108863,w=Math.imul(Nt,Ut),p=Math.imul(Nt,Mt),p=p+Math.imul(Pt,Ut)|0,A=Math.imul(Pt,Mt),w=w+Math.imul($t,Dt)|0,p=p+Math.imul($t,jt)|0,p=p+Math.imul(Ot,Dt)|0,A=A+Math.imul(Ot,jt)|0,w=w+Math.imul(Rt,Ft)|0,p=p+Math.imul(Rt,Ht)|0,p=p+Math.imul(Tt,Ft)|0,A=A+Math.imul(Tt,Ht)|0,w=w+Math.imul(At,Vt)|0,p=p+Math.imul(At,Zt)|0,p=p+Math.imul(kt,Vt)|0,A=A+Math.imul(kt,Zt)|0,w=w+Math.imul(yt,Gt)|0,p=p+Math.imul(yt,qt)|0,p=p+Math.imul(bt,Gt)|0,A=A+Math.imul(bt,qt)|0,w=w+Math.imul(mt,Wt)|0,p=p+Math.imul(mt,Kt)|0,p=p+Math.imul(gt,Wt)|0,A=A+Math.imul(gt,Kt)|0,w=w+Math.imul(Ce,Jt)|0,p=p+Math.imul(Ce,Yt)|0,p=p+Math.imul(je,Jt)|0,A=A+Math.imul(je,Yt)|0,w=w+Math.imul(Se,Xt)|0,p=p+Math.imul(Se,Qt)|0,p=p+Math.imul(_e,Xt)|0,A=A+Math.imul(_e,Qt)|0;var Qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Qy>>>26)|0,Qy&=67108863,w=Math.imul(Nt,Dt),p=Math.imul(Nt,jt),p=p+Math.imul(Pt,Dt)|0,A=Math.imul(Pt,jt),w=w+Math.imul($t,Ft)|0,p=p+Math.imul($t,Ht)|0,p=p+Math.imul(Ot,Ft)|0,A=A+Math.imul(Ot,Ht)|0,w=w+Math.imul(Rt,Vt)|0,p=p+Math.imul(Rt,Zt)|0,p=p+Math.imul(Tt,Vt)|0,A=A+Math.imul(Tt,Zt)|0,w=w+Math.imul(At,Gt)|0,p=p+Math.imul(At,qt)|0,p=p+Math.imul(kt,Gt)|0,A=A+Math.imul(kt,qt)|0,w=w+Math.imul(yt,Wt)|0,p=p+Math.imul(yt,Kt)|0,p=p+Math.imul(bt,Wt)|0,A=A+Math.imul(bt,Kt)|0,w=w+Math.imul(mt,Jt)|0,p=p+Math.imul(mt,Yt)|0,p=p+Math.imul(gt,Jt)|0,A=A+Math.imul(gt,Yt)|0,w=w+Math.imul(Ce,Xt)|0,p=p+Math.imul(Ce,Qt)|0,p=p+Math.imul(je,Xt)|0,A=A+Math.imul(je,Qt)|0;var eb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(eb>>>26)|0,eb&=67108863,w=Math.imul(Nt,Ft),p=Math.imul(Nt,Ht),p=p+Math.imul(Pt,Ft)|0,A=Math.imul(Pt,Ht),w=w+Math.imul($t,Vt)|0,p=p+Math.imul($t,Zt)|0,p=p+Math.imul(Ot,Vt)|0,A=A+Math.imul(Ot,Zt)|0,w=w+Math.imul(Rt,Gt)|0,p=p+Math.imul(Rt,qt)|0,p=p+Math.imul(Tt,Gt)|0,A=A+Math.imul(Tt,qt)|0,w=w+Math.imul(At,Wt)|0,p=p+Math.imul(At,Kt)|0,p=p+Math.imul(kt,Wt)|0,A=A+Math.imul(kt,Kt)|0,w=w+Math.imul(yt,Jt)|0,p=p+Math.imul(yt,Yt)|0,p=p+Math.imul(bt,Jt)|0,A=A+Math.imul(bt,Yt)|0,w=w+Math.imul(mt,Xt)|0,p=p+Math.imul(mt,Qt)|0,p=p+Math.imul(gt,Xt)|0,A=A+Math.imul(gt,Qt)|0;var tb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(tb>>>26)|0,tb&=67108863,w=Math.imul(Nt,Vt),p=Math.imul(Nt,Zt),p=p+Math.imul(Pt,Vt)|0,A=Math.imul(Pt,Zt),w=w+Math.imul($t,Gt)|0,p=p+Math.imul($t,qt)|0,p=p+Math.imul(Ot,Gt)|0,A=A+Math.imul(Ot,qt)|0,w=w+Math.imul(Rt,Wt)|0,p=p+Math.imul(Rt,Kt)|0,p=p+Math.imul(Tt,Wt)|0,A=A+Math.imul(Tt,Kt)|0,w=w+Math.imul(At,Jt)|0,p=p+Math.imul(At,Yt)|0,p=p+Math.imul(kt,Jt)|0,A=A+Math.imul(kt,Yt)|0,w=w+Math.imul(yt,Xt)|0,p=p+Math.imul(yt,Qt)|0,p=p+Math.imul(bt,Xt)|0,A=A+Math.imul(bt,Qt)|0;var rb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(rb>>>26)|0,rb&=67108863,w=Math.imul(Nt,Gt),p=Math.imul(Nt,qt),p=p+Math.imul(Pt,Gt)|0,A=Math.imul(Pt,qt),w=w+Math.imul($t,Wt)|0,p=p+Math.imul($t,Kt)|0,p=p+Math.imul(Ot,Wt)|0,A=A+Math.imul(Ot,Kt)|0,w=w+Math.imul(Rt,Jt)|0,p=p+Math.imul(Rt,Yt)|0,p=p+Math.imul(Tt,Jt)|0,A=A+Math.imul(Tt,Yt)|0,w=w+Math.imul(At,Xt)|0,p=p+Math.imul(At,Qt)|0,p=p+Math.imul(kt,Xt)|0,A=A+Math.imul(kt,Qt)|0;var nb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(nb>>>26)|0,nb&=67108863,w=Math.imul(Nt,Wt),p=Math.imul(Nt,Kt),p=p+Math.imul(Pt,Wt)|0,A=Math.imul(Pt,Kt),w=w+Math.imul($t,Jt)|0,p=p+Math.imul($t,Yt)|0,p=p+Math.imul(Ot,Jt)|0,A=A+Math.imul(Ot,Yt)|0,w=w+Math.imul(Rt,Xt)|0,p=p+Math.imul(Rt,Qt)|0,p=p+Math.imul(Tt,Xt)|0,A=A+Math.imul(Tt,Qt)|0;var ob=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(ob>>>26)|0,ob&=67108863,w=Math.imul(Nt,Jt),p=Math.imul(Nt,Yt),p=p+Math.imul(Pt,Jt)|0,A=Math.imul(Pt,Yt),w=w+Math.imul($t,Xt)|0,p=p+Math.imul($t,Qt)|0,p=p+Math.imul(Ot,Xt)|0,A=A+Math.imul(Ot,Qt)|0;var ib=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(ib>>>26)|0,ib&=67108863,w=Math.imul(Nt,Xt),p=Math.imul(Nt,Qt),p=p+Math.imul(Pt,Xt)|0,A=Math.imul(Pt,Qt);var sb=(k+w|0)+((p&8191)<<13)|0;return k=(A+(p>>>13)|0)+(sb>>>26)|0,sb&=67108863,_[0]=Fy,_[1]=Hy,_[2]=Vy,_[3]=Zy,_[4]=Gy,_[5]=qy,_[6]=Wy,_[7]=Ky,_[8]=Jy,_[9]=Yy,_[10]=Xy,_[11]=Qy,_[12]=eb,_[13]=tb,_[14]=rb,_[15]=nb,_[16]=ob,_[17]=ib,_[18]=sb,k!==0&&(_[19]=k,y.length++),y};Math.imul||($=R);function N(S,l,m){m.negative=l.negative^S.negative,m.length=S.length+l.length;for(var y=0,b=0,x=0;x<m.length-1;x++){var _=b;b=0;for(var k=y&67108863,w=Math.min(x,l.length-1),p=Math.max(0,x-S.length+1);p<=w;p++){var A=x-p,G=S.words[A]|0,J=l.words[p]|0,Q=G*J,ae=Q&67108863;_=_+(Q/67108864|0)|0,ae=ae+k|0,k=ae&67108863,_=_+(ae>>>26)|0,b+=_>>>26,_&=67108863;}m.words[x]=k,y=_,_=b;}return y!==0?m.words[x]=y:m.length--,m._strip()}function O(S,l,m){return N(S,l,m)}n.prototype.mulTo=function(l,m){var y,b=this.length+l.length;return this.length===10&&l.length===10?y=$(this,l,m):b<63?y=R(this,l,m):b<1024?y=N(this,l,m):y=O(this,l,m),y};n.prototype.mul=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),this.mulTo(l,m)},n.prototype.mulf=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),O(this,l,m)},n.prototype.imul=function(l){return this.clone().mulTo(l,this)},n.prototype.imuln=function(l){var m=l<0;m&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var y=0,b=0;b<this.length;b++){var x=(this.words[b]|0)*l,_=(x&67108863)+(y&67108863);y>>=26,y+=x/67108864|0,y+=_>>>26,this.words[b]=_&67108863;}return y!==0&&(this.words[b]=y,this.length++),l===0&&(this.length=1,this._normSign()),m?this.ineg():this},n.prototype.muln=function(l){return this.clone().imuln(l)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(l){var m=E(l);if(m.length===0)return new n(1);for(var y=this,b=0;b<m.length&&m[b]===0;b++,y=y.sqr());if(++b<m.length)for(var x=y.sqr();b<m.length;b++,x=x.sqr())m[b]!==0&&(y=y.mul(x));return y},n.prototype.iushln=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=67108863>>>26-m<<26-m,x;if(m!==0){var _=0;for(x=0;x<this.length;x++){var k=this.words[x]&b,w=(this.words[x]|0)-k<<m;this.words[x]=w|_,_=k>>>26-m;}_&&(this.words[x]=_,this.length++);}if(y!==0){for(x=this.length-1;x>=0;x--)this.words[x+y]=this.words[x];for(x=0;x<y;x++)this.words[x]=0;this.length+=y;}return this._strip()},n.prototype.ishln=function(l){return r(this.negative===0),this.iushln(l)},n.prototype.iushrn=function(l,m,y){r(typeof l=="number"&&l>=0);var b;m?b=(m-m%26)/26:b=0;var x=l%26,_=Math.min((l-x)/26,this.length),k=67108863^67108863>>>x<<x,w=y;if(b-=_,b=Math.max(0,b),w){for(var p=0;p<_;p++)w.words[p]=this.words[p];w.length=_;}if(_!==0)if(this.length>_)for(this.length-=_,p=0;p<this.length;p++)this.words[p]=this.words[p+_];else this.words[0]=0,this.length=1;var A=0;for(p=this.length-1;p>=0&&(A!==0||p>=b);p--){var G=this.words[p]|0;this.words[p]=A<<26-x|G>>>x,A=G&k;}return w&&A!==0&&(w.words[w.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(l,m,y){return r(this.negative===0),this.iushrn(l,m,y)},n.prototype.shln=function(l){return this.clone().ishln(l)},n.prototype.ushln=function(l){return this.clone().iushln(l)},n.prototype.shrn=function(l){return this.clone().ishrn(l)},n.prototype.ushrn=function(l){return this.clone().iushrn(l)},n.prototype.testn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return false;var x=this.words[y];return !!(x&b)},n.prototype.imaskn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(m!==0&&y++,this.length=Math.min(y,this.length),m!==0){var b=67108863^67108863>>>m<<m;this.words[this.length-1]&=b;}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(l){return this.clone().imaskn(l)},n.prototype.iaddn=function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},n.prototype._iaddn=function(l){this.words[0]+=l;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},n.prototype.isubn=function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},n.prototype.addn=function(l){return this.clone().iaddn(l)},n.prototype.subn=function(l){return this.clone().isubn(l)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(l,m,y){var b=l.length+y,x;this._expand(b);var _,k=0;for(x=0;x<l.length;x++){_=(this.words[x+y]|0)+k;var w=(l.words[x]|0)*m;_-=w&67108863,k=(_>>26)-(w/67108864|0),this.words[x+y]=_&67108863;}for(;x<this.length-y;x++)_=(this.words[x+y]|0)+k,k=_>>26,this.words[x+y]=_&67108863;if(k===0)return this._strip();for(r(k===-1),k=0,x=0;x<this.length;x++)_=-(this.words[x]|0)+k,k=_>>26,this.words[x]=_&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(l,m){var y=this.length-l.length,b=this.clone(),x=l,_=x.words[x.length-1]|0,k=this._countBits(_);y=26-k,y!==0&&(x=x.ushln(y),b.iushln(y),_=x.words[x.length-1]|0);var w=b.length-x.length,p;if(m!=="mod"){p=new n(null),p.length=w+1,p.words=new Array(p.length);for(var A=0;A<p.length;A++)p.words[A]=0;}var G=b.clone()._ishlnsubmul(x,1,w);G.negative===0&&(b=G,p&&(p.words[w]=1));for(var J=w-1;J>=0;J--){var Q=(b.words[x.length+J]|0)*67108864+(b.words[x.length+J-1]|0);for(Q=Math.min(Q/_|0,67108863),b._ishlnsubmul(x,Q,J);b.negative!==0;)Q--,b.negative=0,b._ishlnsubmul(x,1,J),b.isZero()||(b.negative^=1);p&&(p.words[J]=Q);}return p&&p._strip(),b._strip(),m!=="div"&&y!==0&&b.iushrn(y),{div:p||null,mod:b}},n.prototype.divmod=function(l,m,y){if(r(!l.isZero()),this.isZero())return {div:new n(0),mod:new n(0)};var b,x,_;return this.negative!==0&&l.negative===0?(_=this.neg().divmod(l,m),m!=="mod"&&(b=_.div.neg()),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.iadd(l)),{div:b,mod:x}):this.negative===0&&l.negative!==0?(_=this.divmod(l.neg(),m),m!=="mod"&&(b=_.div.neg()),{div:b,mod:_.mod}):(this.negative&l.negative)!==0?(_=this.neg().divmod(l.neg(),m),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.isub(l)),{div:_.div,mod:x}):l.length>this.length||this.cmp(l)<0?{div:new n(0),mod:this}:l.length===1?m==="div"?{div:this.divn(l.words[0]),mod:null}:m==="mod"?{div:null,mod:new n(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new n(this.modrn(l.words[0]))}:this._wordDiv(l,m)},n.prototype.div=function(l){return this.divmod(l,"div",false).div},n.prototype.mod=function(l){return this.divmod(l,"mod",false).mod},n.prototype.umod=function(l){return this.divmod(l,"mod",true).mod},n.prototype.divRound=function(l){var m=this.divmod(l);if(m.mod.isZero())return m.div;var y=m.mod.abs(),b=l.abs().iushrn(1),x=l.words[0]&1,_=y.cmp(b);if(_<0||x===1&&_===0)return m.div;var k=new n(1);return k.negative=this.negative^l.negative,m.div.iadd(k)},n.prototype.modrn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=(1<<26)%l,b=0,x=this.length-1;x>=0;x--)b=(y*b+(this.words[x]|0))%l;return m?-b:b},n.prototype.modn=function(l){return this.modrn(l)},n.prototype.idivn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=0,b=this.length-1;b>=0;b--){var x=(this.words[b]|0)+y*67108864;this.words[b]=x/l|0,y=x%l;}return this._strip(),m?this.ineg():this},n.prototype.divn=function(l){return this.clone().idivn(l)},n.prototype.egcd=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=new n(0),k=new n(1),w=0;m.isEven()&&y.isEven();)m.iushrn(1),y.iushrn(1),++w;for(var p=y.clone(),A=m.clone();!m.isZero();){for(var G=0,J=1;(m.words[0]&J)===0&&G<26;++G,J<<=1);if(G>0)for(m.iushrn(G);G-- >0;)(b.isOdd()||x.isOdd())&&(b.iadd(p),x.isub(A)),b.iushrn(1),x.iushrn(1);for(var Q=0,ae=1;(y.words[0]&ae)===0&&Q<26;++Q,ae<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(_.isOdd()||k.isOdd())&&(_.iadd(p),k.isub(A)),_.iushrn(1),k.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(_),x.isub(k)):(y.isub(m),_.isub(b),k.isub(x));}return {a:_,b:k,gcd:y.iushln(w)}},n.prototype._invmp=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=y.clone();m.cmpn(1)>0&&y.cmpn(1)>0;){for(var k=0,w=1;(m.words[0]&w)===0&&k<26;++k,w<<=1);if(k>0)for(m.iushrn(k);k-- >0;)b.isOdd()&&b.iadd(_),b.iushrn(1);for(var p=0,A=1;(y.words[0]&A)===0&&p<26;++p,A<<=1);if(p>0)for(y.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(_),x.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(x)):(y.isub(m),x.isub(b));}var G;return m.cmpn(1)===0?G=b:G=x,G.cmpn(0)<0&&G.iadd(l),G},n.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var m=this.clone(),y=l.clone();m.negative=0,y.negative=0;for(var b=0;m.isEven()&&y.isEven();b++)m.iushrn(1),y.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;y.isEven();)y.iushrn(1);var x=m.cmp(y);if(x<0){var _=m;m=y,y=_;}else if(x===0||y.cmpn(1)===0)break;m.isub(y);}while(true);return y.iushln(b)},n.prototype.invm=function(l){return this.egcd(l).a.umod(l)},n.prototype.isEven=function(){return (this.words[0]&1)===0},n.prototype.isOdd=function(){return (this.words[0]&1)===1},n.prototype.andln=function(l){return this.words[0]&l},n.prototype.bincn=function(l){r(typeof l=="number");var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return this._expand(y+1),this.words[y]|=b,this;for(var x=b,_=y;x!==0&&_<this.length;_++){var k=this.words[_]|0;k+=x,x=k>>>26,k&=67108863,this.words[_]=k;}return x!==0&&(this.words[_]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(l){var m=l<0;if(this.negative!==0&&!m)return -1;if(this.negative===0&&m)return 1;this._strip();var y;if(this.length>1)y=1;else {m&&(l=-l),r(l<=67108863,"Number is too big");var b=this.words[0]|0;y=b===l?0:b<l?-1:1;}return this.negative!==0?-y|0:y},n.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return -1;if(this.negative===0&&l.negative!==0)return 1;var m=this.ucmp(l);return this.negative!==0?-m|0:m},n.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return -1;for(var m=0,y=this.length-1;y>=0;y--){var b=this.words[y]|0,x=l.words[y]|0;if(b!==x){b<x?m=-1:b>x&&(m=1);break}}return m},n.prototype.gtn=function(l){return this.cmpn(l)===1},n.prototype.gt=function(l){return this.cmp(l)===1},n.prototype.gten=function(l){return this.cmpn(l)>=0},n.prototype.gte=function(l){return this.cmp(l)>=0},n.prototype.ltn=function(l){return this.cmpn(l)===-1},n.prototype.lt=function(l){return this.cmp(l)===-1},n.prototype.lten=function(l){return this.cmpn(l)<=0},n.prototype.lte=function(l){return this.cmp(l)<=0},n.prototype.eqn=function(l){return this.cmpn(l)===0},n.prototype.eq=function(l){return this.cmp(l)===0},n.red=function(l){return new Z(l)},n.prototype.toRed=function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(l){return this.red=l,this},n.prototype.forceRed=function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},n.prototype.redAdd=function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},n.prototype.redIAdd=function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},n.prototype.redSub=function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},n.prototype.redISub=function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},n.prototype.redShl=function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},n.prototype.redMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},n.prototype.redIMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var P={k256:null,p224:null,p192:null,p25519:null};function L(S,l){this.name=S,this.p=new n(l,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}L.prototype._tmp=function(){var l=new n(null);return l.words=new Array(Math.ceil(this.n/13)),l},L.prototype.ireduce=function(l){var m=l,y;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),y=m.bitLength();while(y>this.n);var b=y<this.n?-1:m.ucmp(this.p);return b===0?(m.words[0]=0,m.length=1):b>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},L.prototype.split=function(l,m){l.iushrn(this.n,0,m);},L.prototype.imulK=function(l){return l.imul(this.k)};function C(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}o(C,L),C.prototype.split=function(l,m){for(var y=4194303,b=Math.min(l.length,9),x=0;x<b;x++)m.words[x]=l.words[x];if(m.length=b,l.length<=9){l.words[0]=0,l.length=1;return}var _=l.words[9];for(m.words[m.length++]=_&y,x=10;x<l.length;x++){var k=l.words[x]|0;l.words[x-10]=(k&y)<<4|_>>>22,_=k;}_>>>=22,l.words[x-10]=_,_===0&&l.length>10?l.length-=10:l.length-=9;},C.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var m=0,y=0;y<l.length;y++){var b=l.words[y]|0;m+=b*977,l.words[y]=m&67108863,m=b*64+(m/67108864|0);}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function D(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}o(D,L);function q(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}o(q,L);function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}o(H,L),H.prototype.imulK=function(l){for(var m=0,y=0;y<l.length;y++){var b=(l.words[y]|0)*19+m,x=b&67108863;b>>>=26,l.words[y]=x,m=b;}return m!==0&&(l.words[l.length++]=m),l},n._prime=function(l){if(P[l])return P[l];var m;if(l==="k256")m=new C;else if(l==="p224")m=new D;else if(l==="p192")m=new q;else if(l==="p25519")m=new H;else throw new Error("Unknown prime "+l);return P[l]=m,m};function Z(S){if(typeof S=="string"){var l=n._prime(S);this.m=l.p,this.prime=l;}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null;}Z.prototype._verify1=function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers");},Z.prototype._verify2=function(l,m){r((l.negative|m.negative)===0,"red works only with positives"),r(l.red&&l.red===m.red,"red works only with red numbers");},Z.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(u(l,l.umod(this.m)._forceRed(this)),l)},Z.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},Z.prototype.add=function(l,m){this._verify2(l,m);var y=l.add(m);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},Z.prototype.iadd=function(l,m){this._verify2(l,m);var y=l.iadd(m);return y.cmp(this.m)>=0&&y.isub(this.m),y},Z.prototype.sub=function(l,m){this._verify2(l,m);var y=l.sub(m);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},Z.prototype.isub=function(l,m){this._verify2(l,m);var y=l.isub(m);return y.cmpn(0)<0&&y.iadd(this.m),y},Z.prototype.shl=function(l,m){return this._verify1(l),this.imod(l.ushln(m))},Z.prototype.imul=function(l,m){return this._verify2(l,m),this.imod(l.imul(m))},Z.prototype.mul=function(l,m){return this._verify2(l,m),this.imod(l.mul(m))},Z.prototype.isqr=function(l){return this.imul(l,l.clone())},Z.prototype.sqr=function(l){return this.mul(l,l)},Z.prototype.sqrt=function(l){if(l.isZero())return l.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(l,y)}for(var b=this.m.subn(1),x=0;!b.isZero()&&b.andln(1)===0;)x++,b.iushrn(1);r(!b.isZero());var _=new n(1).toRed(this),k=_.redNeg(),w=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new n(2*p*p).toRed(this);this.pow(p,w).cmp(k)!==0;)p.redIAdd(k);for(var A=this.pow(p,b),G=this.pow(l,b.addn(1).iushrn(1)),J=this.pow(l,b),Q=x;J.cmp(_)!==0;){for(var ae=J,he=0;ae.cmp(_)!==0;he++)ae=ae.redSqr();r(he<Q);var ye=this.pow(A,new n(1).iushln(Q-he-1));G=G.redMul(ye),A=ye.redSqr(),J=J.redMul(A),Q=he;}return G},Z.prototype.invm=function(l){var m=l._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},Z.prototype.pow=function(l,m){if(m.isZero())return new n(1).toRed(this);if(m.cmpn(1)===0)return l.clone();var y=4,b=new Array(1<<y);b[0]=new n(1).toRed(this),b[1]=l;for(var x=2;x<b.length;x++)b[x]=this.mul(b[x-1],l);var _=b[0],k=0,w=0,p=m.bitLength()%26;for(p===0&&(p=26),x=m.length-1;x>=0;x--){for(var A=m.words[x],G=p-1;G>=0;G--){var J=A>>G&1;if(_!==b[0]&&(_=this.sqr(_)),J===0&&k===0){w=0;continue}k<<=1,k|=J,w++,!(w!==y&&(x!==0||G!==0))&&(_=this.mul(_,b[k]),w=0,k=0);}p=26;}return _},Z.prototype.convertTo=function(l){var m=l.umod(this.m);return m===l?m.clone():m},Z.prototype.convertFrom=function(l){var m=l.clone();return m.red=null,m},n.mont=function(l){return new re(l)};function re(S){Z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}o(re,Z),re.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},re.prototype.convertFrom=function(l){var m=this.imod(l.mul(this.rinv));return m.red=null,m},re.prototype.imul=function(l,m){if(l.isZero()||m.isZero())return l.words[0]=0,l.length=1,l;var y=l.imul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.mul=function(l,m){if(l.isZero()||m.isZero())return new n(0)._forceRed(this);var y=l.mul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.invm=function(l){var m=this.imod(l._invmp(this.m).mul(this.r2));return m._forceRed(this)};})(typeof Kw>"u"||Kw,BA);});var LA=Kr((Yw,zA)=>{var dh=Rl(),Oo=dh.Buffer;function CA(e,t){for(var r in e)t[r]=e[r];}Oo.from&&Oo.alloc&&Oo.allocUnsafe&&Oo.allocUnsafeSlow?zA.exports=dh:(CA(dh,Yw),Yw.Buffer=Sa);function Sa(e,t,r){return Oo(e,t,r)}Sa.prototype=Object.create(Oo.prototype);CA(Oo,Sa);Sa.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Oo(e,t,r)};Sa.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=Oo(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o};Sa.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Oo(e)};Sa.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return dh.SlowBuffer(e)};});var MA=Kr((MY,UA)=>{var ph=LA().Buffer;function g9(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var n=e.charAt(o),i=n.charCodeAt(0);if(t[i]!==255)throw new TypeError(n+" is ambiguous");t[i]=o;}var s=e.length,a=e.charAt(0),c=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function f(h){if((Array.isArray(h)||h instanceof Uint8Array)&&(h=ph.from(h)),!ph.isBuffer(h))throw new TypeError("Expected Buffer");if(h.length===0)return "";for(var v=0,E=0,R=0,$=h.length;R!==$&&h[R]===0;)R++,v++;for(var N=($-R)*u+1>>>0,O=new Uint8Array(N);R!==$;){for(var I=h[R],P=0,L=N-1;(I!==0||P<E)&&L!==-1;L--,P++)I+=256*O[L]>>>0,O[L]=I%s>>>0,I=I/s>>>0;if(I!==0)throw new Error("Non-zero carry");E=P,R++;}for(var C=N-E;C!==N&&O[C]===0;)C++;for(var D=a.repeat(v);C<N;++C)D+=e.charAt(O[C]);return D}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return ph.alloc(0);for(var v=0,E=0,R=0;h[v]===a;)E++,v++;for(var $=(h.length-v)*c+1>>>0,N=new Uint8Array($);v<h.length;){var O=h.charCodeAt(v);if(O>255)return;var I=t[O];if(I===255)return;for(var P=0,L=$-1;(I!==0||P<R)&&L!==-1;L--,P++)I+=s*N[L]>>>0,N[L]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");R=P,v++;}for(var C=$-R;C!==$&&N[C]===0;)C++;var D=ph.allocUnsafe(E+($-C));D.fill(0,0,E);for(var q=E;C!==$;)D[q++]=N[C++];return D}function g(h){var v=d(h);if(v)return v;throw new Error("Non-base"+s+" character")}return {encode:f,decodeUnsafe:d,decode:g}}UA.exports=g9;});var Xw=Kr((DY,DA)=>{var y9=MA(),b9="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";DA.exports=y9(b9);});var jA=Kr(t_=>{function pi(e,t,r){return t<=e&&e<=r}function bh(e){if(e===void 0)return {};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function x9(e){for(var t=String(e),r=t.length,o=0,n=[];o<r;){var i=t.charCodeAt(o);if(i<55296||i>57343)n.push(i);else if(56320<=i&&i<=57343)n.push(65533);else if(55296<=i&&i<=56319)if(o===r-1)n.push(65533);else {var s=e.charCodeAt(o+1);if(56320<=s&&s<=57343){var a=i&1023,c=s&1023;n.push(65536+(a<<10)+c),o+=1;}else n.push(65533);}o+=1;}return n}function v9(e){for(var t="",r=0;r<e.length;++r){var o=e[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode((o>>10)+55296,(o&1023)+56320));}return t}var mh=-1;function e_(e){this.tokens=[].slice.call(e);}e_.prototype={endOfStream:function(){return !this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():mh},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e);},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e);}};var jc=-1;function Qw(e,t){if(e)throw TypeError("Decoder error");return t||65533}var hh="utf-8";function gh(e,t){if(!(this instanceof gh))return new gh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._BOMseen=false,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM});}gh.prototype={decode:function(t,r){var o;typeof t=="object"&&t instanceof ArrayBuffer?o=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):o=new Uint8Array(0),r=bh(r),this._streaming||(this._decoder=new w9({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new e_(o),i=[],s;!n.endOfStream()&&(s=this._decoder.handler(n,n.read()),s!==jc);)s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));if(!this._streaming){do{if(s=this._decoder.handler(n,n.read()),s===jc)break;s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));}while(!n.endOfStream());this._decoder=null;}return i.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(i[0]===65279?(this._BOMseen=true,i.shift()):this._BOMseen=true),v9(i)}};function yh(e,t){if(!(this instanceof yh))return new yh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"});}yh.prototype={encode:function(t,r){t=t?String(t):"",r=bh(r),this._streaming||(this._encoder=new _9(this._options)),this._streaming=!!r.stream;for(var o=[],n=new e_(x9(t)),i;!n.endOfStream()&&(i=this._encoder.handler(n,n.read()),i!==jc);)Array.isArray(i)?o.push.apply(o,i):o.push(i);if(!this._streaming){for(;i=this._encoder.handler(n,n.read()),i!==jc;)Array.isArray(i)?o.push.apply(o,i):o.push(i);this._encoder=null;}return new Uint8Array(o)}};function w9(e){var t=e.fatal,r=0,o=0,n=0,i=128,s=191;this.handler=function(a,c){if(c===mh&&n!==0)return n=0,Qw(t);if(c===mh)return jc;if(n===0){if(pi(c,0,127))return c;if(pi(c,194,223))n=1,r=c-192;else if(pi(c,224,239))c===224&&(i=160),c===237&&(s=159),n=2,r=c-224;else if(pi(c,240,244))c===240&&(i=144),c===244&&(s=143),n=3,r=c-240;else return Qw(t);return r=r<<6*n,null}if(!pi(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),Qw(t);if(i=128,s=191,o+=1,r+=c-128<<6*(n-o),o!==n)return null;var u=r;return r=n=o=0,u};}function _9(e){e.fatal;this.handler=function(r,o){if(o===mh)return jc;if(pi(o,0,127))return o;var n,i;pi(o,128,2047)?(n=1,i=192):pi(o,2048,65535)?(n=2,i=224):pi(o,65536,1114111)&&(n=3,i=240);for(var s=[(o>>6*n)+i];n>0;){var a=o>>6*(n-1);s.push(128|a&63),n-=1;}return s};}t_.TextEncoder=yh;t_.TextDecoder=gh;});var GA=Kr(Je=>{var E9=Je&&Je.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}});}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r];})),S9=Je&&Je.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;}),No=Je&&Je.__decorate||function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},I9=Je&&Je.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&E9(t,e,r);return S9(t,e),t},FA=Je&&Je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Je,"__esModule",{value:true});Je.deserializeUnchecked=Je.deserialize=Je.serialize=Je.BinaryReader=Je.BinaryWriter=Je.BorshError=Je.baseDecode=Je.baseEncode=void 0;var os=FA(Jw()),HA=FA(Xw()),A9=I9(jA()),k9=typeof TextDecoder!="function"?A9.TextDecoder:TextDecoder,R9=new k9("utf-8",{fatal:true});function T9(e){return typeof e=="string"&&(e=Buffer.from(e,"utf8")),HA.default.encode(Buffer.from(e))}Je.baseEncode=T9;function $9(e){return Buffer.from(HA.default.decode(e))}Je.baseDecode=$9;var r_=1024,gr=class extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t;}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".");}};Je.BorshError=gr;var xh=class{constructor(){this.buf=Buffer.alloc(r_),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(r_)]));}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1;}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2;}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4;}writeU64(t){this.maybeResize(),this.writeBuffer(Buffer.from(new os.default(t).toArray("le",8)));}writeU128(t){this.maybeResize(),this.writeBuffer(Buffer.from(new os.default(t).toArray("le",16)));}writeU256(t){this.maybeResize(),this.writeBuffer(Buffer.from(new os.default(t).toArray("le",32)));}writeU512(t){this.maybeResize(),this.writeBuffer(Buffer.from(new os.default(t).toArray("le",64)));}writeBuffer(t){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),t,Buffer.alloc(r_)]),this.length+=t.length;}writeString(t){this.maybeResize();let r=Buffer.from(t,"utf8");this.writeU32(r.length),this.writeBuffer(r);}writeFixedArray(t){this.writeBuffer(Buffer.from(t));}writeArray(t,r){this.maybeResize(),this.writeU32(t.length);for(let o of t)this.maybeResize(),r(o);}toArray(){return this.buf.subarray(0,this.length)}};Je.BinaryWriter=xh;function Po(e,t,r){let o=r.value;r.value=function(...n){try{return o.apply(this,n)}catch(i){if(i instanceof RangeError){let s=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(s)>=0)throw new gr("Reached the end of buffer when deserializing")}throw i}};}var Hr=class{constructor(t){this.buf=t,this.offset=0;}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new os.default(t,"le")}readU128(){let t=this.readBuffer(16);return new os.default(t,"le")}readU256(){let t=this.readBuffer(32);return new os.default(t,"le")}readU512(){let t=this.readBuffer(64);return new os.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new gr(`Expected buffer length ${t} isn't within bounds`);let r=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,r}readString(){let t=this.readU32(),r=this.readBuffer(t);try{return R9.decode(r)}catch(o){throw new gr(`Error decoding UTF-8 string: ${o}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let r=this.readU32(),o=Array();for(let n=0;n<r;++n)o.push(t());return o}};No([Po],Hr.prototype,"readU8",null);No([Po],Hr.prototype,"readU16",null);No([Po],Hr.prototype,"readU32",null);No([Po],Hr.prototype,"readU64",null);No([Po],Hr.prototype,"readU128",null);No([Po],Hr.prototype,"readU256",null);No([Po],Hr.prototype,"readU512",null);No([Po],Hr.prototype,"readString",null);No([Po],Hr.prototype,"readFixedArray",null);No([Po],Hr.prototype,"readArray",null);Je.BinaryReader=Hr;function VA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ia(e,t,r,o,n){try{if(typeof o=="string")n[`write${VA(o)}`](r);else if(o instanceof Array)if(typeof o[0]=="number"){if(r.length!==o[0])throw new gr(`Expecting byte array of length ${o[0]}, but got ${r.length} bytes`);n.writeFixedArray(r);}else if(o.length===2&&typeof o[1]=="number"){if(r.length!==o[1])throw new gr(`Expecting byte array of length ${o[1]}, but got ${r.length} bytes`);for(let i=0;i<o[1];i++)Ia(e,null,r[i],o[0],n);}else n.writeArray(r,i=>{Ia(e,t,i,o[0],n);});else if(o.kind!==void 0)switch(o.kind){case "option":{r==null?n.writeU8(0):(n.writeU8(1),Ia(e,t,r,o.type,n));break}case "map":{n.writeU32(r.size),r.forEach((i,s)=>{Ia(e,t,s,o.key,n),Ia(e,t,i,o.value,n);});break}default:throw new gr(`FieldType ${o} unrecognized`)}else ZA(e,r,n);}catch(i){throw i instanceof gr&&i.addToFieldPath(t),i}}function ZA(e,t,r){if(typeof t.borshSerialize=="function"){t.borshSerialize(r);return}let o=e.get(t.constructor);if(!o)throw new gr(`Class ${t.constructor.name} is missing in schema`);if(o.kind==="struct")o.fields.map(([n,i])=>{Ia(e,n,t[n],i,r);});else if(o.kind==="enum"){let n=t[o.field];for(let i=0;i<o.values.length;++i){let[s,a]=o.values[i];if(s===n){r.writeU8(i),Ia(e,s,t[s],a,r);break}}}else throw new gr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function O9(e,t,r=xh){let o=new r;return ZA(e,t,o),o.toArray()}Je.serialize=O9;function Aa(e,t,r,o){try{if(typeof r=="string")return o[`read${VA(r)}`]();if(r instanceof Array){if(typeof r[0]=="number")return o.readFixedArray(r[0]);if(typeof r[1]=="number"){let n=[];for(let i=0;i<r[1];i++)n.push(Aa(e,null,r[0],o));return n}else return o.readArray(()=>Aa(e,t,r[0],o))}if(r.kind==="option")return o.readU8()?Aa(e,t,r.type,o):void 0;if(r.kind==="map"){let n=new Map,i=o.readU32();for(let s=0;s<i;s++){let a=Aa(e,t,r.key,o),c=Aa(e,t,r.value,o);n.set(a,c);}return n}return n_(e,r,o)}catch(n){throw n instanceof gr&&n.addToFieldPath(t),n}}function n_(e,t,r){if(typeof t.borshDeserialize=="function")return t.borshDeserialize(r);let o=e.get(t);if(!o)throw new gr(`Class ${t.name} is missing in schema`);if(o.kind==="struct"){let n={};for(let[i,s]of e.get(t).fields)n[i]=Aa(e,i,s,r);return new t(n)}if(o.kind==="enum"){let n=r.readU8();if(n>=o.values.length)throw new gr(`Enum index: ${n} is out of range`);let[i,s]=o.values[n],a=Aa(e,i,s,r);return new t({[i]:a})}throw new gr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function N9(e,t,r,o=Hr){let n=new o(r),i=n_(e,t,n);if(n.offset<r.length)throw new gr(`Unexpected ${r.length-n.offset} bytes after deserialized data`);return i}Je.deserialize=N9;function P9(e,t,r,o=Hr){let n=new o(r);return n_(e,t,n)}Je.deserializeUnchecked=P9;});var a_=Kr(M=>{Object.defineProperty(M,"__esModule",{value:true});M.s16=M.s8=M.nu64be=M.u48be=M.u40be=M.u32be=M.u24be=M.u16be=M.nu64=M.u48=M.u40=M.u32=M.u24=M.u16=M.u8=M.offset=M.greedy=M.Constant=M.UTF8=M.CString=M.Blob=M.Boolean=M.BitField=M.BitStructure=M.VariantLayout=M.Union=M.UnionLayoutDiscriminator=M.UnionDiscriminator=M.Structure=M.Sequence=M.DoubleBE=M.Double=M.FloatBE=M.Float=M.NearInt64BE=M.NearInt64=M.NearUInt64BE=M.NearUInt64=M.IntBE=M.Int=M.UIntBE=M.UInt=M.OffsetLayout=M.GreedyCount=M.ExternalLayout=M.bindConstructorLayout=M.nameWithProperty=M.Layout=M.uint8ArrayToBuffer=M.checkUint8Array=void 0;M.constant=M.utf8=M.cstr=M.blob=M.unionLayoutDiscriminator=M.union=M.seq=M.bits=M.struct=M.f64be=M.f64=M.f32be=M.f32=M.ns64be=M.s48be=M.s40be=M.s32be=M.s24be=M.s16be=M.ns64=M.s48=M.s40=M.s32=M.s24=void 0;var i_=Rl();function Vc(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}M.checkUint8Array=Vc;function Fe(e){return Vc(e),i_.Buffer.from(e.buffer,e.byteOffset,e.length)}M.uint8ArrayToBuffer=Fe;var Ze=class{constructor(t,r){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r;}makeDestinationObject(){return {}}getSpan(t,r){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){let r=Object.create(this.constructor.prototype);return Object.assign(r,this),r.property=t,r}fromArray(t){}};M.Layout=Ze;function s_(e,t){return t.property?e+"["+t.property+"]":e}M.nameWithProperty=s_;function B9(e,t){if(typeof e!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof Ze))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=(()=>new e),Object.defineProperty(e.prototype,"encode",{value(r,o){return t.encode(this,r,o)},writable:true}),Object.defineProperty(e,"decode",{value(r,o){return t.decode(r,o)},writable:true});}M.bindConstructorLayout=B9;var Ir=class extends Ze{isCount(){throw new Error("ExternalLayout is abstract")}};M.ExternalLayout=Ir;var vh=class extends Ir{constructor(t=1,r){if(!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,r),this.elementSpan=t;}isCount(){return true}decode(t,r=0){Vc(t);let o=t.length-r;return Math.floor(o/this.elementSpan)}encode(t,r,o){return 0}};M.GreedyCount=vh;var Ul=class extends Ir{constructor(t,r=0,o){if(!(t instanceof Ze))throw new TypeError("layout must be a Layout");if(!Number.isInteger(r))throw new TypeError("offset must be integer or undefined");super(t.span,o||t.property),this.layout=t,this.offset=r;}isCount(){return this.layout instanceof nn||this.layout instanceof bn}decode(t,r=0){return this.layout.decode(t,r+this.offset)}encode(t,r,o=0){return this.layout.encode(t,r,o+this.offset)}};M.OffsetLayout=Ul;var nn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntLE(t,o,this.span),this.span}};M.UInt=nn;var bn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntBE(t,o,this.span),this.span}};M.UIntBE=bn;var mi=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntLE(t,o,this.span),this.span}};M.Int=mi;var is=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntBE(t,o,this.span),this.span}};M.IntBE=is;var o_=Math.pow(2,32);function Lh(e){let t=Math.floor(e/o_),r=e-t*o_;return {hi32:t,lo32:r}}function Uh(e,t){return e*o_+t}var wh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readUInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeUInt32LE(n.hi32,o+4),8}};M.NearUInt64=wh;var _h=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearUInt64BE=_h;var Eh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeInt32LE(n.hi32,o+4),8}};M.NearInt64=Eh;var Sh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearInt64BE=Sh;var Ih=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatLE(r)}encode(t,r,o=0){return Fe(r).writeFloatLE(t,o),4}};M.Float=Ih;var Ah=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatBE(r)}encode(t,r,o=0){return Fe(r).writeFloatBE(t,o),4}};M.FloatBE=Ah;var kh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleLE(r)}encode(t,r,o=0){return Fe(r).writeDoubleLE(t,o),8}};M.Double=kh;var Rh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleBE(r)}encode(t,r,o=0){return Fe(r).writeDoubleBE(t,o),8}};M.DoubleBE=Rh;var Th=class extends Ze{constructor(t,r,o){if(!(t instanceof Ze))throw new TypeError("elementLayout must be a Layout");if(!(r instanceof Ir&&r.isCount()||Number.isInteger(r)&&0<=r))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(r instanceof Ir)&&0<t.span&&(n=r*t.span),super(n,o),this.elementLayout=t,this.count=r;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0,n=this.count;if(n instanceof Ir&&(n=n.decode(t,r)),0<this.elementLayout.span)o=n*this.elementLayout.span;else {let i=0;for(;i<n;)o+=this.elementLayout.getSpan(t,r+o),++i;}return o}decode(t,r=0){let o=[],n=0,i=this.count;for(i instanceof Ir&&(i=i.decode(t,r));n<i;)o.push(this.elementLayout.decode(t,r)),r+=this.elementLayout.getSpan(t,r),n+=1;return o}encode(t,r,o=0){let n=this.elementLayout,i=t.reduce((s,a)=>s+n.encode(a,r,o+s),0);return this.count instanceof Ir&&this.count.encode(t.length,r,o),i}};M.Sequence=Th;var $h=class extends Ze{constructor(t,r,o){if(!(Array.isArray(t)&&t.reduce((i,s)=>i&&s instanceof Ze,true)))throw new TypeError("fields must be array of Layout instances");typeof r=="boolean"&&o===void 0&&(o=r,r=void 0);for(let i of t)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((i,s)=>i+s.getSpan(),0);}catch{}super(n,r),this.fields=t,this.decodePrefixes=!!o;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;try{o=this.fields.reduce((n,i)=>{let s=i.getSpan(t,r);return r+=s,n+s},0);}catch{throw new RangeError("indeterminate span")}return o}decode(t,r=0){Vc(t);let o=this.makeDestinationObject();for(let n of this.fields)if(n.property!==void 0&&(o[n.property]=n.decode(t,r)),r+=n.getSpan(t,r),this.decodePrefixes&&t.length===r)break;return o}encode(t,r,o=0){let n=o,i=0,s=0;for(let a of this.fields){let c=a.span;if(s=0<c?c:0,a.property!==void 0){let u=t[a.property];u!==void 0&&(s=a.encode(u,r,o),0>c&&(c=a.getSpan(r,o)));}i=o,o+=c;}return i+s-n}fromArray(t){let r=this.makeDestinationObject();for(let o of this.fields)o.property!==void 0&&0<t.length&&(r[o.property]=t.shift());return r}layoutFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}offsetOf(t){if(typeof t!="string")throw new TypeError("property must be string");let r=0;for(let o of this.fields){if(o.property===t)return r;0>o.span?r=-1:0<=r&&(r+=o.span);}}};M.Structure=$h;var Ml=class{constructor(t){this.property=t;}decode(t,r){throw new Error("UnionDiscriminator is abstract")}encode(t,r,o){throw new Error("UnionDiscriminator is abstract")}};M.UnionDiscriminator=Ml;var Hc=class extends Ml{constructor(t,r){if(!(t instanceof Ir&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(r||t.property||"variant"),this.layout=t;}decode(t,r){return this.layout.decode(t,r)}encode(t,r,o){return this.layout.encode(t,r,o)}};M.UnionLayoutDiscriminator=Hc;var Dl=class extends Ze{constructor(t,r,o){let n;if(t instanceof nn||t instanceof bn)n=new Hc(new Ul(t));else if(t instanceof Ir&&t.isCount())n=new Hc(t);else if(t instanceof Ml)n=t;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(r===void 0&&(r=null),!(r===null||r instanceof Ze))throw new TypeError("defaultLayout must be null or a Layout");if(r!==null){if(0>r.span)throw new Error("defaultLayout must have constant span");r.property===void 0&&(r=r.replicate("content"));}let i=-1;r&&(i=r.span,0<=i&&(t instanceof nn||t instanceof bn)&&(i+=n.layout.span)),super(i,o),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof nn||t instanceof bn,this.defaultLayout=r,this.registry={};let s=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return s(a)},this.configGetSourceVariant=function(a){s=a.bind(this);};}getSpan(t,r=0){if(0<=this.span)return this.span;let o=this.getVariant(t,r);if(!o)throw new Error("unable to determine span for unrecognized variant");return o.getSpan(t,r)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let r=this.registry[t[this.discriminator.property]];if(r&&(!r.layout||r.property&&Object.prototype.hasOwnProperty.call(t,r.property)))return r}else for(let r in this.registry){let o=this.registry[r];if(o.property&&Object.prototype.hasOwnProperty.call(t,o.property))return o}throw new Error("unable to infer src variant")}decode(t,r=0){let o,n=this.discriminator,i=n.decode(t,r),s=this.registry[i];if(s===void 0){let a=this.defaultLayout,c=0;this.usesPrefixDiscriminator&&(c=n.layout.span),o=this.makeDestinationObject(),o[n.property]=i,o[a.property]=a.decode(t,r+c);}else o=s.decode(t,r);return o}encode(t,r,o=0){let n=this.getSourceVariant(t);if(n===void 0){let i=this.discriminator,s=this.defaultLayout,a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(t[i.property],r,o),a+s.encode(t[s.property],r,o+a)}return n.encode(t,r,o)}addVariant(t,r,o){let n=new Oh(this,t,r,o);return this.registry[t]=n,n}getVariant(t,r=0){let o;return t instanceof Uint8Array?o=this.discriminator.decode(t,r):o=t,this.registry[o]}};M.Union=Dl;var Oh=class extends Ze{constructor(t,r,o,n){if(!(t instanceof Dl))throw new TypeError("union must be a Union");if(!Number.isInteger(r)||0>r)throw new TypeError("variant must be a (non-negative) integer");if(typeof o=="string"&&n===void 0&&(n=o,o=null),o){if(!(o instanceof Ze))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=o.span&&o.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof n!="string")throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=o?o.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=r,this.layout=o||null;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,r+o)),o+n}decode(t,r=0){let o=this.makeDestinationObject();if(this!==this.union.getVariant(t,r))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?o[this.property]=this.layout.decode(t,r+n):this.property?o[this.property]=true:this.union.usesPrefixDiscriminator&&(o[this.union.discriminator.property]=this.variant),o}encode(t,r,o=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,r,o);let i=n;if(this.layout&&(this.layout.encode(t[this.property],r,o+n),i+=this.layout.getSpan(r,o+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};M.VariantLayout=Oh;function Fc(e){return 0>e&&(e+=4294967296),e}var jl=class extends Ze{constructor(t,r,o){if(!(t instanceof nn||t instanceof bn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof r=="string"&&o===void 0&&(o=r,r=false),4<t.span)throw new RangeError("word cannot exceed 32 bits");super(t.span,o),this.word=t,this.msb=!!r,this.fields=[];let n=0;this._packedSetValue=function(i){return n=Fc(i),this},this._packedGetValue=function(){return n};}decode(t,r=0){let o=this.makeDestinationObject(),n=this.word.decode(t,r);this._packedSetValue(n);for(let i of this.fields)i.property!==void 0&&(o[i.property]=i.decode(t));return o}encode(t,r,o=0){let n=this.word.decode(r,o);this._packedSetValue(n);for(let i of this.fields)if(i.property!==void 0){let s=t[i.property];s!==void 0&&i.encode(s);}return this.word.encode(this._packedGetValue(),r,o)}addField(t,r){let o=new Fl(this,t,r);return this.fields.push(o),o}addBoolean(t){let r=new Nh(this,t);return this.fields.push(r),r}fieldFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}};M.BitStructure=jl;var Fl=class{constructor(t,r,o){if(!(t instanceof jl))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((s,a)=>s+a.bits,0);if(r+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=r,this.valueMask=(1<<r)-1,r===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-r),this.wordMask=Fc(this.valueMask<<this.start),this.property=o;}decode(t,r){let o=this.container._packedGetValue();return Fc(o&this.wordMask)>>>this.start}encode(t){if(typeof t!="number"||!Number.isInteger(t)||t!==Fc(t&this.valueMask))throw new TypeError(s_("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let r=this.container._packedGetValue(),o=Fc(t<<this.start);this.container._packedSetValue(Fc(r&~this.wordMask)|o);}};M.BitField=Fl;var Nh=class extends Fl{constructor(t,r){super(t,1,r);}decode(t,r){return !!super.decode(t,r)}encode(t){typeof t=="boolean"&&(t=+t),super.encode(t);}};M.Boolean=Nh;var Ph=class extends Ze{constructor(t,r){if(!(t instanceof Ir&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let o=-1;t instanceof Ir||(o=t),super(o,r),this.length=t;}getSpan(t,r){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),o}decode(t,r=0){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),Fe(t).slice(r,r+o)}encode(t,r,o){let n=this.length;if(this.length instanceof Ir&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(s_("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(o+n>r.length)throw new RangeError("encoding overruns Uint8Array");let i=Fe(t);return Fe(r).write(i.toString("hex"),o,n,"hex"),this.length instanceof Ir&&this.length.encode(n,r,o),n}};M.Blob=Ph;var Bh=class extends Ze{constructor(t){super(-1,t);}getSpan(t,r=0){Vc(t);let o=r;for(;o<t.length&&t[o]!==0;)o+=1;return 1+o-r}decode(t,r=0){let o=this.getSpan(t,r);return Fe(t).slice(r,r+o-1).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=i_.Buffer.from(t,"utf8"),i=n.length;if(o+i>r.length)throw new RangeError("encoding overruns Buffer");let s=Fe(r);return n.copy(s,o),s[o+i]=0,i+1}};M.CString=Bh;var Ch=class extends Ze{constructor(t,r){if(typeof t=="string"&&r===void 0&&(r=t,t=void 0),t===void 0)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,r),this.maxSpan=t;}getSpan(t,r=0){return Vc(t),t.length-r}decode(t,r=0){let o=this.getSpan(t,r);if(0<=this.maxSpan&&this.maxSpan<o)throw new RangeError("text length exceeds maxSpan");return Fe(t).slice(r,r+o).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=i_.Buffer.from(t,"utf8"),i=n.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(o+i>r.length)throw new RangeError("encoding overruns Buffer");return n.copy(Fe(r),o),i}};M.UTF8=Ch;var zh=class extends Ze{constructor(t,r){super(0,r),this.value=t;}decode(t,r){return this.value}encode(t,r,o){return 0}};M.Constant=zh;M.greedy=((e,t)=>new vh(e,t));M.offset=((e,t,r)=>new Ul(e,t,r));M.u8=(e=>new nn(1,e));M.u16=(e=>new nn(2,e));M.u24=(e=>new nn(3,e));M.u32=(e=>new nn(4,e));M.u40=(e=>new nn(5,e));M.u48=(e=>new nn(6,e));M.nu64=(e=>new wh(e));M.u16be=(e=>new bn(2,e));M.u24be=(e=>new bn(3,e));M.u32be=(e=>new bn(4,e));M.u40be=(e=>new bn(5,e));M.u48be=(e=>new bn(6,e));M.nu64be=(e=>new _h(e));M.s8=(e=>new mi(1,e));M.s16=(e=>new mi(2,e));M.s24=(e=>new mi(3,e));M.s32=(e=>new mi(4,e));M.s40=(e=>new mi(5,e));M.s48=(e=>new mi(6,e));M.ns64=(e=>new Eh(e));M.s16be=(e=>new is(2,e));M.s24be=(e=>new is(3,e));M.s32be=(e=>new is(4,e));M.s40be=(e=>new is(5,e));M.s48be=(e=>new is(6,e));M.ns64be=(e=>new Sh(e));M.f32=(e=>new Ih(e));M.f32be=(e=>new Ah(e));M.f64=(e=>new kh(e));M.f64be=(e=>new Rh(e));M.struct=((e,t,r)=>new $h(e,t,r));M.bits=((e,t,r)=>new jl(e,t,r));M.seq=((e,t,r)=>new Th(e,t,r));M.union=((e,t,r)=>new Dl(e,t,r));M.unionLayoutDiscriminator=((e,t)=>new Hc(e,t));M.blob=((e,t)=>new Ph(e,t));M.cstr=(e=>new Bh(e));M.utf8=((e,t)=>new Ch(e,t));M.constant=((e,t)=>new zh(e,t));});function Zl(){if(!Fh&&(Fh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Fh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fh(Wj)}var Fh,Wj,b_=F(()=>{Wj=new Uint8Array(16);});var lk,dk=F(()=>{lk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function Kj(e){return typeof e=="string"&&lk.test(e)}var as,Gl=F(()=>{dk();as=Kj;});function Jj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(yr[e[t+0]]+yr[e[t+1]]+yr[e[t+2]]+yr[e[t+3]]+"-"+yr[e[t+4]]+yr[e[t+5]]+"-"+yr[e[t+6]]+yr[e[t+7]]+"-"+yr[e[t+8]]+yr[e[t+9]]+"-"+yr[e[t+10]]+yr[e[t+11]]+yr[e[t+12]]+yr[e[t+13]]+yr[e[t+14]]+yr[e[t+15]]).toLowerCase();if(!as(r))throw TypeError("Stringified UUID is invalid");return r}var yr,Hh,cs,ql=F(()=>{Gl();yr=[];for(Hh=0;Hh<256;++Hh)yr.push((Hh+256).toString(16).substr(1));cs=Jj;});function Yj(e,t,r){var o=t&&r||0,n=t||new Array(16);e=e||{};var i=e.node||pk,s=e.clockseq!==void 0?e.clockseq:x_;if(i==null||s==null){var a=e.random||(e.rng||Zl)();i==null&&(i=pk=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=x_=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:w_+1,f=c-v_+(u-w_)/1e4;if(f<0&&e.clockseq===void 0&&(s=s+1&16383),(f<0||c>v_)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v_=c,w_=u,x_=s,c+=122192928e5;var d=((c&268435455)*1e4+u)%4294967296;n[o++]=d>>>24&255,n[o++]=d>>>16&255,n[o++]=d>>>8&255,n[o++]=d&255;var g=c/4294967296*1e4&268435455;n[o++]=g>>>8&255,n[o++]=g&255,n[o++]=g>>>24&15|16,n[o++]=g>>>16&255,n[o++]=s>>>8|128,n[o++]=s&255;for(var h=0;h<6;++h)n[o+h]=i[h];return t||cs(n)}var pk,x_,v_,w_,mk,hk=F(()=>{b_();ql();v_=0,w_=0;mk=Yj;});function Xj(e){if(!as(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var Vh,__=F(()=>{Gl();Vh=Xj;});function Qj(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function Zh(e,t,r){function o(n,i,s,a){if(typeof n=="string"&&(n=Qj(n)),typeof i=="string"&&(i=Vh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(i),c.set(n,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,s){a=a||0;for(var u=0;u<16;++u)s[a+u]=c[u];return s}return cs(c)}try{o.name=e;}catch{}return o.DNS=e7,o.URL=t7,o}var e7,t7,E_=F(()=>{ql();__();e7="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t7="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function r7(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r);}return n7(o7(i7(e),e.length*8))}function n7(e){for(var t=[],r=e.length*32,o="0123456789abcdef",n=0;n<r;n+=8){var i=e[n>>5]>>>n%32&255,s=parseInt(o.charAt(i>>>4&15)+o.charAt(i&15),16);t.push(s);}return t}function gk(e){return (e+64>>>9<<4)+14+1}function o7(e,t){e[t>>5]|=128<<t%32,e[gk(t)-1]=t;for(var r=1732584193,o=-271733879,n=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,c=o,u=n,f=i;r=kr(r,o,n,i,e[s],7,-680876936),i=kr(i,r,o,n,e[s+1],12,-389564586),n=kr(n,i,r,o,e[s+2],17,606105819),o=kr(o,n,i,r,e[s+3],22,-1044525330),r=kr(r,o,n,i,e[s+4],7,-176418897),i=kr(i,r,o,n,e[s+5],12,1200080426),n=kr(n,i,r,o,e[s+6],17,-1473231341),o=kr(o,n,i,r,e[s+7],22,-45705983),r=kr(r,o,n,i,e[s+8],7,1770035416),i=kr(i,r,o,n,e[s+9],12,-1958414417),n=kr(n,i,r,o,e[s+10],17,-42063),o=kr(o,n,i,r,e[s+11],22,-1990404162),r=kr(r,o,n,i,e[s+12],7,1804603682),i=kr(i,r,o,n,e[s+13],12,-40341101),n=kr(n,i,r,o,e[s+14],17,-1502002290),o=kr(o,n,i,r,e[s+15],22,1236535329),r=Rr(r,o,n,i,e[s+1],5,-165796510),i=Rr(i,r,o,n,e[s+6],9,-1069501632),n=Rr(n,i,r,o,e[s+11],14,643717713),o=Rr(o,n,i,r,e[s],20,-373897302),r=Rr(r,o,n,i,e[s+5],5,-701558691),i=Rr(i,r,o,n,e[s+10],9,38016083),n=Rr(n,i,r,o,e[s+15],14,-660478335),o=Rr(o,n,i,r,e[s+4],20,-405537848),r=Rr(r,o,n,i,e[s+9],5,568446438),i=Rr(i,r,o,n,e[s+14],9,-1019803690),n=Rr(n,i,r,o,e[s+3],14,-187363961),o=Rr(o,n,i,r,e[s+8],20,1163531501),r=Rr(r,o,n,i,e[s+13],5,-1444681467),i=Rr(i,r,o,n,e[s+2],9,-51403784),n=Rr(n,i,r,o,e[s+7],14,1735328473),o=Rr(o,n,i,r,e[s+12],20,-1926607734),r=Tr(r,o,n,i,e[s+5],4,-378558),i=Tr(i,r,o,n,e[s+8],11,-2022574463),n=Tr(n,i,r,o,e[s+11],16,1839030562),o=Tr(o,n,i,r,e[s+14],23,-35309556),r=Tr(r,o,n,i,e[s+1],4,-1530992060),i=Tr(i,r,o,n,e[s+4],11,1272893353),n=Tr(n,i,r,o,e[s+7],16,-155497632),o=Tr(o,n,i,r,e[s+10],23,-1094730640),r=Tr(r,o,n,i,e[s+13],4,681279174),i=Tr(i,r,o,n,e[s],11,-358537222),n=Tr(n,i,r,o,e[s+3],16,-722521979),o=Tr(o,n,i,r,e[s+6],23,76029189),r=Tr(r,o,n,i,e[s+9],4,-640364487),i=Tr(i,r,o,n,e[s+12],11,-421815835),n=Tr(n,i,r,o,e[s+15],16,530742520),o=Tr(o,n,i,r,e[s+2],23,-995338651),r=$r(r,o,n,i,e[s],6,-198630844),i=$r(i,r,o,n,e[s+7],10,1126891415),n=$r(n,i,r,o,e[s+14],15,-1416354905),o=$r(o,n,i,r,e[s+5],21,-57434055),r=$r(r,o,n,i,e[s+12],6,1700485571),i=$r(i,r,o,n,e[s+3],10,-1894986606),n=$r(n,i,r,o,e[s+10],15,-1051523),o=$r(o,n,i,r,e[s+1],21,-2054922799),r=$r(r,o,n,i,e[s+8],6,1873313359),i=$r(i,r,o,n,e[s+15],10,-30611744),n=$r(n,i,r,o,e[s+6],15,-1560198380),o=$r(o,n,i,r,e[s+13],21,1309151649),r=$r(r,o,n,i,e[s+4],6,-145523070),i=$r(i,r,o,n,e[s+11],10,-1120210379),n=$r(n,i,r,o,e[s+2],15,718787259),o=$r(o,n,i,r,e[s+9],21,-343485551),r=us(r,a),o=us(o,c),n=us(n,u),i=us(i,f);}return [r,o,n,i]}function i7(e){if(e.length===0)return [];for(var t=e.length*8,r=new Uint32Array(gk(t)),o=0;o<t;o+=8)r[o>>5]|=(e[o/8]&255)<<o%32;return r}function us(e,t){var r=(e&65535)+(t&65535),o=(e>>16)+(t>>16)+(r>>16);return o<<16|r&65535}function s7(e,t){return e<<t|e>>>32-t}function Gh(e,t,r,o,n,i){return us(s7(us(us(t,e),us(o,i)),n),r)}function kr(e,t,r,o,n,i,s){return Gh(t&r|~t&o,e,t,n,i,s)}function Rr(e,t,r,o,n,i,s){return Gh(t&o|r&~o,e,t,n,i,s)}function Tr(e,t,r,o,n,i,s){return Gh(t^r^o,e,t,n,i,s)}function $r(e,t,r,o,n,i,s){return Gh(r^(t|~o),e,t,n,i,s)}var yk,bk=F(()=>{yk=r7;});var a7,xk,vk=F(()=>{E_();bk();a7=Zh("v3",48,yk),xk=a7;});function c7(e,t,r){e=e||{};var o=e.random||(e.rng||Zl)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return cs(o)}var wk,_k=F(()=>{b_();ql();wk=c7;});function u7(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function S_(e,t){return e<<t|e>>>32-t}function f7(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=[];for(var n=0;n<o.length;++n)e.push(o.charCodeAt(n));}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),c=0;c<s;++c){for(var u=new Uint32Array(16),f=0;f<16;++f)u[f]=e[c*64+f*4]<<24|e[c*64+f*4+1]<<16|e[c*64+f*4+2]<<8|e[c*64+f*4+3];a[c]=u;}a[s-1][14]=(e.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<s;++d){for(var g=new Uint32Array(80),h=0;h<16;++h)g[h]=a[d][h];for(var v=16;v<80;++v)g[v]=S_(g[v-3]^g[v-8]^g[v-14]^g[v-16],1);for(var E=r[0],R=r[1],$=r[2],N=r[3],O=r[4],I=0;I<80;++I){var P=Math.floor(I/20),L=S_(E,5)+u7(P,R,$,N)+O+t[P]+g[I]>>>0;O=N,N=$,$=S_(R,30)>>>0,R=E,E=L;}r[0]=r[0]+E>>>0,r[1]=r[1]+R>>>0,r[2]=r[2]+$>>>0,r[3]=r[3]+N>>>0,r[4]=r[4]+O>>>0;}return [r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Ek,Sk=F(()=>{Ek=f7;});var l7,Ik,Ak=F(()=>{E_();Sk();l7=Zh("v5",80,Ek),Ik=l7;});var kk,Rk=F(()=>{kk="00000000-0000-0000-0000-000000000000";});function d7(e){if(!as(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Tk,$k=F(()=>{Gl();Tk=d7;});var I_={};Er(I_,{NIL:()=>kk,parse:()=>Vh,stringify:()=>cs,v1:()=>mk,v3:()=>xk,v4:()=>wk,v5:()=>Ik,validate:()=>as,version:()=>Tk});var A_=F(()=>{hk();vk();_k();Ak();Rk();$k();Gl();ql();__();});var Nk=Kr((DX,Ok)=>{var p7=(A_(),VE(I_)).v4,m7=function(e,t,r,o){if(typeof e!="string")throw new TypeError(e+" must be a string");o=o||{};let n=typeof o.version=="number"?o.version:2;if(n!==1&&n!==2)throw new TypeError(n+" must be 1 or 2");let i={method:e};if(n===2&&(i.jsonrpc="2.0"),t){if(typeof t!="object"&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");i.params=t;}if(typeof r>"u"){let s=typeof o.generator=="function"?o.generator:function(){return p7()};i.id=s(i,o);}else n===2&&r===null?o.notificationIdNull&&(i.id=null):i.id=r;return i};Ok.exports=m7;});var Bk=Kr((jX,Pk)=>{var h7=(A_(),VE(I_)).v4,g7=Nk(),Wl=function(e,t){if(!(this instanceof Wl))return new Wl(e,t);t||(t={}),this.options={reviver:typeof t.reviver<"u"?t.reviver:null,replacer:typeof t.replacer<"u"?t.replacer:null,generator:typeof t.generator<"u"?t.generator:function(){return h7()},version:typeof t.version<"u"?t.version:2,notificationIdNull:typeof t.notificationIdNull=="boolean"?t.notificationIdNull:false},this.callServer=e;};Pk.exports=Wl;Wl.prototype.request=function(e,t,r,o){let n=this,i=null,s=Array.isArray(e)&&typeof t=="function";if(this.options.version===1&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&typeof e=="object"&&typeof t=="function")o=t,i=e;else {typeof r=="function"&&(o=r,r=void 0);let u=typeof o=="function";try{i=g7(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull});}catch(f){if(u){o(f);return}throw f}if(!u)return i}let c;try{c=JSON.stringify(i,this.options.replacer);}catch(u){o(u);return}return this.callServer(c,function(u,f){n._parseResponse(u,f,o);}),i};Wl.prototype._parseResponse=function(e,t,r){if(e){r(e);return}if(!t){r();return}let o;try{o=JSON.parse(t,this.options.reviver);}catch(n){r(n);return}if(r.length===3)if(Array.isArray(o)){let n=function(s){return typeof s.error<"u"},i=function(s){return !n(s)};r(null,o.filter(n),o.filter(i));return}else {r(null,o.error,o.result);return}r(null,o);};});var zk=Kr((FX,k_)=>{var y7=Object.prototype.hasOwnProperty,Vr="~";function Kl(){}Object.create&&(Kl.prototype=Object.create(null),new Kl().__proto__||(Vr=false));function b7(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function Ck(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new b7(r,o||e,n),s=Vr?Vr+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function qh(e,t){--e._eventsCount===0?e._events=new Kl:delete e._events[t];}function Or(){this._events=new Kl,this._eventsCount=0;}Or.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)y7.call(r,o)&&t.push(Vr?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Or.prototype.listeners=function(t){var r=Vr?Vr+t:t,o=this._events[r];if(!o)return [];if(o.fn)return [o.fn];for(var n=0,i=o.length,s=new Array(i);n<i;n++)s[n]=o[n].fn;return s};Or.prototype.listenerCount=function(t){var r=Vr?Vr+t:t,o=this._events[r];return o?o.fn?1:o.length:0};Or.prototype.emit=function(t,r,o,n,i,s){var a=Vr?Vr+t:t;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,f,d;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,true),u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,r),true;case 3:return c.fn.call(c.context,r,o),true;case 4:return c.fn.call(c.context,r,o,n),true;case 5:return c.fn.call(c.context,r,o,n,i),true;case 6:return c.fn.call(c.context,r,o,n,i,s),true}for(d=1,f=new Array(u-1);d<u;d++)f[d-1]=arguments[d];c.fn.apply(c.context,f);}else {var g=c.length,h;for(d=0;d<g;d++)switch(c[d].once&&this.removeListener(t,c[d].fn,void 0,true),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,r);break;case 3:c[d].fn.call(c[d].context,r,o);break;case 4:c[d].fn.call(c[d].context,r,o,n);break;default:if(!f)for(h=1,f=new Array(u-1);h<u;h++)f[h-1]=arguments[h];c[d].fn.apply(c[d].context,f);}}return true};Or.prototype.on=function(t,r,o){return Ck(this,t,r,o,false)};Or.prototype.once=function(t,r,o){return Ck(this,t,r,o,true)};Or.prototype.removeListener=function(t,r,o,n){var i=Vr?Vr+t:t;if(!this._events[i])return this;if(!r)return qh(this,i),this;var s=this._events[i];if(s.fn)s.fn===r&&(!n||s.once)&&(!o||s.context===o)&&qh(this,i);else {for(var a=0,c=[],u=s.length;a<u;a++)(s[a].fn!==r||n&&!s[a].once||o&&s[a].context!==o)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:qh(this,i);}return this};Or.prototype.removeAllListeners=function(t){var r;return t?(r=Vr?Vr+t:t,this._events[r]&&qh(this,r)):(this._events=new Kl,this._eventsCount=0),this};Or.prototype.off=Or.prototype.removeListener;Or.prototype.addListener=Or.prototype.on;Or.prefixed=Vr;Or.EventEmitter=Or;typeof k_<"u"&&(k_.exports=Or);});function k7(e,t=24){let r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,c=(s+2)%10,u=r[c],f=r[c+1],d=Uk(u,f,1)^r[a],g=Mk(u,f,1)^r[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=g;}let n=e[2],i=e[3];for(let s=0;s<24;s++){let a=jk[s],c=Uk(n,i,a),u=Mk(n,i,a),f=Dk[s];n=e[f],i=e[f+1],e[f]=c,e[f+1]=u;}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10];}e[0]^=I7[o],e[1]^=A7[o];}Pn(r);}var v7,Yl,w7,_7,E7,S7,Dk,jk,Fk,Hk,I7,A7,Uk,Mk,R_,R7,Ta,Wh=F(()=>{Bw();ai();v7=BigInt(0),Yl=BigInt(1),w7=BigInt(2),_7=BigInt(7),E7=BigInt(256),S7=BigInt(113),Dk=[],jk=[],Fk=[];for(let e=0,t=Yl,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Dk.push(2*(5*o+r)),jk.push((e+1)*(e+2)/2%64);let n=v7;for(let i=0;i<7;i++)t=(t<<Yl^(t>>_7)*S7)%E7,t&w7&&(n^=Yl<<(Yl<<BigInt(i))-Yl);Fk.push(n);}Hk=oh(Fk,true),I7=Hk[0],A7=Hk[1],Uk=(e,t,r)=>r>32?JI(e,t,r):WI(e,t,r),Mk=(e,t,r)=>r>32?YI(e,t,r):KI(e,t,r);R_=class e extends Xi{constructor(t,r,o,n=false,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=false,this.destroyed=false,this.enableXOF=false,this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=i,da(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=FI(this.state);}clone(){return this._cloneInto()}keccak(){$w(this.state32),k7(this.state32,this.rounds),$w(this.state32),this.posOut=0,this.pos=0;}update(t){si(this),t=pa(t),Ao(t);let{blockLen:r,state:o}=this,n=t.length;for(let i=0;i<n;){let s=Math.min(r-this.pos,n-i);for(let a=0;a<s;a++)o[this.pos++]^=t[i++];this.pos===r&&this.keccak();}return this}finish(){if(this.finished)return;this.finished=true;let{state:t,suffix:r,pos:o,blockLen:n}=this;t[o]^=r,(r&128)!==0&&o===n-1&&this.keccak(),t[n-1]^=128,this.keccak();}writeInto(t){si(this,false),Ao(t),this.finish();let r=this.state,{blockLen:o}=this;for(let n=0,i=t.length;n<i;){this.posOut>=o&&this.keccak();let s=Math.min(o-this.posOut,i-n);t.set(r.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s;}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return da(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(th(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true,Pn(this.state);}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:i,enableXOF:s}=this;return t||(t=new e(r,o,n,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=o,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}},R7=(e,t,r)=>Tl(()=>new R_(t,e,r)),Ta=R7(1,136,256/8);});var Kh,T_,Vk=F(()=>{ai();Kh=class extends Xi{constructor(t,r){super(),this.finished=false,this.destroyed=false,jI(t);let o=pa(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(o.length>n?t.create().update(o).digest():o);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=t.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),Pn(i);}update(t){return si(this),this.iHash.update(t),this}digestInto(t){si(this),Ao(t,this.outputLen),this.finished=true,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy();}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:o,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return t=t,t.finished=n,t.destroyed=i,t.blockLen=s,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=true,this.oHash.destroy(),this.iHash.destroy();}},T_=(e,t,r)=>new Kh(e,t).update(r).digest();T_.create=(e,t)=>new Kh(e,t);});function Zk(e){e.lowS!==void 0&&Ro("lowS",e.lowS),e.prehash!==void 0&&Ro("prehash",e.prehash);}function T7(e){let t=Cl(e);no(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:o,a:n}=t;if(r){if(!o.eql(n,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}function $_(e,t){return rs(To(e,t))}function $7(e){let t=T7(e),{Fp:r}=t,o=di(t.n,t.nBitLength),n=t.toBytes||((O,I,P)=>{let L=I.toAffine();return ar(Uint8Array.from([4]),r.toBytes(L.x),r.toBytes(L.y))}),i=t.fromBytes||(O=>{let I=O.subarray(1),P=r.fromBytes(I.subarray(0,r.BYTES)),L=r.fromBytes(I.subarray(r.BYTES,2*r.BYTES));return {x:P,y:L}});function s(O){let{a:I,b:P}=t,L=r.sqr(O),C=r.mul(L,O);return r.add(r.add(C,r.mul(O,I)),P)}function a(O,I){let P=r.sqr(I),L=s(O);return r.eql(P,L)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let c=r.mul(r.pow(t.a,Xl),N_),u=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,u)))throw new Error("bad curve params: a or b");function f(O){return ba(O,Ye,t.n)}function d(O){let{allowedPrivateKeyLengths:I,nByteLength:P,wrapPrivateKey:L,n:C}=t;if(I&&typeof O!="bigint"){if(Uc(O)&&(O=rs(O)),typeof O!="string"||!I.includes(O.length))throw new Error("invalid private key");O=O.padStart(P*2,"0");}let D;try{D=typeof O=="bigint"?O:rn(Ge("private key",O,P));}catch{throw new Error("invalid private key, expected hex or "+P+" bytes, got "+typeof O)}return L&&(D=Ue(D,C)),Dr("private key",D,Ye,C),D}function g(O){if(!(O instanceof E))throw new Error("ProjectivePoint expected")}let h=Dc((O,I)=>{let{px:P,py:L,pz:C}=O;if(r.eql(C,r.ONE))return {x:P,y:L};let D=O.is0();I==null&&(I=D?r.ONE:r.inv(C));let q=r.mul(P,I),H=r.mul(L,I),Z=r.mul(C,I);if(D)return {x:r.ZERO,y:r.ZERO};if(!r.eql(Z,r.ONE))throw new Error("invZ was invalid");return {x:q,y:H}}),v=Dc(O=>{if(O.is0()){if(t.allowInfinityPoint&&!r.is0(O.py))return;throw new Error("bad point: ZERO")}let{x:I,y:P}=O.toAffine();if(!r.isValid(I)||!r.isValid(P))throw new Error("bad point: x or y not FE");if(!a(I,P))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return true});class E{constructor(I,P,L){if(I==null||!r.isValid(I))throw new Error("x required");if(P==null||!r.isValid(P)||r.is0(P))throw new Error("y required");if(L==null||!r.isValid(L))throw new Error("z required");this.px=I,this.py=P,this.pz=L,Object.freeze(this);}static fromAffine(I){let{x:P,y:L}=I||{};if(!I||!r.isValid(P)||!r.isValid(L))throw new Error("invalid affine point");if(I instanceof E)throw new Error("projective point not allowed");let C=D=>r.eql(D,r.ZERO);return C(P)&&C(L)?E.ZERO:new E(P,L,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){let P=li(r,I.map(L=>L.pz));return I.map((L,C)=>L.toAffine(P[C])).map(E.fromAffine)}static fromHex(I){let P=E.fromAffine(i(Ge("pointHex",I)));return P.assertValidity(),P}static fromPrivateKey(I){return E.BASE.multiply(d(I))}static msm(I,P){return lh(E,o,I,P)}_setWindowSize(I){N.setWindowSize(this,I);}assertValidity(){v(this);}hasEvenY(){let{y:I}=this.toAffine();if(r.isOdd)return !r.isOdd(I);throw new Error("Field doesn't support isOdd")}equals(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.eql(r.mul(P,H),r.mul(D,C)),re=r.eql(r.mul(L,H),r.mul(q,C));return Z&&re}negate(){return new E(this.px,r.neg(this.py),this.pz)}double(){let{a:I,b:P}=t,L=r.mul(P,Xl),{px:C,py:D,pz:q}=this,H=r.ZERO,Z=r.ZERO,re=r.ZERO,S=r.mul(C,C),l=r.mul(D,D),m=r.mul(q,q),y=r.mul(C,D);return y=r.add(y,y),re=r.mul(C,q),re=r.add(re,re),H=r.mul(I,re),Z=r.mul(L,m),Z=r.add(H,Z),H=r.sub(l,Z),Z=r.add(l,Z),Z=r.mul(H,Z),H=r.mul(y,H),re=r.mul(L,re),m=r.mul(I,m),y=r.sub(S,m),y=r.mul(I,y),y=r.add(y,re),re=r.add(S,S),S=r.add(re,S),S=r.add(S,m),S=r.mul(S,y),Z=r.add(Z,S),m=r.mul(D,q),m=r.add(m,m),S=r.mul(m,y),H=r.sub(H,S),re=r.mul(m,l),re=r.add(re,re),re=r.add(re,re),new E(H,Z,re)}add(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.ZERO,re=r.ZERO,S=r.ZERO,l=t.a,m=r.mul(t.b,Xl),y=r.mul(P,D),b=r.mul(L,q),x=r.mul(C,H),_=r.add(P,L),k=r.add(D,q);_=r.mul(_,k),k=r.add(y,b),_=r.sub(_,k),k=r.add(P,C);let w=r.add(D,H);return k=r.mul(k,w),w=r.add(y,x),k=r.sub(k,w),w=r.add(L,C),Z=r.add(q,H),w=r.mul(w,Z),Z=r.add(b,x),w=r.sub(w,Z),S=r.mul(l,k),Z=r.mul(m,x),S=r.add(Z,S),Z=r.sub(b,S),S=r.add(b,S),re=r.mul(Z,S),b=r.add(y,y),b=r.add(b,y),x=r.mul(l,x),k=r.mul(m,k),b=r.add(b,x),x=r.sub(y,x),x=r.mul(l,x),k=r.add(k,x),y=r.mul(b,k),re=r.add(re,y),y=r.mul(w,k),Z=r.mul(_,Z),Z=r.sub(Z,y),y=r.mul(_,b),S=r.mul(w,S),S=r.add(S,y),new E(Z,re,S)}subtract(I){return this.add(I.negate())}is0(){return this.equals(E.ZERO)}wNAF(I){return N.wNAFCached(this,I,E.normalizeZ)}multiplyUnsafe(I){let{endo:P,n:L}=t;Dr("scalar",I,so,L);let C=E.ZERO;if(I===so)return C;if(this.is0()||I===Ye)return this;if(!P||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,I,E.normalizeZ);let{k1neg:D,k1:q,k2neg:H,k2:Z}=P.splitScalar(I),re=C,S=C,l=this;for(;q>so||Z>so;)q&Ye&&(re=re.add(l)),Z&Ye&&(S=S.add(l)),l=l.double(),q>>=Ye,Z>>=Ye;return D&&(re=re.negate()),H&&(S=S.negate()),S=new E(r.mul(S.px,P.beta),S.py,S.pz),re.add(S)}multiply(I){let{endo:P,n:L}=t;Dr("scalar",I,Ye,L);let C,D;if(P){let{k1neg:q,k1:H,k2neg:Z,k2:re}=P.splitScalar(I),{p:S,f:l}=this.wNAF(H),{p:m,f:y}=this.wNAF(re);S=N.constTimeNegate(q,S),m=N.constTimeNegate(Z,m),m=new E(r.mul(m.px,P.beta),m.py,m.pz),C=S.add(m),D=l.add(y);}else {let{p:q,f:H}=this.wNAF(I);C=q,D=H;}return E.normalizeZ([C,D])[0]}multiplyAndAddUnsafe(I,P,L){let C=E.BASE,D=(H,Z)=>Z===so||Z===Ye||!H.equals(C)?H.multiplyUnsafe(Z):H.multiply(Z),q=D(this,P).add(D(I,L));return q.is0()?void 0:q}toAffine(I){return h(this,I)}isTorsionFree(){let{h:I,isTorsionFree:P}=t;if(I===Ye)return true;if(P)return P(E,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:I,clearCofactor:P}=t;return I===Ye?this:P?P(E,this):this.multiplyUnsafe(t.h)}toRawBytes(I=true){return Ro("isCompressed",I),this.assertValidity(),n(E,this,I)}toHex(I=true){return Ro("isCompressed",I),rs(this.toRawBytes(I))}}E.BASE=new E(t.Gx,t.Gy,r.ONE),E.ZERO=new E(r.ZERO,r.ONE,r.ZERO);let{endo:R,nBitLength:$}=t,N=fh(E,R?Math.ceil($/2):$);return {CURVE:t,ProjectivePoint:E,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:f}}function O7(e){let t=Cl(e);return no(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:true,...t})}function Gk(e){let t=O7(e),{Fp:r,n:o,nByteLength:n,nBitLength:i}=t,s=r.BYTES+1,a=2*r.BYTES+1;function c(m){return Ue(m,o)}function u(m){return ch(m,o)}let{ProjectivePoint:f,normPrivateKeyToScalar:d,weierstrassEquation:g,isWithinCurveOrder:h}=$7({...t,toBytes(m,y,b){let x=y.toAffine(),_=r.toBytes(x.x),k=ar;return Ro("isCompressed",b),b?k(Uint8Array.from([y.hasEvenY()?2:3]),_):k(Uint8Array.from([4]),_,r.toBytes(x.y))},fromBytes(m){let y=m.length,b=m[0],x=m.subarray(1);if(y===s&&(b===2||b===3)){let _=rn(x);if(!ba(_,Ye,r.ORDER))throw new Error("Point is not on curve");let k=g(_),w;try{w=r.sqrt(k);}catch(G){let J=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+J)}let p=(w&Ye)===Ye;return (b&1)===1!==p&&(w=r.neg(w)),{x:_,y:w}}else if(y===a&&b===4){let _=r.fromBytes(x.subarray(0,r.BYTES)),k=r.fromBytes(x.subarray(r.BYTES,2*r.BYTES));return {x:_,y:k}}else {let _=s,k=a;throw new Error("invalid Point, expected length of "+_+", or uncompressed "+k+", got "+y)}}});function v(m){let y=o>>Ye;return m>y}function E(m){return v(m)?c(-m):m}let R=(m,y,b)=>rn(m.slice(y,b));class ${constructor(y,b,x){Dr("r",y,Ye,o),Dr("s",b,Ye,o),this.r=y,this.s=b,x!=null&&(this.recovery=x),Object.freeze(this);}static fromCompact(y){let b=n;return y=Ge("compactSignature",y,b*2),new $(R(y,0,b),R(y,b,2*b))}static fromDER(y){let{r:b,s:x}=hi.toSig(Ge("DER",y));return new $(b,x)}assertValidity(){}addRecoveryBit(y){return new $(this.r,this.s,y)}recoverPublicKey(y){let{r:b,s:x,recovery:_}=this,k=C(Ge("msgHash",y));if(_==null||![0,1,2,3].includes(_))throw new Error("recovery id invalid");let w=_===2||_===3?b+t.n:b;if(w>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let p=(_&1)===0?"02":"03",A=f.fromHex(p+$_(w,r.BYTES)),G=u(w),J=c(-k*G),Q=c(x*G),ae=f.BASE.multiplyAndAddUnsafe(A,J,Q);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return v(this.s)}normalizeS(){return this.hasHighS()?new $(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Bl(this.toDERHex())}toDERHex(){return hi.hexFromSig(this)}toCompactRawBytes(){return Bl(this.toCompactHex())}toCompactHex(){let y=n;return $_(this.r,y)+$_(this.s,y)}}let N={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=jw(t.n);return xA(t.randomBytes(m),t.n)},precompute(m=8,y=f.BASE){return y._setWindowSize(m),y.multiply(BigInt(3)),y}};function O(m,y=true){return f.fromPrivateKey(m).toRawBytes(y)}function I(m){if(typeof m=="bigint")return false;if(m instanceof f)return true;let b=Ge("key",m).length,x=r.BYTES,_=x+1,k=2*x+1;if(!(t.allowedPrivateKeyLengths||n===_))return b===_||b===k}function P(m,y,b=true){if(I(m)===true)throw new Error("first arg must be private key");if(I(y)===false)throw new Error("second arg must be public key");return f.fromHex(y).multiply(d(m)).toRawBytes(b)}let L=t.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");let y=rn(m),b=m.length*8-i;return b>0?y>>BigInt(b):y},C=t.bits2int_modN||function(m){return c(L(m))},D=xa(i);function q(m){return Dr("num < 2^"+i,m,so,D),To(m,n)}function H(m,y,b=Z){if(["recovered","canonical"].some(ye=>ye in b))throw new Error("sign() legacy options not supported");let{hash:x,randomBytes:_}=t,{lowS:k,prehash:w,extraEntropy:p}=b;k==null&&(k=true),m=Ge("msgHash",m),Zk(b),w&&(m=Ge("prehashed msgHash",x(m)));let A=C(m),G=d(y),J=[q(G),q(A)];if(p!=null&&p!==false){let ye=p===true?_(r.BYTES):p;J.push(Ge("extraEntropy",ye));}let Q=ar(...J),ae=A;function he(ye){let Ke=L(ye);if(!h(Ke))return;let Se=u(Ke),_e=f.BASE.multiply(Ke).toAffine(),tr=c(_e.x);if(tr===so)return;let Ce=c(Se*c(ae+tr*G));if(Ce===so)return;let je=(_e.x===tr?0:2)|Number(_e.y&Ye),Mi=Ce;return k&&v(Ce)&&(Mi=E(Ce),je^=1),new $(tr,Mi,je)}return {seed:Q,k2sig:he}}let Z={lowS:t.lowS,prehash:false},re={lowS:t.lowS,prehash:false};function S(m,y,b=Z){let{seed:x,k2sig:_}=H(m,y,b),k=t;return lA(k.hash.outputLen,k.nByteLength,k.hmac)(x,_)}f.BASE._setWindowSize(8);function l(m,y,b,x=re){let _=m;y=Ge("msgHash",y),b=Ge("publicKey",b);let{lowS:k,prehash:w,format:p}=x;if(Zk(x),"strict"in x)throw new Error("options.strict was renamed to lowS");if(p!==void 0&&p!=="compact"&&p!=="der")throw new Error("format must be compact or der");let A=typeof _=="string"||Uc(_),G=!A&&!p&&typeof _=="object"&&_!==null&&typeof _.r=="bigint"&&typeof _.s=="bigint";if(!A&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let J,Q;try{if(G&&(J=new $(_.r,_.s)),A){try{p!=="compact"&&(J=$.fromDER(_));}catch(je){if(!(je instanceof hi.Err))throw je}!J&&p!=="der"&&(J=$.fromCompact(_));}Q=f.fromHex(b);}catch{return false}if(!J||k&&J.hasHighS())return false;w&&(y=t.hash(y));let{r:ae,s:he}=J,ye=C(y),Ke=u(he),Se=c(ye*Ke),_e=c(ae*Ke),tr=f.BASE.multiplyAndAddUnsafe(Q,Se,_e)?.toAffine();return tr?c(tr.x)===ae:false}return {CURVE:t,getPublicKey:O,getSharedSecret:P,sign:S,verify:l,ProjectivePoint:f,Signature:$,utils:N}}function N7(e,t){let r=e.ORDER,o=so;for(let v=r-Ye;v%fs===so;v/=fs)o+=Ye;let n=o,i=fs<<n-Ye-Ye,s=i*fs,a=(r-Ye)/s,c=(a-Ye)/fs,u=s-Ye,f=i,d=e.pow(t,a),g=e.pow(t,(a+Ye)/fs),h=(v,E)=>{let R=d,$=e.pow(E,u),N=e.sqr($);N=e.mul(N,E);let O=e.mul(v,N);O=e.pow(O,c),O=e.mul(O,$),$=e.mul(O,E),N=e.mul(O,v);let I=e.mul(N,$);O=e.pow(I,f);let P=e.eql(O,e.ONE);$=e.mul(N,g),O=e.mul(I,R),N=e.cmov($,N,P),I=e.cmov(O,I,P);for(let L=n;L>Ye;L--){let C=L-fs;C=fs<<C-Ye;let D=e.pow(I,C),q=e.eql(D,e.ONE);$=e.mul(N,R),R=e.mul(R,R),D=e.mul(I,R),N=e.cmov($,N,q),I=e.cmov(D,I,q);}return {isValid:P,value:N}};if(e.ORDER%N_===Xl){let v=(e.ORDER-Xl)/N_,E=e.sqrt(e.neg(t));h=(R,$)=>{let N=e.sqr($),O=e.mul(R,$);N=e.mul(N,O);let I=e.pow(N,v);I=e.mul(I,O);let P=e.mul(I,E),L=e.mul(e.sqr(I),$),C=e.eql(L,R),D=e.cmov(P,I,C);return {isValid:C,value:D}};}return h}function qk(e,t){if(uh(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=N7(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return o=>{let n,i,s,a,c,u,f,d;n=e.sqr(o),n=e.mul(n,t.Z),i=e.sqr(n),i=e.add(i,n),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),f=e.mul(n,s);let{isValid:g,value:h}=r(i,u);d=e.mul(n,o),d=e.mul(d,h),f=e.cmov(f,s,g),d=e.cmov(d,h,g);let v=e.isOdd(o)===e.isOdd(d);d=e.cmov(e.neg(d),d,v);let E=li(e,[a],true)[0];return f=e.mul(f,E),{x:f,y:d}}}var O_,hi,so,Ye,fs,Xl,N_,P_=F(()=>{qw();_a();va();O_=class extends Error{constructor(t=""){super(t);}},hi={Err:O_,_tlv:{encode:(e,t)=>{let{Err:r}=hi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let o=t.length/2,n=Pl(o);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let i=o>127?Pl(n.length/2|128):"";return Pl(e)+i+n+t},decode(e,t){let{Err:r}=hi,o=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[o++],i=!!(n&128),s=0;if(!i)s=n;else {let c=n&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(o,o+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let f of u)s=s<<8|f;if(o+=c,s<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(o,o+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return {v:a,l:t.subarray(o+s)}}},_int:{encode(e){let{Err:t}=hi;if(e<so)throw new t("integer: negative integers are not allowed");let r=Pl(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=hi;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return rn(e)}},toSig(e){let{Err:t,_int:r,_tlv:o}=hi,n=Ge("signature",e),{v:i,l:s}=o.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=o.decode(2,i),{v:u,l:f}=o.decode(2,c);if(f.length)throw new t("invalid signature: left bytes after parsing");return {r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=hi,o=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),i=o+n;return t.encode(48,i)}};so=BigInt(0),Ye=BigInt(1),fs=BigInt(2),Xl=BigInt(3),N_=BigInt(4);});function P7(e){return {hash:e,hmac:(t,...r)=>T_(e,t,Ow(...r)),randomBytes:Lc}}function Wk(e,t){let r=o=>Gk({...e,...P7(o)});return {...r(t),create:r}}var Kk=F(()=>{Vk();ai();P_();});var rR={};Er(rR,{encodeToCurve:()=>j7,hashToCurve:()=>D7,schnorr:()=>L7,secp256k1:()=>xn,secp256k1_hasher:()=>D_});function Xk(e){let t=td,r=BigInt(3),o=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,f=u*u*e%t,d=at(f,r,t)*f%t,g=at(d,r,t)*f%t,h=at(g,Yh,t)*u%t,v=at(h,n,t)*h%t,E=at(v,i,t)*v%t,R=at(E,a,t)*E%t,$=at(R,c,t)*R%t,N=at($,a,t)*E%t,O=at(N,r,t)*f%t,I=at(O,s,t)*v%t,P=at(I,o,t)*u%t,L=at(P,Yh,t);if(!ls.eql(ls.sqr(L),e))throw new Error("Cannot find square root");return L}function Xh(e,...t){let r=Yk[e];if(r===void 0){let o=ga(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ar(o,o),Yk[e]=r;}return ga(ar(r,...t))}function z_(e){let t=xn.utils.normPrivateKeyToScalar(e),r=M_.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:ed(-t),bytes:U_(r)}}function Qk(e){Dr("x",e,Ql,td);let t=B_(e*e),r=B_(t*e+BigInt(7)),o=Xk(r);o%Yh!==L_&&(o=B_(-o));let n=new M_(e,o,Ql);return n.assertValidity(),n}function eR(...e){return ed(Wc(Xh("BIP0340/challenge",...e)))}function C7(e){return z_(e).bytes}function z7(e,t,r=Lc(32)){let o=Ge("message",e),{bytes:n,scalar:i}=z_(t),s=Ge("auxRand",r,32),a=C_(i^Wc(Xh("BIP0340/aux",s))),c=Xh("BIP0340/nonce",a,n,o),u=ed(Wc(c));if(u===L_)throw new Error("sign failed: k is zero");let{bytes:f,scalar:d}=z_(u),g=eR(f,n,o),h=new Uint8Array(64);if(h.set(f,0),h.set(C_(ed(d+g*i)),32),!tR(h,o,n))throw new Error("sign: Invalid signature produced");return h}function tR(e,t,r){let o=Ge("signature",e,64),n=Ge("message",t),i=Ge("publicKey",r,32);try{let s=Qk(Wc(i)),a=Wc(o.subarray(0,32));if(!ba(a,Ql,td))return !1;let c=Wc(o.subarray(32,64));if(!ba(c,Ql,Jh))return !1;let u=eR(C_(a),U_(s),n),f=B7(s,c,ed(-u));return !(!f||!f.hasEvenY()||f.toAffine().x!==a)}catch{return false}}var td,Jh,L_,Ql,Yh,Jk,ls,xn,Yk,U_,C_,B_,ed,M_,B7,Wc,L7,U7,M7,D_,D7,j7,rd=F(()=>{sh();ai();Kk();TA();_a();va();P_();td=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Jh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),L_=BigInt(0),Ql=BigInt(1),Yh=BigInt(2),Jk=(e,t)=>(e+t/Yh)/t;ls=di(td,void 0,void 0,{sqrt:Xk}),xn=Wk({a:L_,b:BigInt(7),Fp:ls,n:Jh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Jh,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-Ql*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),a=Jk(i*e,t),c=Jk(-o*e,t),u=Ue(e-a*r-c*n,t),f=Ue(-a*o-c*i,t),d=u>s,g=f>s;if(d&&(u=t-u),g&&(f=t-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return {k1neg:d,k1:u,k2neg:g,k2:f}}}},ga),Yk={};U_=e=>e.toRawBytes(true).slice(1),C_=e=>To(e,32),B_=e=>Ue(e,td),ed=e=>Ue(e,Jh),M_=xn.ProjectivePoint,B7=(e,t,r)=>M_.BASE.multiplyAndAddUnsafe(e,t,r);Wc=rn;L7={getPublicKey:C7,sign:z7,verify:tR,utils:{randomPrivateKey:xn.utils.randomPrivateKey,lift_x:Qk,pointToBytes:U_,numberToBytesBE:To,bytesToNumberBE:rn,taggedHash:Xh,mod:Ue}},U7=kA(ls,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),M7=qk(ls,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:ls.create(BigInt("-11"))}),D_=RA(xn.ProjectivePoint,e=>{let{x:t,y:r}=M7(ls.create(e[0]));return U7(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:ls.ORDER,m:1,k:128,expand:"xmd",hash:ga}),D7=D_.hashToCurve,j7=D_.encodeToCurve;});var pT,mT=F(()=>{pT="1.2.3";});var _t,nu=F(()=>{mT();_t=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...o?[`Details: ${o}`]:[],`Version: abitype@${pT}`].join(`
3
- `);super(i),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t;}};});function En(e,t){return e.exec(t)?.groups}var N6,P6,w0,Sd=F(()=>{N6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,P6=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,w0=/^\(.+?\).*?$/;});function _0(e){let t=e.type;if(hT.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let n=0;n<r;n++){let i=e.components[n];t+=_0(i),n<r-1&&(t+=", ");}let o=En(hT,e.type);return t+=`)${o?.array||""}`,_0({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var hT,gT=F(()=>{Sd();hT=/^tuple(?<array>(\[(\d*)\])*)$/;});function bi(e){let t="",r=e.length;for(let o=0;o<r;o++){let n=e[o];t+=_0(n),o!==r-1&&(t+=", ");}return t}var B6=F(()=>{gT();});function Ca(e){return e.type==="function"?`function ${e.name}(${bi(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${bi(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${bi(e.inputs)})`:e.type==="error"?`error ${e.name}(${bi(e.inputs)})`:e.type==="constructor"?`constructor(${bi(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var yT=F(()=>{B6();});function xT(e){return bT.test(e)}function vT(e){return En(bT,e)}function _T(e){return wT.test(e)}function ET(e){return En(wT,e)}function IT(e){return ST.test(e)}function AT(e){return En(ST,e)}function ms(e){return kT.test(e)}function RT(e){return En(kT,e)}function $T(e){return TT.test(e)}function OT(e){return En(TT,e)}function PT(e){return NT.test(e)}function BT(e){return En(NT,e)}function CT(e){return mH.test(e)}var bT,wT,ST,kT,TT,NT,mH,C6,zT,E0,ou=F(()=>{Sd();bT=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;wT=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;ST=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;kT=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;TT=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;NT=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;mH=/^receive\(\) external payable$/;C6=new Set(["memory","indexed","storage","calldata"]),zT=new Set(["indexed"]),E0=new Set(["calldata","memory","storage"]);});var Id,Ad,S0,I0=F(()=>{nu();Id=class extends _t{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiItemError"});}},Ad=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownTypeError"});}},S0=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSolidityTypeError"});}};});var kd,Rd,Td,$d,Od,Nd,A0=F(()=>{nu();kd=class extends _t{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiParametersError"});}},Rd=class extends _t{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},Td=class extends _t{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SolidityProtectedKeywordError"});}},$d=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidModifierError"});}},Od=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${o}" was given.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidFunctionModifierError"});}},Nd=class extends _t{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiTypeParameterError"});}};});var uo,Pd,Bd,z6=F(()=>{nu();uo=class extends _t{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidSignatureError"});}},Pd=class extends _t{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},Bd=class extends _t{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidStructSignatureError"});}};});var Cd,LT=F(()=>{nu();Cd=class extends _t{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"CircularReferenceError"});}};});var zd,UT=F(()=>{nu();zd=class extends _t{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParenthesisError"});}};});function MT(e,t,r){let o="";if(r)for(let n of Object.entries(r)){if(!n)continue;let i="";for(let s of n[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;o+=`(${n[0]}{${i}})`;}return t?`${t}:${e}${o}`:`${e}${o}`}var k0,DT=F(()=>{k0=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:true}],["event:address indexed to",{type:"address",name:"to",indexed:true}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}]]);});function Ld(e,t={}){if(IT(e))return hH(e,t);if(_T(e))return gH(e,t);if(xT(e))return yH(e,t);if($T(e))return bH(e,t);if(PT(e))return xH(e);if(CT(e))return {type:"receive",stateMutability:"payable"};throw new Pd({signature:e})}function hH(e,t={}){let r=AT(e);if(!r)throw new uo({signature:e,type:"function"});let o=on(r.parameters),n=[],i=o.length;for(let a=0;a<i;a++)n.push(fo(o[a],{modifiers:E0,structs:t,type:"function"}));let s=[];if(r.returns){let a=on(r.returns),c=a.length;for(let u=0;u<c;u++)s.push(fo(a[u],{modifiers:E0,structs:t,type:"function"}));}return {name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:n,outputs:s}}function gH(e,t={}){let r=ET(e);if(!r)throw new uo({signature:e,type:"event"});let o=on(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(fo(o[s],{modifiers:zT,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function yH(e,t={}){let r=vT(e);if(!r)throw new uo({signature:e,type:"error"});let o=on(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(fo(o[s],{structs:t,type:"error"}));return {name:r.name,type:"error",inputs:n}}function bH(e,t={}){let r=OT(e);if(!r)throw new uo({signature:e,type:"constructor"});let o=on(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(fo(o[s],{structs:t,type:"constructor"}));return {type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:n}}function xH(e){let t=BT(e);if(!t)throw new uo({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function fo(e,t){let r=MT(e,t?.type,t?.structs);if(k0.has(r))return k0.get(r);let o=w0.test(e),n=En(o?wH:vH,e);if(!n)throw new Rd({param:e});if(n.name&&SH(n.name))throw new Td({param:e,name:n.name});let i=n.name?{name:n.name}:{},s=n.modifier==="indexed"?{indexed:true}:{},a=t?.structs??{},c,u={};if(o){c="tuple";let d=on(n.type),g=[],h=d.length;for(let v=0;v<h;v++)g.push(fo(d[v],{structs:a}));u={components:g};}else if(n.type in a)c="tuple",u={components:a[n.type]};else if(_H.test(n.type))c=`${n.type}256`;else if(n.type==="address payable")c="address";else if(c=n.type,t?.type!=="struct"&&!L6(c))throw new S0({type:c});if(n.modifier){if(!t?.modifiers?.has?.(n.modifier))throw new $d({param:e,type:t?.type,modifier:n.modifier});if(E0.has(n.modifier)&&!IH(c,!!n.array))throw new Od({param:e,type:t?.type,modifier:n.modifier})}let f={type:`${c}${n.array??""}`,...i,...s,...u};return k0.set(r,f),f}function on(e,t=[],r="",o=0){let n=e.trim().length;for(let i=0;i<n;i++){let s=e[i],a=e.slice(i+1);switch(s){case ",":return o===0?on(a,[...t,r.trim()]):on(a,t,`${r}${s}`,o);case "(":return on(a,t,`${r}${s}`,o+1);case ")":return on(a,t,`${r}${s}`,o-1);default:return on(a,t,`${r}${s}`,o)}}if(r==="")return t;if(o!==0)throw new zd({current:r,depth:o});return t.push(r.trim()),t}function L6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||N6.test(e)||P6.test(e)}function SH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||N6.test(e)||P6.test(e)||EH.test(e)}function IH(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var vH,wH,_H,EH,iu=F(()=>{Sd();I0();A0();z6();UT();DT();ou();vH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,wH=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,_H=/^u?int$/;EH=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;});function su(e){let t={},r=e.length;for(let s=0;s<r;s++){let a=e[s];if(!ms(a))continue;let c=RT(a);if(!c)throw new uo({signature:a,type:"struct"});let u=c.properties.split(";"),f=[],d=u.length;for(let g=0;g<d;g++){let v=u[g].trim();if(!v)continue;let E=fo(v,{type:"struct"});f.push(E);}if(!f.length)throw new Bd({signature:a});t[c.name]=f;}let o={},n=Object.entries(t),i=n.length;for(let s=0;s<i;s++){let[a,c]=n[s];o[a]=jT(c,t);}return o}function jT(e=[],t={},r=new Set){let o=[],n=e.length;for(let i=0;i<n;i++){let s=e[i];if(w0.test(s.type))o.push(s);else {let c=En(AH,s.type);if(!c?.type)throw new Nd({abiParameter:s});let{array:u,type:f}=c;if(f in t){if(r.has(f))throw new Cd({type:f});o.push({...s,type:`tuple${u??""}`,components:jT(t[f],t,new Set([...r,f]))});}else if(L6(f))o.push(s);else throw new Ad({type:f})}}return o}var AH,R0=F(()=>{Sd();I0();A0();z6();LT();ou();iu();AH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;});function xi(e){let t=su(e),r=[],o=e.length;for(let n=0;n<o;n++){let i=e[n];ms(i)||r.push(Ld(i,t));}return r}var FT=F(()=>{ou();R0();iu();});function Ud(e){let t;if(typeof e=="string")t=Ld(e);else {let r=su(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(!ms(i)){t=Ld(i,r);break}}}if(!t)throw new Id({signature:e});return t}var HT=F(()=>{I0();ou();R0();iu();});function Md(e){let t=[];if(typeof e=="string"){let r=on(e),o=r.length;for(let n=0;n<o;n++)t.push(fo(r[n],{modifiers:C6}));}else {let r=su(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(ms(i))continue;let s=on(i),a=s.length;for(let c=0;c<a;c++)t.push(fo(s[c],{modifiers:C6,structs:r}));}}if(t.length===0)throw new kd({params:e});return t}var VT=F(()=>{A0();ou();R0();iu();iu();});var au=F(()=>{yT();B6();FT();HT();VT();});function nr(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new T0(e.type);return `${e.name}(${Dd(e.inputs,{includeName:t})})`}function Dd(e,{includeName:t=false}={}){return e?e.map(r=>kH(r,{includeName:t})).join(t?", ":","):""}function kH(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Dd(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var vi=F(()=>{Et();});function St(e,{strict:t=true}={}){return !e||typeof e!="string"?false:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var lo=F(()=>{});function $e(e){return St(e,{strict:false})?Math.ceil((e.length-2)/2):e.length}var sn=F(()=>{lo();});var U6,GT=F(()=>{U6="2.55.16";});function qT(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?qT(e.cause,t):t?null:e}var M6,z,Te=F(()=>{GT();M6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${U6}`},z=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=M6.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...M6.version?[`Version: ${M6.version}`]:[]].join(`
4
- `);super(s,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=U6;}walk(t){return qT(this,t)}};});var $0,jd,cu,zn,O0,N0,P0,B0,Fd,uu,C0,z0,Hd,po,fu,L0,U0,M0,wi,hs,D0,j0,lu,T0,Et=F(()=>{vi();sn();Te();$0=class extends z{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
5
- `),{docsPath:t,name:"AbiConstructorNotFoundError"});}},jd=class extends z{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
6
- `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"});}},cu=class extends z{constructor({data:t,params:r,size:o}){super([`Data size of ${o} bytes is too small for given parameters.`].join(`
7
- `),{metaMessages:[`Params: (${Dd(r,{includeName:true})})`,`Data: ${t} (${o} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"params",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t,this.params=r,this.size=o;}},zn=class extends z{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t});}},O0=class extends z{constructor({expectedLength:t,givenLength:r,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${r}`].join(`
8
- `),{name:"AbiEncodingArrayLengthMismatchError"});}},N0=class extends z{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${$e(r)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"});}},P0=class extends z{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(`
9
- `),{name:"AbiEncodingLengthMismatchError"});}},B0=class extends z{constructor(t,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
10
- `),{docsPath:r,name:"AbiErrorInputsNotFoundError"});}},Fd=class extends z{constructor(t,{docsPath:r}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
11
- `),{docsPath:r,name:"AbiErrorNotFoundError"});}},uu=class extends z{constructor(t,{docsPath:r,cause:o}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
12
- `),{docsPath:r,name:"AbiErrorSignatureNotFoundError",cause:o}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.signature=t;}},C0=class extends z{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"});}},z0=class extends z{constructor(t,{docsPath:r}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
13
- `),{docsPath:r,name:"AbiEventSignatureNotFoundError"});}},Hd=class extends z{constructor(t,{docsPath:r}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
14
- `),{docsPath:r,name:"AbiEventNotFoundError"});}},po=class extends z{constructor(t,{docsPath:r}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
15
- `),{docsPath:r,name:"AbiFunctionNotFoundError"});}},fu=class extends z{constructor(t,{docsPath:r}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
16
- `),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"});}},L0=class extends z{constructor(t,{docsPath:r}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
17
- `),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"});}},U0=class extends z{constructor(t,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${nr(t.abiItem)}\`, and`,`\`${r.type}\` in \`${nr(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"});}},M0=class extends z{constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`,{name:"BytesSizeMismatchError"});}},wi=class extends z{constructor({abiItem:t,data:r,params:o,size:n}){super([`Data size of ${n} bytes is too small for non-indexed event parameters.`].join(`
18
- `),{metaMessages:[`Params: (${Dd(o,{includeName:true})})`,`Data: ${r} (${n} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"params",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abiItem=t,this.data=r,this.params=o,this.size=n;}},hs=class extends z{constructor({abiItem:t,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${nr(t,{includeName:true})}".`].join(`
19
- `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abiItem=t;}},D0=class extends z{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
20
- `),{docsPath:r,name:"InvalidAbiEncodingType"});}},j0=class extends z{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
21
- `),{docsPath:r,name:"InvalidAbiDecodingType"});}},lu=class extends z{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
22
- `),{name:"InvalidArrayError"});}},T0=class extends z{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
23
- `),{name:"InvalidDefinitionTypeError"});}};});var Vd,Zd,Gd,H0=F(()=>{Te();Vd=class extends z{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"});}},Zd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"});}},Gd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${r} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"});}};});function zo(e,{dir:t,size:r=32}={}){return typeof e=="string"?_i(e,{dir:t,size:r}):RH(e,{dir:t,size:r})}function _i(e,{dir:t,size:r=32}={}){if(r===null)return e;let o=e.replace("0x","");if(o.length>r*2)throw new Zd({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return `0x${o[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function RH(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Zd({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n<r;n++){let i=t==="right";o[i?n:r-n-1]=e[i?n:e.length-n-1];}return o}var qd=F(()=>{H0();});var gs,V0,Z0,G0,Wd=F(()=>{Te();gs=class extends z{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${n*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"});}},V0=class extends z{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"});}},Z0=class extends z{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"});}},G0=class extends z{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"});}};});function Gr(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,o=0;for(let n=0;n<r.length-1&&r[t==="left"?n:r.length-n-1].toString()==="0";n++)o++;return r=t==="left"?r.slice(o):r.slice(0,r.length-o),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var Kd=F(()=>{});function an(e,{size:t}){if($e(e)>t)throw new G0({givenSize:$e(e),maxSize:t})}function ut(e,t={}){let{signed:r}=t;t.size&&an(e,{size:t.size});let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n-1n)-1n;return o<=i?o:o-BigInt(`0x${"f".padStart(n*2,"f")}`)-1n}function D6(e,t={}){let r=e;if(t.size&&(an(r,{size:t.size}),r=Gr(r)),Gr(r)==="0x00")return false;if(Gr(r)==="0x01")return true;throw new Z0(r)}function vt(e,t={}){let r=ut(e,t),o=Number(r);if(!Number.isSafeInteger(o))throw new gs({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return o}var ur=F(()=>{Wd();sn();Kd();});function ft(e,t={}){return typeof e=="number"||typeof e=="bigint"?K(e,t):typeof e=="string"?Ei(e,t):typeof e=="boolean"?q0(e,t):Le(e,t)}function q0(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{size:t.size})):r}function Le(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=TH[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(an(o,{size:t.size}),zo(o,{dir:"right",size:t.size})):o}function K(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let c=typeof e=="bigint"?"n":"";throw new gs({max:i?`${i}${c}`:void 0,min:`${s}${c}`,signed:r,size:o,value:`${e}${c}`})}let a=`0x${(r&&n<0?(1n<<BigInt(o*8))+BigInt(n):n).toString(16)}`;return o?zo(a,{size:o}):a}function Ei(e,t={}){let r=$H.encode(e);return Le(r,t)}var TH,$H,Ae=F(()=>{Wd();qd();ur();TH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));$H=new TextEncoder;});function qr(e,t={}){return typeof e=="number"||typeof e=="bigint"?JT(e,t):typeof e=="boolean"?KT(e,t):St(e)?fr(e,t):Ln(e,t)}function KT(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{size:t.size})):r}function WT(e){if(e>=Si.zero&&e<=Si.nine)return e-Si.zero;if(e>=Si.A&&e<=Si.F)return e-(Si.A-10);if(e>=Si.a&&e<=Si.f)return e-(Si.a-10)}function fr(e,t={}){let r=e;t.size&&(an(r,{size:t.size}),r=zo(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let n=o.length/2,i=new Uint8Array(n);for(let s=0,a=0;s<n;s++){let c=WT(o.charCodeAt(a++)),u=WT(o.charCodeAt(a++));if(c===void 0||u===void 0)throw new z(`Invalid byte sequence ("${o[a-2]}${o[a-1]}" in "${o}").`);i[s]=c*16+u;}return i}function JT(e,t){let r=K(e,t);return fr(r)}function Ln(e,t={}){let r=OH.encode(e);return typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{dir:"right",size:t.size})):r}var OH,Si,lr=F(()=>{Te();lo();qd();ur();Ae();OH=new TextEncoder;Si={zero:48,nine:57,A:65,F:70,a:97,f:102};});function qe(e,t){let r=t||"hex",o=Ta(St(e,{strict:false})?qr(e):e);return r==="bytes"?o:ft(o)}var Un=F(()=>{Wh();lo();lr();Ae();});function YT(e){return NH(e)}var NH,XT=F(()=>{lr();Un();NH=e=>qe(qr(e));});function QT(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new z("Unable to normalize signature.");return n}var e4=F(()=>{Te();});var t4,r4=F(()=>{au();e4();t4=e=>{let t=typeof e=="string"?e:Ca(e);return QT(t)};});function W0(e){return YT(t4(e))}var j6=F(()=>{XT();r4();});var ys,Jd=F(()=>{j6();ys=W0;});var nt,Lo=F(()=>{Te();nt=class extends z{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"});}};});var Uo,Yd=F(()=>{Uo=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,r)),r}set(t,r){if(super.has(t)&&super.delete(t),super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=super.keys().next().value;o!==void 0&&super.delete(o);}return this}};});function bs(e,t){if(F6.has(`${e}.${t}`))return F6.get(`${e}.${t}`);let r=e.substring(2).toLowerCase(),o=qe(Ln(r),"bytes"),n=(r).split("");for(let s=0;s<40;s+=2)o[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(o[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join("")}`;return F6.set(`${e}.${t}`,i),i}function Mn(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});return bs(e,t)}var F6,Ii=F(()=>{Lo();lr();Un();Yd();Sn();F6=new Uo(8192);});function Me(e,t){let{strict:r=true}=t??{},o=`${e}.${r}`;if(H6.has(o))return H6.get(o);let n=PH.test(e)?e.toLowerCase()===e?true:r?bs(e)===e:true:false;return H6.set(o,n),n}var PH,H6,Sn=F(()=>{Yd();Ii();PH=/^0x[a-fA-F0-9]{40}$/,H6=new Uo(8192);});function Mo(e){return typeof e[0]=="string"?st(e):BH(e)}function BH(e){let t=0;for(let n of e)t+=n.length;let r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function st(e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var cn=F(()=>{});function un(e,t,r,{strict:o}={}){return St(e,{strict:false})?CH(e,t,r,{strict:o}):V6(e,t,r,{strict:o})}function n4(e,t){if(typeof t=="number"&&t>0&&t>$e(e)-1)throw new Vd({offset:t,position:"start",size:$e(e)})}function o4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&$e(e)!==r-t)throw new Vd({offset:r,position:"end",size:$e(e)})}function V6(e,t,r,{strict:o}={}){n4(e,t);let n=e.slice(t,r);return o&&o4(n,t,r),n}function CH(e,t,r,{strict:o}={}){n4(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&o4(n,t,r),n}var xs=F(()=>{H0();lo();sn();});var i4,K0,Z6=F(()=>{i4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,K0=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;});function Wr(e,t){if(e.length!==t.length)throw new P0({expectedLength:e.length,givenLength:t.length});let r=zH({params:e,values:t});return W6(r)}function zH({params:e,values:t}){let r=[];for(let o=0;o<e.length;o++)r.push(q6({param:e[o],value:t[o]}));return r}function q6({param:e,value:t}){let r=Xd(e.type);if(r){let[o,n]=r;return UH(t,{length:o,param:{...e,type:n}})}if(e.type==="tuple")return HH(t,{param:e});if(e.type==="address")return LH(t);if(e.type==="bool")return DH(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let o=e.type.startsWith("int"),[,,n="256"]=K0.exec(e.type)??[];return jH(t,{signed:o,size:Number(n)})}if(e.type.startsWith("bytes"))return MH(t,{param:e});if(e.type==="string")return FH(t);throw new D0(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function W6(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=$e(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(K(t+n,{size:32})),o.push(a),n+=$e(a)):r.push(a);}return st([...r,...o])}function LH(e){if(!Me(e))throw new nt({address:e});return {dynamic:false,encoded:_i(e.toLowerCase())}}function UH(e,{length:t,param:r}){let o=t===null;if(!Array.isArray(e))throw new lu(e);if(!o&&e.length!==t)throw new O0({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=e.length===0&&G6(r),i=[];for(let s=0;s<e.length;s++){let a=q6({param:r,value:e[s]});a.dynamic&&(n=true),i.push(a);}if(o||n){let s=W6(i);if(o){let a=K(i.length,{size:32});return {dynamic:true,encoded:st([a,s])}}if(n)return {dynamic:true,encoded:s}}return {dynamic:false,encoded:st(i.map(({encoded:s})=>s))}}function MH(e,{param:t}){let[,r]=t.type.split("bytes"),o=$e(e);if(!r){let n=e;return o%32!==0&&(n=_i(n,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:true,encoded:st([_i(K(o,{size:32})),n])}}if(o!==Number.parseInt(r,10))throw new N0({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:_i(e,{dir:"right"})}}function DH(e){if(typeof e!="boolean")throw new z(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:_i(q0(e))}}function jH(e,{signed:t,size:r=256}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new gs({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:K(e,{size:32,signed:t})}}function FH(e){let t=Ei(e),r=Math.ceil($e(t)/32),o=[];for(let n=0;n<r;n++)o.push(_i(un(t,n*32,(n+1)*32),{dir:"right"}));return {dynamic:true,encoded:st([_i(K($e(t),{size:32})),...o])}}function HH(e,{param:t}){let r=false,o=[];for(let n=0;n<t.components.length;n++){let i=t.components[n],s=Array.isArray(e)?n:i.name,a=q6({param:i,value:e[s]});o.push(a),a.dynamic&&(r=true);}return {dynamic:r,encoded:r?W6(o):st(o.map(({encoded:n})=>n))}}function Xd(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function G6(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components.some(G6);let r=Xd(t);return r?G6({...e,type:r[1]}):false}var Ai=F(()=>{Et();Lo();Te();Wd();Sn();cn();qd();sn();xs();Ae();Z6();});var Do,du=F(()=>{xs();j6();Do=e=>un(W0(e),0,4);});function fn(e){let{abi:t,args:r=[],name:o}=e,n=St(o,{strict:false}),i=t.filter(a=>n?a.type==="function"?Do(a)===o:a.type==="event"?ys(a)===o:false:"name"in a&&a.name===o);if(i.length===0)return;if(i.length===1)return i[0];let s;for(let a of i){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,f)=>{let d="inputs"in a&&a.inputs[f];return d?K6(u,d):false})){if(s&&"inputs"in s&&s.inputs){let u=s4(a.inputs,s.inputs,r);if(u)throw new U0({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a;}}return s||i[0]}function K6(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Me(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>r==="object"&&K6(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>K6(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function s4(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return s4(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Me(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Me(r[o],{strict:false}):false)return s}}var vs=F(()=>{Et();lo();Sn();Jd();du();});function We(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var ln=F(()=>{});function f4(e){let{abi:t,args:r,functionName:o}=e,n=t[0];if(o){let i=fn({abi:t,args:r,name:o});if(!i)throw new po(o,{docsPath:u4});n=i;}if(n.type!=="function")throw new po(void 0,{docsPath:u4});return {abi:[n],functionName:Do(nr(n))}}var u4,l4=F(()=>{Et();du();vi();vs();u4="/docs/contract/encodeFunctionData";});function lt(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:f4(e),n=r[0],i=o,s="inputs"in n&&n.inputs?Wr(n.inputs,t??[]):void 0;return st([i,s??"0x"])}var Dn=F(()=>{cn();Ai();l4();});var d4,Y0,p4,X0=F(()=>{d4={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Y0={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},p4={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var Qd,pu,Q0,J6=F(()=>{Te();Qd=class extends z{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"});}},pu=class extends z{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"});}},Q0=class extends z{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"});}};});function mu(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(VH);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var VH,eg=F(()=>{J6();VH={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Q0({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new pu({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};});function m4(e,t={}){typeof t.size<"u"&&an(e,{size:t.size});let r=Le(e);return ut(r,t)}function h4(e,t={}){let r=e;if(typeof t.size<"u"&&(an(r,{size:t.size}),r=Gr(r)),r.length>1||r[0]>1)throw new V0(r);return !!r[0]}function Fo(e,t={}){typeof t.size<"u"&&an(e,{size:t.size});let r=Le(e);return vt(r,t)}function g4(e,t={}){let r=e;return typeof t.size<"u"&&(an(r,{size:t.size}),r=Gr(r,{dir:"right"})),new TextDecoder().decode(r)}var y4=F(()=>{Wd();Kd();ur();Ae();});function ki(e,t){let r=typeof t=="string"?fr(t):t,o=mu(r);if($e(r)===0&&e.length>0)throw new zn;if($e(t)&&$e(t)<32)throw new cu({data:typeof t=="string"?t:Le(t),params:e,size:$e(t)});let n=0,i=[];for(let s=0;s<e.length;++s){let a=e[s];n<r.length&&o.setPosition(n);let[c,u]=hu(o,a,{staticPosition:0});n+=u,i.push(c);}return i}function hu(e,t,{staticPosition:r}){let o=Xd(t.type);if(o){let[n,i]=o;return GH(e,{...t,type:i},{length:n,staticPosition:r})}if(t.type==="tuple")return JH(e,t,{staticPosition:r});if(t.type==="address")return ZH(e);if(t.type==="bool")return qH(e);if(t.type.startsWith("bytes"))return WH(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return KH(e,t);if(t.type==="string")return YH(e,{staticPosition:r});throw new j0(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function ZH(e){let t=e.readBytes(32);return [bs(Le(V6(t,-20))),32]}function GH(e,t,{length:r,staticPosition:o}){if(r===null){let s=Fo(e.readBytes(Y6)),a=o+s,c=a+b4;e.setPosition(a);let u=Fo(e.readBytes(b4)),f=ep(t),d=0,g=[];for(let h=0;h<u;++h){e.setPosition(c+(f?h*32:d));let[v,E]=hu(e,t,{staticPosition:c});d+=E,g.push(v),E===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(o+32),[g,32]}if(ep(t)){let s=Fo(e.readBytes(Y6)),a=o+s,c=[];for(let u=0;u<r;++u){e.setPosition(a+u*32);let[f]=hu(e,t,{staticPosition:a});c.push(f);}return e.setPosition(o+32),[c,32]}let n=0,i=[];for(let s=0;s<r;++s){let[a,c]=hu(e,t,{staticPosition:o+n});n+=c,i.push(a),c===0&&(e.assertReadLimit(),e._touch());}return [i,n]}function qH(e){return [h4(e.readBytes(32),{size:32}),32]}function WH(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Fo(e.readBytes(32));e.setPosition(r+s);let a=Fo(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[Le(c),32]}return [Le(e.readBytes(Number.parseInt(n,10),32)),32]}function KH(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?m4(n,{signed:r}):Fo(n,{signed:r}),32]}function JH(e,t,{staticPosition:r}){let o=t.components.length===0||t.components.some(({name:s})=>!s),n=o?[]:{},i=0;if(ep(t)){let s=Fo(e.readBytes(Y6)),a=r+s;for(let c=0;c<t.components.length;++c){let u=t.components[c];e.setPosition(a+i);let[f,d]=hu(e,u,{staticPosition:a});i+=d,n[o?c:u?.name]=f;}return e.setPosition(r+32),[n,32]}for(let s=0;s<t.components.length;++s){let a=t.components[s],[c,u]=hu(e,a,{staticPosition:r});n[o?s:a?.name]=c,i+=u;}return [n,i]}function YH(e,{staticPosition:t}){let r=Fo(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Fo(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=g4(i);return e.setPosition(t+32),[s,32]}function ep(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(ep);let r=Xd(e.type);return !!(r&&ep({...e,type:r[1]}))}var b4,Y6,tp=F(()=>{Et();Ii();eg();sn();xs();y4();lr();Ae();Ai();b4=32,Y6=32;});function tg(e){let{abi:t,data:r,cause:o}=e,n=un(r,0,4);if(n==="0x")throw new zn({cause:o});let s=[...t||[],Y0,p4].find(a=>a.type==="error"&&n===Do(nr(a)));if(!s)throw new uu(n,{docsPath:"/docs/contract/decodeErrorResult",cause:o});return {abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?ki(s.inputs,un(r,4)):void 0,errorName:s.name}}var X6=F(()=>{X0();Et();xs();du();tp();vi();});var Be,Pr=F(()=>{Be=(e,t,r)=>JSON.stringify(e,(o,n)=>{let i=typeof n=="bigint"?n.toString():n;return typeof t=="function"?t(o,i):i},r);});function Q6({abiItem:e,args:t,includeFunctionName:r=true,includeName:o=false}){if("name"in e&&"inputs"in e&&e.inputs)return `${r?e.name:""}(${e.inputs.map((n,i)=>`${o&&n.name?`${n.name}: `:""}${typeof t[i]=="object"?Be(t[i]):t[i]}`).join(", ")})`}var x4=F(()=>{Pr();});function ng(e,t=0){if(!Number.isInteger(t)||t<0)throw new e2({decimals:t});let r=e.toString(),o=r.startsWith("-");o&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${n||"0"}${i?`.${i}`:""}`}function v4(e,t="wei"){return ng(e,rg.ether-rg[t])}function w4(e,t="wei"){return ng(e,rg.gwei-rg[t])}var rg,e2,og=F(()=>{rg={wei:0,gwei:9,szabo:12,finney:15,ether:18};e2=class extends Error{constructor({decimals:t}){super(`\`decimals\` must be a non-negative integer. Got \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Value.InvalidDecimalsError"});}};});function gu(e,t="wei"){return v4(e,t)}var ig=F(()=>{og();});function or(e,t="wei"){return w4(e,t)}var yu=F(()=>{og();});function _4(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
24
- `,"")}function E4(e){return e.reduce((t,{address:r,...o})=>{let n=`${t} ${r}:
2
+ var sN=Object.create;var Up=Object.defineProperty;var aN=Object.getOwnPropertyDescriptor;var cN=Object.getOwnPropertyNames;var uN=Object.getPrototypeOf,fN=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Er=(e,t)=>{for(var r in t)Up(e,r,{get:t[r],enumerable:true});},GE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cN(t))!fN.call(e,n)&&n!==r&&Up(e,n,{get:()=>t[n],enumerable:!(o=aN(t,n))||o.enumerable});return e};var Jo=(e,t,r)=>(r=e!=null?sN(uN(e)):{},GE(t||!e||!e.__esModule?Up(r,"default",{value:e,enumerable:true}):r,e)),qE=e=>GE(Up({},"__esModule",{value:true}),e);var II=Kr(th=>{th.byteLength=aL;th.toByteArray=uL;th.fromByteArray=dL;var So=[],Pn=[],sL=typeof Uint8Array<"u"?Uint8Array:Array,Ew="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(da=0,EI=Ew.length;da<EI;++da)So[da]=Ew[da],Pn[Ew.charCodeAt(da)]=da;var da,EI;Pn[45]=62;Pn[95]=63;function SI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return [r,o]}function aL(e){var t=SI(e),r=t[0],o=t[1];return (r+o)*3/4-o}function cL(e,t,r){return (t+r)*3/4-r}function uL(e){var t,r=SI(e),o=r[0],n=r[1],i=new sL(cL(e,o,n)),s=0,a=n>0?o-4:o,c;for(c=0;c<a;c+=4)t=Pn[e.charCodeAt(c)]<<18|Pn[e.charCodeAt(c+1)]<<12|Pn[e.charCodeAt(c+2)]<<6|Pn[e.charCodeAt(c+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return n===2&&(t=Pn[e.charCodeAt(c)]<<2|Pn[e.charCodeAt(c+1)]>>4,i[s++]=t&255),n===1&&(t=Pn[e.charCodeAt(c)]<<10|Pn[e.charCodeAt(c+1)]<<4|Pn[e.charCodeAt(c+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function fL(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function lL(e,t,r){for(var o,n=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),n.push(fL(o));return n.join("")}function dL(e){for(var t,r=e.length,o=r%3,n=[],i=16383,s=0,a=r-o;s<a;s+=i)n.push(lL(e,s,s+i>a?a:s+i));return o===1?(t=e[r-1],n.push(So[t>>2]+So[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],n.push(So[t>>10]+So[t>>4&63]+So[t<<2&63]+"=")),n.join("")}});var AI=Kr(Sw=>{Sw.read=function(e,t,r,o,n){var i,s,a=n*8-o-1,c=(1<<a)-1,u=c>>1,f=-7,d=r?n-1:0,g=r?-1:1,h=e[t+d];for(d+=g,i=h&(1<<-f)-1,h>>=-f,f+=a;f>0;i=i*256+e[t+d],d+=g,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=o;f>0;s=s*256+e[t+d],d+=g,f-=8);if(i===0)i=1-u;else {if(i===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-u;}return (h?-1:1)*s*Math.pow(2,i-o)};Sw.write=function(e,t,r,o,n,i){var s,a,c,u=i*8-n-1,f=(1<<u)-1,d=f>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,x=o?1:-1,w=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=g/c:t+=g*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=f?(a=0,s=f):s+d>=1?(a=(t*c-1)*Math.pow(2,n),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=a&255,h+=x,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;e[r+h]=s&255,h+=x,s/=256,u-=8);e[r+h-x]|=w*128;};});var Cl=Kr(Mc=>{var Iw=II(),Lc=AI(),kI=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Mc.Buffer=V;Mc.SlowBuffer=bL;Mc.INSPECT_MAX_BYTES=50;var rh=2147483647;Mc.kMaxLength=rh;V.TYPED_ARRAY_SUPPORT=pL();!V.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function pL(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return false}}Object.defineProperty(V.prototype,"parent",{enumerable:true,get:function(){if(V.isBuffer(this))return this.buffer}});Object.defineProperty(V.prototype,"offset",{enumerable:true,get:function(){if(V.isBuffer(this))return this.byteOffset}});function si(e){if(e>rh)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,V.prototype),t}function V(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Tw(e)}return OI(e,t,r)}V.poolSize=8192;function OI(e,t,r){if(typeof e=="string")return hL(e,t);if(ArrayBuffer.isView(e))return gL(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Io(e,ArrayBuffer)||e&&Io(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Io(e,SharedArrayBuffer)||e&&Io(e.buffer,SharedArrayBuffer)))return kw(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return V.from(o,t,r);let n=yL(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return V.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}V.from=function(e,t,r){return OI(e,t,r)};Object.setPrototypeOf(V.prototype,Uint8Array.prototype);Object.setPrototypeOf(V,Uint8Array);function NI(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function mL(e,t,r){return NI(e),e<=0?si(e):t!==void 0?typeof r=="string"?si(e).fill(t,r):si(e).fill(t):si(e)}V.alloc=function(e,t,r){return mL(e,t,r)};function Tw(e){return NI(e),si(e<0?0:$w(e)|0)}V.allocUnsafe=function(e){return Tw(e)};V.allocUnsafeSlow=function(e){return Tw(e)};function hL(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!V.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=PI(e,t)|0,o=si(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function Aw(e){let t=e.length<0?0:$w(e.length)|0,r=si(t);for(let o=0;o<t;o+=1)r[o]=e[o]&255;return r}function gL(e){if(Io(e,Uint8Array)){let t=new Uint8Array(e);return kw(t.buffer,t.byteOffset,t.byteLength)}return Aw(e)}function kw(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,V.prototype),o}function yL(e){if(V.isBuffer(e)){let t=$w(e.length)|0,r=si(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Nw(e.length)?si(0):Aw(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Aw(e.data)}function $w(e){if(e>=rh)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+rh.toString(16)+" bytes");return e|0}function bL(e){return +e!=e&&(e=0),V.alloc(+e)}V.isBuffer=function(t){return t!=null&&t._isBuffer===true&&t!==V.prototype};V.compare=function(t,r){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),Io(r,Uint8Array)&&(r=V.from(r,r.offset,r.byteLength)),!V.isBuffer(t)||!V.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let o=t.length,n=r.length;for(let i=0,s=Math.min(o,n);i<s;++i)if(t[i]!==r[i]){o=t[i],n=r[i];break}return o<n?-1:n<o?1:0};V.isEncoding=function(t){switch(String(t).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "latin1":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return true;default:return false}};V.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return V.alloc(0);let o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;let n=V.allocUnsafe(r),i=0;for(o=0;o<t.length;++o){let s=t[o];if(Io(s,Uint8Array))i+s.length>n.length?(V.isBuffer(s)||(s=V.from(s)),s.copy(n,i)):Uint8Array.prototype.set.call(n,s,i);else if(V.isBuffer(s))s.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length;}return n};function PI(e,t){if(V.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Io(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,o=arguments.length>2&&arguments[2]===true;if(!o&&r===0)return 0;let n=false;for(;;)switch(t){case "ascii":case "latin1":case "binary":return r;case "utf8":case "utf-8":return Rw(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return FI(e).length;default:if(n)return o?-1:Rw(e).length;t=(""+t).toLowerCase(),n=true;}}V.byteLength=PI;function xL(e,t,r){let o=false;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return "";for(e||(e="utf8");;)switch(e){case "hex":return TL(this,t,r);case "utf8":case "utf-8":return CI(this,t,r);case "ascii":return kL(this,t,r);case "latin1":case "binary":return RL(this,t,r);case "base64":return IL(this,t,r);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return $L(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=true;}}V.prototype._isBuffer=true;function pa(e,t,r){let o=e[t];e[t]=e[r],e[r]=o;}V.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)pa(this,r,r+1);return this};V.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)pa(this,r,r+3),pa(this,r+1,r+2);return this};V.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)pa(this,r,r+7),pa(this,r+1,r+6),pa(this,r+2,r+5),pa(this,r+3,r+4);return this};V.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?CI(this,0,t):xL.apply(this,arguments)};V.prototype.toLocaleString=V.prototype.toString;V.prototype.equals=function(t){if(!V.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?true:V.compare(this,t)===0};V.prototype.inspect=function(){let t="",r=Mc.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};kI&&(V.prototype[kI]=V.prototype.inspect);V.prototype.compare=function(t,r,o,n,i){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),!V.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),r<0||o>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=o)return 0;if(n>=i)return -1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,i>>>=0,this===t)return 0;let s=i-n,a=o-r,c=Math.min(s,a),u=this.slice(n,i),f=t.slice(r,o);for(let d=0;d<c;++d)if(u[d]!==f[d]){s=u[d],a=f[d];break}return s<a?-1:a<s?1:0};function BI(e,t,r,o,n){if(e.length===0)return -1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Nw(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1;}else if(r<0)if(n)r=0;else return -1;if(typeof t=="string"&&(t=V.from(t,o)),V.isBuffer(t))return t.length===0?-1:RI(e,t,r,o,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):RI(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function RI(e,t,r,o,n){let i=1,s=e.length,a=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return -1;i=2,s/=2,a/=2,r/=2;}function c(f,d){return i===1?f[d]:f.readUInt16BE(d*i)}let u;if(n){let f=-1;for(u=r;u<s;u++)if(c(e,u)===c(t,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===a)return f*i}else f!==-1&&(u-=u-f),f=-1;}else for(r+a>s&&(r=s-a),u=r;u>=0;u--){let f=true;for(let d=0;d<a;d++)if(c(e,u+d)!==c(t,d)){f=false;break}if(f)return u}return -1}V.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};V.prototype.indexOf=function(t,r,o){return BI(this,t,r,o,true)};V.prototype.lastIndexOf=function(t,r,o){return BI(this,t,r,o,false)};function vL(e,t,r,o){r=Number(r)||0;let n=e.length-r;o?(o=Number(o),o>n&&(o=n)):o=n;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let a=parseInt(t.substr(s*2,2),16);if(Nw(a))return s;e[r+s]=a;}return s}function wL(e,t,r,o){return nh(Rw(t,e.length-r),e,r,o)}function _L(e,t,r,o){return nh(BL(t),e,r,o)}function EL(e,t,r,o){return nh(FI(t),e,r,o)}function SL(e,t,r,o){return nh(CL(t,e.length-r),e,r,o)}V.prototype.write=function(t,r,o,n){if(r===void 0)n="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")n=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=false;for(;;)switch(n){case "hex":return vL(this,t,r,o);case "utf8":case "utf-8":return wL(this,t,r,o);case "ascii":case "latin1":case "binary":return _L(this,t,r,o);case "base64":return EL(this,t,r,o);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return SL(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=true;}};V.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function IL(e,t,r){return t===0&&r===e.length?Iw.fromByteArray(e):Iw.fromByteArray(e.slice(t,r))}function CI(e,t,r){r=Math.min(e.length,r);let o=[],n=t;for(;n<r;){let i=e[n],s=null,a=i>239?4:i>223?3:i>191?2:1;if(n+a<=r){let c,u,f,d;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[n+1],(c&192)===128&&(d=(i&31)<<6|c&63,d>127&&(s=d));break;case 3:c=e[n+1],u=e[n+2],(c&192)===128&&(u&192)===128&&(d=(i&15)<<12|(c&63)<<6|u&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:c=e[n+1],u=e[n+2],f=e[n+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(d=(i&15)<<18|(c&63)<<12|(u&63)<<6|f&63,d>65535&&d<1114112&&(s=d));}}s===null?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),n+=a;}return AL(o)}var TI=4096;function AL(e){let t=e.length;if(t<=TI)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=TI));return r}function kL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]&127);return o}function RL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]);return o}function TL(e,t,r){let o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);let n="";for(let i=t;i<r;++i)n+=zL[e[i]];return n}function $L(e,t,r){let o=e.slice(t,r),n="";for(let i=0;i<o.length-1;i+=2)n+=String.fromCharCode(o[i]+o[i+1]*256);return n}V.prototype.slice=function(t,r){let o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,V.prototype),n};function sr(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}V.prototype.readUintLE=V.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return n};V.prototype.readUintBE=V.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t+--r],i=1;for(;r>0&&(i*=256);)n+=this[t+--r]*i;return n};V.prototype.readUint8=V.prototype.readUInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]};V.prototype.readUint16LE=V.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]|this[t+1]<<8};V.prototype.readUint16BE=V.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]<<8|this[t+1]};V.prototype.readUint32LE=V.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};V.prototype.readUint32BE=V.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};V.prototype.readBigUInt64LE=Xi(function(t){t=t>>>0,Uc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Bl(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))});V.prototype.readBigUInt64BE=Xi(function(t){t=t>>>0,Uc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Bl(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return (BigInt(n)<<BigInt(32))+BigInt(i)});V.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n};V.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=r,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};V.prototype.readInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};V.prototype.readInt16LE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};V.prototype.readInt16BE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};V.prototype.readInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};V.prototype.readInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};V.prototype.readBigInt64LE=Xi(function(t){t=t>>>0,Uc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Bl(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return (BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});V.prototype.readBigInt64BE=Xi(function(t){t=t>>>0,Uc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Bl(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return (BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});V.prototype.readFloatLE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Lc.read(this,t,true,23,4)};V.prototype.readFloatBE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Lc.read(this,t,false,23,4)};V.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Lc.read(this,t,true,52,8)};V.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Lc.read(this,t,false,52,8)};function tn(e,t,r,o,n,i){if(!V.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}V.prototype.writeUintLE=V.prototype.writeUIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;tn(this,t,r,o,a,0);}let i=1,s=0;for(this[r]=t&255;++s<o&&(i*=256);)this[r+s]=t/i&255;return r+o};V.prototype.writeUintBE=V.prototype.writeUIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;tn(this,t,r,o,a,0);}let i=o-1,s=1;for(this[r+i]=t&255;--i>=0&&(s*=256);)this[r+i]=t/s&255;return r+o};V.prototype.writeUint8=V.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,1,255,0),this[r]=t&255,r+1};V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function zI(e,t,r,o,n){jI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function LI(e,t,r,o,n){jI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}V.prototype.writeBigUInt64LE=Xi(function(t,r=0){return zI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeBigUInt64BE=Xi(function(t,r=0){return LI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);tn(this,t,r,o,c-1,-c);}let i=0,s=1,a=0;for(this[r]=t&255;++i<o&&(s*=256);)t<0&&a===0&&this[r+i-1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);tn(this,t,r,o,c-1,-c);}let i=o-1,s=1,a=0;for(this[r+i]=t&255;--i>=0&&(s*=256);)t<0&&a===0&&this[r+i+1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};V.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};V.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||tn(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};V.prototype.writeBigInt64LE=Xi(function(t,r=0){return zI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V.prototype.writeBigInt64BE=Xi(function(t,r=0){return LI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function UI(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function MI(e,t,r,o,n){return t=+t,r=r>>>0,n||UI(e,t,r,4),Lc.write(e,t,r,o,23,4),r+4}V.prototype.writeFloatLE=function(t,r,o){return MI(this,t,r,true,o)};V.prototype.writeFloatBE=function(t,r,o){return MI(this,t,r,false,o)};function DI(e,t,r,o,n){return t=+t,r=r>>>0,n||UI(e,t,r,8),Lc.write(e,t,r,o,52,8),r+8}V.prototype.writeDoubleLE=function(t,r,o){return DI(this,t,r,true,o)};V.prototype.writeDoubleBE=function(t,r,o){return DI(this,t,r,false,o)};V.prototype.copy=function(t,r,o,n){if(!V.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<o&&(n=o),n===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-o&&(n=t.length-r+o);let i=n-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,n):Uint8Array.prototype.set.call(t,this.subarray(o,n),r),i};V.prototype.fill=function(t,r,o,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,o=this.length):typeof o=="string"&&(n=o,o=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!V.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let s=t.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(t=s);}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i<o;++i)this[i]=t;else {let s=V.isBuffer(t)?t:V.from(t,n),a=s.length;if(a===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-r;++i)this[i+r]=s[i%a];}return this};var zc={};function Ow(e,t,r){zc[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:true,configurable:true}),this.name=`${this.name} [${e}]`,this.stack,delete this.name;}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:true,enumerable:true,value:n,writable:true});}toString(){return `${this.name} [${e}]: ${this.message}`}};}Ow("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Ow("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Ow("ERR_OUT_OF_RANGE",function(e,t,r){let o=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=$I(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=$I(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function $I(e){let t="",r=e.length,o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return `${e.slice(0,r)}${t}`}function OL(e,t,r){Uc(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Bl(t,e.length-(r+1));}function jI(e,t,r,o,n,i){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",a;throw t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`,new zc.ERR_OUT_OF_RANGE("value",a,e)}OL(o,n,i);}function Uc(e,t){if(typeof e!="number")throw new zc.ERR_INVALID_ARG_TYPE(t,"number",e)}function Bl(e,t,r){throw Math.floor(e)!==e?(Uc(e,r),new zc.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new zc.ERR_BUFFER_OUT_OF_BOUNDS:new zc.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${t}`,e)}var NL=/[^+/0-9A-Za-z-_]/g;function PL(e){if(e=e.split("=")[0],e=e.trim().replace(NL,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function Rw(e,t){t=t||1/0;let r,o=e.length,n=null,i=[];for(let s=0;s<o;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536;}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r);}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128);}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return i}function BL(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function CL(e,t){let r,o,n,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),o=r>>8,n=r%256,i.push(n),i.push(o);return i}function FI(e){return Iw.toByteArray(PL(e))}function nh(e,t,r,o){let n;for(n=0;n<o&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Io(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Nw(e){return e!==e}var zL=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let o=r*16;for(let n=0;n<16;++n)t[o+n]=e[r]+e[n];}return t})();function Xi(e){return typeof BigInt>"u"?LL:e}function LL(){throw new Error("BigInt not supported")}});var ma,HI=F(()=>{ma=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;});function UL(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ha(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ao(e,...t){if(!UL(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function VI(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ha(e.outputLen),ha(e.blockLen);}function ai(e,t=true){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function oh(e,t){Ao(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function ZI(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Bn(...e){for(let t=0;t<e.length;t++)e[t].fill(0);}function ih(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function no(e,t){return e<<32-t|e>>>t}function DL(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function jL(e){for(let t=0;t<e.length;t++)e[t]=DL(e[t]);return e}function GI(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function ga(e){return typeof e=="string"&&(e=GI(e)),Ao(e),e}function Bw(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];Ao(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function zl(e){let t=o=>e().update(ga(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Dc(e=32){if(ma&&typeof ma.getRandomValues=="function")return ma.getRandomValues(new Uint8Array(e));if(ma&&typeof ma.randomBytes=="function")return Uint8Array.from(ma.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var ML,Pw,Qi,ci=F(()=>{HI();ML=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;Pw=ML?e=>e:jL;Qi=class{};});function FL(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);let n=BigInt(32),i=BigInt(4294967295),s=Number(r>>n&i),a=Number(r&i),c=o?4:0,u=o?0:4;e.setUint32(t+c,s,o),e.setUint32(t+u,a,o);}function qI(e,t,r){return e&t^~e&r}function WI(e,t,r){return e&t^e&r^t&r}var Ll,ui,hr,KI=F(()=>{ci();Ll=class extends Qi{constructor(t,r,o,n){super(),this.finished=false,this.length=0,this.pos=0,this.destroyed=false,this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=n,this.buffer=new Uint8Array(t),this.view=ih(this.buffer);}update(t){ai(this),t=ga(t),Ao(t);let{view:r,buffer:o,blockLen:n}=this,i=t.length;for(let s=0;s<i;){let a=Math.min(n-this.pos,i-s);if(a===n){let c=ih(t);for(;n<=i-s;s+=n)this.process(c,s);continue}o.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(r,0),this.pos=0);}return this.length+=t.length,this.roundClean(),this}digestInto(t){ai(this),oh(t,this),this.finished=true;let{buffer:r,view:o,blockLen:n,isLE:i}=this,{pos:s}=this;r[s++]=128,Bn(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(o,0),s=0);for(let d=s;d<n;d++)r[d]=0;FL(o,n-8,BigInt(this.length*8),i),this.process(o,0);let a=ih(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,f[d],i);}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:o,length:n,finished:i,destroyed:s,pos:a}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=a,n%r&&t.buffer.set(o),t}clone(){return this._cloneInto()}},ui=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),hr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function HL(e,t=false){return t?{h:Number(e&sh),l:Number(e>>JI&sh)}:{h:Number(e>>JI&sh)|0,l:Number(e&sh)|0}}function ah(e,t=false){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i<r;i++){let{h:s,l:a}=HL(e[i],t);[o[i],n[i]]=[s,a];}return [o,n]}function ko(e,t,r,o){let n=(t>>>0)+(o>>>0);return {h:e+r+(n/2**32|0)|0,l:n|0}}var sh,JI,Cw,zw,ya,ba,Ul,Ml,YI,XI,QI,eA,tA,rA,nA,oA,iA,sA,Lw=F(()=>{sh=BigInt(4294967295),JI=BigInt(32);Cw=(e,t,r)=>e>>>r,zw=(e,t,r)=>e<<32-r|t>>>r,ya=(e,t,r)=>e>>>r|t<<32-r,ba=(e,t,r)=>e<<32-r|t>>>r,Ul=(e,t,r)=>e<<64-r|t>>>r-32,Ml=(e,t,r)=>e>>>r-32|t<<64-r,YI=(e,t,r)=>e<<r|t>>>32-r,XI=(e,t,r)=>t<<r|e>>>32-r,QI=(e,t,r)=>t<<r-32|e>>>64-r,eA=(e,t,r)=>e<<r-32|t>>>64-r;tA=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),rA=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,nA=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),oA=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,iA=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),sA=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var ZL,es,ch,aA,GL,qL,ts,rs,Uw,xa,cA,uh=F(()=>{KI();Lw();ci();ZL=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),es=new Uint32Array(64),ch=class extends Ll{constructor(t=32){super(64,t,8,false),this.A=ui[0]|0,this.B=ui[1]|0,this.C=ui[2]|0,this.D=ui[3]|0,this.E=ui[4]|0,this.F=ui[5]|0,this.G=ui[6]|0,this.H=ui[7]|0;}get(){let{A:t,B:r,C:o,D:n,E:i,F:s,G:a,H:c}=this;return [t,r,o,n,i,s,a,c]}set(t,r,o,n,i,s,a,c){this.A=t|0,this.B=r|0,this.C=o|0,this.D=n|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=c|0;}process(t,r){for(let d=0;d<16;d++,r+=4)es[d]=t.getUint32(r,false);for(let d=16;d<64;d++){let g=es[d-15],h=es[d-2],x=no(g,7)^no(g,18)^g>>>3,w=no(h,17)^no(h,19)^h>>>10;es[d]=w+es[d-7]+x+es[d-16]|0;}let{A:o,B:n,C:i,D:s,E:a,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){let g=no(a,6)^no(a,11)^no(a,25),h=f+g+qI(a,c,u)+ZL[d]+es[d]|0,w=(no(o,2)^no(o,13)^no(o,22))+WI(o,n,i)|0;f=u,u=c,c=a,a=s+h|0,s=i,i=n,n=o,o=h+w|0;}o=o+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(o,n,i,s,a,c,u,f);}roundClean(){Bn(es);}destroy(){this.set(0,0,0,0,0,0,0,0),Bn(this.buffer);}},aA=ah(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),GL=aA[0],qL=aA[1],ts=new Uint32Array(80),rs=new Uint32Array(80),Uw=class extends Ll{constructor(t=64){super(128,t,16,false),this.Ah=hr[0]|0,this.Al=hr[1]|0,this.Bh=hr[2]|0,this.Bl=hr[3]|0,this.Ch=hr[4]|0,this.Cl=hr[5]|0,this.Dh=hr[6]|0,this.Dl=hr[7]|0,this.Eh=hr[8]|0,this.El=hr[9]|0,this.Fh=hr[10]|0,this.Fl=hr[11]|0,this.Gh=hr[12]|0,this.Gl=hr[13]|0,this.Hh=hr[14]|0,this.Hl=hr[15]|0;}get(){let{Ah:t,Al:r,Bh:o,Bl:n,Ch:i,Cl:s,Dh:a,Dl:c,Eh:u,El:f,Fh:d,Fl:g,Gh:h,Gl:x,Hh:w,Hl:k}=this;return [t,r,o,n,i,s,a,c,u,f,d,g,h,x,w,k]}set(t,r,o,n,i,s,a,c,u,f,d,g,h,x,w,k){this.Ah=t|0,this.Al=r|0,this.Bh=o|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=d|0,this.Fl=g|0,this.Gh=h|0,this.Gl=x|0,this.Hh=w|0,this.Hl=k|0;}process(t,r){for(let O=0;O<16;O++,r+=4)ts[O]=t.getUint32(r),rs[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){let S=ts[O-15]|0,N=rs[O-15]|0,z=ya(S,N,1)^ya(S,N,8)^Cw(S,N,7),C=ba(S,N,1)^ba(S,N,8)^zw(S,N,7),D=ts[O-2]|0,q=rs[O-2]|0,H=ya(D,q,19)^Ul(D,q,61)^Cw(D,q,6),Z=ba(D,q,19)^Ml(D,q,61)^zw(D,q,6),re=nA(C,Z,rs[O-7],rs[O-16]),I=oA(re,z,H,ts[O-7],ts[O-16]);ts[O]=I|0,rs[O]=re|0;}let{Ah:o,Al:n,Bh:i,Bl:s,Ch:a,Cl:c,Dh:u,Dl:f,Eh:d,El:g,Fh:h,Fl:x,Gh:w,Gl:k,Hh:T,Hl:P}=this;for(let O=0;O<80;O++){let S=ya(d,g,14)^ya(d,g,18)^Ul(d,g,41),N=ba(d,g,14)^ba(d,g,18)^Ml(d,g,41),z=d&h^~d&w,C=g&x^~g&k,D=iA(P,N,C,qL[O],rs[O]),q=sA(D,T,S,z,GL[O],ts[O]),H=D|0,Z=ya(o,n,28)^Ul(o,n,34)^Ul(o,n,39),re=ba(o,n,28)^Ml(o,n,34)^Ml(o,n,39),I=o&i^o&a^i&a,l=n&s^n&c^s&c;T=w|0,P=k|0,w=h|0,k=x|0,h=d|0,x=g|0,{h:d,l:g}=ko(u|0,f|0,q|0,H|0),u=a|0,f=c|0,a=i|0,c=s|0,i=o|0,s=n|0;let m=tA(H,re,l);o=rA(m,q,Z,I),n=m|0;}(({h:o,l:n}=ko(this.Ah|0,this.Al|0,o|0,n|0))),{h:i,l:s}=ko(this.Bh|0,this.Bl|0,i|0,s|0),{h:a,l:c}=ko(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l:f}=ko(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=ko(this.Eh|0,this.El|0,d|0,g|0),{h,l:x}=ko(this.Fh|0,this.Fl|0,h|0,x|0),{h:w,l:k}=ko(this.Gh|0,this.Gl|0,w|0,k|0),{h:T,l:P}=ko(this.Hh|0,this.Hl|0,T|0,P|0),this.set(o,n,i,s,a,c,u,f,d,g,h,x,w,k,T,P);}roundClean(){Bn(ts,rs);}destroy(){Bn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},xa=zl(()=>new ch),cA=zl(()=>new Uw);});function jc(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function li(e){if(!jc(e))throw new Error("Uint8Array expected")}function Ro(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Dl(e){let t=e.toString(16);return t.length&1?"0"+t:t}function lA(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Fw:BigInt("0x"+e)}function ns(e){if(li(e),dA)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=WL[e[r]];return t}function uA(e){if(e>=fi._0&&e<=fi._9)return e-fi._0;if(e>=fi.A&&e<=fi.F)return e-(fi.A-10);if(e>=fi.a&&e<=fi.f)return e-(fi.a-10)}function jl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(dA)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let o=new Uint8Array(r);for(let n=0,i=0;n<r;n++,i+=2){let s=uA(e.charCodeAt(i)),a=uA(e.charCodeAt(i+1));if(s===void 0||a===void 0){let c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}o[n]=s*16+a;}return o}function rn(e){return lA(ns(e))}function va(e){return li(e),lA(ns(Uint8Array.from(e).reverse()))}function To(e,t){return jl(e.toString(16).padStart(t*2,"0"))}function Fc(e,t){return To(e,t).reverse()}function Ge(e,t,r){let o;if(typeof t=="string")try{o=jl(t);}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(jc(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");let n=o.length;if(typeof r=="number"&&n!==r)throw new Error(e+" of length "+r+" expected, got "+n);return o}function ar(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];li(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function fh(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function wa(e,t,r){return Mw(e)&&Mw(t)&&Mw(r)&&t<=e&&e<r}function Dr(e,t,r,o){if(!wa(t,r,o))throw new Error("expected valid "+e+": "+r+" <= n < "+o+", got "+t)}function pA(e){let t;for(t=0;e>Fw;e>>=jw,t+=1);return t}function mA(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=Dw(e),n=Dw(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=Dw(0))=>{n=a(fA([0]),d),o=a(),d.length!==0&&(n=a(fA([1]),d),o=a());},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,g=[];for(;d<t;){o=a();let h=o.slice();g.push(h),d+=o.length;}return ar(...g)};return (d,g)=>{s(),c(d);let h;for(;!(h=g(u()));)c();return s(),h}}function oo(e,t,r={}){let o=(n,i,s)=>{let a=KL[i];if(typeof a!="function")throw new Error("invalid validator function");let c=e[n];if(!(s&&c===void 0)&&!a(c,e))throw new Error("param "+String(n)+" is invalid. Expected "+i+", got "+c)};for(let[n,i]of Object.entries(t))o(n,i,false);for(let[n,i]of Object.entries(r))o(n,i,true);return e}function Hc(e){let t=new WeakMap;return (r,...o)=>{let n=t.get(r);if(n!==void 0)return n;let i=e(r,...o);return t.set(r,i),i}}var Fw,jw,dA,WL,fi,Mw,_a,Dw,fA,KL,Ea=F(()=>{Fw=BigInt(0),jw=BigInt(1);dA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",WL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));fi={_0:48,_9:57,A:65,F:70,a:97,f:102};Mw=e=>typeof e=="bigint"&&Fw<=e;_a=e=>(jw<<BigInt(e))-jw,Dw=e=>new Uint8Array(e),fA=e=>Uint8Array.from(e);KL={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||jc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};});function Ue(e,t){let r=e%t;return r>=jr?r:t+r}function at(e,t,r){let o=e;for(;t-- >jr;)o*=o,o%=r;return o}function lh(e,t){if(e===jr)throw new Error("invert: expected non-zero number");if(t<=jr)throw new Error("invert: expected positive modulus, got "+t);let r=Ue(e,t),o=t,n=jr,s=cr;for(;r!==jr;){let u=o/r,f=o%r,d=n-s*u;o=r,r=f,n=s,s=d;}if(o!==cr)throw new Error("invert: does not exist");return Ue(n,t)}function xA(e,t){let r=(e.ORDER+cr)/gA,o=e.pow(t,r);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function YL(e,t){let r=(e.ORDER-yA)/bA,o=e.mul(t,Sa),n=e.pow(o,r),i=e.mul(t,n),s=e.mul(e.mul(i,Sa),n),a=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function XL(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-cr,r=0;for(;t%Sa===jr;)t/=Sa,r++;let o=Sa,n=pi(e);for(;hA(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return xA;let i=n.pow(o,t),s=(t+cr)/Sa;return function(c,u){if(c.is0(u))return u;if(hA(c,u)!==1)throw new Error("Cannot find square root");let f=r,d=c.mul(c.ONE,i),g=c.pow(u,t),h=c.pow(u,s);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let x=1,w=c.sqr(g);for(;!c.eql(w,c.ONE);)if(x++,w=c.sqr(w),x===f)throw new Error("Cannot find square root");let k=cr<<BigInt(f-x-1),T=c.pow(d,k);f=x,d=c.sqr(T),g=c.mul(g,d),h=c.mul(h,T);}return h}}function QL(e){return e%gA===JL?xA:e%bA===yA?YL:XL(e)}function dh(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=eU.reduce((o,n)=>(o[n]="function",o),t);return oo(e,r)}function tU(e,t,r){if(r<jr)throw new Error("invalid exponent, negatives unsupported");if(r===jr)return e.ONE;if(r===cr)return t;let o=e.ONE,n=t;for(;r>jr;)r&cr&&(o=e.mul(o,n)),n=e.sqr(n),r>>=cr;return o}function di(e,t,r=false){let o=new Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((s,a,c)=>e.is0(a)?s:(o[c]=s,e.mul(s,a)),e.ONE),i=e.inv(n);return t.reduceRight((s,a,c)=>e.is0(a)?s:(o[c]=e.mul(s,o[c]),e.mul(s,a)),i),o}function hA(e,t){let r=(e.ORDER-cr)/Sa,o=e.pow(t,r),n=e.eql(o,e.ONE),i=e.eql(o,e.ZERO),s=e.eql(o,e.neg(e.ONE));if(!n&&!i&&!s)throw new Error("invalid Legendre symbol result");return n?1:i?0:-1}function Hw(e,t){t!==void 0&&ha(t);let r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return {nBitLength:r,nByteLength:o}}function pi(e,t,r=false,o={}){if(e<=jr)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:n,nByteLength:i}=Hw(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s,a=Object.freeze({ORDER:e,isLE:r,BITS:n,BYTES:i,MASK:_a(n),ZERO:jr,ONE:cr,create:c=>Ue(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return jr<=c&&c<e},is0:c=>c===jr,isOdd:c=>(c&cr)===cr,neg:c=>Ue(-c,e),eql:(c,u)=>c===u,sqr:c=>Ue(c*c,e),add:(c,u)=>Ue(c+u,e),sub:(c,u)=>Ue(c-u,e),mul:(c,u)=>Ue(c*u,e),pow:(c,u)=>tU(a,c,u),div:(c,u)=>Ue(c*lh(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>lh(c,e),sqrt:o.sqrt||(c=>(s||(s=QL(e)),s(a,c))),toBytes:c=>r?Fc(c,i):To(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?va(c):rn(c)},invertBatch:c=>di(a,c),cmov:(c,u,f)=>f?u:c});return Object.freeze(a)}function wA(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function Vw(e){let t=wA(e);return t+Math.ceil(t/2)}function _A(e,t,r=false){let o=e.length,n=wA(t),i=Vw(t);if(o<16||o<i||o>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+o);let s=r?va(e):rn(e),a=Ue(s,t-cr)+cr;return r?Fc(a,n):To(a,n)}var jr,cr,Sa,JL,gA,yA,bA,vA,eU,Ia=F(()=>{ci();Ea();jr=BigInt(0),cr=BigInt(1),Sa=BigInt(2),JL=BigInt(3),gA=BigInt(4),yA=BigInt(5),bA=BigInt(8);vA=(e,t)=>(Ue(e,t)&cr)===cr,eU=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];});function Zw(e,t){let r=t.negate();return e?r:t}function IA(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Gw(e,t){IA(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=_a(e),s=BigInt(e);return {windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function SA(e,t,r){let{windowSize:o,mask:n,maxNumber:i,shiftBy:s}=r,a=Number(e&n),c=e>>s;a>o&&(a-=i,c+=Kw);let u=t*o,f=u+Math.abs(a)-1,d=a===0,g=a<0,h=t%2!==0;return {nextN:c,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:u}}function rU(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,o)=>{if(!(r instanceof t))throw new Error("invalid point at index "+o)});}function nU(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+o)});}function Ww(e){return AA.get(e)||1}function ph(e,t){return {constTimeNegate:Zw,hasPrecomputes(r){return Ww(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>EA;)o&Kw&&(n=n.add(i)),i=i.double(),o>>=Kw;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=Gw(o,t),s=[],a=r,c=a;for(let u=0;u<n;u++){c=a,s.push(c);for(let f=1;f<i;f++)c=c.add(a),s.push(c);a=c.double();}return s},wNAF(r,o,n){let i=e.ZERO,s=e.BASE,a=Gw(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:x}=SA(n,c,a);n=u,d?s=s.add(Zw(h,o[x])):i=i.add(Zw(g,o[f]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=Gw(r,t);for(let a=0;a<s.windows&&n!==EA;a++){let{nextN:c,offset:u,isZero:f,isNeg:d}=SA(n,a,s);if(n=c,!f){let g=o[u];i=i.add(d?g.negate():g);}}return i},getPrecomputes(r,o,n){let i=qw.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&qw.set(o,n(i))),i},wNAFCached(r,o,n){let i=Ww(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=Ww(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){IA(o,t),AA.set(r,o),qw.delete(r);}}}function mh(e,t,r,o){rU(r,e),nU(o,t);let n=r.length,i=o.length;if(n!==i)throw new Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=pA(BigInt(n)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let u=_a(c),f=new Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,g=s;for(let h=d;h>=0;h-=c){f.fill(s);for(let w=0;w<i;w++){let k=o[w],T=Number(k>>BigInt(h)&u);f[T]=f[T].add(r[w]);}let x=s;for(let w=f.length-1,k=s;w>0;w--)k=k.add(f[w]),x=x.add(k);if(g=g.add(x),h!==0)for(let w=0;w<c;w++)g=g.double();}return g}function Fl(e){return dh(e.Fp),oo(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Hw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var EA,Kw,qw,AA,Jw=F(()=>{Ia();Ea();EA=BigInt(0),Kw=BigInt(1);qw=new WeakMap,AA=new WeakMap;});function os(e,t){if(Hl(e),Hl(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function cU(e,t){let r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function Hl(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function uU(e,t,r,o){li(e),li(t),Hl(r),t.length>255&&(t=o(ar(fh("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:i}=o,s=Math.ceil(r/n);if(r>65535||s>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=ar(t,os(t.length,1)),c=os(0,i),u=os(r,2),f=new Array(s),d=o(ar(c,e,u,os(0,1),a));f[0]=o(ar(d,os(1,1),a));for(let h=1;h<=s;h++){let x=[cU(d,f[h-1]),os(h+1,1),a];f[h]=o(ar(...x));}return ar(...f).slice(0,r)}function fU(e,t,r,o,n){if(li(e),li(t),Hl(r),t.length>255){let i=Math.ceil(2*o/8);t=n.create({dkLen:i}).update(fh("H2C-OVERSIZE-DST-")).update(t).digest();}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(os(r,2)).update(t).update(os(t.length,1)).digest()}function TA(e,t,r){oo(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:o,k:n,m:i,hash:s,expand:a,DST:c}=r;li(e),Hl(t);let u=typeof c=="string"?fh(c):c,f=o.toString(2).length,d=Math.ceil((f+n)/8),g=t*i*d,h;if(a==="xmd")h=uU(e,u,g,s);else if(a==="xof")h=fU(e,u,g,n,s);else if(a==="_internal_pass")h=e;else throw new Error('expand must be "xmd" or "xof"');let x=new Array(t);for(let w=0;w<t;w++){let k=new Array(i);for(let T=0;T<i;T++){let P=d*(T+w*i),O=h.subarray(P,P+d);k[T]=Ue(aU(O),o);}x[w]=k;}return x}function $A(e,t){let r=t.map(o=>Array.from(o).reverse());return (o,n)=>{let[i,s,a,c]=r.map(d=>d.reduce((g,h)=>e.add(e.mul(g,o),h))),[u,f]=di(e,[s,c],true);return o=e.mul(i,u),n=e.mul(n,e.mul(a,f)),{x:o,y:n}}}function OA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");function o(i){return e.fromAffine(t(i))}function n(i){let s=i.clearCofactor();return s.equals(e.ZERO)?e.ZERO:(s.assertValidity(),s)}return {defaults:r,hashToCurve(i,s){let a=TA(i,2,{...r,DST:r.DST,...s}),c=o(a[0]),u=o(a[1]);return n(c.add(u))},encodeToCurve(i,s){let a=TA(i,1,{...r,DST:r.encodeDST,...s});return n(o(a[0]))},mapToCurve(i){if(!Array.isArray(i))throw new Error("expected array of bigints");for(let s of i)if(typeof s!="bigint")throw new Error("expected array of bigints");return n(o(i))}}}var aU,NA=F(()=>{Ia();Ea();aU=rn;});var zA=Kr(()=>{});var Qw=Kr((LA,Xw)=>{(function(e,t){function r(I,l){if(!I)throw new Error(l||"Assertion failed")}function o(I,l){I.super_=l;var m=function(){};m.prototype=l.prototype,I.prototype=new m,I.prototype.constructor=I;}function n(I,l,m){if(n.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((l==="le"||l==="be")&&(m=l,l=10),this._init(I||0,l||10,m||"be"));}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var i;try{typeof window<"u"&&typeof window.Buffer<"u"?i=window.Buffer:i=zA().Buffer;}catch{}n.isBN=function(l){return l instanceof n?true:l!==null&&typeof l=="object"&&l.constructor.wordSize===n.wordSize&&Array.isArray(l.words)},n.max=function(l,m){return l.cmp(m)>0?l:m},n.min=function(l,m){return l.cmp(m)<0?l:m},n.prototype._init=function(l,m,y){if(typeof l=="number")return this._initNumber(l,m,y);if(typeof l=="object")return this._initArray(l,m,y);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),l=l.toString().replace(/\s+/g,"");var b=0;l[0]==="-"&&(b++,this.negative=1),b<l.length&&(m===16?this._parseHex(l,b,y):(this._parseBase(l,m,b),y==="le"&&this._initArray(this.toArray(),m,y)));},n.prototype._initNumber=function(l,m,y){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),m,y);},n.prototype._initArray=function(l,m,y){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var v,E,R=0;if(y==="be")for(b=l.length-1,v=0;b>=0;b-=3)E=l[b]|l[b-1]<<8|l[b-2]<<16,this.words[v]|=E<<R&67108863,this.words[v+1]=E>>>26-R&67108863,R+=24,R>=26&&(R-=26,v++);else if(y==="le")for(b=0,v=0;b<l.length;b+=3)E=l[b]|l[b+1]<<8|l[b+2]<<16,this.words[v]|=E<<R&67108863,this.words[v+1]=E>>>26-R&67108863,R+=24,R>=26&&(R-=26,v++);return this._strip()};function s(I,l){var m=I.charCodeAt(l);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(false,"Invalid character in "+I);}function a(I,l,m){var y=s(I,m);return m-1>=l&&(y|=s(I,m-1)<<4),y}n.prototype._parseHex=function(l,m,y){this.length=Math.ceil((l.length-m)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var v=0,E=0,R;if(y==="be")for(b=l.length-1;b>=m;b-=2)R=a(l,m,b)<<v,this.words[E]|=R&67108863,v>=18?(v-=18,E+=1,this.words[E]|=R>>>26):v+=8;else {var _=l.length-m;for(b=_%2===0?m+1:m;b<l.length;b+=2)R=a(l,m,b)<<v,this.words[E]|=R&67108863,v>=18?(v-=18,E+=1,this.words[E]|=R>>>26):v+=8;}this._strip();};function c(I,l,m,y){for(var b=0,v=0,E=Math.min(I.length,m),R=l;R<E;R++){var _=I.charCodeAt(R)-48;b*=y,_>=49?v=_-49+10:_>=17?v=_-17+10:v=_,r(_>=0&&v<y,"Invalid character"),b+=v;}return b}n.prototype._parseBase=function(l,m,y){this.words=[0],this.length=1;for(var b=0,v=1;v<=67108863;v*=m)b++;b--,v=v/m|0;for(var E=l.length-y,R=E%b,_=Math.min(E,E-R)+y,p=0,A=y;A<_;A+=b)p=c(l,A,A+b,m),this.imuln(v),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(R!==0){var G=1;for(p=c(l,A,l.length,m),A=0;A<R;A++)G*=m;this.imuln(G),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);}this._strip();},n.prototype.copy=function(l){l.words=new Array(this.length);for(var m=0;m<this.length;m++)l.words[m]=this.words[m];l.length=this.length,l.negative=this.negative,l.red=this.red;};function u(I,l){I.words=l.words,I.length=l.length,I.negative=l.negative,I.red=l.red;}if(n.prototype._move=function(l){u(l,this);},n.prototype.clone=function(){var l=new n(null);return this.copy(l),l},n.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f;}catch{n.prototype.inspect=f;}else n.prototype.inspect=f;function f(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(l,m){l=l||10,m=m|0||1;var y;if(l===16||l==="hex"){y="";for(var b=0,v=0,E=0;E<this.length;E++){var R=this.words[E],_=((R<<b|v)&16777215).toString(16);v=R>>>24-b&16777215,b+=2,b>=26&&(b-=26,E--),v!==0||E!==this.length-1?y=d[6-_.length]+_+y:y=_+y;}for(v!==0&&(y=v.toString(16)+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(l===(l|0)&&l>=2&&l<=36){var p=g[l],A=h[l];y="";var G=this.clone();for(G.negative=0;!G.isZero();){var J=G.modrn(A).toString(l);G=G.idivn(A),G.isZero()?y=J+y:y=d[p-J.length]+J+y;}for(this.isZero()&&(y="0"+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(false,"Base should be between 2 and 36");},n.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(false,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},n.prototype.toJSON=function(){return this.toString(16,2)},i&&(n.prototype.toBuffer=function(l,m){return this.toArrayLike(i,l,m)}),n.prototype.toArray=function(l,m){return this.toArrayLike(Array,l,m)};var x=function(l,m){return l.allocUnsafe?l.allocUnsafe(m):new l(m)};n.prototype.toArrayLike=function(l,m,y){this._strip();var b=this.byteLength(),v=y||Math.max(1,b);r(b<=v,"byte array longer than desired length"),r(v>0,"Requested array length <= 0");var E=x(l,v),R=m==="le"?"LE":"BE";return this["_toArrayLike"+R](E,b),E},n.prototype._toArrayLikeLE=function(l,m){for(var y=0,b=0,v=0,E=0;v<this.length;v++){var R=this.words[v]<<E|b;l[y++]=R&255,y<l.length&&(l[y++]=R>>8&255),y<l.length&&(l[y++]=R>>16&255),E===6?(y<l.length&&(l[y++]=R>>24&255),b=0,E=0):(b=R>>>24,E+=2);}if(y<l.length)for(l[y++]=b;y<l.length;)l[y++]=0;},n.prototype._toArrayLikeBE=function(l,m){for(var y=l.length-1,b=0,v=0,E=0;v<this.length;v++){var R=this.words[v]<<E|b;l[y--]=R&255,y>=0&&(l[y--]=R>>8&255),y>=0&&(l[y--]=R>>16&255),E===6?(y>=0&&(l[y--]=R>>24&255),b=0,E=0):(b=R>>>24,E+=2);}if(y>=0)for(l[y--]=b;y>=0;)l[y--]=0;},Math.clz32?n.prototype._countBits=function(l){return 32-Math.clz32(l)}:n.prototype._countBits=function(l){var m=l,y=0;return m>=4096&&(y+=13,m>>>=13),m>=64&&(y+=7,m>>>=7),m>=8&&(y+=4,m>>>=4),m>=2&&(y+=2,m>>>=2),y+m},n.prototype._zeroBits=function(l){if(l===0)return 26;var m=l,y=0;return (m&8191)===0&&(y+=13,m>>>=13),(m&127)===0&&(y+=7,m>>>=7),(m&15)===0&&(y+=4,m>>>=4),(m&3)===0&&(y+=2,m>>>=2),(m&1)===0&&y++,y},n.prototype.bitLength=function(){var l=this.words[this.length-1],m=this._countBits(l);return (this.length-1)*26+m};function w(I){for(var l=new Array(I.bitLength()),m=0;m<l.length;m++){var y=m/26|0,b=m%26;l[m]=I.words[y]>>>b&1;}return l}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,m=0;m<this.length;m++){var y=this._zeroBits(this.words[m]);if(l+=y,y!==26)break}return l},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},n.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var m=0;m<l.length;m++)this.words[m]=this.words[m]|l.words[m];return this._strip()},n.prototype.ior=function(l){return r((this.negative|l.negative)===0),this.iuor(l)},n.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},n.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},n.prototype.iuand=function(l){var m;this.length>l.length?m=l:m=this;for(var y=0;y<m.length;y++)this.words[y]=this.words[y]&l.words[y];return this.length=m.length,this._strip()},n.prototype.iand=function(l){return r((this.negative|l.negative)===0),this.iuand(l)},n.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},n.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},n.prototype.iuxor=function(l){var m,y;this.length>l.length?(m=this,y=l):(m=l,y=this);for(var b=0;b<y.length;b++)this.words[b]=m.words[b]^y.words[b];if(this!==m)for(;b<m.length;b++)this.words[b]=m.words[b];return this.length=m.length,this._strip()},n.prototype.ixor=function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},n.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},n.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},n.prototype.inotn=function(l){r(typeof l=="number"&&l>=0);var m=Math.ceil(l/26)|0,y=l%26;this._expand(m),y>0&&m--;for(var b=0;b<m;b++)this.words[b]=~this.words[b]&67108863;for(y>0&&(this.words[b]=~this.words[b]&67108863>>26-y,b++);b<this.length;b++)this.words[b]=0;return this._strip()},n.prototype.notn=function(l){return this.clone().inotn(l)},n.prototype.setn=function(l,m){r(typeof l=="number"&&l>=0);var y=l/26|0,b=l%26;return this._expand(y+1),m?this.words[y]=this.words[y]|1<<b:this.words[y]=this.words[y]&~(1<<b),this._strip()},n.prototype.iadd=function(l){var m;if(this.negative!==0&&l.negative===0)return this.negative=0,m=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,m=this.isub(l),l.negative=1,m._normSign();var y,b;this.length>l.length?(y=this,b=l):(y=l,b=this);for(var v=0,E=0;E<b.length;E++)m=(y.words[E]|0)+(b.words[E]|0)+v,this.words[E]=m&67108863,v=m>>>26;for(;v!==0&&E<y.length;E++)m=(y.words[E]|0)+v,this.words[E]=m&67108863,v=m>>>26;if(this.length=y.length,v!==0)this.words[this.length]=v,this.length++;else if(y!==this)for(;E<y.length;E++)this.words[E]=y.words[E];return this},n.prototype.add=function(l){var m;return l.negative!==0&&this.negative===0?(l.negative=0,m=this.sub(l),l.negative^=1,m):l.negative===0&&this.negative!==0?(this.negative=0,m=l.sub(this),this.negative=1,m):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},n.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var m=this.iadd(l);return l.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var y=this.cmp(l);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,v;y>0?(b=this,v=l):(b=l,v=this);for(var E=0,R=0;R<v.length;R++)m=(b.words[R]|0)-(v.words[R]|0)+E,E=m>>26,this.words[R]=m&67108863;for(;E!==0&&R<b.length;R++)m=(b.words[R]|0)+E,E=m>>26,this.words[R]=m&67108863;if(E===0&&R<b.length&&b!==this)for(;R<b.length;R++)this.words[R]=b.words[R];return this.length=Math.max(this.length,R),b!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(l){return this.clone().isub(l)};function k(I,l,m){m.negative=l.negative^I.negative;var y=I.length+l.length|0;m.length=y,y=y-1|0;var b=I.words[0]|0,v=l.words[0]|0,E=b*v,R=E&67108863,_=E/67108864|0;m.words[0]=R;for(var p=1;p<y;p++){for(var A=_>>>26,G=_&67108863,J=Math.min(p,l.length-1),Q=Math.max(0,p-I.length+1);Q<=J;Q++){var ae=p-Q|0;b=I.words[ae]|0,v=l.words[Q]|0,E=b*v+G,A+=E/67108864|0,G=E&67108863;}m.words[p]=G|0,_=A|0;}return _!==0?m.words[p]=_|0:m.length--,m._strip()}var T=function(l,m,y){var b=l.words,v=m.words,E=y.words,R=0,_,p,A,G=b[0]|0,J=G&8191,Q=G>>>13,ae=b[1]|0,he=ae&8191,ye=ae>>>13,Ke=b[2]|0,Se=Ke&8191,_e=Ke>>>13,tr=b[3]|0,Ce=tr&8191,je=tr>>>13,Di=b[4]|0,mt=Di&8191,gt=Di>>>13,Lp=b[5]|0,yt=Lp&8191,bt=Lp>>>13,NE=b[6]|0,At=NE&8191,kt=NE>>>13,PE=b[7]|0,Rt=PE&8191,Tt=PE>>>13,BE=b[8]|0,$t=BE&8191,Ot=BE>>>13,CE=b[9]|0,Nt=CE&8191,Pt=CE>>>13,zE=v[0]|0,Bt=zE&8191,Ct=zE>>>13,LE=v[1]|0,zt=LE&8191,Lt=LE>>>13,UE=v[2]|0,Ut=UE&8191,Mt=UE>>>13,ME=v[3]|0,Dt=ME&8191,jt=ME>>>13,DE=v[4]|0,Ft=DE&8191,Ht=DE>>>13,jE=v[5]|0,Vt=jE&8191,Zt=jE>>>13,FE=v[6]|0,Gt=FE&8191,qt=FE>>>13,HE=v[7]|0,Wt=HE&8191,Kt=HE>>>13,VE=v[8]|0,Jt=VE&8191,Yt=VE>>>13,ZE=v[9]|0,Xt=ZE&8191,Qt=ZE>>>13;y.negative=l.negative^m.negative,y.length=19,_=Math.imul(J,Bt),p=Math.imul(J,Ct),p=p+Math.imul(Q,Bt)|0,A=Math.imul(Q,Ct);var qy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(qy>>>26)|0,qy&=67108863,_=Math.imul(he,Bt),p=Math.imul(he,Ct),p=p+Math.imul(ye,Bt)|0,A=Math.imul(ye,Ct),_=_+Math.imul(J,zt)|0,p=p+Math.imul(J,Lt)|0,p=p+Math.imul(Q,zt)|0,A=A+Math.imul(Q,Lt)|0;var Wy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Wy>>>26)|0,Wy&=67108863,_=Math.imul(Se,Bt),p=Math.imul(Se,Ct),p=p+Math.imul(_e,Bt)|0,A=Math.imul(_e,Ct),_=_+Math.imul(he,zt)|0,p=p+Math.imul(he,Lt)|0,p=p+Math.imul(ye,zt)|0,A=A+Math.imul(ye,Lt)|0,_=_+Math.imul(J,Ut)|0,p=p+Math.imul(J,Mt)|0,p=p+Math.imul(Q,Ut)|0,A=A+Math.imul(Q,Mt)|0;var Ky=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Ky>>>26)|0,Ky&=67108863,_=Math.imul(Ce,Bt),p=Math.imul(Ce,Ct),p=p+Math.imul(je,Bt)|0,A=Math.imul(je,Ct),_=_+Math.imul(Se,zt)|0,p=p+Math.imul(Se,Lt)|0,p=p+Math.imul(_e,zt)|0,A=A+Math.imul(_e,Lt)|0,_=_+Math.imul(he,Ut)|0,p=p+Math.imul(he,Mt)|0,p=p+Math.imul(ye,Ut)|0,A=A+Math.imul(ye,Mt)|0,_=_+Math.imul(J,Dt)|0,p=p+Math.imul(J,jt)|0,p=p+Math.imul(Q,Dt)|0,A=A+Math.imul(Q,jt)|0;var Jy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Jy>>>26)|0,Jy&=67108863,_=Math.imul(mt,Bt),p=Math.imul(mt,Ct),p=p+Math.imul(gt,Bt)|0,A=Math.imul(gt,Ct),_=_+Math.imul(Ce,zt)|0,p=p+Math.imul(Ce,Lt)|0,p=p+Math.imul(je,zt)|0,A=A+Math.imul(je,Lt)|0,_=_+Math.imul(Se,Ut)|0,p=p+Math.imul(Se,Mt)|0,p=p+Math.imul(_e,Ut)|0,A=A+Math.imul(_e,Mt)|0,_=_+Math.imul(he,Dt)|0,p=p+Math.imul(he,jt)|0,p=p+Math.imul(ye,Dt)|0,A=A+Math.imul(ye,jt)|0,_=_+Math.imul(J,Ft)|0,p=p+Math.imul(J,Ht)|0,p=p+Math.imul(Q,Ft)|0,A=A+Math.imul(Q,Ht)|0;var Yy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Yy>>>26)|0,Yy&=67108863,_=Math.imul(yt,Bt),p=Math.imul(yt,Ct),p=p+Math.imul(bt,Bt)|0,A=Math.imul(bt,Ct),_=_+Math.imul(mt,zt)|0,p=p+Math.imul(mt,Lt)|0,p=p+Math.imul(gt,zt)|0,A=A+Math.imul(gt,Lt)|0,_=_+Math.imul(Ce,Ut)|0,p=p+Math.imul(Ce,Mt)|0,p=p+Math.imul(je,Ut)|0,A=A+Math.imul(je,Mt)|0,_=_+Math.imul(Se,Dt)|0,p=p+Math.imul(Se,jt)|0,p=p+Math.imul(_e,Dt)|0,A=A+Math.imul(_e,jt)|0,_=_+Math.imul(he,Ft)|0,p=p+Math.imul(he,Ht)|0,p=p+Math.imul(ye,Ft)|0,A=A+Math.imul(ye,Ht)|0,_=_+Math.imul(J,Vt)|0,p=p+Math.imul(J,Zt)|0,p=p+Math.imul(Q,Vt)|0,A=A+Math.imul(Q,Zt)|0;var Xy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Xy>>>26)|0,Xy&=67108863,_=Math.imul(At,Bt),p=Math.imul(At,Ct),p=p+Math.imul(kt,Bt)|0,A=Math.imul(kt,Ct),_=_+Math.imul(yt,zt)|0,p=p+Math.imul(yt,Lt)|0,p=p+Math.imul(bt,zt)|0,A=A+Math.imul(bt,Lt)|0,_=_+Math.imul(mt,Ut)|0,p=p+Math.imul(mt,Mt)|0,p=p+Math.imul(gt,Ut)|0,A=A+Math.imul(gt,Mt)|0,_=_+Math.imul(Ce,Dt)|0,p=p+Math.imul(Ce,jt)|0,p=p+Math.imul(je,Dt)|0,A=A+Math.imul(je,jt)|0,_=_+Math.imul(Se,Ft)|0,p=p+Math.imul(Se,Ht)|0,p=p+Math.imul(_e,Ft)|0,A=A+Math.imul(_e,Ht)|0,_=_+Math.imul(he,Vt)|0,p=p+Math.imul(he,Zt)|0,p=p+Math.imul(ye,Vt)|0,A=A+Math.imul(ye,Zt)|0,_=_+Math.imul(J,Gt)|0,p=p+Math.imul(J,qt)|0,p=p+Math.imul(Q,Gt)|0,A=A+Math.imul(Q,qt)|0;var Qy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Qy>>>26)|0,Qy&=67108863,_=Math.imul(Rt,Bt),p=Math.imul(Rt,Ct),p=p+Math.imul(Tt,Bt)|0,A=Math.imul(Tt,Ct),_=_+Math.imul(At,zt)|0,p=p+Math.imul(At,Lt)|0,p=p+Math.imul(kt,zt)|0,A=A+Math.imul(kt,Lt)|0,_=_+Math.imul(yt,Ut)|0,p=p+Math.imul(yt,Mt)|0,p=p+Math.imul(bt,Ut)|0,A=A+Math.imul(bt,Mt)|0,_=_+Math.imul(mt,Dt)|0,p=p+Math.imul(mt,jt)|0,p=p+Math.imul(gt,Dt)|0,A=A+Math.imul(gt,jt)|0,_=_+Math.imul(Ce,Ft)|0,p=p+Math.imul(Ce,Ht)|0,p=p+Math.imul(je,Ft)|0,A=A+Math.imul(je,Ht)|0,_=_+Math.imul(Se,Vt)|0,p=p+Math.imul(Se,Zt)|0,p=p+Math.imul(_e,Vt)|0,A=A+Math.imul(_e,Zt)|0,_=_+Math.imul(he,Gt)|0,p=p+Math.imul(he,qt)|0,p=p+Math.imul(ye,Gt)|0,A=A+Math.imul(ye,qt)|0,_=_+Math.imul(J,Wt)|0,p=p+Math.imul(J,Kt)|0,p=p+Math.imul(Q,Wt)|0,A=A+Math.imul(Q,Kt)|0;var eb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(eb>>>26)|0,eb&=67108863,_=Math.imul($t,Bt),p=Math.imul($t,Ct),p=p+Math.imul(Ot,Bt)|0,A=Math.imul(Ot,Ct),_=_+Math.imul(Rt,zt)|0,p=p+Math.imul(Rt,Lt)|0,p=p+Math.imul(Tt,zt)|0,A=A+Math.imul(Tt,Lt)|0,_=_+Math.imul(At,Ut)|0,p=p+Math.imul(At,Mt)|0,p=p+Math.imul(kt,Ut)|0,A=A+Math.imul(kt,Mt)|0,_=_+Math.imul(yt,Dt)|0,p=p+Math.imul(yt,jt)|0,p=p+Math.imul(bt,Dt)|0,A=A+Math.imul(bt,jt)|0,_=_+Math.imul(mt,Ft)|0,p=p+Math.imul(mt,Ht)|0,p=p+Math.imul(gt,Ft)|0,A=A+Math.imul(gt,Ht)|0,_=_+Math.imul(Ce,Vt)|0,p=p+Math.imul(Ce,Zt)|0,p=p+Math.imul(je,Vt)|0,A=A+Math.imul(je,Zt)|0,_=_+Math.imul(Se,Gt)|0,p=p+Math.imul(Se,qt)|0,p=p+Math.imul(_e,Gt)|0,A=A+Math.imul(_e,qt)|0,_=_+Math.imul(he,Wt)|0,p=p+Math.imul(he,Kt)|0,p=p+Math.imul(ye,Wt)|0,A=A+Math.imul(ye,Kt)|0,_=_+Math.imul(J,Jt)|0,p=p+Math.imul(J,Yt)|0,p=p+Math.imul(Q,Jt)|0,A=A+Math.imul(Q,Yt)|0;var tb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(tb>>>26)|0,tb&=67108863,_=Math.imul(Nt,Bt),p=Math.imul(Nt,Ct),p=p+Math.imul(Pt,Bt)|0,A=Math.imul(Pt,Ct),_=_+Math.imul($t,zt)|0,p=p+Math.imul($t,Lt)|0,p=p+Math.imul(Ot,zt)|0,A=A+Math.imul(Ot,Lt)|0,_=_+Math.imul(Rt,Ut)|0,p=p+Math.imul(Rt,Mt)|0,p=p+Math.imul(Tt,Ut)|0,A=A+Math.imul(Tt,Mt)|0,_=_+Math.imul(At,Dt)|0,p=p+Math.imul(At,jt)|0,p=p+Math.imul(kt,Dt)|0,A=A+Math.imul(kt,jt)|0,_=_+Math.imul(yt,Ft)|0,p=p+Math.imul(yt,Ht)|0,p=p+Math.imul(bt,Ft)|0,A=A+Math.imul(bt,Ht)|0,_=_+Math.imul(mt,Vt)|0,p=p+Math.imul(mt,Zt)|0,p=p+Math.imul(gt,Vt)|0,A=A+Math.imul(gt,Zt)|0,_=_+Math.imul(Ce,Gt)|0,p=p+Math.imul(Ce,qt)|0,p=p+Math.imul(je,Gt)|0,A=A+Math.imul(je,qt)|0,_=_+Math.imul(Se,Wt)|0,p=p+Math.imul(Se,Kt)|0,p=p+Math.imul(_e,Wt)|0,A=A+Math.imul(_e,Kt)|0,_=_+Math.imul(he,Jt)|0,p=p+Math.imul(he,Yt)|0,p=p+Math.imul(ye,Jt)|0,A=A+Math.imul(ye,Yt)|0,_=_+Math.imul(J,Xt)|0,p=p+Math.imul(J,Qt)|0,p=p+Math.imul(Q,Xt)|0,A=A+Math.imul(Q,Qt)|0;var rb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(rb>>>26)|0,rb&=67108863,_=Math.imul(Nt,zt),p=Math.imul(Nt,Lt),p=p+Math.imul(Pt,zt)|0,A=Math.imul(Pt,Lt),_=_+Math.imul($t,Ut)|0,p=p+Math.imul($t,Mt)|0,p=p+Math.imul(Ot,Ut)|0,A=A+Math.imul(Ot,Mt)|0,_=_+Math.imul(Rt,Dt)|0,p=p+Math.imul(Rt,jt)|0,p=p+Math.imul(Tt,Dt)|0,A=A+Math.imul(Tt,jt)|0,_=_+Math.imul(At,Ft)|0,p=p+Math.imul(At,Ht)|0,p=p+Math.imul(kt,Ft)|0,A=A+Math.imul(kt,Ht)|0,_=_+Math.imul(yt,Vt)|0,p=p+Math.imul(yt,Zt)|0,p=p+Math.imul(bt,Vt)|0,A=A+Math.imul(bt,Zt)|0,_=_+Math.imul(mt,Gt)|0,p=p+Math.imul(mt,qt)|0,p=p+Math.imul(gt,Gt)|0,A=A+Math.imul(gt,qt)|0,_=_+Math.imul(Ce,Wt)|0,p=p+Math.imul(Ce,Kt)|0,p=p+Math.imul(je,Wt)|0,A=A+Math.imul(je,Kt)|0,_=_+Math.imul(Se,Jt)|0,p=p+Math.imul(Se,Yt)|0,p=p+Math.imul(_e,Jt)|0,A=A+Math.imul(_e,Yt)|0,_=_+Math.imul(he,Xt)|0,p=p+Math.imul(he,Qt)|0,p=p+Math.imul(ye,Xt)|0,A=A+Math.imul(ye,Qt)|0;var nb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(nb>>>26)|0,nb&=67108863,_=Math.imul(Nt,Ut),p=Math.imul(Nt,Mt),p=p+Math.imul(Pt,Ut)|0,A=Math.imul(Pt,Mt),_=_+Math.imul($t,Dt)|0,p=p+Math.imul($t,jt)|0,p=p+Math.imul(Ot,Dt)|0,A=A+Math.imul(Ot,jt)|0,_=_+Math.imul(Rt,Ft)|0,p=p+Math.imul(Rt,Ht)|0,p=p+Math.imul(Tt,Ft)|0,A=A+Math.imul(Tt,Ht)|0,_=_+Math.imul(At,Vt)|0,p=p+Math.imul(At,Zt)|0,p=p+Math.imul(kt,Vt)|0,A=A+Math.imul(kt,Zt)|0,_=_+Math.imul(yt,Gt)|0,p=p+Math.imul(yt,qt)|0,p=p+Math.imul(bt,Gt)|0,A=A+Math.imul(bt,qt)|0,_=_+Math.imul(mt,Wt)|0,p=p+Math.imul(mt,Kt)|0,p=p+Math.imul(gt,Wt)|0,A=A+Math.imul(gt,Kt)|0,_=_+Math.imul(Ce,Jt)|0,p=p+Math.imul(Ce,Yt)|0,p=p+Math.imul(je,Jt)|0,A=A+Math.imul(je,Yt)|0,_=_+Math.imul(Se,Xt)|0,p=p+Math.imul(Se,Qt)|0,p=p+Math.imul(_e,Xt)|0,A=A+Math.imul(_e,Qt)|0;var ob=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(ob>>>26)|0,ob&=67108863,_=Math.imul(Nt,Dt),p=Math.imul(Nt,jt),p=p+Math.imul(Pt,Dt)|0,A=Math.imul(Pt,jt),_=_+Math.imul($t,Ft)|0,p=p+Math.imul($t,Ht)|0,p=p+Math.imul(Ot,Ft)|0,A=A+Math.imul(Ot,Ht)|0,_=_+Math.imul(Rt,Vt)|0,p=p+Math.imul(Rt,Zt)|0,p=p+Math.imul(Tt,Vt)|0,A=A+Math.imul(Tt,Zt)|0,_=_+Math.imul(At,Gt)|0,p=p+Math.imul(At,qt)|0,p=p+Math.imul(kt,Gt)|0,A=A+Math.imul(kt,qt)|0,_=_+Math.imul(yt,Wt)|0,p=p+Math.imul(yt,Kt)|0,p=p+Math.imul(bt,Wt)|0,A=A+Math.imul(bt,Kt)|0,_=_+Math.imul(mt,Jt)|0,p=p+Math.imul(mt,Yt)|0,p=p+Math.imul(gt,Jt)|0,A=A+Math.imul(gt,Yt)|0,_=_+Math.imul(Ce,Xt)|0,p=p+Math.imul(Ce,Qt)|0,p=p+Math.imul(je,Xt)|0,A=A+Math.imul(je,Qt)|0;var ib=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(ib>>>26)|0,ib&=67108863,_=Math.imul(Nt,Ft),p=Math.imul(Nt,Ht),p=p+Math.imul(Pt,Ft)|0,A=Math.imul(Pt,Ht),_=_+Math.imul($t,Vt)|0,p=p+Math.imul($t,Zt)|0,p=p+Math.imul(Ot,Vt)|0,A=A+Math.imul(Ot,Zt)|0,_=_+Math.imul(Rt,Gt)|0,p=p+Math.imul(Rt,qt)|0,p=p+Math.imul(Tt,Gt)|0,A=A+Math.imul(Tt,qt)|0,_=_+Math.imul(At,Wt)|0,p=p+Math.imul(At,Kt)|0,p=p+Math.imul(kt,Wt)|0,A=A+Math.imul(kt,Kt)|0,_=_+Math.imul(yt,Jt)|0,p=p+Math.imul(yt,Yt)|0,p=p+Math.imul(bt,Jt)|0,A=A+Math.imul(bt,Yt)|0,_=_+Math.imul(mt,Xt)|0,p=p+Math.imul(mt,Qt)|0,p=p+Math.imul(gt,Xt)|0,A=A+Math.imul(gt,Qt)|0;var sb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(sb>>>26)|0,sb&=67108863,_=Math.imul(Nt,Vt),p=Math.imul(Nt,Zt),p=p+Math.imul(Pt,Vt)|0,A=Math.imul(Pt,Zt),_=_+Math.imul($t,Gt)|0,p=p+Math.imul($t,qt)|0,p=p+Math.imul(Ot,Gt)|0,A=A+Math.imul(Ot,qt)|0,_=_+Math.imul(Rt,Wt)|0,p=p+Math.imul(Rt,Kt)|0,p=p+Math.imul(Tt,Wt)|0,A=A+Math.imul(Tt,Kt)|0,_=_+Math.imul(At,Jt)|0,p=p+Math.imul(At,Yt)|0,p=p+Math.imul(kt,Jt)|0,A=A+Math.imul(kt,Yt)|0,_=_+Math.imul(yt,Xt)|0,p=p+Math.imul(yt,Qt)|0,p=p+Math.imul(bt,Xt)|0,A=A+Math.imul(bt,Qt)|0;var ab=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(ab>>>26)|0,ab&=67108863,_=Math.imul(Nt,Gt),p=Math.imul(Nt,qt),p=p+Math.imul(Pt,Gt)|0,A=Math.imul(Pt,qt),_=_+Math.imul($t,Wt)|0,p=p+Math.imul($t,Kt)|0,p=p+Math.imul(Ot,Wt)|0,A=A+Math.imul(Ot,Kt)|0,_=_+Math.imul(Rt,Jt)|0,p=p+Math.imul(Rt,Yt)|0,p=p+Math.imul(Tt,Jt)|0,A=A+Math.imul(Tt,Yt)|0,_=_+Math.imul(At,Xt)|0,p=p+Math.imul(At,Qt)|0,p=p+Math.imul(kt,Xt)|0,A=A+Math.imul(kt,Qt)|0;var cb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(cb>>>26)|0,cb&=67108863,_=Math.imul(Nt,Wt),p=Math.imul(Nt,Kt),p=p+Math.imul(Pt,Wt)|0,A=Math.imul(Pt,Kt),_=_+Math.imul($t,Jt)|0,p=p+Math.imul($t,Yt)|0,p=p+Math.imul(Ot,Jt)|0,A=A+Math.imul(Ot,Yt)|0,_=_+Math.imul(Rt,Xt)|0,p=p+Math.imul(Rt,Qt)|0,p=p+Math.imul(Tt,Xt)|0,A=A+Math.imul(Tt,Qt)|0;var ub=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(ub>>>26)|0,ub&=67108863,_=Math.imul(Nt,Jt),p=Math.imul(Nt,Yt),p=p+Math.imul(Pt,Jt)|0,A=Math.imul(Pt,Yt),_=_+Math.imul($t,Xt)|0,p=p+Math.imul($t,Qt)|0,p=p+Math.imul(Ot,Xt)|0,A=A+Math.imul(Ot,Qt)|0;var fb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(fb>>>26)|0,fb&=67108863,_=Math.imul(Nt,Xt),p=Math.imul(Nt,Qt),p=p+Math.imul(Pt,Xt)|0,A=Math.imul(Pt,Qt);var lb=(R+_|0)+((p&8191)<<13)|0;return R=(A+(p>>>13)|0)+(lb>>>26)|0,lb&=67108863,E[0]=qy,E[1]=Wy,E[2]=Ky,E[3]=Jy,E[4]=Yy,E[5]=Xy,E[6]=Qy,E[7]=eb,E[8]=tb,E[9]=rb,E[10]=nb,E[11]=ob,E[12]=ib,E[13]=sb,E[14]=ab,E[15]=cb,E[16]=ub,E[17]=fb,E[18]=lb,R!==0&&(E[19]=R,y.length++),y};Math.imul||(T=k);function P(I,l,m){m.negative=l.negative^I.negative,m.length=I.length+l.length;for(var y=0,b=0,v=0;v<m.length-1;v++){var E=b;b=0;for(var R=y&67108863,_=Math.min(v,l.length-1),p=Math.max(0,v-I.length+1);p<=_;p++){var A=v-p,G=I.words[A]|0,J=l.words[p]|0,Q=G*J,ae=Q&67108863;E=E+(Q/67108864|0)|0,ae=ae+R|0,R=ae&67108863,E=E+(ae>>>26)|0,b+=E>>>26,E&=67108863;}m.words[v]=R,y=E,E=b;}return y!==0?m.words[v]=y:m.length--,m._strip()}function O(I,l,m){return P(I,l,m)}n.prototype.mulTo=function(l,m){var y,b=this.length+l.length;return this.length===10&&l.length===10?y=T(this,l,m):b<63?y=k(this,l,m):b<1024?y=P(this,l,m):y=O(this,l,m),y};n.prototype.mul=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),this.mulTo(l,m)},n.prototype.mulf=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),O(this,l,m)},n.prototype.imul=function(l){return this.clone().mulTo(l,this)},n.prototype.imuln=function(l){var m=l<0;m&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var y=0,b=0;b<this.length;b++){var v=(this.words[b]|0)*l,E=(v&67108863)+(y&67108863);y>>=26,y+=v/67108864|0,y+=E>>>26,this.words[b]=E&67108863;}return y!==0&&(this.words[b]=y,this.length++),l===0&&(this.length=1,this._normSign()),m?this.ineg():this},n.prototype.muln=function(l){return this.clone().imuln(l)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(l){var m=w(l);if(m.length===0)return new n(1);for(var y=this,b=0;b<m.length&&m[b]===0;b++,y=y.sqr());if(++b<m.length)for(var v=y.sqr();b<m.length;b++,v=v.sqr())m[b]!==0&&(y=y.mul(v));return y},n.prototype.iushln=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=67108863>>>26-m<<26-m,v;if(m!==0){var E=0;for(v=0;v<this.length;v++){var R=this.words[v]&b,_=(this.words[v]|0)-R<<m;this.words[v]=_|E,E=R>>>26-m;}E&&(this.words[v]=E,this.length++);}if(y!==0){for(v=this.length-1;v>=0;v--)this.words[v+y]=this.words[v];for(v=0;v<y;v++)this.words[v]=0;this.length+=y;}return this._strip()},n.prototype.ishln=function(l){return r(this.negative===0),this.iushln(l)},n.prototype.iushrn=function(l,m,y){r(typeof l=="number"&&l>=0);var b;m?b=(m-m%26)/26:b=0;var v=l%26,E=Math.min((l-v)/26,this.length),R=67108863^67108863>>>v<<v,_=y;if(b-=E,b=Math.max(0,b),_){for(var p=0;p<E;p++)_.words[p]=this.words[p];_.length=E;}if(E!==0)if(this.length>E)for(this.length-=E,p=0;p<this.length;p++)this.words[p]=this.words[p+E];else this.words[0]=0,this.length=1;var A=0;for(p=this.length-1;p>=0&&(A!==0||p>=b);p--){var G=this.words[p]|0;this.words[p]=A<<26-v|G>>>v,A=G&R;}return _&&A!==0&&(_.words[_.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(l,m,y){return r(this.negative===0),this.iushrn(l,m,y)},n.prototype.shln=function(l){return this.clone().ishln(l)},n.prototype.ushln=function(l){return this.clone().iushln(l)},n.prototype.shrn=function(l){return this.clone().ishrn(l)},n.prototype.ushrn=function(l){return this.clone().iushrn(l)},n.prototype.testn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return false;var v=this.words[y];return !!(v&b)},n.prototype.imaskn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(m!==0&&y++,this.length=Math.min(y,this.length),m!==0){var b=67108863^67108863>>>m<<m;this.words[this.length-1]&=b;}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(l){return this.clone().imaskn(l)},n.prototype.iaddn=function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},n.prototype._iaddn=function(l){this.words[0]+=l;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},n.prototype.isubn=function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},n.prototype.addn=function(l){return this.clone().iaddn(l)},n.prototype.subn=function(l){return this.clone().isubn(l)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(l,m,y){var b=l.length+y,v;this._expand(b);var E,R=0;for(v=0;v<l.length;v++){E=(this.words[v+y]|0)+R;var _=(l.words[v]|0)*m;E-=_&67108863,R=(E>>26)-(_/67108864|0),this.words[v+y]=E&67108863;}for(;v<this.length-y;v++)E=(this.words[v+y]|0)+R,R=E>>26,this.words[v+y]=E&67108863;if(R===0)return this._strip();for(r(R===-1),R=0,v=0;v<this.length;v++)E=-(this.words[v]|0)+R,R=E>>26,this.words[v]=E&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(l,m){var y=this.length-l.length,b=this.clone(),v=l,E=v.words[v.length-1]|0,R=this._countBits(E);y=26-R,y!==0&&(v=v.ushln(y),b.iushln(y),E=v.words[v.length-1]|0);var _=b.length-v.length,p;if(m!=="mod"){p=new n(null),p.length=_+1,p.words=new Array(p.length);for(var A=0;A<p.length;A++)p.words[A]=0;}var G=b.clone()._ishlnsubmul(v,1,_);G.negative===0&&(b=G,p&&(p.words[_]=1));for(var J=_-1;J>=0;J--){var Q=(b.words[v.length+J]|0)*67108864+(b.words[v.length+J-1]|0);for(Q=Math.min(Q/E|0,67108863),b._ishlnsubmul(v,Q,J);b.negative!==0;)Q--,b.negative=0,b._ishlnsubmul(v,1,J),b.isZero()||(b.negative^=1);p&&(p.words[J]=Q);}return p&&p._strip(),b._strip(),m!=="div"&&y!==0&&b.iushrn(y),{div:p||null,mod:b}},n.prototype.divmod=function(l,m,y){if(r(!l.isZero()),this.isZero())return {div:new n(0),mod:new n(0)};var b,v,E;return this.negative!==0&&l.negative===0?(E=this.neg().divmod(l,m),m!=="mod"&&(b=E.div.neg()),m!=="div"&&(v=E.mod.neg(),y&&v.negative!==0&&v.iadd(l)),{div:b,mod:v}):this.negative===0&&l.negative!==0?(E=this.divmod(l.neg(),m),m!=="mod"&&(b=E.div.neg()),{div:b,mod:E.mod}):(this.negative&l.negative)!==0?(E=this.neg().divmod(l.neg(),m),m!=="div"&&(v=E.mod.neg(),y&&v.negative!==0&&v.isub(l)),{div:E.div,mod:v}):l.length>this.length||this.cmp(l)<0?{div:new n(0),mod:this}:l.length===1?m==="div"?{div:this.divn(l.words[0]),mod:null}:m==="mod"?{div:null,mod:new n(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new n(this.modrn(l.words[0]))}:this._wordDiv(l,m)},n.prototype.div=function(l){return this.divmod(l,"div",false).div},n.prototype.mod=function(l){return this.divmod(l,"mod",false).mod},n.prototype.umod=function(l){return this.divmod(l,"mod",true).mod},n.prototype.divRound=function(l){var m=this.divmod(l);if(m.mod.isZero())return m.div;var y=m.mod.abs(),b=l.abs().iushrn(1),v=l.words[0]&1,E=y.cmp(b);if(E<0||v===1&&E===0)return m.div;var R=new n(1);return R.negative=this.negative^l.negative,m.div.iadd(R)},n.prototype.modrn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=(1<<26)%l,b=0,v=this.length-1;v>=0;v--)b=(y*b+(this.words[v]|0))%l;return m?-b:b},n.prototype.modn=function(l){return this.modrn(l)},n.prototype.idivn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=0,b=this.length-1;b>=0;b--){var v=(this.words[b]|0)+y*67108864;this.words[b]=v/l|0,y=v%l;}return this._strip(),m?this.ineg():this},n.prototype.divn=function(l){return this.clone().idivn(l)},n.prototype.egcd=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),v=new n(0),E=new n(0),R=new n(1),_=0;m.isEven()&&y.isEven();)m.iushrn(1),y.iushrn(1),++_;for(var p=y.clone(),A=m.clone();!m.isZero();){for(var G=0,J=1;(m.words[0]&J)===0&&G<26;++G,J<<=1);if(G>0)for(m.iushrn(G);G-- >0;)(b.isOdd()||v.isOdd())&&(b.iadd(p),v.isub(A)),b.iushrn(1),v.iushrn(1);for(var Q=0,ae=1;(y.words[0]&ae)===0&&Q<26;++Q,ae<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(E.isOdd()||R.isOdd())&&(E.iadd(p),R.isub(A)),E.iushrn(1),R.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(E),v.isub(R)):(y.isub(m),E.isub(b),R.isub(v));}return {a:E,b:R,gcd:y.iushln(_)}},n.prototype._invmp=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),v=new n(0),E=y.clone();m.cmpn(1)>0&&y.cmpn(1)>0;){for(var R=0,_=1;(m.words[0]&_)===0&&R<26;++R,_<<=1);if(R>0)for(m.iushrn(R);R-- >0;)b.isOdd()&&b.iadd(E),b.iushrn(1);for(var p=0,A=1;(y.words[0]&A)===0&&p<26;++p,A<<=1);if(p>0)for(y.iushrn(p);p-- >0;)v.isOdd()&&v.iadd(E),v.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(v)):(y.isub(m),v.isub(b));}var G;return m.cmpn(1)===0?G=b:G=v,G.cmpn(0)<0&&G.iadd(l),G},n.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var m=this.clone(),y=l.clone();m.negative=0,y.negative=0;for(var b=0;m.isEven()&&y.isEven();b++)m.iushrn(1),y.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;y.isEven();)y.iushrn(1);var v=m.cmp(y);if(v<0){var E=m;m=y,y=E;}else if(v===0||y.cmpn(1)===0)break;m.isub(y);}while(true);return y.iushln(b)},n.prototype.invm=function(l){return this.egcd(l).a.umod(l)},n.prototype.isEven=function(){return (this.words[0]&1)===0},n.prototype.isOdd=function(){return (this.words[0]&1)===1},n.prototype.andln=function(l){return this.words[0]&l},n.prototype.bincn=function(l){r(typeof l=="number");var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return this._expand(y+1),this.words[y]|=b,this;for(var v=b,E=y;v!==0&&E<this.length;E++){var R=this.words[E]|0;R+=v,v=R>>>26,R&=67108863,this.words[E]=R;}return v!==0&&(this.words[E]=v,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(l){var m=l<0;if(this.negative!==0&&!m)return -1;if(this.negative===0&&m)return 1;this._strip();var y;if(this.length>1)y=1;else {m&&(l=-l),r(l<=67108863,"Number is too big");var b=this.words[0]|0;y=b===l?0:b<l?-1:1;}return this.negative!==0?-y|0:y},n.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return -1;if(this.negative===0&&l.negative!==0)return 1;var m=this.ucmp(l);return this.negative!==0?-m|0:m},n.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return -1;for(var m=0,y=this.length-1;y>=0;y--){var b=this.words[y]|0,v=l.words[y]|0;if(b!==v){b<v?m=-1:b>v&&(m=1);break}}return m},n.prototype.gtn=function(l){return this.cmpn(l)===1},n.prototype.gt=function(l){return this.cmp(l)===1},n.prototype.gten=function(l){return this.cmpn(l)>=0},n.prototype.gte=function(l){return this.cmp(l)>=0},n.prototype.ltn=function(l){return this.cmpn(l)===-1},n.prototype.lt=function(l){return this.cmp(l)===-1},n.prototype.lten=function(l){return this.cmpn(l)<=0},n.prototype.lte=function(l){return this.cmp(l)<=0},n.prototype.eqn=function(l){return this.cmpn(l)===0},n.prototype.eq=function(l){return this.cmp(l)===0},n.red=function(l){return new Z(l)},n.prototype.toRed=function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(l){return this.red=l,this},n.prototype.forceRed=function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},n.prototype.redAdd=function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},n.prototype.redIAdd=function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},n.prototype.redSub=function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},n.prototype.redISub=function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},n.prototype.redShl=function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},n.prototype.redMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},n.prototype.redIMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var N={k256:null,p224:null,p192:null,p25519:null};function z(I,l){this.name=I,this.p=new n(l,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}z.prototype._tmp=function(){var l=new n(null);return l.words=new Array(Math.ceil(this.n/13)),l},z.prototype.ireduce=function(l){var m=l,y;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),y=m.bitLength();while(y>this.n);var b=y<this.n?-1:m.ucmp(this.p);return b===0?(m.words[0]=0,m.length=1):b>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},z.prototype.split=function(l,m){l.iushrn(this.n,0,m);},z.prototype.imulK=function(l){return l.imul(this.k)};function C(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}o(C,z),C.prototype.split=function(l,m){for(var y=4194303,b=Math.min(l.length,9),v=0;v<b;v++)m.words[v]=l.words[v];if(m.length=b,l.length<=9){l.words[0]=0,l.length=1;return}var E=l.words[9];for(m.words[m.length++]=E&y,v=10;v<l.length;v++){var R=l.words[v]|0;l.words[v-10]=(R&y)<<4|E>>>22,E=R;}E>>>=22,l.words[v-10]=E,E===0&&l.length>10?l.length-=10:l.length-=9;},C.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var m=0,y=0;y<l.length;y++){var b=l.words[y]|0;m+=b*977,l.words[y]=m&67108863,m=b*64+(m/67108864|0);}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function D(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}o(D,z);function q(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}o(q,z);function H(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}o(H,z),H.prototype.imulK=function(l){for(var m=0,y=0;y<l.length;y++){var b=(l.words[y]|0)*19+m,v=b&67108863;b>>>=26,l.words[y]=v,m=b;}return m!==0&&(l.words[l.length++]=m),l},n._prime=function(l){if(N[l])return N[l];var m;if(l==="k256")m=new C;else if(l==="p224")m=new D;else if(l==="p192")m=new q;else if(l==="p25519")m=new H;else throw new Error("Unknown prime "+l);return N[l]=m,m};function Z(I){if(typeof I=="string"){var l=n._prime(I);this.m=l.p,this.prime=l;}else r(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null;}Z.prototype._verify1=function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers");},Z.prototype._verify2=function(l,m){r((l.negative|m.negative)===0,"red works only with positives"),r(l.red&&l.red===m.red,"red works only with red numbers");},Z.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(u(l,l.umod(this.m)._forceRed(this)),l)},Z.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},Z.prototype.add=function(l,m){this._verify2(l,m);var y=l.add(m);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},Z.prototype.iadd=function(l,m){this._verify2(l,m);var y=l.iadd(m);return y.cmp(this.m)>=0&&y.isub(this.m),y},Z.prototype.sub=function(l,m){this._verify2(l,m);var y=l.sub(m);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},Z.prototype.isub=function(l,m){this._verify2(l,m);var y=l.isub(m);return y.cmpn(0)<0&&y.iadd(this.m),y},Z.prototype.shl=function(l,m){return this._verify1(l),this.imod(l.ushln(m))},Z.prototype.imul=function(l,m){return this._verify2(l,m),this.imod(l.imul(m))},Z.prototype.mul=function(l,m){return this._verify2(l,m),this.imod(l.mul(m))},Z.prototype.isqr=function(l){return this.imul(l,l.clone())},Z.prototype.sqr=function(l){return this.mul(l,l)},Z.prototype.sqrt=function(l){if(l.isZero())return l.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(l,y)}for(var b=this.m.subn(1),v=0;!b.isZero()&&b.andln(1)===0;)v++,b.iushrn(1);r(!b.isZero());var E=new n(1).toRed(this),R=E.redNeg(),_=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new n(2*p*p).toRed(this);this.pow(p,_).cmp(R)!==0;)p.redIAdd(R);for(var A=this.pow(p,b),G=this.pow(l,b.addn(1).iushrn(1)),J=this.pow(l,b),Q=v;J.cmp(E)!==0;){for(var ae=J,he=0;ae.cmp(E)!==0;he++)ae=ae.redSqr();r(he<Q);var ye=this.pow(A,new n(1).iushln(Q-he-1));G=G.redMul(ye),A=ye.redSqr(),J=J.redMul(A),Q=he;}return G},Z.prototype.invm=function(l){var m=l._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},Z.prototype.pow=function(l,m){if(m.isZero())return new n(1).toRed(this);if(m.cmpn(1)===0)return l.clone();var y=4,b=new Array(1<<y);b[0]=new n(1).toRed(this),b[1]=l;for(var v=2;v<b.length;v++)b[v]=this.mul(b[v-1],l);var E=b[0],R=0,_=0,p=m.bitLength()%26;for(p===0&&(p=26),v=m.length-1;v>=0;v--){for(var A=m.words[v],G=p-1;G>=0;G--){var J=A>>G&1;if(E!==b[0]&&(E=this.sqr(E)),J===0&&R===0){_=0;continue}R<<=1,R|=J,_++,!(_!==y&&(v!==0||G!==0))&&(E=this.mul(E,b[R]),_=0,R=0);}p=26;}return E},Z.prototype.convertTo=function(l){var m=l.umod(this.m);return m===l?m.clone():m},Z.prototype.convertFrom=function(l){var m=l.clone();return m.red=null,m},n.mont=function(l){return new re(l)};function re(I){Z.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}o(re,Z),re.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},re.prototype.convertFrom=function(l){var m=this.imod(l.mul(this.rinv));return m.red=null,m},re.prototype.imul=function(l,m){if(l.isZero()||m.isZero())return l.words[0]=0,l.length=1,l;var y=l.imul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=y.isub(b).iushrn(this.shift),E=v;return v.cmp(this.m)>=0?E=v.isub(this.m):v.cmpn(0)<0&&(E=v.iadd(this.m)),E._forceRed(this)},re.prototype.mul=function(l,m){if(l.isZero()||m.isZero())return new n(0)._forceRed(this);var y=l.mul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=y.isub(b).iushrn(this.shift),E=v;return v.cmp(this.m)>=0?E=v.isub(this.m):v.cmpn(0)<0&&(E=v.iadd(this.m)),E._forceRed(this)},re.prototype.invm=function(l){var m=this.imod(l._invmp(this.m).mul(this.r2));return m._forceRed(this)};})(typeof Xw>"u"||Xw,LA);});var DA=Kr((e_,MA)=>{var hh=Cl(),Oo=hh.Buffer;function UA(e,t){for(var r in e)t[r]=e[r];}Oo.from&&Oo.alloc&&Oo.allocUnsafe&&Oo.allocUnsafeSlow?MA.exports=hh:(UA(hh,e_),e_.Buffer=ka);function ka(e,t,r){return Oo(e,t,r)}ka.prototype=Object.create(Oo.prototype);UA(Oo,ka);ka.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Oo(e,t,r)};ka.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=Oo(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o};ka.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Oo(e)};ka.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return hh.SlowBuffer(e)};});var FA=Kr((ZY,jA)=>{var gh=DA().Buffer;function bU(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var n=e.charAt(o),i=n.charCodeAt(0);if(t[i]!==255)throw new TypeError(n+" is ambiguous");t[i]=o;}var s=e.length,a=e.charAt(0),c=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function f(h){if((Array.isArray(h)||h instanceof Uint8Array)&&(h=gh.from(h)),!gh.isBuffer(h))throw new TypeError("Expected Buffer");if(h.length===0)return "";for(var x=0,w=0,k=0,T=h.length;k!==T&&h[k]===0;)k++,x++;for(var P=(T-k)*u+1>>>0,O=new Uint8Array(P);k!==T;){for(var S=h[k],N=0,z=P-1;(S!==0||N<w)&&z!==-1;z--,N++)S+=256*O[z]>>>0,O[z]=S%s>>>0,S=S/s>>>0;if(S!==0)throw new Error("Non-zero carry");w=N,k++;}for(var C=P-w;C!==P&&O[C]===0;)C++;for(var D=a.repeat(x);C<P;++C)D+=e.charAt(O[C]);return D}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return gh.alloc(0);for(var x=0,w=0,k=0;h[x]===a;)w++,x++;for(var T=(h.length-x)*c+1>>>0,P=new Uint8Array(T);x<h.length;){var O=h.charCodeAt(x);if(O>255)return;var S=t[O];if(S===255)return;for(var N=0,z=T-1;(S!==0||N<k)&&z!==-1;z--,N++)S+=s*P[z]>>>0,P[z]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error("Non-zero carry");k=N,x++;}for(var C=T-k;C!==T&&P[C]===0;)C++;var D=gh.allocUnsafe(w+(T-C));D.fill(0,0,w);for(var q=w;C!==T;)D[q++]=P[C++];return D}function g(h){var x=d(h);if(x)return x;throw new Error("Non-base"+s+" character")}return {encode:f,decodeUnsafe:d,decode:g}}jA.exports=bU;});var t_=Kr((GY,HA)=>{var xU=FA(),vU="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";HA.exports=xU(vU);});var VA=Kr(o_=>{function mi(e,t,r){return t<=e&&e<=r}function wh(e){if(e===void 0)return {};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function wU(e){for(var t=String(e),r=t.length,o=0,n=[];o<r;){var i=t.charCodeAt(o);if(i<55296||i>57343)n.push(i);else if(56320<=i&&i<=57343)n.push(65533);else if(55296<=i&&i<=56319)if(o===r-1)n.push(65533);else {var s=e.charCodeAt(o+1);if(56320<=s&&s<=57343){var a=i&1023,c=s&1023;n.push(65536+(a<<10)+c),o+=1;}else n.push(65533);}o+=1;}return n}function _U(e){for(var t="",r=0;r<e.length;++r){var o=e[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode((o>>10)+55296,(o&1023)+56320));}return t}var yh=-1;function n_(e){this.tokens=[].slice.call(e);}n_.prototype={endOfStream:function(){return !this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():yh},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e);},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e);}};var Vc=-1;function r_(e,t){if(e)throw TypeError("Decoder error");return t||65533}var bh="utf-8";function xh(e,t){if(!(this instanceof xh))return new xh(e,t);if(e=e!==void 0?String(e).toLowerCase():bh,e!==bh)throw new Error("Encoding not supported. Only utf-8 is supported");t=wh(t),this._streaming=false,this._BOMseen=false,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM});}xh.prototype={decode:function(t,r){var o;typeof t=="object"&&t instanceof ArrayBuffer?o=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):o=new Uint8Array(0),r=wh(r),this._streaming||(this._decoder=new EU({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new n_(o),i=[],s;!n.endOfStream()&&(s=this._decoder.handler(n,n.read()),s!==Vc);)s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));if(!this._streaming){do{if(s=this._decoder.handler(n,n.read()),s===Vc)break;s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));}while(!n.endOfStream());this._decoder=null;}return i.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(i[0]===65279?(this._BOMseen=true,i.shift()):this._BOMseen=true),_U(i)}};function vh(e,t){if(!(this instanceof vh))return new vh(e,t);if(e=e!==void 0?String(e).toLowerCase():bh,e!==bh)throw new Error("Encoding not supported. Only utf-8 is supported");t=wh(t),this._streaming=false,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"});}vh.prototype={encode:function(t,r){t=t?String(t):"",r=wh(r),this._streaming||(this._encoder=new SU(this._options)),this._streaming=!!r.stream;for(var o=[],n=new n_(wU(t)),i;!n.endOfStream()&&(i=this._encoder.handler(n,n.read()),i!==Vc);)Array.isArray(i)?o.push.apply(o,i):o.push(i);if(!this._streaming){for(;i=this._encoder.handler(n,n.read()),i!==Vc;)Array.isArray(i)?o.push.apply(o,i):o.push(i);this._encoder=null;}return new Uint8Array(o)}};function EU(e){var t=e.fatal,r=0,o=0,n=0,i=128,s=191;this.handler=function(a,c){if(c===yh&&n!==0)return n=0,r_(t);if(c===yh)return Vc;if(n===0){if(mi(c,0,127))return c;if(mi(c,194,223))n=1,r=c-192;else if(mi(c,224,239))c===224&&(i=160),c===237&&(s=159),n=2,r=c-224;else if(mi(c,240,244))c===240&&(i=144),c===244&&(s=143),n=3,r=c-240;else return r_(t);return r=r<<6*n,null}if(!mi(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),r_(t);if(i=128,s=191,o+=1,r+=c-128<<6*(n-o),o!==n)return null;var u=r;return r=n=o=0,u};}function SU(e){e.fatal;this.handler=function(r,o){if(o===yh)return Vc;if(mi(o,0,127))return o;var n,i;mi(o,128,2047)?(n=1,i=192):mi(o,2048,65535)?(n=2,i=224):mi(o,65536,1114111)&&(n=3,i=240);for(var s=[(o>>6*n)+i];n>0;){var a=o>>6*(n-1);s.push(128|a&63),n-=1;}return s};}o_.TextEncoder=vh;o_.TextDecoder=xh;});var KA=Kr(Je=>{var IU=Je&&Je.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}});}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r];})),AU=Je&&Je.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;}),No=Je&&Je.__decorate||function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},kU=Je&&Je.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&IU(t,e,r);return AU(t,e),t},ZA=Je&&Je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Je,"__esModule",{value:true});Je.deserializeUnchecked=Je.deserialize=Je.serialize=Je.BinaryReader=Je.BinaryWriter=Je.BorshError=Je.baseDecode=Je.baseEncode=void 0;var is=ZA(Qw()),GA=ZA(t_()),RU=kU(VA()),TU=typeof TextDecoder!="function"?RU.TextDecoder:TextDecoder,$U=new TU("utf-8",{fatal:true});function OU(e){return typeof e=="string"&&(e=Buffer.from(e,"utf8")),GA.default.encode(Buffer.from(e))}Je.baseEncode=OU;function NU(e){return Buffer.from(GA.default.decode(e))}Je.baseDecode=NU;var i_=1024,gr=class extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t;}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".");}};Je.BorshError=gr;var _h=class{constructor(){this.buf=Buffer.alloc(i_),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(i_)]));}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1;}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2;}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4;}writeU64(t){this.maybeResize(),this.writeBuffer(Buffer.from(new is.default(t).toArray("le",8)));}writeU128(t){this.maybeResize(),this.writeBuffer(Buffer.from(new is.default(t).toArray("le",16)));}writeU256(t){this.maybeResize(),this.writeBuffer(Buffer.from(new is.default(t).toArray("le",32)));}writeU512(t){this.maybeResize(),this.writeBuffer(Buffer.from(new is.default(t).toArray("le",64)));}writeBuffer(t){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),t,Buffer.alloc(i_)]),this.length+=t.length;}writeString(t){this.maybeResize();let r=Buffer.from(t,"utf8");this.writeU32(r.length),this.writeBuffer(r);}writeFixedArray(t){this.writeBuffer(Buffer.from(t));}writeArray(t,r){this.maybeResize(),this.writeU32(t.length);for(let o of t)this.maybeResize(),r(o);}toArray(){return this.buf.subarray(0,this.length)}};Je.BinaryWriter=_h;function Po(e,t,r){let o=r.value;r.value=function(...n){try{return o.apply(this,n)}catch(i){if(i instanceof RangeError){let s=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(s)>=0)throw new gr("Reached the end of buffer when deserializing")}throw i}};}var Hr=class{constructor(t){this.buf=t,this.offset=0;}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new is.default(t,"le")}readU128(){let t=this.readBuffer(16);return new is.default(t,"le")}readU256(){let t=this.readBuffer(32);return new is.default(t,"le")}readU512(){let t=this.readBuffer(64);return new is.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new gr(`Expected buffer length ${t} isn't within bounds`);let r=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,r}readString(){let t=this.readU32(),r=this.readBuffer(t);try{return $U.decode(r)}catch(o){throw new gr(`Error decoding UTF-8 string: ${o}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let r=this.readU32(),o=Array();for(let n=0;n<r;++n)o.push(t());return o}};No([Po],Hr.prototype,"readU8",null);No([Po],Hr.prototype,"readU16",null);No([Po],Hr.prototype,"readU32",null);No([Po],Hr.prototype,"readU64",null);No([Po],Hr.prototype,"readU128",null);No([Po],Hr.prototype,"readU256",null);No([Po],Hr.prototype,"readU512",null);No([Po],Hr.prototype,"readString",null);No([Po],Hr.prototype,"readFixedArray",null);No([Po],Hr.prototype,"readArray",null);Je.BinaryReader=Hr;function qA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ra(e,t,r,o,n){try{if(typeof o=="string")n[`write${qA(o)}`](r);else if(o instanceof Array)if(typeof o[0]=="number"){if(r.length!==o[0])throw new gr(`Expecting byte array of length ${o[0]}, but got ${r.length} bytes`);n.writeFixedArray(r);}else if(o.length===2&&typeof o[1]=="number"){if(r.length!==o[1])throw new gr(`Expecting byte array of length ${o[1]}, but got ${r.length} bytes`);for(let i=0;i<o[1];i++)Ra(e,null,r[i],o[0],n);}else n.writeArray(r,i=>{Ra(e,t,i,o[0],n);});else if(o.kind!==void 0)switch(o.kind){case "option":{r==null?n.writeU8(0):(n.writeU8(1),Ra(e,t,r,o.type,n));break}case "map":{n.writeU32(r.size),r.forEach((i,s)=>{Ra(e,t,s,o.key,n),Ra(e,t,i,o.value,n);});break}default:throw new gr(`FieldType ${o} unrecognized`)}else WA(e,r,n);}catch(i){throw i instanceof gr&&i.addToFieldPath(t),i}}function WA(e,t,r){if(typeof t.borshSerialize=="function"){t.borshSerialize(r);return}let o=e.get(t.constructor);if(!o)throw new gr(`Class ${t.constructor.name} is missing in schema`);if(o.kind==="struct")o.fields.map(([n,i])=>{Ra(e,n,t[n],i,r);});else if(o.kind==="enum"){let n=t[o.field];for(let i=0;i<o.values.length;++i){let[s,a]=o.values[i];if(s===n){r.writeU8(i),Ra(e,s,t[s],a,r);break}}}else throw new gr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function PU(e,t,r=_h){let o=new r;return WA(e,t,o),o.toArray()}Je.serialize=PU;function Ta(e,t,r,o){try{if(typeof r=="string")return o[`read${qA(r)}`]();if(r instanceof Array){if(typeof r[0]=="number")return o.readFixedArray(r[0]);if(typeof r[1]=="number"){let n=[];for(let i=0;i<r[1];i++)n.push(Ta(e,null,r[0],o));return n}else return o.readArray(()=>Ta(e,t,r[0],o))}if(r.kind==="option")return o.readU8()?Ta(e,t,r.type,o):void 0;if(r.kind==="map"){let n=new Map,i=o.readU32();for(let s=0;s<i;s++){let a=Ta(e,t,r.key,o),c=Ta(e,t,r.value,o);n.set(a,c);}return n}return s_(e,r,o)}catch(n){throw n instanceof gr&&n.addToFieldPath(t),n}}function s_(e,t,r){if(typeof t.borshDeserialize=="function")return t.borshDeserialize(r);let o=e.get(t);if(!o)throw new gr(`Class ${t.name} is missing in schema`);if(o.kind==="struct"){let n={};for(let[i,s]of e.get(t).fields)n[i]=Ta(e,i,s,r);return new t(n)}if(o.kind==="enum"){let n=r.readU8();if(n>=o.values.length)throw new gr(`Enum index: ${n} is out of range`);let[i,s]=o.values[n],a=Ta(e,i,s,r);return new t({[i]:a})}throw new gr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function BU(e,t,r,o=Hr){let n=new o(r),i=s_(e,t,n);if(n.offset<r.length)throw new gr(`Unexpected ${r.length-n.offset} bytes after deserialized data`);return i}Je.deserialize=BU;function CU(e,t,r,o=Hr){let n=new o(r);return s_(e,t,n)}Je.deserializeUnchecked=CU;});var f_=Kr(M=>{Object.defineProperty(M,"__esModule",{value:true});M.s16=M.s8=M.nu64be=M.u48be=M.u40be=M.u32be=M.u24be=M.u16be=M.nu64=M.u48=M.u40=M.u32=M.u24=M.u16=M.u8=M.offset=M.greedy=M.Constant=M.UTF8=M.CString=M.Blob=M.Boolean=M.BitField=M.BitStructure=M.VariantLayout=M.Union=M.UnionLayoutDiscriminator=M.UnionDiscriminator=M.Structure=M.Sequence=M.DoubleBE=M.Double=M.FloatBE=M.Float=M.NearInt64BE=M.NearInt64=M.NearUInt64BE=M.NearUInt64=M.IntBE=M.Int=M.UIntBE=M.UInt=M.OffsetLayout=M.GreedyCount=M.ExternalLayout=M.bindConstructorLayout=M.nameWithProperty=M.Layout=M.uint8ArrayToBuffer=M.checkUint8Array=void 0;M.constant=M.utf8=M.cstr=M.blob=M.unionLayoutDiscriminator=M.union=M.seq=M.bits=M.struct=M.f64be=M.f64=M.f32be=M.f32=M.ns64be=M.s48be=M.s40be=M.s32be=M.s24be=M.s16be=M.ns64=M.s48=M.s40=M.s32=M.s24=void 0;var c_=Cl();function qc(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}M.checkUint8Array=qc;function Fe(e){return qc(e),c_.Buffer.from(e.buffer,e.byteOffset,e.length)}M.uint8ArrayToBuffer=Fe;var Ze=class{constructor(t,r){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r;}makeDestinationObject(){return {}}getSpan(t,r){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){let r=Object.create(this.constructor.prototype);return Object.assign(r,this),r.property=t,r}fromArray(t){}};M.Layout=Ze;function u_(e,t){return t.property?e+"["+t.property+"]":e}M.nameWithProperty=u_;function zU(e,t){if(typeof e!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof Ze))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=(()=>new e),Object.defineProperty(e.prototype,"encode",{value(r,o){return t.encode(this,r,o)},writable:true}),Object.defineProperty(e,"decode",{value(r,o){return t.decode(r,o)},writable:true});}M.bindConstructorLayout=zU;var Ir=class extends Ze{isCount(){throw new Error("ExternalLayout is abstract")}};M.ExternalLayout=Ir;var Eh=class extends Ir{constructor(t=1,r){if(!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,r),this.elementSpan=t;}isCount(){return true}decode(t,r=0){qc(t);let o=t.length-r;return Math.floor(o/this.elementSpan)}encode(t,r,o){return 0}};M.GreedyCount=Eh;var Zl=class extends Ir{constructor(t,r=0,o){if(!(t instanceof Ze))throw new TypeError("layout must be a Layout");if(!Number.isInteger(r))throw new TypeError("offset must be integer or undefined");super(t.span,o||t.property),this.layout=t,this.offset=r;}isCount(){return this.layout instanceof nn||this.layout instanceof bn}decode(t,r=0){return this.layout.decode(t,r+this.offset)}encode(t,r,o=0){return this.layout.encode(t,r,o+this.offset)}};M.OffsetLayout=Zl;var nn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntLE(t,o,this.span),this.span}};M.UInt=nn;var bn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntBE(t,o,this.span),this.span}};M.UIntBE=bn;var hi=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntLE(t,o,this.span),this.span}};M.Int=hi;var ss=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntBE(t,o,this.span),this.span}};M.IntBE=ss;var a_=Math.pow(2,32);function Dh(e){let t=Math.floor(e/a_),r=e-t*a_;return {hi32:t,lo32:r}}function jh(e,t){return e*a_+t}var Sh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readUInt32LE(r+4);return jh(i,n)}encode(t,r,o=0){let n=Dh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeUInt32LE(n.hi32,o+4),8}};M.NearUInt64=Sh;var Ih=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32BE(r),i=o.readUInt32BE(r+4);return jh(n,i)}encode(t,r,o=0){let n=Dh(t),i=Fe(r);return i.writeUInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearUInt64BE=Ih;var Ah=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readInt32LE(r+4);return jh(i,n)}encode(t,r,o=0){let n=Dh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeInt32LE(n.hi32,o+4),8}};M.NearInt64=Ah;var kh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readInt32BE(r),i=o.readUInt32BE(r+4);return jh(n,i)}encode(t,r,o=0){let n=Dh(t),i=Fe(r);return i.writeInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearInt64BE=kh;var Rh=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatLE(r)}encode(t,r,o=0){return Fe(r).writeFloatLE(t,o),4}};M.Float=Rh;var Th=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatBE(r)}encode(t,r,o=0){return Fe(r).writeFloatBE(t,o),4}};M.FloatBE=Th;var $h=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleLE(r)}encode(t,r,o=0){return Fe(r).writeDoubleLE(t,o),8}};M.Double=$h;var Oh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleBE(r)}encode(t,r,o=0){return Fe(r).writeDoubleBE(t,o),8}};M.DoubleBE=Oh;var Nh=class extends Ze{constructor(t,r,o){if(!(t instanceof Ze))throw new TypeError("elementLayout must be a Layout");if(!(r instanceof Ir&&r.isCount()||Number.isInteger(r)&&0<=r))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(r instanceof Ir)&&0<t.span&&(n=r*t.span),super(n,o),this.elementLayout=t,this.count=r;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0,n=this.count;if(n instanceof Ir&&(n=n.decode(t,r)),0<this.elementLayout.span)o=n*this.elementLayout.span;else {let i=0;for(;i<n;)o+=this.elementLayout.getSpan(t,r+o),++i;}return o}decode(t,r=0){let o=[],n=0,i=this.count;for(i instanceof Ir&&(i=i.decode(t,r));n<i;)o.push(this.elementLayout.decode(t,r)),r+=this.elementLayout.getSpan(t,r),n+=1;return o}encode(t,r,o=0){let n=this.elementLayout,i=t.reduce((s,a)=>s+n.encode(a,r,o+s),0);return this.count instanceof Ir&&this.count.encode(t.length,r,o),i}};M.Sequence=Nh;var Ph=class extends Ze{constructor(t,r,o){if(!(Array.isArray(t)&&t.reduce((i,s)=>i&&s instanceof Ze,true)))throw new TypeError("fields must be array of Layout instances");typeof r=="boolean"&&o===void 0&&(o=r,r=void 0);for(let i of t)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((i,s)=>i+s.getSpan(),0);}catch{}super(n,r),this.fields=t,this.decodePrefixes=!!o;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;try{o=this.fields.reduce((n,i)=>{let s=i.getSpan(t,r);return r+=s,n+s},0);}catch{throw new RangeError("indeterminate span")}return o}decode(t,r=0){qc(t);let o=this.makeDestinationObject();for(let n of this.fields)if(n.property!==void 0&&(o[n.property]=n.decode(t,r)),r+=n.getSpan(t,r),this.decodePrefixes&&t.length===r)break;return o}encode(t,r,o=0){let n=o,i=0,s=0;for(let a of this.fields){let c=a.span;if(s=0<c?c:0,a.property!==void 0){let u=t[a.property];u!==void 0&&(s=a.encode(u,r,o),0>c&&(c=a.getSpan(r,o)));}i=o,o+=c;}return i+s-n}fromArray(t){let r=this.makeDestinationObject();for(let o of this.fields)o.property!==void 0&&0<t.length&&(r[o.property]=t.shift());return r}layoutFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}offsetOf(t){if(typeof t!="string")throw new TypeError("property must be string");let r=0;for(let o of this.fields){if(o.property===t)return r;0>o.span?r=-1:0<=r&&(r+=o.span);}}};M.Structure=Ph;var Gl=class{constructor(t){this.property=t;}decode(t,r){throw new Error("UnionDiscriminator is abstract")}encode(t,r,o){throw new Error("UnionDiscriminator is abstract")}};M.UnionDiscriminator=Gl;var Gc=class extends Gl{constructor(t,r){if(!(t instanceof Ir&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(r||t.property||"variant"),this.layout=t;}decode(t,r){return this.layout.decode(t,r)}encode(t,r,o){return this.layout.encode(t,r,o)}};M.UnionLayoutDiscriminator=Gc;var ql=class extends Ze{constructor(t,r,o){let n;if(t instanceof nn||t instanceof bn)n=new Gc(new Zl(t));else if(t instanceof Ir&&t.isCount())n=new Gc(t);else if(t instanceof Gl)n=t;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(r===void 0&&(r=null),!(r===null||r instanceof Ze))throw new TypeError("defaultLayout must be null or a Layout");if(r!==null){if(0>r.span)throw new Error("defaultLayout must have constant span");r.property===void 0&&(r=r.replicate("content"));}let i=-1;r&&(i=r.span,0<=i&&(t instanceof nn||t instanceof bn)&&(i+=n.layout.span)),super(i,o),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof nn||t instanceof bn,this.defaultLayout=r,this.registry={};let s=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return s(a)},this.configGetSourceVariant=function(a){s=a.bind(this);};}getSpan(t,r=0){if(0<=this.span)return this.span;let o=this.getVariant(t,r);if(!o)throw new Error("unable to determine span for unrecognized variant");return o.getSpan(t,r)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let r=this.registry[t[this.discriminator.property]];if(r&&(!r.layout||r.property&&Object.prototype.hasOwnProperty.call(t,r.property)))return r}else for(let r in this.registry){let o=this.registry[r];if(o.property&&Object.prototype.hasOwnProperty.call(t,o.property))return o}throw new Error("unable to infer src variant")}decode(t,r=0){let o,n=this.discriminator,i=n.decode(t,r),s=this.registry[i];if(s===void 0){let a=this.defaultLayout,c=0;this.usesPrefixDiscriminator&&(c=n.layout.span),o=this.makeDestinationObject(),o[n.property]=i,o[a.property]=a.decode(t,r+c);}else o=s.decode(t,r);return o}encode(t,r,o=0){let n=this.getSourceVariant(t);if(n===void 0){let i=this.discriminator,s=this.defaultLayout,a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(t[i.property],r,o),a+s.encode(t[s.property],r,o+a)}return n.encode(t,r,o)}addVariant(t,r,o){let n=new Bh(this,t,r,o);return this.registry[t]=n,n}getVariant(t,r=0){let o;return t instanceof Uint8Array?o=this.discriminator.decode(t,r):o=t,this.registry[o]}};M.Union=ql;var Bh=class extends Ze{constructor(t,r,o,n){if(!(t instanceof ql))throw new TypeError("union must be a Union");if(!Number.isInteger(r)||0>r)throw new TypeError("variant must be a (non-negative) integer");if(typeof o=="string"&&n===void 0&&(n=o,o=null),o){if(!(o instanceof Ze))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=o.span&&o.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof n!="string")throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=o?o.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=r,this.layout=o||null;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,r+o)),o+n}decode(t,r=0){let o=this.makeDestinationObject();if(this!==this.union.getVariant(t,r))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?o[this.property]=this.layout.decode(t,r+n):this.property?o[this.property]=true:this.union.usesPrefixDiscriminator&&(o[this.union.discriminator.property]=this.variant),o}encode(t,r,o=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,r,o);let i=n;if(this.layout&&(this.layout.encode(t[this.property],r,o+n),i+=this.layout.getSpan(r,o+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};M.VariantLayout=Bh;function Zc(e){return 0>e&&(e+=4294967296),e}var Wl=class extends Ze{constructor(t,r,o){if(!(t instanceof nn||t instanceof bn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof r=="string"&&o===void 0&&(o=r,r=false),4<t.span)throw new RangeError("word cannot exceed 32 bits");super(t.span,o),this.word=t,this.msb=!!r,this.fields=[];let n=0;this._packedSetValue=function(i){return n=Zc(i),this},this._packedGetValue=function(){return n};}decode(t,r=0){let o=this.makeDestinationObject(),n=this.word.decode(t,r);this._packedSetValue(n);for(let i of this.fields)i.property!==void 0&&(o[i.property]=i.decode(t));return o}encode(t,r,o=0){let n=this.word.decode(r,o);this._packedSetValue(n);for(let i of this.fields)if(i.property!==void 0){let s=t[i.property];s!==void 0&&i.encode(s);}return this.word.encode(this._packedGetValue(),r,o)}addField(t,r){let o=new Kl(this,t,r);return this.fields.push(o),o}addBoolean(t){let r=new Ch(this,t);return this.fields.push(r),r}fieldFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}};M.BitStructure=Wl;var Kl=class{constructor(t,r,o){if(!(t instanceof Wl))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((s,a)=>s+a.bits,0);if(r+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=r,this.valueMask=(1<<r)-1,r===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-r),this.wordMask=Zc(this.valueMask<<this.start),this.property=o;}decode(t,r){let o=this.container._packedGetValue();return Zc(o&this.wordMask)>>>this.start}encode(t){if(typeof t!="number"||!Number.isInteger(t)||t!==Zc(t&this.valueMask))throw new TypeError(u_("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let r=this.container._packedGetValue(),o=Zc(t<<this.start);this.container._packedSetValue(Zc(r&~this.wordMask)|o);}};M.BitField=Kl;var Ch=class extends Kl{constructor(t,r){super(t,1,r);}decode(t,r){return !!super.decode(t,r)}encode(t){typeof t=="boolean"&&(t=+t),super.encode(t);}};M.Boolean=Ch;var zh=class extends Ze{constructor(t,r){if(!(t instanceof Ir&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let o=-1;t instanceof Ir||(o=t),super(o,r),this.length=t;}getSpan(t,r){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),o}decode(t,r=0){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),Fe(t).slice(r,r+o)}encode(t,r,o){let n=this.length;if(this.length instanceof Ir&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(u_("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(o+n>r.length)throw new RangeError("encoding overruns Uint8Array");let i=Fe(t);return Fe(r).write(i.toString("hex"),o,n,"hex"),this.length instanceof Ir&&this.length.encode(n,r,o),n}};M.Blob=zh;var Lh=class extends Ze{constructor(t){super(-1,t);}getSpan(t,r=0){qc(t);let o=r;for(;o<t.length&&t[o]!==0;)o+=1;return 1+o-r}decode(t,r=0){let o=this.getSpan(t,r);return Fe(t).slice(r,r+o-1).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=c_.Buffer.from(t,"utf8"),i=n.length;if(o+i>r.length)throw new RangeError("encoding overruns Buffer");let s=Fe(r);return n.copy(s,o),s[o+i]=0,i+1}};M.CString=Lh;var Uh=class extends Ze{constructor(t,r){if(typeof t=="string"&&r===void 0&&(r=t,t=void 0),t===void 0)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,r),this.maxSpan=t;}getSpan(t,r=0){return qc(t),t.length-r}decode(t,r=0){let o=this.getSpan(t,r);if(0<=this.maxSpan&&this.maxSpan<o)throw new RangeError("text length exceeds maxSpan");return Fe(t).slice(r,r+o).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=c_.Buffer.from(t,"utf8"),i=n.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(o+i>r.length)throw new RangeError("encoding overruns Buffer");return n.copy(Fe(r),o),i}};M.UTF8=Uh;var Mh=class extends Ze{constructor(t,r){super(0,r),this.value=t;}decode(t,r){return this.value}encode(t,r,o){return 0}};M.Constant=Mh;M.greedy=((e,t)=>new Eh(e,t));M.offset=((e,t,r)=>new Zl(e,t,r));M.u8=(e=>new nn(1,e));M.u16=(e=>new nn(2,e));M.u24=(e=>new nn(3,e));M.u32=(e=>new nn(4,e));M.u40=(e=>new nn(5,e));M.u48=(e=>new nn(6,e));M.nu64=(e=>new Sh(e));M.u16be=(e=>new bn(2,e));M.u24be=(e=>new bn(3,e));M.u32be=(e=>new bn(4,e));M.u40be=(e=>new bn(5,e));M.u48be=(e=>new bn(6,e));M.nu64be=(e=>new Ih(e));M.s8=(e=>new hi(1,e));M.s16=(e=>new hi(2,e));M.s24=(e=>new hi(3,e));M.s32=(e=>new hi(4,e));M.s40=(e=>new hi(5,e));M.s48=(e=>new hi(6,e));M.ns64=(e=>new Ah(e));M.s16be=(e=>new ss(2,e));M.s24be=(e=>new ss(3,e));M.s32be=(e=>new ss(4,e));M.s40be=(e=>new ss(5,e));M.s48be=(e=>new ss(6,e));M.ns64be=(e=>new kh(e));M.f32=(e=>new Rh(e));M.f32be=(e=>new Th(e));M.f64=(e=>new $h(e));M.f64be=(e=>new Oh(e));M.struct=((e,t,r)=>new Ph(e,t,r));M.bits=((e,t,r)=>new Wl(e,t,r));M.seq=((e,t,r)=>new Nh(e,t,r));M.union=((e,t,r)=>new ql(e,t,r));M.unionLayoutDiscriminator=((e,t)=>new Gc(e,t));M.blob=((e,t)=>new zh(e,t));M.cstr=(e=>new Lh(e));M.utf8=((e,t)=>new Uh(e,t));M.constant=((e,t)=>new Mh(e,t));});function Xl(){if(!Zh&&(Zh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Zh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zh(Jj)}var Zh,Jj,w_=F(()=>{Jj=new Uint8Array(16);});var mk,hk=F(()=>{mk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function Yj(e){return typeof e=="string"&&mk.test(e)}var cs,Ql=F(()=>{hk();cs=Yj;});function Xj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(yr[e[t+0]]+yr[e[t+1]]+yr[e[t+2]]+yr[e[t+3]]+"-"+yr[e[t+4]]+yr[e[t+5]]+"-"+yr[e[t+6]]+yr[e[t+7]]+"-"+yr[e[t+8]]+yr[e[t+9]]+"-"+yr[e[t+10]]+yr[e[t+11]]+yr[e[t+12]]+yr[e[t+13]]+yr[e[t+14]]+yr[e[t+15]]).toLowerCase();if(!cs(r))throw TypeError("Stringified UUID is invalid");return r}var yr,Gh,us,ed=F(()=>{Ql();yr=[];for(Gh=0;Gh<256;++Gh)yr.push((Gh+256).toString(16).substr(1));us=Xj;});function Qj(e,t,r){var o=t&&r||0,n=t||new Array(16);e=e||{};var i=e.node||gk,s=e.clockseq!==void 0?e.clockseq:__;if(i==null||s==null){var a=e.random||(e.rng||Xl)();i==null&&(i=gk=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=__=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:S_+1,f=c-E_+(u-S_)/1e4;if(f<0&&e.clockseq===void 0&&(s=s+1&16383),(f<0||c>E_)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");E_=c,S_=u,__=s,c+=122192928e5;var d=((c&268435455)*1e4+u)%4294967296;n[o++]=d>>>24&255,n[o++]=d>>>16&255,n[o++]=d>>>8&255,n[o++]=d&255;var g=c/4294967296*1e4&268435455;n[o++]=g>>>8&255,n[o++]=g&255,n[o++]=g>>>24&15|16,n[o++]=g>>>16&255,n[o++]=s>>>8|128,n[o++]=s&255;for(var h=0;h<6;++h)n[o+h]=i[h];return t||us(n)}var gk,__,E_,S_,yk,bk=F(()=>{w_();ed();E_=0,S_=0;yk=Qj;});function e7(e){if(!cs(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var qh,I_=F(()=>{Ql();qh=e7;});function t7(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function Wh(e,t,r){function o(n,i,s,a){if(typeof n=="string"&&(n=t7(n)),typeof i=="string"&&(i=qh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(i),c.set(n,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,s){a=a||0;for(var u=0;u<16;++u)s[a+u]=c[u];return s}return us(c)}try{o.name=e;}catch{}return o.DNS=r7,o.URL=n7,o}var r7,n7,A_=F(()=>{ed();I_();r7="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n7="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function o7(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r);}return i7(s7(a7(e),e.length*8))}function i7(e){for(var t=[],r=e.length*32,o="0123456789abcdef",n=0;n<r;n+=8){var i=e[n>>5]>>>n%32&255,s=parseInt(o.charAt(i>>>4&15)+o.charAt(i&15),16);t.push(s);}return t}function xk(e){return (e+64>>>9<<4)+14+1}function s7(e,t){e[t>>5]|=128<<t%32,e[xk(t)-1]=t;for(var r=1732584193,o=-271733879,n=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,c=o,u=n,f=i;r=kr(r,o,n,i,e[s],7,-680876936),i=kr(i,r,o,n,e[s+1],12,-389564586),n=kr(n,i,r,o,e[s+2],17,606105819),o=kr(o,n,i,r,e[s+3],22,-1044525330),r=kr(r,o,n,i,e[s+4],7,-176418897),i=kr(i,r,o,n,e[s+5],12,1200080426),n=kr(n,i,r,o,e[s+6],17,-1473231341),o=kr(o,n,i,r,e[s+7],22,-45705983),r=kr(r,o,n,i,e[s+8],7,1770035416),i=kr(i,r,o,n,e[s+9],12,-1958414417),n=kr(n,i,r,o,e[s+10],17,-42063),o=kr(o,n,i,r,e[s+11],22,-1990404162),r=kr(r,o,n,i,e[s+12],7,1804603682),i=kr(i,r,o,n,e[s+13],12,-40341101),n=kr(n,i,r,o,e[s+14],17,-1502002290),o=kr(o,n,i,r,e[s+15],22,1236535329),r=Rr(r,o,n,i,e[s+1],5,-165796510),i=Rr(i,r,o,n,e[s+6],9,-1069501632),n=Rr(n,i,r,o,e[s+11],14,643717713),o=Rr(o,n,i,r,e[s],20,-373897302),r=Rr(r,o,n,i,e[s+5],5,-701558691),i=Rr(i,r,o,n,e[s+10],9,38016083),n=Rr(n,i,r,o,e[s+15],14,-660478335),o=Rr(o,n,i,r,e[s+4],20,-405537848),r=Rr(r,o,n,i,e[s+9],5,568446438),i=Rr(i,r,o,n,e[s+14],9,-1019803690),n=Rr(n,i,r,o,e[s+3],14,-187363961),o=Rr(o,n,i,r,e[s+8],20,1163531501),r=Rr(r,o,n,i,e[s+13],5,-1444681467),i=Rr(i,r,o,n,e[s+2],9,-51403784),n=Rr(n,i,r,o,e[s+7],14,1735328473),o=Rr(o,n,i,r,e[s+12],20,-1926607734),r=Tr(r,o,n,i,e[s+5],4,-378558),i=Tr(i,r,o,n,e[s+8],11,-2022574463),n=Tr(n,i,r,o,e[s+11],16,1839030562),o=Tr(o,n,i,r,e[s+14],23,-35309556),r=Tr(r,o,n,i,e[s+1],4,-1530992060),i=Tr(i,r,o,n,e[s+4],11,1272893353),n=Tr(n,i,r,o,e[s+7],16,-155497632),o=Tr(o,n,i,r,e[s+10],23,-1094730640),r=Tr(r,o,n,i,e[s+13],4,681279174),i=Tr(i,r,o,n,e[s],11,-358537222),n=Tr(n,i,r,o,e[s+3],16,-722521979),o=Tr(o,n,i,r,e[s+6],23,76029189),r=Tr(r,o,n,i,e[s+9],4,-640364487),i=Tr(i,r,o,n,e[s+12],11,-421815835),n=Tr(n,i,r,o,e[s+15],16,530742520),o=Tr(o,n,i,r,e[s+2],23,-995338651),r=$r(r,o,n,i,e[s],6,-198630844),i=$r(i,r,o,n,e[s+7],10,1126891415),n=$r(n,i,r,o,e[s+14],15,-1416354905),o=$r(o,n,i,r,e[s+5],21,-57434055),r=$r(r,o,n,i,e[s+12],6,1700485571),i=$r(i,r,o,n,e[s+3],10,-1894986606),n=$r(n,i,r,o,e[s+10],15,-1051523),o=$r(o,n,i,r,e[s+1],21,-2054922799),r=$r(r,o,n,i,e[s+8],6,1873313359),i=$r(i,r,o,n,e[s+15],10,-30611744),n=$r(n,i,r,o,e[s+6],15,-1560198380),o=$r(o,n,i,r,e[s+13],21,1309151649),r=$r(r,o,n,i,e[s+4],6,-145523070),i=$r(i,r,o,n,e[s+11],10,-1120210379),n=$r(n,i,r,o,e[s+2],15,718787259),o=$r(o,n,i,r,e[s+9],21,-343485551),r=fs(r,a),o=fs(o,c),n=fs(n,u),i=fs(i,f);}return [r,o,n,i]}function a7(e){if(e.length===0)return [];for(var t=e.length*8,r=new Uint32Array(xk(t)),o=0;o<t;o+=8)r[o>>5]|=(e[o/8]&255)<<o%32;return r}function fs(e,t){var r=(e&65535)+(t&65535),o=(e>>16)+(t>>16)+(r>>16);return o<<16|r&65535}function c7(e,t){return e<<t|e>>>32-t}function Kh(e,t,r,o,n,i){return fs(c7(fs(fs(t,e),fs(o,i)),n),r)}function kr(e,t,r,o,n,i,s){return Kh(t&r|~t&o,e,t,n,i,s)}function Rr(e,t,r,o,n,i,s){return Kh(t&o|r&~o,e,t,n,i,s)}function Tr(e,t,r,o,n,i,s){return Kh(t^r^o,e,t,n,i,s)}function $r(e,t,r,o,n,i,s){return Kh(r^(t|~o),e,t,n,i,s)}var vk,wk=F(()=>{vk=o7;});var u7,_k,Ek=F(()=>{A_();wk();u7=Wh("v3",48,vk),_k=u7;});function f7(e,t,r){e=e||{};var o=e.random||(e.rng||Xl)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return us(o)}var Sk,Ik=F(()=>{w_();ed();Sk=f7;});function l7(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function k_(e,t){return e<<t|e>>>32-t}function d7(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=[];for(var n=0;n<o.length;++n)e.push(o.charCodeAt(n));}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),c=0;c<s;++c){for(var u=new Uint32Array(16),f=0;f<16;++f)u[f]=e[c*64+f*4]<<24|e[c*64+f*4+1]<<16|e[c*64+f*4+2]<<8|e[c*64+f*4+3];a[c]=u;}a[s-1][14]=(e.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<s;++d){for(var g=new Uint32Array(80),h=0;h<16;++h)g[h]=a[d][h];for(var x=16;x<80;++x)g[x]=k_(g[x-3]^g[x-8]^g[x-14]^g[x-16],1);for(var w=r[0],k=r[1],T=r[2],P=r[3],O=r[4],S=0;S<80;++S){var N=Math.floor(S/20),z=k_(w,5)+l7(N,k,T,P)+O+t[N]+g[S]>>>0;O=P,P=T,T=k_(k,30)>>>0,k=w,w=z;}r[0]=r[0]+w>>>0,r[1]=r[1]+k>>>0,r[2]=r[2]+T>>>0,r[3]=r[3]+P>>>0,r[4]=r[4]+O>>>0;}return [r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Ak,kk=F(()=>{Ak=d7;});var p7,Rk,Tk=F(()=>{A_();kk();p7=Wh("v5",80,Ak),Rk=p7;});var $k,Ok=F(()=>{$k="00000000-0000-0000-0000-000000000000";});function m7(e){if(!cs(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Nk,Pk=F(()=>{Ql();Nk=m7;});var R_={};Er(R_,{NIL:()=>$k,parse:()=>qh,stringify:()=>us,v1:()=>yk,v3:()=>_k,v4:()=>Sk,v5:()=>Rk,validate:()=>cs,version:()=>Nk});var T_=F(()=>{bk();Ek();Ik();Tk();Ok();Pk();Ql();ed();I_();});var Ck=Kr((GX,Bk)=>{var h7=(T_(),qE(R_)).v4,g7=function(e,t,r,o){if(typeof e!="string")throw new TypeError(e+" must be a string");o=o||{};let n=typeof o.version=="number"?o.version:2;if(n!==1&&n!==2)throw new TypeError(n+" must be 1 or 2");let i={method:e};if(n===2&&(i.jsonrpc="2.0"),t){if(typeof t!="object"&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");i.params=t;}if(typeof r>"u"){let s=typeof o.generator=="function"?o.generator:function(){return h7()};i.id=s(i,o);}else n===2&&r===null?o.notificationIdNull&&(i.id=null):i.id=r;return i};Bk.exports=g7;});var Lk=Kr((qX,zk)=>{var y7=(T_(),qE(R_)).v4,b7=Ck(),td=function(e,t){if(!(this instanceof td))return new td(e,t);t||(t={}),this.options={reviver:typeof t.reviver<"u"?t.reviver:null,replacer:typeof t.replacer<"u"?t.replacer:null,generator:typeof t.generator<"u"?t.generator:function(){return y7()},version:typeof t.version<"u"?t.version:2,notificationIdNull:typeof t.notificationIdNull=="boolean"?t.notificationIdNull:false},this.callServer=e;};zk.exports=td;td.prototype.request=function(e,t,r,o){let n=this,i=null,s=Array.isArray(e)&&typeof t=="function";if(this.options.version===1&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&typeof e=="object"&&typeof t=="function")o=t,i=e;else {typeof r=="function"&&(o=r,r=void 0);let u=typeof o=="function";try{i=b7(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull});}catch(f){if(u){o(f);return}throw f}if(!u)return i}let c;try{c=JSON.stringify(i,this.options.replacer);}catch(u){o(u);return}return this.callServer(c,function(u,f){n._parseResponse(u,f,o);}),i};td.prototype._parseResponse=function(e,t,r){if(e){r(e);return}if(!t){r();return}let o;try{o=JSON.parse(t,this.options.reviver);}catch(n){r(n);return}if(r.length===3)if(Array.isArray(o)){let n=function(s){return typeof s.error<"u"},i=function(s){return !n(s)};r(null,o.filter(n),o.filter(i));return}else {r(null,o.error,o.result);return}r(null,o);};});var Mk=Kr((WX,$_)=>{var x7=Object.prototype.hasOwnProperty,Vr="~";function rd(){}Object.create&&(rd.prototype=Object.create(null),new rd().__proto__||(Vr=false));function v7(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function Uk(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new v7(r,o||e,n),s=Vr?Vr+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function Jh(e,t){--e._eventsCount===0?e._events=new rd:delete e._events[t];}function Or(){this._events=new rd,this._eventsCount=0;}Or.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)x7.call(r,o)&&t.push(Vr?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Or.prototype.listeners=function(t){var r=Vr?Vr+t:t,o=this._events[r];if(!o)return [];if(o.fn)return [o.fn];for(var n=0,i=o.length,s=new Array(i);n<i;n++)s[n]=o[n].fn;return s};Or.prototype.listenerCount=function(t){var r=Vr?Vr+t:t,o=this._events[r];return o?o.fn?1:o.length:0};Or.prototype.emit=function(t,r,o,n,i,s){var a=Vr?Vr+t:t;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,f,d;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,true),u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,r),true;case 3:return c.fn.call(c.context,r,o),true;case 4:return c.fn.call(c.context,r,o,n),true;case 5:return c.fn.call(c.context,r,o,n,i),true;case 6:return c.fn.call(c.context,r,o,n,i,s),true}for(d=1,f=new Array(u-1);d<u;d++)f[d-1]=arguments[d];c.fn.apply(c.context,f);}else {var g=c.length,h;for(d=0;d<g;d++)switch(c[d].once&&this.removeListener(t,c[d].fn,void 0,true),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,r);break;case 3:c[d].fn.call(c[d].context,r,o);break;case 4:c[d].fn.call(c[d].context,r,o,n);break;default:if(!f)for(h=1,f=new Array(u-1);h<u;h++)f[h-1]=arguments[h];c[d].fn.apply(c[d].context,f);}}return true};Or.prototype.on=function(t,r,o){return Uk(this,t,r,o,false)};Or.prototype.once=function(t,r,o){return Uk(this,t,r,o,true)};Or.prototype.removeListener=function(t,r,o,n){var i=Vr?Vr+t:t;if(!this._events[i])return this;if(!r)return Jh(this,i),this;var s=this._events[i];if(s.fn)s.fn===r&&(!n||s.once)&&(!o||s.context===o)&&Jh(this,i);else {for(var a=0,c=[],u=s.length;a<u;a++)(s[a].fn!==r||n&&!s[a].once||o&&s[a].context!==o)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:Jh(this,i);}return this};Or.prototype.removeAllListeners=function(t){var r;return t?(r=Vr?Vr+t:t,this._events[r]&&Jh(this,r)):(this._events=new rd,this._eventsCount=0),this};Or.prototype.off=Or.prototype.removeListener;Or.prototype.addListener=Or.prototype.on;Or.prefixed=Vr;Or.EventEmitter=Or;typeof $_<"u"&&($_.exports=Or);});function T7(e,t=24){let r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,c=(s+2)%10,u=r[c],f=r[c+1],d=jk(u,f,1)^r[a],g=Fk(u,f,1)^r[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=g;}let n=e[2],i=e[3];for(let s=0;s<24;s++){let a=Vk[s],c=jk(n,i,a),u=Fk(n,i,a),f=Hk[s];n=e[f],i=e[f+1],e[f]=c,e[f+1]=u;}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10];}e[0]^=k7[o],e[1]^=R7[o];}Bn(r);}var _7,od,E7,S7,I7,A7,Hk,Vk,Zk,Gk,k7,R7,jk,Fk,O_,$7,Na,Yh=F(()=>{Lw();ci();_7=BigInt(0),od=BigInt(1),E7=BigInt(2),S7=BigInt(7),I7=BigInt(256),A7=BigInt(113),Hk=[],Vk=[],Zk=[];for(let e=0,t=od,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Hk.push(2*(5*o+r)),Vk.push((e+1)*(e+2)/2%64);let n=_7;for(let i=0;i<7;i++)t=(t<<od^(t>>S7)*A7)%I7,t&E7&&(n^=od<<(od<<BigInt(i))-od);Zk.push(n);}Gk=ah(Zk,true),k7=Gk[0],R7=Gk[1],jk=(e,t,r)=>r>32?QI(e,t,r):YI(e,t,r),Fk=(e,t,r)=>r>32?eA(e,t,r):XI(e,t,r);O_=class e extends Qi{constructor(t,r,o,n=false,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=false,this.destroyed=false,this.enableXOF=false,this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=i,ha(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=ZI(this.state);}clone(){return this._cloneInto()}keccak(){Pw(this.state32),T7(this.state32,this.rounds),Pw(this.state32),this.posOut=0,this.pos=0;}update(t){ai(this),t=ga(t),Ao(t);let{blockLen:r,state:o}=this,n=t.length;for(let i=0;i<n;){let s=Math.min(r-this.pos,n-i);for(let a=0;a<s;a++)o[this.pos++]^=t[i++];this.pos===r&&this.keccak();}return this}finish(){if(this.finished)return;this.finished=true;let{state:t,suffix:r,pos:o,blockLen:n}=this;t[o]^=r,(r&128)!==0&&o===n-1&&this.keccak(),t[n-1]^=128,this.keccak();}writeInto(t){ai(this,false),Ao(t),this.finish();let r=this.state,{blockLen:o}=this;for(let n=0,i=t.length;n<i;){this.posOut>=o&&this.keccak();let s=Math.min(o-this.posOut,i-n);t.set(r.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s;}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ha(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(oh(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true,Bn(this.state);}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:i,enableXOF:s}=this;return t||(t=new e(r,o,n,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=o,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}},$7=(e,t,r)=>zl(()=>new O_(t,e,r)),Na=$7(1,136,256/8);});var Xh,N_,qk=F(()=>{ci();Xh=class extends Qi{constructor(t,r){super(),this.finished=false,this.destroyed=false,VI(t);let o=ga(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(o.length>n?t.create().update(o).digest():o);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=t.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),Bn(i);}update(t){return ai(this),this.iHash.update(t),this}digestInto(t){ai(this),Ao(t,this.outputLen),this.finished=true,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy();}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:o,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return t=t,t.finished=n,t.destroyed=i,t.blockLen=s,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=true,this.oHash.destroy(),this.iHash.destroy();}},N_=(e,t,r)=>new Xh(e,t).update(r).digest();N_.create=(e,t)=>new Xh(e,t);});function Wk(e){e.lowS!==void 0&&Ro("lowS",e.lowS),e.prehash!==void 0&&Ro("prehash",e.prehash);}function O7(e){let t=Fl(e);oo(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:o,a:n}=t;if(r){if(!o.eql(n,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}function P_(e,t){return ns(To(e,t))}function N7(e){let t=O7(e),{Fp:r}=t,o=pi(t.n,t.nBitLength),n=t.toBytes||((O,S,N)=>{let z=S.toAffine();return ar(Uint8Array.from([4]),r.toBytes(z.x),r.toBytes(z.y))}),i=t.fromBytes||(O=>{let S=O.subarray(1),N=r.fromBytes(S.subarray(0,r.BYTES)),z=r.fromBytes(S.subarray(r.BYTES,2*r.BYTES));return {x:N,y:z}});function s(O){let{a:S,b:N}=t,z=r.sqr(O),C=r.mul(z,O);return r.add(r.add(C,r.mul(O,S)),N)}function a(O,S){let N=r.sqr(S),z=s(O);return r.eql(N,z)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let c=r.mul(r.pow(t.a,id),C_),u=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,u)))throw new Error("bad curve params: a or b");function f(O){return wa(O,Ye,t.n)}function d(O){let{allowedPrivateKeyLengths:S,nByteLength:N,wrapPrivateKey:z,n:C}=t;if(S&&typeof O!="bigint"){if(jc(O)&&(O=ns(O)),typeof O!="string"||!S.includes(O.length))throw new Error("invalid private key");O=O.padStart(N*2,"0");}let D;try{D=typeof O=="bigint"?O:rn(Ge("private key",O,N));}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof O)}return z&&(D=Ue(D,C)),Dr("private key",D,Ye,C),D}function g(O){if(!(O instanceof w))throw new Error("ProjectivePoint expected")}let h=Hc((O,S)=>{let{px:N,py:z,pz:C}=O;if(r.eql(C,r.ONE))return {x:N,y:z};let D=O.is0();S==null&&(S=D?r.ONE:r.inv(C));let q=r.mul(N,S),H=r.mul(z,S),Z=r.mul(C,S);if(D)return {x:r.ZERO,y:r.ZERO};if(!r.eql(Z,r.ONE))throw new Error("invZ was invalid");return {x:q,y:H}}),x=Hc(O=>{if(O.is0()){if(t.allowInfinityPoint&&!r.is0(O.py))return;throw new Error("bad point: ZERO")}let{x:S,y:N}=O.toAffine();if(!r.isValid(S)||!r.isValid(N))throw new Error("bad point: x or y not FE");if(!a(S,N))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return true});class w{constructor(S,N,z){if(S==null||!r.isValid(S))throw new Error("x required");if(N==null||!r.isValid(N)||r.is0(N))throw new Error("y required");if(z==null||!r.isValid(z))throw new Error("z required");this.px=S,this.py=N,this.pz=z,Object.freeze(this);}static fromAffine(S){let{x:N,y:z}=S||{};if(!S||!r.isValid(N)||!r.isValid(z))throw new Error("invalid affine point");if(S instanceof w)throw new Error("projective point not allowed");let C=D=>r.eql(D,r.ZERO);return C(N)&&C(z)?w.ZERO:new w(N,z,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(S){let N=di(r,S.map(z=>z.pz));return S.map((z,C)=>z.toAffine(N[C])).map(w.fromAffine)}static fromHex(S){let N=w.fromAffine(i(Ge("pointHex",S)));return N.assertValidity(),N}static fromPrivateKey(S){return w.BASE.multiply(d(S))}static msm(S,N){return mh(w,o,S,N)}_setWindowSize(S){P.setWindowSize(this,S);}assertValidity(){x(this);}hasEvenY(){let{y:S}=this.toAffine();if(r.isOdd)return !r.isOdd(S);throw new Error("Field doesn't support isOdd")}equals(S){g(S);let{px:N,py:z,pz:C}=this,{px:D,py:q,pz:H}=S,Z=r.eql(r.mul(N,H),r.mul(D,C)),re=r.eql(r.mul(z,H),r.mul(q,C));return Z&&re}negate(){return new w(this.px,r.neg(this.py),this.pz)}double(){let{a:S,b:N}=t,z=r.mul(N,id),{px:C,py:D,pz:q}=this,H=r.ZERO,Z=r.ZERO,re=r.ZERO,I=r.mul(C,C),l=r.mul(D,D),m=r.mul(q,q),y=r.mul(C,D);return y=r.add(y,y),re=r.mul(C,q),re=r.add(re,re),H=r.mul(S,re),Z=r.mul(z,m),Z=r.add(H,Z),H=r.sub(l,Z),Z=r.add(l,Z),Z=r.mul(H,Z),H=r.mul(y,H),re=r.mul(z,re),m=r.mul(S,m),y=r.sub(I,m),y=r.mul(S,y),y=r.add(y,re),re=r.add(I,I),I=r.add(re,I),I=r.add(I,m),I=r.mul(I,y),Z=r.add(Z,I),m=r.mul(D,q),m=r.add(m,m),I=r.mul(m,y),H=r.sub(H,I),re=r.mul(m,l),re=r.add(re,re),re=r.add(re,re),new w(H,Z,re)}add(S){g(S);let{px:N,py:z,pz:C}=this,{px:D,py:q,pz:H}=S,Z=r.ZERO,re=r.ZERO,I=r.ZERO,l=t.a,m=r.mul(t.b,id),y=r.mul(N,D),b=r.mul(z,q),v=r.mul(C,H),E=r.add(N,z),R=r.add(D,q);E=r.mul(E,R),R=r.add(y,b),E=r.sub(E,R),R=r.add(N,C);let _=r.add(D,H);return R=r.mul(R,_),_=r.add(y,v),R=r.sub(R,_),_=r.add(z,C),Z=r.add(q,H),_=r.mul(_,Z),Z=r.add(b,v),_=r.sub(_,Z),I=r.mul(l,R),Z=r.mul(m,v),I=r.add(Z,I),Z=r.sub(b,I),I=r.add(b,I),re=r.mul(Z,I),b=r.add(y,y),b=r.add(b,y),v=r.mul(l,v),R=r.mul(m,R),b=r.add(b,v),v=r.sub(y,v),v=r.mul(l,v),R=r.add(R,v),y=r.mul(b,R),re=r.add(re,y),y=r.mul(_,R),Z=r.mul(E,Z),Z=r.sub(Z,y),y=r.mul(E,b),I=r.mul(_,I),I=r.add(I,y),new w(Z,re,I)}subtract(S){return this.add(S.negate())}is0(){return this.equals(w.ZERO)}wNAF(S){return P.wNAFCached(this,S,w.normalizeZ)}multiplyUnsafe(S){let{endo:N,n:z}=t;Dr("scalar",S,ao,z);let C=w.ZERO;if(S===ao)return C;if(this.is0()||S===Ye)return this;if(!N||P.hasPrecomputes(this))return P.wNAFCachedUnsafe(this,S,w.normalizeZ);let{k1neg:D,k1:q,k2neg:H,k2:Z}=N.splitScalar(S),re=C,I=C,l=this;for(;q>ao||Z>ao;)q&Ye&&(re=re.add(l)),Z&Ye&&(I=I.add(l)),l=l.double(),q>>=Ye,Z>>=Ye;return D&&(re=re.negate()),H&&(I=I.negate()),I=new w(r.mul(I.px,N.beta),I.py,I.pz),re.add(I)}multiply(S){let{endo:N,n:z}=t;Dr("scalar",S,Ye,z);let C,D;if(N){let{k1neg:q,k1:H,k2neg:Z,k2:re}=N.splitScalar(S),{p:I,f:l}=this.wNAF(H),{p:m,f:y}=this.wNAF(re);I=P.constTimeNegate(q,I),m=P.constTimeNegate(Z,m),m=new w(r.mul(m.px,N.beta),m.py,m.pz),C=I.add(m),D=l.add(y);}else {let{p:q,f:H}=this.wNAF(S);C=q,D=H;}return w.normalizeZ([C,D])[0]}multiplyAndAddUnsafe(S,N,z){let C=w.BASE,D=(H,Z)=>Z===ao||Z===Ye||!H.equals(C)?H.multiplyUnsafe(Z):H.multiply(Z),q=D(this,N).add(D(S,z));return q.is0()?void 0:q}toAffine(S){return h(this,S)}isTorsionFree(){let{h:S,isTorsionFree:N}=t;if(S===Ye)return true;if(N)return N(w,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:S,clearCofactor:N}=t;return S===Ye?this:N?N(w,this):this.multiplyUnsafe(t.h)}toRawBytes(S=true){return Ro("isCompressed",S),this.assertValidity(),n(w,this,S)}toHex(S=true){return Ro("isCompressed",S),ns(this.toRawBytes(S))}}w.BASE=new w(t.Gx,t.Gy,r.ONE),w.ZERO=new w(r.ZERO,r.ONE,r.ZERO);let{endo:k,nBitLength:T}=t,P=ph(w,k?Math.ceil(T/2):T);return {CURVE:t,ProjectivePoint:w,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:f}}function P7(e){let t=Fl(e);return oo(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:true,...t})}function Kk(e){let t=P7(e),{Fp:r,n:o,nByteLength:n,nBitLength:i}=t,s=r.BYTES+1,a=2*r.BYTES+1;function c(m){return Ue(m,o)}function u(m){return lh(m,o)}let{ProjectivePoint:f,normPrivateKeyToScalar:d,weierstrassEquation:g,isWithinCurveOrder:h}=N7({...t,toBytes(m,y,b){let v=y.toAffine(),E=r.toBytes(v.x),R=ar;return Ro("isCompressed",b),b?R(Uint8Array.from([y.hasEvenY()?2:3]),E):R(Uint8Array.from([4]),E,r.toBytes(v.y))},fromBytes(m){let y=m.length,b=m[0],v=m.subarray(1);if(y===s&&(b===2||b===3)){let E=rn(v);if(!wa(E,Ye,r.ORDER))throw new Error("Point is not on curve");let R=g(E),_;try{_=r.sqrt(R);}catch(G){let J=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+J)}let p=(_&Ye)===Ye;return (b&1)===1!==p&&(_=r.neg(_)),{x:E,y:_}}else if(y===a&&b===4){let E=r.fromBytes(v.subarray(0,r.BYTES)),R=r.fromBytes(v.subarray(r.BYTES,2*r.BYTES));return {x:E,y:R}}else {let E=s,R=a;throw new Error("invalid Point, expected length of "+E+", or uncompressed "+R+", got "+y)}}});function x(m){let y=o>>Ye;return m>y}function w(m){return x(m)?c(-m):m}let k=(m,y,b)=>rn(m.slice(y,b));class T{constructor(y,b,v){Dr("r",y,Ye,o),Dr("s",b,Ye,o),this.r=y,this.s=b,v!=null&&(this.recovery=v),Object.freeze(this);}static fromCompact(y){let b=n;return y=Ge("compactSignature",y,b*2),new T(k(y,0,b),k(y,b,2*b))}static fromDER(y){let{r:b,s:v}=gi.toSig(Ge("DER",y));return new T(b,v)}assertValidity(){}addRecoveryBit(y){return new T(this.r,this.s,y)}recoverPublicKey(y){let{r:b,s:v,recovery:E}=this,R=C(Ge("msgHash",y));if(E==null||![0,1,2,3].includes(E))throw new Error("recovery id invalid");let _=E===2||E===3?b+t.n:b;if(_>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let p=(E&1)===0?"02":"03",A=f.fromHex(p+P_(_,r.BYTES)),G=u(_),J=c(-R*G),Q=c(v*G),ae=f.BASE.multiplyAndAddUnsafe(A,J,Q);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return x(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return jl(this.toDERHex())}toDERHex(){return gi.hexFromSig(this)}toCompactRawBytes(){return jl(this.toCompactHex())}toCompactHex(){let y=n;return P_(this.r,y)+P_(this.s,y)}}let P={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=Vw(t.n);return _A(t.randomBytes(m),t.n)},precompute(m=8,y=f.BASE){return y._setWindowSize(m),y.multiply(BigInt(3)),y}};function O(m,y=true){return f.fromPrivateKey(m).toRawBytes(y)}function S(m){if(typeof m=="bigint")return false;if(m instanceof f)return true;let b=Ge("key",m).length,v=r.BYTES,E=v+1,R=2*v+1;if(!(t.allowedPrivateKeyLengths||n===E))return b===E||b===R}function N(m,y,b=true){if(S(m)===true)throw new Error("first arg must be private key");if(S(y)===false)throw new Error("second arg must be public key");return f.fromHex(y).multiply(d(m)).toRawBytes(b)}let z=t.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");let y=rn(m),b=m.length*8-i;return b>0?y>>BigInt(b):y},C=t.bits2int_modN||function(m){return c(z(m))},D=_a(i);function q(m){return Dr("num < 2^"+i,m,ao,D),To(m,n)}function H(m,y,b=Z){if(["recovered","canonical"].some(ye=>ye in b))throw new Error("sign() legacy options not supported");let{hash:v,randomBytes:E}=t,{lowS:R,prehash:_,extraEntropy:p}=b;R==null&&(R=true),m=Ge("msgHash",m),Wk(b),_&&(m=Ge("prehashed msgHash",v(m)));let A=C(m),G=d(y),J=[q(G),q(A)];if(p!=null&&p!==false){let ye=p===true?E(r.BYTES):p;J.push(Ge("extraEntropy",ye));}let Q=ar(...J),ae=A;function he(ye){let Ke=z(ye);if(!h(Ke))return;let Se=u(Ke),_e=f.BASE.multiply(Ke).toAffine(),tr=c(_e.x);if(tr===ao)return;let Ce=c(Se*c(ae+tr*G));if(Ce===ao)return;let je=(_e.x===tr?0:2)|Number(_e.y&Ye),Di=Ce;return R&&x(Ce)&&(Di=w(Ce),je^=1),new T(tr,Di,je)}return {seed:Q,k2sig:he}}let Z={lowS:t.lowS,prehash:false},re={lowS:t.lowS,prehash:false};function I(m,y,b=Z){let{seed:v,k2sig:E}=H(m,y,b),R=t;return mA(R.hash.outputLen,R.nByteLength,R.hmac)(v,E)}f.BASE._setWindowSize(8);function l(m,y,b,v=re){let E=m;y=Ge("msgHash",y),b=Ge("publicKey",b);let{lowS:R,prehash:_,format:p}=v;if(Wk(v),"strict"in v)throw new Error("options.strict was renamed to lowS");if(p!==void 0&&p!=="compact"&&p!=="der")throw new Error("format must be compact or der");let A=typeof E=="string"||jc(E),G=!A&&!p&&typeof E=="object"&&E!==null&&typeof E.r=="bigint"&&typeof E.s=="bigint";if(!A&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let J,Q;try{if(G&&(J=new T(E.r,E.s)),A){try{p!=="compact"&&(J=T.fromDER(E));}catch(je){if(!(je instanceof gi.Err))throw je}!J&&p!=="der"&&(J=T.fromCompact(E));}Q=f.fromHex(b);}catch{return false}if(!J||R&&J.hasHighS())return false;_&&(y=t.hash(y));let{r:ae,s:he}=J,ye=C(y),Ke=u(he),Se=c(ye*Ke),_e=c(ae*Ke),tr=f.BASE.multiplyAndAddUnsafe(Q,Se,_e)?.toAffine();return tr?c(tr.x)===ae:false}return {CURVE:t,getPublicKey:O,getSharedSecret:N,sign:I,verify:l,ProjectivePoint:f,Signature:T,utils:P}}function B7(e,t){let r=e.ORDER,o=ao;for(let x=r-Ye;x%ls===ao;x/=ls)o+=Ye;let n=o,i=ls<<n-Ye-Ye,s=i*ls,a=(r-Ye)/s,c=(a-Ye)/ls,u=s-Ye,f=i,d=e.pow(t,a),g=e.pow(t,(a+Ye)/ls),h=(x,w)=>{let k=d,T=e.pow(w,u),P=e.sqr(T);P=e.mul(P,w);let O=e.mul(x,P);O=e.pow(O,c),O=e.mul(O,T),T=e.mul(O,w),P=e.mul(O,x);let S=e.mul(P,T);O=e.pow(S,f);let N=e.eql(O,e.ONE);T=e.mul(P,g),O=e.mul(S,k),P=e.cmov(T,P,N),S=e.cmov(O,S,N);for(let z=n;z>Ye;z--){let C=z-ls;C=ls<<C-Ye;let D=e.pow(S,C),q=e.eql(D,e.ONE);T=e.mul(P,k),k=e.mul(k,k),D=e.mul(S,k),P=e.cmov(T,P,q),S=e.cmov(D,S,q);}return {isValid:N,value:P}};if(e.ORDER%C_===id){let x=(e.ORDER-id)/C_,w=e.sqrt(e.neg(t));h=(k,T)=>{let P=e.sqr(T),O=e.mul(k,T);P=e.mul(P,O);let S=e.pow(P,x);S=e.mul(S,O);let N=e.mul(S,w),z=e.mul(e.sqr(S),T),C=e.eql(z,k),D=e.cmov(N,S,C);return {isValid:C,value:D}};}return h}function Jk(e,t){if(dh(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=B7(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return o=>{let n,i,s,a,c,u,f,d;n=e.sqr(o),n=e.mul(n,t.Z),i=e.sqr(n),i=e.add(i,n),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),f=e.mul(n,s);let{isValid:g,value:h}=r(i,u);d=e.mul(n,o),d=e.mul(d,h),f=e.cmov(f,s,g),d=e.cmov(d,h,g);let x=e.isOdd(o)===e.isOdd(d);d=e.cmov(e.neg(d),d,x);let w=di(e,[a],true)[0];return f=e.mul(f,w),{x:f,y:d}}}var B_,gi,ao,Ye,ls,id,C_,z_=F(()=>{Jw();Ia();Ea();B_=class extends Error{constructor(t=""){super(t);}},gi={Err:B_,_tlv:{encode:(e,t)=>{let{Err:r}=gi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let o=t.length/2,n=Dl(o);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let i=o>127?Dl(n.length/2|128):"";return Dl(e)+i+n+t},decode(e,t){let{Err:r}=gi,o=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[o++],i=!!(n&128),s=0;if(!i)s=n;else {let c=n&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(o,o+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let f of u)s=s<<8|f;if(o+=c,s<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(o,o+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return {v:a,l:t.subarray(o+s)}}},_int:{encode(e){let{Err:t}=gi;if(e<ao)throw new t("integer: negative integers are not allowed");let r=Dl(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=gi;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return rn(e)}},toSig(e){let{Err:t,_int:r,_tlv:o}=gi,n=Ge("signature",e),{v:i,l:s}=o.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=o.decode(2,i),{v:u,l:f}=o.decode(2,c);if(f.length)throw new t("invalid signature: left bytes after parsing");return {r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=gi,o=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),i=o+n;return t.encode(48,i)}};ao=BigInt(0),Ye=BigInt(1),ls=BigInt(2),id=BigInt(3),C_=BigInt(4);});function C7(e){return {hash:e,hmac:(t,...r)=>N_(e,t,Bw(...r)),randomBytes:Dc}}function Yk(e,t){let r=o=>Kk({...e,...C7(o)});return {...r(t),create:r}}var Xk=F(()=>{qk();ci();z_();});var iR={};Er(iR,{encodeToCurve:()=>H7,hashToCurve:()=>F7,schnorr:()=>M7,secp256k1:()=>xn,secp256k1_hasher:()=>H_});function tR(e){let t=cd,r=BigInt(3),o=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,f=u*u*e%t,d=at(f,r,t)*f%t,g=at(d,r,t)*f%t,h=at(g,e0,t)*u%t,x=at(h,n,t)*h%t,w=at(x,i,t)*x%t,k=at(w,a,t)*w%t,T=at(k,c,t)*k%t,P=at(T,a,t)*w%t,O=at(P,r,t)*f%t,S=at(O,s,t)*x%t,N=at(S,o,t)*u%t,z=at(N,e0,t);if(!ds.eql(ds.sqr(z),e))throw new Error("Cannot find square root");return z}function t0(e,...t){let r=eR[e];if(r===void 0){let o=xa(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ar(o,o),eR[e]=r;}return xa(ar(r,...t))}function M_(e){let t=xn.utils.normPrivateKeyToScalar(e),r=F_.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:ad(-t),bytes:j_(r)}}function rR(e){Dr("x",e,sd,cd);let t=L_(e*e),r=L_(t*e+BigInt(7)),o=tR(r);o%e0!==D_&&(o=L_(-o));let n=new F_(e,o,sd);return n.assertValidity(),n}function nR(...e){return ad(Yc(t0("BIP0340/challenge",...e)))}function L7(e){return M_(e).bytes}function U7(e,t,r=Dc(32)){let o=Ge("message",e),{bytes:n,scalar:i}=M_(t),s=Ge("auxRand",r,32),a=U_(i^Yc(t0("BIP0340/aux",s))),c=t0("BIP0340/nonce",a,n,o),u=ad(Yc(c));if(u===D_)throw new Error("sign failed: k is zero");let{bytes:f,scalar:d}=M_(u),g=nR(f,n,o),h=new Uint8Array(64);if(h.set(f,0),h.set(U_(ad(d+g*i)),32),!oR(h,o,n))throw new Error("sign: Invalid signature produced");return h}function oR(e,t,r){let o=Ge("signature",e,64),n=Ge("message",t),i=Ge("publicKey",r,32);try{let s=rR(Yc(i)),a=Yc(o.subarray(0,32));if(!wa(a,sd,cd))return !1;let c=Yc(o.subarray(32,64));if(!wa(c,sd,Qh))return !1;let u=nR(U_(a),j_(s),n),f=z7(s,c,ad(-u));return !(!f||!f.hasEvenY()||f.toAffine().x!==a)}catch{return false}}var cd,Qh,D_,sd,e0,Qk,ds,xn,eR,j_,U_,L_,ad,F_,z7,Yc,M7,D7,j7,H_,F7,H7,ud=F(()=>{uh();ci();Xk();NA();Ia();Ea();z_();cd=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Qh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),D_=BigInt(0),sd=BigInt(1),e0=BigInt(2),Qk=(e,t)=>(e+t/e0)/t;ds=pi(cd,void 0,void 0,{sqrt:tR}),xn=Yk({a:D_,b:BigInt(7),Fp:ds,n:Qh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Qh,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-sd*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),a=Qk(i*e,t),c=Qk(-o*e,t),u=Ue(e-a*r-c*n,t),f=Ue(-a*o-c*i,t),d=u>s,g=f>s;if(d&&(u=t-u),g&&(f=t-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return {k1neg:d,k1:u,k2neg:g,k2:f}}}},xa),eR={};j_=e=>e.toRawBytes(true).slice(1),U_=e=>To(e,32),L_=e=>Ue(e,cd),ad=e=>Ue(e,Qh),F_=xn.ProjectivePoint,z7=(e,t,r)=>F_.BASE.multiplyAndAddUnsafe(e,t,r);Yc=rn;M7={getPublicKey:L7,sign:U7,verify:oR,utils:{randomPrivateKey:xn.utils.randomPrivateKey,lift_x:rR,pointToBytes:j_,numberToBytesBE:To,bytesToNumberBE:rn,taggedHash:t0,mod:Ue}},D7=$A(ds,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),j7=Jk(ds,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:ds.create(BigInt("-11"))}),H_=OA(xn.ProjectivePoint,e=>{let{x:t,y:r}=j7(ds.create(e[0]));return D7(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:ds.ORDER,m:1,k:128,expand:"xmd",hash:xa}),F7=H_.hashToCurve,H7=H_.encodeToCurve;});var gT,yT=F(()=>{gT="1.2.3";});var _t,su=F(()=>{yT();_t=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...o?[`Details: ${o}`]:[],`Version: abitype@${gT}`].join(`
3
+ `);super(i),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t;}};});function En(e,t){return e.exec(t)?.groups}var C6,z6,S0,Od=F(()=>{C6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,z6=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,S0=/^\(.+?\).*?$/;});function I0(e){let t=e.type;if(bT.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let n=0;n<r;n++){let i=e.components[n];t+=I0(i),n<r-1&&(t+=", ");}let o=En(bT,e.type);return t+=`)${o?.array||""}`,I0({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var bT,xT=F(()=>{Od();bT=/^tuple(?<array>(\[(\d*)\])*)$/;});function xi(e){let t="",r=e.length;for(let o=0;o<r;o++){let n=e[o];t+=I0(n),o!==r-1&&(t+=", ");}return t}var L6=F(()=>{xT();});function Ua(e){return e.type==="function"?`function ${e.name}(${xi(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${xi(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${xi(e.inputs)})`:e.type==="error"?`error ${e.name}(${xi(e.inputs)})`:e.type==="constructor"?`constructor(${xi(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var vT=F(()=>{L6();});function _T(e){return wT.test(e)}function ET(e){return En(wT,e)}function IT(e){return ST.test(e)}function AT(e){return En(ST,e)}function RT(e){return kT.test(e)}function TT(e){return En(kT,e)}function hs(e){return $T.test(e)}function OT(e){return En($T,e)}function PT(e){return NT.test(e)}function BT(e){return En(NT,e)}function zT(e){return CT.test(e)}function LT(e){return En(CT,e)}function UT(e){return gH.test(e)}var wT,ST,kT,$T,NT,CT,gH,U6,MT,A0,au=F(()=>{Od();wT=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;ST=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;kT=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;$T=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;NT=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;CT=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;gH=/^receive\(\) external payable$/;U6=new Set(["memory","indexed","storage","calldata"]),MT=new Set(["indexed"]),A0=new Set(["calldata","memory","storage"]);});var Nd,Pd,k0,R0=F(()=>{su();Nd=class extends _t{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiItemError"});}},Pd=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownTypeError"});}},k0=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSolidityTypeError"});}};});var Bd,Cd,zd,Ld,Ud,Md,T0=F(()=>{su();Bd=class extends _t{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiParametersError"});}},Cd=class extends _t{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},zd=class extends _t{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SolidityProtectedKeywordError"});}},Ld=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidModifierError"});}},Ud=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${o}" was given.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidFunctionModifierError"});}},Md=class extends _t{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiTypeParameterError"});}};});var fo,Dd,jd,M6=F(()=>{su();fo=class extends _t{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidSignatureError"});}},Dd=class extends _t{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},jd=class extends _t{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidStructSignatureError"});}};});var Fd,DT=F(()=>{su();Fd=class extends _t{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"CircularReferenceError"});}};});var Hd,jT=F(()=>{su();Hd=class extends _t{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParenthesisError"});}};});function FT(e,t,r){let o="";if(r)for(let n of Object.entries(r)){if(!n)continue;let i="";for(let s of n[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;o+=`(${n[0]}{${i}})`;}return t?`${t}:${e}${o}`:`${e}${o}`}var $0,HT=F(()=>{$0=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:true}],["event:address indexed to",{type:"address",name:"to",indexed:true}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}]]);});function Vd(e,t={}){if(RT(e))return yH(e,t);if(IT(e))return bH(e,t);if(_T(e))return xH(e,t);if(PT(e))return vH(e,t);if(zT(e))return wH(e);if(UT(e))return {type:"receive",stateMutability:"payable"};throw new Dd({signature:e})}function yH(e,t={}){let r=TT(e);if(!r)throw new fo({signature:e,type:"function"});let o=on(r.parameters),n=[],i=o.length;for(let a=0;a<i;a++)n.push(lo(o[a],{modifiers:A0,structs:t,type:"function"}));let s=[];if(r.returns){let a=on(r.returns),c=a.length;for(let u=0;u<c;u++)s.push(lo(a[u],{modifiers:A0,structs:t,type:"function"}));}return {name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:n,outputs:s}}function bH(e,t={}){let r=AT(e);if(!r)throw new fo({signature:e,type:"event"});let o=on(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(lo(o[s],{modifiers:MT,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function xH(e,t={}){let r=ET(e);if(!r)throw new fo({signature:e,type:"error"});let o=on(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(lo(o[s],{structs:t,type:"error"}));return {name:r.name,type:"error",inputs:n}}function vH(e,t={}){let r=BT(e);if(!r)throw new fo({signature:e,type:"constructor"});let o=on(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(lo(o[s],{structs:t,type:"constructor"}));return {type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:n}}function wH(e){let t=LT(e);if(!t)throw new fo({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function lo(e,t){let r=FT(e,t?.type,t?.structs);if($0.has(r))return $0.get(r);let o=S0.test(e),n=En(o?EH:_H,e);if(!n)throw new Cd({param:e});if(n.name&&AH(n.name))throw new zd({param:e,name:n.name});let i=n.name?{name:n.name}:{},s=n.modifier==="indexed"?{indexed:true}:{},a=t?.structs??{},c,u={};if(o){c="tuple";let d=on(n.type),g=[],h=d.length;for(let x=0;x<h;x++)g.push(lo(d[x],{structs:a}));u={components:g};}else if(n.type in a)c="tuple",u={components:a[n.type]};else if(SH.test(n.type))c=`${n.type}256`;else if(n.type==="address payable")c="address";else if(c=n.type,t?.type!=="struct"&&!D6(c))throw new k0({type:c});if(n.modifier){if(!t?.modifiers?.has?.(n.modifier))throw new Ld({param:e,type:t?.type,modifier:n.modifier});if(A0.has(n.modifier)&&!kH(c,!!n.array))throw new Ud({param:e,type:t?.type,modifier:n.modifier})}let f={type:`${c}${n.array??""}`,...i,...s,...u};return $0.set(r,f),f}function on(e,t=[],r="",o=0){let n=e.trim().length;for(let i=0;i<n;i++){let s=e[i],a=e.slice(i+1);switch(s){case ",":return o===0?on(a,[...t,r.trim()]):on(a,t,`${r}${s}`,o);case "(":return on(a,t,`${r}${s}`,o+1);case ")":return on(a,t,`${r}${s}`,o-1);default:return on(a,t,`${r}${s}`,o)}}if(r==="")return t;if(o!==0)throw new Hd({current:r,depth:o});return t.push(r.trim()),t}function D6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||C6.test(e)||z6.test(e)}function AH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||C6.test(e)||z6.test(e)||IH.test(e)}function kH(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var _H,EH,SH,IH,cu=F(()=>{Od();R0();T0();M6();jT();HT();au();_H=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,EH=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,SH=/^u?int$/;IH=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;});function uu(e){let t={},r=e.length;for(let s=0;s<r;s++){let a=e[s];if(!hs(a))continue;let c=OT(a);if(!c)throw new fo({signature:a,type:"struct"});let u=c.properties.split(";"),f=[],d=u.length;for(let g=0;g<d;g++){let x=u[g].trim();if(!x)continue;let w=lo(x,{type:"struct"});f.push(w);}if(!f.length)throw new jd({signature:a});t[c.name]=f;}let o={},n=Object.entries(t),i=n.length;for(let s=0;s<i;s++){let[a,c]=n[s];o[a]=VT(c,t);}return o}function VT(e=[],t={},r=new Set){let o=[],n=e.length;for(let i=0;i<n;i++){let s=e[i];if(S0.test(s.type))o.push(s);else {let c=En(RH,s.type);if(!c?.type)throw new Md({abiParameter:s});let{array:u,type:f}=c;if(f in t){if(r.has(f))throw new Fd({type:f});o.push({...s,type:`tuple${u??""}`,components:VT(t[f],t,new Set([...r,f]))});}else if(D6(f))o.push(s);else throw new Pd({type:f})}}return o}var RH,O0=F(()=>{Od();R0();T0();M6();DT();au();cu();RH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;});function vi(e){let t=uu(e),r=[],o=e.length;for(let n=0;n<o;n++){let i=e[n];hs(i)||r.push(Vd(i,t));}return r}var ZT=F(()=>{au();O0();cu();});function Zd(e){let t;if(typeof e=="string")t=Vd(e);else {let r=uu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(!hs(i)){t=Vd(i,r);break}}}if(!t)throw new Nd({signature:e});return t}var GT=F(()=>{R0();au();O0();cu();});function Gd(e){let t=[];if(typeof e=="string"){let r=on(e),o=r.length;for(let n=0;n<o;n++)t.push(lo(r[n],{modifiers:U6}));}else {let r=uu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(hs(i))continue;let s=on(i),a=s.length;for(let c=0;c<a;c++)t.push(lo(s[c],{modifiers:U6,structs:r}));}}if(t.length===0)throw new Bd({params:e});return t}var qT=F(()=>{T0();au();O0();cu();cu();});var fu=F(()=>{vT();L6();ZT();GT();qT();});function nr(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new N0(e.type);return `${e.name}(${qd(e.inputs,{includeName:t})})`}function qd(e,{includeName:t=false}={}){return e?e.map(r=>TH(r,{includeName:t})).join(t?", ":","):""}function TH(e,{includeName:t}){return e.type.startsWith("tuple")?`(${qd(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var wi=F(()=>{Et();});function St(e,{strict:t=true}={}){return !e||typeof e!="string"?false:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var po=F(()=>{});function $e(e){return St(e,{strict:false})?Math.ceil((e.length-2)/2):e.length}var sn=F(()=>{po();});var j6,KT=F(()=>{j6="2.55.16";});function JT(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?JT(e.cause,t):t?null:e}var F6,L,Te=F(()=>{KT();F6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${j6}`},L=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=F6.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...F6.version?[`Version: ${F6.version}`]:[]].join(`
4
+ `);super(s,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=j6;}walk(t){return JT(this,t)}};});var P0,Wd,lu,Ln,B0,C0,z0,L0,Kd,du,U0,M0,Jd,mo,pu,D0,j0,F0,_i,gs,H0,V0,mu,N0,Et=F(()=>{wi();sn();Te();P0=class extends L{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
5
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"});}},Wd=class extends L{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
6
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"});}},lu=class extends L{constructor({data:t,params:r,size:o}){super([`Data size of ${o} bytes is too small for given parameters.`].join(`
7
+ `),{metaMessages:[`Params: (${qd(r,{includeName:true})})`,`Data: ${t} (${o} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"params",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t,this.params=r,this.size=o;}},Ln=class extends L{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t});}},B0=class extends L{constructor({expectedLength:t,givenLength:r,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${r}`].join(`
8
+ `),{name:"AbiEncodingArrayLengthMismatchError"});}},C0=class extends L{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${$e(r)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"});}},z0=class extends L{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(`
9
+ `),{name:"AbiEncodingLengthMismatchError"});}},L0=class extends L{constructor(t,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
10
+ `),{docsPath:r,name:"AbiErrorInputsNotFoundError"});}},Kd=class extends L{constructor(t,{docsPath:r}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
11
+ `),{docsPath:r,name:"AbiErrorNotFoundError"});}},du=class extends L{constructor(t,{docsPath:r,cause:o}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
12
+ `),{docsPath:r,name:"AbiErrorSignatureNotFoundError",cause:o}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.signature=t;}},U0=class extends L{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"});}},M0=class extends L{constructor(t,{docsPath:r}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
13
+ `),{docsPath:r,name:"AbiEventSignatureNotFoundError"});}},Jd=class extends L{constructor(t,{docsPath:r}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
14
+ `),{docsPath:r,name:"AbiEventNotFoundError"});}},mo=class extends L{constructor(t,{docsPath:r}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
15
+ `),{docsPath:r,name:"AbiFunctionNotFoundError"});}},pu=class extends L{constructor(t,{docsPath:r}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
16
+ `),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"});}},D0=class extends L{constructor(t,{docsPath:r}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
17
+ `),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"});}},j0=class extends L{constructor(t,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${nr(t.abiItem)}\`, and`,`\`${r.type}\` in \`${nr(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"});}},F0=class extends L{constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`,{name:"BytesSizeMismatchError"});}},_i=class extends L{constructor({abiItem:t,data:r,params:o,size:n}){super([`Data size of ${n} bytes is too small for non-indexed event parameters.`].join(`
18
+ `),{metaMessages:[`Params: (${qd(o,{includeName:true})})`,`Data: ${r} (${n} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"params",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abiItem=t,this.data=r,this.params=o,this.size=n;}},gs=class extends L{constructor({abiItem:t,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${nr(t,{includeName:true})}".`].join(`
19
+ `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abiItem=t;}},H0=class extends L{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
20
+ `),{docsPath:r,name:"InvalidAbiEncodingType"});}},V0=class extends L{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
21
+ `),{docsPath:r,name:"InvalidAbiDecodingType"});}},mu=class extends L{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
22
+ `),{name:"InvalidArrayError"});}},N0=class extends L{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
23
+ `),{name:"InvalidDefinitionTypeError"});}};});var Yd,Xd,Qd,G0=F(()=>{Te();Yd=class extends L{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"});}},Xd=class extends L{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"});}},Qd=class extends L{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${r} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"});}};});function zo(e,{dir:t,size:r=32}={}){return typeof e=="string"?Ei(e,{dir:t,size:r}):$H(e,{dir:t,size:r})}function Ei(e,{dir:t,size:r=32}={}){if(r===null)return e;let o=e.replace("0x","");if(o.length>r*2)throw new Xd({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return `0x${o[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function $H(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Xd({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n<r;n++){let i=t==="right";o[i?n:r-n-1]=e[i?n:e.length-n-1];}return o}var ep=F(()=>{G0();});var ys,q0,W0,K0,tp=F(()=>{Te();ys=class extends L{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${n*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"});}},q0=class extends L{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"});}},W0=class extends L{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"});}},K0=class extends L{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"});}};});function Gr(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,o=0;for(let n=0;n<r.length-1&&r[t==="left"?n:r.length-n-1].toString()==="0";n++)o++;return r=t==="left"?r.slice(o):r.slice(0,r.length-o),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var rp=F(()=>{});function an(e,{size:t}){if($e(e)>t)throw new K0({givenSize:$e(e),maxSize:t})}function ut(e,t={}){let{signed:r}=t;t.size&&an(e,{size:t.size});let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n-1n)-1n;return o<=i?o:o-BigInt(`0x${"f".padStart(n*2,"f")}`)-1n}function H6(e,t={}){let r=e;if(t.size&&(an(r,{size:t.size}),r=Gr(r)),Gr(r)==="0x00")return false;if(Gr(r)==="0x01")return true;throw new W0(r)}function vt(e,t={}){let r=ut(e,t),o=Number(r);if(!Number.isSafeInteger(o))throw new ys({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return o}var ur=F(()=>{tp();sn();rp();});function ft(e,t={}){return typeof e=="number"||typeof e=="bigint"?K(e,t):typeof e=="string"?Si(e,t):typeof e=="boolean"?J0(e,t):Le(e,t)}function J0(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{size:t.size})):r}function Le(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=OH[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(an(o,{size:t.size}),zo(o,{dir:"right",size:t.size})):o}function K(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let c=typeof e=="bigint"?"n":"";throw new ys({max:i?`${i}${c}`:void 0,min:`${s}${c}`,signed:r,size:o,value:`${e}${c}`})}let a=`0x${(r&&n<0?(1n<<BigInt(o*8))+BigInt(n):n).toString(16)}`;return o?zo(a,{size:o}):a}function Si(e,t={}){let r=NH.encode(e);return Le(r,t)}var OH,NH,Ae=F(()=>{tp();ep();ur();OH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));NH=new TextEncoder;});function qr(e,t={}){return typeof e=="number"||typeof e=="bigint"?QT(e,t):typeof e=="boolean"?XT(e,t):St(e)?fr(e,t):Un(e,t)}function XT(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{size:t.size})):r}function YT(e){if(e>=Ii.zero&&e<=Ii.nine)return e-Ii.zero;if(e>=Ii.A&&e<=Ii.F)return e-(Ii.A-10);if(e>=Ii.a&&e<=Ii.f)return e-(Ii.a-10)}function fr(e,t={}){let r=e;t.size&&(an(r,{size:t.size}),r=zo(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let n=o.length/2,i=new Uint8Array(n);for(let s=0,a=0;s<n;s++){let c=YT(o.charCodeAt(a++)),u=YT(o.charCodeAt(a++));if(c===void 0||u===void 0)throw new L(`Invalid byte sequence ("${o[a-2]}${o[a-1]}" in "${o}").`);i[s]=c*16+u;}return i}function QT(e,t){let r=K(e,t);return fr(r)}function Un(e,t={}){let r=PH.encode(e);return typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{dir:"right",size:t.size})):r}var PH,Ii,lr=F(()=>{Te();po();ep();ur();Ae();PH=new TextEncoder;Ii={zero:48,nine:57,A:65,F:70,a:97,f:102};});function qe(e,t){let r=t||"hex",o=Na(St(e,{strict:false})?qr(e):e);return r==="bytes"?o:ft(o)}var Mn=F(()=>{Yh();po();lr();Ae();});function e4(e){return BH(e)}var BH,t4=F(()=>{lr();Mn();BH=e=>qe(qr(e));});function r4(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new L("Unable to normalize signature.");return n}var n4=F(()=>{Te();});var o4,i4=F(()=>{fu();n4();o4=e=>{let t=typeof e=="string"?e:Ua(e);return r4(t)};});function Y0(e){return e4(o4(e))}var V6=F(()=>{t4();i4();});var bs,np=F(()=>{V6();bs=Y0;});var nt,Lo=F(()=>{Te();nt=class extends L{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"});}};});var Uo,op=F(()=>{Uo=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,r)),r}set(t,r){if(super.has(t)&&super.delete(t),super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=super.keys().next().value;o!==void 0&&super.delete(o);}return this}};});function xs(e,t){if(Z6.has(`${e}.${t}`))return Z6.get(`${e}.${t}`);let r=e.substring(2).toLowerCase(),o=qe(Un(r),"bytes"),n=(r).split("");for(let s=0;s<40;s+=2)o[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(o[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join("")}`;return Z6.set(`${e}.${t}`,i),i}function Dn(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});return xs(e,t)}var Z6,Ai=F(()=>{Lo();lr();Mn();op();Sn();Z6=new Uo(8192);});function Me(e,t){let{strict:r=true}=t??{},o=`${e}.${r}`;if(G6.has(o))return G6.get(o);let n=CH.test(e)?e.toLowerCase()===e?true:r?xs(e)===e:true:false;return G6.set(o,n),n}var CH,G6,Sn=F(()=>{op();Ai();CH=/^0x[a-fA-F0-9]{40}$/,G6=new Uo(8192);});function Mo(e){return typeof e[0]=="string"?st(e):zH(e)}function zH(e){let t=0;for(let n of e)t+=n.length;let r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function st(e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var cn=F(()=>{});function un(e,t,r,{strict:o}={}){return St(e,{strict:false})?LH(e,t,r,{strict:o}):q6(e,t,r,{strict:o})}function s4(e,t){if(typeof t=="number"&&t>0&&t>$e(e)-1)throw new Yd({offset:t,position:"start",size:$e(e)})}function a4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&$e(e)!==r-t)throw new Yd({offset:r,position:"end",size:$e(e)})}function q6(e,t,r,{strict:o}={}){s4(e,t);let n=e.slice(t,r);return o&&a4(n,t,r),n}function LH(e,t,r,{strict:o}={}){s4(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&a4(n,t,r),n}var vs=F(()=>{G0();po();sn();});var c4,X0,W6=F(()=>{c4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,X0=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;});function Wr(e,t){if(e.length!==t.length)throw new z0({expectedLength:e.length,givenLength:t.length});let r=UH({params:e,values:t});return Y6(r)}function UH({params:e,values:t}){let r=[];for(let o=0;o<e.length;o++)r.push(J6({param:e[o],value:t[o]}));return r}function J6({param:e,value:t}){let r=ip(e.type);if(r){let[o,n]=r;return DH(t,{length:o,param:{...e,type:n}})}if(e.type==="tuple")return ZH(t,{param:e});if(e.type==="address")return MH(t);if(e.type==="bool")return FH(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let o=e.type.startsWith("int"),[,,n="256"]=X0.exec(e.type)??[];return HH(t,{signed:o,size:Number(n)})}if(e.type.startsWith("bytes"))return jH(t,{param:e});if(e.type==="string")return VH(t);throw new H0(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Y6(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=$e(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(K(t+n,{size:32})),o.push(a),n+=$e(a)):r.push(a);}return st([...r,...o])}function MH(e){if(!Me(e))throw new nt({address:e});return {dynamic:false,encoded:Ei(e.toLowerCase())}}function DH(e,{length:t,param:r}){let o=t===null;if(!Array.isArray(e))throw new mu(e);if(!o&&e.length!==t)throw new B0({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=e.length===0&&K6(r),i=[];for(let s=0;s<e.length;s++){let a=J6({param:r,value:e[s]});a.dynamic&&(n=true),i.push(a);}if(o||n){let s=Y6(i);if(o){let a=K(i.length,{size:32});return {dynamic:true,encoded:st([a,s])}}if(n)return {dynamic:true,encoded:s}}return {dynamic:false,encoded:st(i.map(({encoded:s})=>s))}}function jH(e,{param:t}){let[,r]=t.type.split("bytes"),o=$e(e);if(!r){let n=e;return o%32!==0&&(n=Ei(n,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:true,encoded:st([Ei(K(o,{size:32})),n])}}if(o!==Number.parseInt(r,10))throw new C0({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:Ei(e,{dir:"right"})}}function FH(e){if(typeof e!="boolean")throw new L(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:Ei(J0(e))}}function HH(e,{signed:t,size:r=256}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new ys({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:K(e,{size:32,signed:t})}}function VH(e){let t=Si(e),r=Math.ceil($e(t)/32),o=[];for(let n=0;n<r;n++)o.push(Ei(un(t,n*32,(n+1)*32),{dir:"right"}));return {dynamic:true,encoded:st([Ei(K($e(t),{size:32})),...o])}}function ZH(e,{param:t}){let r=false,o=[];for(let n=0;n<t.components.length;n++){let i=t.components[n],s=Array.isArray(e)?n:i.name,a=J6({param:i,value:e[s]});o.push(a),a.dynamic&&(r=true);}return {dynamic:r,encoded:r?Y6(o):st(o.map(({encoded:n})=>n))}}function ip(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function K6(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components.some(K6);let r=ip(t);return r?K6({...e,type:r[1]}):false}var ki=F(()=>{Et();Lo();Te();tp();Sn();cn();ep();sn();vs();Ae();W6();});var Do,hu=F(()=>{vs();V6();Do=e=>un(Y0(e),0,4);});function fn(e){let{abi:t,args:r=[],name:o}=e,n=St(o,{strict:false}),i=t.filter(a=>n?a.type==="function"?Do(a)===o:a.type==="event"?bs(a)===o:false:"name"in a&&a.name===o);if(i.length===0)return;if(i.length===1)return i[0];let s;for(let a of i){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,f)=>{let d="inputs"in a&&a.inputs[f];return d?X6(u,d):false})){if(s&&"inputs"in s&&s.inputs){let u=u4(a.inputs,s.inputs,r);if(u)throw new j0({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a;}}return s||i[0]}function X6(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Me(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>r==="object"&&X6(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>X6(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function u4(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return u4(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Me(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Me(r[o],{strict:false}):false)return s}}var ws=F(()=>{Et();po();Sn();np();hu();});function We(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var ln=F(()=>{});function p4(e){let{abi:t,args:r,functionName:o}=e,n=t[0];if(o){let i=fn({abi:t,args:r,name:o});if(!i)throw new mo(o,{docsPath:d4});n=i;}if(n.type!=="function")throw new mo(void 0,{docsPath:d4});return {abi:[n],functionName:Do(nr(n))}}var d4,m4=F(()=>{Et();hu();wi();ws();d4="/docs/contract/encodeFunctionData";});function lt(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:p4(e),n=r[0],i=o,s="inputs"in n&&n.inputs?Wr(n.inputs,t??[]):void 0;return st([i,s??"0x"])}var jn=F(()=>{cn();ki();m4();});var h4,eg,g4,tg=F(()=>{h4={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},eg={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},g4={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var sp,gu,rg,Q6=F(()=>{Te();sp=class extends L{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"});}},gu=class extends L{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"});}},rg=class extends L{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"});}};});function yu(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(GH);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var GH,ng=F(()=>{Q6();GH={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new rg({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new gu({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new sp({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new sp({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};});function y4(e,t={}){typeof t.size<"u"&&an(e,{size:t.size});let r=Le(e);return ut(r,t)}function b4(e,t={}){let r=e;if(typeof t.size<"u"&&(an(r,{size:t.size}),r=Gr(r)),r.length>1||r[0]>1)throw new q0(r);return !!r[0]}function Fo(e,t={}){typeof t.size<"u"&&an(e,{size:t.size});let r=Le(e);return vt(r,t)}function x4(e,t={}){let r=e;return typeof t.size<"u"&&(an(r,{size:t.size}),r=Gr(r,{dir:"right"})),new TextDecoder().decode(r)}var v4=F(()=>{tp();rp();ur();Ae();});function Ri(e,t){let r=typeof t=="string"?fr(t):t,o=yu(r);if($e(r)===0&&e.length>0)throw new Ln;if($e(t)&&$e(t)<32)throw new lu({data:typeof t=="string"?t:Le(t),params:e,size:$e(t)});let n=0,i=[];for(let s=0;s<e.length;++s){let a=e[s];n<r.length&&o.setPosition(n);let[c,u]=bu(o,a,{staticPosition:0});n+=u,i.push(c);}return i}function bu(e,t,{staticPosition:r}){let o=ip(t.type);if(o){let[n,i]=o;return WH(e,{...t,type:i},{length:n,staticPosition:r})}if(t.type==="tuple")return XH(e,t,{staticPosition:r});if(t.type==="address")return qH(e);if(t.type==="bool")return KH(e);if(t.type.startsWith("bytes"))return JH(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return YH(e,t);if(t.type==="string")return QH(e,{staticPosition:r});throw new V0(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function qH(e){let t=e.readBytes(32);return [xs(Le(q6(t,-20))),32]}function WH(e,t,{length:r,staticPosition:o}){if(r===null){let s=Fo(e.readBytes(e2)),a=o+s,c=a+w4;e.setPosition(a);let u=Fo(e.readBytes(w4)),f=ap(t),d=0,g=[];for(let h=0;h<u;++h){e.setPosition(c+(f?h*32:d));let[x,w]=bu(e,t,{staticPosition:c});d+=w,g.push(x),w===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(o+32),[g,32]}if(ap(t)){let s=Fo(e.readBytes(e2)),a=o+s,c=[];for(let u=0;u<r;++u){e.setPosition(a+u*32);let[f]=bu(e,t,{staticPosition:a});c.push(f);}return e.setPosition(o+32),[c,32]}let n=0,i=[];for(let s=0;s<r;++s){let[a,c]=bu(e,t,{staticPosition:o+n});n+=c,i.push(a),c===0&&(e.assertReadLimit(),e._touch());}return [i,n]}function KH(e){return [b4(e.readBytes(32),{size:32}),32]}function JH(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Fo(e.readBytes(32));e.setPosition(r+s);let a=Fo(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[Le(c),32]}return [Le(e.readBytes(Number.parseInt(n,10),32)),32]}function YH(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?y4(n,{signed:r}):Fo(n,{signed:r}),32]}function XH(e,t,{staticPosition:r}){let o=t.components.length===0||t.components.some(({name:s})=>!s),n=o?[]:{},i=0;if(ap(t)){let s=Fo(e.readBytes(e2)),a=r+s;for(let c=0;c<t.components.length;++c){let u=t.components[c];e.setPosition(a+i);let[f,d]=bu(e,u,{staticPosition:a});i+=d,n[o?c:u?.name]=f;}return e.setPosition(r+32),[n,32]}for(let s=0;s<t.components.length;++s){let a=t.components[s],[c,u]=bu(e,a,{staticPosition:r});n[o?s:a?.name]=c,i+=u;}return [n,i]}function QH(e,{staticPosition:t}){let r=Fo(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Fo(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=x4(i);return e.setPosition(t+32),[s,32]}function ap(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(ap);let r=ip(e.type);return !!(r&&ap({...e,type:r[1]}))}var w4,e2,cp=F(()=>{Et();Ai();ng();sn();vs();v4();lr();Ae();ki();w4=32,e2=32;});function og(e){let{abi:t,data:r,cause:o}=e,n=un(r,0,4);if(n==="0x")throw new Ln({cause:o});let s=[...t||[],eg,g4].find(a=>a.type==="error"&&n===Do(nr(a)));if(!s)throw new du(n,{docsPath:"/docs/contract/decodeErrorResult",cause:o});return {abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Ri(s.inputs,un(r,4)):void 0,errorName:s.name}}var t2=F(()=>{tg();Et();vs();hu();cp();wi();});var Be,Pr=F(()=>{Be=(e,t,r)=>JSON.stringify(e,(o,n)=>{let i=typeof n=="bigint"?n.toString():n;return typeof t=="function"?t(o,i):i},r);});function r2({abiItem:e,args:t,includeFunctionName:r=true,includeName:o=false}){if("name"in e&&"inputs"in e&&e.inputs)return `${r?e.name:""}(${e.inputs.map((n,i)=>`${o&&n.name?`${n.name}: `:""}${typeof t[i]=="object"?Be(t[i]):t[i]}`).join(", ")})`}var _4=F(()=>{Pr();});function sg(e,t=0){if(!Number.isInteger(t)||t<0)throw new n2({decimals:t});let r=e.toString(),o=r.startsWith("-");o&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${n||"0"}${i?`.${i}`:""}`}function E4(e,t="wei"){return sg(e,ig.ether-ig[t])}function S4(e,t="wei"){return sg(e,ig.gwei-ig[t])}var ig,n2,ag=F(()=>{ig={wei:0,gwei:9,szabo:12,finney:15,ether:18};n2=class extends Error{constructor({decimals:t}){super(`\`decimals\` must be a non-negative integer. Got \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Value.InvalidDecimalsError"});}};});function xu(e,t="wei"){return E4(e,t)}var cg=F(()=>{ag();});function or(e,t="wei"){return S4(e,t)}var vu=F(()=>{ag();});function I4(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
24
+ `,"")}function A4(e){return e.reduce((t,{address:r,...o})=>{let n=`${t} ${r}:
25
25
  `;return o.nonce&&(n+=` nonce: ${o.nonce}
26
26
  `),o.balance&&(n+=` balance: ${o.balance}
27
27
  `),o.code&&(n+=` code: ${o.code}
28
28
  `),o.state&&(n+=` state:
29
- `,n+=_4(o.state)),o.stateDiff&&(n+=` stateDiff:
30
- `,n+=_4(o.stateDiff)),n},` State Override:
31
- `).slice(0,-1)}var sg,ag,r2=F(()=>{Te();sg=class extends z{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"});}},ag=class extends z{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"});}};});function za(e){let t=Object.entries(e).map(([o,n])=>n===void 0||n===false?null:[o,n]).filter(Boolean),r=t.reduce((o,[n])=>Math.max(o,n.length),0);return t.map(([o,n])=>` ${`${o}:`.padEnd(r+1)} ${n}`).join(`
32
- `)}var cg,ug,fg,lg,_s,bu,dg,pg,jn=F(()=>{ig();yu();Te();cg=class extends z{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"});}},ug=class extends z{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",za(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"});}},fg=class extends z{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"});}},lg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=za({chain:n&&`${n?.name} (id: ${n?.id})`,from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},_s=class extends z{constructor({blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i}){let s="Transaction";o&&i!==void 0&&(s=`Transaction at block time "${o}" at index "${i}"`),t&&i!==void 0&&(s=`Transaction at block hash "${t}" at index "${i}"`),r&&i!==void 0&&(s=`Transaction at block number "${r}" at index "${i}"`),n&&(s=`Transaction with hash "${n}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"});}},bu=class extends z{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"});}},dg=class extends z{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:true,configurable:true,writable:true,value:void 0}),this.receipt=t;}},pg=class extends z{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"});}};});function wr(e){if(e?.reason)return e.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");let t=new Error("This operation was aborted");return t.name="AbortError",t}function dn(e){return typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError"}var S4,La,mo=F(()=>{S4=e=>e;La=e=>{try{let t=new URL(e);return !t.username&&!t.password?e:(t.username="",t.password="",t.toString())}catch{return e}};});var Es,xu,Ua,mg,hg,Ho,Ri=F(()=>{ln();X0();X6();vi();x4();vs();ig();yu();Et();Te();r2();jn();mo();Es=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g,stateOverride:h}){let v=r?We(r):void 0,E=za({from:v?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});h&&(E+=`
33
- ${E4(h)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",E].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},xu=class extends z{constructor(t,{abi:r,args:o,contractAddress:n,docsPath:i,functionName:s,sender:a}){let c=fn({abi:r,args:o,name:s}),u=c?Q6({abiItem:c,args:o,includeFunctionName:false,includeName:false}):void 0,f=c?nr(c,{includeName:true}):void 0,d=za({address:n&&S4(n),function:f,args:u&&u!=="()"&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"args",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"sender",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abi=r,this.args=o,this.cause=t,this.contractAddress=n,this.functionName=s,this.sender=a;}},Ua=class extends z{constructor({abi:t,data:r,functionName:o,message:n,cause:i}){let s,a,c,u;if(r&&r!=="0x")try{a=tg({abi:t,data:r,cause:i});let{abiItem:d,errorName:g,args:h}=a;if(g==="Error")u=h[0];else if(g==="Panic"){let[v]=h;u=d4[v];}else {let v=d?nr(d,{includeName:!0}):void 0,E=d&&h?Q6({abiItem:d,args:h,includeFunctionName:!1,includeName:!1}):void 0;c=[v?`Error: ${v}`:"",E&&E!=="()"?` ${[...Array(g?.length??0).keys()].map(()=>" ").join("")}${E}`:""];}}catch(d){s=d;}else n&&(u=n);let f;s instanceof uu&&(f=s.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${f}.`]),super(u&&u!=="execution reverted"||f?[`The contract function "${o}" reverted with the following ${f?"signature":"reason"}:`,u||f].join(`
34
- `):`The contract function "${o}" reverted.`,{cause:s??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"raw",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"reason",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=a,this.raw=r,this.reason=u,this.signature=f;}},mg=class extends z{constructor({functionName:t,cause:r}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:r});}},hg=class extends z{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"});}},Ho=class extends z{constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:3}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t;}};});var Fn,Ma,Ss,rp,Da=F(()=>{Pr();Te();mo();Fn=class extends z{constructor({body:t,cause:r,details:o,headers:n,status:i,url:s}){super("HTTP request failed.",{cause:r,details:o,metaMessages:[i&&`Status: ${i}`,`URL: ${La(s)}`,t&&`Request body: ${Be(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"headers",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"status",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.body=t,this.headers=n,this.status=i,this.url=s;}},Ma=class extends z{constructor({maxSize:t,size:r}){super("HTTP response body exceeded the size limit.",{metaMessages:[`Max: ${t} bytes`,`Received: ${r} bytes`],name:"ResponseBodyTooLargeError"}),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t,this.size=r;}},Ss=class extends z{constructor({body:t,error:r,url:o}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${La(o)}`,`Request body: ${Be(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r.code,this.data=r.data,this.url=o;}},rp=class extends z{constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${La(r)}`,`Request body: ${Be(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.url=r;}};});var XH,Br,Cr,vu,wu,_u,Eu,Ti,Hn,Su,Iu,Au,Is,ja,ku,Fa,Ru,Tu,$u,Ou,Nu,Pu,Bu,Cu,zu,Lu,Uu,Mu,Du,gg,np=F(()=>{Te();Da();XH=-1,Br=class extends z{constructor(t,{code:r,docsPath:o,metaMessages:n,name:i,shortMessage:s}){super(s,{cause:t,docsPath:o,metaMessages:n||t?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),this.name=i||t.name,this.code=t instanceof Ss?t.code:r??XH;}},Cr=class extends Br{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=r.data;}},vu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."});}};Object.defineProperty(vu,"code",{enumerable:true,configurable:true,writable:true,value:-32700});wu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."});}};Object.defineProperty(wu,"code",{enumerable:true,configurable:true,writable:true,value:-32600});_u=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`});}};Object.defineProperty(_u,"code",{enumerable:true,configurable:true,writable:true,value:-32601});Eu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
35
- `)});}};Object.defineProperty(Eu,"code",{enumerable:true,configurable:true,writable:true,value:-32602});Ti=class e extends Br{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."});}};Object.defineProperty(Ti,"code",{enumerable:true,configurable:true,writable:true,value:-32603});Hn=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
36
- `)});}};Object.defineProperty(Hn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});Su=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty(Su,"code",{enumerable:true,configurable:true,writable:true,value:-32001});Iu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(Iu,"code",{enumerable:true,configurable:true,writable:true,value:-32002});Au=class e extends Br{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(Au,"code",{enumerable:true,configurable:true,writable:true,value:-32003});Is=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`});}};Object.defineProperty(Is,"code",{enumerable:true,configurable:true,writable:true,value:-32004});ja=class e extends Br{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(ja,"code",{enumerable:true,configurable:true,writable:true,value:-32005});ku=class e extends Br{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(ku,"code",{enumerable:true,configurable:true,writable:true,value:-32006});Fa=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(Fa,"code",{enumerable:true,configurable:true,writable:true,value:4001});Ru=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty(Ru,"code",{enumerable:true,configurable:true,writable:true,value:4100});Tu=class e extends Cr{constructor(t,{method:r}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`});}};Object.defineProperty(Tu,"code",{enumerable:true,configurable:true,writable:true,value:4200});$u=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty($u,"code",{enumerable:true,configurable:true,writable:true,value:4900});Ou=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(Ou,"code",{enumerable:true,configurable:true,writable:true,value:4901});Nu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(Nu,"code",{enumerable:true,configurable:true,writable:true,value:4902});Pu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(Pu,"code",{enumerable:true,configurable:true,writable:true,value:5700});Bu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(Bu,"code",{enumerable:true,configurable:true,writable:true,value:5710});Cu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(Cu,"code",{enumerable:true,configurable:true,writable:true,value:5720});zu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(zu,"code",{enumerable:true,configurable:true,writable:true,value:5730});Lu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Lu,"code",{enumerable:true,configurable:true,writable:true,value:5740});Uu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Uu,"code",{enumerable:true,configurable:true,writable:true,value:5750});Mu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(Mu,"code",{enumerable:true,configurable:true,writable:true,value:5760});Du=class e extends Cr{constructor(t){super(t,{code:e.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."});}};Object.defineProperty(Du,"code",{enumerable:true,configurable:true,writable:true,value:7e3});gg=class extends Br{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};});var yo,Vn,ju,Fu,Hu,Vu,Zu,Gu,qu,Wu,Vo,Zn,$i=F(()=>{yu();Te();yo=class extends z{constructor({cause:t,message:r}={}){let o=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"});}};Object.defineProperty(yo,"code",{enumerable:true,configurable:true,writable:true,value:3});Object.defineProperty(yo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/execution reverted|gas required exceeds allowance/});Vn=class extends z{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"});}};Object.defineProperty(Vn,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});ju=class extends z{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"});}};Object.defineProperty(ju,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});Fu=class extends z{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"});}};Object.defineProperty(Fu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too high/});Hu=class extends z{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
37
- `),{cause:t,name:"NonceTooLowError"});}};Object.defineProperty(Hu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too low|transaction already imported|already known/});Vu=class extends z{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"});}};Object.defineProperty(Vu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce has max value/});Zu=class extends z{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
38
- `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"});}};Object.defineProperty(Zu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/insufficient funds|exceeds transaction sender account balance/});Gu=class extends z{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"});}};Object.defineProperty(Gu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too high|gas limit reached/});qu=class extends z{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"});}};Object.defineProperty(qu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too low/});Wu=class extends z{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"});}};Object.defineProperty(Wu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/transaction type not valid/});Vo=class extends z{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${or(o)} gwei`:""}).`].join(`
39
- `),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(Vo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Zn=class extends z{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"});}};});function As(e,t){let r=(e.details||"").toLowerCase(),o=e instanceof z?e.walk(n=>n?.code===yo.code):e;return o instanceof z?new yo({cause:e,message:o.details}):yo.nodeMessage.test(r)?new yo({cause:e,message:e.details}):Vn.nodeMessage.test(r)?new Vn({cause:e,maxFeePerGas:t?.maxFeePerGas}):ju.nodeMessage.test(r)?new ju({cause:e,maxFeePerGas:t?.maxFeePerGas}):Fu.nodeMessage.test(r)?new Fu({cause:e,nonce:t?.nonce}):Hu.nodeMessage.test(r)?new Hu({cause:e,nonce:t?.nonce}):Vu.nodeMessage.test(r)?new Vu({cause:e,nonce:t?.nonce}):Zu.nodeMessage.test(r)?new Zu({cause:e}):Gu.nodeMessage.test(r)?new Gu({cause:e,gas:t?.gas}):qu.nodeMessage.test(r)?new qu({cause:e,gas:t?.gas}):Wu.nodeMessage.test(r)?new Wu({cause:e}):Vo.nodeMessage.test(r)?new Vo({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Zn({cause:e})}var ip=F(()=>{Te();$i();});function ks(e,{format:t}){if(!t)return {};let r={};function o(i){let s=Object.keys(i);for(let a of s)a in e&&(r[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&o(i[a]);}let n=t(e||{});return o(n),r}var sp=F(()=>{});function Ku(e,t){return ({exclude:r,format:o})=>({exclude:r,format:(n,i)=>{let s=t(n,i);if(r)for(let a of r)delete s[a];return {...s,...o(n,i)}},type:e})}var xg=F(()=>{});function Zo(e,t){let r={};return typeof e.authorizationList<"u"&&(r.authorizationList=nV(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(o=>Le(o)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=K(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=K(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=K(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=K(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=K(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=K(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=rV[e.type]),typeof e.value<"u"&&(r.value=K(e.value)),r}function nV(e){return e.map(t=>({address:t.address,r:t.r?K(BigInt(t.r)):t.r,s:t.s?K(BigInt(t.s)):t.s,chainId:K(t.chainId),nonce:K(t.nonce),...typeof t.yParity<"u"?{yParity:K(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:K(t.v)}:{}}))}var rV,Ju=F(()=>{Ae();rV={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};});function N4(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:o})=>{if(r.length!==66)throw new Gd({size:r.length,targetSize:66,type:"hex"});if(o.length!==66)throw new Gd({size:o.length,targetSize:66,type:"hex"});return t[r]=o,t},{})}function oV(e){let{balance:t,nonce:r,state:o,stateDiff:n,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=K(t)),r!==void 0&&(s.nonce=K(r)),o!==void 0&&(s.state=N4(o)),n!==void 0){if(s.state)throw new ag;s.stateDiff=N4(n);}return s}function Yu(e){if(!e)return;let t={};for(let{address:r,...o}of e){if(!Me(r,{strict:false}))throw new nt({address:r});if(t[r])throw new sg({address:r});t[r]=oV(o);}return t}var vg=F(()=>{Lo();H0();r2();Sn();Ae();});var Xu,n2=F(()=>{Xu=2n**256n-1n;});function Gn(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:o,to:n}=e,i=t?We(t):void 0;if(i&&!Me(i.address))throw new nt({address:i.address});if(n&&!Me(n))throw new nt({address:n});if(r&&r>Xu)throw new Vn({maxFeePerGas:r});if(o&&r&&o>r)throw new Vo({maxFeePerGas:r,maxPriorityFeePerGas:o})}var Ha=F(()=>{ln();n2();Lo();$i();Sn();});function In(e){let{blockHash:t,blockNumber:r,blockTag:o,requireCanonical:n}=e;if(n!==void 0&&!t)throw new z("`requireCanonical` can only be provided when `blockHash` is set.");return t?n?{blockHash:t,requireCanonical:n}:{blockHash:t}:typeof r=="bigint"?K(r):o??"latest"}var Za=F(()=>{Te();Ae();});function zr(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});if(!Me(t,{strict:false}))throw new nt({address:t});return e.toLowerCase()===t.toLowerCase()}var $s=F(()=>{Lo();Sn();});function Lr(e){let{abi:t,args:r,functionName:o,data:n}=e,i=t[0];if(o){let a=fn({abi:t,args:r,name:o});if(!a)throw new po(o,{docsPath:a2});i=a;}if(i.type!=="function")throw new po(void 0,{docsPath:a2});if(!i.outputs)throw new fu(i.name,{docsPath:a2});let s=ki(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var a2,Ni=F(()=>{Et();tp();vs();a2="/docs/contract/decodeFunctionResult";});var V4,Z4=F(()=>{V4="0.1.1";});function G4(){return V4}var q4=F(()=>{Z4();});function W4(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?W4(e.cause,t):t?null:e}var de,pn=F(()=>{q4();de=class e extends Error{static setStaticOptions(t){e.prototype.docsOrigin=t.docsOrigin,e.prototype.showVersion=t.showVersion,e.prototype.version=t.version;}constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=r.docsOrigin??e.prototype.docsOrigin,s=`${i}${n??""}`,a=!!(r.version??e.prototype.showVersion),c=r.version??e.prototype.version,u=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n||a?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(f=>typeof f=="string").join(`
40
- `);super(u,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.cause=r.cause,this.details=o,this.docs=s,this.docsOrigin=i,this.docsPath=n,this.shortMessage=t,this.showVersion=a,this.version=c;}walk(t){return W4(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${G4()}`}});de.setStaticOptions(de.defaultStaticOptions);});function uf(e,t){if(qn(e)>t)throw new Pg({givenSize:qn(e),maxSize:t})}function c2(e){if(e>=Pi.zero&&e<=Pi.nine)return e-Pi.zero;if(e>=Pi.A&&e<=Pi.F)return e-(Pi.A-10);if(e>=Pi.a&&e<=Pi.f)return e-(Pi.a-10)}function Y4(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new Bg({size:e.length,targetSize:o,type:"Bytes"});let n=new Uint8Array(o);for(let i=0;i<o;i++){let s=r==="right";n[s?i:o-i-1]=e[s?i:e.length-i-1];}return n}function u2(e,t={}){let{dir:r="left"}=t,o=e,n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o}var Pi,X4=F(()=>{Os();Pi={zero:48,nine:57,A:65,F:70,a:97,f:102};});function ff(e,t){if(dt(e)>t)throw new Cg({givenSize:dt(e),maxSize:t})}function Q4(e,t){if(typeof t=="number"&&t>0&&t>dt(e)-1)throw new cp({offset:t,position:"start",size:dt(e)})}function e$(e,t,r){if(typeof t=="number"&&typeof r=="number"&&dt(e)!==r-t)throw new cp({offset:r,position:"end",size:dt(e)})}function f2(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;let n=e.replace("0x","");if(n.length>o*2)throw new zg({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function t$(e,t={}){let{dir:r="left"}=t,o=e.replace("0x",""),n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o==="0"?"0x":r==="right"&&o.length%2===1?`0x${o}0`:`0x${o}`}var l2=F(()=>{pr();});function Ns(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+dV:n,r)}var dV,up=F(()=>{dV="#__bigint";});function hV(e){if(!(e instanceof Uint8Array)){if(!e)throw new lf(e);if(typeof e!="object")throw new lf(e);if(!("BYTES_PER_ELEMENT"in e))throw new lf(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new lf(e)}}function n$(e){return e instanceof Uint8Array?e:typeof e=="string"?df(e):gV(e)}function gV(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function df(e,t={}){let{size:r}=t,o=e;r&&(ff(e,r),o=qo(e,r));let n=o.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let a=0,c=0;a<i;a++){let u=c2(n.charCodeAt(c++)),f=c2(n.charCodeAt(c++));if(u===void 0||f===void 0)throw new de(`Invalid byte sequence ("${n[c-2]}${n[c-1]}" in "${n}").`);s[a]=u<<4|f;}return s}function o$(e,t={}){let{size:r}=t,o=mV.encode(e);return typeof r=="number"?(uf(o,r),yV(o,r)):o}function yV(e,t){return Y4(e,{dir:"right",size:t})}function qn(e){return e.length}function i$(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function s$(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return m2(o,t)}function a$(e,t={}){let{size:r}=t,o=e;if(typeof r<"u"&&(uf(o,r),o=p2(o)),o.length>1||o[0]>1)throw new d2(o);return !!o[0]}function Go(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return Ug(o,t)}function c$(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(uf(o,r),o=bV(o)),pV.decode(o)}function p2(e){return u2(e,{dir:"left"})}function bV(e){return u2(e,{dir:"right"})}function u$(e){try{return hV(e),!0}catch{return false}}var pV,mV,d2,lf,Pg,Bg,Os=F(()=>{pn();pr();X4();l2();up();pV=new TextDecoder,mV=new TextEncoder;d2=class extends de{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesBooleanError"});}},lf=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Ns(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesTypeError"});}},Pg=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeOverflowError"});}},Bg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeExceedsPaddingSizeError"});}};});function wV(e,t={}){let{strict:r=false}=t;if(!e)throw new Mg(e);if(typeof e!="string")throw new Mg(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Dg(e);if(!e.startsWith("0x"))throw new Dg(e)}function ht(...e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function pf(e){return e instanceof Uint8Array?It(e):Array.isArray(e)?It(new Uint8Array(e)):e}function jg(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(ff(r,t.size),Bi(r,t.size)):r}function It(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=vV[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(ff(o,t.size),qo(o,t.size)):o}function Ve(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let u=typeof e=="bigint"?"n":"";throw new fp({max:i?`${i}${u}`:void 0,min:`${s}${u}`,signed:r,size:o,value:`${e}${u}`})}let c=`0x${(r&&n<0?BigInt.asUintN(o*8,BigInt(n)):n).toString(16)}`;return o?Bi(c,o):c}function mf(e,t={}){return It(xV.encode(e),t)}function Bi(e,t){return f2(e,{dir:"left",size:t})}function qo(e,t){return f2(e,{dir:"right",size:t})}function pt(e,t,r,o={}){let{strict:n}=o;Q4(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&e$(i,t,r),i}function dt(e){return Math.ceil((e.length-2)/2)}function h2(e){return t$(e,{dir:"left"})}function m2(e,t={}){let{signed:r}=t;t.size&&ff(e,t.size);let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n)-1n,s=i>>1n;return o<=s?o:o-i-1n}function Ug(e,t={}){let{signed:r,size:o}=t;return Number(!r&&!o?e:m2(e,t))}function lp(e,t={}){let{strict:r=false}=t;try{return wV(e,{strict:r}),!0}catch{return false}}var xV,vV,fp,Mg,Dg,Cg,cp,zg,pr=F(()=>{pn();l2();up();xV=new TextEncoder,vV=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));fp=class extends de{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${n*8}-bit`:""}${o?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}},Mg=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Ns(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexTypeError"});}},Dg=class extends de{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexValueError"});}},Cg=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeOverflowError"});}},cp=class extends de{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${o}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SliceOffsetOutOfBoundsError"});}},zg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};});function f$(e){return {address:e.address,amount:Ve(e.amount),index:Ve(e.index),validatorIndex:Ve(e.validatorIndex)}}var l$=F(()=>{pr();});function Fg(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ve(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ve(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ve(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ve(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ve(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ve(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(f$)}}}var g2=F(()=>{pr();l$();});var bo,Hg,p$,Vg,m$,y2,b2,x2,v2,Wn,mn=F(()=>{bo=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Hg=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],p$=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],Vg=[...p$,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],m$=[...p$,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],y2=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],b2=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],x2=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],v2=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],Wn=[{type:"event",name:"Approval",inputs:[{indexed:true,name:"owner",type:"address"},{indexed:true,name:"spender",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:true,name:"from",type:"address"},{indexed:true,name:"to",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}];});var h$,g$=F(()=>{h$="0x82ad56cb";});var Zg,y$,b$,Wa,dp=F(()=>{Zg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",y$="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",b$="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Wa="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Ka,pp,Ja,Gg=F(()=>{Te();Ka=class extends z{constructor({blockNumber:t,chain:r,contract:o}){super(`Chain "${r.name}" does not support contract "${o.name}".`,{metaMessages:["This could be due to any of the following:",...t&&o.blockCreated&&o.blockCreated>t?[`- The contract "${o.name}" was not deployed until block ${o.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${o.name}" configured.`]],name:"ChainDoesNotSupportContract"});}},pp=class extends z{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"});}},Ja=class extends z{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"});}};});function mp(e){let{abi:t,args:r,bytecode:o}=e;if(!r||r.length===0)return o;let n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new $0({docsPath:w2});if(!("inputs"in n))throw new jd({docsPath:w2});if(!n.inputs||n.inputs.length===0)throw new jd({docsPath:w2});let i=Wr(n.inputs,r);return st([o,i])}var w2,_2=F(()=>{Et();cn();Ai();w2="/docs/contract/encodeDeployData";});function Kn({blockNumber:e,chain:t,contract:r}){let o=t?.contracts?.[r];if(!o)throw new Ka({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new Ka({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address}var Ya=F(()=>{Gg();});function qg(e,{docsPath:t,...r}){let o=(()=>{let n=As(e,r);return n instanceof Zn?e:n})();return new Es(o,{docsPath:t,...r})}var E2=F(()=>{Ri();$i();ip();});function Wg(){let e=()=>{},t=()=>{};return {promise:new Promise((o,n)=>{e=o,t=n;}),resolve:e,reject:t}}var S2=F(()=>{});function hf({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:n}){let i=async()=>{let f=c();s();let d=f.map(({args:g})=>g);d.length!==0&&e(d).then(g=>{n&&Array.isArray(g)&&g.sort(n);for(let h=0;h<f.length;h++){let{resolve:v}=f[h];v?.([g[h],g]);}}).catch(g=>{for(let h=0;h<f.length;h++){let{reject:v}=f[h];v?.(g);}});},s=()=>I2.delete(t),a=()=>c().map(({args:f})=>f),c=()=>I2.get(t)||[],u=f=>I2.set(t,[...c(),f]);return {flush:s,async schedule(f){let{promise:d,resolve:g,reject:h}=Wg();return r?.([...a(),f])&&i(),c().length>0?(u({args:f,resolve:g,reject:h}),d):(u({args:f,resolve:g,reject:h}),setTimeout(i,o),d)}}}var I2,Kg=F(()=>{S2();I2=new Map;});var Jg,Yg,Xg,x$=F(()=>{Pr();Te();mo();Jg=class extends z{constructor({callbackSelector:t,cause:r,data:o,extraData:n,sender:i,urls:s}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${La(a)}`)],` Sender: ${i}`,` Data: ${o}`,` Callback selector: ${t}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"});}},Yg=class extends z{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${La(r)}`,`Response: ${Be(t)}`],name:"OffchainLookupResponseMalformedError"});}},Xg=class extends z{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};});function v$(e){let{abi:t,data:r}=e,o=un(r,0,4),n=t.find(i=>i.type==="function"&&o===Do(nr(i)));if(!n)throw new L0(o,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?ki(n.inputs,un(r,4)):void 0}}var w$=F(()=>{Et();xs();du();tp();vi();});function k2(e){let{abi:t,errorName:r,args:o}=e,n=t[0];if(r){let c=fn({abi:t,args:o,name:r});if(!c)throw new Fd(r,{docsPath:A2});n=c;}if(n.type!=="error")throw new Fd(void 0,{docsPath:A2});let i=nr(n),s=Do(i),a="0x";if(o&&o.length>0){if(!n.inputs)throw new B0(n.name,{docsPath:A2});a=Wr(n.inputs,o);}return st([s,a])}var A2,_$=F(()=>{Et();cn();du();Ai();vi();vs();A2="/docs/contract/encodeErrorResult";});function E$(e){let{abi:t,functionName:r,result:o}=e,n=t[0];if(r){let s=fn({abi:t,name:r});if(!s)throw new po(r,{docsPath:R2});n=s;}if(n.type!=="function")throw new po(void 0,{docsPath:R2});if(!n.outputs)throw new fu(n.name,{docsPath:R2});let i=(()=>{if(n.outputs.length===0)return [];if(n.outputs.length===1)return [o];if(Array.isArray(o))return o;throw new lu(o)})();return Wr(n.outputs,i)}var R2,S$=F(()=>{Et();Ai();vs();R2="/docs/contract/encodeFunctionResult";});async function T2(e){let{data:t,ccipRequest:r}=e,{args:[o]}=v$({abi:Hg,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(Ci)?await T2({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=EV(c);}})),E$({abi:Hg,functionName:"query",result:[n,i]})}function EV(e){return e.name==="HttpRequestError"&&e.status?k2({abi:Hg,errorName:"HttpError",args:[e.status,e.shortMessage]}):k2({abi:[Y0],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var Ci,hp=F(()=>{mn();X0();w$();_$();S$();Ci="x-batch-gateway:true";});var k$={};Er(k$,{ccipRequest:()=>A$,offchainLookup:()=>IV,offchainLookupAbiItem:()=>I$,offchainLookupSignature:()=>SV});async function IV(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=tg({data:o,abi:[I$]}),[a,c,u,f,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:A$;try{if(!zr(i,a))throw new Xg({sender:a,to:i});let v=c.includes(Ci)?await T2({data:u,ccipRequest:R=>h({...R,requestOptions:n})}):await h({data:u,requestOptions:n,sender:a,urls:c}),{data:E}=await hn(e,{blockNumber:t,blockTag:r,data:Mo([f,Wr([{type:"bytes"},{type:"bytes"}],[v,d])]),requestOptions:n,to:i});return E}catch(v){throw n?.signal?.aborted?wr(n.signal):dn(v)?v:new Jg({callbackSelector:f,cause:v,data:o,extraData:d,sender:a,urls:c})}}async function A$({data:e,requestOptions:t,sender:r,urls:o}){let n=new Error("An unknown error occurred.");for(let i=0;i<o.length;i++){if(t?.signal?.aborted)throw wr(t.signal);let s=o[i],a=s.includes("{data}")?"GET":"POST",c=a==="POST"?{data:e,sender:r}:void 0,u=a==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(s.replace("{sender}",r.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:u,method:a,...t?.signal?{signal:t.signal}:{}}),d;if(f.headers.get("Content-Type")?.startsWith("application/json")?d=(await f.json()).data:d=await f.text(),!f.ok){n=new Fn({body:c,details:d?.error?Be(d.error):f.statusText,headers:f.headers,status:f.status,url:s});continue}if(!St(d)){n=new Yg({result:d,url:s});continue}return d}catch(f){if(t?.signal?.aborted)throw wr(t.signal);if(dn(f))throw f;n=new Fn({body:c,details:f.message,url:s});}}throw n}var SV,I$,R$=F(()=>{Ps();x$();Da();mo();X6();Ai();$s();cn();lo();hp();Pr();SV="0x556f1830",I$={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};});async function hn(e,t){let{account:r=e.account,authorizationList:o,batch:n=!!e.batch?.multicall,blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:u,blobs:f,blockOverrides:d,code:g,data:h,factory:v,factoryData:E,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,requestOptions:L,to:C,value:D,stateOverride:q,...H}=t,Z=r?We(r):void 0;if(g&&(v||E))throw new z("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(g&&C)throw new z("Cannot provide both `code` & `to` as parameters.");let re=g&&h,S=v&&E&&C&&h,l=re||S,m=re?O$({code:g,data:h}):S?OV({data:h,factory:v,factoryData:E,to:C}):h;try{Gn(t);let y=In({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),b=d?Fg(d):void 0,x=Yu(q),_=e.chain?.formatters?.transactionRequest?.format,w=(_||Zo)({...ks(H,{format:_}),accessList:u,account:Z,authorizationList:o,blobs:f,data:m,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,to:l?void 0:C,value:D},"call");if(n&&AV({request:w})&&!b&&i===void 0)try{let{deployless:G=!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},J=$$(e,{blockNumber:s,deployless:G});if(!J||!$V(x,J))return await TV(e,{...w,blockHash:i,blockNumber:s,blockTag:a,multicallAddress:J,requestOptions:L,requireCanonical:c,rpcStateOverride:x})}catch(G){if(!(G instanceof pp)&&!(G instanceof Ka))throw G}let p=(()=>{let G=[w,y];return x&&b?[...G,x,b]:x?[...G,x]:b?[...G,{},b]:G})(),A=await e.request({method:"eth_call",params:p},L);return A==="0x"?{data:void 0}:{data:A}}catch(y){if(L?.signal?.aborted)throw wr(L.signal);if(dn(y))throw y;let b=NV(y),{offchainLookup:x,offchainLookupSignature:_}=await Promise.resolve().then(()=>(R$(),k$));if(e.ccipRead!==false&&b?.slice(0,10)===_&&C)return {data:await x(e,{data:b,requestOptions:L,to:C})};throw l&&b?.slice(0,10)==="0x101bb98d"?new hg({factory:v}):qg(y,{...t,account:Z,chain:e.chain})}}function AV({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(h$)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function RV(e){if(!e)return "default";let t=T$.get(e);if(t!==void 0)return t;let r=kV++;return T$.set(e,r),r}async function TV(e,t){let{batchSize:r=1024,deployless:o=false,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:u,multicallAddress:f,requestOptions:d,rpcStateOverride:g,to:h}=t,v=f!==void 0?f:$$(e,{blockNumber:s,deployless:o}),E=In({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),R=typeof E=="string"?E:JSON.stringify(E),$=g?`.${JSON.stringify(g)}`:"",{schedule:N}=hf({id:`${e.uid}.${R}.${RV(d)}${$}`,wait:n,shouldSplitBatch(P){return P.reduce((C,{data:D})=>C+(D.length-2),0)>r*2},fn:async P=>{let L=P.map(H=>({allowFailure:true,callData:H.data,target:H.to})),C=lt({abi:bo,args:[L],functionName:"aggregate3"}),D={...v===null?{data:O$({code:Wa,data:C})}:{to:v,data:C}},q=await e.request({method:"eth_call",params:g?[D,E,g]:[D,E]},d);return Lr({abi:bo,args:[L],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:O,success:I}]=await N({data:u,to:h});if(!I)throw new Ho({data:O});return O==="0x"?{data:void 0}:{data:O}}function $$(e,t){let{blockNumber:r,deployless:o}=t;if(o)return null;if(e.chain)return Kn({blockNumber:r,chain:e.chain,contract:"multicall3"});throw new pp}function $V(e,t){return e?Object.keys(e).some(r=>zr(r,t)):false}function O$(e){let{code:t,data:r}=e;return mp({abi:xi(["constructor(bytes, bytes)"]),bytecode:Zg,args:[t,r]})}function OV(e){let{data:t,factory:r,factoryData:o,to:n}=e;return mp({abi:xi(["constructor(address, bytes, address, bytes)"]),bytecode:y$,args:[n,t,r,o]})}function NV(e){if(!(e instanceof z))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var kV,T$,Ps=F(()=>{au();g2();ln();mn();g$();dp();Te();Gg();Ri();mo();Ni();_2();Dn();$s();Za();Ya();E2();sp();Ju();Kg();vg();Ha();kV=0,T$=new WeakMap;});var pe={};Er(pe,{$brand:()=>zp,$input:()=>S1,$output:()=>E1,NEVER:()=>ab,TimePrecision:()=>k1,ZodAny:()=>v5,ZodArray:()=>S5,ZodBase64:()=>Vv,ZodBase64URL:()=>Zv,ZodBigInt:()=>xl,ZodBigIntFormat:()=>Wv,ZodBoolean:()=>bl,ZodCIDRv4:()=>Fv,ZodCIDRv6:()=>Hv,ZodCUID:()=>Cv,ZodCUID2:()=>zv,ZodCatch:()=>H5,ZodCodec:()=>ow,ZodCustom:()=>Vm,ZodCustomStringFormat:()=>gl,ZodDate:()=>jm,ZodDefault:()=>L5,ZodDiscriminatedUnion:()=>I5,ZodE164:()=>Gv,ZodEmail:()=>Nv,ZodEmoji:()=>Pv,ZodEnum:()=>ml,ZodError:()=>L3,ZodFile:()=>B5,ZodFirstPartyTypeKind:()=>iw,ZodFunction:()=>X5,ZodGUID:()=>zm,ZodIPv4:()=>Dv,ZodIPv6:()=>jv,ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,ZodIntersection:()=>A5,ZodIssueCode:()=>WB,ZodJWT:()=>qv,ZodKSUID:()=>Mv,ZodLazy:()=>K5,ZodLiteral:()=>P5,ZodMap:()=>O5,ZodNaN:()=>Z5,ZodNanoID:()=>Bv,ZodNever:()=>_5,ZodNonOptional:()=>rw,ZodNull:()=>b5,ZodNullable:()=>z5,ZodNumber:()=>yl,ZodNumberFormat:()=>vc,ZodObject:()=>Hm,ZodOptional:()=>tw,ZodPipe:()=>nw,ZodPrefault:()=>M5,ZodPromise:()=>Y5,ZodReadonly:()=>G5,ZodRealError:()=>Xr,ZodRecord:()=>Xv,ZodSet:()=>N5,ZodString:()=>hl,ZodStringFormat:()=>et,ZodSuccess:()=>F5,ZodSymbol:()=>g5,ZodTemplateLiteral:()=>W5,ZodTransform:()=>C5,ZodTuple:()=>R5,ZodType:()=>ke,ZodULID:()=>Lv,ZodURL:()=>Dm,ZodUUID:()=>ei,ZodUndefined:()=>y5,ZodUnion:()=>Jv,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>Uv,_ZodString:()=>Ov,_default:()=>U5,_function:()=>jB,any:()=>wB,array:()=>Fm,base64:()=>oB,base64url:()=>iB,bigint:()=>gB,boolean:()=>h5,catch:()=>V5,check:()=>FB,cidrv4:()=>rB,cidrv6:()=>nB,clone:()=>Mr,codec:()=>UB,coerce:()=>sw,config:()=>wt,core:()=>Qo,cuid:()=>K3,cuid2:()=>J3,custom:()=>HB,date:()=>EB,decode:()=>_v,decodeAsync:()=>Sv,discriminatedUnion:()=>RB,e164:()=>sB,email:()=>M3,emoji:()=>q3,encode:()=>wv,encodeAsync:()=>Ev,endsWith:()=>al,enum:()=>Qv,file:()=>BB,flattenError:()=>Hf,float32:()=>dB,float64:()=>pB,formatError:()=>Vf,function:()=>jB,getErrorMap:()=>JB,globalRegistry:()=>vo,gt:()=>Yo,gte:()=>Yr,guid:()=>D3,hash:()=>lB,hex:()=>fB,hostname:()=>uB,httpUrl:()=>G3,includes:()=>il,instanceof:()=>VB,int:()=>$v,int32:()=>mB,int64:()=>yB,intersection:()=>k5,ipv4:()=>eB,ipv6:()=>tB,iso:()=>Cm,json:()=>GB,jwt:()=>aB,keyof:()=>SB,ksuid:()=>Q3,lazy:()=>J5,length:()=>yc,literal:()=>PB,locales:()=>Xf,looseObject:()=>kB,lowercase:()=>nl,lt:()=>Jo,lte:()=>Rn,map:()=>$B,maxLength:()=>gc,maxSize:()=>hc,mime:()=>cl,minLength:()=>Gi,minSize:()=>Zs,multipleOf:()=>Vs,nan:()=>LB,nanoid:()=>W3,nativeEnum:()=>NB,negative:()=>rv,never:()=>Kv,nonnegative:()=>ov,nonoptional:()=>j5,nonpositive:()=>nv,normalize:()=>ul,null:()=>x5,nullable:()=>Um,nullish:()=>CB,number:()=>m5,object:()=>IB,optional:()=>Lm,overwrite:()=>Xo,parse:()=>yv,parseAsync:()=>bv,partialRecord:()=>TB,pipe:()=>Mm,positive:()=>tv,prefault:()=>D5,preprocess:()=>qB,prettifyError:()=>bb,promise:()=>DB,property:()=>iv,readonly:()=>q5,record:()=>$5,refine:()=>Q5,regex:()=>rl,regexes:()=>kn,registry:()=>fm,safeDecode:()=>Av,safeDecodeAsync:()=>Rv,safeEncode:()=>Iv,safeEncodeAsync:()=>kv,safeParse:()=>xv,safeParseAsync:()=>vv,set:()=>OB,setErrorMap:()=>KB,size:()=>tl,startsWith:()=>sl,strictObject:()=>AB,string:()=>Tv,stringFormat:()=>cB,stringbool:()=>ZB,success:()=>zB,superRefine:()=>eI,symbol:()=>xB,templateLiteral:()=>MB,toJSONSchema:()=>dv,toLowerCase:()=>ll,toUpperCase:()=>dl,transform:()=>ew,treeifyError:()=>yb,trim:()=>fl,tuple:()=>T5,uint32:()=>hB,uint64:()=>bB,ulid:()=>Y3,undefined:()=>vB,union:()=>Yv,unknown:()=>xc,uppercase:()=>ol,url:()=>Z3,util:()=>te,uuid:()=>j3,uuidv4:()=>F3,uuidv6:()=>H3,uuidv7:()=>V3,void:()=>_B,xid:()=>X3});var Qo={};Er(Qo,{$ZodAny:()=>Gx,$ZodArray:()=>Yx,$ZodAsyncError:()=>Yn,$ZodBase64:()=>zx,$ZodBase64URL:()=>Lx,$ZodBigInt:()=>om,$ZodBigIntFormat:()=>Fx,$ZodBoolean:()=>Wf,$ZodCIDRv4:()=>Px,$ZodCIDRv6:()=>Bx,$ZodCUID:()=>_x,$ZodCUID2:()=>Ex,$ZodCatch:()=>m1,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>Xb,$ZodCheckEndsWith:()=>fx,$ZodCheckGreaterThan:()=>Yp,$ZodCheckIncludes:()=>cx,$ZodCheckLengthEquals:()=>ox,$ZodCheckLessThan:()=>Jp,$ZodCheckLowerCase:()=>sx,$ZodCheckMaxLength:()=>rx,$ZodCheckMaxSize:()=>Qb,$ZodCheckMimeType:()=>dx,$ZodCheckMinLength:()=>nx,$ZodCheckMinSize:()=>ex,$ZodCheckMultipleOf:()=>Jb,$ZodCheckNumberFormat:()=>Yb,$ZodCheckOverwrite:()=>px,$ZodCheckProperty:()=>lx,$ZodCheckRegex:()=>ix,$ZodCheckSizeEquals:()=>tx,$ZodCheckStartsWith:()=>ux,$ZodCheckStringFormat:()=>pc,$ZodCheckUpperCase:()=>ax,$ZodCodec:()=>Kf,$ZodCustom:()=>_1,$ZodCustomStringFormat:()=>Dx,$ZodDate:()=>Jx,$ZodDefault:()=>f1,$ZodDiscriminatedUnion:()=>Qx,$ZodE164:()=>Ux,$ZodEmail:()=>bx,$ZodEmoji:()=>vx,$ZodEncodeError:()=>Di,$ZodEnum:()=>o1,$ZodError:()=>Ff,$ZodFile:()=>s1,$ZodFunction:()=>x1,$ZodGUID:()=>gx,$ZodIPv4:()=>Ox,$ZodIPv6:()=>Nx,$ZodISODate:()=>Rx,$ZodISODateTime:()=>kx,$ZodISODuration:()=>$x,$ZodISOTime:()=>Tx,$ZodIntersection:()=>e1,$ZodJWT:()=>Mx,$ZodKSUID:()=>Ax,$ZodLazy:()=>w1,$ZodLiteral:()=>i1,$ZodMap:()=>r1,$ZodNaN:()=>h1,$ZodNanoID:()=>wx,$ZodNever:()=>Wx,$ZodNonOptional:()=>d1,$ZodNull:()=>Zx,$ZodNullable:()=>u1,$ZodNumber:()=>nm,$ZodNumberFormat:()=>jx,$ZodObject:()=>gS,$ZodObjectJIT:()=>Xx,$ZodOptional:()=>c1,$ZodPipe:()=>g1,$ZodPrefault:()=>l1,$ZodPromise:()=>v1,$ZodReadonly:()=>y1,$ZodRealError:()=>Jr,$ZodRecord:()=>t1,$ZodRegistry:()=>mc,$ZodSet:()=>n1,$ZodString:()=>Hs,$ZodStringFormat:()=>Xe,$ZodSuccess:()=>p1,$ZodSymbol:()=>Hx,$ZodTemplateLiteral:()=>b1,$ZodTransform:()=>a1,$ZodTuple:()=>sm,$ZodType:()=>we,$ZodULID:()=>Sx,$ZodURL:()=>xx,$ZodUUID:()=>yx,$ZodUndefined:()=>Vx,$ZodUnion:()=>im,$ZodUnknown:()=>qx,$ZodVoid:()=>Kx,$ZodXID:()=>Ix,$brand:()=>zp,$constructor:()=>B,$input:()=>S1,$output:()=>E1,Doc:()=>qf,JSONSchema:()=>l5,JSONSchemaGenerator:()=>pl,NEVER:()=>ab,TimePrecision:()=>k1,_any:()=>W1,_array:()=>sv,_base64:()=>km,_base64url:()=>Rm,_bigint:()=>j1,_boolean:()=>M1,_catch:()=>$3,_check:()=>f5,_cidrv4:()=>Im,_cidrv6:()=>Am,_coercedBigint:()=>F1,_coercedBoolean:()=>D1,_coercedDate:()=>Q1,_coercedNumber:()=>P1,_coercedString:()=>A1,_cuid:()=>bm,_cuid2:()=>xm,_custom:()=>cv,_date:()=>X1,_decode:()=>Fp,_decodeAsync:()=>Vp,_default:()=>k3,_discriminatedUnion:()=>h3,_e164:()=>Tm,_email:()=>lm,_emoji:()=>gm,_encode:()=>jp,_encodeAsync:()=>Hp,_endsWith:()=>al,_enum:()=>w3,_file:()=>av,_float32:()=>C1,_float64:()=>z1,_gt:()=>Yo,_gte:()=>Yr,_guid:()=>Qf,_includes:()=>il,_int:()=>B1,_int32:()=>L1,_int64:()=>H1,_intersection:()=>g3,_ipv4:()=>Em,_ipv6:()=>Sm,_isoDate:()=>T1,_isoDateTime:()=>R1,_isoDuration:()=>O1,_isoTime:()=>$1,_jwt:()=>$m,_ksuid:()=>_m,_lazy:()=>B3,_length:()=>yc,_literal:()=>E3,_lowercase:()=>nl,_lt:()=>Jo,_lte:()=>Rn,_map:()=>x3,_max:()=>Rn,_maxLength:()=>gc,_maxSize:()=>hc,_mime:()=>cl,_min:()=>Yr,_minLength:()=>Gi,_minSize:()=>Zs,_multipleOf:()=>Vs,_nan:()=>ev,_nanoid:()=>ym,_nativeEnum:()=>_3,_negative:()=>rv,_never:()=>J1,_nonnegative:()=>ov,_nonoptional:()=>R3,_nonpositive:()=>nv,_normalize:()=>ul,_null:()=>q1,_nullable:()=>A3,_number:()=>N1,_optional:()=>I3,_overwrite:()=>Xo,_parse:()=>uc,_parseAsync:()=>fc,_pipe:()=>O3,_positive:()=>tv,_promise:()=>C3,_property:()=>iv,_readonly:()=>N3,_record:()=>b3,_refine:()=>uv,_regex:()=>rl,_safeDecode:()=>Gp,_safeDecodeAsync:()=>Wp,_safeEncode:()=>Zp,_safeEncodeAsync:()=>qp,_safeParse:()=>lc,_safeParseAsync:()=>dc,_set:()=>v3,_size:()=>tl,_startsWith:()=>sl,_string:()=>I1,_stringFormat:()=>bc,_stringbool:()=>lv,_success:()=>T3,_superRefine:()=>fv,_symbol:()=>Z1,_templateLiteral:()=>P3,_toLowerCase:()=>ll,_toUpperCase:()=>dl,_transform:()=>S3,_trim:()=>fl,_tuple:()=>y3,_uint32:()=>U1,_uint64:()=>V1,_ulid:()=>vm,_undefined:()=>G1,_union:()=>m3,_unknown:()=>K1,_uppercase:()=>ol,_url:()=>el,_uuid:()=>dm,_uuidv4:()=>pm,_uuidv6:()=>mm,_uuidv7:()=>hm,_void:()=>Y1,_xid:()=>wm,clone:()=>Mr,config:()=>wt,decode:()=>zN,decodeAsync:()=>UN,encode:()=>CN,encodeAsync:()=>LN,flattenError:()=>Hf,formatError:()=>Vf,globalConfig:()=>Cf,globalRegistry:()=>vo,isValidBase64:()=>Cx,isValidBase64URL:()=>dS,isValidJWT:()=>pS,locales:()=>Xf,parse:()=>Mp,parseAsync:()=>Dp,prettifyError:()=>bb,regexes:()=>kn,registry:()=>fm,safeDecode:()=>DN,safeDecodeAsync:()=>FN,safeEncode:()=>MN,safeEncodeAsync:()=>jN,safeParse:()=>xb,safeParseAsync:()=>vb,toDotPath:()=>KE,toJSONSchema:()=>dv,treeifyError:()=>yb,util:()=>te,version:()=>mx});var ab=Object.freeze({status:"aborted"});function B(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:false}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let f in s.prototype)f in a||Object.defineProperty(a,f,{value:s.prototype[f].bind(a)});a._zod.constr=s,a._zod.def=c;}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let f of u._zod.deferred)f();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var zp=Symbol("zod_brand"),Yn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Di=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},Cf={};function wt(e){return e&&Object.assign(Cf,e),Cf}var te={};Er(te,{BIGINT_FORMAT_RANGES:()=>gb,Class:()=>ub,NUMBER_FORMAT_RANGES:()=>hb,aborted:()=>Zi,allowsEval:()=>lb,assert:()=>pN,assertEqual:()=>uN,assertIs:()=>lN,assertNever:()=>dN,assertNotEqual:()=>fN,assignProp:()=>Fi,base64ToUint8Array:()=>GE,base64urlToUint8Array:()=>$N,cached:()=>ac,captureStackTrace:()=>Up,cleanEnum:()=>TN,cleanRegex:()=>Uf,clone:()=>Mr,cloneDef:()=>hN,createTransparentProxy:()=>wN,defineLazy:()=>Oe,esc:()=>Lp,escapeRegex:()=>xo,extend:()=>SN,finalizeIssue:()=>yn,floatSafeRemainder:()=>fb,getElementAtPath:()=>gN,getEnumValues:()=>Lf,getLengthableOrigin:()=>jf,getParsedType:()=>vN,getSizableOrigin:()=>Df,hexToUint8Array:()=>NN,isObject:()=>js,isPlainObject:()=>Vi,issue:()=>cc,joinValues:()=>j,jsonStringifyReplacer:()=>sc,merge:()=>AN,mergeDefs:()=>Hi,normalizeParams:()=>ee,nullish:()=>ji,numKeys:()=>xN,objectClone:()=>mN,omit:()=>EN,optionalKeys:()=>mb,partial:()=>kN,pick:()=>_N,prefixIssues:()=>gn,primitiveTypes:()=>pb,promiseAllObject:()=>yN,propertyKeyTypes:()=>Mf,randomString:()=>bN,required:()=>RN,safeExtend:()=>IN,shallowClone:()=>db,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>qE,uint8ArrayToBase64url:()=>ON,uint8ArrayToHex:()=>PN,unwrapMessage:()=>zf});function uN(e){return e}function fN(e){return e}function lN(e){}function dN(e){throw new Error}function pN(e){}function Lf(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function j(e,t="|"){return e.map(r=>X(r)).join(t)}function sc(e,t){return typeof t=="bigint"?t.toString():t}function ac(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function ji(e){return e==null}function Uf(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function fb(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]));}let i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}var ZE=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==ZE)return o===void 0&&(o=ZE,o=r()),o},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function mN(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Fi(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function Hi(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o);}return Object.defineProperties({},t)}function hN(e){return Hi(e._zod.def)}function gN(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function yN(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function bN(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Lp(e){return JSON.stringify(e)}var Up="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function js(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var lb=ac(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Vi(e){if(js(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(js(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function db(e){return Vi(e)?{...e}:Array.isArray(e)?[...e]:e}function xN(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var vN=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Mf=new Set(["string","number","symbol"]),pb=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mr(e,t,r){let o=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(o._zod.parent=e),o}function ee(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function wN(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function X(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function mb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var hb={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]},gb={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function _N(e,t){let r=e._zod.def,o=Hi(e._zod.def,{get shape(){let n={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(n[i]=r.shape[i]);}return Fi(this,"shape",n),n},checks:[]});return Mr(e,o)}function EN(e,t){let r=e._zod.def,o=Hi(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete n[i];}return Fi(this,"shape",n),n},checks:[]});return Mr(e,o)}function SN(e,t){if(!Vi(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let n=Hi(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Fi(this,"shape",i),i},checks:[]});return Mr(e,n)}function IN(e,t){if(!Vi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return Fi(this,"shape",o),o},checks:e._zod.def.checks};return Mr(e,r)}function AN(e,t){let r=Hi(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Fi(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Mr(e,r)}function kN(e,t,r){let o=Hi(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:n[s]}):n[s]);}else for(let s in n)i[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Fi(this,"shape",i),i},checks:[]});return Mr(t,o)}function RN(e,t,r){let o=Hi(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}));}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Fi(this,"shape",i),i},checks:[]});return Mr(t,o)}function Zi(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function gn(e,t){return t.map(r=>{var o;return (o=r).path??(o.path=[]),r.path.unshift(e),r})}function zf(e){return typeof e=="string"?e:e?.message}function yn(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=zf(e.inst?._zod.def?.error?.(e))??zf(t?.error?.(e))??zf(r.customError?.(e))??zf(r.localeError?.(e))??"Invalid input";o.message=n;}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Df(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function jf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cc(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function TN(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function GE(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function qE(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function $N(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return GE(t+r)}function ON(e){return qE(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function NN(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function PN(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var ub=class{constructor(...t){}};var WE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,sc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Ff=B("$ZodError",WE),Jr=B("$ZodError",WE,{Parent:Error});function Hf(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return {formErrors:o,fieldErrors:r}}function Vf(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else {let s=r,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++;}}};return o(e),r}function yb(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let f=r,d=0;for(;d<u.length;){let g=u[d],h=d===u.length-1;typeof g=="string"?(f.properties??(f.properties={}),(s=f.properties)[g]??(s[g]={errors:[]}),f=f.properties[g]):(f.items??(f.items=[]),(a=f.items)[g]??(a[g]={errors:[]}),f=f.items[g]),h&&f.errors.push(t(c)),d++;}}};return o(e),r}function KE(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function bb(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${KE(o.path)}`);return t.join(`
41
- `)}var uc=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:false}):{async:false},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Yn;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>yn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Mp=uc(Jr),fc=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:true}):{async:true},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>yn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Dp=fc(Jr),lc=e=>(t,r,o)=>{let n=o?{...o,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Yn;return i.issues.length?{success:false,error:new(e??Ff)(i.issues.map(s=>yn(s,n,wt())))}:{success:true,data:i.value}},xb=lc(Jr),dc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:true}):{async:true},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>yn(s,n,wt())))}:{success:true,data:i.value}},vb=dc(Jr),jp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return uc(e)(t,r,n)},CN=jp(Jr),Fp=e=>(t,r,o)=>uc(e)(t,r,o),zN=Fp(Jr),Hp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fc(e)(t,r,n)},LN=Hp(Jr),Vp=e=>async(t,r,o)=>fc(e)(t,r,o),UN=Vp(Jr),Zp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return lc(e)(t,r,n)},MN=Zp(Jr),Gp=e=>(t,r,o)=>lc(e)(t,r,o),DN=Gp(Jr),qp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return dc(e)(t,r,n)},jN=qp(Jr),Wp=e=>async(t,r,o)=>dc(e)(t,r,o),FN=Wp(Jr);var kn={};Er(kn,{base64:()=>Cb,base64url:()=>Kp,bigint:()=>Fb,boolean:()=>Zb,browserEmail:()=>JN,cidrv4:()=>Pb,cidrv6:()=>Bb,cuid:()=>wb,cuid2:()=>_b,date:()=>Ub,datetime:()=>Db,domain:()=>XN,duration:()=>kb,e164:()=>Lb,email:()=>Tb,emoji:()=>$b,extendedDuration:()=>HN,guid:()=>Rb,hex:()=>QN,hostname:()=>zb,html5Email:()=>qN,idnEmail:()=>KN,integer:()=>Hb,ipv4:()=>Ob,ipv6:()=>Nb,ksuid:()=>Ib,lowercase:()=>Wb,md5_base64:()=>tP,md5_base64url:()=>rP,md5_hex:()=>eP,nanoid:()=>Ab,null:()=>Gb,number:()=>Vb,rfc5322Email:()=>WN,sha1_base64:()=>oP,sha1_base64url:()=>iP,sha1_hex:()=>nP,sha256_base64:()=>aP,sha256_base64url:()=>cP,sha256_hex:()=>sP,sha384_base64:()=>fP,sha384_base64url:()=>lP,sha384_hex:()=>uP,sha512_base64:()=>pP,sha512_base64url:()=>mP,sha512_hex:()=>dP,string:()=>jb,time:()=>Mb,ulid:()=>Eb,undefined:()=>qb,unicodeEmail:()=>JE,uppercase:()=>Kb,uuid:()=>Fs,uuid4:()=>VN,uuid6:()=>ZN,uuid7:()=>GN,xid:()=>Sb});var wb=/^[cC][^\s-]{8,}$/,_b=/^[0-9a-z]+$/,Eb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Sb=/^[0-9a-vA-V]{20}$/,Ib=/^[A-Za-z0-9]{27}$/,Ab=/^[a-zA-Z0-9_-]{21}$/,kb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,HN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rb=/^([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})$/,Fs=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)$/,VN=Fs(4),ZN=Fs(6),GN=Fs(7),Tb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qN=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,WN=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,JE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,KN=JE,JN=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,YN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $b(){return new RegExp(YN,"u")}var Ob=/^(?:(?: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])$/,Nb=/^(([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}|:))$/,Pb=/^((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])$/,Bb=/^(([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])$/,Cb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kp=/^[A-Za-z0-9_-]*$/,zb=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,XN=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Lb=/^\+(?:[0-9]){6,14}[0-9]$/,YE="(?:(?:\\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])))",Ub=new RegExp(`^${YE}$`);function XE(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Mb(e){return new RegExp(`^${XE(e)}$`)}function Db(e){let t=XE({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${YE}T(?:${o})$`)}var jb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Fb=/^-?\d+n?$/,Hb=/^-?\d+$/,Vb=/^-?\d+(?:\.\d+)?/,Zb=/^(?:true|false)$/i,Gb=/^null$/i;var qb=/^undefined$/i;var Wb=/^[^A-Z]*$/,Kb=/^[^a-z]*$/,QN=/^[0-9a-fA-F]*$/;function Zf(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Gf(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var eP=/^[0-9a-fA-F]{32}$/,tP=Zf(22,"=="),rP=Gf(22),nP=/^[0-9a-fA-F]{40}$/,oP=Zf(27,"="),iP=Gf(27),sP=/^[0-9a-fA-F]{64}$/,aP=Zf(43,"="),cP=Gf(43),uP=/^[0-9a-fA-F]{96}$/,fP=Zf(64,""),lP=Gf(64),dP=/^[0-9a-fA-F]{128}$/,pP=Zf(86,"=="),mP=Gf(86);var ot=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),eS={number:"number",bigint:"bigint",object:"date"},Jp=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=eS[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Yp=B("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=eS[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Jb=B("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):fb(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),Yb=B("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=hb[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Hb);}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){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:o,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:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e});};}),Xb=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=gb[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o;}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e});};}),Qb=B("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !ji(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Df(n),code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ex=B("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !ji(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Df(n),code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),tx=B("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !ji(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size;}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Df(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),rx=B("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !ji(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=jf(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),nx=B("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !ji(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=jf(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ox=B("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !ji(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length;}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=jf(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),pc=B("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.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});}):(o=e._zod).check??(o.check=()=>{});}),ix=B("$ZodCheckRegex",(e,t)=>{pc.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),sx=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Wb),pc.init(e,t);}),ax=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Kb),pc.init(e,t);}),cx=B("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);let r=xo(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),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});};}),ux=B("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`^${xo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),fx=B("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`.*${xo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function QE(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues));}var lx=B("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>QE(n,r,t.property));QE(o,r,t.property);};}),dx=B("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),px=B("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var qf=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
29
+ `,n+=I4(o.state)),o.stateDiff&&(n+=` stateDiff:
30
+ `,n+=I4(o.stateDiff)),n},` State Override:
31
+ `).slice(0,-1)}var ug,fg,i2=F(()=>{Te();ug=class extends L{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"});}},fg=class extends L{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"});}};});function Ma(e){let t=Object.entries(e).map(([o,n])=>n===void 0||n===false?null:[o,n]).filter(Boolean),r=t.reduce((o,[n])=>Math.max(o,n.length),0);return t.map(([o,n])=>` ${`${o}:`.padEnd(r+1)} ${n}`).join(`
32
+ `)}var lg,dg,pg,mg,Es,wu,hg,gg,Fn=F(()=>{cg();vu();Te();lg=class extends L{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"});}},dg=class extends L{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Ma(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"});}},pg=class extends L{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"});}},mg=class extends L{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ma({chain:n&&`${n?.name} (id: ${n?.id})`,from:r?.address,to:d,value:typeof g<"u"&&`${xu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},Es=class extends L{constructor({blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i}){let s="Transaction";o&&i!==void 0&&(s=`Transaction at block time "${o}" at index "${i}"`),t&&i!==void 0&&(s=`Transaction at block hash "${t}" at index "${i}"`),r&&i!==void 0&&(s=`Transaction at block number "${r}" at index "${i}"`),n&&(s=`Transaction with hash "${n}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"});}},wu=class extends L{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"});}},hg=class extends L{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:true,configurable:true,writable:true,value:void 0}),this.receipt=t;}},gg=class extends L{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"});}};});function wr(e){if(e?.reason)return e.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");let t=new Error("This operation was aborted");return t.name="AbortError",t}function dn(e){return typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError"}var k4,Da,ho=F(()=>{k4=e=>e;Da=e=>{try{let t=new URL(e);return !t.username&&!t.password?e:(t.username="",t.password="",t.toString())}catch{return e}};});var Ss,_u,ja,yg,bg,Ho,Ti=F(()=>{ln();tg();t2();wi();_4();ws();cg();vu();Et();Te();i2();Fn();ho();Ss=class extends L{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g,stateOverride:h}){let x=r?We(r):void 0,w=Ma({from:x?.address,to:d,value:typeof g<"u"&&`${xu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});h&&(w+=`
33
+ ${A4(h)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",w].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},_u=class extends L{constructor(t,{abi:r,args:o,contractAddress:n,docsPath:i,functionName:s,sender:a}){let c=fn({abi:r,args:o,name:s}),u=c?r2({abiItem:c,args:o,includeFunctionName:false,includeName:false}):void 0,f=c?nr(c,{includeName:true}):void 0,d=Ma({address:n&&k4(n),function:f,args:u&&u!=="()"&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"args",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"sender",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abi=r,this.args=o,this.cause=t,this.contractAddress=n,this.functionName=s,this.sender=a;}},ja=class extends L{constructor({abi:t,data:r,functionName:o,message:n,cause:i}){let s,a,c,u;if(r&&r!=="0x")try{a=og({abi:t,data:r,cause:i});let{abiItem:d,errorName:g,args:h}=a;if(g==="Error")u=h[0];else if(g==="Panic"){let[x]=h;u=h4[x];}else {let x=d?nr(d,{includeName:!0}):void 0,w=d&&h?r2({abiItem:d,args:h,includeFunctionName:!1,includeName:!1}):void 0;c=[x?`Error: ${x}`:"",w&&w!=="()"?` ${[...Array(g?.length??0).keys()].map(()=>" ").join("")}${w}`:""];}}catch(d){s=d;}else n&&(u=n);let f;s instanceof du&&(f=s.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${f}.`]),super(u&&u!=="execution reverted"||f?[`The contract function "${o}" reverted with the following ${f?"signature":"reason"}:`,u||f].join(`
34
+ `):`The contract function "${o}" reverted.`,{cause:s??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"raw",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"reason",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=a,this.raw=r,this.reason=u,this.signature=f;}},yg=class extends L{constructor({functionName:t,cause:r}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:r});}},bg=class extends L{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"});}},Ho=class extends L{constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:3}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t;}};});var Hn,Fa,Is,up,Ha=F(()=>{Pr();Te();ho();Hn=class extends L{constructor({body:t,cause:r,details:o,headers:n,status:i,url:s}){super("HTTP request failed.",{cause:r,details:o,metaMessages:[i&&`Status: ${i}`,`URL: ${Da(s)}`,t&&`Request body: ${Be(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"headers",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"status",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.body=t,this.headers=n,this.status=i,this.url=s;}},Fa=class extends L{constructor({maxSize:t,size:r}){super("HTTP response body exceeded the size limit.",{metaMessages:[`Max: ${t} bytes`,`Received: ${r} bytes`],name:"ResponseBodyTooLargeError"}),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t,this.size=r;}},Is=class extends L{constructor({body:t,error:r,url:o}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${Da(o)}`,`Request body: ${Be(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r.code,this.data=r.data,this.url=o;}},up=class extends L{constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Da(r)}`,`Request body: ${Be(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.url=r;}};});var eV,Br,Cr,Eu,Su,Iu,Au,$i,Vn,ku,Ru,As,ks,Va,Tu,Oi,$u,Ou,Nu,Pu,Bu,Cu,zu,Lu,Uu,Mu,Du,ju,Rs,xg,Fu=F(()=>{Te();Ha();eV=-1,Br=class extends L{constructor(t,{code:r,docsPath:o,metaMessages:n,name:i,shortMessage:s}){super(s,{cause:t,docsPath:o,metaMessages:n||t?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),this.name=i||t.name,this.code=t instanceof Is?t.code:r??eV;}},Cr=class extends Br{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=r.data;}},Eu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."});}};Object.defineProperty(Eu,"code",{enumerable:true,configurable:true,writable:true,value:-32700});Su=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."});}};Object.defineProperty(Su,"code",{enumerable:true,configurable:true,writable:true,value:-32600});Iu=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`});}};Object.defineProperty(Iu,"code",{enumerable:true,configurable:true,writable:true,value:-32601});Au=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
35
+ `)});}};Object.defineProperty(Au,"code",{enumerable:true,configurable:true,writable:true,value:-32602});$i=class e extends Br{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."});}};Object.defineProperty($i,"code",{enumerable:true,configurable:true,writable:true,value:-32603});Vn=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
36
+ `)});}};Object.defineProperty(Vn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});ku=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty(ku,"code",{enumerable:true,configurable:true,writable:true,value:-32001});Ru=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(Ru,"code",{enumerable:true,configurable:true,writable:true,value:-32002});As=class e extends Br{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(As,"code",{enumerable:true,configurable:true,writable:true,value:-32003});ks=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`});}};Object.defineProperty(ks,"code",{enumerable:true,configurable:true,writable:true,value:-32004});Va=class e extends Br{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(Va,"code",{enumerable:true,configurable:true,writable:true,value:-32005});Tu=class e extends Br{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(Tu,"code",{enumerable:true,configurable:true,writable:true,value:-32006});Oi=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(Oi,"code",{enumerable:true,configurable:true,writable:true,value:4001});$u=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty($u,"code",{enumerable:true,configurable:true,writable:true,value:4100});Ou=class e extends Cr{constructor(t,{method:r}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`});}};Object.defineProperty(Ou,"code",{enumerable:true,configurable:true,writable:true,value:4200});Nu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty(Nu,"code",{enumerable:true,configurable:true,writable:true,value:4900});Pu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(Pu,"code",{enumerable:true,configurable:true,writable:true,value:4901});Bu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(Bu,"code",{enumerable:true,configurable:true,writable:true,value:4902});Cu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(Cu,"code",{enumerable:true,configurable:true,writable:true,value:5700});zu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(zu,"code",{enumerable:true,configurable:true,writable:true,value:5710});Lu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(Lu,"code",{enumerable:true,configurable:true,writable:true,value:5720});Uu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(Uu,"code",{enumerable:true,configurable:true,writable:true,value:5730});Mu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Mu,"code",{enumerable:true,configurable:true,writable:true,value:5740});Du=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Du,"code",{enumerable:true,configurable:true,writable:true,value:5750});ju=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(ju,"code",{enumerable:true,configurable:true,writable:true,value:5760});Rs=class e extends Cr{constructor(t){super(t,{code:e.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."});}};Object.defineProperty(Rs,"code",{enumerable:true,configurable:true,writable:true,value:7e3});xg=class extends Br{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};});var In,Zn,Hu,Vu,Zu,Gu,qu,Wu,Ku,Ju,Vo,Gn,Zo=F(()=>{vu();Te();In=class extends L{constructor({cause:t,message:r}={}){let o=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"});}};Object.defineProperty(In,"code",{enumerable:true,configurable:true,writable:true,value:3});Object.defineProperty(In,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/execution reverted|gas required exceeds allowance/});Zn=class extends L{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"});}};Object.defineProperty(Zn,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});Hu=class extends L{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"});}};Object.defineProperty(Hu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});Vu=class extends L{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"});}};Object.defineProperty(Vu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too high/});Zu=class extends L{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
37
+ `),{cause:t,name:"NonceTooLowError"});}};Object.defineProperty(Zu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too low|transaction already imported|already known/});Gu=class extends L{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"});}};Object.defineProperty(Gu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce has max value/});qu=class extends L{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
38
+ `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"});}};Object.defineProperty(qu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/insufficient funds|exceeds transaction sender account balance/});Wu=class extends L{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"});}};Object.defineProperty(Wu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too high|gas limit reached/});Ku=class extends L{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"});}};Object.defineProperty(Ku,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too low/});Ju=class extends L{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"});}};Object.defineProperty(Ju,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/transaction type not valid/});Vo=class extends L{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${or(o)} gwei`:""}).`].join(`
39
+ `),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(Vo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Gn=class extends L{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"});}};});function Ts(e,t){let r=(e.details||"").toLowerCase(),o=e instanceof L?e.walk(n=>n?.code===In.code):e;return o instanceof L?new In({cause:e,message:o.details}):In.nodeMessage.test(r)?new In({cause:e,message:e.details}):Zn.nodeMessage.test(r)?new Zn({cause:e,maxFeePerGas:t?.maxFeePerGas}):Hu.nodeMessage.test(r)?new Hu({cause:e,maxFeePerGas:t?.maxFeePerGas}):Vu.nodeMessage.test(r)?new Vu({cause:e,nonce:t?.nonce}):Zu.nodeMessage.test(r)?new Zu({cause:e,nonce:t?.nonce}):Gu.nodeMessage.test(r)?new Gu({cause:e,nonce:t?.nonce}):qu.nodeMessage.test(r)?new qu({cause:e}):Wu.nodeMessage.test(r)?new Wu({cause:e,gas:t?.gas}):Ku.nodeMessage.test(r)?new Ku({cause:e,gas:t?.gas}):Ju.nodeMessage.test(r)?new Ju({cause:e}):Vo.nodeMessage.test(r)?new Vo({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Gn({cause:e})}var lp=F(()=>{Te();Zo();});function $s(e,{format:t}){if(!t)return {};let r={};function o(i){let s=Object.keys(i);for(let a of s)a in e&&(r[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&o(i[a]);}let n=t(e||{});return o(n),r}var dp=F(()=>{});function Yu(e,t){return ({exclude:r,format:o})=>({exclude:r,format:(n,i)=>{let s=t(n,i);if(r)for(let a of r)delete s[a];return {...s,...o(n,i)}},type:e})}var _g=F(()=>{});function Go(e,t){let r={};return typeof e.authorizationList<"u"&&(r.authorizationList=iV(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(o=>Le(o)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=K(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=K(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=K(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=K(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=K(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=K(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=oV[e.type]),typeof e.value<"u"&&(r.value=K(e.value)),r}function iV(e){return e.map(t=>({address:t.address,r:t.r?K(BigInt(t.r)):t.r,s:t.s?K(BigInt(t.s)):t.s,chainId:K(t.chainId),nonce:K(t.nonce),...typeof t.yParity<"u"?{yParity:K(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:K(t.v)}:{}}))}var oV,Xu=F(()=>{Ae();oV={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};});function C4(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:o})=>{if(r.length!==66)throw new Qd({size:r.length,targetSize:66,type:"hex"});if(o.length!==66)throw new Qd({size:o.length,targetSize:66,type:"hex"});return t[r]=o,t},{})}function sV(e){let{balance:t,nonce:r,state:o,stateDiff:n,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=K(t)),r!==void 0&&(s.nonce=K(r)),o!==void 0&&(s.state=C4(o)),n!==void 0){if(s.state)throw new fg;s.stateDiff=C4(n);}return s}function Qu(e){if(!e)return;let t={};for(let{address:r,...o}of e){if(!Me(r,{strict:false}))throw new nt({address:r});if(t[r])throw new ug({address:r});t[r]=sV(o);}return t}var Eg=F(()=>{Lo();G0();i2();Sn();Ae();});var ef,s2=F(()=>{ef=2n**256n-1n;});function qn(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:o,to:n}=e,i=t?We(t):void 0;if(i&&!Me(i.address))throw new nt({address:i.address});if(n&&!Me(n))throw new nt({address:n});if(r&&r>ef)throw new Zn({maxFeePerGas:r});if(o&&r&&o>r)throw new Vo({maxFeePerGas:r,maxPriorityFeePerGas:o})}var Za=F(()=>{ln();s2();Lo();Zo();Sn();});function An(e){let{blockHash:t,blockNumber:r,blockTag:o,requireCanonical:n}=e;if(n!==void 0&&!t)throw new L("`requireCanonical` can only be provided when `blockHash` is set.");return t?n?{blockHash:t,requireCanonical:n}:{blockHash:t}:typeof r=="bigint"?K(r):o??"latest"}var qa=F(()=>{Te();Ae();});function zr(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});if(!Me(t,{strict:false}))throw new nt({address:t});return e.toLowerCase()===t.toLowerCase()}var Ps=F(()=>{Lo();Sn();});function Lr(e){let{abi:t,args:r,functionName:o,data:n}=e,i=t[0];if(o){let a=fn({abi:t,args:r,name:o});if(!a)throw new mo(o,{docsPath:f2});i=a;}if(i.type!=="function")throw new mo(void 0,{docsPath:f2});if(!i.outputs)throw new pu(i.name,{docsPath:f2});let s=Ri(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var f2,Pi=F(()=>{Et();cp();ws();f2="/docs/contract/decodeFunctionResult";});var q4,W4=F(()=>{q4="0.1.1";});function K4(){return q4}var J4=F(()=>{W4();});function Y4(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Y4(e.cause,t):t?null:e}var de,pn=F(()=>{J4();de=class e extends Error{static setStaticOptions(t){e.prototype.docsOrigin=t.docsOrigin,e.prototype.showVersion=t.showVersion,e.prototype.version=t.version;}constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=r.docsOrigin??e.prototype.docsOrigin,s=`${i}${n??""}`,a=!!(r.version??e.prototype.showVersion),c=r.version??e.prototype.version,u=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n||a?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(f=>typeof f=="string").join(`
40
+ `);super(u,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.cause=r.cause,this.details=o,this.docs=s,this.docsOrigin=i,this.docsPath=n,this.shortMessage=t,this.showVersion=a,this.version=c;}walk(t){return Y4(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${K4()}`}});de.setStaticOptions(de.defaultStaticOptions);});function lf(e,t){if(Wn(e)>t)throw new zg({givenSize:Wn(e),maxSize:t})}function l2(e){if(e>=Bi.zero&&e<=Bi.nine)return e-Bi.zero;if(e>=Bi.A&&e<=Bi.F)return e-(Bi.A-10);if(e>=Bi.a&&e<=Bi.f)return e-(Bi.a-10)}function e$(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new Lg({size:e.length,targetSize:o,type:"Bytes"});let n=new Uint8Array(o);for(let i=0;i<o;i++){let s=r==="right";n[s?i:o-i-1]=e[s?i:e.length-i-1];}return n}function d2(e,t={}){let{dir:r="left"}=t,o=e,n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o}var Bi,t$=F(()=>{Bs();Bi={zero:48,nine:57,A:65,F:70,a:97,f:102};});function df(e,t){if(dt(e)>t)throw new Ug({givenSize:dt(e),maxSize:t})}function r$(e,t){if(typeof t=="number"&&t>0&&t>dt(e)-1)throw new mp({offset:t,position:"start",size:dt(e)})}function n$(e,t,r){if(typeof t=="number"&&typeof r=="number"&&dt(e)!==r-t)throw new mp({offset:r,position:"end",size:dt(e)})}function p2(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;let n=e.replace("0x","");if(n.length>o*2)throw new Mg({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function o$(e,t={}){let{dir:r="left"}=t,o=e.replace("0x",""),n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o==="0"?"0x":r==="right"&&o.length%2===1?`0x${o}0`:`0x${o}`}var m2=F(()=>{pr();});function Cs(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+mV:n,r)}var mV,hp=F(()=>{mV="#__bigint";});function yV(e){if(!(e instanceof Uint8Array)){if(!e)throw new pf(e);if(typeof e!="object")throw new pf(e);if(!("BYTES_PER_ELEMENT"in e))throw new pf(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new pf(e)}}function s$(e){return e instanceof Uint8Array?e:typeof e=="string"?mf(e):bV(e)}function bV(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function mf(e,t={}){let{size:r}=t,o=e;r&&(df(e,r),o=Wo(e,r));let n=o.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let a=0,c=0;a<i;a++){let u=l2(n.charCodeAt(c++)),f=l2(n.charCodeAt(c++));if(u===void 0||f===void 0)throw new de(`Invalid byte sequence ("${n[c-2]}${n[c-1]}" in "${n}").`);s[a]=u<<4|f;}return s}function a$(e,t={}){let{size:r}=t,o=gV.encode(e);return typeof r=="number"?(lf(o,r),xV(o,r)):o}function xV(e,t){return e$(e,{dir:"right",size:t})}function Wn(e){return e.length}function c$(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function u$(e,t={}){let{size:r}=t;typeof r<"u"&&lf(e,r);let o=It(e,t);return y2(o,t)}function f$(e,t={}){let{size:r}=t,o=e;if(typeof r<"u"&&(lf(o,r),o=g2(o)),o.length>1||o[0]>1)throw new h2(o);return !!o[0]}function qo(e,t={}){let{size:r}=t;typeof r<"u"&&lf(e,r);let o=It(e,t);return jg(o,t)}function l$(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(lf(o,r),o=vV(o)),hV.decode(o)}function g2(e){return d2(e,{dir:"left"})}function vV(e){return d2(e,{dir:"right"})}function d$(e){try{return yV(e),!0}catch{return false}}var hV,gV,h2,pf,zg,Lg,Bs=F(()=>{pn();pr();t$();m2();hp();hV=new TextDecoder,gV=new TextEncoder;h2=class extends de{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesBooleanError"});}},pf=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Cs(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesTypeError"});}},zg=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeOverflowError"});}},Lg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeExceedsPaddingSizeError"});}};});function EV(e,t={}){let{strict:r=false}=t;if(!e)throw new Fg(e);if(typeof e!="string")throw new Fg(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Hg(e);if(!e.startsWith("0x"))throw new Hg(e)}function ht(...e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function hf(e){return e instanceof Uint8Array?It(e):Array.isArray(e)?It(new Uint8Array(e)):e}function Vg(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(df(r,t.size),Ci(r,t.size)):r}function It(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=_V[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(df(o,t.size),Wo(o,t.size)):o}function Ve(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let u=typeof e=="bigint"?"n":"";throw new gp({max:i?`${i}${u}`:void 0,min:`${s}${u}`,signed:r,size:o,value:`${e}${u}`})}let c=`0x${(r&&n<0?BigInt.asUintN(o*8,BigInt(n)):n).toString(16)}`;return o?Ci(c,o):c}function gf(e,t={}){return It(wV.encode(e),t)}function Ci(e,t){return p2(e,{dir:"left",size:t})}function Wo(e,t){return p2(e,{dir:"right",size:t})}function pt(e,t,r,o={}){let{strict:n}=o;r$(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&n$(i,t,r),i}function dt(e){return Math.ceil((e.length-2)/2)}function b2(e){return o$(e,{dir:"left"})}function y2(e,t={}){let{signed:r}=t;t.size&&df(e,t.size);let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n)-1n,s=i>>1n;return o<=s?o:o-i-1n}function jg(e,t={}){let{signed:r,size:o}=t;return Number(!r&&!o?e:y2(e,t))}function yp(e,t={}){let{strict:r=false}=t;try{return EV(e,{strict:r}),!0}catch{return false}}var wV,_V,gp,Fg,Hg,Ug,mp,Mg,pr=F(()=>{pn();m2();hp();wV=new TextEncoder,_V=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));gp=class extends de{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${n*8}-bit`:""}${o?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}},Fg=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Cs(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexTypeError"});}},Hg=class extends de{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexValueError"});}},Ug=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeOverflowError"});}},mp=class extends de{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${o}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SliceOffsetOutOfBoundsError"});}},Mg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};});function p$(e){return {address:e.address,amount:Ve(e.amount),index:Ve(e.index),validatorIndex:Ve(e.validatorIndex)}}var m$=F(()=>{pr();});function Zg(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ve(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ve(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ve(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ve(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ve(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ve(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(p$)}}}var x2=F(()=>{pr();m$();});var bo,Gg,g$,qg,y$,v2,w2,_2,E2,Kn,mn=F(()=>{bo=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Gg=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],g$=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],qg=[...g$,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],y$=[...g$,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],v2=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],w2=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],_2=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],E2=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],Kn=[{type:"event",name:"Approval",inputs:[{indexed:true,name:"owner",type:"address"},{indexed:true,name:"spender",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:true,name:"from",type:"address"},{indexed:true,name:"to",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}];});var b$,x$=F(()=>{b$="0x82ad56cb";});var Wg,v$,w$,Ja,bp=F(()=>{Wg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",v$="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",w$="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Ja="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Ya,xp,Xa,Kg=F(()=>{Te();Ya=class extends L{constructor({blockNumber:t,chain:r,contract:o}){super(`Chain "${r.name}" does not support contract "${o.name}".`,{metaMessages:["This could be due to any of the following:",...t&&o.blockCreated&&o.blockCreated>t?[`- The contract "${o.name}" was not deployed until block ${o.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${o.name}" configured.`]],name:"ChainDoesNotSupportContract"});}},xp=class extends L{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"});}},Xa=class extends L{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"});}};});function vp(e){let{abi:t,args:r,bytecode:o}=e;if(!r||r.length===0)return o;let n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new P0({docsPath:S2});if(!("inputs"in n))throw new Wd({docsPath:S2});if(!n.inputs||n.inputs.length===0)throw new Wd({docsPath:S2});let i=Wr(n.inputs,r);return st([o,i])}var S2,I2=F(()=>{Et();cn();ki();S2="/docs/contract/encodeDeployData";});function Jn({blockNumber:e,chain:t,contract:r}){let o=t?.contracts?.[r];if(!o)throw new Ya({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new Ya({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address}var Qa=F(()=>{Kg();});function Jg(e,{docsPath:t,...r}){let o=(()=>{let n=Ts(e,r);return n instanceof Gn?e:n})();return new Ss(o,{docsPath:t,...r})}var A2=F(()=>{Ti();Zo();lp();});function Yg(){let e=()=>{},t=()=>{};return {promise:new Promise((o,n)=>{e=o,t=n;}),resolve:e,reject:t}}var k2=F(()=>{});function yf({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:n}){let i=async()=>{let f=c();s();let d=f.map(({args:g})=>g);d.length!==0&&e(d).then(g=>{n&&Array.isArray(g)&&g.sort(n);for(let h=0;h<f.length;h++){let{resolve:x}=f[h];x?.([g[h],g]);}}).catch(g=>{for(let h=0;h<f.length;h++){let{reject:x}=f[h];x?.(g);}});},s=()=>R2.delete(t),a=()=>c().map(({args:f})=>f),c=()=>R2.get(t)||[],u=f=>R2.set(t,[...c(),f]);return {flush:s,async schedule(f){let{promise:d,resolve:g,reject:h}=Yg();return r?.([...a(),f])&&i(),c().length>0?(u({args:f,resolve:g,reject:h}),d):(u({args:f,resolve:g,reject:h}),setTimeout(i,o),d)}}}var R2,Xg=F(()=>{k2();R2=new Map;});var Qg,ey,ty,_$=F(()=>{Pr();Te();ho();Qg=class extends L{constructor({callbackSelector:t,cause:r,data:o,extraData:n,sender:i,urls:s}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${Da(a)}`)],` Sender: ${i}`,` Data: ${o}`,` Callback selector: ${t}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"});}},ey=class extends L{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Da(r)}`,`Response: ${Be(t)}`],name:"OffchainLookupResponseMalformedError"});}},ty=class extends L{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};});function E$(e){let{abi:t,data:r}=e,o=un(r,0,4),n=t.find(i=>i.type==="function"&&o===Do(nr(i)));if(!n)throw new D0(o,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?Ri(n.inputs,un(r,4)):void 0}}var S$=F(()=>{Et();vs();hu();cp();wi();});function $2(e){let{abi:t,errorName:r,args:o}=e,n=t[0];if(r){let c=fn({abi:t,args:o,name:r});if(!c)throw new Kd(r,{docsPath:T2});n=c;}if(n.type!=="error")throw new Kd(void 0,{docsPath:T2});let i=nr(n),s=Do(i),a="0x";if(o&&o.length>0){if(!n.inputs)throw new L0(n.name,{docsPath:T2});a=Wr(n.inputs,o);}return st([s,a])}var T2,I$=F(()=>{Et();cn();hu();ki();wi();ws();T2="/docs/contract/encodeErrorResult";});function A$(e){let{abi:t,functionName:r,result:o}=e,n=t[0];if(r){let s=fn({abi:t,name:r});if(!s)throw new mo(r,{docsPath:O2});n=s;}if(n.type!=="function")throw new mo(void 0,{docsPath:O2});if(!n.outputs)throw new pu(n.name,{docsPath:O2});let i=(()=>{if(n.outputs.length===0)return [];if(n.outputs.length===1)return [o];if(Array.isArray(o))return o;throw new mu(o)})();return Wr(n.outputs,i)}var O2,k$=F(()=>{Et();ki();ws();O2="/docs/contract/encodeFunctionResult";});async function N2(e){let{data:t,ccipRequest:r}=e,{args:[o]}=E$({abi:Gg,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(zi)?await N2({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=IV(c);}})),A$({abi:Gg,functionName:"query",result:[n,i]})}function IV(e){return e.name==="HttpRequestError"&&e.status?$2({abi:Gg,errorName:"HttpError",args:[e.status,e.shortMessage]}):$2({abi:[eg],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var zi,wp=F(()=>{mn();tg();S$();I$();k$();zi="x-batch-gateway:true";});var $$={};Er($$,{ccipRequest:()=>T$,offchainLookup:()=>kV,offchainLookupAbiItem:()=>R$,offchainLookupSignature:()=>AV});async function kV(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=og({data:o,abi:[R$]}),[a,c,u,f,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:T$;try{if(!zr(i,a))throw new ty({sender:a,to:i});let x=c.includes(zi)?await N2({data:u,ccipRequest:k=>h({...k,requestOptions:n})}):await h({data:u,requestOptions:n,sender:a,urls:c}),{data:w}=await hn(e,{blockNumber:t,blockTag:r,data:Mo([f,Wr([{type:"bytes"},{type:"bytes"}],[x,d])]),requestOptions:n,to:i});return w}catch(x){throw n?.signal?.aborted?wr(n.signal):dn(x)?x:new Qg({callbackSelector:f,cause:x,data:o,extraData:d,sender:a,urls:c})}}async function T$({data:e,requestOptions:t,sender:r,urls:o}){let n=new Error("An unknown error occurred.");for(let i=0;i<o.length;i++){if(t?.signal?.aborted)throw wr(t.signal);let s=o[i],a=s.includes("{data}")?"GET":"POST",c=a==="POST"?{data:e,sender:r}:void 0,u=a==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(s.replace("{sender}",r.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:u,method:a,...t?.signal?{signal:t.signal}:{}}),d;if(f.headers.get("Content-Type")?.startsWith("application/json")?d=(await f.json()).data:d=await f.text(),!f.ok){n=new Hn({body:c,details:d?.error?Be(d.error):f.statusText,headers:f.headers,status:f.status,url:s});continue}if(!St(d)){n=new ey({result:d,url:s});continue}return d}catch(f){if(t?.signal?.aborted)throw wr(t.signal);if(dn(f))throw f;n=new Hn({body:c,details:f.message,url:s});}}throw n}var AV,R$,O$=F(()=>{zs();_$();Ha();ho();t2();ki();Ps();cn();po();wp();Pr();AV="0x556f1830",R$={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};});async function hn(e,t){let{account:r=e.account,authorizationList:o,batch:n=!!e.batch?.multicall,blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:u,blobs:f,blockOverrides:d,code:g,data:h,factory:x,factoryData:w,gas:k,gasPrice:T,maxFeePerBlobGas:P,maxFeePerGas:O,maxPriorityFeePerGas:S,nonce:N,requestOptions:z,to:C,value:D,stateOverride:q,...H}=t,Z=r?We(r):void 0;if(g&&(x||w))throw new L("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(g&&C)throw new L("Cannot provide both `code` & `to` as parameters.");let re=g&&h,I=x&&w&&C&&h,l=re||I,m=re?B$({code:g,data:h}):I?PV({data:h,factory:x,factoryData:w,to:C}):h;try{qn(t);let y=An({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),b=d?Zg(d):void 0,v=Qu(q),E=e.chain?.formatters?.transactionRequest?.format,_=(E||Go)({...$s(H,{format:E}),accessList:u,account:Z,authorizationList:o,blobs:f,data:m,gas:k,gasPrice:T,maxFeePerBlobGas:P,maxFeePerGas:O,maxPriorityFeePerGas:S,nonce:N,to:l?void 0:C,value:D},"call");if(n&&RV({request:_})&&!b&&i===void 0)try{let{deployless:G=!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},J=P$(e,{blockNumber:s,deployless:G});if(!J||!NV(v,J))return await OV(e,{..._,blockHash:i,blockNumber:s,blockTag:a,multicallAddress:J,requestOptions:z,requireCanonical:c,rpcStateOverride:v})}catch(G){if(!(G instanceof xp)&&!(G instanceof Ya))throw G}let p=(()=>{let G=[_,y];return v&&b?[...G,v,b]:v?[...G,v]:b?[...G,{},b]:G})(),A=await e.request({method:"eth_call",params:p},z);return A==="0x"?{data:void 0}:{data:A}}catch(y){if(z?.signal?.aborted)throw wr(z.signal);if(dn(y))throw y;let b=BV(y),{offchainLookup:v,offchainLookupSignature:E}=await Promise.resolve().then(()=>(O$(),$$));if(e.ccipRead!==false&&b?.slice(0,10)===E&&C)return {data:await v(e,{data:b,requestOptions:z,to:C})};throw l&&b?.slice(0,10)==="0x101bb98d"?new bg({factory:x}):Jg(y,{...t,account:Z,chain:e.chain})}}function RV({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(b$)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function $V(e){if(!e)return "default";let t=N$.get(e);if(t!==void 0)return t;let r=TV++;return N$.set(e,r),r}async function OV(e,t){let{batchSize:r=1024,deployless:o=false,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:u,multicallAddress:f,requestOptions:d,rpcStateOverride:g,to:h}=t,x=f!==void 0?f:P$(e,{blockNumber:s,deployless:o}),w=An({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),k=typeof w=="string"?w:JSON.stringify(w),T=g?`.${JSON.stringify(g)}`:"",{schedule:P}=yf({id:`${e.uid}.${k}.${$V(d)}${T}`,wait:n,shouldSplitBatch(N){return N.reduce((C,{data:D})=>C+(D.length-2),0)>r*2},fn:async N=>{let z=N.map(H=>({allowFailure:true,callData:H.data,target:H.to})),C=lt({abi:bo,args:[z],functionName:"aggregate3"}),D={...x===null?{data:B$({code:Ja,data:C})}:{to:x,data:C}},q=await e.request({method:"eth_call",params:g?[D,w,g]:[D,w]},d);return Lr({abi:bo,args:[z],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:O,success:S}]=await P({data:u,to:h});if(!S)throw new Ho({data:O});return O==="0x"?{data:void 0}:{data:O}}function P$(e,t){let{blockNumber:r,deployless:o}=t;if(o)return null;if(e.chain)return Jn({blockNumber:r,chain:e.chain,contract:"multicall3"});throw new xp}function NV(e,t){return e?Object.keys(e).some(r=>zr(r,t)):false}function B$(e){let{code:t,data:r}=e;return vp({abi:vi(["constructor(bytes, bytes)"]),bytecode:Wg,args:[t,r]})}function PV(e){let{data:t,factory:r,factoryData:o,to:n}=e;return vp({abi:vi(["constructor(address, bytes, address, bytes)"]),bytecode:v$,args:[n,t,r,o]})}function BV(e){if(!(e instanceof L))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var TV,N$,zs=F(()=>{fu();x2();ln();mn();x$();bp();Te();Kg();Ti();ho();Pi();I2();jn();Ps();qa();Qa();A2();dp();Xu();Xg();Eg();Za();TV=0,N$=new WeakMap;});var pe={};Er(pe,{$brand:()=>Mp,$input:()=>T1,$output:()=>R1,NEVER:()=>db,TimePrecision:()=>N1,ZodAny:()=>E5,ZodArray:()=>k5,ZodBase64:()=>Kv,ZodBase64URL:()=>Jv,ZodBigInt:()=>Sl,ZodBigIntFormat:()=>Qv,ZodBoolean:()=>El,ZodCIDRv4:()=>qv,ZodCIDRv6:()=>Wv,ZodCUID:()=>Dv,ZodCUID2:()=>jv,ZodCatch:()=>G5,ZodCodec:()=>uw,ZodCustom:()=>qm,ZodCustomStringFormat:()=>wl,ZodDate:()=>Vm,ZodDefault:()=>D5,ZodDiscriminatedUnion:()=>R5,ZodE164:()=>Yv,ZodEmail:()=>Lv,ZodEmoji:()=>Uv,ZodEnum:()=>xl,ZodError:()=>M3,ZodFile:()=>L5,ZodFirstPartyTypeKind:()=>fw,ZodFunction:()=>tI,ZodGUID:()=>Mm,ZodIPv4:()=>Zv,ZodIPv6:()=>Gv,ZodISODate:()=>Cm,ZodISODateTime:()=>Bm,ZodISODuration:()=>Lm,ZodISOTime:()=>zm,ZodIntersection:()=>T5,ZodIssueCode:()=>JB,ZodJWT:()=>Xv,ZodKSUID:()=>Vv,ZodLazy:()=>X5,ZodLiteral:()=>z5,ZodMap:()=>B5,ZodNaN:()=>W5,ZodNanoID:()=>Mv,ZodNever:()=>I5,ZodNonOptional:()=>aw,ZodNull:()=>w5,ZodNullable:()=>M5,ZodNumber:()=>_l,ZodNumberFormat:()=>Ec,ZodObject:()=>Gm,ZodOptional:()=>sw,ZodPipe:()=>cw,ZodPrefault:()=>F5,ZodPromise:()=>eI,ZodReadonly:()=>K5,ZodRealError:()=>Xr,ZodRecord:()=>nw,ZodSet:()=>C5,ZodString:()=>vl,ZodStringFormat:()=>et,ZodSuccess:()=>Z5,ZodSymbol:()=>x5,ZodTemplateLiteral:()=>Y5,ZodTransform:()=>U5,ZodTuple:()=>O5,ZodType:()=>ke,ZodULID:()=>Fv,ZodURL:()=>Hm,ZodUUID:()=>ti,ZodUndefined:()=>v5,ZodUnion:()=>tw,ZodUnknown:()=>S5,ZodVoid:()=>A5,ZodXID:()=>Hv,_ZodString:()=>zv,_default:()=>j5,_function:()=>HB,any:()=>EB,array:()=>Zm,base64:()=>sB,base64url:()=>aB,bigint:()=>bB,boolean:()=>b5,catch:()=>q5,check:()=>VB,cidrv4:()=>oB,cidrv6:()=>iB,clone:()=>Mr,codec:()=>DB,coerce:()=>lw,config:()=>wt,core:()=>ei,cuid:()=>Y3,cuid2:()=>X3,custom:()=>ZB,date:()=>IB,decode:()=>kv,decodeAsync:()=>Tv,discriminatedUnion:()=>$B,e164:()=>cB,email:()=>j3,emoji:()=>K3,encode:()=>Av,encodeAsync:()=>Rv,endsWith:()=>dl,enum:()=>ow,file:()=>zB,flattenError:()=>Wf,float32:()=>mB,float64:()=>hB,formatError:()=>Kf,function:()=>HB,getErrorMap:()=>XB,globalRegistry:()=>vo,gt:()=>Xo,gte:()=>Yr,guid:()=>F3,hash:()=>pB,hex:()=>dB,hostname:()=>lB,httpUrl:()=>W3,includes:()=>fl,instanceof:()=>GB,int:()=>Cv,int32:()=>gB,int64:()=>xB,intersection:()=>$5,ipv4:()=>rB,ipv6:()=>nB,iso:()=>Um,json:()=>WB,jwt:()=>uB,keyof:()=>AB,ksuid:()=>tB,lazy:()=>Q5,length:()=>vc,literal:()=>CB,locales:()=>nl,looseObject:()=>TB,lowercase:()=>cl,lt:()=>Yo,lte:()=>Tn,map:()=>NB,maxLength:()=>xc,maxSize:()=>bc,mime:()=>pl,minLength:()=>qi,minSize:()=>Ws,multipleOf:()=>qs,nan:()=>MB,nanoid:()=>J3,nativeEnum:()=>BB,negative:()=>av,never:()=>ew,nonnegative:()=>uv,nonoptional:()=>V5,nonpositive:()=>cv,normalize:()=>ml,null:()=>_5,nullable:()=>jm,nullish:()=>LB,number:()=>y5,object:()=>kB,optional:()=>Dm,overwrite:()=>Qo,parse:()=>_v,parseAsync:()=>Ev,partialRecord:()=>OB,pipe:()=>Fm,positive:()=>sv,prefault:()=>H5,preprocess:()=>KB,prettifyError:()=>Eb,promise:()=>FB,property:()=>fv,readonly:()=>J5,record:()=>P5,refine:()=>rI,regex:()=>al,regexes:()=>Rn,registry:()=>pm,safeDecode:()=>Ov,safeDecodeAsync:()=>Pv,safeEncode:()=>$v,safeEncodeAsync:()=>Nv,safeParse:()=>Sv,safeParseAsync:()=>Iv,set:()=>PB,setErrorMap:()=>YB,size:()=>sl,startsWith:()=>ll,strictObject:()=>RB,string:()=>Bv,stringFormat:()=>fB,stringbool:()=>qB,success:()=>UB,superRefine:()=>nI,symbol:()=>wB,templateLiteral:()=>jB,toJSONSchema:()=>yv,toLowerCase:()=>gl,toUpperCase:()=>yl,transform:()=>iw,treeifyError:()=>_b,trim:()=>hl,tuple:()=>N5,uint32:()=>yB,uint64:()=>vB,ulid:()=>Q3,undefined:()=>_B,union:()=>rw,unknown:()=>_c,uppercase:()=>ul,url:()=>q3,util:()=>te,uuid:()=>H3,uuidv4:()=>V3,uuidv6:()=>Z3,uuidv7:()=>G3,void:()=>SB,xid:()=>eB});var ei={};Er(ei,{$ZodAny:()=>Yx,$ZodArray:()=>r1,$ZodAsyncError:()=>Xn,$ZodBase64:()=>jx,$ZodBase64URL:()=>Fx,$ZodBigInt:()=>am,$ZodBigIntFormat:()=>qx,$ZodBoolean:()=>Qf,$ZodCIDRv4:()=>Ux,$ZodCIDRv6:()=>Mx,$ZodCUID:()=>kx,$ZodCUID2:()=>Rx,$ZodCatch:()=>x1,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>nx,$ZodCheckEndsWith:()=>hx,$ZodCheckGreaterThan:()=>em,$ZodCheckIncludes:()=>px,$ZodCheckLengthEquals:()=>ux,$ZodCheckLessThan:()=>Qp,$ZodCheckLowerCase:()=>lx,$ZodCheckMaxLength:()=>ax,$ZodCheckMaxSize:()=>ox,$ZodCheckMimeType:()=>yx,$ZodCheckMinLength:()=>cx,$ZodCheckMinSize:()=>ix,$ZodCheckMultipleOf:()=>tx,$ZodCheckNumberFormat:()=>rx,$ZodCheckOverwrite:()=>bx,$ZodCheckProperty:()=>gx,$ZodCheckRegex:()=>fx,$ZodCheckSizeEquals:()=>sx,$ZodCheckStartsWith:()=>mx,$ZodCheckStringFormat:()=>gc,$ZodCheckUpperCase:()=>dx,$ZodCodec:()=>el,$ZodCustom:()=>k1,$ZodCustomStringFormat:()=>Zx,$ZodDate:()=>t1,$ZodDefault:()=>h1,$ZodDiscriminatedUnion:()=>o1,$ZodE164:()=>Hx,$ZodEmail:()=>Ex,$ZodEmoji:()=>Ix,$ZodEncodeError:()=>ji,$ZodEnum:()=>u1,$ZodError:()=>qf,$ZodFile:()=>l1,$ZodFunction:()=>S1,$ZodGUID:()=>wx,$ZodIPv4:()=>zx,$ZodIPv6:()=>Lx,$ZodISODate:()=>Px,$ZodISODateTime:()=>Nx,$ZodISODuration:()=>Cx,$ZodISOTime:()=>Bx,$ZodIntersection:()=>i1,$ZodJWT:()=>Vx,$ZodKSUID:()=>Ox,$ZodLazy:()=>A1,$ZodLiteral:()=>f1,$ZodMap:()=>a1,$ZodNaN:()=>v1,$ZodNanoID:()=>Ax,$ZodNever:()=>Qx,$ZodNonOptional:()=>y1,$ZodNull:()=>Jx,$ZodNullable:()=>m1,$ZodNumber:()=>sm,$ZodNumberFormat:()=>Gx,$ZodObject:()=>xS,$ZodObjectJIT:()=>n1,$ZodOptional:()=>p1,$ZodPipe:()=>w1,$ZodPrefault:()=>g1,$ZodPromise:()=>I1,$ZodReadonly:()=>_1,$ZodRealError:()=>Jr,$ZodRecord:()=>s1,$ZodRegistry:()=>yc,$ZodSet:()=>c1,$ZodString:()=>Gs,$ZodStringFormat:()=>Xe,$ZodSuccess:()=>b1,$ZodSymbol:()=>Wx,$ZodTemplateLiteral:()=>E1,$ZodTransform:()=>d1,$ZodTuple:()=>um,$ZodType:()=>we,$ZodULID:()=>Tx,$ZodURL:()=>Sx,$ZodUUID:()=>_x,$ZodUndefined:()=>Kx,$ZodUnion:()=>cm,$ZodUnknown:()=>Xx,$ZodVoid:()=>e1,$ZodXID:()=>$x,$brand:()=>Mp,$constructor:()=>B,$input:()=>T1,$output:()=>R1,Doc:()=>Xf,JSONSchema:()=>m5,JSONSchemaGenerator:()=>bl,NEVER:()=>db,TimePrecision:()=>N1,_any:()=>Q1,_array:()=>lv,_base64:()=>$m,_base64url:()=>Om,_bigint:()=>G1,_boolean:()=>V1,_catch:()=>N3,_check:()=>p5,_cidrv4:()=>Rm,_cidrv6:()=>Tm,_coercedBigint:()=>q1,_coercedBoolean:()=>Z1,_coercedDate:()=>ov,_coercedNumber:()=>U1,_coercedString:()=>O1,_cuid:()=>wm,_cuid2:()=>_m,_custom:()=>pv,_date:()=>nv,_decode:()=>Zp,_decodeAsync:()=>qp,_default:()=>T3,_discriminatedUnion:()=>y3,_e164:()=>Nm,_email:()=>mm,_emoji:()=>xm,_encode:()=>Vp,_encodeAsync:()=>Gp,_endsWith:()=>dl,_enum:()=>E3,_file:()=>dv,_float32:()=>D1,_float64:()=>j1,_gt:()=>Xo,_gte:()=>Yr,_guid:()=>ol,_includes:()=>fl,_int:()=>M1,_int32:()=>F1,_int64:()=>W1,_intersection:()=>b3,_ipv4:()=>Am,_ipv6:()=>km,_isoDate:()=>B1,_isoDateTime:()=>P1,_isoDuration:()=>z1,_isoTime:()=>C1,_jwt:()=>Pm,_ksuid:()=>Im,_lazy:()=>z3,_length:()=>vc,_literal:()=>I3,_lowercase:()=>cl,_lt:()=>Yo,_lte:()=>Tn,_map:()=>w3,_max:()=>Tn,_maxLength:()=>xc,_maxSize:()=>bc,_mime:()=>pl,_min:()=>Yr,_minLength:()=>qi,_minSize:()=>Ws,_multipleOf:()=>qs,_nan:()=>iv,_nanoid:()=>vm,_nativeEnum:()=>S3,_negative:()=>av,_never:()=>tv,_nonnegative:()=>uv,_nonoptional:()=>$3,_nonpositive:()=>cv,_normalize:()=>ml,_null:()=>X1,_nullable:()=>R3,_number:()=>L1,_optional:()=>k3,_overwrite:()=>Qo,_parse:()=>dc,_parseAsync:()=>pc,_pipe:()=>P3,_positive:()=>sv,_promise:()=>L3,_property:()=>fv,_readonly:()=>B3,_record:()=>v3,_refine:()=>mv,_regex:()=>al,_safeDecode:()=>Kp,_safeDecodeAsync:()=>Yp,_safeEncode:()=>Wp,_safeEncodeAsync:()=>Jp,_safeParse:()=>mc,_safeParseAsync:()=>hc,_set:()=>_3,_size:()=>sl,_startsWith:()=>ll,_string:()=>$1,_stringFormat:()=>wc,_stringbool:()=>gv,_success:()=>O3,_superRefine:()=>hv,_symbol:()=>J1,_templateLiteral:()=>C3,_toLowerCase:()=>gl,_toUpperCase:()=>yl,_transform:()=>A3,_trim:()=>hl,_tuple:()=>x3,_uint32:()=>H1,_uint64:()=>K1,_ulid:()=>Em,_undefined:()=>Y1,_union:()=>g3,_unknown:()=>ev,_uppercase:()=>ul,_url:()=>il,_uuid:()=>hm,_uuidv4:()=>gm,_uuidv6:()=>ym,_uuidv7:()=>bm,_void:()=>rv,_xid:()=>Sm,clone:()=>Mr,config:()=>wt,decode:()=>UN,decodeAsync:()=>DN,encode:()=>LN,encodeAsync:()=>MN,flattenError:()=>Wf,formatError:()=>Kf,globalConfig:()=>Df,globalRegistry:()=>vo,isValidBase64:()=>Dx,isValidBase64URL:()=>hS,isValidJWT:()=>gS,locales:()=>nl,parse:()=>Fp,parseAsync:()=>Hp,prettifyError:()=>Eb,regexes:()=>Rn,registry:()=>pm,safeDecode:()=>FN,safeDecodeAsync:()=>VN,safeEncode:()=>jN,safeEncodeAsync:()=>HN,safeParse:()=>Sb,safeParseAsync:()=>Ib,toDotPath:()=>XE,toJSONSchema:()=>yv,treeifyError:()=>_b,util:()=>te,version:()=>xx});var db=Object.freeze({status:"aborted"});function B(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:false}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let f in s.prototype)f in a||Object.defineProperty(a,f,{value:s.prototype[f].bind(a)});a._zod.constr=s,a._zod.def=c;}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let f of u._zod.deferred)f();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Mp=Symbol("zod_brand"),Xn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},ji=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},Df={};function wt(e){return e&&Object.assign(Df,e),Df}var te={};Er(te,{BIGINT_FORMAT_RANGES:()=>wb,Class:()=>mb,NUMBER_FORMAT_RANGES:()=>vb,aborted:()=>Gi,allowsEval:()=>gb,assert:()=>hN,assertEqual:()=>lN,assertIs:()=>pN,assertNever:()=>mN,assertNotEqual:()=>dN,assignProp:()=>Hi,base64ToUint8Array:()=>KE,base64urlToUint8Array:()=>NN,cached:()=>fc,captureStackTrace:()=>jp,cleanEnum:()=>ON,cleanRegex:()=>Hf,clone:()=>Mr,cloneDef:()=>yN,createTransparentProxy:()=>EN,defineLazy:()=>Oe,esc:()=>Dp,escapeRegex:()=>xo,extend:()=>AN,finalizeIssue:()=>yn,floatSafeRemainder:()=>hb,getElementAtPath:()=>bN,getEnumValues:()=>Ff,getLengthableOrigin:()=>Gf,getParsedType:()=>_N,getSizableOrigin:()=>Zf,hexToUint8Array:()=>BN,isObject:()=>Vs,isPlainObject:()=>Zi,issue:()=>lc,joinValues:()=>j,jsonStringifyReplacer:()=>uc,merge:()=>RN,mergeDefs:()=>Vi,normalizeParams:()=>ee,nullish:()=>Fi,numKeys:()=>wN,objectClone:()=>gN,omit:()=>IN,optionalKeys:()=>xb,partial:()=>TN,pick:()=>SN,prefixIssues:()=>gn,primitiveTypes:()=>bb,promiseAllObject:()=>xN,propertyKeyTypes:()=>Vf,randomString:()=>vN,required:()=>$N,safeExtend:()=>kN,shallowClone:()=>yb,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>JE,uint8ArrayToBase64url:()=>PN,uint8ArrayToHex:()=>CN,unwrapMessage:()=>jf});function lN(e){return e}function dN(e){return e}function pN(e){}function mN(e){throw new Error}function hN(e){}function Ff(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function j(e,t="|"){return e.map(r=>X(r)).join(t)}function uc(e,t){return typeof t=="bigint"?t.toString():t}function fc(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Fi(e){return e==null}function Hf(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function hb(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]));}let i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}var WE=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==WE)return o===void 0&&(o=WE,o=r()),o},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function gN(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Hi(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function Vi(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o);}return Object.defineProperties({},t)}function yN(e){return Vi(e._zod.def)}function bN(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function xN(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function vN(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Dp(e){return JSON.stringify(e)}var jp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var gb=fc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Zi(e){if(Vs(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(Vs(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function yb(e){return Zi(e)?{...e}:Array.isArray(e)?[...e]:e}function wN(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var _N=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Vf=new Set(["string","number","symbol"]),bb=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mr(e,t,r){let o=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(o._zod.parent=e),o}function ee(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function EN(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function X(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function xb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var vb={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]},wb={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function SN(e,t){let r=e._zod.def,o=Vi(e._zod.def,{get shape(){let n={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(n[i]=r.shape[i]);}return Hi(this,"shape",n),n},checks:[]});return Mr(e,o)}function IN(e,t){let r=e._zod.def,o=Vi(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete n[i];}return Hi(this,"shape",n),n},checks:[]});return Mr(e,o)}function AN(e,t){if(!Zi(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let n=Vi(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Hi(this,"shape",i),i},checks:[]});return Mr(e,n)}function kN(e,t){if(!Zi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return Hi(this,"shape",o),o},checks:e._zod.def.checks};return Mr(e,r)}function RN(e,t){let r=Vi(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Hi(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Mr(e,r)}function TN(e,t,r){let o=Vi(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:n[s]}):n[s]);}else for(let s in n)i[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Hi(this,"shape",i),i},checks:[]});return Mr(t,o)}function $N(e,t,r){let o=Vi(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}));}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Hi(this,"shape",i),i},checks:[]});return Mr(t,o)}function Gi(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function gn(e,t){return t.map(r=>{var o;return (o=r).path??(o.path=[]),r.path.unshift(e),r})}function jf(e){return typeof e=="string"?e:e?.message}function yn(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=jf(e.inst?._zod.def?.error?.(e))??jf(t?.error?.(e))??jf(r.customError?.(e))??jf(r.localeError?.(e))??"Invalid input";o.message=n;}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Zf(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Gf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function lc(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function ON(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function KE(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function JE(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function NN(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return KE(t+r)}function PN(e){return JE(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function BN(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function CN(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var mb=class{constructor(...t){}};var YE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,uc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},qf=B("$ZodError",YE),Jr=B("$ZodError",YE,{Parent:Error});function Wf(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return {formErrors:o,fieldErrors:r}}function Kf(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else {let s=r,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++;}}};return o(e),r}function _b(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let f=r,d=0;for(;d<u.length;){let g=u[d],h=d===u.length-1;typeof g=="string"?(f.properties??(f.properties={}),(s=f.properties)[g]??(s[g]={errors:[]}),f=f.properties[g]):(f.items??(f.items=[]),(a=f.items)[g]??(a[g]={errors:[]}),f=f.items[g]),h&&f.errors.push(t(c)),d++;}}};return o(e),r}function XE(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Eb(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${XE(o.path)}`);return t.join(`
41
+ `)}var dc=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:false}):{async:false},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Xn;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>yn(c,i,wt())));throw jp(a,n?.callee),a}return s.value},Fp=dc(Jr),pc=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:true}):{async:true},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>yn(c,i,wt())));throw jp(a,n?.callee),a}return s.value},Hp=pc(Jr),mc=e=>(t,r,o)=>{let n=o?{...o,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Xn;return i.issues.length?{success:false,error:new(e??qf)(i.issues.map(s=>yn(s,n,wt())))}:{success:true,data:i.value}},Sb=mc(Jr),hc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:true}):{async:true},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>yn(s,n,wt())))}:{success:true,data:i.value}},Ib=hc(Jr),Vp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return dc(e)(t,r,n)},LN=Vp(Jr),Zp=e=>(t,r,o)=>dc(e)(t,r,o),UN=Zp(Jr),Gp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return pc(e)(t,r,n)},MN=Gp(Jr),qp=e=>async(t,r,o)=>pc(e)(t,r,o),DN=qp(Jr),Wp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return mc(e)(t,r,n)},jN=Wp(Jr),Kp=e=>(t,r,o)=>mc(e)(t,r,o),FN=Kp(Jr),Jp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return hc(e)(t,r,n)},HN=Jp(Jr),Yp=e=>async(t,r,o)=>hc(e)(t,r,o),VN=Yp(Jr);var Rn={};Er(Rn,{base64:()=>Db,base64url:()=>Xp,bigint:()=>qb,boolean:()=>Jb,browserEmail:()=>XN,cidrv4:()=>Ub,cidrv6:()=>Mb,cuid:()=>Ab,cuid2:()=>kb,date:()=>Hb,datetime:()=>Zb,domain:()=>eP,duration:()=>Nb,e164:()=>Fb,email:()=>Bb,emoji:()=>Cb,extendedDuration:()=>ZN,guid:()=>Pb,hex:()=>tP,hostname:()=>jb,html5Email:()=>KN,idnEmail:()=>YN,integer:()=>Wb,ipv4:()=>zb,ipv6:()=>Lb,ksuid:()=>$b,lowercase:()=>Qb,md5_base64:()=>nP,md5_base64url:()=>oP,md5_hex:()=>rP,nanoid:()=>Ob,null:()=>Yb,number:()=>Kb,rfc5322Email:()=>JN,sha1_base64:()=>sP,sha1_base64url:()=>aP,sha1_hex:()=>iP,sha256_base64:()=>uP,sha256_base64url:()=>fP,sha256_hex:()=>cP,sha384_base64:()=>dP,sha384_base64url:()=>pP,sha384_hex:()=>lP,sha512_base64:()=>hP,sha512_base64url:()=>gP,sha512_hex:()=>mP,string:()=>Gb,time:()=>Vb,ulid:()=>Rb,undefined:()=>Xb,unicodeEmail:()=>QE,uppercase:()=>ex,uuid:()=>Zs,uuid4:()=>GN,uuid6:()=>qN,uuid7:()=>WN,xid:()=>Tb});var Ab=/^[cC][^\s-]{8,}$/,kb=/^[0-9a-z]+$/,Rb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tb=/^[0-9a-vA-V]{20}$/,$b=/^[A-Za-z0-9]{27}$/,Ob=/^[a-zA-Z0-9_-]{21}$/,Nb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ZN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Pb=/^([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})$/,Zs=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)$/,GN=Zs(4),qN=Zs(6),WN=Zs(7),Bb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,KN=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,JN=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,QE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,YN=QE,XN=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,QN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Cb(){return new RegExp(QN,"u")}var zb=/^(?:(?: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])$/,Lb=/^(([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}|:))$/,Ub=/^((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])$/,Mb=/^(([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])$/,Db=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xp=/^[A-Za-z0-9_-]*$/,jb=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,eP=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Fb=/^\+(?:[0-9]){6,14}[0-9]$/,eS="(?:(?:\\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])))",Hb=new RegExp(`^${eS}$`);function tS(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vb(e){return new RegExp(`^${tS(e)}$`)}function Zb(e){let t=tS({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${eS}T(?:${o})$`)}var Gb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},qb=/^-?\d+n?$/,Wb=/^-?\d+$/,Kb=/^-?\d+(?:\.\d+)?/,Jb=/^(?:true|false)$/i,Yb=/^null$/i;var Xb=/^undefined$/i;var Qb=/^[^A-Z]*$/,ex=/^[^a-z]*$/,tP=/^[0-9a-fA-F]*$/;function Jf(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Yf(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var rP=/^[0-9a-fA-F]{32}$/,nP=Jf(22,"=="),oP=Yf(22),iP=/^[0-9a-fA-F]{40}$/,sP=Jf(27,"="),aP=Yf(27),cP=/^[0-9a-fA-F]{64}$/,uP=Jf(43,"="),fP=Yf(43),lP=/^[0-9a-fA-F]{96}$/,dP=Jf(64,""),pP=Yf(64),mP=/^[0-9a-fA-F]{128}$/,hP=Jf(86,"=="),gP=Yf(86);var ot=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),nS={number:"number",bigint:"bigint",object:"date"},Qp=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=nS[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),em=B("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=nS[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),tx=B("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):hb(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),rx=B("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=vb[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Wb);}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){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:o,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:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e});};}),nx=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=wb[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o;}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e});};}),ox=B("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Fi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Zf(n),code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ix=B("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Fi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Zf(n),code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),sx=B("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Fi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size;}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Zf(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),ax=B("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Fi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=Gf(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),cx=B("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Fi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=Gf(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ux=B("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Fi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length;}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=Gf(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),gc=B("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.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});}):(o=e._zod).check??(o.check=()=>{});}),fx=B("$ZodCheckRegex",(e,t)=>{gc.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),lx=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qb),gc.init(e,t);}),dx=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ex),gc.init(e,t);}),px=B("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);let r=xo(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),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});};}),mx=B("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`^${xo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),hx=B("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`.*${xo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function rS(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues));}var gx=B("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>rS(n,r,t.property));rS(o,r,t.property);};}),yx=B("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),bx=B("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var Xf=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
42
42
  `).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s);}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
43
- `))}};var mx={major:4,minor:1,patch:12};var we=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mx;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let n=(s,a,c)=>{let u=Zi(s),f;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let g=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&c?.async===false)throw new Yn;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(u||(u=Zi(s,g)));});else {if(s.issues.length===g)continue;u||(u=Zi(s,g));}}return f?f.then(()=>s):s},i=(s,a,c)=>{if(Zi(s))return s.aborted=true,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===false)throw new Yn;return u.then(f=>e._zod.parse(f,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(f=>i(f,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new Yn;return c.then(u=>n(u,o,a))}return n(c,o,a)};}e["~standard"]={validate:n=>{try{let i=xb(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return vb(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1};}),Hs=B("$ZodString",(e,t)=>{we.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??jb(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),Xe=B("$ZodStringFormat",(e,t)=>{pc.init(e,t),Hs.init(e,t);}),gx=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Rb),Xe.init(e,t);}),yx=B("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Fs(o));}else t.pattern??(t.pattern=Fs());Xe.init(e,t);}),bx=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Tb),Xe.init(e,t);}),xx=B("$ZodURL",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:zb.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),vx=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$b()),Xe.init(e,t);}),wx=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ab),Xe.init(e,t);}),_x=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=wb),Xe.init(e,t);}),Ex=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_b),Xe.init(e,t);}),Sx=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Eb),Xe.init(e,t);}),Ix=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Sb),Xe.init(e,t);}),Ax=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ib),Xe.init(e,t);}),kx=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Db(t)),Xe.init(e,t);}),Rx=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ub),Xe.init(e,t);}),Tx=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Mb(t)),Xe.init(e,t);}),$x=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=kb),Xe.init(e,t);}),Ox=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ob),Xe.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),Nx=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Nb),Xe.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6";}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),Px=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Pb),Xe.init(e,t);}),Bx=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Bb),Xe.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function Cx(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var zx=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Cb),Xe.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Cx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function dS(e){if(!Kp.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Cx(r)}var Lx=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Kp),Xe.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{dS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Ux=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Lb),Xe.init(e,t);});function pS(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[o]=r;if(!o)return !1;let n=JSON.parse(atob(o));return !("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return false}}var Mx=B("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{pS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Dx=B("$ZodCustomStringFormat",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),nm=B("$ZodNumber",(e,t)=>{we.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r};}),jx=B("$ZodNumber",(e,t)=>{Yb.init(e,t),nm.init(e,t);}),Wf=B("$ZodBoolean",(e,t)=>{we.init(e,t),e._zod.pattern=Zb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r};}),om=B("$ZodBigInt",(e,t)=>{we.init(e,t),e._zod.pattern=Fb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),Fx=B("$ZodBigInt",(e,t)=>{Xb.init(e,t),om.init(e,t);}),Hx=B("$ZodSymbol",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r};}),Vx=B("$ZodUndefined",(e,t)=>{we.init(e,t),e._zod.pattern=qb,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r};}),Zx=B("$ZodNull",(e,t)=>{we.init(e,t),e._zod.pattern=Gb,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r};}),Gx=B("$ZodAny",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),qx=B("$ZodUnknown",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Wx=B("$ZodNever",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),Kx=B("$ZodVoid",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r};}),Jx=B("$ZodDate",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r};});function rS(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues)),t.value[r]=e.value;}var Yx=B("$ZodArray",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>rS(u,r,s))):rS(c,r,s);}return i.length?Promise.all(i).then(()=>r):r};});function rm(e,t,r,o){e.issues.length&&t.issues.push(...gn(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value;}function mS(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=mb(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function hS(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type;for(let f of Object.keys(t)){if(a.has(f))continue;if(u==="never"){s.push(f);continue}let d=c.run({value:t[f],issues:[]},o);d instanceof Promise?e.push(d.then(g=>rm(g,r,f,t))):rm(d,r,f,t);}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var gS=B("$ZodObject",(e,t)=>{if(we.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=ac(()=>mS(t));Oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let f=a[u]._zod;if(f.values){c[u]??(c[u]=new Set);for(let d of f.values)c[u].add(d);}}return c});let n=js,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let f=[],d=s.shape;for(let g of s.keys){let v=d[g]._zod.run({value:u[g],issues:[]},c);v instanceof Promise?f.push(v.then(E=>rm(E,a,g,u))):rm(v,a,g,u);}return i?hS(f,u,a,c,o.value,e):f.length?Promise.all(f).then(()=>a):a};}),Xx=B("$ZodObjectJIT",(e,t)=>{gS.init(e,t);let r=e._zod.parse,o=ac(()=>mS(t)),n=g=>{let h=new qf(["shape","payload","ctx"]),v=o.value,E=O=>{let I=Lp(O);return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};h.write("const input = payload.value;");let R=Object.create(null),$=0;for(let O of v.keys)R[O]=`key_${$++}`;h.write("const newResult = {};");for(let O of v.keys){let I=R[O],P=Lp(O);h.write(`const ${I} = ${E(O)};`),h.write(`
44
- if (${I}.issues.length) {
45
- payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
43
+ `))}};var xx={major:4,minor:1,patch:12};var we=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xx;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let n=(s,a,c)=>{let u=Gi(s),f;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let g=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&c?.async===false)throw new Xn;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(u||(u=Gi(s,g)));});else {if(s.issues.length===g)continue;u||(u=Gi(s,g));}}return f?f.then(()=>s):s},i=(s,a,c)=>{if(Gi(s))return s.aborted=true,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===false)throw new Xn;return u.then(f=>e._zod.parse(f,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(f=>i(f,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new Xn;return c.then(u=>n(u,o,a))}return n(c,o,a)};}e["~standard"]={validate:n=>{try{let i=Sb(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ib(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1};}),Gs=B("$ZodString",(e,t)=>{we.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Gb(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),Xe=B("$ZodStringFormat",(e,t)=>{gc.init(e,t),Gs.init(e,t);}),wx=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Pb),Xe.init(e,t);}),_x=B("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zs(o));}else t.pattern??(t.pattern=Zs());Xe.init(e,t);}),Ex=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Bb),Xe.init(e,t);}),Sx=B("$ZodURL",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:jb.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),Ix=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Cb()),Xe.init(e,t);}),Ax=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ob),Xe.init(e,t);}),kx=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ab),Xe.init(e,t);}),Rx=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=kb),Xe.init(e,t);}),Tx=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Rb),Xe.init(e,t);}),$x=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Tb),Xe.init(e,t);}),Ox=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=$b),Xe.init(e,t);}),Nx=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Zb(t)),Xe.init(e,t);}),Px=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Hb),Xe.init(e,t);}),Bx=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Vb(t)),Xe.init(e,t);}),Cx=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Nb),Xe.init(e,t);}),zx=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zb),Xe.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),Lx=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Lb),Xe.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6";}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),Ux=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ub),Xe.init(e,t);}),Mx=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Mb),Xe.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function Dx(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var jx=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Db),Xe.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Dx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function hS(e){if(!Xp.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Dx(r)}var Fx=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Xp),Xe.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{hS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Hx=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Fb),Xe.init(e,t);});function gS(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[o]=r;if(!o)return !1;let n=JSON.parse(atob(o));return !("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return false}}var Vx=B("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{gS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Zx=B("$ZodCustomStringFormat",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),sm=B("$ZodNumber",(e,t)=>{we.init(e,t),e._zod.pattern=e._zod.bag.pattern??Kb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r};}),Gx=B("$ZodNumber",(e,t)=>{rx.init(e,t),sm.init(e,t);}),Qf=B("$ZodBoolean",(e,t)=>{we.init(e,t),e._zod.pattern=Jb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r};}),am=B("$ZodBigInt",(e,t)=>{we.init(e,t),e._zod.pattern=qb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),qx=B("$ZodBigInt",(e,t)=>{nx.init(e,t),am.init(e,t);}),Wx=B("$ZodSymbol",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r};}),Kx=B("$ZodUndefined",(e,t)=>{we.init(e,t),e._zod.pattern=Xb,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r};}),Jx=B("$ZodNull",(e,t)=>{we.init(e,t),e._zod.pattern=Yb,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r};}),Yx=B("$ZodAny",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Xx=B("$ZodUnknown",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Qx=B("$ZodNever",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),e1=B("$ZodVoid",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r};}),t1=B("$ZodDate",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r};});function iS(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues)),t.value[r]=e.value;}var r1=B("$ZodArray",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>iS(u,r,s))):iS(c,r,s);}return i.length?Promise.all(i).then(()=>r):r};});function im(e,t,r,o){e.issues.length&&t.issues.push(...gn(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value;}function yS(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=xb(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function bS(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type;for(let f of Object.keys(t)){if(a.has(f))continue;if(u==="never"){s.push(f);continue}let d=c.run({value:t[f],issues:[]},o);d instanceof Promise?e.push(d.then(g=>im(g,r,f,t))):im(d,r,f,t);}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var xS=B("$ZodObject",(e,t)=>{if(we.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=fc(()=>yS(t));Oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let f=a[u]._zod;if(f.values){c[u]??(c[u]=new Set);for(let d of f.values)c[u].add(d);}}return c});let n=Vs,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let f=[],d=s.shape;for(let g of s.keys){let x=d[g]._zod.run({value:u[g],issues:[]},c);x instanceof Promise?f.push(x.then(w=>im(w,a,g,u))):im(x,a,g,u);}return i?bS(f,u,a,c,o.value,e):f.length?Promise.all(f).then(()=>a):a};}),n1=B("$ZodObjectJIT",(e,t)=>{xS.init(e,t);let r=e._zod.parse,o=fc(()=>yS(t)),n=g=>{let h=new Xf(["shape","payload","ctx"]),x=o.value,w=O=>{let S=Dp(O);return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};h.write("const input = payload.value;");let k=Object.create(null),T=0;for(let O of x.keys)k[O]=`key_${T++}`;h.write("const newResult = {};");for(let O of x.keys){let S=k[O],N=Dp(O);h.write(`const ${S} = ${w(O)};`),h.write(`
44
+ if (${S}.issues.length) {
45
+ payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
46
46
  ...iss,
47
- path: iss.path ? [${P}, ...iss.path] : [${P}]
47
+ path: iss.path ? [${N}, ...iss.path] : [${N}]
48
48
  })));
49
49
  }
50
50
 
51
51
 
52
- if (${I}.value === undefined) {
53
- if (${P} in input) {
54
- newResult[${P}] = undefined;
52
+ if (${S}.value === undefined) {
53
+ if (${N} in input) {
54
+ newResult[${N}] = undefined;
55
55
  }
56
56
  } else {
57
- newResult[${P}] = ${I}.value;
57
+ newResult[${N}] = ${S}.value;
58
58
  }
59
59
 
60
- `);}h.write("payload.value = newResult;"),h.write("return payload;");let N=h.compile();return (O,I)=>N(g,O,I)},i,s=js,a=!Cf.jitless,u=a&&lb.value,f=t.catchall,d;e._zod.parse=(g,h)=>{d??(d=o.value);let v=g.value;return s(v)?a&&u&&h?.async===false&&h.jitless!==true?(i||(i=n(t.shape)),g=i(g,h),f?hS([],v,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),g)};});function nS(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Zi(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>yn(s,o,wt())))}),t)}var im=B("$ZodUnion",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Uf(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=false,a=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=true;else {if(u.issues.length===0)return u;a.push(u);}}return s?Promise.all(a).then(c=>nS(c,n,e,i)):nS(a,n,e,i)};}),Qx=B("$ZodDiscriminatedUnion",(e,t)=>{im.init(e,t);let r=e._zod.parse;Oe(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u);}}return n});let o=ac(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!js(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)};}),e1=B("$ZodIntersection",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>oS(r,c,u)):oS(r,i,s)};});function hx(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(Vi(e)&&Vi(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=hx(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data;}return {valid:true,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=hx(n,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function oS(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Zi(e))return e;let o=hx(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var sm=B("$ZodTuple",(e,t)=>{we.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,f=s.length<o-1;if(u||f)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:e,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let f=u._zod.run({value:s[c],issues:[]},i);f instanceof Promise?a.push(f.then(d=>Xp(d,n,c))):Xp(f,n,c);}if(t.rest){let u=s.slice(r.length);for(let f of u){c++;let d=t.rest._zod.run({value:f,issues:[]},i);d instanceof Promise?a.push(d.then(g=>Xp(g,n,c))):Xp(d,n,c);}}return a.length?Promise.all(a).then(()=>n):n};});function Xp(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues)),t.value[r]=e.value;}var t1=B("$ZodRecord",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Vi(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&r.issues.push(...gn(c,f.issues)),r.value[c]=f.value;})):(u.issues.length&&r.issues.push(...gn(c,u.issues)),r.value[c]=u.value);}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a});}else {r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>yn(u,o,wt())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...gn(s,u.issues)),r.value[a.value]=u.value;})):(c.issues.length&&r.issues.push(...gn(s,c.issues)),r.value[a.value]=c.value);}}return i.length?Promise.all(i).then(()=>r):r};}),r1=B("$ZodMap",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([f,d])=>{iS(f,d,r,s,n,e,o);})):iS(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function iS(e,t,r,o,n,i,s){e.issues.length&&(Mf.has(typeof o)?r.issues.push(...gn(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(a=>yn(a,s,wt()))})),t.issues.length&&(Mf.has(typeof o)?r.issues.push(...gn(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>yn(a,s,wt()))})),r.value.set(e.value,t.value);}var n1=B("$ZodSet",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>sS(c,r))):sS(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function sS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var o1=B("$ZodEnum",(e,t)=>{we.init(e,t);let r=Lf(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Mf.has(typeof n)).map(n=>typeof n=="string"?xo(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n};}),i1=B("$ZodLiteral",(e,t)=>{if(we.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?xo(r):r?xo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r};}),s1=B("$ZodFile",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r};}),a1=B("$ZodTransform",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Di(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return (n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Yn;return r.value=n,r};});function aS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var c1=B("$ZodOptional",(e,t)=>{we.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>aS(i,r.value)):aS(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),u1=B("$ZodNullable",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o);}),f1=B("$ZodDefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>cS(i,t)):cS(n,t)};});function cS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var l1=B("$ZodPrefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o));}),d1=B("$ZodNonOptional",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>uS(i,e)):uS(n,e)};});function uS(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var p1=B("$ZodSuccess",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Di("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)};}),m1=B("$ZodCatch",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>yn(s,o,wt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>yn(i,o,wt()))},input:r.value}),r.issues=[]),r)};}),h1=B("$ZodNaN",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),g1=B("$ZodPipe",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Qp(s,t.in,o)):Qp(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Qp(i,t.out,o)):Qp(n,t.out,o)};});function Qp(e,t,r){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var Kf=B("$ZodCodec",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}else {let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}};});function em(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.out,r)):tm(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.in,r)):tm(e,n,t.in,r)}}function tm(e,t,r,o){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},o)}var y1=B("$ZodReadonly",(e,t)=>{we.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(fS):fS(n)};});function fS(e){return e.value=Object.freeze(e.value),e}var b1=B("$ZodTemplateLiteral",(e,t)=>{we.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s));}else if(o===null||pb.has(typeof o))r.push(xo(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),x1=B("$ZodFunction",(e,t)=>(we.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Mp(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Mp(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Dp(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Dp(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new sm({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),v1=B("$ZodPromise",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o));}),w1=B("$ZodLazy",(e,t)=>{we.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Oe(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o);}),_1=B("$ZodCustom",(e,t)=>{ot.init(e,t),we.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>lS(i,r,o,e));lS(n,r,o,e);};});function lS(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(cc(n));}}var Xf={};Er(Xf,{ar:()=>yS,az:()=>bS,be:()=>vS,bg:()=>wS,ca:()=>_S,cs:()=>ES,da:()=>SS,de:()=>IS,en:()=>am,eo:()=>AS,es:()=>kS,fa:()=>RS,fi:()=>TS,fr:()=>$S,frCA:()=>OS,he:()=>NS,hu:()=>PS,id:()=>BS,is:()=>CS,it:()=>zS,ja:()=>LS,ka:()=>US,kh:()=>MS,km:()=>cm,ko:()=>DS,lt:()=>FS,mk:()=>HS,ms:()=>VS,nl:()=>ZS,no:()=>GS,ota:()=>qS,pl:()=>KS,ps:()=>WS,pt:()=>JS,ru:()=>XS,sl:()=>QS,sv:()=>e5,ta:()=>t5,th:()=>r5,tr:()=>n5,ua:()=>o5,uk:()=>um,ur:()=>i5,vi:()=>s5,yo:()=>u5,zhCN:()=>a5,zhTW:()=>c5});var gP=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case "invalid_type":return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${X(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function yS(){return {localeError:gP()}}var yP=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${X(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function bS(){return {localeError:yP()}}function xS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var bP=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0456\u045E";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${X(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=xS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=xS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function vS(){return {localeError:bP()}}var xP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(e))return "\u043C\u0430\u0441\u0438\u0432";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},vP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return o=>{switch(o.code){case "invalid_type":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${xP(o.input)}`;case "invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${X(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;if(n.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[n.format]??o.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${j(o.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function wS(){return {localeError:vP()}}var wP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${X(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${j(n.values," o ")}`;case "too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case "unrecognized_keys":return `Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${n.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${n.origin}`;default:return "Entrada inv\xE0lida"}}};function _S(){return {localeError:wP()}}var _P=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case "string":return "\u0159et\u011Bzec";case "boolean":return "boolean";case "bigint":return "bigint";case "function":return "funkce";case "symbol":return "symbol";case "undefined":return "undefined";case "object":{if(Array.isArray(n))return "pole";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case "invalid_type":return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${X(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${j(n.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${n.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${n.origin}`;default:return "Neplatn\xFD vstup"}}};function ES(){return {localeError:_P()}}var EP=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"tal";case "object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case "invalid_type":return `Ugyldigt input: forventede ${o(s.expected)}, fik ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${X(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${a} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${a} ${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${a} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${a} ${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${i[a.format]??s.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case "unrecognized_keys":return `${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${j(s.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${s.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${s.origin}`;default:return "Ugyldigt input"}}};function SS(){return {localeError:EP()}}var SP=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"Zahl";case "object":{if(Array.isArray(n))return "Array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case "invalid_type":return `Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${X(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case "unrecognized_keys":return `${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${n.origin}`;default:return "Ung\xFCltige Eingabe"}}};function IS(){return {localeError:SP()}}var IP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},AP=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case "invalid_type":return `Invalid input: expected ${o.expected}, received ${IP(o.input)}`;case "invalid_value":return o.values.length===1?`Invalid input: expected ${X(o.values[0])}`:`Invalid option: expected one of ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${o.divisor}`;case "unrecognized_keys":return `Unrecognized key${o.keys.length>1?"s":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Invalid key in ${o.origin}`;case "invalid_union":return "Invalid input";case "invalid_element":return `Invalid value in ${o.origin}`;default:return "Invalid input"}}};function am(){return {localeError:AP()}}var kP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"nombro";case "object":{if(Array.isArray(e))return "tabelo";if(e===null)return "senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},RP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case "invalid_type":return `Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${kP(o.input)}`;case "invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${X(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${o.divisor}`;case "unrecognized_keys":return `Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${o.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${o.origin}`;default:return "Nevalida enigo"}}};function AS(){return {localeError:RP()}}var TP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"number";case "object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case "invalid_type":return `Entrada inv\xE1lida: se esperaba ${o(s.expected)}, recibido ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${X(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${a}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${a}${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${a}${s.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${a}${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${i[a.format]??s.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case "unrecognized_keys":return `Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${j(s.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o(s.origin)}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o(s.origin)}`;default:return "Entrada inv\xE1lida"}}};function kS(){return {localeError:TP()}}var $P=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0622\u0631\u0627\u06CC\u0647";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case "invalid_type":return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case "invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${X(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${j(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${j(n.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function RS(){return {localeError:$P()}}var OP=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case "invalid_type":return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${X(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case "unrecognized_keys":return `${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${j(n.keys,", ")}`;case "invalid_key":return "Virheellinen avain tietueessa";case "invalid_union":return "Virheellinen unioni";case "invalid_element":return "Virheellinen arvo joukossa";default:return "Virheellinen sy\xF6te"}}};function TS(){return {localeError:OP()}}var NP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombre";case "object":{if(Array.isArray(n))return "tableau";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${X(n.values[0])} attendu`:`Option invalide : une valeur parmi ${j(n.values,"|")} attendue`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function $S(){return {localeError:NP()}}var PP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${X(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function OS(){return {localeError:PP()}}var BP=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case "invalid_type":return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${X(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function NS(){return {localeError:BP()}}var CP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"sz\xE1m";case "object":{if(Array.isArray(n))return "t\xF6mb";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case "invalid_type":return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${X(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${n.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function PS(){return {localeError:CP()}}var zP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${X(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${n.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${n.origin}`;default:return "Input tidak valid"}}};function BS(){return {localeError:zP()}}var LP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"n\xFAmer";case "object":{if(Array.isArray(e))return "fylki";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},UP=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case "invalid_type":return `Rangt gildi: \xDE\xFA sl\xF3st inn ${LP(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case "invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${X(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${n}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${n}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??o.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${j(o.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${o.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${o.origin}`;default:return "Rangt gildi"}}};function CS(){return {localeError:UP()}}var MP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numero";case "object":{if(Array.isArray(n))return "vettore";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input non valido: atteso ${X(n.values[0])}`:`Opzione non valida: atteso uno tra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${n.divisor}`;case "unrecognized_keys":return `Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${j(n.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${n.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${n.origin}`;default:return "Input non valido"}}};function zS(){return {localeError:MP()}}var DP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case "object":{if(Array.isArray(n))return "\u914D\u5217";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case "invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${X(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${j(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function LS(){return {localeError:DP()}}var jP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case "object":{if(Array.isArray(e))return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return {string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},FP=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case "invalid_type":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${jP(o.input)}`;case "invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${X(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${j(o.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${n}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${n}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??o.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${j(o.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function US(){return {localeError:FP()}}var HP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case "object":{if(Array.isArray(n))return "\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case "invalid_type":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${X(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${j(n.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function cm(){return {localeError:HP()}}function MS(){return cm()}var VP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case "invalid_type":return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case "invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${X(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${j(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case "too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${j(n.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function DS(){return {localeError:VP()}}var ZP=e=>Yf(typeof e,e),Yf=(e,t=void 0)=>{switch(e){case "number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case "bigint":return "sveikasis skai\u010Dius";case "string":return "eilut\u0117";case "boolean":return "login\u0117 reik\u0161m\u0117";case "undefined":case "void":return "neapibr\u0117\u017Eta reik\u0161m\u0117";case "function":return "funkcija";case "symbol":return "simbolis";case "object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case "null":return "nulin\u0117 reik\u0161m\u0117"}return e},Jf=e=>e.charAt(0).toUpperCase()+e.slice(1);function jS(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var GP=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,n,i,s){let a=e[o]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case "invalid_type":return `Gautas tipas ${ZP(o.input)}, o tik\u0117tasi - ${Yf(o.expected)}`;case "invalid_value":return o.values.length===1?`Privalo b\u016Bti ${X(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${j(o.values,"|")} pasirinkim\u0173`;case "too_big":{let n=Yf(o.origin),i=t(o.origin,jS(Number(o.maximum)),o.inclusive??false,"smaller");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${i?.unit}`}case "too_small":{let n=Yf(o.origin),i=t(o.origin,jS(Number(o.minimum)),o.inclusive??false,"bigger");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${i?.unit}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??o.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${j(o.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let n=Yf(o.origin);return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function FS(){return {localeError:GP()}}var qP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case "object":{if(Array.isArray(n))return "\u043D\u0438\u0437\u0430";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case "invalid_type":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Invalid input: expected ${X(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function HS(){return {localeError:qP()}}var WP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombor";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${X(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${n.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${n.origin}`;default:return "Input tidak sah"}}};function VS(){return {localeError:WP()}}var KP=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"getal";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case "invalid_type":return `Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${X(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${n.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${n.origin}`;default:return "Ongeldige invoer"}}};function ZS(){return {localeError:KP()}}var JP=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"tall";case "object":{if(Array.isArray(n))return "liste";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${X(n.values[0])}`:`Ugyldig valg: forventet en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${n.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${n.origin}`;default:return "Ugyldig input"}}};function GS(){return {localeError:JP()}}var YP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numara";case "object":{if(Array.isArray(n))return "saf";if(n===null)return "gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case "invalid_type":return `F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${X(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function qS(){return {localeError:YP()}}var XP=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0627\u0631\u06D0";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case "invalid_type":return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case "invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${X(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${j(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function WS(){return {localeError:XP()}}var QP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"liczba";case "object":{if(Array.isArray(n))return "tablica";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case "invalid_type":return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${X(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${n.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function KS(){return {localeError:QP()}}var e3=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\xFAmero";case "object":{if(Array.isArray(n))return "array";if(n===null)return "nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${X(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${n.origin}`;default:return "Campo inv\xE1lido"}}};function JS(){return {localeError:e3()}}function YS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var t3=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${X(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=YS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=YS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function XS(){return {localeError:t3()}}var r3=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case "object":{if(Array.isArray(n))return "tabela";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case "invalid_type":return `Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${X(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case "unrecognized_keys":return `Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${j(n.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${n.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${n.origin}`;default:return "Neveljaven vnos"}}};function QS(){return {localeError:r3()}}var n3=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"antal";case "object":{if(Array.isArray(n))return "lista";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case "invalid_type":return `Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${X(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function e5(){return {localeError:n3()}}var o3=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case "object":{if(Array.isArray(n))return "\u0B85\u0BA3\u0BBF";if(n===null)return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${X(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function t5(){return {localeError:o3()}}var i3=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case "object":{if(Array.isArray(n))return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case "invalid_type":return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${X(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${j(n.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function r5(){return {localeError:i3()}}var s3=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},a3=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case "invalid_type":return `Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${s3(o.input)}`;case "invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${X(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${j(o.keys,", ")}`;case "invalid_key":return `${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function n5(){return {localeError:a3()}}var c3=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${X(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function um(){return {localeError:c3()}}function o5(){return um()}var u3=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case "object":{if(Array.isArray(n))return "\u0622\u0631\u06D2";if(n===null)return "\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case "invalid_type":return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case "invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${X(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${j(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function i5(){return {localeError:u3()}}var f3=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"s\u1ED1";case "object":{if(Array.isArray(n))return "m\u1EA3ng";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case "invalid_type":return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${X(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${j(n.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function s5(){return {localeError:f3()}}var l3=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case "object":{if(Array.isArray(n))return "\u6570\u7EC4";if(n===null)return "\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${X(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function a5(){return {localeError:l3()}}var d3=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${X(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function c5(){return {localeError:d3()}}var p3=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\u1ECD\u0301mb\xE0";case "object":{if(Array.isArray(n))return "akop\u1ECD";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return n=>{switch(n.code){case "invalid_type":return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${X(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??n.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${j(n.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function u5(){return {localeError:p3()}}var E1=Symbol("ZodOutput"),S1=Symbol("ZodInput"),mc=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t);}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function fm(){return new mc}var vo=fm();function I1(e,t){return new e({type:"string",...ee(t)})}function A1(e,t){return new e({type:"string",coerce:true,...ee(t)})}function lm(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...ee(t)})}function Qf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...ee(t)})}function dm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...ee(t)})}function pm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...ee(t)})}function mm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...ee(t)})}function hm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...ee(t)})}function el(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...ee(t)})}function gm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...ee(t)})}function ym(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...ee(t)})}function bm(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...ee(t)})}function xm(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...ee(t)})}function vm(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...ee(t)})}function wm(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...ee(t)})}function _m(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...ee(t)})}function Em(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...ee(t)})}function Sm(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...ee(t)})}function Im(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...ee(t)})}function Am(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...ee(t)})}function km(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...ee(t)})}function Rm(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...ee(t)})}function Tm(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...ee(t)})}function $m(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...ee(t)})}var k1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function R1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...ee(t)})}function T1(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function $1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function O1(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function N1(e,t){return new e({type:"number",checks:[],...ee(t)})}function P1(e,t){return new e({type:"number",coerce:true,checks:[],...ee(t)})}function B1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...ee(t)})}function C1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...ee(t)})}function z1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...ee(t)})}function L1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...ee(t)})}function U1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...ee(t)})}function M1(e,t){return new e({type:"boolean",...ee(t)})}function D1(e,t){return new e({type:"boolean",coerce:true,...ee(t)})}function j1(e,t){return new e({type:"bigint",...ee(t)})}function F1(e,t){return new e({type:"bigint",coerce:true,...ee(t)})}function H1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...ee(t)})}function V1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...ee(t)})}function Z1(e,t){return new e({type:"symbol",...ee(t)})}function G1(e,t){return new e({type:"undefined",...ee(t)})}function q1(e,t){return new e({type:"null",...ee(t)})}function W1(e){return new e({type:"any"})}function K1(e){return new e({type:"unknown"})}function J1(e,t){return new e({type:"never",...ee(t)})}function Y1(e,t){return new e({type:"void",...ee(t)})}function X1(e,t){return new e({type:"date",...ee(t)})}function Q1(e,t){return new e({type:"date",coerce:true,...ee(t)})}function ev(e,t){return new e({type:"nan",...ee(t)})}function Jo(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:false})}function Rn(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:true})}function Yo(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:false})}function Yr(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:true})}function tv(e){return Yo(0,e)}function rv(e){return Jo(0,e)}function nv(e){return Rn(0,e)}function ov(e){return Yr(0,e)}function Vs(e,t){return new Jb({check:"multiple_of",...ee(t),value:e})}function hc(e,t){return new Qb({check:"max_size",...ee(t),maximum:e})}function Zs(e,t){return new ex({check:"min_size",...ee(t),minimum:e})}function tl(e,t){return new tx({check:"size_equals",...ee(t),size:e})}function gc(e,t){return new rx({check:"max_length",...ee(t),maximum:e})}function Gi(e,t){return new nx({check:"min_length",...ee(t),minimum:e})}function yc(e,t){return new ox({check:"length_equals",...ee(t),length:e})}function rl(e,t){return new ix({check:"string_format",format:"regex",...ee(t),pattern:e})}function nl(e){return new sx({check:"string_format",format:"lowercase",...ee(e)})}function ol(e){return new ax({check:"string_format",format:"uppercase",...ee(e)})}function il(e,t){return new cx({check:"string_format",format:"includes",...ee(t),includes:e})}function sl(e,t){return new ux({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function al(e,t){return new fx({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function iv(e,t,r){return new lx({check:"property",property:e,schema:t,...ee(r)})}function cl(e,t){return new dx({check:"mime_type",mime:e,...ee(t)})}function Xo(e){return new px({check:"overwrite",tx:e})}function ul(e){return Xo(t=>t.normalize(e))}function fl(){return Xo(e=>e.trim())}function ll(){return Xo(e=>e.toLowerCase())}function dl(){return Xo(e=>e.toUpperCase())}function sv(e,t,r){return new e({type:"array",element:t,...ee(r)})}function m3(e,t,r){return new e({type:"union",options:t,...ee(r)})}function h3(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...ee(o)})}function g3(e,t,r){return new e({type:"intersection",left:t,right:r})}function y3(e,t,r,o){let n=r instanceof we,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...ee(i)})}function b3(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...ee(o)})}function x3(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...ee(o)})}function v3(e,t,r){return new e({type:"set",valueType:t,...ee(r)})}function w3(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...ee(r)})}function _3(e,t,r){return new e({type:"enum",entries:t,...ee(r)})}function E3(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ee(r)})}function av(e,t){return new e({type:"file",...ee(t)})}function S3(e,t){return new e({type:"transform",transform:t})}function I3(e,t){return new e({type:"optional",innerType:t})}function A3(e,t){return new e({type:"nullable",innerType:t})}function k3(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():db(r)}})}function R3(e,t,r){return new e({type:"nonoptional",innerType:t,...ee(r)})}function T3(e,t){return new e({type:"success",innerType:t})}function $3(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function O3(e,t,r){return new e({type:"pipe",in:t,out:r})}function N3(e,t){return new e({type:"readonly",innerType:t})}function P3(e,t,r){return new e({type:"template_literal",parts:t,...ee(r)})}function B3(e,t){return new e({type:"lazy",getter:t})}function C3(e,t){return new e({type:"promise",innerType:t})}function cv(e,t,r){let o=ee(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function uv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ee(r)})}function fv(e){let t=f5(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(cc(o,r.value,t._zod.def));else {let n=o;n.fatal&&(n.continue=false),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(cc(n));}},e(r.value,r)));return t}function f5(e,t){let r=new ot({check:"custom",...ee(t)});return r._zod.check=e,r}function lv(e,t){let r=ee(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),a=e.Codec??Kf,c=e.Boolean??Wf,u=e.String??Hs,f=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),g=new a({type:"pipe",in:f,out:d,transform:((h,v)=>{let E=h;return r.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?true:s.has(E)?false:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:g,continue:false}),{})}),reverseTransform:((h,v)=>h===true?o[0]||"true":n[0]||"false"),error:r.error});return g}function bc(e,t,r,o={}){let n=ee(o),i={...ee(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var pl=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??vo,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map;}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else {let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},g=t._zod.parent;if(g)a.ref=g,this.process(g,d),this.seen.get(g).isParent=true;else {let h=a.schema;switch(n.type){case "string":{let v=h;v.type="string";let{minimum:E,maximum:R,format:$,patterns:N,contentEncoding:O}=t._zod.bag;if(typeof E=="number"&&(v.minLength=E),typeof R=="number"&&(v.maxLength=R),$&&(v.format=i[$]??$,v.format===""&&delete v.format),O&&(v.contentEncoding=O),N&&N.size>0){let I=[...N];I.length===1?v.pattern=I[0].source:I.length>1&&(a.schema.allOf=[...I.map(P=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:P.source}))]);}break}case "number":{let v=h,{minimum:E,maximum:R,format:$,multipleOf:N,exclusiveMaximum:O,exclusiveMinimum:I}=t._zod.bag;typeof $=="string"&&$.includes("int")?v.type="integer":v.type="number",typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.minimum=I,v.exclusiveMinimum=true):v.exclusiveMinimum=I),typeof E=="number"&&(v.minimum=E,typeof I=="number"&&this.target!=="draft-4"&&(I>=E?delete v.minimum:delete v.exclusiveMinimum)),typeof O=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.maximum=O,v.exclusiveMaximum=true):v.exclusiveMaximum=O),typeof R=="number"&&(v.maximum=R,typeof O=="number"&&this.target!=="draft-4"&&(O<=R?delete v.maximum:delete v.exclusiveMaximum)),typeof N=="number"&&(v.multipleOf=N);break}case "boolean":{let v=h;v.type="boolean";break}case "bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case "symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case "null":{this.target==="openapi-3.0"?(h.type="string",h.nullable=true,h.enum=[null]):h.type="null";break}case "any":break;case "unknown":break;case "undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case "void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case "never":{h.not={};break}case "date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case "array":{let v=h,{minimum:E,maximum:R}=t._zod.bag;typeof E=="number"&&(v.minItems=E),typeof R=="number"&&(v.maxItems=R),v.type="array",v.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case "object":{let v=h;v.type="object",v.properties={};let E=n.shape;for(let N in E)v.properties[N]=this.process(E[N],{...d,path:[...d.path,"properties",N]});let R=new Set(Object.keys(E)),$=new Set([...R].filter(N=>{let O=n.shape[N]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));$.size>0&&(v.required=Array.from($)),n.catchall?._zod.def.type==="never"?v.additionalProperties=false:n.catchall?n.catchall&&(v.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(v.additionalProperties=false);break}case "union":{let v=h,E=n.options.map((R,$)=>this.process(R,{...d,path:[...d.path,"anyOf",$]}));v.anyOf=E;break}case "intersection":{let v=h,E=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),R=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),$=O=>"allOf"in O&&Object.keys(O).length===1,N=[...$(E)?E.allOf:[E],...$(R)?R.allOf:[R]];v.allOf=N;break}case "tuple":{let v=h;v.type="array";let E=this.target==="draft-2020-12"?"prefixItems":"items",R=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",$=n.items.map((P,L)=>this.process(P,{...d,path:[...d.path,E,L]})),N=n.rest?this.process(n.rest,{...d,path:[...d.path,R,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(v.prefixItems=$,N&&(v.items=N)):this.target==="openapi-3.0"?(v.items={anyOf:$},N&&v.items.anyOf.push(N),v.minItems=$.length,N||(v.maxItems=$.length)):(v.items=$,N&&(v.additionalItems=N));let{minimum:O,maximum:I}=t._zod.bag;typeof O=="number"&&(v.minItems=O),typeof I=="number"&&(v.maxItems=I);break}case "record":{let v=h;v.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(v.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),v.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case "map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case "set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case "enum":{let v=h,E=Lf(n.entries);E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),v.enum=E;break}case "literal":{let v=h,E=[];for(let R of n.values)if(R===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof R=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");E.push(Number(R));}else E.push(R);if(E.length!==0)if(E.length===1){let R=E[0];v.type=R===null?"null":typeof R,this.target==="draft-4"||this.target==="openapi-3.0"?v.enum=[R]:v.const=R;}else E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),E.every(R=>typeof R=="boolean")&&(v.type="string"),E.every(R=>R===null)&&(v.type="null"),v.enum=E;break}case "file":{let v=h,E={type:"string",format:"binary",contentEncoding:"binary"},{minimum:R,maximum:$,mime:N}=t._zod.bag;R!==void 0&&(E.minLength=R),$!==void 0&&(E.maxLength=$),N?N.length===1?(E.contentMediaType=N[0],Object.assign(v,E)):v.anyOf=N.map(O=>({...E,contentMediaType:O})):Object.assign(v,E);break}case "transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case "nullable":{let v=this.process(n.innerType,d);this.target==="openapi-3.0"?(a.ref=n.innerType,h.nullable=true):h.anyOf=[v,{type:"null"}];break}case "nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "success":{let v=h;v.type="boolean";break}case "default":{this.process(n.innerType,d),a.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case "prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case "catch":{this.process(n.innerType,d),a.ref=n.innerType;let v;try{v=n.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=v;break}case "nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case "template_literal":{let v=h,E=t._zod.pattern;if(!E)throw new Error("Pattern not found in template literal");v.type="string",v.pattern=E.source;break}case "pipe":{let v=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(v,d),a.ref=v;break}case "readonly":{this.process(n.innerType,d),a.ref=n.innerType,h.readOnly=true;break}case "promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case "optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "lazy":{let v=t._zod.innerType;this.process(v,d),a.ref=v;break}case "custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case "function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&rr(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=f=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let E=o.external.registry.get(f[0])?.id,R=o.external.uri??(N=>N);if(E)return {ref:R(E)};let $=f[1].defId??f[1].schema.id??`schema${this.counter++}`;return f[1].defId=$,{defId:$,ref:`${R("__shared")}#/${d}/${$}`}}if(f[1]===n)return {ref:"#"};let h=`#/${d}/`,v=f[1].schema.id??`__schema${this.counter++}`;return {defId:v,ref:h+v}},s=f=>{if(f[1].schema.$ref)return;let d=f[1],{ref:g,defId:h}=i(f);d.def={...d.schema},h&&(d.defId=h);let v=d.schema;for(let E in v)delete v[E];v.$ref=g;};if(o.cycles==="throw")for(let f of this.seen.entries()){let d=f[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
60
+ `);}h.write("payload.value = newResult;"),h.write("return payload;");let P=h.compile();return (O,S)=>P(g,O,S)},i,s=Vs,a=!Df.jitless,u=a&&gb.value,f=t.catchall,d;e._zod.parse=(g,h)=>{d??(d=o.value);let x=g.value;return s(x)?a&&u&&h?.async===false&&h.jitless!==true?(i||(i=n(t.shape)),g=i(g,h),f?bS([],x,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),g)};});function sS(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Gi(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>yn(s,o,wt())))}),t)}var cm=B("$ZodUnion",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Hf(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=false,a=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=true;else {if(u.issues.length===0)return u;a.push(u);}}return s?Promise.all(a).then(c=>sS(c,n,e,i)):sS(a,n,e,i)};}),o1=B("$ZodDiscriminatedUnion",(e,t)=>{cm.init(e,t);let r=e._zod.parse;Oe(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u);}}return n});let o=fc(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Vs(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)};}),i1=B("$ZodIntersection",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>aS(r,c,u)):aS(r,i,s)};});function vx(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(Zi(e)&&Zi(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=vx(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data;}return {valid:true,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=vx(n,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function aS(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Gi(e))return e;let o=vx(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var um=B("$ZodTuple",(e,t)=>{we.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,f=s.length<o-1;if(u||f)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:e,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let f=u._zod.run({value:s[c],issues:[]},i);f instanceof Promise?a.push(f.then(d=>tm(d,n,c))):tm(f,n,c);}if(t.rest){let u=s.slice(r.length);for(let f of u){c++;let d=t.rest._zod.run({value:f,issues:[]},i);d instanceof Promise?a.push(d.then(g=>tm(g,n,c))):tm(d,n,c);}}return a.length?Promise.all(a).then(()=>n):n};});function tm(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues)),t.value[r]=e.value;}var s1=B("$ZodRecord",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Zi(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&r.issues.push(...gn(c,f.issues)),r.value[c]=f.value;})):(u.issues.length&&r.issues.push(...gn(c,u.issues)),r.value[c]=u.value);}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a});}else {r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>yn(u,o,wt())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...gn(s,u.issues)),r.value[a.value]=u.value;})):(c.issues.length&&r.issues.push(...gn(s,c.issues)),r.value[a.value]=c.value);}}return i.length?Promise.all(i).then(()=>r):r};}),a1=B("$ZodMap",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([f,d])=>{cS(f,d,r,s,n,e,o);})):cS(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function cS(e,t,r,o,n,i,s){e.issues.length&&(Vf.has(typeof o)?r.issues.push(...gn(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(a=>yn(a,s,wt()))})),t.issues.length&&(Vf.has(typeof o)?r.issues.push(...gn(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>yn(a,s,wt()))})),r.value.set(e.value,t.value);}var c1=B("$ZodSet",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>uS(c,r))):uS(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function uS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var u1=B("$ZodEnum",(e,t)=>{we.init(e,t);let r=Ff(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Vf.has(typeof n)).map(n=>typeof n=="string"?xo(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n};}),f1=B("$ZodLiteral",(e,t)=>{if(we.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?xo(r):r?xo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r};}),l1=B("$ZodFile",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r};}),d1=B("$ZodTransform",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new ji(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return (n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Xn;return r.value=n,r};});function fS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var p1=B("$ZodOptional",(e,t)=>{we.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Hf(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>fS(i,r.value)):fS(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),m1=B("$ZodNullable",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Hf(r.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o);}),h1=B("$ZodDefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>lS(i,t)):lS(n,t)};});function lS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var g1=B("$ZodPrefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o));}),y1=B("$ZodNonOptional",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>dS(i,e)):dS(n,e)};});function dS(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var b1=B("$ZodSuccess",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new ji("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)};}),x1=B("$ZodCatch",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>yn(s,o,wt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>yn(i,o,wt()))},input:r.value}),r.issues=[]),r)};}),v1=B("$ZodNaN",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),w1=B("$ZodPipe",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>rm(s,t.in,o)):rm(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>rm(i,t.out,o)):rm(n,t.out,o)};});function rm(e,t,r){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var el=B("$ZodCodec",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>nm(s,t,o)):nm(i,t,o)}else {let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>nm(s,t,o)):nm(i,t,o)}};});function nm(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>om(e,i,t.out,r)):om(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>om(e,i,t.in,r)):om(e,n,t.in,r)}}function om(e,t,r,o){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},o)}var _1=B("$ZodReadonly",(e,t)=>{we.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(pS):pS(n)};});function pS(e){return e.value=Object.freeze(e.value),e}var E1=B("$ZodTemplateLiteral",(e,t)=>{we.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s));}else if(o===null||bb.has(typeof o))r.push(xo(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),S1=B("$ZodFunction",(e,t)=>(we.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Fp(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Fp(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Hp(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Hp(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new um({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),I1=B("$ZodPromise",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o));}),A1=B("$ZodLazy",(e,t)=>{we.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Oe(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o);}),k1=B("$ZodCustom",(e,t)=>{ot.init(e,t),we.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>mS(i,r,o,e));mS(n,r,o,e);};});function mS(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(lc(n));}}var nl={};Er(nl,{ar:()=>vS,az:()=>wS,be:()=>ES,bg:()=>SS,ca:()=>IS,cs:()=>AS,da:()=>kS,de:()=>RS,en:()=>fm,eo:()=>TS,es:()=>$S,fa:()=>OS,fi:()=>NS,fr:()=>PS,frCA:()=>BS,he:()=>CS,hu:()=>zS,id:()=>LS,is:()=>US,it:()=>MS,ja:()=>DS,ka:()=>jS,kh:()=>FS,km:()=>lm,ko:()=>HS,lt:()=>ZS,mk:()=>GS,ms:()=>qS,nl:()=>WS,no:()=>KS,ota:()=>JS,pl:()=>XS,ps:()=>YS,pt:()=>QS,ru:()=>t5,sl:()=>r5,sv:()=>n5,ta:()=>o5,th:()=>i5,tr:()=>s5,ua:()=>a5,uk:()=>dm,ur:()=>c5,vi:()=>u5,yo:()=>d5,zhCN:()=>f5,zhTW:()=>l5});var bP=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case "invalid_type":return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${X(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function vS(){return {localeError:bP()}}var xP=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${X(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function wS(){return {localeError:xP()}}function _S(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var vP=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0456\u045E";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${X(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=_S(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=_S(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function ES(){return {localeError:vP()}}var wP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(e))return "\u043C\u0430\u0441\u0438\u0432";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},_P=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return o=>{switch(o.code){case "invalid_type":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${wP(o.input)}`;case "invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${X(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;if(n.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[n.format]??o.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${j(o.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function SS(){return {localeError:_P()}}var EP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${X(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${j(n.values," o ")}`;case "too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case "unrecognized_keys":return `Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${n.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${n.origin}`;default:return "Entrada inv\xE0lida"}}};function IS(){return {localeError:EP()}}var SP=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case "string":return "\u0159et\u011Bzec";case "boolean":return "boolean";case "bigint":return "bigint";case "function":return "funkce";case "symbol":return "symbol";case "undefined":return "undefined";case "object":{if(Array.isArray(n))return "pole";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case "invalid_type":return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${X(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${j(n.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${n.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${n.origin}`;default:return "Neplatn\xFD vstup"}}};function AS(){return {localeError:SP()}}var IP=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"tal";case "object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case "invalid_type":return `Ugyldigt input: forventede ${o(s.expected)}, fik ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${X(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${a} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${a} ${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${a} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${a} ${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${i[a.format]??s.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case "unrecognized_keys":return `${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${j(s.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${s.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${s.origin}`;default:return "Ugyldigt input"}}};function kS(){return {localeError:IP()}}var AP=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"Zahl";case "object":{if(Array.isArray(n))return "Array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case "invalid_type":return `Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${X(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case "unrecognized_keys":return `${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${n.origin}`;default:return "Ung\xFCltige Eingabe"}}};function RS(){return {localeError:AP()}}var kP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},RP=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case "invalid_type":return `Invalid input: expected ${o.expected}, received ${kP(o.input)}`;case "invalid_value":return o.values.length===1?`Invalid input: expected ${X(o.values[0])}`:`Invalid option: expected one of ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${o.divisor}`;case "unrecognized_keys":return `Unrecognized key${o.keys.length>1?"s":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Invalid key in ${o.origin}`;case "invalid_union":return "Invalid input";case "invalid_element":return `Invalid value in ${o.origin}`;default:return "Invalid input"}}};function fm(){return {localeError:RP()}}var TP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"nombro";case "object":{if(Array.isArray(e))return "tabelo";if(e===null)return "senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},$P=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case "invalid_type":return `Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${TP(o.input)}`;case "invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${X(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${o.divisor}`;case "unrecognized_keys":return `Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${o.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${o.origin}`;default:return "Nevalida enigo"}}};function TS(){return {localeError:$P()}}var OP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"number";case "object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case "invalid_type":return `Entrada inv\xE1lida: se esperaba ${o(s.expected)}, recibido ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${X(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${a}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${a}${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${a}${s.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${a}${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${i[a.format]??s.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case "unrecognized_keys":return `Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${j(s.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o(s.origin)}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o(s.origin)}`;default:return "Entrada inv\xE1lida"}}};function $S(){return {localeError:OP()}}var NP=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0622\u0631\u0627\u06CC\u0647";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case "invalid_type":return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case "invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${X(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${j(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${j(n.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function OS(){return {localeError:NP()}}var PP=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case "invalid_type":return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${X(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case "unrecognized_keys":return `${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${j(n.keys,", ")}`;case "invalid_key":return "Virheellinen avain tietueessa";case "invalid_union":return "Virheellinen unioni";case "invalid_element":return "Virheellinen arvo joukossa";default:return "Virheellinen sy\xF6te"}}};function NS(){return {localeError:PP()}}var BP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombre";case "object":{if(Array.isArray(n))return "tableau";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${X(n.values[0])} attendu`:`Option invalide : une valeur parmi ${j(n.values,"|")} attendue`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function PS(){return {localeError:BP()}}var CP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${X(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function BS(){return {localeError:CP()}}var zP=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case "invalid_type":return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${X(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function CS(){return {localeError:zP()}}var LP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"sz\xE1m";case "object":{if(Array.isArray(n))return "t\xF6mb";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case "invalid_type":return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${X(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${n.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function zS(){return {localeError:LP()}}var UP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${X(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${n.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${n.origin}`;default:return "Input tidak valid"}}};function LS(){return {localeError:UP()}}var MP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"n\xFAmer";case "object":{if(Array.isArray(e))return "fylki";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},DP=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case "invalid_type":return `Rangt gildi: \xDE\xFA sl\xF3st inn ${MP(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case "invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${X(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${n}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${n}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??o.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${j(o.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${o.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${o.origin}`;default:return "Rangt gildi"}}};function US(){return {localeError:DP()}}var jP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numero";case "object":{if(Array.isArray(n))return "vettore";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input non valido: atteso ${X(n.values[0])}`:`Opzione non valida: atteso uno tra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${n.divisor}`;case "unrecognized_keys":return `Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${j(n.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${n.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${n.origin}`;default:return "Input non valido"}}};function MS(){return {localeError:jP()}}var FP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case "object":{if(Array.isArray(n))return "\u914D\u5217";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case "invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${X(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${j(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function DS(){return {localeError:FP()}}var HP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case "object":{if(Array.isArray(e))return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return {string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},VP=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case "invalid_type":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${HP(o.input)}`;case "invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${X(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${j(o.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${n}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${n}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??o.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${j(o.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function jS(){return {localeError:VP()}}var ZP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case "object":{if(Array.isArray(n))return "\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case "invalid_type":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${X(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${j(n.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function lm(){return {localeError:ZP()}}function FS(){return lm()}var GP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case "invalid_type":return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case "invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${X(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${j(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case "too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${j(n.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function HS(){return {localeError:GP()}}var qP=e=>rl(typeof e,e),rl=(e,t=void 0)=>{switch(e){case "number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case "bigint":return "sveikasis skai\u010Dius";case "string":return "eilut\u0117";case "boolean":return "login\u0117 reik\u0161m\u0117";case "undefined":case "void":return "neapibr\u0117\u017Eta reik\u0161m\u0117";case "function":return "funkcija";case "symbol":return "simbolis";case "object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case "null":return "nulin\u0117 reik\u0161m\u0117"}return e},tl=e=>e.charAt(0).toUpperCase()+e.slice(1);function VS(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var WP=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,n,i,s){let a=e[o]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case "invalid_type":return `Gautas tipas ${qP(o.input)}, o tik\u0117tasi - ${rl(o.expected)}`;case "invalid_value":return o.values.length===1?`Privalo b\u016Bti ${X(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${j(o.values,"|")} pasirinkim\u0173`;case "too_big":{let n=rl(o.origin),i=t(o.origin,VS(Number(o.maximum)),o.inclusive??false,"smaller");if(i?.verb)return `${tl(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${tl(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${i?.unit}`}case "too_small":{let n=rl(o.origin),i=t(o.origin,VS(Number(o.minimum)),o.inclusive??false,"bigger");if(i?.verb)return `${tl(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${tl(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${i?.unit}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??o.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${j(o.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let n=rl(o.origin);return `${tl(n??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function ZS(){return {localeError:WP()}}var KP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case "object":{if(Array.isArray(n))return "\u043D\u0438\u0437\u0430";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case "invalid_type":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Invalid input: expected ${X(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function GS(){return {localeError:KP()}}var JP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombor";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${X(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${n.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${n.origin}`;default:return "Input tidak sah"}}};function qS(){return {localeError:JP()}}var YP=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"getal";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case "invalid_type":return `Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${X(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${n.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${n.origin}`;default:return "Ongeldige invoer"}}};function WS(){return {localeError:YP()}}var XP=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"tall";case "object":{if(Array.isArray(n))return "liste";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${X(n.values[0])}`:`Ugyldig valg: forventet en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${n.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${n.origin}`;default:return "Ugyldig input"}}};function KS(){return {localeError:XP()}}var QP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numara";case "object":{if(Array.isArray(n))return "saf";if(n===null)return "gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case "invalid_type":return `F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${X(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function JS(){return {localeError:QP()}}var e3=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0627\u0631\u06D0";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case "invalid_type":return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case "invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${X(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${j(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function YS(){return {localeError:e3()}}var t3=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"liczba";case "object":{if(Array.isArray(n))return "tablica";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case "invalid_type":return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${X(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${n.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function XS(){return {localeError:t3()}}var r3=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\xFAmero";case "object":{if(Array.isArray(n))return "array";if(n===null)return "nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${X(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${n.origin}`;default:return "Campo inv\xE1lido"}}};function QS(){return {localeError:r3()}}function e5(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var n3=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${X(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=e5(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=e5(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function t5(){return {localeError:n3()}}var o3=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case "object":{if(Array.isArray(n))return "tabela";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case "invalid_type":return `Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${X(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case "unrecognized_keys":return `Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${j(n.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${n.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${n.origin}`;default:return "Neveljaven vnos"}}};function r5(){return {localeError:o3()}}var i3=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"antal";case "object":{if(Array.isArray(n))return "lista";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case "invalid_type":return `Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${X(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function n5(){return {localeError:i3()}}var s3=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case "object":{if(Array.isArray(n))return "\u0B85\u0BA3\u0BBF";if(n===null)return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${X(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function o5(){return {localeError:s3()}}var a3=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case "object":{if(Array.isArray(n))return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case "invalid_type":return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${X(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${j(n.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function i5(){return {localeError:a3()}}var c3=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},u3=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case "invalid_type":return `Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${c3(o.input)}`;case "invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${X(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${j(o.keys,", ")}`;case "invalid_key":return `${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function s5(){return {localeError:u3()}}var f3=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${X(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function dm(){return {localeError:f3()}}function a5(){return dm()}var l3=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case "object":{if(Array.isArray(n))return "\u0622\u0631\u06D2";if(n===null)return "\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case "invalid_type":return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case "invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${X(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${j(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function c5(){return {localeError:l3()}}var d3=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"s\u1ED1";case "object":{if(Array.isArray(n))return "m\u1EA3ng";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case "invalid_type":return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${X(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${j(n.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function u5(){return {localeError:d3()}}var p3=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case "object":{if(Array.isArray(n))return "\u6570\u7EC4";if(n===null)return "\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${X(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function f5(){return {localeError:p3()}}var m3=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${X(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function l5(){return {localeError:m3()}}var h3=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\u1ECD\u0301mb\xE0";case "object":{if(Array.isArray(n))return "akop\u1ECD";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return n=>{switch(n.code){case "invalid_type":return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${X(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??n.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${j(n.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function d5(){return {localeError:h3()}}var R1=Symbol("ZodOutput"),T1=Symbol("ZodInput"),yc=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t);}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function pm(){return new yc}var vo=pm();function $1(e,t){return new e({type:"string",...ee(t)})}function O1(e,t){return new e({type:"string",coerce:true,...ee(t)})}function mm(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...ee(t)})}function ol(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...ee(t)})}function hm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...ee(t)})}function gm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...ee(t)})}function ym(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...ee(t)})}function bm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...ee(t)})}function il(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...ee(t)})}function xm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...ee(t)})}function vm(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...ee(t)})}function wm(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...ee(t)})}function _m(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...ee(t)})}function Em(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...ee(t)})}function Sm(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...ee(t)})}function Im(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...ee(t)})}function Am(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...ee(t)})}function km(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...ee(t)})}function Rm(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...ee(t)})}function Tm(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...ee(t)})}function $m(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...ee(t)})}function Om(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...ee(t)})}function Nm(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...ee(t)})}function Pm(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...ee(t)})}var N1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function P1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...ee(t)})}function B1(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function C1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function z1(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function L1(e,t){return new e({type:"number",checks:[],...ee(t)})}function U1(e,t){return new e({type:"number",coerce:true,checks:[],...ee(t)})}function M1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...ee(t)})}function D1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...ee(t)})}function j1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...ee(t)})}function F1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...ee(t)})}function H1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...ee(t)})}function V1(e,t){return new e({type:"boolean",...ee(t)})}function Z1(e,t){return new e({type:"boolean",coerce:true,...ee(t)})}function G1(e,t){return new e({type:"bigint",...ee(t)})}function q1(e,t){return new e({type:"bigint",coerce:true,...ee(t)})}function W1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...ee(t)})}function K1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...ee(t)})}function J1(e,t){return new e({type:"symbol",...ee(t)})}function Y1(e,t){return new e({type:"undefined",...ee(t)})}function X1(e,t){return new e({type:"null",...ee(t)})}function Q1(e){return new e({type:"any"})}function ev(e){return new e({type:"unknown"})}function tv(e,t){return new e({type:"never",...ee(t)})}function rv(e,t){return new e({type:"void",...ee(t)})}function nv(e,t){return new e({type:"date",...ee(t)})}function ov(e,t){return new e({type:"date",coerce:true,...ee(t)})}function iv(e,t){return new e({type:"nan",...ee(t)})}function Yo(e,t){return new Qp({check:"less_than",...ee(t),value:e,inclusive:false})}function Tn(e,t){return new Qp({check:"less_than",...ee(t),value:e,inclusive:true})}function Xo(e,t){return new em({check:"greater_than",...ee(t),value:e,inclusive:false})}function Yr(e,t){return new em({check:"greater_than",...ee(t),value:e,inclusive:true})}function sv(e){return Xo(0,e)}function av(e){return Yo(0,e)}function cv(e){return Tn(0,e)}function uv(e){return Yr(0,e)}function qs(e,t){return new tx({check:"multiple_of",...ee(t),value:e})}function bc(e,t){return new ox({check:"max_size",...ee(t),maximum:e})}function Ws(e,t){return new ix({check:"min_size",...ee(t),minimum:e})}function sl(e,t){return new sx({check:"size_equals",...ee(t),size:e})}function xc(e,t){return new ax({check:"max_length",...ee(t),maximum:e})}function qi(e,t){return new cx({check:"min_length",...ee(t),minimum:e})}function vc(e,t){return new ux({check:"length_equals",...ee(t),length:e})}function al(e,t){return new fx({check:"string_format",format:"regex",...ee(t),pattern:e})}function cl(e){return new lx({check:"string_format",format:"lowercase",...ee(e)})}function ul(e){return new dx({check:"string_format",format:"uppercase",...ee(e)})}function fl(e,t){return new px({check:"string_format",format:"includes",...ee(t),includes:e})}function ll(e,t){return new mx({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function dl(e,t){return new hx({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function fv(e,t,r){return new gx({check:"property",property:e,schema:t,...ee(r)})}function pl(e,t){return new yx({check:"mime_type",mime:e,...ee(t)})}function Qo(e){return new bx({check:"overwrite",tx:e})}function ml(e){return Qo(t=>t.normalize(e))}function hl(){return Qo(e=>e.trim())}function gl(){return Qo(e=>e.toLowerCase())}function yl(){return Qo(e=>e.toUpperCase())}function lv(e,t,r){return new e({type:"array",element:t,...ee(r)})}function g3(e,t,r){return new e({type:"union",options:t,...ee(r)})}function y3(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...ee(o)})}function b3(e,t,r){return new e({type:"intersection",left:t,right:r})}function x3(e,t,r,o){let n=r instanceof we,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...ee(i)})}function v3(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...ee(o)})}function w3(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...ee(o)})}function _3(e,t,r){return new e({type:"set",valueType:t,...ee(r)})}function E3(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...ee(r)})}function S3(e,t,r){return new e({type:"enum",entries:t,...ee(r)})}function I3(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ee(r)})}function dv(e,t){return new e({type:"file",...ee(t)})}function A3(e,t){return new e({type:"transform",transform:t})}function k3(e,t){return new e({type:"optional",innerType:t})}function R3(e,t){return new e({type:"nullable",innerType:t})}function T3(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():yb(r)}})}function $3(e,t,r){return new e({type:"nonoptional",innerType:t,...ee(r)})}function O3(e,t){return new e({type:"success",innerType:t})}function N3(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function P3(e,t,r){return new e({type:"pipe",in:t,out:r})}function B3(e,t){return new e({type:"readonly",innerType:t})}function C3(e,t,r){return new e({type:"template_literal",parts:t,...ee(r)})}function z3(e,t){return new e({type:"lazy",getter:t})}function L3(e,t){return new e({type:"promise",innerType:t})}function pv(e,t,r){let o=ee(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function mv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ee(r)})}function hv(e){let t=p5(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(lc(o,r.value,t._zod.def));else {let n=o;n.fatal&&(n.continue=false),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(lc(n));}},e(r.value,r)));return t}function p5(e,t){let r=new ot({check:"custom",...ee(t)});return r._zod.check=e,r}function gv(e,t){let r=ee(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),a=e.Codec??el,c=e.Boolean??Qf,u=e.String??Gs,f=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),g=new a({type:"pipe",in:f,out:d,transform:((h,x)=>{let w=h;return r.case!=="sensitive"&&(w=w.toLowerCase()),i.has(w)?true:s.has(w)?false:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:x.value,inst:g,continue:false}),{})}),reverseTransform:((h,x)=>h===true?o[0]||"true":n[0]||"false"),error:r.error});return g}function wc(e,t,r,o={}){let n=ee(o),i={...ee(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var bl=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??vo,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map;}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else {let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},g=t._zod.parent;if(g)a.ref=g,this.process(g,d),this.seen.get(g).isParent=true;else {let h=a.schema;switch(n.type){case "string":{let x=h;x.type="string";let{minimum:w,maximum:k,format:T,patterns:P,contentEncoding:O}=t._zod.bag;if(typeof w=="number"&&(x.minLength=w),typeof k=="number"&&(x.maxLength=k),T&&(x.format=i[T]??T,x.format===""&&delete x.format),O&&(x.contentEncoding=O),P&&P.size>0){let S=[...P];S.length===1?x.pattern=S[0].source:S.length>1&&(a.schema.allOf=[...S.map(N=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:N.source}))]);}break}case "number":{let x=h,{minimum:w,maximum:k,format:T,multipleOf:P,exclusiveMaximum:O,exclusiveMinimum:S}=t._zod.bag;typeof T=="string"&&T.includes("int")?x.type="integer":x.type="number",typeof S=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(x.minimum=S,x.exclusiveMinimum=true):x.exclusiveMinimum=S),typeof w=="number"&&(x.minimum=w,typeof S=="number"&&this.target!=="draft-4"&&(S>=w?delete x.minimum:delete x.exclusiveMinimum)),typeof O=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(x.maximum=O,x.exclusiveMaximum=true):x.exclusiveMaximum=O),typeof k=="number"&&(x.maximum=k,typeof O=="number"&&this.target!=="draft-4"&&(O<=k?delete x.maximum:delete x.exclusiveMaximum)),typeof P=="number"&&(x.multipleOf=P);break}case "boolean":{let x=h;x.type="boolean";break}case "bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case "symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case "null":{this.target==="openapi-3.0"?(h.type="string",h.nullable=true,h.enum=[null]):h.type="null";break}case "any":break;case "unknown":break;case "undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case "void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case "never":{h.not={};break}case "date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case "array":{let x=h,{minimum:w,maximum:k}=t._zod.bag;typeof w=="number"&&(x.minItems=w),typeof k=="number"&&(x.maxItems=k),x.type="array",x.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case "object":{let x=h;x.type="object",x.properties={};let w=n.shape;for(let P in w)x.properties[P]=this.process(w[P],{...d,path:[...d.path,"properties",P]});let k=new Set(Object.keys(w)),T=new Set([...k].filter(P=>{let O=n.shape[P]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));T.size>0&&(x.required=Array.from(T)),n.catchall?._zod.def.type==="never"?x.additionalProperties=false:n.catchall?n.catchall&&(x.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(x.additionalProperties=false);break}case "union":{let x=h,w=n.options.map((k,T)=>this.process(k,{...d,path:[...d.path,"anyOf",T]}));x.anyOf=w;break}case "intersection":{let x=h,w=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),k=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),T=O=>"allOf"in O&&Object.keys(O).length===1,P=[...T(w)?w.allOf:[w],...T(k)?k.allOf:[k]];x.allOf=P;break}case "tuple":{let x=h;x.type="array";let w=this.target==="draft-2020-12"?"prefixItems":"items",k=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",T=n.items.map((N,z)=>this.process(N,{...d,path:[...d.path,w,z]})),P=n.rest?this.process(n.rest,{...d,path:[...d.path,k,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(x.prefixItems=T,P&&(x.items=P)):this.target==="openapi-3.0"?(x.items={anyOf:T},P&&x.items.anyOf.push(P),x.minItems=T.length,P||(x.maxItems=T.length)):(x.items=T,P&&(x.additionalItems=P));let{minimum:O,maximum:S}=t._zod.bag;typeof O=="number"&&(x.minItems=O),typeof S=="number"&&(x.maxItems=S);break}case "record":{let x=h;x.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(x.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),x.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case "map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case "set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case "enum":{let x=h,w=Ff(n.entries);w.every(k=>typeof k=="number")&&(x.type="number"),w.every(k=>typeof k=="string")&&(x.type="string"),x.enum=w;break}case "literal":{let x=h,w=[];for(let k of n.values)if(k===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof k=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");w.push(Number(k));}else w.push(k);if(w.length!==0)if(w.length===1){let k=w[0];x.type=k===null?"null":typeof k,this.target==="draft-4"||this.target==="openapi-3.0"?x.enum=[k]:x.const=k;}else w.every(k=>typeof k=="number")&&(x.type="number"),w.every(k=>typeof k=="string")&&(x.type="string"),w.every(k=>typeof k=="boolean")&&(x.type="string"),w.every(k=>k===null)&&(x.type="null"),x.enum=w;break}case "file":{let x=h,w={type:"string",format:"binary",contentEncoding:"binary"},{minimum:k,maximum:T,mime:P}=t._zod.bag;k!==void 0&&(w.minLength=k),T!==void 0&&(w.maxLength=T),P?P.length===1?(w.contentMediaType=P[0],Object.assign(x,w)):x.anyOf=P.map(O=>({...w,contentMediaType:O})):Object.assign(x,w);break}case "transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case "nullable":{let x=this.process(n.innerType,d);this.target==="openapi-3.0"?(a.ref=n.innerType,h.nullable=true):h.anyOf=[x,{type:"null"}];break}case "nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "success":{let x=h;x.type="boolean";break}case "default":{this.process(n.innerType,d),a.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case "prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case "catch":{this.process(n.innerType,d),a.ref=n.innerType;let x;try{x=n.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=x;break}case "nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case "template_literal":{let x=h,w=t._zod.pattern;if(!w)throw new Error("Pattern not found in template literal");x.type="string",x.pattern=w.source;break}case "pipe":{let x=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(x,d),a.ref=x;break}case "readonly":{this.process(n.innerType,d),a.ref=n.innerType,h.readOnly=true;break}case "promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case "optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "lazy":{let x=t._zod.innerType;this.process(x,d),a.ref=x;break}case "custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case "function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&rr(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=f=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let w=o.external.registry.get(f[0])?.id,k=o.external.uri??(P=>P);if(w)return {ref:k(w)};let T=f[1].defId??f[1].schema.id??`schema${this.counter++}`;return f[1].defId=T,{defId:T,ref:`${k("__shared")}#/${d}/${T}`}}if(f[1]===n)return {ref:"#"};let h=`#/${d}/`,x=f[1].schema.id??`__schema${this.counter++}`;return {defId:x,ref:h+x}},s=f=>{if(f[1].schema.$ref)return;let d=f[1],{ref:g,defId:h}=i(f);d.def={...d.schema},h&&(d.defId=h);let x=d.schema;for(let w in x)delete x[w];x.$ref=g;};if(o.cycles==="throw")for(let f of this.seen.entries()){let d=f[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
61
61
 
62
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of this.seen.entries()){let d=f[1];if(t===f[0]){s(f);continue}if(o.external){let h=o.external.registry.get(f[0])?.id;if(t!==f[0]&&h){s(f);continue}}if(this.metadataRegistry.get(f[0])?.id){s(f);continue}if(d.cycle){s(f);continue}if(d.count>1&&o.reused==="ref"){s(f);continue}}let a=(f,d)=>{let g=this.seen.get(f),h=g.def??g.schema,v={...h};if(g.ref===null)return;let E=g.ref;if(g.ref=null,E){a(E,d);let R=this.seen.get(E).schema;R.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(R)):(Object.assign(h,R),Object.assign(h,v));}g.isParent||this.override({zodSchema:f,jsonSchema:h,path:g.path??[]});};for(let f of [...this.seen.entries()].reverse())a(f[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let f=o.external.registry.get(t)?.id;if(!f)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(f);}Object.assign(c,n.def);let u=o.external?.defs??{};for(let f of this.seen.entries()){let d=f[1];d.def&&d.defId&&(u[d.defId]=d.def);}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function dv(e,t){if(e instanceof mc){let o=new pl(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u);}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s});}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n};}return {schemas:i}}let r=new pl(t);return r.process(e),r.emit(e,t)}function rr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let n=e._zod.def;switch(n.type){case "string":case "number":case "bigint":case "boolean":case "date":case "symbol":case "undefined":case "null":case "any":case "unknown":case "never":case "void":case "literal":case "enum":case "nan":case "file":case "template_literal":return false;case "array":return rr(n.element,r);case "object":{for(let i in n.shape)if(rr(n.shape[i],r))return true;return false}case "union":{for(let i of n.options)if(rr(i,r))return true;return false}case "intersection":return rr(n.left,r)||rr(n.right,r);case "tuple":{for(let i of n.items)if(rr(i,r))return true;return !!(n.rest&&rr(n.rest,r))}case "record":return rr(n.keyType,r)||rr(n.valueType,r);case "map":return rr(n.keyType,r)||rr(n.valueType,r);case "set":return rr(n.valueType,r);case "promise":case "optional":case "nonoptional":case "nullable":case "readonly":return rr(n.innerType,r);case "lazy":return rr(n.getter(),r);case "default":return rr(n.innerType,r);case "prefault":return rr(n.innerType,r);case "custom":return false;case "transform":return true;case "pipe":return rr(n.in,r)||rr(n.out,r);case "success":return false;case "catch":return false;case "function":return false;}throw new Error(`Unknown schema type: ${n.type}`)}var l5={};var Cm={};Er(Cm,{ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,date:()=>mv,datetime:()=>pv,duration:()=>gv,time:()=>hv});var Om=B("ZodISODateTime",(e,t)=>{kx.init(e,t),et.init(e,t);});function pv(e){return R1(Om,e)}var Nm=B("ZodISODate",(e,t)=>{Rx.init(e,t),et.init(e,t);});function mv(e){return T1(Nm,e)}var Pm=B("ZodISOTime",(e,t)=>{Tx.init(e,t),et.init(e,t);});function hv(e){return $1(Pm,e)}var Bm=B("ZodISODuration",(e,t)=>{$x.init(e,t),et.init(e,t);});function gv(e){return O1(Bm,e)}var p5=(e,t)=>{Ff.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Vf(e,r)},flatten:{value:r=>Hf(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,sc,2);}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,sc,2);}},isEmpty:{get(){return e.issues.length===0}}});},L3=B("ZodError",p5),Xr=B("ZodError",p5,{Parent:Error});var yv=uc(Xr),bv=fc(Xr),xv=lc(Xr),vv=dc(Xr),wv=jp(Xr),_v=Fp(Xr),Ev=Hp(Xr),Sv=Vp(Xr),Iv=Zp(Xr),Av=Gp(Xr),kv=qp(Xr),Rv=Wp(Xr);var ke=B("ZodType",(e,t)=>(we.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(te.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Mr(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>yv(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>xv(e,r,o),e.parseAsync=async(r,o)=>bv(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>vv(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>wv(e,r,o),e.decode=(r,o)=>_v(e,r,o),e.encodeAsync=async(r,o)=>Ev(e,r,o),e.decodeAsync=async(r,o)=>Sv(e,r,o),e.safeEncode=(r,o)=>Iv(e,r,o),e.safeDecode=(r,o)=>Av(e,r,o),e.safeEncodeAsync=async(r,o)=>kv(e,r,o),e.safeDecodeAsync=async(r,o)=>Rv(e,r,o),e.refine=(r,o)=>e.check(Q5(r,o)),e.superRefine=r=>e.check(eI(r)),e.overwrite=r=>e.check(Xo(r)),e.optional=()=>Lm(e),e.nullable=()=>Um(e),e.nullish=()=>Lm(Um(e)),e.nonoptional=r=>j5(e,r),e.array=()=>Fm(e),e.or=r=>Yv([e,r]),e.and=r=>k5(e,r),e.transform=r=>Mm(e,ew(r)),e.default=r=>U5(e,r),e.prefault=r=>D5(e,r),e.catch=r=>V5(e,r),e.pipe=r=>Mm(e,r),e.readonly=()=>q5(e),e.describe=r=>{let o=e.clone();return vo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return vo.get(e)?.description},configurable:true}),e.meta=(...r)=>{if(r.length===0)return vo.get(e);let o=e.clone();return vo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ov=B("_ZodString",(e,t)=>{Hs.init(e,t),ke.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(rl(...o)),e.includes=(...o)=>e.check(il(...o)),e.startsWith=(...o)=>e.check(sl(...o)),e.endsWith=(...o)=>e.check(al(...o)),e.min=(...o)=>e.check(Gi(...o)),e.max=(...o)=>e.check(gc(...o)),e.length=(...o)=>e.check(yc(...o)),e.nonempty=(...o)=>e.check(Gi(1,...o)),e.lowercase=o=>e.check(nl(o)),e.uppercase=o=>e.check(ol(o)),e.trim=()=>e.check(fl()),e.normalize=(...o)=>e.check(ul(...o)),e.toLowerCase=()=>e.check(ll()),e.toUpperCase=()=>e.check(dl());}),hl=B("ZodString",(e,t)=>{Hs.init(e,t),Ov.init(e,t),e.email=r=>e.check(lm(Nv,r)),e.url=r=>e.check(el(Dm,r)),e.jwt=r=>e.check($m(qv,r)),e.emoji=r=>e.check(gm(Pv,r)),e.guid=r=>e.check(Qf(zm,r)),e.uuid=r=>e.check(dm(ei,r)),e.uuidv4=r=>e.check(pm(ei,r)),e.uuidv6=r=>e.check(mm(ei,r)),e.uuidv7=r=>e.check(hm(ei,r)),e.nanoid=r=>e.check(ym(Bv,r)),e.guid=r=>e.check(Qf(zm,r)),e.cuid=r=>e.check(bm(Cv,r)),e.cuid2=r=>e.check(xm(zv,r)),e.ulid=r=>e.check(vm(Lv,r)),e.base64=r=>e.check(km(Vv,r)),e.base64url=r=>e.check(Rm(Zv,r)),e.xid=r=>e.check(wm(Uv,r)),e.ksuid=r=>e.check(_m(Mv,r)),e.ipv4=r=>e.check(Em(Dv,r)),e.ipv6=r=>e.check(Sm(jv,r)),e.cidrv4=r=>e.check(Im(Fv,r)),e.cidrv6=r=>e.check(Am(Hv,r)),e.e164=r=>e.check(Tm(Gv,r)),e.datetime=r=>e.check(pv(r)),e.date=r=>e.check(mv(r)),e.time=r=>e.check(hv(r)),e.duration=r=>e.check(gv(r));});function Tv(e){return I1(hl,e)}var et=B("ZodStringFormat",(e,t)=>{Xe.init(e,t),Ov.init(e,t);}),Nv=B("ZodEmail",(e,t)=>{bx.init(e,t),et.init(e,t);});function M3(e){return lm(Nv,e)}var zm=B("ZodGUID",(e,t)=>{gx.init(e,t),et.init(e,t);});function D3(e){return Qf(zm,e)}var ei=B("ZodUUID",(e,t)=>{yx.init(e,t),et.init(e,t);});function j3(e){return dm(ei,e)}function F3(e){return pm(ei,e)}function H3(e){return mm(ei,e)}function V3(e){return hm(ei,e)}var Dm=B("ZodURL",(e,t)=>{xx.init(e,t),et.init(e,t);});function Z3(e){return el(Dm,e)}function G3(e){return el(Dm,{protocol:/^https?$/,hostname:kn.domain,...te.normalizeParams(e)})}var Pv=B("ZodEmoji",(e,t)=>{vx.init(e,t),et.init(e,t);});function q3(e){return gm(Pv,e)}var Bv=B("ZodNanoID",(e,t)=>{wx.init(e,t),et.init(e,t);});function W3(e){return ym(Bv,e)}var Cv=B("ZodCUID",(e,t)=>{_x.init(e,t),et.init(e,t);});function K3(e){return bm(Cv,e)}var zv=B("ZodCUID2",(e,t)=>{Ex.init(e,t),et.init(e,t);});function J3(e){return xm(zv,e)}var Lv=B("ZodULID",(e,t)=>{Sx.init(e,t),et.init(e,t);});function Y3(e){return vm(Lv,e)}var Uv=B("ZodXID",(e,t)=>{Ix.init(e,t),et.init(e,t);});function X3(e){return wm(Uv,e)}var Mv=B("ZodKSUID",(e,t)=>{Ax.init(e,t),et.init(e,t);});function Q3(e){return _m(Mv,e)}var Dv=B("ZodIPv4",(e,t)=>{Ox.init(e,t),et.init(e,t);});function eB(e){return Em(Dv,e)}var jv=B("ZodIPv6",(e,t)=>{Nx.init(e,t),et.init(e,t);});function tB(e){return Sm(jv,e)}var Fv=B("ZodCIDRv4",(e,t)=>{Px.init(e,t),et.init(e,t);});function rB(e){return Im(Fv,e)}var Hv=B("ZodCIDRv6",(e,t)=>{Bx.init(e,t),et.init(e,t);});function nB(e){return Am(Hv,e)}var Vv=B("ZodBase64",(e,t)=>{zx.init(e,t),et.init(e,t);});function oB(e){return km(Vv,e)}var Zv=B("ZodBase64URL",(e,t)=>{Lx.init(e,t),et.init(e,t);});function iB(e){return Rm(Zv,e)}var Gv=B("ZodE164",(e,t)=>{Ux.init(e,t),et.init(e,t);});function sB(e){return Tm(Gv,e)}var qv=B("ZodJWT",(e,t)=>{Mx.init(e,t),et.init(e,t);});function aB(e){return $m(qv,e)}var gl=B("ZodCustomStringFormat",(e,t)=>{Dx.init(e,t),et.init(e,t);});function cB(e,t,r={}){return bc(gl,e,t,r)}function uB(e){return bc(gl,"hostname",kn.hostname,e)}function fB(e){return bc(gl,"hex",kn.hex,e)}function lB(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=kn[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return bc(gl,o,n,t)}var yl=B("ZodNumber",(e,t)=>{nm.init(e,t),ke.init(e,t),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Yr(o,n)),e.min=(o,n)=>e.check(Yr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(Rn(o,n)),e.max=(o,n)=>e.check(Rn(o,n)),e.int=o=>e.check($v(o)),e.safe=o=>e.check($v(o)),e.positive=o=>e.check(Yo(0,o)),e.nonnegative=o=>e.check(Yr(0,o)),e.negative=o=>e.check(Jo(0,o)),e.nonpositive=o=>e.check(Rn(0,o)),e.multipleOf=(o,n)=>e.check(Vs(o,n)),e.step=(o,n)=>e.check(Vs(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=true,e.format=r.format??null;});function m5(e){return N1(yl,e)}var vc=B("ZodNumberFormat",(e,t)=>{jx.init(e,t),yl.init(e,t);});function $v(e){return B1(vc,e)}function dB(e){return C1(vc,e)}function pB(e){return z1(vc,e)}function mB(e){return L1(vc,e)}function hB(e){return U1(vc,e)}var bl=B("ZodBoolean",(e,t)=>{Wf.init(e,t),ke.init(e,t);});function h5(e){return M1(bl,e)}var xl=B("ZodBigInt",(e,t)=>{om.init(e,t),ke.init(e,t),e.gte=(o,n)=>e.check(Yr(o,n)),e.min=(o,n)=>e.check(Yr(o,n)),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Yr(o,n)),e.min=(o,n)=>e.check(Yr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(Rn(o,n)),e.max=(o,n)=>e.check(Rn(o,n)),e.positive=o=>e.check(Yo(BigInt(0),o)),e.negative=o=>e.check(Jo(BigInt(0),o)),e.nonpositive=o=>e.check(Rn(BigInt(0),o)),e.nonnegative=o=>e.check(Yr(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Vs(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function gB(e){return j1(xl,e)}var Wv=B("ZodBigIntFormat",(e,t)=>{Fx.init(e,t),xl.init(e,t);});function yB(e){return H1(Wv,e)}function bB(e){return V1(Wv,e)}var g5=B("ZodSymbol",(e,t)=>{Hx.init(e,t),ke.init(e,t);});function xB(e){return Z1(g5,e)}var y5=B("ZodUndefined",(e,t)=>{Vx.init(e,t),ke.init(e,t);});function vB(e){return G1(y5,e)}var b5=B("ZodNull",(e,t)=>{Zx.init(e,t),ke.init(e,t);});function x5(e){return q1(b5,e)}var v5=B("ZodAny",(e,t)=>{Gx.init(e,t),ke.init(e,t);});function wB(){return W1(v5)}var w5=B("ZodUnknown",(e,t)=>{qx.init(e,t),ke.init(e,t);});function xc(){return K1(w5)}var _5=B("ZodNever",(e,t)=>{Wx.init(e,t),ke.init(e,t);});function Kv(e){return J1(_5,e)}var E5=B("ZodVoid",(e,t)=>{Kx.init(e,t),ke.init(e,t);});function _B(e){return Y1(E5,e)}var jm=B("ZodDate",(e,t)=>{Jx.init(e,t),ke.init(e,t),e.min=(o,n)=>e.check(Yr(o,n)),e.max=(o,n)=>e.check(Rn(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null;});function EB(e){return X1(jm,e)}var S5=B("ZodArray",(e,t)=>{Yx.init(e,t),ke.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Gi(r,o)),e.nonempty=r=>e.check(Gi(1,r)),e.max=(r,o)=>e.check(gc(r,o)),e.length=(r,o)=>e.check(yc(r,o)),e.unwrap=()=>e.element;});function Fm(e,t){return sv(S5,e,t)}function SB(e){let t=e._zod.def.shape;return Qv(Object.keys(t))}var Hm=B("ZodObject",(e,t)=>{Xx.init(e,t),ke.init(e,t),te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Qv(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:xc()}),e.loose=()=>e.clone({...e._zod.def,catchall:xc()}),e.strict=()=>e.clone({...e._zod.def,catchall:Kv()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>te.extend(e,r),e.safeExtend=r=>te.safeExtend(e,r),e.merge=r=>te.merge(e,r),e.pick=r=>te.pick(e,r),e.omit=r=>te.omit(e,r),e.partial=(...r)=>te.partial(tw,e,r[0]),e.required=(...r)=>te.required(rw,e,r[0]);});function IB(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new Hm(r)}function AB(e,t){return new Hm({type:"object",shape:e,catchall:Kv(),...te.normalizeParams(t)})}function kB(e,t){return new Hm({type:"object",shape:e,catchall:xc(),...te.normalizeParams(t)})}var Jv=B("ZodUnion",(e,t)=>{im.init(e,t),ke.init(e,t),e.options=t.options;});function Yv(e,t){return new Jv({type:"union",options:e,...te.normalizeParams(t)})}var I5=B("ZodDiscriminatedUnion",(e,t)=>{Jv.init(e,t),Qx.init(e,t);});function RB(e,t,r){return new I5({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}var A5=B("ZodIntersection",(e,t)=>{e1.init(e,t),ke.init(e,t);});function k5(e,t){return new A5({type:"intersection",left:e,right:t})}var R5=B("ZodTuple",(e,t)=>{sm.init(e,t),ke.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function T5(e,t,r){let o=t instanceof we,n=o?r:t,i=o?t:null;return new R5({type:"tuple",items:e,rest:i,...te.normalizeParams(n)})}var Xv=B("ZodRecord",(e,t)=>{t1.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function $5(e,t,r){return new Xv({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}function TB(e,t,r){let o=Mr(e);return o._zod.values=void 0,new Xv({type:"record",keyType:o,valueType:t,...te.normalizeParams(r)})}var O5=B("ZodMap",(e,t)=>{r1.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function $B(e,t,r){return new O5({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}var N5=B("ZodSet",(e,t)=>{n1.init(e,t),ke.init(e,t),e.min=(...r)=>e.check(Zs(...r)),e.nonempty=r=>e.check(Zs(1,r)),e.max=(...r)=>e.check(hc(...r)),e.size=(...r)=>e.check(tl(...r));});function OB(e,t){return new N5({type:"set",valueType:e,...te.normalizeParams(t)})}var ml=B("ZodEnum",(e,t)=>{o1.init(e,t),ke.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})};});function Qv(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ml({type:"enum",entries:r,...te.normalizeParams(t)})}function NB(e,t){return new ml({type:"enum",entries:e,...te.normalizeParams(t)})}var P5=B("ZodLiteral",(e,t)=>{i1.init(e,t),ke.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 PB(e,t){return new P5({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}var B5=B("ZodFile",(e,t)=>{s1.init(e,t),ke.init(e,t),e.min=(r,o)=>e.check(Zs(r,o)),e.max=(r,o)=>e.check(hc(r,o)),e.mime=(r,o)=>e.check(cl(Array.isArray(r)?r:[r],o));});function BB(e){return av(B5,e)}var C5=B("ZodTransform",(e,t)=>{a1.init(e,t),ke.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Di(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(te.issue(i,r.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(te.issue(s));}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)};});function ew(e){return new C5({type:"transform",transform:e})}var tw=B("ZodOptional",(e,t)=>{c1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Lm(e){return new tw({type:"optional",innerType:e})}var z5=B("ZodNullable",(e,t)=>{u1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Um(e){return new z5({type:"nullable",innerType:e})}function CB(e){return Lm(Um(e))}var L5=B("ZodDefault",(e,t)=>{f1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function U5(e,t){return new L5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var M5=B("ZodPrefault",(e,t)=>{l1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function D5(e,t){return new M5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var rw=B("ZodNonOptional",(e,t)=>{d1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function j5(e,t){return new rw({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}var F5=B("ZodSuccess",(e,t)=>{p1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function zB(e){return new F5({type:"success",innerType:e})}var H5=B("ZodCatch",(e,t)=>{m1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function V5(e,t){return new H5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Z5=B("ZodNaN",(e,t)=>{h1.init(e,t),ke.init(e,t);});function LB(e){return ev(Z5,e)}var nw=B("ZodPipe",(e,t)=>{g1.init(e,t),ke.init(e,t),e.in=t.in,e.out=t.out;});function Mm(e,t){return new nw({type:"pipe",in:e,out:t})}var ow=B("ZodCodec",(e,t)=>{nw.init(e,t),Kf.init(e,t);});function UB(e,t,r){return new ow({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var G5=B("ZodReadonly",(e,t)=>{y1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function q5(e){return new G5({type:"readonly",innerType:e})}var W5=B("ZodTemplateLiteral",(e,t)=>{b1.init(e,t),ke.init(e,t);});function MB(e,t){return new W5({type:"template_literal",parts:e,...te.normalizeParams(t)})}var K5=B("ZodLazy",(e,t)=>{w1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.getter();});function J5(e){return new K5({type:"lazy",getter:e})}var Y5=B("ZodPromise",(e,t)=>{v1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function DB(e){return new Y5({type:"promise",innerType:e})}var X5=B("ZodFunction",(e,t)=>{x1.init(e,t),ke.init(e,t);});function jB(e){return new X5({type:"function",input:Array.isArray(e?.input)?T5(e?.input):e?.input??Fm(xc()),output:e?.output??xc()})}var Vm=B("ZodCustom",(e,t)=>{_1.init(e,t),ke.init(e,t);});function FB(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function HB(e,t){return cv(Vm,e??(()=>true),t)}function Q5(e,t={}){return uv(Vm,e,t)}function eI(e){return fv(e)}function VB(e,t={error:`Input not instance of ${e.name}`}){let r=new Vm({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...te.normalizeParams(t)});return r._zod.bag.Class=e,r}var ZB=(...e)=>lv({Codec:ow,Boolean:bl,String:hl},...e);function GB(e){let t=J5(()=>Yv([Tv(e),m5(),h5(),x5(),Fm(t),$5(Tv(),t)]));return t}function qB(e,t){return Mm(ew(e),t)}var WB={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function KB(e){wt({customError:e});}function JB(){return wt().customError}var iw;iw||(iw={});var sw={};Er(sw,{bigint:()=>eC,boolean:()=>QB,date:()=>tC,number:()=>XB,string:()=>YB});function YB(e){return A1(hl,e)}function XB(e){return P1(yl,e)}function QB(e){return D1(bl,e)}function eC(e){return F1(xl,e)}function tC(e){return Q1(jm,e)}wt(am());var rC="https://api.adland.space",nC="http://localhost:3069";function oC(e,t){return e?e.replace(/\/$/,""):t==="development"?nC:rC}function iC(){return typeof process>"u"||!process.env?{}:{override:process.env.NEXT_PUBLIC_ADLAND_API_URL,nodeEnv:"production"}}var{override:sC,nodeEnv:aC}=iC(),aw=oC(sC,aC);function cC(e,t){return Object.assign(e,{choices:t})}function _c(e){return {...e,process:t=>uC(e,t),safeProcess:t=>fC(e,t)}}async function uC(e,t){console.log("processAd:input",t);let r=e.data.parse(t);console.log("processAd:data",r),e.verify&&await e.verify(t);let o=e.getMetadata&&e.metadata?await e.getMetadata(r):void 0;return {data:r,metadata:o,type:e.type}}async function fC(e,t){let r=e.data.safeParse(t);if(!r.success)return {success:false,error:r.error};let o=r.data;if(e.verify)try{await e.verify(o);}catch(i){return {success:false,error:i instanceof Error?i.message:"Verification failed"}}let n=e.getMetadata&&e.metadata?await e.getMetadata(o):void 0;return {success:true,data:o,metadata:n}}var Xn=`${aw}/adland`;async function vl(e,t){return fetch(e,{method:"POST",body:JSON.stringify(t)}).then(r=>r.json())}async function wc(e){return fetch(e).then(t=>t.json())}var Qn={verify:{cast({hash:e}){return vl(`${Xn}/verify/cast`,{hash:e})},miniapp({domain:e}){return vl(`${Xn}/verify/miniapp`,{domain:e})},profile({fid:e}){return vl(`${Xn}/verify/profile`,{fid:e})},token({address:e,chainId:t}){return vl(`${Xn}/verify/token`,{address:e,chainId:t})},tweet({url:e}){return vl(`${Xn}/verify/tweet`,{url:e})}},metadata:{cast({hash:e}){return wc(`${Xn}/metadata/cast?hash=${encodeURIComponent(e)}`)},miniapp({url:e}){return wc(`${Xn}/metadata/miniapp?url=${encodeURIComponent(e)}`)},link({url:e}){return wc(`${Xn}/metadata/link?url=${encodeURIComponent(e)}`)},profile({fid:e}){return wc(`${Xn}/metadata/profile?fid=${encodeURIComponent(e)}`)},token({address:e,chainId:t}){return wc(`${Xn}/metadata/token?address=${encodeURIComponent(e)}&chainId=${t}`)},tweet({url:e}){return wc(`${Xn}/metadata/tweet?url=${encodeURIComponent(e)}`)}}};function lC(e){let t=e.embeds?.images?.[0];return t&&(t.media?.staticRaster||t.url||t.sourceUrl)||null}_c({type:"cast",data:pe.object({hash:pe.string().nonempty("Hash is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({hash:e}){if(!/^0x[0-9a-fA-F]{40}$/.test(e))throw new Error("Invalid Farcaster cast hash");if(!(await Qn.verify.cast({hash:e})).verified)throw new Error("Cast hash verification failed")},async getMetadata({hash:e}){let{cast:t}=await Qn.metadata.cast({hash:e});return {displayName:t.author.displayName,username:t.author.username,pfpUrl:t.author.pfp?.url,text:t.text,timestamp:String(t.timestamp),image:lC(t)??void 0}}});_c({type:"link",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({title:pe.string().optional(),description:pe.string().optional(),image:pe.string().optional(),icon:pe.string().optional()}),async verify({url:e}){if(!e.startsWith("http"))throw new Error("Invalid link")},async getMetadata({url:e}){let t=await Qn.metadata.link({url:e});return {title:t.title,description:t.description,image:t.image,icon:t.icon}}});_c({type:"miniapp",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({icon:pe.string().optional(),title:pe.string().optional(),description:pe.string().optional(),imageUrl:pe.string().optional(),creator:pe.object({fid:pe.number(),username:pe.string().nullable().optional(),displayName:pe.string().nullable().optional(),pfpUrl:pe.string().nullable().optional()}).nullable().optional()}),async verify({url:e}){let t="Miniapp domain verification failed",r=e.split("//")[1];if(console.log("verifyMiniapp:domain",r),!r)throw new Error(t);let o=await Qn.verify.miniapp({domain:r});if(console.log("verifyMiniapp:res",o),!o.verified)throw new Error(t)},async getMetadata({url:e}){let t=await Qn.metadata.miniapp({url:e});return console.log("getMetadata:res",t),{icon:t.icon,title:t.title,description:t.description,imageUrl:t.imageUrl,creator:t.creator}}});_c({type:"farcasterProfile",data:pe.object({fid:pe.string().nonempty("Fid is required")}),metadata:pe.object({pfpUrl:pe.string().optional(),bio:pe.string().optional(),username:pe.string().optional(),displayName:pe.string().optional(),followers:pe.number().optional(),following:pe.number().optional(),pro:pe.boolean().optional()}),async verify({fid:e}){if(!(await Qn.verify.profile({fid:e})).verified)throw new Error("Farcaster profile verification failed")},async getMetadata({fid:e}){let t=await Qn.metadata.profile({fid:e});return {pfpUrl:t.pfpUrl,bio:t.bio,username:t.username,displayName:t.displayName,followers:t.followers,following:t.following,pro:t.pro}}});var dC="eip155",cw=[{chainId:1,label:"Ethereum",coingeckoPlatform:"ethereum",dexscreenerSlug:"ethereum"},{chainId:8453,label:"Base",coingeckoPlatform:"base",dexscreenerSlug:"base"},{chainId:42161,label:"Arbitrum",coingeckoPlatform:"arbitrum-one",dexscreenerSlug:"arbitrum"},{chainId:4663,label:"Robinhood",coingeckoPlatform:null,dexscreenerSlug:null}],pC=cw.map(e=>e.chainId);function mC(e){return pC.includes(e)}function hC(e){return cw.find(t=>t.chainId===e)}function tI(e,t){return `${dC}:${e}/erc20:${t}`}_c({type:"token",data:pe.object({address:pe.string().nonempty("Address is required"),chainId:cC(pe.number().int().positive("Chain ID is required").refine(mC,"Token ads are only supported on Ethereum, Base, Arbitrum and Robinhood"),cw.map(e=>({label:`${e.label} (${e.chainId})`,value:e.chainId})))}),metadata:pe.object({name:pe.string().optional(),symbol:pe.string().optional(),decimals:pe.number().optional(),logoURI:pe.string().optional()}),async verify({address:e,chainId:t}){if(!(await Qn.verify.token({address:e,chainId:t})).verified)throw new Error("Token verification failed")},async getMetadata({address:e,chainId:t}){let r=await Qn.metadata.token({address:e,chainId:t});return {name:r.name,symbol:r.symbol,decimals:r.decimals,logoURI:r.logoURI}}});var gC=/(?:twitter\.com|x\.com)\/\w+\/status\/\d+/;_c({type:"tweet",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({url:e}){if(!gC.test(e))throw new Error("Not an X post link \u2014 expected https://x.com/user/status/123");if(!(await Qn.verify.tweet({url:e})).verified)throw new Error("That post could not be read \u2014 it may be deleted, or from a protected account")},async getMetadata({url:e}){let t=await Qn.metadata.tweet({url:e});return {displayName:t.author.name,username:t.author.username,pfpUrl:t.author.pfpUrl,text:t.text,timestamp:String(Date.parse(t.createdAt)),image:t.image??void 0}}});function uw(e){switch(e.type){case "link":case "miniapp":case "tweet":return e.data.url;case "cast":return `https://farcaster.xyz/~/conversations/${e.data.hash}`;case "farcasterProfile":return `https://farcaster.xyz/~/profiles/${e.data.fid}`;case "token":{let t=hC(e.data.chainId)?.dexscreenerSlug;return t?`https://dexscreener.com/${t}/${e.data.address}`:null}default:return null}}var wl={};Er(wl,{InvalidDomainManifest:()=>fw,RejectedByUser:()=>lw});var eo=class extends Error{name="BaseError";cause;constructor(t,r={}){super(t,r.cause?{cause:r.cause}:void 0),this.cause=r.cause;}};var fw=class extends eo{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},lw=class extends eo{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var Ec={};Er(Ec,{RejectedByUser:()=>dw});var dw=class extends eo{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var Sc={};Er(Sc,{GenericError:()=>hw,InvalidDomain:()=>mw,RejectedByUser:()=>pw});var pw=class extends eo{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},mw=class extends eo{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},hw=class extends eo{name="SignManifest.GenericError";constructor(t="Manifest signing failed"){super(t);}};var ie={};Er(ie,{BRAND:()=>ZC,DIRTY:()=>Gs,EMPTY_PATH:()=>EC,INVALID:()=>ge,NEVER:()=>Tz,OK:()=>Sr,ParseStatus:()=>mr,Schema:()=>Re,ZodAny:()=>Ki,ZodArray:()=>oi,ZodBigInt:()=>Ws,ZodBoolean:()=>Ks,ZodBranded:()=>El,ZodCatch:()=>sa,ZodDate:()=>Js,ZodDefault:()=>ia,ZodDiscriminatedUnion:()=>Wm,ZodEffects:()=>On,ZodEnum:()=>na,ZodError:()=>Qr,ZodFirstPartyTypeKind:()=>be,ZodFunction:()=>Jm,ZodIntersection:()=>ea,ZodIssueCode:()=>Y,ZodLazy:()=>ta,ZodLiteral:()=>ra,ZodMap:()=>$c,ZodNaN:()=>Nc,ZodNativeEnum:()=>oa,ZodNever:()=>to,ZodNull:()=>Xs,ZodNullable:()=>Eo,ZodNumber:()=>qs,ZodObject:()=>en,ZodOptional:()=>Tn,ZodParsedType:()=>ce,ZodPipeline:()=>Sl,ZodPromise:()=>Ji,ZodReadonly:()=>aa,ZodRecord:()=>Km,ZodSchema:()=>Re,ZodSet:()=>Oc,ZodString:()=>Wi,ZodSymbol:()=>Rc,ZodTransformer:()=>On,ZodTuple:()=>_o,ZodType:()=>Re,ZodUndefined:()=>Ys,ZodUnion:()=>Qs,ZodUnknown:()=>ni,ZodVoid:()=>Tc,addIssueToContext:()=>se,any:()=>ez,array:()=>oz,bigint:()=>KC,boolean:()=>dI,coerce:()=>Rz,custom:()=>uI,date:()=>JC,datetimeRegex:()=>aI,defaultErrorMap:()=>ti,discriminatedUnion:()=>cz,effect:()=>vz,enum:()=>yz,function:()=>mz,getErrorMap:()=>Ic,getParsedType:()=>wo,instanceof:()=>qC,intersection:()=>uz,isAborted:()=>Gm,isAsync:()=>Ac,isDirty:()=>qm,isValid:()=>qi,late:()=>GC,lazy:()=>hz,literal:()=>gz,makeIssue:()=>_l,map:()=>dz,nan:()=>WC,nativeEnum:()=>bz,never:()=>rz,null:()=>QC,nullable:()=>_z,number:()=>lI,object:()=>iz,objectUtil:()=>gw,oboolean:()=>kz,onumber:()=>Az,optional:()=>wz,ostring:()=>Iz,pipeline:()=>Sz,preprocess:()=>Ez,promise:()=>xz,quotelessJson:()=>vC,record:()=>lz,set:()=>pz,setErrorMap:()=>_C,strictObject:()=>sz,string:()=>fI,symbol:()=>YC,transformer:()=>vz,tuple:()=>fz,undefined:()=>XC,union:()=>az,unknown:()=>tz,util:()=>Ne,void:()=>nz});var Ne;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i;})(Ne||(Ne={}));var gw;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(gw||(gw={}));var ce=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wo=e=>{switch(typeof e){case "undefined":return ce.undefined;case "string":return ce.string;case "number":return Number.isNaN(e)?ce.nan:ce.number;case "boolean":return ce.boolean;case "function":return ce.function;case "bigint":return ce.bigint;case "symbol":return ce.symbol;case "object":return Array.isArray(e)?ce.array:e===null?ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ce.promise:typeof Map<"u"&&e instanceof Map?ce.map:typeof Set<"u"&&e instanceof Set?ce.set:typeof Date<"u"&&e instanceof Date?ce.date:ce.object;default:return ce.unknown}};var Y=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),vC=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Qr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o];},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t;}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else {let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++;}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n));}else o.push(t(n));return {formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Qr.create=e=>new Qr(e);var wC=(e,t)=>{let r;switch(e.code){case Y.invalid_type:e.received===ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case Y.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case Y.invalid_union:r="Invalid input";break;case Y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case Y.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case Y.invalid_arguments:r="Invalid function arguments";break;case Y.invalid_return_type:r="Invalid function return type";break;case Y.invalid_date:r="Invalid date";break;case Y.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ne.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Y.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Y.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Y.custom:r="Invalid input";break;case Y.invalid_intersection_types:r="Intersection results could not be merged";break;case Y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Y.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e);}return {message:r}},ti=wC;var rI=ti;function _C(e){rI=e;}function Ic(){return rI}var _l=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return {...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return {...n,path:i,message:a}},EC=[];function se(e,t){let r=Ic(),o=_l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ti?void 0:ti].filter(n=>!!n)});e.common.issues.push(o);}var mr=class e{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return ge;n.status==="dirty"&&t.dirty(),o.push(n.value);}return {status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s});}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value);}return {status:t.value,value:o}}},ge=Object.freeze({status:"aborted"}),Gs=e=>({status:"dirty",value:e}),Sr=e=>({status:"valid",value:e}),Gm=e=>e.status==="aborted",qm=e=>e.status==="dirty",qi=e=>e.status==="valid",Ac=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message;})(le||(le={}));var $n=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},nI=(e,t)=>{if(qi(t))return {success:true,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new Qr(e.common.issues);return this._error=r,this._error}}};function Ee(e){if(!e)return {};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var Re=class{get description(){return this._def.description}_getType(t){return wo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return {status:new mr,ctx:{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Ac(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parseSync({data:t,path:o.path,parent:o});return nI(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return qi(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:t,path:[],parent:r}).then(o=>qi(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Ac(n)?n:Promise.resolve(n));return nI(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:Y.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?true:(a(),false)):s?true:(a(),false)})}refinement(t,r){return this._refinement((o,n)=>t(o)?true:(n.addIssue(typeof r=="function"?r(o,n):r),false))}_refinement(t){return new On({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return Tn.create(this,this._def)}nullable(){return Eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oi.create(this)}promise(){return Ji.create(this,this._def)}or(t){return Qs.create([this,t],this._def)}and(t){return ea.create(this,t,this._def)}transform(t){return new On({...Ee(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new ia({...Ee(this._def),innerType:this,defaultValue:r,typeName:be.ZodDefault})}brand(){return new El({typeName:be.ZodBranded,type:this,...Ee(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new sa({...Ee(this._def),innerType:this,catchValue:r,typeName:be.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Sl.create(this,t)}readonly(){return aa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},SC=/^c[^\s-]{8,}$/i,IC=/^[0-9a-z]+$/,AC=/^[0-9A-HJKMNP-TV-Z]{26}$/i,kC=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,RC=/^[a-z0-9_-]{21}$/i,TC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$C=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,OC=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,NC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yw,PC=/^(?:(?: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])$/,BC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,CC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,zC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,LC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,UC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,iI="((\\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])))",MC=new RegExp(`^${iI}$`);function sI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function DC(e){return new RegExp(`^${sI(e)}$`)}function aI(e){let t=`${iI}T${sI(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function jC(e,t){return !!((t==="v4"||!t)&&PC.test(e)||(t==="v6"||!t)&&CC.test(e))}function FC(e,t){if(!TC.test(e))return false;try{let[r]=e.split(".");if(!r)return !1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return !(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return false}}function HC(e,t){return !!((t==="v4"||!t)&&BC.test(e)||(t==="v6"||!t)&&zC.test(e))}var Wi=class e extends Re{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ce.string){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.string,received:i.parsedType}),ge}let o=new mr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):a&&se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),o.dirty());}else if(i.kind==="email")OC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"email",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")yw||(yw=new RegExp(NC,"u")),yw.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"emoji",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")kC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"uuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")RC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"nanoid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")SC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")IC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid2",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")AC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ulid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data);}catch{n=this._getOrReturnCtx(t,n),se(n,{validation:"url",code:Y.invalid_string,message:i.message}),o.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"regex",code:Y.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?aI(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?MC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?DC(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?$C.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?jC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ip",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?FC(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"jwt",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?HC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cidr",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?LC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?UC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64url",code:Y.invalid_string,message:i.message}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:Y.invalid_string,...le.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??false,local:t?.local??false,...le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...le.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...le.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...le.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...le.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...le.errToObj(r)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return !!this._def.checks.find(t=>t.kind==="date")}get isTime(){return !!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return !!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return !!this._def.checks.find(t=>t.kind==="email")}get isURL(){return !!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return !!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return !!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return !!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return !!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return !!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return !!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return !!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Wi.create=e=>new Wi({checks:[],typeName:be.ZodString,coerce:e?.coerce??false,...Ee(e)});function VC(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var qs=class e extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ce.number){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.number,received:i.parsedType}),ge}let o,n=new mr;for(let i of this._def.checks)i.kind==="int"?Ne.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="multipleOf"?VC(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_finite,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return !!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ne.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return true;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);}return Number.isFinite(r)&&Number.isFinite(t)}};qs.create=e=>new qs({checks:[],typeName:be.ZodNumber,coerce:e?.coerce||false,...Ee(e)});var Ws=class e extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data);}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ce.bigint)return this._getInvalidInput(t);let o,n=new mr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.bigint,received:r.parsedType}),ge}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ws.create=e=>new Ws({checks:[],typeName:be.ZodBigInt,coerce:e?.coerce??false,...Ee(e)});var Ks=class extends Re{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ce.boolean){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.boolean,received:o.parsedType}),ge}return Sr(t.data)}};Ks.create=e=>new Ks({typeName:be.ZodBoolean,coerce:e?.coerce||false,...Ee(e)});var Js=class e extends Re{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ce.date){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.date,received:i.parsedType}),ge}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_date}),ge}let o=new mr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Js.create=e=>new Js({checks:[],coerce:e?.coerce||false,typeName:be.ZodDate,...Ee(e)});var Rc=class extends Re{_parse(t){if(this._getType(t)!==ce.symbol){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.symbol,received:o.parsedType}),ge}return Sr(t.data)}};Rc.create=e=>new Rc({typeName:be.ZodSymbol,...Ee(e)});var Ys=class extends Re{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.undefined,received:o.parsedType}),ge}return Sr(t.data)}};Ys.create=e=>new Ys({typeName:be.ZodUndefined,...Ee(e)});var Xs=class extends Re{_parse(t){if(this._getType(t)!==ce.null){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.null,received:o.parsedType}),ge}return Sr(t.data)}};Xs.create=e=>new Xs({typeName:be.ZodNull,...Ee(e)});var Ki=class extends Re{constructor(){super(...arguments),this._any=true;}_parse(t){return Sr(t.data)}};Ki.create=e=>new Ki({typeName:be.ZodAny,...Ee(e)});var ni=class extends Re{constructor(){super(...arguments),this._unknown=true;}_parse(t){return Sr(t.data)}};ni.create=e=>new ni({typeName:be.ZodUnknown,...Ee(e)});var to=class extends Re{_parse(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.never,received:r.parsedType}),ge}};to.create=e=>new to({typeName:be.ZodNever,...Ee(e)});var Tc=class extends Re{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.void,received:o.parsedType}),ge}return Sr(t.data)}};Tc.create=e=>new Tc({typeName:be.ZodVoid,...Ee(e)});var oi=class e extends Re{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==ce.array)return se(r,{code:Y.invalid_type,expected:ce.array,received:r.parsedType}),ge;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(se(r,{code:s?Y.too_big:Y.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:n.exactLength.message}),o.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(se(r,{code:Y.too_small,minimum:n.minLength.value,type:"array",inclusive:true,exact:false,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(se(r,{code:Y.too_big,maximum:n.maxLength.value,type:"array",inclusive:true,exact:false,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new $n(r,s,r.path,a)))).then(s=>mr.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new $n(r,s,r.path,a)));return mr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:le.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:le.toString(r)}})}nonempty(t){return this.min(1,t)}};oi.create=(e,t)=>new oi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...Ee(t)});function kc(e){if(e instanceof en){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Tn.create(kc(o));}return new en({...e._def,shape:()=>t})}else return e instanceof oi?new oi({...e._def,type:kc(e.element)}):e instanceof Tn?Tn.create(kc(e.unwrap())):e instanceof Eo?Eo.create(kc(e.unwrap())):e instanceof _o?_o.create(e.items.map(t=>kc(t))):e}var en=class e extends Re{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Ne.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ce.object){let u=this._getOrReturnCtx(t);return se(u,{code:Y.invalid_type,expected:ce.object,received:u.parsedType}),ge}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof to&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let f=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new $n(n,d,n.path,u)),alwaysSet:u in n.data});}if(this._def.catchall instanceof to){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(u==="strict")a.length>0&&(se(n,{code:Y.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let f of a){let d=n.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new $n(n,d,n.path,f)),alwaysSet:f in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let d=await f.key,g=await f.value;u.push({key:d,value:g,alwaysSet:f.alwaysSet});}return u}).then(u=>mr.mergeObjectSync(o,u)):mr.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of Ne.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of Ne.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return kc(this)}partial(t){let r={};for(let o of Ne.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional();}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of Ne.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else {let i=this.shape[o];for(;i instanceof Tn;)i=i._def.innerType;r[o]=i;}return new e({...this._def,shape:()=>r})}keyof(){return cI(Ne.objectKeys(this.shape))}};en.create=(e,t)=>new en({shape:()=>e,unknownKeys:"strip",catchall:to.create(),typeName:be.ZodObject,...Ee(t)});en.strictCreate=(e,t)=>new en({shape:()=>e,unknownKeys:"strict",catchall:to.create(),typeName:be.ZodObject,...Ee(t)});en.lazycreate=(e,t)=>new en({shape:e,unknownKeys:"strip",catchall:to.create(),typeName:be.ZodObject,...Ee(t)});var Qs=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Qr(a.ctx.common.issues));return se(r,{code:Y.invalid_union,unionErrors:s}),ge}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&s.push(u.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Qr(c));return se(r,{code:Y.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}};Qs.create=(e,t)=>new Qs({options:e,typeName:be.ZodUnion,...Ee(t)});var ri=e=>e instanceof ta?ri(e.schema):e instanceof On?ri(e.innerType()):e instanceof ra?[e.value]:e instanceof na?e.options:e instanceof oa?Ne.objectValues(e.enum):e instanceof ia?ri(e._def.innerType):e instanceof Ys?[void 0]:e instanceof Xs?[null]:e instanceof Tn?[void 0,...ri(e.unwrap())]:e instanceof Eo?[null,...ri(e.unwrap())]:e instanceof El||e instanceof aa?ri(e.unwrap()):e instanceof sa?ri(e._def.innerType):[],Wm=class e extends Re{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.object)return se(r,{code:Y.invalid_type,expected:ce.object,received:r.parsedType}),ge;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:Y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=ri(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i);}}return new e({typeName:be.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...Ee(o)})}};function bw(e,t){let r=wo(e),o=wo(t);if(e===t)return {valid:true,data:e};if(r===ce.object&&o===ce.object){let n=Ne.objectKeys(t),i=Ne.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=bw(e[a],t[a]);if(!c.valid)return {valid:false};s[a]=c.data;}return {valid:true,data:s}}else if(r===ce.array&&o===ce.array){if(e.length!==t.length)return {valid:false};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=bw(s,a);if(!c.valid)return {valid:false};n.push(c.data);}return {valid:true,data:n}}else return r===ce.date&&o===ce.date&&+e==+t?{valid:true,data:e}:{valid:false}}var ea=class extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Gm(i)||Gm(s))return ge;let a=bw(i.value,s.value);return a.valid?((qm(i)||qm(s))&&r.dirty(),{status:r.value,value:a.data}):(se(o,{code:Y.invalid_intersection_types}),ge)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};ea.create=(e,t,r)=>new ea({left:e,right:t,typeName:be.ZodIntersection,...Ee(r)});var _o=class e extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.array)return se(o,{code:Y.invalid_type,expected:ce.array,received:o.parsedType}),ge;if(o.data.length<this._def.items.length)return se(o,{code:Y.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),ge;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:Y.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new $n(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>mr.mergeArray(r,s)):mr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};_o.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _o({items:e,typeName:be.ZodTuple,rest:null,...Ee(t)})};var Km=class e extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.object)return se(o,{code:Y.invalid_type,expected:ce.object,received:o.parsedType}),ge;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new $n(o,a,o.path,a)),value:s._parse(new $n(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?mr.mergeObjectAsync(r,n):mr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof Re?new e({keyType:t,valueType:r,typeName:be.ZodRecord,...Ee(o)}):new e({keyType:Wi.create(),valueType:t,typeName:be.ZodRecord,...Ee(r)})}},$c=class extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.map)return se(o,{code:Y.invalid_type,expected:ce.map,received:o.parsedType}),ge;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new $n(o,a,o.path,[u,"key"])),value:i._parse(new $n(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let c of s){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}}}};$c.create=(e,t,r)=>new $c({valueType:t,keyType:e,typeName:be.ZodMap,...Ee(r)});var Oc=class e extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.set)return se(o,{code:Y.invalid_type,expected:ce.set,received:o.parsedType}),ge;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(se(o,{code:Y.too_small,minimum:n.minSize.value,type:"set",inclusive:true,exact:false,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(se(o,{code:Y.too_big,maximum:n.maxSize.value,type:"set",inclusive:true,exact:false,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let f of c){if(f.status==="aborted")return ge;f.status==="dirty"&&r.dirty(),u.add(f.value);}return {status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new $n(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:le.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Oc.create=(e,t)=>new Oc({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...Ee(t)});var Jm=class e extends Re{constructor(){super(...arguments),this.validate=this.implement;}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.function)return se(r,{code:Y.invalid_type,expected:ce.function,received:r.parsedType}),ge;function o(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ic(),ti].filter(u=>!!u),issueData:{code:Y.invalid_arguments,argumentsError:c}})}function n(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ic(),ti].filter(u=>!!u),issueData:{code:Y.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Ji){let a=this;return Sr(async function(...c){let u=new Qr([]),f=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(s,this,f);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else {let a=this;return Sr(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Qr([o(c,u.error)]);let f=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(f,i);if(!d.success)throw new Qr([n(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:_o.create(t).rest(ni.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||_o.create([]).rest(ni.create()),returns:r||ni.create(),typeName:be.ZodFunction,...Ee(o)})}},ta=class extends Re{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ta.create=(e,t)=>new ta({getter:e,typeName:be.ZodLazy,...Ee(t)});var ra=class extends Re{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:Y.invalid_literal,expected:this._def.value}),ge}return {status:"valid",value:t.data}}get value(){return this._def.value}};ra.create=(e,t)=>new ra({value:e,typeName:be.ZodLiteral,...Ee(t)});function cI(e,t){return new na({values:e,typeName:be.ZodEnum,...Ee(t)})}var na=class e extends Re{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{expected:Ne.joinValues(o),received:r.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{received:r.data,code:Y.invalid_enum_value,options:o}),ge}return Sr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};na.create=cI;var oa=class extends Re{_parse(t){let r=Ne.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){let n=Ne.objectValues(r);return se(o,{expected:Ne.joinValues(n),received:o.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(Ne.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=Ne.objectValues(r);return se(o,{received:o.data,code:Y.invalid_enum_value,options:n}),ge}return Sr(t.data)}get enum(){return this._def.values}};oa.create=(e,t)=>new oa({values:e,typeName:be.ZodNativeEnum,...Ee(t)});var Ji=class extends Re{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.promise&&r.common.async===false)return se(r,{code:Y.invalid_type,expected:ce.promise,received:r.parsedType}),ge;let o=r.parsedType===ce.promise?r.data:Promise.resolve(r.data);return Sr(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Ji.create=(e,t)=>new Ji({type:e,typeName:be.ZodPromise,...Ee(t)});var On=class extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{se(o,s),s.fatal?r.abort():r.dirty();},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ge;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?ge:c.status==="dirty"?Gs(c.value):r.value==="dirty"?Gs(c.value):c});{if(r.value==="aborted")return ge;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?ge:a.status==="dirty"?Gs(a.value):r.value==="dirty"?Gs(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===false){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===false){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!qi(s))return ge;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>qi(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):ge);Ne.assertNever(n);}};On.create=(e,t,r)=>new On({schema:e,typeName:be.ZodEffects,effect:t,...Ee(r)});On.createWithPreprocess=(e,t,r)=>new On({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...Ee(r)});var Tn=class extends Re{_parse(t){return this._getType(t)===ce.undefined?Sr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Tn.create=(e,t)=>new Tn({innerType:e,typeName:be.ZodOptional,...Ee(t)});var Eo=class extends Re{_parse(t){return this._getType(t)===ce.null?Sr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Eo.create=(e,t)=>new Eo({innerType:e,typeName:be.ZodNullable,...Ee(t)});var ia=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ia.create=(e,t)=>new ia({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});var sa=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Ac(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Qr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Qr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};sa.create=(e,t)=>new sa({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});var Nc=class extends Re{_parse(t){if(this._getType(t)!==ce.nan){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.nan,received:o.parsedType}),ge}return {status:"valid",value:t.data}}};Nc.create=e=>new Nc({typeName:be.ZodNaN,...Ee(e)});var ZC=Symbol("zod_brand"),El=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Sl=class e extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ge:i.status==="dirty"?(r.dirty(),Gs(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?ge:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:be.ZodPipeline})}},aa=class extends Re{_parse(t){let r=this._def.innerType._parse(t),o=n=>(qi(n)&&(n.value=Object.freeze(n.value)),n);return Ac(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};aa.create=(e,t)=>new aa({innerType:e,typeName:be.ZodReadonly,...Ee(t)});function oI(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function uI(e,t={},r){return e?Ki.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=oI(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=oI(t,o),a=s.fatal??r??true;n.addIssue({code:"custom",...s,fatal:a});}}):Ki.create()}var GC={object:en.lazycreate},be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly";})(be||(be={}));var qC=(e,t={message:`Input not instance of ${e.name}`})=>uI(r=>r instanceof e,t),fI=Wi.create,lI=qs.create,WC=Nc.create,KC=Ws.create,dI=Ks.create,JC=Js.create,YC=Rc.create,XC=Ys.create,QC=Xs.create,ez=Ki.create,tz=ni.create,rz=to.create,nz=Tc.create,oz=oi.create,iz=en.create,sz=en.strictCreate,az=Qs.create,cz=Wm.create,uz=ea.create,fz=_o.create,lz=Km.create,dz=$c.create,pz=Oc.create,mz=Jm.create,hz=ta.create,gz=ra.create,yz=na.create,bz=oa.create,xz=Ji.create,vz=On.create,wz=Tn.create,_z=Eo.create,Ez=On.createWithPreprocess,Sz=Sl.create,Iz=()=>fI().optional(),Az=()=>lI().optional(),kz=()=>dI().optional(),Rz={string:(e=>Wi.create({...e,coerce:true})),number:(e=>qs.create({...e,coerce:true})),boolean:(e=>Ks.create({...e,coerce:true})),bigint:(e=>Ws.create({...e,coerce:true})),date:(e=>Js.create({...e,coerce:true}))};var Tz=ge;var $z=/[@#$%^&*+=/\\|~«»]/,Oz=/(!{2,}|\?{2,}|-{2,})/,Nz=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,ca=({max:e,noSpaces:t}={})=>(t?ie.string().max(e??Number.POSITIVE_INFINITY).regex(/^\S*$/,"Spaces are not allowed"):ie.string().max(e??Number.POSITIVE_INFINITY)).refine(o=>!Nz.test(o),{message:"Emojis and symbols are not allowed"}).refine(o=>!$z.test(o),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, \xAB, \xBB) are not allowed"}).refine(o=>!Oz.test(o),{message:"Repeated punctuations (!!, ??, --) are not allowed"}),ir=ie.string().url().startsWith("https://",{message:"Must be an https url"}).max(1024).refine(e=>!e.includes(" "),{message:"URL must not contain spaces"}).refine(e=>{try{let t=new URL(e).hostname;return !(t==="localhost"||t.endsWith(".localhost")||/^(\d{1,3}\.){3}\d{1,3}$/.test(t)||t.startsWith("[")&&t.endsWith("]"))}catch{return false}},{message:"URL must not use IP addresses or localhost"}),Il=ie.string().max(32),Ym=ie.string().max(32),Pz=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/,pI=ie.string().regex(Pz,{message:"Invalid CAIP-19 asset ID"}),Al=ie.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),Bz=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,mI=ie.string().max(1024).regex(Bz,{message:"Must be a valid domain name (e.g., example.com, sub.example.com)"}).refine(e=>!e.includes("://"),{message:"Domain must not include protocol (http://, https://, etc.)"}).refine(e=>!e.includes("/"),{message:"Domain must not include path separators"}).refine(e=>!e.includes("@"),{message:"Domain must not include @ symbol"}).refine(e=>!e.includes(":"),{message:"Domain must not include port numbers"}),hI=ie.union([ie.literal("1:1"),ie.literal("3:2")]),gI=ie.object({header:ie.string(),payload:ie.string(),signature:ie.string()});ie.object({fid:ie.number(),type:ie.literal("app_key"),key:ie.string().startsWith("0x")});var Cz=ie.object({type:ie.literal("launch_frame"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),zz=ie.object({type:ie.literal("launch_miniapp"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),Lz=ie.object({type:ie.literal("view_token"),token:pI}),Uz=ie.discriminatedUnion("type",[zz,Lz,Cz]),Mz=ie.object({title:Ym,action:Uz});ie.object({version:ie.union([ie.string(),ie.number()]).transform(e=>String(e)).pipe(ie.union([ie.literal("next"),ie.literal("1")])),imageUrl:ir,aspectRatio:hI.optional(),button:Mz});var xw=ie.object({url:ie.string(),token:ie.string()});ie.object({notificationId:ie.string().max(128),title:ie.string().max(32),body:ie.string().max(128),targetUrl:ir,tokens:ie.string().array().max(100)});ie.object({result:ie.object({successfulTokens:ie.array(ie.string()),invalidTokens:ie.array(ie.string()),rateLimitedTokens:ie.array(ie.string())})});var Dz=ie.object({event:ie.literal("miniapp_added"),notificationDetails:xw.optional()}),jz=ie.object({event:ie.literal("miniapp_removed")}),Fz=ie.object({event:ie.literal("notifications_enabled"),notificationDetails:xw.required()}),Hz=ie.object({event:ie.literal("notifications_disabled")});ie.discriminatedUnion("event",[Dz,jz,Fz,Hz]);var yI=["wallet.getEthereumProvider","wallet.getSolanaProvider","actions.ready","actions.openUrl","actions.close","actions.setPrimaryButton","actions.addMiniApp","actions.signIn","actions.viewCast","actions.viewProfile","actions.composeCast","actions.viewToken","actions.sendToken","actions.swapToken","actions.openMiniApp","actions.requestCameraAndMicrophoneAccess","experimental.signManifest","haptics.impactOccurred","haptics.notificationOccurred","haptics.selectionChanged","back"];var Vz=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],Zz=ie.enum(Vz),Gz=ie.union([ie.literal("0.0.0"),ie.literal("0.0.1"),ie.literal("1"),ie.literal("next")]),qz=ca({max:30}),Wz=ca({max:170}),Kz=ie.array(ir).max(3),Jz=ie.array(ca({max:20,noSpaces:true})).max(5),Yz=ca({max:30}),Xz=ca({max:30}),Qz=ca({max:100}),eL=ie.boolean(),tL=["eip155:1","eip155:8453","eip155:42161","eip155:421614","eip155:84532","eip155:666666666","eip155:100","eip155:10","eip155:11155420","eip155:137","eip155:11155111","eip155:7777777","eip155:130","eip155:10143","eip155:42220","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"];function xI(e){let t=new Set(e);return Array.from(t)}var rL=ie.array(ie.enum(tL)).transform(xI),nL=ie.array(ie.enum(yI)).transform(xI),bI=ie.object({version:Gz,name:Il,iconUrl:ir,homeUrl:ir,imageUrl:ir.optional(),buttonTitle:Ym.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional(),webhookUrl:ir.optional(),subtitle:qz.optional(),description:Wz.optional(),screenshotUrls:Kz.optional(),primaryCategory:Zz.optional(),tags:Jz.optional(),heroImageUrl:ir.optional(),tagline:Yz.optional(),ogTitle:Xz.optional(),ogDescription:Qz.optional(),ogImageUrl:ir.optional(),noindex:eL.optional(),requiredChains:rL.optional(),requiredCapabilities:nL.optional(),castShareUrl:ir.optional(),canonicalDomain:mI.optional()}).refine(e=>{if(e.castShareUrl===void 0)return true;try{let t=new URL(e.homeUrl).hostname,r=new URL(e.castShareUrl).hostname;return t===r}catch{return false}},{message:"castShareUrl must have the same domain as homeUrl",path:["castShareUrl"]});ie.object({accountAssociation:gI,miniapp:bI.optional(),frame:bI.optional()}).refine(e=>e.frame&&e.miniapp?JSON.stringify(e.frame)===JSON.stringify(e.miniapp):true,{message:'If both "frame" and "miniapp" are provided, they must be identical',path:["frame","miniapp"]}).transform(e=>({...e,frame:e.frame??e.miniapp}));var xe=Ko(Rl());sh();ai();qw();_a();va();var $o=BigInt(0),Fr=BigInt(1),SA=BigInt(2),r9=BigInt(8),n9={zip215:true};function o9(e){let t=Cl(e);return no(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function IA(e){let t=o9(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=SA<<BigInt(a*8)-Fr,f=r.create,d=di(t.n,t.nBitLength);function g(x,_){let k=r.sqr(x),w=r.sqr(_),p=r.add(r.mul(t.a,k),w),A=r.add(r.ONE,r.mul(t.d,r.mul(k,w)));return r.eql(p,A)}if(!g(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let h=t.uvRatio||((x,_)=>{try{return {isValid:!0,value:r.sqrt(x*r.inv(_))}}catch{return {isValid:false,value:$o}}}),v=t.adjustScalarBytes||(x=>x),E=t.domain||((x,_,k)=>{if(Ro("phflag",k),_.length||k)throw new Error("Contexts/pre-hash are not supported");return x});function R(x,_,k=false){let w=k?Fr:$o;Dr("coordinate "+x,_,w,u);}function $(x){if(!(x instanceof I))throw new Error("ExtendedPoint expected")}let N=Dc((x,_)=>{let{ex:k,ey:w,ez:p}=x,A=x.is0();_==null&&(_=A?r9:r.inv(p));let G=f(k*_),J=f(w*_),Q=f(p*_);if(A)return {x:$o,y:Fr};if(Q!==Fr)throw new Error("invZ was invalid");return {x:G,y:J}}),O=Dc(x=>{let{a:_,d:k}=t;if(x.is0())throw new Error("bad point: ZERO");let{ex:w,ey:p,ez:A,et:G}=x,J=f(w*w),Q=f(p*p),ae=f(A*A),he=f(ae*ae),ye=f(J*_),Ke=f(ae*f(ye+Q)),Se=f(he+f(k*f(J*Q)));if(Ke!==Se)throw new Error("bad point: equation left != right (1)");let _e=f(w*p),tr=f(A*G);if(_e!==tr)throw new Error("bad point: equation left != right (2)");return true});class I{constructor(_,k,w,p){R("x",_),R("y",k),R("z",w,true),R("t",p),this.ex=_,this.ey=k,this.ez=w,this.et=p,Object.freeze(this);}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(_){if(_ instanceof I)throw new Error("extended point not allowed");let{x:k,y:w}=_||{};return R("x",k),R("y",w),new I(k,w,Fr,f(k*w))}static normalizeZ(_){let k=li(r,_.map(w=>w.ez));return _.map((w,p)=>w.toAffine(k[p])).map(I.fromAffine)}static msm(_,k){return lh(I,d,_,k)}_setWindowSize(_){C.setWindowSize(this,_);}assertValidity(){O(this);}equals(_){$(_);let{ex:k,ey:w,ez:p}=this,{ex:A,ey:G,ez:J}=_,Q=f(k*J),ae=f(A*p),he=f(w*J),ye=f(G*p);return Q===ae&&he===ye}is0(){return this.equals(I.ZERO)}negate(){return new I(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:_}=t,{ex:k,ey:w,ez:p}=this,A=f(k*k),G=f(w*w),J=f(SA*f(p*p)),Q=f(_*A),ae=k+w,he=f(f(ae*ae)-A-G),ye=Q+G,Ke=ye-J,Se=Q-G,_e=f(he*Ke),tr=f(ye*Se),Ce=f(he*Se),je=f(Ke*ye);return new I(_e,tr,je,Ce)}add(_){$(_);let{a:k,d:w}=t,{ex:p,ey:A,ez:G,et:J}=this,{ex:Q,ey:ae,ez:he,et:ye}=_,Ke=f(p*Q),Se=f(A*ae),_e=f(J*w*ye),tr=f(G*he),Ce=f((p+A)*(Q+ae)-Ke-Se),je=tr-_e,Mi=tr+_e,mt=f(Se-k*Ke),gt=f(Ce*je),Bp=f(Mi*mt),yt=f(Ce*mt),bt=f(je*Mi);return new I(gt,Bp,bt,yt)}subtract(_){return this.add(_.negate())}wNAF(_){return C.wNAFCached(this,_,I.normalizeZ)}multiply(_){let k=_;Dr("scalar",k,Fr,o);let{p:w,f:p}=this.wNAF(k);return I.normalizeZ([w,p])[0]}multiplyUnsafe(_,k=I.ZERO){let w=_;return Dr("scalar",w,$o,o),w===$o?L:this.is0()||w===Fr?this:C.wNAFCachedUnsafe(this,w,I.normalizeZ,k)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return C.unsafeLadder(this,o).is0()}toAffine(_){return N(this,_)}clearCofactor(){let{h:_}=t;return _===Fr?this:this.multiplyUnsafe(_)}static fromHex(_,k=false){let{d:w,a:p}=t,A=r.BYTES;_=Ge("pointHex",_,A),Ro("zip215",k);let G=_.slice(),J=_[A-1];G[A-1]=J&-129;let Q=ya(G),ae=k?u:r.ORDER;Dr("pointHex.y",Q,$o,ae);let he=f(Q*Q),ye=f(he-Fr),Ke=f(w*he-p),{isValid:Se,value:_e}=h(ye,Ke);if(!Se)throw new Error("Point.fromHex: invalid y coordinate");let tr=(_e&Fr)===Fr,Ce=(J&128)!==0;if(!k&&_e===$o&&Ce)throw new Error("Point.fromHex: x=0 and x_0=1");return Ce!==tr&&(_e=f(-_e)),I.fromAffine({x:_e,y:Q})}static fromPrivateKey(_){let{scalar:k}=H(_);return P.multiply(k)}toRawBytes(){let{x:_,y:k}=this.toAffine(),w=Mc(k,r.BYTES);return w[w.length-1]|=_&Fr?128:0,w}toHex(){return rs(this.toRawBytes())}}I.BASE=new I(t.Gx,t.Gy,Fr,f(t.Gx*t.Gy)),I.ZERO=new I($o,Fr,Fr,$o);let{BASE:P,ZERO:L}=I,C=fh(I,a*8);function D(x){return Ue(x,o)}function q(x){return D(ya(x))}function H(x){let _=r.BYTES;x=Ge("private key",x,_);let k=Ge("hashed private key",i(x),2*_),w=v(k.slice(0,_)),p=k.slice(_,2*_),A=q(w);return {head:w,prefix:p,scalar:A}}function Z(x){let{head:_,prefix:k,scalar:w}=H(x),p=P.multiply(w),A=p.toRawBytes();return {head:_,prefix:k,scalar:w,point:p,pointBytes:A}}function re(x){return Z(x).pointBytes}function S(x=Uint8Array.of(),..._){let k=ar(..._);return q(i(E(k,Ge("context",x),!!n)))}function l(x,_,k={}){x=Ge("message",x),n&&(x=n(x));let{prefix:w,scalar:p,pointBytes:A}=Z(_),G=S(k.context,w,x),J=P.multiply(G).toRawBytes(),Q=S(k.context,J,A,x),ae=D(G+Q*p);Dr("signature.s",ae,$o,o);let he=ar(J,Mc(ae,r.BYTES));return Ge("result",he,r.BYTES*2)}let m=n9;function y(x,_,k,w=m){let{context:p,zip215:A}=w,G=r.BYTES;x=Ge("signature",x,2*G),_=Ge("message",_),k=Ge("publicKey",k,G),A!==void 0&&Ro("zip215",A),n&&(_=n(_));let J=ya(x.slice(G,2*G)),Q,ae,he;try{Q=I.fromHex(k,A),ae=I.fromHex(x.slice(0,G),A),he=P.multiplyUnsafe(J);}catch{return false}if(!A&&Q.isSmallOrder())return false;let ye=S(p,ae.toRawBytes(),Q.toRawBytes(),_);return ae.add(Q.multiplyUnsafe(ye)).subtract(he).clearCofactor().equals(I.ZERO)}return P._setWindowSize(8),{CURVE:t,getPublicKey:re,sign:l,verify:y,ExtendedPoint:I,utils:{getExtendedPublicKey:Z,randomPrivateKey:()=>s(r.BYTES),precompute(x=8,_=I.BASE){return _._setWindowSize(x),_.multiply(BigInt(3)),_}}}}_a();var Ww=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),$A=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var u9=BigInt(1),OA=BigInt(2);BigInt(3);var f9=BigInt(5),l9=BigInt(8);function d9(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=Ww,a=e*e%i*e%i,c=at(a,OA,i)*a%i,u=at(c,u9,i)*e%i,f=at(u,f9,i)*u%i,d=at(f,t,i)*f%i,g=at(d,r,i)*d%i,h=at(g,o,i)*g%i,v=at(h,n,i)*h%i,E=at(v,n,i)*h%i,R=at(E,t,i)*f%i;return {pow_p_5_8:at(R,OA,i)*e%i,b2:a}}function p9(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function m9(e,t){let r=Ww,o=Ue(t*t*t,r),n=Ue(o*o*t,r),i=d9(e*n).pow_p_5_8,s=Ue(e*o*i,r),a=Ue(t*s*s,r),c=s,u=Ue(s*$A,r),f=a===e,d=a===Ue(-e,r),g=a===Ue(-e*$A,r);return f&&(s=c),(d||g)&&(s=u),yA(s,r)&&(s=Ue(-s,r)),{isValid:f||d,value:s}}var NA=di(Ww,void 0,true),h9={a:NA.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:NA,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:l9,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:iA,randomBytes:Lc,adjustScalarBytes:p9,uvRatio:m9},Ea=IA(h9);var Z_=Ko(Jw()),Nr=Ko(Xw());sh();var Ll=ga;var Xc=Ko(GA()),T=Ko(a_()),hR=Ko(a_());var c_=8078e3,u_=8078001,f_=8078004,l_=8078005,d_=8078006,p_=8078011;function QA(e){return Array.isArray(e)?"%5B"+e.map(QA).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Bj([e,t]){return `${e}=${QA(t)}`}function Cj(e){let t=Object.entries(e).map(Bj).join("&");return btoa(t)}function zj(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${Cj(t)}'`),`${r}\``}}var ss=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,o;if(t){let{cause:i,...s}=t;i&&(o={cause:i}),Object.keys(s).length>0&&(r=s);}let n=zj(e,r);super(n,o),this.context={__code:e,...r},this.name="SolanaError";}};function Lj(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function ek(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(Lj(t,e));return e.write(t,r,0),r}})}function tk(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function Zc(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function rk(e,t){if(Zc(e)!==Zc(t))throw new ss(f_);if(Zc(e)&&Zc(t)&&e.fixedSize!==t.fixedSize)throw new ss(l_,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Zc(e)&&!Zc(t)&&e.maxSize!==t.maxSize)throw new ss(d_,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function nk(e,t,r=0){if(t.length-r<=0)throw new ss(c_,{codecDescription:e})}function ok(e,t,r,o=0){let n=r.length-o;if(n<t)throw new ss(u_,{bytesLength:n,codecDescription:e,expected:t})}function Uj(e,t,r,o){if(o<t||o>r)throw new ss(p_,{codecDescription:e,max:r,min:t,value:o})}function ik(e){return e?.endian!==1}function Mj(e){return ek({fixedSize:e.size,write(t,r,o){e.range&&Uj(e.name,e.range[0],e.range[1],t);let n=new ArrayBuffer(e.size);return e.set(new DataView(n),t,ik(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function Dj(e){return tk({fixedSize:e.size,read(t,r=0){nk(e.name,t,r),ok(e.name,e.size,t,r);let o=new DataView(jj(t,r,e.size));return [e.get(o,ik(e.config)),r+e.size]}})}function jj(e,t,r){let o=e.byteOffset+(t??0),n=r??e.byteLength;return e.buffer.slice(o,o+n)}var m_=(e={})=>Mj({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,o)=>t.setBigUint64(0,BigInt(r),o),size:8}),Fj=(e={})=>Dj({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),sk=(e={})=>rk(m_(e),Fj(e));var h_=class extends TypeError{constructor(t,r){let o,{message:n,explanation:i,...s}=t,{path:a}=t,c=a.length===0?n:`At path: ${a.join(".")} -- ${n}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()]);}};function Hj(e){return Hl(e)&&typeof e[Symbol.iterator]=="function"}function Hl(e){return typeof e=="object"&&e!=null}function Mh(e){return Hl(e)&&!Array.isArray(e)}function oo(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Vj(e){let{done:t,value:r}=e.next();return t?void 0:r}function Zj(e,t,r,o){if(e===true)return;e===false?e={}:typeof e=="string"&&(e={message:e});let{path:n,branch:i}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${oo(o)}\``}=e;return {value:o,type:s,refinement:a,key:n[n.length-1],path:n,branch:i,...e,message:c}}function*ak(e,t,r,o){Hj(e)||(e=[e]);for(let n of e){let i=Zj(n,t,r,o);i&&(yield i);}}function*g_(e,t,r={}){let{path:o=[],branch:n=[e],coerce:i=false,mask:s=false}=r,a={path:o,branch:n,mask:s};i&&(e=t.coercer(e,a));let c="valid";for(let u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield [u,void 0];for(let[u,f,d]of t.entries(e,a)){let g=g_(f,d,{path:u===void 0?o:[...o,u],branch:u===void 0?n:[...n,f],coerce:i,mask:s,message:r.message});for(let h of g)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield [h[0],void 0]):i&&(f=h[1],u===void 0?e=f:e instanceof Map?e.set(u,f):e instanceof Set?e.add(f):Hl(e)&&(f!==void 0||u in e)&&(e[u]=f));}if(c!=="not_valid")for(let u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield [u,void 0];c==="valid"&&(yield [void 0,e]);}var Bn=class{constructor(t){let{type:r,schema:o,validator:n,refiner:i,coercer:s=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=o,this.entries=a,this.coercer=s,n?this.validator=(c,u)=>{let f=n(c,u);return ak(f,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let f=i(c,u);return ak(f,u,this,c)}:this.refiner=()=>[];}assert(t,r){return ck(t,this,r)}create(t,r){return Gc(t,this,r)}is(t){return uk(t,this)}mask(t,r){return Gj(t,this,r)}validate(t,r={}){return Vl(t,this,r)}};function ck(e,t,r){let o=Vl(e,t,{message:r});if(o[0])throw o[0]}function Gc(e,t,r){let o=Vl(e,t,{coerce:true,message:r});if(o[0])throw o[0];return o[1]}function Gj(e,t,r){let o=Vl(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function uk(e,t){return !Vl(e,t)[0]}function Vl(e,t,r={}){let o=g_(e,t,r),n=Vj(o);return n[0]?[new h_(n[0],function*(){for(let s of o)s[0]&&(yield s[0]);}),void 0]:[void 0,n[1]]}function ka(e,t){return new Bn({type:e,schema:null,validator:t})}function fk(){return ka("any",()=>true)}function ue(e){return new Bn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,o]of t.entries())yield [r,o,e];},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${oo(t)}`}})}function io(){return ka("boolean",e=>typeof e=="boolean")}function Dh(e){return ka("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${oo(t)}`)}function ct(e){let t=oo(e),r=typeof e;return new Bn({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${oo(o)}`}})}function qj(){return ka("never",()=>false)}function fe(e){return new Bn({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function U(){return ka("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${oo(e)}`)}function me(e){return new Bn({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function y_(e,t){return new Bn({type:"record",schema:null,*entries(r){if(Hl(r))for(let o in r){let n=r[o];yield [o,o,e],yield [o,n,t];}},validator(r){return Mh(r)||`Expected an object, but received: ${oo(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function ne(){return ka("string",e=>typeof e=="string"||`Expected a string, but received: ${oo(e)}`)}function jh(e){let t=qj();return new Bn({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let o=Math.max(e.length,r.length);for(let n=0;n<o;n++)yield [n,r[n],e[n]||t];}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${oo(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function W(e){let t=Object.keys(e);return new Bn({type:"type",schema:e,*entries(r){if(Hl(r))for(let o of t)yield [o,r[o],e[o]];},validator(r){return Mh(r)||`Expected an object, but received: ${oo(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function Ar(e){let t=e.map(r=>r.type).join(" | ");return new Bn({type:"union",schema:null,coercer(r,o){for(let n of e){let[i,s]=n.validate(r,{coerce:true,mask:o.mask});if(!i)return s}return r},validator(r,o){let n=[];for(let i of e){let[...s]=g_(r,i,o),[a]=s;if(a[0])for(let[c]of s)c&&n.push(c);else return []}return [`Expected the value to satisfy a union of \`${t}\`, but received: ${oo(r)}`,...n]}})}function Ra(){return ka("unknown",()=>true)}function qc(e,t,r){return new Bn({...e,coercer:(o,n)=>uk(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Ko(Bk());Ko(Rl(),1);var Jl=Ko(zk(),1);var Lk=Jl.default;Wh();rd();function oR(e){try{return Ea.ExtendedPoint.fromHex(e),!0}catch{return false}}var s6=(e,t)=>Ea.sign(e,t.slice(0,32)),H7=Ea.verify,He=e=>xe.Buffer.isBuffer(e)?e:e instanceof Uint8Array?xe.Buffer.from(e.buffer,e.byteOffset,e.byteLength):xe.Buffer.from(e),q_=class{constructor(t){Object.assign(this,t);}encode(){return xe.Buffer.from((0, Xc.serialize)(e0,this))}static decode(t){return (0, Xc.deserialize)(e0,this,t)}static decodeUnchecked(t){return (0, Xc.deserializeUnchecked)(e0,this,t)}};var e0=new Map,gR,V7=32,ps=32;function Z7(e){return e._bn!==void 0}var iR=1,Ie=class e extends q_{constructor(t){if(super({}),this._bn=void 0,Z7(t))this._bn=t._bn;else {if(typeof t=="string"){let r=Nr.default.decode(t);if(r.length!=ps)throw new Error("Invalid public key input");this._bn=new Z_.default(r);}else this._bn=new Z_.default(t);if(this._bn.byteLength()>ps)throw new Error("Invalid public key input")}}static unique(){let t=new e(iR);return iR+=1,new e(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return Nr.default.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){let t=this._bn.toArrayLike(xe.Buffer);if(t.length===ps)return t;let r=xe.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return `PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,o){let n=xe.Buffer.concat([t.toBuffer(),xe.Buffer.from(r),o.toBuffer()]),i=Ll(n);return new e(i)}static createProgramAddressSync(t,r){let o=xe.Buffer.alloc(0);t.forEach(function(i){if(i.length>V7)throw new TypeError("Max seed length exceeded");o=xe.Buffer.concat([o,He(i)]);}),o=xe.Buffer.concat([o,r.toBuffer(),xe.Buffer.from("ProgramDerivedAddress")]);let n=Ll(o);if(oR(n))throw new Error("Invalid seeds, address must fall off the curve");return new e(n)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let o=255,n;for(;o!=0;){try{let i=t.concat(xe.Buffer.from([o]));n=this.createProgramAddressSync(i,r);}catch(i){if(i instanceof TypeError)throw i;o--;continue}return [n,o]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){let r=new e(t);return oR(r.toBytes())}};gR=Ie;Ie.default=new gR("11111111111111111111111111111111");e0.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var $a=1232,a6=127,t0=64;var Jc=class{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r;}keySegments(){let t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(let r of this.keySegments()){if(t<r.length)return r[t];t-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((i,s)=>{o.set(i.toBase58(),s);});let n=i=>{let s=o.get(i.toBase58());if(s===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return s};return t.map(i=>({programIdIndex:n(i.programId),accountKeyIndexes:i.keys.map(s=>n(s.pubkey)),data:i.data}))}},Pe=(e="publicKey")=>T.blob(32,e),G7=(e="signature")=>T.blob(64,e),Kc=(e="string")=>{let t=T.struct([T.u32("length"),T.u32("lengthPadding"),T.blob(T.offset(T.u32(),-8),"chars")],e),r=t.decode.bind(t),o=t.encode.bind(t),n=t;return n.decode=(i,s)=>r(i,s).chars.toString(),n.encode=(i,s,a)=>{let c={chars:xe.Buffer.from(i,"utf8")};return o(c,s,a)},n.alloc=i=>T.u32().span+T.u32().span+xe.Buffer.from(i,"utf8").length,n},q7=(e="authorized")=>T.struct([Pe("staker"),Pe("withdrawer")],e),W7=(e="lockup")=>T.struct([T.ns64("unixTimestamp"),T.ns64("epoch"),Pe("custodian")],e),K7=(e="voteInit")=>T.struct([Pe("nodePubkey"),Pe("authorizedVoter"),Pe("authorizedWithdrawer"),T.u8("commission")],e),J7=(e="voteAuthorizeWithSeedArgs")=>T.struct([T.u32("voteAuthorizationType"),Pe("currentAuthorityDerivedKeyOwnerPubkey"),Kc("currentAuthorityDerivedKeySeed"),Pe("newAuthorized")],e);function vn(e){let t=0,r=0;for(;;){let o=e.shift();if(t|=(o&127)<<r*7,r+=1,(o&128)===0)break}return t}function wn(e,t){let r=t;for(;;){let o=r&127;if(r>>=7,r==0){e.push(o);break}else o|=128,e.push(o);}}function it(e,t){if(!e)throw new Error(t||"Assertion failed")}var r0=class e{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r;}static compile(t,r){let o=new Map,n=s=>{let a=s.toBase58(),c=o.get(a);return c===void 0&&(c={isSigner:false,isWritable:false,isInvoked:false},o.set(a,c)),c},i=n(r);i.isSigner=true,i.isWritable=true;for(let s of t){n(s.programId).isInvoked=true;for(let a of s.keys){let c=n(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable;}}return new e(r,o)}getMessageComponents(){let t=[...this.keyMetaMap.entries()];it(t.length<=256,"Max static account keys length exceeded");let r=t.filter(([,c])=>c.isSigner&&c.isWritable),o=t.filter(([,c])=>c.isSigner&&!c.isWritable),n=t.filter(([,c])=>!c.isSigner&&c.isWritable),i=t.filter(([,c])=>!c.isSigner&&!c.isWritable),s={numRequiredSignatures:r.length+o.length,numReadonlySignedAccounts:o.length,numReadonlyUnsignedAccounts:i.length};{it(r.length>0,"Expected at least one writable signer key");let[c]=r[0];it(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer");}let a=[...r.map(([c])=>new Ie(c)),...o.map(([c])=>new Ie(c)),...n.map(([c])=>new Ie(c)),...i.map(([c])=>new Ie(c))];return [s,a]}extractTableLookup(t){let[r,o]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&s.isWritable),[n,i]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&!s.isWritable);if(!(r.length===0&&n.length===0))return [{accountKey:t.key,writableIndexes:r,readonlyIndexes:n},{writable:o,readonly:i}]}drainKeysFoundInLookupTable(t,r){let o=new Array,n=new Array;for(let[i,s]of this.keyMetaMap.entries())if(r(s)){let a=new Ie(i),c=t.findIndex(u=>u.equals(a));c>=0&&(it(c<256,"Max lookup table index exceeded"),o.push(c),n.push(a),this.keyMetaMap.delete(i));}return [o,n]}},bR="Reached end of buffer unexpectedly";function yi(e){if(e.length===0)throw new Error(bR);return e.shift()}function _n(e,...t){let[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(bR);return e.splice(...t)}var id=class e{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new Ie(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]));}get version(){return "legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:Nr.default.decode(t.data)}))}get addressTableLookups(){return []}getAccountKeys(){return new Jc(this.staticAccountKeys)}static compile(t){let r=r0.compile(t.instructions,t.payerKey),[o,n]=r.getMessageComponents(),s=new Jc(n).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Nr.default.encode(a.data)}));return new e({header:o,accountKeys:n,recentBlockhash:t.recentBlockhash,instructions:s})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){let o=t-r,i=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return o<i}else {let o=r-this.header.numReadonlySignedAccounts;return t<o}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return [...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){let t=this.accountKeys.length,r=[];wn(r,t);let o=this.instructions.map(d=>{let{accounts:g,programIdIndex:h}=d,v=Array.from(Nr.default.decode(d.data)),E=[];wn(E,g.length);let R=[];return wn(R,v.length),{programIdIndex:h,keyIndicesCount:xe.Buffer.from(E),keyIndices:g,dataLength:xe.Buffer.from(R),data:v}}),n=[];wn(n,o.length);let i=xe.Buffer.alloc($a);xe.Buffer.from(n).copy(i);let s=n.length;o.forEach(d=>{let h=T.struct([T.u8("programIdIndex"),T.blob(d.keyIndicesCount.length,"keyIndicesCount"),T.seq(T.u8("keyIndex"),d.keyIndices.length,"keyIndices"),T.blob(d.dataLength.length,"dataLength"),T.seq(T.u8("userdatum"),d.data.length,"data")]).encode(d,i,s);s+=h;}),i=i.slice(0,s);let a=T.struct([T.blob(1,"numRequiredSignatures"),T.blob(1,"numReadonlySignedAccounts"),T.blob(1,"numReadonlyUnsignedAccounts"),T.blob(r.length,"keyCount"),T.seq(Pe("key"),t,"keys"),Pe("recentBlockhash")]),c={numRequiredSignatures:xe.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:xe.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:xe.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:xe.Buffer.from(r),keys:this.accountKeys.map(d=>He(d.toBytes())),recentBlockhash:Nr.default.decode(this.recentBlockhash)},u=xe.Buffer.alloc(2048),f=a.encode(c,u);return i.copy(u,f),u.slice(0,f+i.length)}static from(t){let r=[...t],o=yi(r);if(o!==(o&a6))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let n=yi(r),i=yi(r),s=vn(r),a=[];for(let g=0;g<s;g++){let h=_n(r,0,ps);a.push(new Ie(xe.Buffer.from(h)));}let c=_n(r,0,ps),u=vn(r),f=[];for(let g=0;g<u;g++){let h=yi(r),v=vn(r),E=_n(r,0,v),R=vn(r),$=_n(r,0,R),N=Nr.default.encode(xe.Buffer.from($));f.push({programIdIndex:h,accounts:E,data:N});}let d={header:{numRequiredSignatures:o,numReadonlySignedAccounts:n,numReadonlyUnsignedAccounts:i},recentBlockhash:Nr.default.encode(xe.Buffer.from(c)),accountKeys:a,instructions:f};return new e(d)}},Y_=class e{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups;}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(let r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups;}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Jc(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures,o=this.staticAccountKeys.length;if(t>=o){let n=t-o,i=this.addressTableLookups.reduce((s,a)=>s+a.writableIndexes.length,0);return n<i}else if(t>=this.header.numRequiredSignatures){let n=t-r,s=o-r-this.header.numReadonlyUnsignedAccounts;return n<s}else {let n=r-this.header.numReadonlySignedAccounts;return t<n}}resolveAddressTableLookups(t){let r={writable:[],readonly:[]};for(let o of this.addressTableLookups){let n=t.find(i=>i.key.equals(o.accountKey));if(!n)throw new Error(`Failed to find address lookup table account for table key ${o.accountKey.toBase58()}`);for(let i of o.writableIndexes)if(i<n.state.addresses.length)r.writable.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`);for(let i of o.readonlyIndexes)if(i<n.state.addresses.length)r.readonly.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`)}return r}static compile(t){let r=r0.compile(t.instructions,t.payerKey),o=new Array,n={writable:new Array,readonly:new Array},i=t.addressLookupTableAccounts||[];for(let f of i){let d=r.extractTableLookup(f);if(d!==void 0){let[g,{writable:h,readonly:v}]=d;o.push(g),n.writable.push(...h),n.readonly.push(...v);}}let[s,a]=r.getMessageComponents(),u=new Jc(a,n).compileInstructions(t.instructions);return new e({header:s,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:o})}serialize(){let t=Array();wn(t,this.staticAccountKeys.length);let r=this.serializeInstructions(),o=Array();wn(o,this.compiledInstructions.length);let n=this.serializeAddressTableLookups(),i=Array();wn(i,this.addressTableLookups.length);let s=T.struct([T.u8("prefix"),T.struct([T.u8("numRequiredSignatures"),T.u8("numReadonlySignedAccounts"),T.u8("numReadonlyUnsignedAccounts")],"header"),T.blob(t.length,"staticAccountKeysLength"),T.seq(Pe(),this.staticAccountKeys.length,"staticAccountKeys"),Pe("recentBlockhash"),T.blob(o.length,"instructionsLength"),T.blob(r.length,"serializedInstructions"),T.blob(i.length,"addressTableLookupsLength"),T.blob(n.length,"serializedAddressTableLookups")]),a=new Uint8Array($a),u=s.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(f=>f.toBytes()),recentBlockhash:Nr.default.decode(this.recentBlockhash),instructionsLength:new Uint8Array(o),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},a);return a.slice(0,u)}serializeInstructions(){let t=0,r=new Uint8Array($a);for(let o of this.compiledInstructions){let n=Array();wn(n,o.accountKeyIndexes.length);let i=Array();wn(i,o.data.length);let s=T.struct([T.u8("programIdIndex"),T.blob(n.length,"encodedAccountKeyIndexesLength"),T.seq(T.u8(),o.accountKeyIndexes.length,"accountKeyIndexes"),T.blob(i.length,"encodedDataLength"),T.blob(o.data.length,"data")]);t+=s.encode({programIdIndex:o.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:o.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:o.data},r,t);}return r.slice(0,t)}serializeAddressTableLookups(){let t=0,r=new Uint8Array($a);for(let o of this.addressTableLookups){let n=Array();wn(n,o.writableIndexes.length);let i=Array();wn(i,o.readonlyIndexes.length);let s=T.struct([Pe("accountKey"),T.blob(n.length,"encodedWritableIndexesLength"),T.seq(T.u8(),o.writableIndexes.length,"writableIndexes"),T.blob(i.length,"encodedReadonlyIndexesLength"),T.seq(T.u8(),o.readonlyIndexes.length,"readonlyIndexes")]);t+=s.encode({accountKey:o.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:o.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:o.readonlyIndexes},r,t);}return r.slice(0,t)}static deserialize(t){let r=[...t],o=yi(r),n=o&a6;it(o!==n,"Expected versioned message but received legacy message");let i=n;it(i===0,`Expected versioned message with version 0 but found version ${i}`);let s={numRequiredSignatures:yi(r),numReadonlySignedAccounts:yi(r),numReadonlyUnsignedAccounts:yi(r)},a=[],c=vn(r);for(let v=0;v<c;v++)a.push(new Ie(_n(r,0,ps)));let u=Nr.default.encode(_n(r,0,ps)),f=vn(r),d=[];for(let v=0;v<f;v++){let E=yi(r),R=vn(r),$=_n(r,0,R),N=vn(r),O=new Uint8Array(_n(r,0,N));d.push({programIdIndex:E,accountKeyIndexes:$,data:O});}let g=vn(r),h=[];for(let v=0;v<g;v++){let E=new Ie(_n(r,0,ps)),R=vn(r),$=_n(r,0,R),N=vn(r),O=_n(r,0,N);h.push({accountKey:E,writableIndexes:$,readonlyIndexes:O});}return new e({header:s,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:h})}},a0={deserializeMessageVersion(e){let t=e[0],r=t&a6;return r===t?"legacy":r},deserialize:e=>{let t=a0.deserializeMessageVersion(e);if(t==="legacy")return id.from(e);if(t===0)return Y_.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var Y7=xe.Buffer.alloc(t0).fill(0),Qe=class{constructor(t){this.keys=void 0,this.programId=void 0,this.data=xe.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data);}toJSON(){return {keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:o})=>({pubkey:t.toJSON(),isSigner:r,isWritable:o})),programId:this.programId.toJSON(),data:[...this.data]}}},tt=class e{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){let{minContextSlot:r,nonceInfo:o}=t;this.minNonceContextSlot=r,this.nonceInfo=o;}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){let{blockhash:r,lastValidBlockHeight:o}=t;this.recentBlockhash=r,this.lastValidBlockHeight=o;}else {let{recentBlockhash:r,nonceInfo:o}=t;o&&(this.nonceInfo=o),this.recentBlockhash=r;}}toJSON(){return {recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new Qe(r));}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let o;if(this.feePayer)o=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)o=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let E=0;E<r.length;E++)if(r[E].programId===void 0)throw new Error(`Transaction instruction index ${E} has undefined program id`);let n=[],i=[];r.forEach(E=>{E.keys.forEach($=>{i.push({...$});});let R=E.programId.toString();n.includes(R)||n.push(R);}),n.forEach(E=>{i.push({pubkey:new Ie(E),isSigner:false,isWritable:false});});let s=[];i.forEach(E=>{let R=E.pubkey.toString(),$=s.findIndex(N=>N.pubkey.toString()===R);$>-1?(s[$].isWritable=s[$].isWritable||E.isWritable,s[$].isSigner=s[$].isSigner||E.isSigner):s.push(E);}),s.sort(function(E,R){if(E.isSigner!==R.isSigner)return E.isSigner?-1:1;if(E.isWritable!==R.isWritable)return E.isWritable?-1:1;let $={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return E.pubkey.toBase58().localeCompare(R.pubkey.toBase58(),"en",$)});let a=s.findIndex(E=>E.pubkey.equals(o));if(a>-1){let[E]=s.splice(a,1);E.isSigner=true,E.isWritable=true,s.unshift(E);}else s.unshift({pubkey:o,isSigner:true,isWritable:true});for(let E of this.signatures){let R=s.findIndex($=>$.pubkey.equals(E.publicKey));if(R>-1)s[R].isSigner||(s[R].isSigner=true,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${E.publicKey.toString()}`)}let c=0,u=0,f=0,d=[],g=[];s.forEach(({pubkey:E,isSigner:R,isWritable:$})=>{R?(d.push(E.toString()),c+=1,$||(u+=1)):(g.push(E.toString()),$||(f+=1));});let h=d.concat(g),v=r.map(E=>{let{data:R,programId:$}=E;return {programIdIndex:h.indexOf($.toString()),accounts:E.keys.map(N=>h.indexOf(N.pubkey.toString())),data:Nr.default.encode(R)}});return v.forEach(E=>{it(E.programIdIndex>=0),E.accounts.forEach(R=>it(R>=0));}),new id({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:f},accountKeys:h,recentBlockhash:t,instructions:v})}_compile(){let t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((n,i)=>r[i].equals(n.publicKey))||(this.signatures=r.map(o=>({signature:null,publicKey:o}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return (await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");let r=new Set;this.signatures=t.filter(o=>{let n=o.toString();return r.has(n)?false:(r.add(n),true)}).map(o=>({signature:null,publicKey:o}));}sign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}this.signatures=o.map(i=>({signature:null,publicKey:i.publicKey}));let n=this._compile();this._partialSign(n,...o);}partialSign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}let n=this._compile();this._partialSign(n,...o);}_partialSign(t,...r){let o=t.serialize();r.forEach(n=>{let i=s6(o,n.secretKey);this._addSignature(n.publicKey,He(i));});}addSignature(t,r){this._compile(),this._addSignature(t,r);}_addSignature(t,r){it(r.length===64);let o=this.signatures.findIndex(n=>t.equals(n.publicKey));if(o<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[o].signature=xe.Buffer.from(r);}verifySignatures(t=true){return !this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){let o={};for(let{signature:n,publicKey:i}of this.signatures)n===null?r&&(o.missing||=[]).push(i):H7(n,t,i.toBytes())||(o.invalid||=[]).push(i);return o.invalid||o.missing?o:void 0}serialize(t){let{requireAllSignatures:r,verifySignatures:o}=Object.assign({requireAllSignatures:true,verifySignatures:true},t),n=this.serializeMessage();if(o){let i=this._getMessageSignednessErrors(n,r);if(i){let s="Signature verification failed.";throw i.invalid&&(s+=`
62
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of this.seen.entries()){let d=f[1];if(t===f[0]){s(f);continue}if(o.external){let h=o.external.registry.get(f[0])?.id;if(t!==f[0]&&h){s(f);continue}}if(this.metadataRegistry.get(f[0])?.id){s(f);continue}if(d.cycle){s(f);continue}if(d.count>1&&o.reused==="ref"){s(f);continue}}let a=(f,d)=>{let g=this.seen.get(f),h=g.def??g.schema,x={...h};if(g.ref===null)return;let w=g.ref;if(g.ref=null,w){a(w,d);let k=this.seen.get(w).schema;k.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(k)):(Object.assign(h,k),Object.assign(h,x));}g.isParent||this.override({zodSchema:f,jsonSchema:h,path:g.path??[]});};for(let f of [...this.seen.entries()].reverse())a(f[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let f=o.external.registry.get(t)?.id;if(!f)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(f);}Object.assign(c,n.def);let u=o.external?.defs??{};for(let f of this.seen.entries()){let d=f[1];d.def&&d.defId&&(u[d.defId]=d.def);}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function yv(e,t){if(e instanceof yc){let o=new bl(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u);}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s});}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n};}return {schemas:i}}let r=new bl(t);return r.process(e),r.emit(e,t)}function rr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let n=e._zod.def;switch(n.type){case "string":case "number":case "bigint":case "boolean":case "date":case "symbol":case "undefined":case "null":case "any":case "unknown":case "never":case "void":case "literal":case "enum":case "nan":case "file":case "template_literal":return false;case "array":return rr(n.element,r);case "object":{for(let i in n.shape)if(rr(n.shape[i],r))return true;return false}case "union":{for(let i of n.options)if(rr(i,r))return true;return false}case "intersection":return rr(n.left,r)||rr(n.right,r);case "tuple":{for(let i of n.items)if(rr(i,r))return true;return !!(n.rest&&rr(n.rest,r))}case "record":return rr(n.keyType,r)||rr(n.valueType,r);case "map":return rr(n.keyType,r)||rr(n.valueType,r);case "set":return rr(n.valueType,r);case "promise":case "optional":case "nonoptional":case "nullable":case "readonly":return rr(n.innerType,r);case "lazy":return rr(n.getter(),r);case "default":return rr(n.innerType,r);case "prefault":return rr(n.innerType,r);case "custom":return false;case "transform":return true;case "pipe":return rr(n.in,r)||rr(n.out,r);case "success":return false;case "catch":return false;case "function":return false;}throw new Error(`Unknown schema type: ${n.type}`)}var m5={};var Um={};Er(Um,{ZodISODate:()=>Cm,ZodISODateTime:()=>Bm,ZodISODuration:()=>Lm,ZodISOTime:()=>zm,date:()=>xv,datetime:()=>bv,duration:()=>wv,time:()=>vv});var Bm=B("ZodISODateTime",(e,t)=>{Nx.init(e,t),et.init(e,t);});function bv(e){return P1(Bm,e)}var Cm=B("ZodISODate",(e,t)=>{Px.init(e,t),et.init(e,t);});function xv(e){return B1(Cm,e)}var zm=B("ZodISOTime",(e,t)=>{Bx.init(e,t),et.init(e,t);});function vv(e){return C1(zm,e)}var Lm=B("ZodISODuration",(e,t)=>{Cx.init(e,t),et.init(e,t);});function wv(e){return z1(Lm,e)}var g5=(e,t)=>{qf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Kf(e,r)},flatten:{value:r=>Wf(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,uc,2);}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,uc,2);}},isEmpty:{get(){return e.issues.length===0}}});},M3=B("ZodError",g5),Xr=B("ZodError",g5,{Parent:Error});var _v=dc(Xr),Ev=pc(Xr),Sv=mc(Xr),Iv=hc(Xr),Av=Vp(Xr),kv=Zp(Xr),Rv=Gp(Xr),Tv=qp(Xr),$v=Wp(Xr),Ov=Kp(Xr),Nv=Jp(Xr),Pv=Yp(Xr);var ke=B("ZodType",(e,t)=>(we.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(te.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Mr(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>_v(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Sv(e,r,o),e.parseAsync=async(r,o)=>Ev(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Iv(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Av(e,r,o),e.decode=(r,o)=>kv(e,r,o),e.encodeAsync=async(r,o)=>Rv(e,r,o),e.decodeAsync=async(r,o)=>Tv(e,r,o),e.safeEncode=(r,o)=>$v(e,r,o),e.safeDecode=(r,o)=>Ov(e,r,o),e.safeEncodeAsync=async(r,o)=>Nv(e,r,o),e.safeDecodeAsync=async(r,o)=>Pv(e,r,o),e.refine=(r,o)=>e.check(rI(r,o)),e.superRefine=r=>e.check(nI(r)),e.overwrite=r=>e.check(Qo(r)),e.optional=()=>Dm(e),e.nullable=()=>jm(e),e.nullish=()=>Dm(jm(e)),e.nonoptional=r=>V5(e,r),e.array=()=>Zm(e),e.or=r=>rw([e,r]),e.and=r=>$5(e,r),e.transform=r=>Fm(e,iw(r)),e.default=r=>j5(e,r),e.prefault=r=>H5(e,r),e.catch=r=>q5(e,r),e.pipe=r=>Fm(e,r),e.readonly=()=>J5(e),e.describe=r=>{let o=e.clone();return vo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return vo.get(e)?.description},configurable:true}),e.meta=(...r)=>{if(r.length===0)return vo.get(e);let o=e.clone();return vo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),zv=B("_ZodString",(e,t)=>{Gs.init(e,t),ke.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(al(...o)),e.includes=(...o)=>e.check(fl(...o)),e.startsWith=(...o)=>e.check(ll(...o)),e.endsWith=(...o)=>e.check(dl(...o)),e.min=(...o)=>e.check(qi(...o)),e.max=(...o)=>e.check(xc(...o)),e.length=(...o)=>e.check(vc(...o)),e.nonempty=(...o)=>e.check(qi(1,...o)),e.lowercase=o=>e.check(cl(o)),e.uppercase=o=>e.check(ul(o)),e.trim=()=>e.check(hl()),e.normalize=(...o)=>e.check(ml(...o)),e.toLowerCase=()=>e.check(gl()),e.toUpperCase=()=>e.check(yl());}),vl=B("ZodString",(e,t)=>{Gs.init(e,t),zv.init(e,t),e.email=r=>e.check(mm(Lv,r)),e.url=r=>e.check(il(Hm,r)),e.jwt=r=>e.check(Pm(Xv,r)),e.emoji=r=>e.check(xm(Uv,r)),e.guid=r=>e.check(ol(Mm,r)),e.uuid=r=>e.check(hm(ti,r)),e.uuidv4=r=>e.check(gm(ti,r)),e.uuidv6=r=>e.check(ym(ti,r)),e.uuidv7=r=>e.check(bm(ti,r)),e.nanoid=r=>e.check(vm(Mv,r)),e.guid=r=>e.check(ol(Mm,r)),e.cuid=r=>e.check(wm(Dv,r)),e.cuid2=r=>e.check(_m(jv,r)),e.ulid=r=>e.check(Em(Fv,r)),e.base64=r=>e.check($m(Kv,r)),e.base64url=r=>e.check(Om(Jv,r)),e.xid=r=>e.check(Sm(Hv,r)),e.ksuid=r=>e.check(Im(Vv,r)),e.ipv4=r=>e.check(Am(Zv,r)),e.ipv6=r=>e.check(km(Gv,r)),e.cidrv4=r=>e.check(Rm(qv,r)),e.cidrv6=r=>e.check(Tm(Wv,r)),e.e164=r=>e.check(Nm(Yv,r)),e.datetime=r=>e.check(bv(r)),e.date=r=>e.check(xv(r)),e.time=r=>e.check(vv(r)),e.duration=r=>e.check(wv(r));});function Bv(e){return $1(vl,e)}var et=B("ZodStringFormat",(e,t)=>{Xe.init(e,t),zv.init(e,t);}),Lv=B("ZodEmail",(e,t)=>{Ex.init(e,t),et.init(e,t);});function j3(e){return mm(Lv,e)}var Mm=B("ZodGUID",(e,t)=>{wx.init(e,t),et.init(e,t);});function F3(e){return ol(Mm,e)}var ti=B("ZodUUID",(e,t)=>{_x.init(e,t),et.init(e,t);});function H3(e){return hm(ti,e)}function V3(e){return gm(ti,e)}function Z3(e){return ym(ti,e)}function G3(e){return bm(ti,e)}var Hm=B("ZodURL",(e,t)=>{Sx.init(e,t),et.init(e,t);});function q3(e){return il(Hm,e)}function W3(e){return il(Hm,{protocol:/^https?$/,hostname:Rn.domain,...te.normalizeParams(e)})}var Uv=B("ZodEmoji",(e,t)=>{Ix.init(e,t),et.init(e,t);});function K3(e){return xm(Uv,e)}var Mv=B("ZodNanoID",(e,t)=>{Ax.init(e,t),et.init(e,t);});function J3(e){return vm(Mv,e)}var Dv=B("ZodCUID",(e,t)=>{kx.init(e,t),et.init(e,t);});function Y3(e){return wm(Dv,e)}var jv=B("ZodCUID2",(e,t)=>{Rx.init(e,t),et.init(e,t);});function X3(e){return _m(jv,e)}var Fv=B("ZodULID",(e,t)=>{Tx.init(e,t),et.init(e,t);});function Q3(e){return Em(Fv,e)}var Hv=B("ZodXID",(e,t)=>{$x.init(e,t),et.init(e,t);});function eB(e){return Sm(Hv,e)}var Vv=B("ZodKSUID",(e,t)=>{Ox.init(e,t),et.init(e,t);});function tB(e){return Im(Vv,e)}var Zv=B("ZodIPv4",(e,t)=>{zx.init(e,t),et.init(e,t);});function rB(e){return Am(Zv,e)}var Gv=B("ZodIPv6",(e,t)=>{Lx.init(e,t),et.init(e,t);});function nB(e){return km(Gv,e)}var qv=B("ZodCIDRv4",(e,t)=>{Ux.init(e,t),et.init(e,t);});function oB(e){return Rm(qv,e)}var Wv=B("ZodCIDRv6",(e,t)=>{Mx.init(e,t),et.init(e,t);});function iB(e){return Tm(Wv,e)}var Kv=B("ZodBase64",(e,t)=>{jx.init(e,t),et.init(e,t);});function sB(e){return $m(Kv,e)}var Jv=B("ZodBase64URL",(e,t)=>{Fx.init(e,t),et.init(e,t);});function aB(e){return Om(Jv,e)}var Yv=B("ZodE164",(e,t)=>{Hx.init(e,t),et.init(e,t);});function cB(e){return Nm(Yv,e)}var Xv=B("ZodJWT",(e,t)=>{Vx.init(e,t),et.init(e,t);});function uB(e){return Pm(Xv,e)}var wl=B("ZodCustomStringFormat",(e,t)=>{Zx.init(e,t),et.init(e,t);});function fB(e,t,r={}){return wc(wl,e,t,r)}function lB(e){return wc(wl,"hostname",Rn.hostname,e)}function dB(e){return wc(wl,"hex",Rn.hex,e)}function pB(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=Rn[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return wc(wl,o,n,t)}var _l=B("ZodNumber",(e,t)=>{sm.init(e,t),ke.init(e,t),e.gt=(o,n)=>e.check(Xo(o,n)),e.gte=(o,n)=>e.check(Yr(o,n)),e.min=(o,n)=>e.check(Yr(o,n)),e.lt=(o,n)=>e.check(Yo(o,n)),e.lte=(o,n)=>e.check(Tn(o,n)),e.max=(o,n)=>e.check(Tn(o,n)),e.int=o=>e.check(Cv(o)),e.safe=o=>e.check(Cv(o)),e.positive=o=>e.check(Xo(0,o)),e.nonnegative=o=>e.check(Yr(0,o)),e.negative=o=>e.check(Yo(0,o)),e.nonpositive=o=>e.check(Tn(0,o)),e.multipleOf=(o,n)=>e.check(qs(o,n)),e.step=(o,n)=>e.check(qs(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=true,e.format=r.format??null;});function y5(e){return L1(_l,e)}var Ec=B("ZodNumberFormat",(e,t)=>{Gx.init(e,t),_l.init(e,t);});function Cv(e){return M1(Ec,e)}function mB(e){return D1(Ec,e)}function hB(e){return j1(Ec,e)}function gB(e){return F1(Ec,e)}function yB(e){return H1(Ec,e)}var El=B("ZodBoolean",(e,t)=>{Qf.init(e,t),ke.init(e,t);});function b5(e){return V1(El,e)}var Sl=B("ZodBigInt",(e,t)=>{am.init(e,t),ke.init(e,t),e.gte=(o,n)=>e.check(Yr(o,n)),e.min=(o,n)=>e.check(Yr(o,n)),e.gt=(o,n)=>e.check(Xo(o,n)),e.gte=(o,n)=>e.check(Yr(o,n)),e.min=(o,n)=>e.check(Yr(o,n)),e.lt=(o,n)=>e.check(Yo(o,n)),e.lte=(o,n)=>e.check(Tn(o,n)),e.max=(o,n)=>e.check(Tn(o,n)),e.positive=o=>e.check(Xo(BigInt(0),o)),e.negative=o=>e.check(Yo(BigInt(0),o)),e.nonpositive=o=>e.check(Tn(BigInt(0),o)),e.nonnegative=o=>e.check(Yr(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(qs(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function bB(e){return G1(Sl,e)}var Qv=B("ZodBigIntFormat",(e,t)=>{qx.init(e,t),Sl.init(e,t);});function xB(e){return W1(Qv,e)}function vB(e){return K1(Qv,e)}var x5=B("ZodSymbol",(e,t)=>{Wx.init(e,t),ke.init(e,t);});function wB(e){return J1(x5,e)}var v5=B("ZodUndefined",(e,t)=>{Kx.init(e,t),ke.init(e,t);});function _B(e){return Y1(v5,e)}var w5=B("ZodNull",(e,t)=>{Jx.init(e,t),ke.init(e,t);});function _5(e){return X1(w5,e)}var E5=B("ZodAny",(e,t)=>{Yx.init(e,t),ke.init(e,t);});function EB(){return Q1(E5)}var S5=B("ZodUnknown",(e,t)=>{Xx.init(e,t),ke.init(e,t);});function _c(){return ev(S5)}var I5=B("ZodNever",(e,t)=>{Qx.init(e,t),ke.init(e,t);});function ew(e){return tv(I5,e)}var A5=B("ZodVoid",(e,t)=>{e1.init(e,t),ke.init(e,t);});function SB(e){return rv(A5,e)}var Vm=B("ZodDate",(e,t)=>{t1.init(e,t),ke.init(e,t),e.min=(o,n)=>e.check(Yr(o,n)),e.max=(o,n)=>e.check(Tn(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null;});function IB(e){return nv(Vm,e)}var k5=B("ZodArray",(e,t)=>{r1.init(e,t),ke.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(qi(r,o)),e.nonempty=r=>e.check(qi(1,r)),e.max=(r,o)=>e.check(xc(r,o)),e.length=(r,o)=>e.check(vc(r,o)),e.unwrap=()=>e.element;});function Zm(e,t){return lv(k5,e,t)}function AB(e){let t=e._zod.def.shape;return ow(Object.keys(t))}var Gm=B("ZodObject",(e,t)=>{n1.init(e,t),ke.init(e,t),te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>ow(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_c()}),e.loose=()=>e.clone({...e._zod.def,catchall:_c()}),e.strict=()=>e.clone({...e._zod.def,catchall:ew()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>te.extend(e,r),e.safeExtend=r=>te.safeExtend(e,r),e.merge=r=>te.merge(e,r),e.pick=r=>te.pick(e,r),e.omit=r=>te.omit(e,r),e.partial=(...r)=>te.partial(sw,e,r[0]),e.required=(...r)=>te.required(aw,e,r[0]);});function kB(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new Gm(r)}function RB(e,t){return new Gm({type:"object",shape:e,catchall:ew(),...te.normalizeParams(t)})}function TB(e,t){return new Gm({type:"object",shape:e,catchall:_c(),...te.normalizeParams(t)})}var tw=B("ZodUnion",(e,t)=>{cm.init(e,t),ke.init(e,t),e.options=t.options;});function rw(e,t){return new tw({type:"union",options:e,...te.normalizeParams(t)})}var R5=B("ZodDiscriminatedUnion",(e,t)=>{tw.init(e,t),o1.init(e,t);});function $B(e,t,r){return new R5({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}var T5=B("ZodIntersection",(e,t)=>{i1.init(e,t),ke.init(e,t);});function $5(e,t){return new T5({type:"intersection",left:e,right:t})}var O5=B("ZodTuple",(e,t)=>{um.init(e,t),ke.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function N5(e,t,r){let o=t instanceof we,n=o?r:t,i=o?t:null;return new O5({type:"tuple",items:e,rest:i,...te.normalizeParams(n)})}var nw=B("ZodRecord",(e,t)=>{s1.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function P5(e,t,r){return new nw({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}function OB(e,t,r){let o=Mr(e);return o._zod.values=void 0,new nw({type:"record",keyType:o,valueType:t,...te.normalizeParams(r)})}var B5=B("ZodMap",(e,t)=>{a1.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function NB(e,t,r){return new B5({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}var C5=B("ZodSet",(e,t)=>{c1.init(e,t),ke.init(e,t),e.min=(...r)=>e.check(Ws(...r)),e.nonempty=r=>e.check(Ws(1,r)),e.max=(...r)=>e.check(bc(...r)),e.size=(...r)=>e.check(sl(...r));});function PB(e,t){return new C5({type:"set",valueType:e,...te.normalizeParams(t)})}var xl=B("ZodEnum",(e,t)=>{u1.init(e,t),ke.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new xl({...t,checks:[],...te.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new xl({...t,checks:[],...te.normalizeParams(n),entries:i})};});function ow(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new xl({type:"enum",entries:r,...te.normalizeParams(t)})}function BB(e,t){return new xl({type:"enum",entries:e,...te.normalizeParams(t)})}var z5=B("ZodLiteral",(e,t)=>{f1.init(e,t),ke.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 CB(e,t){return new z5({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}var L5=B("ZodFile",(e,t)=>{l1.init(e,t),ke.init(e,t),e.min=(r,o)=>e.check(Ws(r,o)),e.max=(r,o)=>e.check(bc(r,o)),e.mime=(r,o)=>e.check(pl(Array.isArray(r)?r:[r],o));});function zB(e){return dv(L5,e)}var U5=B("ZodTransform",(e,t)=>{d1.init(e,t),ke.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new ji(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(te.issue(i,r.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(te.issue(s));}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)};});function iw(e){return new U5({type:"transform",transform:e})}var sw=B("ZodOptional",(e,t)=>{p1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Dm(e){return new sw({type:"optional",innerType:e})}var M5=B("ZodNullable",(e,t)=>{m1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function jm(e){return new M5({type:"nullable",innerType:e})}function LB(e){return Dm(jm(e))}var D5=B("ZodDefault",(e,t)=>{h1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function j5(e,t){return new D5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var F5=B("ZodPrefault",(e,t)=>{g1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function H5(e,t){return new F5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var aw=B("ZodNonOptional",(e,t)=>{y1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function V5(e,t){return new aw({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}var Z5=B("ZodSuccess",(e,t)=>{b1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function UB(e){return new Z5({type:"success",innerType:e})}var G5=B("ZodCatch",(e,t)=>{x1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function q5(e,t){return new G5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var W5=B("ZodNaN",(e,t)=>{v1.init(e,t),ke.init(e,t);});function MB(e){return iv(W5,e)}var cw=B("ZodPipe",(e,t)=>{w1.init(e,t),ke.init(e,t),e.in=t.in,e.out=t.out;});function Fm(e,t){return new cw({type:"pipe",in:e,out:t})}var uw=B("ZodCodec",(e,t)=>{cw.init(e,t),el.init(e,t);});function DB(e,t,r){return new uw({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var K5=B("ZodReadonly",(e,t)=>{_1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function J5(e){return new K5({type:"readonly",innerType:e})}var Y5=B("ZodTemplateLiteral",(e,t)=>{E1.init(e,t),ke.init(e,t);});function jB(e,t){return new Y5({type:"template_literal",parts:e,...te.normalizeParams(t)})}var X5=B("ZodLazy",(e,t)=>{A1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.getter();});function Q5(e){return new X5({type:"lazy",getter:e})}var eI=B("ZodPromise",(e,t)=>{I1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function FB(e){return new eI({type:"promise",innerType:e})}var tI=B("ZodFunction",(e,t)=>{S1.init(e,t),ke.init(e,t);});function HB(e){return new tI({type:"function",input:Array.isArray(e?.input)?N5(e?.input):e?.input??Zm(_c()),output:e?.output??_c()})}var qm=B("ZodCustom",(e,t)=>{k1.init(e,t),ke.init(e,t);});function VB(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function ZB(e,t){return pv(qm,e??(()=>true),t)}function rI(e,t={}){return mv(qm,e,t)}function nI(e){return hv(e)}function GB(e,t={error:`Input not instance of ${e.name}`}){let r=new qm({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...te.normalizeParams(t)});return r._zod.bag.Class=e,r}var qB=(...e)=>gv({Codec:uw,Boolean:El,String:vl},...e);function WB(e){let t=Q5(()=>rw([Bv(e),y5(),b5(),_5(),Zm(t),P5(Bv(),t)]));return t}function KB(e,t){return Fm(iw(e),t)}var JB={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function YB(e){wt({customError:e});}function XB(){return wt().customError}var fw;fw||(fw={});var lw={};Er(lw,{bigint:()=>rC,boolean:()=>tC,date:()=>nC,number:()=>eC,string:()=>QB});function QB(e){return O1(vl,e)}function eC(e){return U1(_l,e)}function tC(e){return Z1(El,e)}function rC(e){return q1(Sl,e)}function nC(e){return ov(Vm,e)}wt(fm());var oC="https://api.adland.space",iC="http://localhost:3069";function sC(e,t){return e?e.replace(/\/$/,""):t==="development"?iC:oC}function aC(){return typeof process>"u"||!process.env?{}:{override:process.env.NEXT_PUBLIC_ADLAND_API_URL,nodeEnv:"production"}}var{override:cC,nodeEnv:uC}=aC(),Al=sC(cC,uC);function fC(e,t){return Object.assign(e,{choices:t})}function Ic(e){return {...e,process:t=>lC(e,t),safeProcess:t=>dC(e,t)}}async function lC(e,t){console.log("processAd:input",t);let r=e.data.parse(t);console.log("processAd:data",r),e.verify&&await e.verify(t);let o=e.getMetadata&&e.metadata?await e.getMetadata(r):void 0;return {data:r,metadata:o,type:e.type}}async function dC(e,t){let r=e.data.safeParse(t);if(!r.success)return {success:false,error:r.error};let o=r.data;if(e.verify)try{await e.verify(o);}catch(i){return {success:false,error:i instanceof Error?i.message:"Verification failed"}}let n=e.getMetadata&&e.metadata?await e.getMetadata(o):void 0;return {success:true,data:o,metadata:n}}var Qn=`${Al}/adland`;async function Il(e,t){return fetch(e,{method:"POST",body:JSON.stringify(t)}).then(r=>r.json())}async function Sc(e){return fetch(e).then(t=>t.json())}var eo={verify:{cast({hash:e}){return Il(`${Qn}/verify/cast`,{hash:e})},miniapp({domain:e}){return Il(`${Qn}/verify/miniapp`,{domain:e})},profile({fid:e}){return Il(`${Qn}/verify/profile`,{fid:e})},token({address:e,chainId:t}){return Il(`${Qn}/verify/token`,{address:e,chainId:t})},tweet({url:e}){return Il(`${Qn}/verify/tweet`,{url:e})}},metadata:{cast({hash:e}){return Sc(`${Qn}/metadata/cast?hash=${encodeURIComponent(e)}`)},miniapp({url:e}){return Sc(`${Qn}/metadata/miniapp?url=${encodeURIComponent(e)}`)},link({url:e}){return Sc(`${Qn}/metadata/link?url=${encodeURIComponent(e)}`)},profile({fid:e}){return Sc(`${Qn}/metadata/profile?fid=${encodeURIComponent(e)}`)},token({address:e,chainId:t}){return Sc(`${Qn}/metadata/token?address=${encodeURIComponent(e)}&chainId=${t}`)},tweet({url:e}){return Sc(`${Qn}/metadata/tweet?url=${encodeURIComponent(e)}`)}}};function pC(e){let t=e.embeds?.images?.[0];return t&&(t.media?.staticRaster||t.url||t.sourceUrl)||null}Ic({type:"cast",data:pe.object({hash:pe.string().nonempty("Hash is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({hash:e}){if(!/^0x[0-9a-fA-F]{40}$/.test(e))throw new Error("Invalid Farcaster cast hash");if(!(await eo.verify.cast({hash:e})).verified)throw new Error("Cast hash verification failed")},async getMetadata({hash:e}){let{cast:t}=await eo.metadata.cast({hash:e});return {displayName:t.author.displayName,username:t.author.username,pfpUrl:t.author.pfp?.url,text:t.text,timestamp:String(t.timestamp),image:pC(t)??void 0}}});Ic({type:"link",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({title:pe.string().optional(),description:pe.string().optional(),image:pe.string().optional(),icon:pe.string().optional()}),async verify({url:e}){if(!e.startsWith("http"))throw new Error("Invalid link")},async getMetadata({url:e}){let t=await eo.metadata.link({url:e});return {title:t.title,description:t.description,image:t.image,icon:t.icon}}});Ic({type:"miniapp",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({icon:pe.string().optional(),title:pe.string().optional(),description:pe.string().optional(),imageUrl:pe.string().optional(),creator:pe.object({fid:pe.number(),username:pe.string().nullable().optional(),displayName:pe.string().nullable().optional(),pfpUrl:pe.string().nullable().optional()}).nullable().optional()}),async verify({url:e}){let t="Miniapp domain verification failed",r=e.split("//")[1];if(console.log("verifyMiniapp:domain",r),!r)throw new Error(t);let o=await eo.verify.miniapp({domain:r});if(console.log("verifyMiniapp:res",o),!o.verified)throw new Error(t)},async getMetadata({url:e}){let t=await eo.metadata.miniapp({url:e});return console.log("getMetadata:res",t),{icon:t.icon,title:t.title,description:t.description,imageUrl:t.imageUrl,creator:t.creator}}});Ic({type:"farcasterProfile",data:pe.object({fid:pe.string().nonempty("Fid is required")}),metadata:pe.object({pfpUrl:pe.string().optional(),bio:pe.string().optional(),username:pe.string().optional(),displayName:pe.string().optional(),followers:pe.number().optional(),following:pe.number().optional(),pro:pe.boolean().optional()}),async verify({fid:e}){if(!(await eo.verify.profile({fid:e})).verified)throw new Error("Farcaster profile verification failed")},async getMetadata({fid:e}){let t=await eo.metadata.profile({fid:e});return {pfpUrl:t.pfpUrl,bio:t.bio,username:t.username,displayName:t.displayName,followers:t.followers,following:t.following,pro:t.pro}}});var mC="eip155",dw=[{chainId:1,label:"Ethereum",coingeckoPlatform:"ethereum",dexscreenerSlug:"ethereum"},{chainId:8453,label:"Base",coingeckoPlatform:"base",dexscreenerSlug:"base"},{chainId:42161,label:"Arbitrum",coingeckoPlatform:"arbitrum-one",dexscreenerSlug:"arbitrum"},{chainId:4663,label:"Robinhood",coingeckoPlatform:null,dexscreenerSlug:null}],hC=dw.map(e=>e.chainId);function gC(e){return hC.includes(e)}function yC(e){return dw.find(t=>t.chainId===e)}function oI(e,t){return `${mC}:${e}/erc20:${t}`}Ic({type:"token",data:pe.object({address:pe.string().nonempty("Address is required"),chainId:fC(pe.number().int().positive("Chain ID is required").refine(gC,"Token ads are only supported on Ethereum, Base, Arbitrum and Robinhood"),dw.map(e=>({label:`${e.label} (${e.chainId})`,value:e.chainId})))}),metadata:pe.object({name:pe.string().optional(),symbol:pe.string().optional(),decimals:pe.number().optional(),logoURI:pe.string().optional()}),async verify({address:e,chainId:t}){if(!(await eo.verify.token({address:e,chainId:t})).verified)throw new Error("Token verification failed")},async getMetadata({address:e,chainId:t}){let r=await eo.metadata.token({address:e,chainId:t});return {name:r.name,symbol:r.symbol,decimals:r.decimals,logoURI:r.logoURI}}});var bC=/(?:twitter\.com|x\.com)\/\w+\/status\/\d+/;Ic({type:"tweet",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({url:e}){if(!bC.test(e))throw new Error("Not an X post link \u2014 expected https://x.com/user/status/123");if(!(await eo.verify.tweet({url:e})).verified)throw new Error("That post could not be read \u2014 it may be deleted, or from a protected account")},async getMetadata({url:e}){let t=await eo.metadata.tweet({url:e});return {displayName:t.author.name,username:t.author.username,pfpUrl:t.author.pfpUrl,text:t.text,timestamp:String(Date.parse(t.createdAt)),image:t.image??void 0}}});function kl(e){switch(e.type){case "link":case "miniapp":case "tweet":return e.data.url;case "cast":return `https://farcaster.xyz/~/conversations/${e.data.hash}`;case "farcasterProfile":return `https://farcaster.xyz/~/profiles/${e.data.fid}`;case "token":{let t=yC(e.data.chainId)?.dexscreenerSlug;return t?`https://dexscreener.com/${t}/${e.data.address}`:null}default:return null}}var Rl={};Er(Rl,{InvalidDomainManifest:()=>pw,RejectedByUser:()=>mw});var to=class extends Error{name="BaseError";cause;constructor(t,r={}){super(t,r.cause?{cause:r.cause}:void 0),this.cause=r.cause;}};var pw=class extends to{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},mw=class extends to{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var Ac={};Er(Ac,{RejectedByUser:()=>hw});var hw=class extends to{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var kc={};Er(kc,{GenericError:()=>bw,InvalidDomain:()=>yw,RejectedByUser:()=>gw});var gw=class extends to{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},yw=class extends to{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},bw=class extends to{name="SignManifest.GenericError";constructor(t="Manifest signing failed"){super(t);}};var ie={};Er(ie,{BRAND:()=>qC,DIRTY:()=>Ks,EMPTY_PATH:()=>IC,INVALID:()=>ge,NEVER:()=>Oz,OK:()=>Sr,ParseStatus:()=>mr,Schema:()=>Re,ZodAny:()=>Ji,ZodArray:()=>ii,ZodBigInt:()=>Ys,ZodBoolean:()=>Xs,ZodBranded:()=>$l,ZodCatch:()=>ua,ZodDate:()=>Qs,ZodDefault:()=>ca,ZodDiscriminatedUnion:()=>Ym,ZodEffects:()=>Nn,ZodEnum:()=>sa,ZodError:()=>Qr,ZodFirstPartyTypeKind:()=>be,ZodFunction:()=>Qm,ZodIntersection:()=>na,ZodIssueCode:()=>Y,ZodLazy:()=>oa,ZodLiteral:()=>ia,ZodMap:()=>Pc,ZodNaN:()=>Cc,ZodNativeEnum:()=>aa,ZodNever:()=>ro,ZodNull:()=>ta,ZodNullable:()=>Eo,ZodNumber:()=>Js,ZodObject:()=>en,ZodOptional:()=>$n,ZodParsedType:()=>ce,ZodPipeline:()=>Ol,ZodPromise:()=>Yi,ZodReadonly:()=>fa,ZodRecord:()=>Xm,ZodSchema:()=>Re,ZodSet:()=>Bc,ZodString:()=>Ki,ZodSymbol:()=>Oc,ZodTransformer:()=>Nn,ZodTuple:()=>_o,ZodType:()=>Re,ZodUndefined:()=>ea,ZodUnion:()=>ra,ZodUnknown:()=>oi,ZodVoid:()=>Nc,addIssueToContext:()=>se,any:()=>rz,array:()=>sz,bigint:()=>YC,boolean:()=>hI,coerce:()=>$z,custom:()=>dI,date:()=>XC,datetimeRegex:()=>fI,defaultErrorMap:()=>ri,discriminatedUnion:()=>fz,effect:()=>_z,enum:()=>xz,function:()=>gz,getErrorMap:()=>Rc,getParsedType:()=>wo,instanceof:()=>KC,intersection:()=>lz,isAborted:()=>Km,isAsync:()=>Tc,isDirty:()=>Jm,isValid:()=>Wi,late:()=>WC,lazy:()=>yz,literal:()=>bz,makeIssue:()=>Tl,map:()=>mz,nan:()=>JC,nativeEnum:()=>vz,never:()=>oz,null:()=>tz,nullable:()=>Sz,number:()=>mI,object:()=>az,objectUtil:()=>xw,oboolean:()=>Tz,onumber:()=>Rz,optional:()=>Ez,ostring:()=>kz,pipeline:()=>Az,preprocess:()=>Iz,promise:()=>wz,quotelessJson:()=>_C,record:()=>pz,set:()=>hz,setErrorMap:()=>SC,strictObject:()=>cz,string:()=>pI,symbol:()=>QC,transformer:()=>_z,tuple:()=>dz,undefined:()=>ez,union:()=>uz,unknown:()=>nz,util:()=>Ne,void:()=>iz});var Ne;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i;})(Ne||(Ne={}));var xw;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(xw||(xw={}));var ce=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wo=e=>{switch(typeof e){case "undefined":return ce.undefined;case "string":return ce.string;case "number":return Number.isNaN(e)?ce.nan:ce.number;case "boolean":return ce.boolean;case "function":return ce.function;case "bigint":return ce.bigint;case "symbol":return ce.symbol;case "object":return Array.isArray(e)?ce.array:e===null?ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ce.promise:typeof Map<"u"&&e instanceof Map?ce.map:typeof Set<"u"&&e instanceof Set?ce.set:typeof Date<"u"&&e instanceof Date?ce.date:ce.object;default:return ce.unknown}};var Y=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),_C=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Qr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o];},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t;}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else {let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++;}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n));}else o.push(t(n));return {formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Qr.create=e=>new Qr(e);var EC=(e,t)=>{let r;switch(e.code){case Y.invalid_type:e.received===ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case Y.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case Y.invalid_union:r="Invalid input";break;case Y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case Y.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case Y.invalid_arguments:r="Invalid function arguments";break;case Y.invalid_return_type:r="Invalid function return type";break;case Y.invalid_date:r="Invalid date";break;case Y.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ne.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Y.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Y.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Y.custom:r="Invalid input";break;case Y.invalid_intersection_types:r="Intersection results could not be merged";break;case Y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Y.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e);}return {message:r}},ri=EC;var iI=ri;function SC(e){iI=e;}function Rc(){return iI}var Tl=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return {...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return {...n,path:i,message:a}},IC=[];function se(e,t){let r=Rc(),o=Tl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ri?void 0:ri].filter(n=>!!n)});e.common.issues.push(o);}var mr=class e{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return ge;n.status==="dirty"&&t.dirty(),o.push(n.value);}return {status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s});}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value);}return {status:t.value,value:o}}},ge=Object.freeze({status:"aborted"}),Ks=e=>({status:"dirty",value:e}),Sr=e=>({status:"valid",value:e}),Km=e=>e.status==="aborted",Jm=e=>e.status==="dirty",Wi=e=>e.status==="valid",Tc=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message;})(le||(le={}));var On=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},sI=(e,t)=>{if(Wi(t))return {success:true,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new Qr(e.common.issues);return this._error=r,this._error}}};function Ee(e){if(!e)return {};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var Re=class{get description(){return this._def.description}_getType(t){return wo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return {status:new mr,ctx:{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Tc(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parseSync({data:t,path:o.path,parent:o});return sI(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return Wi(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Wi(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Tc(n)?n:Promise.resolve(n));return sI(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:Y.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?true:(a(),false)):s?true:(a(),false)})}refinement(t,r){return this._refinement((o,n)=>t(o)?true:(n.addIssue(typeof r=="function"?r(o,n):r),false))}_refinement(t){return new Nn({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return $n.create(this,this._def)}nullable(){return Eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ii.create(this)}promise(){return Yi.create(this,this._def)}or(t){return ra.create([this,t],this._def)}and(t){return na.create(this,t,this._def)}transform(t){return new Nn({...Ee(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new ca({...Ee(this._def),innerType:this,defaultValue:r,typeName:be.ZodDefault})}brand(){return new $l({typeName:be.ZodBranded,type:this,...Ee(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new ua({...Ee(this._def),innerType:this,catchValue:r,typeName:be.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ol.create(this,t)}readonly(){return fa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},AC=/^c[^\s-]{8,}$/i,kC=/^[0-9a-z]+$/,RC=/^[0-9A-HJKMNP-TV-Z]{26}$/i,TC=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$C=/^[a-z0-9_-]{21}$/i,OC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,NC=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,PC=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,BC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",vw,CC=/^(?:(?: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])$/,zC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,LC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,UC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,MC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,DC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cI="((\\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])))",jC=new RegExp(`^${cI}$`);function uI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function FC(e){return new RegExp(`^${uI(e)}$`)}function fI(e){let t=`${cI}T${uI(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function HC(e,t){return !!((t==="v4"||!t)&&CC.test(e)||(t==="v6"||!t)&&LC.test(e))}function VC(e,t){if(!OC.test(e))return false;try{let[r]=e.split(".");if(!r)return !1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return !(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return false}}function ZC(e,t){return !!((t==="v4"||!t)&&zC.test(e)||(t==="v6"||!t)&&UC.test(e))}var Ki=class e extends Re{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ce.string){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.string,received:i.parsedType}),ge}let o=new mr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):a&&se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),o.dirty());}else if(i.kind==="email")PC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"email",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")vw||(vw=new RegExp(BC,"u")),vw.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"emoji",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")TC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"uuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")$C.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"nanoid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")AC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")kC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid2",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")RC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ulid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data);}catch{n=this._getOrReturnCtx(t,n),se(n,{validation:"url",code:Y.invalid_string,message:i.message}),o.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"regex",code:Y.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?fI(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?jC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?FC(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?NC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?HC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ip",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?VC(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"jwt",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?ZC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cidr",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?MC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?DC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64url",code:Y.invalid_string,message:i.message}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:Y.invalid_string,...le.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??false,local:t?.local??false,...le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...le.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...le.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...le.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...le.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...le.errToObj(r)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return !!this._def.checks.find(t=>t.kind==="date")}get isTime(){return !!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return !!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return !!this._def.checks.find(t=>t.kind==="email")}get isURL(){return !!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return !!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return !!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return !!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return !!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return !!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return !!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return !!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ki.create=e=>new Ki({checks:[],typeName:be.ZodString,coerce:e?.coerce??false,...Ee(e)});function GC(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var Js=class e extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ce.number){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.number,received:i.parsedType}),ge}let o,n=new mr;for(let i of this._def.checks)i.kind==="int"?Ne.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="multipleOf"?GC(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_finite,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return !!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ne.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return true;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);}return Number.isFinite(r)&&Number.isFinite(t)}};Js.create=e=>new Js({checks:[],typeName:be.ZodNumber,coerce:e?.coerce||false,...Ee(e)});var Ys=class e extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data);}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ce.bigint)return this._getInvalidInput(t);let o,n=new mr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.bigint,received:r.parsedType}),ge}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ys.create=e=>new Ys({checks:[],typeName:be.ZodBigInt,coerce:e?.coerce??false,...Ee(e)});var Xs=class extends Re{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ce.boolean){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.boolean,received:o.parsedType}),ge}return Sr(t.data)}};Xs.create=e=>new Xs({typeName:be.ZodBoolean,coerce:e?.coerce||false,...Ee(e)});var Qs=class e extends Re{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ce.date){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.date,received:i.parsedType}),ge}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_date}),ge}let o=new mr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Qs.create=e=>new Qs({checks:[],coerce:e?.coerce||false,typeName:be.ZodDate,...Ee(e)});var Oc=class extends Re{_parse(t){if(this._getType(t)!==ce.symbol){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.symbol,received:o.parsedType}),ge}return Sr(t.data)}};Oc.create=e=>new Oc({typeName:be.ZodSymbol,...Ee(e)});var ea=class extends Re{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.undefined,received:o.parsedType}),ge}return Sr(t.data)}};ea.create=e=>new ea({typeName:be.ZodUndefined,...Ee(e)});var ta=class extends Re{_parse(t){if(this._getType(t)!==ce.null){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.null,received:o.parsedType}),ge}return Sr(t.data)}};ta.create=e=>new ta({typeName:be.ZodNull,...Ee(e)});var Ji=class extends Re{constructor(){super(...arguments),this._any=true;}_parse(t){return Sr(t.data)}};Ji.create=e=>new Ji({typeName:be.ZodAny,...Ee(e)});var oi=class extends Re{constructor(){super(...arguments),this._unknown=true;}_parse(t){return Sr(t.data)}};oi.create=e=>new oi({typeName:be.ZodUnknown,...Ee(e)});var ro=class extends Re{_parse(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.never,received:r.parsedType}),ge}};ro.create=e=>new ro({typeName:be.ZodNever,...Ee(e)});var Nc=class extends Re{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.void,received:o.parsedType}),ge}return Sr(t.data)}};Nc.create=e=>new Nc({typeName:be.ZodVoid,...Ee(e)});var ii=class e extends Re{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==ce.array)return se(r,{code:Y.invalid_type,expected:ce.array,received:r.parsedType}),ge;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(se(r,{code:s?Y.too_big:Y.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:n.exactLength.message}),o.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(se(r,{code:Y.too_small,minimum:n.minLength.value,type:"array",inclusive:true,exact:false,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(se(r,{code:Y.too_big,maximum:n.maxLength.value,type:"array",inclusive:true,exact:false,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new On(r,s,r.path,a)))).then(s=>mr.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new On(r,s,r.path,a)));return mr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:le.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:le.toString(r)}})}nonempty(t){return this.min(1,t)}};ii.create=(e,t)=>new ii({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...Ee(t)});function $c(e){if(e instanceof en){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=$n.create($c(o));}return new en({...e._def,shape:()=>t})}else return e instanceof ii?new ii({...e._def,type:$c(e.element)}):e instanceof $n?$n.create($c(e.unwrap())):e instanceof Eo?Eo.create($c(e.unwrap())):e instanceof _o?_o.create(e.items.map(t=>$c(t))):e}var en=class e extends Re{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Ne.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ce.object){let u=this._getOrReturnCtx(t);return se(u,{code:Y.invalid_type,expected:ce.object,received:u.parsedType}),ge}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof ro&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let f=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new On(n,d,n.path,u)),alwaysSet:u in n.data});}if(this._def.catchall instanceof ro){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(u==="strict")a.length>0&&(se(n,{code:Y.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let f of a){let d=n.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new On(n,d,n.path,f)),alwaysSet:f in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let d=await f.key,g=await f.value;u.push({key:d,value:g,alwaysSet:f.alwaysSet});}return u}).then(u=>mr.mergeObjectSync(o,u)):mr.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of Ne.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of Ne.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return $c(this)}partial(t){let r={};for(let o of Ne.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional();}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of Ne.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else {let i=this.shape[o];for(;i instanceof $n;)i=i._def.innerType;r[o]=i;}return new e({...this._def,shape:()=>r})}keyof(){return lI(Ne.objectKeys(this.shape))}};en.create=(e,t)=>new en({shape:()=>e,unknownKeys:"strip",catchall:ro.create(),typeName:be.ZodObject,...Ee(t)});en.strictCreate=(e,t)=>new en({shape:()=>e,unknownKeys:"strict",catchall:ro.create(),typeName:be.ZodObject,...Ee(t)});en.lazycreate=(e,t)=>new en({shape:e,unknownKeys:"strip",catchall:ro.create(),typeName:be.ZodObject,...Ee(t)});var ra=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Qr(a.ctx.common.issues));return se(r,{code:Y.invalid_union,unionErrors:s}),ge}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&s.push(u.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Qr(c));return se(r,{code:Y.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}};ra.create=(e,t)=>new ra({options:e,typeName:be.ZodUnion,...Ee(t)});var ni=e=>e instanceof oa?ni(e.schema):e instanceof Nn?ni(e.innerType()):e instanceof ia?[e.value]:e instanceof sa?e.options:e instanceof aa?Ne.objectValues(e.enum):e instanceof ca?ni(e._def.innerType):e instanceof ea?[void 0]:e instanceof ta?[null]:e instanceof $n?[void 0,...ni(e.unwrap())]:e instanceof Eo?[null,...ni(e.unwrap())]:e instanceof $l||e instanceof fa?ni(e.unwrap()):e instanceof ua?ni(e._def.innerType):[],Ym=class e extends Re{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.object)return se(r,{code:Y.invalid_type,expected:ce.object,received:r.parsedType}),ge;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:Y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=ni(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i);}}return new e({typeName:be.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...Ee(o)})}};function ww(e,t){let r=wo(e),o=wo(t);if(e===t)return {valid:true,data:e};if(r===ce.object&&o===ce.object){let n=Ne.objectKeys(t),i=Ne.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=ww(e[a],t[a]);if(!c.valid)return {valid:false};s[a]=c.data;}return {valid:true,data:s}}else if(r===ce.array&&o===ce.array){if(e.length!==t.length)return {valid:false};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=ww(s,a);if(!c.valid)return {valid:false};n.push(c.data);}return {valid:true,data:n}}else return r===ce.date&&o===ce.date&&+e==+t?{valid:true,data:e}:{valid:false}}var na=class extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Km(i)||Km(s))return ge;let a=ww(i.value,s.value);return a.valid?((Jm(i)||Jm(s))&&r.dirty(),{status:r.value,value:a.data}):(se(o,{code:Y.invalid_intersection_types}),ge)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};na.create=(e,t,r)=>new na({left:e,right:t,typeName:be.ZodIntersection,...Ee(r)});var _o=class e extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.array)return se(o,{code:Y.invalid_type,expected:ce.array,received:o.parsedType}),ge;if(o.data.length<this._def.items.length)return se(o,{code:Y.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),ge;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:Y.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new On(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>mr.mergeArray(r,s)):mr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};_o.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _o({items:e,typeName:be.ZodTuple,rest:null,...Ee(t)})};var Xm=class e extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.object)return se(o,{code:Y.invalid_type,expected:ce.object,received:o.parsedType}),ge;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new On(o,a,o.path,a)),value:s._parse(new On(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?mr.mergeObjectAsync(r,n):mr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof Re?new e({keyType:t,valueType:r,typeName:be.ZodRecord,...Ee(o)}):new e({keyType:Ki.create(),valueType:t,typeName:be.ZodRecord,...Ee(r)})}},Pc=class extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.map)return se(o,{code:Y.invalid_type,expected:ce.map,received:o.parsedType}),ge;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new On(o,a,o.path,[u,"key"])),value:i._parse(new On(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let c of s){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}}}};Pc.create=(e,t,r)=>new Pc({valueType:t,keyType:e,typeName:be.ZodMap,...Ee(r)});var Bc=class e extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.set)return se(o,{code:Y.invalid_type,expected:ce.set,received:o.parsedType}),ge;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(se(o,{code:Y.too_small,minimum:n.minSize.value,type:"set",inclusive:true,exact:false,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(se(o,{code:Y.too_big,maximum:n.maxSize.value,type:"set",inclusive:true,exact:false,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let f of c){if(f.status==="aborted")return ge;f.status==="dirty"&&r.dirty(),u.add(f.value);}return {status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new On(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:le.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Bc.create=(e,t)=>new Bc({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...Ee(t)});var Qm=class e extends Re{constructor(){super(...arguments),this.validate=this.implement;}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.function)return se(r,{code:Y.invalid_type,expected:ce.function,received:r.parsedType}),ge;function o(a,c){return Tl({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rc(),ri].filter(u=>!!u),issueData:{code:Y.invalid_arguments,argumentsError:c}})}function n(a,c){return Tl({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rc(),ri].filter(u=>!!u),issueData:{code:Y.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Yi){let a=this;return Sr(async function(...c){let u=new Qr([]),f=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(s,this,f);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else {let a=this;return Sr(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Qr([o(c,u.error)]);let f=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(f,i);if(!d.success)throw new Qr([n(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:_o.create(t).rest(oi.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||_o.create([]).rest(oi.create()),returns:r||oi.create(),typeName:be.ZodFunction,...Ee(o)})}},oa=class extends Re{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};oa.create=(e,t)=>new oa({getter:e,typeName:be.ZodLazy,...Ee(t)});var ia=class extends Re{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:Y.invalid_literal,expected:this._def.value}),ge}return {status:"valid",value:t.data}}get value(){return this._def.value}};ia.create=(e,t)=>new ia({value:e,typeName:be.ZodLiteral,...Ee(t)});function lI(e,t){return new sa({values:e,typeName:be.ZodEnum,...Ee(t)})}var sa=class e extends Re{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{expected:Ne.joinValues(o),received:r.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{received:r.data,code:Y.invalid_enum_value,options:o}),ge}return Sr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};sa.create=lI;var aa=class extends Re{_parse(t){let r=Ne.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){let n=Ne.objectValues(r);return se(o,{expected:Ne.joinValues(n),received:o.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(Ne.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=Ne.objectValues(r);return se(o,{received:o.data,code:Y.invalid_enum_value,options:n}),ge}return Sr(t.data)}get enum(){return this._def.values}};aa.create=(e,t)=>new aa({values:e,typeName:be.ZodNativeEnum,...Ee(t)});var Yi=class extends Re{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.promise&&r.common.async===false)return se(r,{code:Y.invalid_type,expected:ce.promise,received:r.parsedType}),ge;let o=r.parsedType===ce.promise?r.data:Promise.resolve(r.data);return Sr(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Yi.create=(e,t)=>new Yi({type:e,typeName:be.ZodPromise,...Ee(t)});var Nn=class extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{se(o,s),s.fatal?r.abort():r.dirty();},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ge;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?ge:c.status==="dirty"?Ks(c.value):r.value==="dirty"?Ks(c.value):c});{if(r.value==="aborted")return ge;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?ge:a.status==="dirty"?Ks(a.value):r.value==="dirty"?Ks(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===false){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===false){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Wi(s))return ge;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>Wi(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):ge);Ne.assertNever(n);}};Nn.create=(e,t,r)=>new Nn({schema:e,typeName:be.ZodEffects,effect:t,...Ee(r)});Nn.createWithPreprocess=(e,t,r)=>new Nn({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...Ee(r)});var $n=class extends Re{_parse(t){return this._getType(t)===ce.undefined?Sr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$n.create=(e,t)=>new $n({innerType:e,typeName:be.ZodOptional,...Ee(t)});var Eo=class extends Re{_parse(t){return this._getType(t)===ce.null?Sr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Eo.create=(e,t)=>new Eo({innerType:e,typeName:be.ZodNullable,...Ee(t)});var ca=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ca.create=(e,t)=>new ca({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});var ua=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Tc(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Qr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Qr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};ua.create=(e,t)=>new ua({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});var Cc=class extends Re{_parse(t){if(this._getType(t)!==ce.nan){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.nan,received:o.parsedType}),ge}return {status:"valid",value:t.data}}};Cc.create=e=>new Cc({typeName:be.ZodNaN,...Ee(e)});var qC=Symbol("zod_brand"),$l=class extends Re{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Ol=class e extends Re{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ge:i.status==="dirty"?(r.dirty(),Ks(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?ge:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:be.ZodPipeline})}},fa=class extends Re{_parse(t){let r=this._def.innerType._parse(t),o=n=>(Wi(n)&&(n.value=Object.freeze(n.value)),n);return Tc(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};fa.create=(e,t)=>new fa({innerType:e,typeName:be.ZodReadonly,...Ee(t)});function aI(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function dI(e,t={},r){return e?Ji.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=aI(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=aI(t,o),a=s.fatal??r??true;n.addIssue({code:"custom",...s,fatal:a});}}):Ji.create()}var WC={object:en.lazycreate},be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly";})(be||(be={}));var KC=(e,t={message:`Input not instance of ${e.name}`})=>dI(r=>r instanceof e,t),pI=Ki.create,mI=Js.create,JC=Cc.create,YC=Ys.create,hI=Xs.create,XC=Qs.create,QC=Oc.create,ez=ea.create,tz=ta.create,rz=Ji.create,nz=oi.create,oz=ro.create,iz=Nc.create,sz=ii.create,az=en.create,cz=en.strictCreate,uz=ra.create,fz=Ym.create,lz=na.create,dz=_o.create,pz=Xm.create,mz=Pc.create,hz=Bc.create,gz=Qm.create,yz=oa.create,bz=ia.create,xz=sa.create,vz=aa.create,wz=Yi.create,_z=Nn.create,Ez=$n.create,Sz=Eo.create,Iz=Nn.createWithPreprocess,Az=Ol.create,kz=()=>pI().optional(),Rz=()=>mI().optional(),Tz=()=>hI().optional(),$z={string:(e=>Ki.create({...e,coerce:true})),number:(e=>Js.create({...e,coerce:true})),boolean:(e=>Xs.create({...e,coerce:true})),bigint:(e=>Ys.create({...e,coerce:true})),date:(e=>Qs.create({...e,coerce:true}))};var Oz=ge;var Nz=/[@#$%^&*+=/\\|~«»]/,Pz=/(!{2,}|\?{2,}|-{2,})/,Bz=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,la=({max:e,noSpaces:t}={})=>(t?ie.string().max(e??Number.POSITIVE_INFINITY).regex(/^\S*$/,"Spaces are not allowed"):ie.string().max(e??Number.POSITIVE_INFINITY)).refine(o=>!Bz.test(o),{message:"Emojis and symbols are not allowed"}).refine(o=>!Nz.test(o),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, \xAB, \xBB) are not allowed"}).refine(o=>!Pz.test(o),{message:"Repeated punctuations (!!, ??, --) are not allowed"}),ir=ie.string().url().startsWith("https://",{message:"Must be an https url"}).max(1024).refine(e=>!e.includes(" "),{message:"URL must not contain spaces"}).refine(e=>{try{let t=new URL(e).hostname;return !(t==="localhost"||t.endsWith(".localhost")||/^(\d{1,3}\.){3}\d{1,3}$/.test(t)||t.startsWith("[")&&t.endsWith("]"))}catch{return false}},{message:"URL must not use IP addresses or localhost"}),Nl=ie.string().max(32),eh=ie.string().max(32),Cz=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/,gI=ie.string().regex(Cz,{message:"Invalid CAIP-19 asset ID"}),Pl=ie.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),zz=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,yI=ie.string().max(1024).regex(zz,{message:"Must be a valid domain name (e.g., example.com, sub.example.com)"}).refine(e=>!e.includes("://"),{message:"Domain must not include protocol (http://, https://, etc.)"}).refine(e=>!e.includes("/"),{message:"Domain must not include path separators"}).refine(e=>!e.includes("@"),{message:"Domain must not include @ symbol"}).refine(e=>!e.includes(":"),{message:"Domain must not include port numbers"}),bI=ie.union([ie.literal("1:1"),ie.literal("3:2")]),xI=ie.object({header:ie.string(),payload:ie.string(),signature:ie.string()});ie.object({fid:ie.number(),type:ie.literal("app_key"),key:ie.string().startsWith("0x")});var Lz=ie.object({type:ie.literal("launch_frame"),name:Nl,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Pl.optional()}),Uz=ie.object({type:ie.literal("launch_miniapp"),name:Nl,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Pl.optional()}),Mz=ie.object({type:ie.literal("view_token"),token:gI}),Dz=ie.discriminatedUnion("type",[Uz,Mz,Lz]),jz=ie.object({title:eh,action:Dz});ie.object({version:ie.union([ie.string(),ie.number()]).transform(e=>String(e)).pipe(ie.union([ie.literal("next"),ie.literal("1")])),imageUrl:ir,aspectRatio:bI.optional(),button:jz});var _w=ie.object({url:ie.string(),token:ie.string()});ie.object({notificationId:ie.string().max(128),title:ie.string().max(32),body:ie.string().max(128),targetUrl:ir,tokens:ie.string().array().max(100)});ie.object({result:ie.object({successfulTokens:ie.array(ie.string()),invalidTokens:ie.array(ie.string()),rateLimitedTokens:ie.array(ie.string())})});var Fz=ie.object({event:ie.literal("miniapp_added"),notificationDetails:_w.optional()}),Hz=ie.object({event:ie.literal("miniapp_removed")}),Vz=ie.object({event:ie.literal("notifications_enabled"),notificationDetails:_w.required()}),Zz=ie.object({event:ie.literal("notifications_disabled")});ie.discriminatedUnion("event",[Fz,Hz,Vz,Zz]);var vI=["wallet.getEthereumProvider","wallet.getSolanaProvider","actions.ready","actions.openUrl","actions.close","actions.setPrimaryButton","actions.addMiniApp","actions.signIn","actions.viewCast","actions.viewProfile","actions.composeCast","actions.viewToken","actions.sendToken","actions.swapToken","actions.openMiniApp","actions.requestCameraAndMicrophoneAccess","experimental.signManifest","haptics.impactOccurred","haptics.notificationOccurred","haptics.selectionChanged","back"];var Gz=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],qz=ie.enum(Gz),Wz=ie.union([ie.literal("0.0.0"),ie.literal("0.0.1"),ie.literal("1"),ie.literal("next")]),Kz=la({max:30}),Jz=la({max:170}),Yz=ie.array(ir).max(3),Xz=ie.array(la({max:20,noSpaces:true})).max(5),Qz=la({max:30}),eL=la({max:30}),tL=la({max:100}),rL=ie.boolean(),nL=["eip155:1","eip155:8453","eip155:42161","eip155:421614","eip155:84532","eip155:666666666","eip155:100","eip155:10","eip155:11155420","eip155:137","eip155:11155111","eip155:7777777","eip155:130","eip155:10143","eip155:42220","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"];function _I(e){let t=new Set(e);return Array.from(t)}var oL=ie.array(ie.enum(nL)).transform(_I),iL=ie.array(ie.enum(vI)).transform(_I),wI=ie.object({version:Wz,name:Nl,iconUrl:ir,homeUrl:ir,imageUrl:ir.optional(),buttonTitle:eh.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Pl.optional(),webhookUrl:ir.optional(),subtitle:Kz.optional(),description:Jz.optional(),screenshotUrls:Yz.optional(),primaryCategory:qz.optional(),tags:Xz.optional(),heroImageUrl:ir.optional(),tagline:Qz.optional(),ogTitle:eL.optional(),ogDescription:tL.optional(),ogImageUrl:ir.optional(),noindex:rL.optional(),requiredChains:oL.optional(),requiredCapabilities:iL.optional(),castShareUrl:ir.optional(),canonicalDomain:yI.optional()}).refine(e=>{if(e.castShareUrl===void 0)return true;try{let t=new URL(e.homeUrl).hostname,r=new URL(e.castShareUrl).hostname;return t===r}catch{return false}},{message:"castShareUrl must have the same domain as homeUrl",path:["castShareUrl"]});ie.object({accountAssociation:xI,miniapp:wI.optional(),frame:wI.optional()}).refine(e=>e.frame&&e.miniapp?JSON.stringify(e.frame)===JSON.stringify(e.miniapp):true,{message:'If both "frame" and "miniapp" are provided, they must be identical',path:["frame","miniapp"]}).transform(e=>({...e,frame:e.frame??e.miniapp}));var xe=Jo(Cl());uh();ci();Jw();Ia();Ea();var $o=BigInt(0),Fr=BigInt(1),kA=BigInt(2),oU=BigInt(8),iU={zip215:true};function sU(e){let t=Fl(e);return oo(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function RA(e){let t=sU(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=kA<<BigInt(a*8)-Fr,f=r.create,d=pi(t.n,t.nBitLength);function g(v,E){let R=r.sqr(v),_=r.sqr(E),p=r.add(r.mul(t.a,R),_),A=r.add(r.ONE,r.mul(t.d,r.mul(R,_)));return r.eql(p,A)}if(!g(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let h=t.uvRatio||((v,E)=>{try{return {isValid:!0,value:r.sqrt(v*r.inv(E))}}catch{return {isValid:false,value:$o}}}),x=t.adjustScalarBytes||(v=>v),w=t.domain||((v,E,R)=>{if(Ro("phflag",R),E.length||R)throw new Error("Contexts/pre-hash are not supported");return v});function k(v,E,R=false){let _=R?Fr:$o;Dr("coordinate "+v,E,_,u);}function T(v){if(!(v instanceof S))throw new Error("ExtendedPoint expected")}let P=Hc((v,E)=>{let{ex:R,ey:_,ez:p}=v,A=v.is0();E==null&&(E=A?oU:r.inv(p));let G=f(R*E),J=f(_*E),Q=f(p*E);if(A)return {x:$o,y:Fr};if(Q!==Fr)throw new Error("invZ was invalid");return {x:G,y:J}}),O=Hc(v=>{let{a:E,d:R}=t;if(v.is0())throw new Error("bad point: ZERO");let{ex:_,ey:p,ez:A,et:G}=v,J=f(_*_),Q=f(p*p),ae=f(A*A),he=f(ae*ae),ye=f(J*E),Ke=f(ae*f(ye+Q)),Se=f(he+f(R*f(J*Q)));if(Ke!==Se)throw new Error("bad point: equation left != right (1)");let _e=f(_*p),tr=f(A*G);if(_e!==tr)throw new Error("bad point: equation left != right (2)");return true});class S{constructor(E,R,_,p){k("x",E),k("y",R),k("z",_,true),k("t",p),this.ex=E,this.ey=R,this.ez=_,this.et=p,Object.freeze(this);}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(E){if(E instanceof S)throw new Error("extended point not allowed");let{x:R,y:_}=E||{};return k("x",R),k("y",_),new S(R,_,Fr,f(R*_))}static normalizeZ(E){let R=di(r,E.map(_=>_.ez));return E.map((_,p)=>_.toAffine(R[p])).map(S.fromAffine)}static msm(E,R){return mh(S,d,E,R)}_setWindowSize(E){C.setWindowSize(this,E);}assertValidity(){O(this);}equals(E){T(E);let{ex:R,ey:_,ez:p}=this,{ex:A,ey:G,ez:J}=E,Q=f(R*J),ae=f(A*p),he=f(_*J),ye=f(G*p);return Q===ae&&he===ye}is0(){return this.equals(S.ZERO)}negate(){return new S(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:E}=t,{ex:R,ey:_,ez:p}=this,A=f(R*R),G=f(_*_),J=f(kA*f(p*p)),Q=f(E*A),ae=R+_,he=f(f(ae*ae)-A-G),ye=Q+G,Ke=ye-J,Se=Q-G,_e=f(he*Ke),tr=f(ye*Se),Ce=f(he*Se),je=f(Ke*ye);return new S(_e,tr,je,Ce)}add(E){T(E);let{a:R,d:_}=t,{ex:p,ey:A,ez:G,et:J}=this,{ex:Q,ey:ae,ez:he,et:ye}=E,Ke=f(p*Q),Se=f(A*ae),_e=f(J*_*ye),tr=f(G*he),Ce=f((p+A)*(Q+ae)-Ke-Se),je=tr-_e,Di=tr+_e,mt=f(Se-R*Ke),gt=f(Ce*je),Lp=f(Di*mt),yt=f(Ce*mt),bt=f(je*Di);return new S(gt,Lp,bt,yt)}subtract(E){return this.add(E.negate())}wNAF(E){return C.wNAFCached(this,E,S.normalizeZ)}multiply(E){let R=E;Dr("scalar",R,Fr,o);let{p:_,f:p}=this.wNAF(R);return S.normalizeZ([_,p])[0]}multiplyUnsafe(E,R=S.ZERO){let _=E;return Dr("scalar",_,$o,o),_===$o?z:this.is0()||_===Fr?this:C.wNAFCachedUnsafe(this,_,S.normalizeZ,R)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return C.unsafeLadder(this,o).is0()}toAffine(E){return P(this,E)}clearCofactor(){let{h:E}=t;return E===Fr?this:this.multiplyUnsafe(E)}static fromHex(E,R=false){let{d:_,a:p}=t,A=r.BYTES;E=Ge("pointHex",E,A),Ro("zip215",R);let G=E.slice(),J=E[A-1];G[A-1]=J&-129;let Q=va(G),ae=R?u:r.ORDER;Dr("pointHex.y",Q,$o,ae);let he=f(Q*Q),ye=f(he-Fr),Ke=f(_*he-p),{isValid:Se,value:_e}=h(ye,Ke);if(!Se)throw new Error("Point.fromHex: invalid y coordinate");let tr=(_e&Fr)===Fr,Ce=(J&128)!==0;if(!R&&_e===$o&&Ce)throw new Error("Point.fromHex: x=0 and x_0=1");return Ce!==tr&&(_e=f(-_e)),S.fromAffine({x:_e,y:Q})}static fromPrivateKey(E){let{scalar:R}=H(E);return N.multiply(R)}toRawBytes(){let{x:E,y:R}=this.toAffine(),_=Fc(R,r.BYTES);return _[_.length-1]|=E&Fr?128:0,_}toHex(){return ns(this.toRawBytes())}}S.BASE=new S(t.Gx,t.Gy,Fr,f(t.Gx*t.Gy)),S.ZERO=new S($o,Fr,Fr,$o);let{BASE:N,ZERO:z}=S,C=ph(S,a*8);function D(v){return Ue(v,o)}function q(v){return D(va(v))}function H(v){let E=r.BYTES;v=Ge("private key",v,E);let R=Ge("hashed private key",i(v),2*E),_=x(R.slice(0,E)),p=R.slice(E,2*E),A=q(_);return {head:_,prefix:p,scalar:A}}function Z(v){let{head:E,prefix:R,scalar:_}=H(v),p=N.multiply(_),A=p.toRawBytes();return {head:E,prefix:R,scalar:_,point:p,pointBytes:A}}function re(v){return Z(v).pointBytes}function I(v=Uint8Array.of(),...E){let R=ar(...E);return q(i(w(R,Ge("context",v),!!n)))}function l(v,E,R={}){v=Ge("message",v),n&&(v=n(v));let{prefix:_,scalar:p,pointBytes:A}=Z(E),G=I(R.context,_,v),J=N.multiply(G).toRawBytes(),Q=I(R.context,J,A,v),ae=D(G+Q*p);Dr("signature.s",ae,$o,o);let he=ar(J,Fc(ae,r.BYTES));return Ge("result",he,r.BYTES*2)}let m=iU;function y(v,E,R,_=m){let{context:p,zip215:A}=_,G=r.BYTES;v=Ge("signature",v,2*G),E=Ge("message",E),R=Ge("publicKey",R,G),A!==void 0&&Ro("zip215",A),n&&(E=n(E));let J=va(v.slice(G,2*G)),Q,ae,he;try{Q=S.fromHex(R,A),ae=S.fromHex(v.slice(0,G),A),he=N.multiplyUnsafe(J);}catch{return false}if(!A&&Q.isSmallOrder())return false;let ye=I(p,ae.toRawBytes(),Q.toRawBytes(),E);return ae.add(Q.multiplyUnsafe(ye)).subtract(he).clearCofactor().equals(S.ZERO)}return N._setWindowSize(8),{CURVE:t,getPublicKey:re,sign:l,verify:y,ExtendedPoint:S,utils:{getExtendedPublicKey:Z,randomPrivateKey:()=>s(r.BYTES),precompute(v=8,E=S.BASE){return E._setWindowSize(v),E.multiply(BigInt(3)),E}}}}Ia();var Yw=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),PA=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var lU=BigInt(1),BA=BigInt(2);BigInt(3);var dU=BigInt(5),pU=BigInt(8);function mU(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=Yw,a=e*e%i*e%i,c=at(a,BA,i)*a%i,u=at(c,lU,i)*e%i,f=at(u,dU,i)*u%i,d=at(f,t,i)*f%i,g=at(d,r,i)*d%i,h=at(g,o,i)*g%i,x=at(h,n,i)*h%i,w=at(x,n,i)*h%i,k=at(w,t,i)*f%i;return {pow_p_5_8:at(k,BA,i)*e%i,b2:a}}function hU(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function gU(e,t){let r=Yw,o=Ue(t*t*t,r),n=Ue(o*o*t,r),i=mU(e*n).pow_p_5_8,s=Ue(e*o*i,r),a=Ue(t*s*s,r),c=s,u=Ue(s*PA,r),f=a===e,d=a===Ue(-e,r),g=a===Ue(-e*PA,r);return f&&(s=c),(d||g)&&(s=u),vA(s,r)&&(s=Ue(-s,r)),{isValid:f||d,value:s}}var CA=pi(Yw,void 0,true),yU={a:CA.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:CA,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:pU,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:cA,randomBytes:Dc,adjustScalarBytes:hU,uvRatio:gU},Aa=RA(yU);var W_=Jo(Qw()),Nr=Jo(t_());uh();var Vl=xa;var tu=Jo(KA()),$=Jo(f_()),bR=Jo(f_());var l_=8078e3,d_=8078001,p_=8078004,m_=8078005,h_=8078006,g_=8078011;function rk(e){return Array.isArray(e)?"%5B"+e.map(rk).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function zj([e,t]){return `${e}=${rk(t)}`}function Lj(e){let t=Object.entries(e).map(zj).join("&");return btoa(t)}function Uj(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${Lj(t)}'`),`${r}\``}}var as=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,o;if(t){let{cause:i,...s}=t;i&&(o={cause:i}),Object.keys(s).length>0&&(r=s);}let n=Uj(e,r);super(n,o),this.context={__code:e,...r},this.name="SolanaError";}};function Mj(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function nk(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(Mj(t,e));return e.write(t,r,0),r}})}function ok(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function Wc(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function ik(e,t){if(Wc(e)!==Wc(t))throw new as(p_);if(Wc(e)&&Wc(t)&&e.fixedSize!==t.fixedSize)throw new as(m_,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Wc(e)&&!Wc(t)&&e.maxSize!==t.maxSize)throw new as(h_,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function sk(e,t,r=0){if(t.length-r<=0)throw new as(l_,{codecDescription:e})}function ak(e,t,r,o=0){let n=r.length-o;if(n<t)throw new as(d_,{bytesLength:n,codecDescription:e,expected:t})}function Dj(e,t,r,o){if(o<t||o>r)throw new as(g_,{codecDescription:e,max:r,min:t,value:o})}function ck(e){return e?.endian!==1}function jj(e){return nk({fixedSize:e.size,write(t,r,o){e.range&&Dj(e.name,e.range[0],e.range[1],t);let n=new ArrayBuffer(e.size);return e.set(new DataView(n),t,ck(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function Fj(e){return ok({fixedSize:e.size,read(t,r=0){sk(e.name,t,r),ak(e.name,e.size,t,r);let o=new DataView(Hj(t,r,e.size));return [e.get(o,ck(e.config)),r+e.size]}})}function Hj(e,t,r){let o=e.byteOffset+(t??0),n=r??e.byteLength;return e.buffer.slice(o,o+n)}var y_=(e={})=>jj({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,o)=>t.setBigUint64(0,BigInt(r),o),size:8}),Vj=(e={})=>Fj({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),uk=(e={})=>ik(y_(e),Vj(e));var b_=class extends TypeError{constructor(t,r){let o,{message:n,explanation:i,...s}=t,{path:a}=t,c=a.length===0?n:`At path: ${a.join(".")} -- ${n}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()]);}};function Zj(e){return Jl(e)&&typeof e[Symbol.iterator]=="function"}function Jl(e){return typeof e=="object"&&e!=null}function Fh(e){return Jl(e)&&!Array.isArray(e)}function io(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Gj(e){let{done:t,value:r}=e.next();return t?void 0:r}function qj(e,t,r,o){if(e===true)return;e===false?e={}:typeof e=="string"&&(e={message:e});let{path:n,branch:i}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${io(o)}\``}=e;return {value:o,type:s,refinement:a,key:n[n.length-1],path:n,branch:i,...e,message:c}}function*fk(e,t,r,o){Zj(e)||(e=[e]);for(let n of e){let i=qj(n,t,r,o);i&&(yield i);}}function*x_(e,t,r={}){let{path:o=[],branch:n=[e],coerce:i=false,mask:s=false}=r,a={path:o,branch:n,mask:s};i&&(e=t.coercer(e,a));let c="valid";for(let u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield [u,void 0];for(let[u,f,d]of t.entries(e,a)){let g=x_(f,d,{path:u===void 0?o:[...o,u],branch:u===void 0?n:[...n,f],coerce:i,mask:s,message:r.message});for(let h of g)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield [h[0],void 0]):i&&(f=h[1],u===void 0?e=f:e instanceof Map?e.set(u,f):e instanceof Set?e.add(f):Jl(e)&&(f!==void 0||u in e)&&(e[u]=f));}if(c!=="not_valid")for(let u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield [u,void 0];c==="valid"&&(yield [void 0,e]);}var Cn=class{constructor(t){let{type:r,schema:o,validator:n,refiner:i,coercer:s=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=o,this.entries=a,this.coercer=s,n?this.validator=(c,u)=>{let f=n(c,u);return fk(f,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let f=i(c,u);return fk(f,u,this,c)}:this.refiner=()=>[];}assert(t,r){return lk(t,this,r)}create(t,r){return Kc(t,this,r)}is(t){return dk(t,this)}mask(t,r){return Wj(t,this,r)}validate(t,r={}){return Yl(t,this,r)}};function lk(e,t,r){let o=Yl(e,t,{message:r});if(o[0])throw o[0]}function Kc(e,t,r){let o=Yl(e,t,{coerce:true,message:r});if(o[0])throw o[0];return o[1]}function Wj(e,t,r){let o=Yl(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function dk(e,t){return !Yl(e,t)[0]}function Yl(e,t,r={}){let o=x_(e,t,r),n=Gj(o);return n[0]?[new b_(n[0],function*(){for(let s of o)s[0]&&(yield s[0]);}),void 0]:[void 0,n[1]]}function $a(e,t){return new Cn({type:e,schema:null,validator:t})}function pk(){return $a("any",()=>true)}function ue(e){return new Cn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,o]of t.entries())yield [r,o,e];},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${io(t)}`}})}function so(){return $a("boolean",e=>typeof e=="boolean")}function Hh(e){return $a("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${io(t)}`)}function ct(e){let t=io(e),r=typeof e;return new Cn({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${io(o)}`}})}function Kj(){return $a("never",()=>false)}function fe(e){return new Cn({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function U(){return $a("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${io(e)}`)}function me(e){return new Cn({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function v_(e,t){return new Cn({type:"record",schema:null,*entries(r){if(Jl(r))for(let o in r){let n=r[o];yield [o,o,e],yield [o,n,t];}},validator(r){return Fh(r)||`Expected an object, but received: ${io(r)}`},coercer(r){return Fh(r)?{...r}:r}})}function ne(){return $a("string",e=>typeof e=="string"||`Expected a string, but received: ${io(e)}`)}function Vh(e){let t=Kj();return new Cn({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let o=Math.max(e.length,r.length);for(let n=0;n<o;n++)yield [n,r[n],e[n]||t];}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${io(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function W(e){let t=Object.keys(e);return new Cn({type:"type",schema:e,*entries(r){if(Jl(r))for(let o of t)yield [o,r[o],e[o]];},validator(r){return Fh(r)||`Expected an object, but received: ${io(r)}`},coercer(r){return Fh(r)?{...r}:r}})}function Ar(e){let t=e.map(r=>r.type).join(" | ");return new Cn({type:"union",schema:null,coercer(r,o){for(let n of e){let[i,s]=n.validate(r,{coerce:true,mask:o.mask});if(!i)return s}return r},validator(r,o){let n=[];for(let i of e){let[...s]=x_(r,i,o),[a]=s;if(a[0])for(let[c]of s)c&&n.push(c);else return []}return [`Expected the value to satisfy a union of \`${t}\`, but received: ${io(r)}`,...n]}})}function Oa(){return $a("unknown",()=>true)}function Jc(e,t,r){return new Cn({...e,coercer:(o,n)=>dk(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Jo(Lk());Jo(Cl(),1);var nd=Jo(Mk(),1);var Dk=nd.default;Yh();ud();function aR(e){try{return Aa.ExtendedPoint.fromHex(e),!0}catch{return false}}var u6=(e,t)=>Aa.sign(e,t.slice(0,32)),Z7=Aa.verify,He=e=>xe.Buffer.isBuffer(e)?e:e instanceof Uint8Array?xe.Buffer.from(e.buffer,e.byteOffset,e.byteLength):xe.Buffer.from(e),J_=class{constructor(t){Object.assign(this,t);}encode(){return xe.Buffer.from((0, tu.serialize)(n0,this))}static decode(t){return (0, tu.deserialize)(n0,this,t)}static decodeUnchecked(t){return (0, tu.deserializeUnchecked)(n0,this,t)}};var n0=new Map,xR,G7=32,ms=32;function q7(e){return e._bn!==void 0}var cR=1,Ie=class e extends J_{constructor(t){if(super({}),this._bn=void 0,q7(t))this._bn=t._bn;else {if(typeof t=="string"){let r=Nr.default.decode(t);if(r.length!=ms)throw new Error("Invalid public key input");this._bn=new W_.default(r);}else this._bn=new W_.default(t);if(this._bn.byteLength()>ms)throw new Error("Invalid public key input")}}static unique(){let t=new e(cR);return cR+=1,new e(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return Nr.default.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){let t=this._bn.toArrayLike(xe.Buffer);if(t.length===ms)return t;let r=xe.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return `PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,o){let n=xe.Buffer.concat([t.toBuffer(),xe.Buffer.from(r),o.toBuffer()]),i=Vl(n);return new e(i)}static createProgramAddressSync(t,r){let o=xe.Buffer.alloc(0);t.forEach(function(i){if(i.length>G7)throw new TypeError("Max seed length exceeded");o=xe.Buffer.concat([o,He(i)]);}),o=xe.Buffer.concat([o,r.toBuffer(),xe.Buffer.from("ProgramDerivedAddress")]);let n=Vl(o);if(aR(n))throw new Error("Invalid seeds, address must fall off the curve");return new e(n)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let o=255,n;for(;o!=0;){try{let i=t.concat(xe.Buffer.from([o]));n=this.createProgramAddressSync(i,r);}catch(i){if(i instanceof TypeError)throw i;o--;continue}return [n,o]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){let r=new e(t);return aR(r.toBytes())}};xR=Ie;Ie.default=new xR("11111111111111111111111111111111");n0.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var Pa=1232,f6=127,o0=64;var Qc=class{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r;}keySegments(){let t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(let r of this.keySegments()){if(t<r.length)return r[t];t-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((i,s)=>{o.set(i.toBase58(),s);});let n=i=>{let s=o.get(i.toBase58());if(s===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return s};return t.map(i=>({programIdIndex:n(i.programId),accountKeyIndexes:i.keys.map(s=>n(s.pubkey)),data:i.data}))}},Pe=(e="publicKey")=>$.blob(32,e),W7=(e="signature")=>$.blob(64,e),Xc=(e="string")=>{let t=$.struct([$.u32("length"),$.u32("lengthPadding"),$.blob($.offset($.u32(),-8),"chars")],e),r=t.decode.bind(t),o=t.encode.bind(t),n=t;return n.decode=(i,s)=>r(i,s).chars.toString(),n.encode=(i,s,a)=>{let c={chars:xe.Buffer.from(i,"utf8")};return o(c,s,a)},n.alloc=i=>$.u32().span+$.u32().span+xe.Buffer.from(i,"utf8").length,n},K7=(e="authorized")=>$.struct([Pe("staker"),Pe("withdrawer")],e),J7=(e="lockup")=>$.struct([$.ns64("unixTimestamp"),$.ns64("epoch"),Pe("custodian")],e),Y7=(e="voteInit")=>$.struct([Pe("nodePubkey"),Pe("authorizedVoter"),Pe("authorizedWithdrawer"),$.u8("commission")],e),X7=(e="voteAuthorizeWithSeedArgs")=>$.struct([$.u32("voteAuthorizationType"),Pe("currentAuthorityDerivedKeyOwnerPubkey"),Xc("currentAuthorityDerivedKeySeed"),Pe("newAuthorized")],e);function vn(e){let t=0,r=0;for(;;){let o=e.shift();if(t|=(o&127)<<r*7,r+=1,(o&128)===0)break}return t}function wn(e,t){let r=t;for(;;){let o=r&127;if(r>>=7,r==0){e.push(o);break}else o|=128,e.push(o);}}function it(e,t){if(!e)throw new Error(t||"Assertion failed")}var i0=class e{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r;}static compile(t,r){let o=new Map,n=s=>{let a=s.toBase58(),c=o.get(a);return c===void 0&&(c={isSigner:false,isWritable:false,isInvoked:false},o.set(a,c)),c},i=n(r);i.isSigner=true,i.isWritable=true;for(let s of t){n(s.programId).isInvoked=true;for(let a of s.keys){let c=n(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable;}}return new e(r,o)}getMessageComponents(){let t=[...this.keyMetaMap.entries()];it(t.length<=256,"Max static account keys length exceeded");let r=t.filter(([,c])=>c.isSigner&&c.isWritable),o=t.filter(([,c])=>c.isSigner&&!c.isWritable),n=t.filter(([,c])=>!c.isSigner&&c.isWritable),i=t.filter(([,c])=>!c.isSigner&&!c.isWritable),s={numRequiredSignatures:r.length+o.length,numReadonlySignedAccounts:o.length,numReadonlyUnsignedAccounts:i.length};{it(r.length>0,"Expected at least one writable signer key");let[c]=r[0];it(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer");}let a=[...r.map(([c])=>new Ie(c)),...o.map(([c])=>new Ie(c)),...n.map(([c])=>new Ie(c)),...i.map(([c])=>new Ie(c))];return [s,a]}extractTableLookup(t){let[r,o]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&s.isWritable),[n,i]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&!s.isWritable);if(!(r.length===0&&n.length===0))return [{accountKey:t.key,writableIndexes:r,readonlyIndexes:n},{writable:o,readonly:i}]}drainKeysFoundInLookupTable(t,r){let o=new Array,n=new Array;for(let[i,s]of this.keyMetaMap.entries())if(r(s)){let a=new Ie(i),c=t.findIndex(u=>u.equals(a));c>=0&&(it(c<256,"Max lookup table index exceeded"),o.push(c),n.push(a),this.keyMetaMap.delete(i));}return [o,n]}},wR="Reached end of buffer unexpectedly";function bi(e){if(e.length===0)throw new Error(wR);return e.shift()}function _n(e,...t){let[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(wR);return e.splice(...t)}var dd=class e{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new Ie(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]));}get version(){return "legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:Nr.default.decode(t.data)}))}get addressTableLookups(){return []}getAccountKeys(){return new Qc(this.staticAccountKeys)}static compile(t){let r=i0.compile(t.instructions,t.payerKey),[o,n]=r.getMessageComponents(),s=new Qc(n).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Nr.default.encode(a.data)}));return new e({header:o,accountKeys:n,recentBlockhash:t.recentBlockhash,instructions:s})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){let o=t-r,i=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return o<i}else {let o=r-this.header.numReadonlySignedAccounts;return t<o}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return [...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){let t=this.accountKeys.length,r=[];wn(r,t);let o=this.instructions.map(d=>{let{accounts:g,programIdIndex:h}=d,x=Array.from(Nr.default.decode(d.data)),w=[];wn(w,g.length);let k=[];return wn(k,x.length),{programIdIndex:h,keyIndicesCount:xe.Buffer.from(w),keyIndices:g,dataLength:xe.Buffer.from(k),data:x}}),n=[];wn(n,o.length);let i=xe.Buffer.alloc(Pa);xe.Buffer.from(n).copy(i);let s=n.length;o.forEach(d=>{let h=$.struct([$.u8("programIdIndex"),$.blob(d.keyIndicesCount.length,"keyIndicesCount"),$.seq($.u8("keyIndex"),d.keyIndices.length,"keyIndices"),$.blob(d.dataLength.length,"dataLength"),$.seq($.u8("userdatum"),d.data.length,"data")]).encode(d,i,s);s+=h;}),i=i.slice(0,s);let a=$.struct([$.blob(1,"numRequiredSignatures"),$.blob(1,"numReadonlySignedAccounts"),$.blob(1,"numReadonlyUnsignedAccounts"),$.blob(r.length,"keyCount"),$.seq(Pe("key"),t,"keys"),Pe("recentBlockhash")]),c={numRequiredSignatures:xe.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:xe.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:xe.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:xe.Buffer.from(r),keys:this.accountKeys.map(d=>He(d.toBytes())),recentBlockhash:Nr.default.decode(this.recentBlockhash)},u=xe.Buffer.alloc(2048),f=a.encode(c,u);return i.copy(u,f),u.slice(0,f+i.length)}static from(t){let r=[...t],o=bi(r);if(o!==(o&f6))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let n=bi(r),i=bi(r),s=vn(r),a=[];for(let g=0;g<s;g++){let h=_n(r,0,ms);a.push(new Ie(xe.Buffer.from(h)));}let c=_n(r,0,ms),u=vn(r),f=[];for(let g=0;g<u;g++){let h=bi(r),x=vn(r),w=_n(r,0,x),k=vn(r),T=_n(r,0,k),P=Nr.default.encode(xe.Buffer.from(T));f.push({programIdIndex:h,accounts:w,data:P});}let d={header:{numRequiredSignatures:o,numReadonlySignedAccounts:n,numReadonlyUnsignedAccounts:i},recentBlockhash:Nr.default.encode(xe.Buffer.from(c)),accountKeys:a,instructions:f};return new e(d)}},e6=class e{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups;}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(let r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups;}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Qc(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures,o=this.staticAccountKeys.length;if(t>=o){let n=t-o,i=this.addressTableLookups.reduce((s,a)=>s+a.writableIndexes.length,0);return n<i}else if(t>=this.header.numRequiredSignatures){let n=t-r,s=o-r-this.header.numReadonlyUnsignedAccounts;return n<s}else {let n=r-this.header.numReadonlySignedAccounts;return t<n}}resolveAddressTableLookups(t){let r={writable:[],readonly:[]};for(let o of this.addressTableLookups){let n=t.find(i=>i.key.equals(o.accountKey));if(!n)throw new Error(`Failed to find address lookup table account for table key ${o.accountKey.toBase58()}`);for(let i of o.writableIndexes)if(i<n.state.addresses.length)r.writable.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`);for(let i of o.readonlyIndexes)if(i<n.state.addresses.length)r.readonly.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`)}return r}static compile(t){let r=i0.compile(t.instructions,t.payerKey),o=new Array,n={writable:new Array,readonly:new Array},i=t.addressLookupTableAccounts||[];for(let f of i){let d=r.extractTableLookup(f);if(d!==void 0){let[g,{writable:h,readonly:x}]=d;o.push(g),n.writable.push(...h),n.readonly.push(...x);}}let[s,a]=r.getMessageComponents(),u=new Qc(a,n).compileInstructions(t.instructions);return new e({header:s,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:o})}serialize(){let t=Array();wn(t,this.staticAccountKeys.length);let r=this.serializeInstructions(),o=Array();wn(o,this.compiledInstructions.length);let n=this.serializeAddressTableLookups(),i=Array();wn(i,this.addressTableLookups.length);let s=$.struct([$.u8("prefix"),$.struct([$.u8("numRequiredSignatures"),$.u8("numReadonlySignedAccounts"),$.u8("numReadonlyUnsignedAccounts")],"header"),$.blob(t.length,"staticAccountKeysLength"),$.seq(Pe(),this.staticAccountKeys.length,"staticAccountKeys"),Pe("recentBlockhash"),$.blob(o.length,"instructionsLength"),$.blob(r.length,"serializedInstructions"),$.blob(i.length,"addressTableLookupsLength"),$.blob(n.length,"serializedAddressTableLookups")]),a=new Uint8Array(Pa),u=s.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(f=>f.toBytes()),recentBlockhash:Nr.default.decode(this.recentBlockhash),instructionsLength:new Uint8Array(o),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},a);return a.slice(0,u)}serializeInstructions(){let t=0,r=new Uint8Array(Pa);for(let o of this.compiledInstructions){let n=Array();wn(n,o.accountKeyIndexes.length);let i=Array();wn(i,o.data.length);let s=$.struct([$.u8("programIdIndex"),$.blob(n.length,"encodedAccountKeyIndexesLength"),$.seq($.u8(),o.accountKeyIndexes.length,"accountKeyIndexes"),$.blob(i.length,"encodedDataLength"),$.blob(o.data.length,"data")]);t+=s.encode({programIdIndex:o.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:o.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:o.data},r,t);}return r.slice(0,t)}serializeAddressTableLookups(){let t=0,r=new Uint8Array(Pa);for(let o of this.addressTableLookups){let n=Array();wn(n,o.writableIndexes.length);let i=Array();wn(i,o.readonlyIndexes.length);let s=$.struct([Pe("accountKey"),$.blob(n.length,"encodedWritableIndexesLength"),$.seq($.u8(),o.writableIndexes.length,"writableIndexes"),$.blob(i.length,"encodedReadonlyIndexesLength"),$.seq($.u8(),o.readonlyIndexes.length,"readonlyIndexes")]);t+=s.encode({accountKey:o.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:o.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:o.readonlyIndexes},r,t);}return r.slice(0,t)}static deserialize(t){let r=[...t],o=bi(r),n=o&f6;it(o!==n,"Expected versioned message but received legacy message");let i=n;it(i===0,`Expected versioned message with version 0 but found version ${i}`);let s={numRequiredSignatures:bi(r),numReadonlySignedAccounts:bi(r),numReadonlyUnsignedAccounts:bi(r)},a=[],c=vn(r);for(let x=0;x<c;x++)a.push(new Ie(_n(r,0,ms)));let u=Nr.default.encode(_n(r,0,ms)),f=vn(r),d=[];for(let x=0;x<f;x++){let w=bi(r),k=vn(r),T=_n(r,0,k),P=vn(r),O=new Uint8Array(_n(r,0,P));d.push({programIdIndex:w,accountKeyIndexes:T,data:O});}let g=vn(r),h=[];for(let x=0;x<g;x++){let w=new Ie(_n(r,0,ms)),k=vn(r),T=_n(r,0,k),P=vn(r),O=_n(r,0,P);h.push({accountKey:w,writableIndexes:T,readonlyIndexes:O});}return new e({header:s,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:h})}},f0={deserializeMessageVersion(e){let t=e[0],r=t&f6;return r===t?"legacy":r},deserialize:e=>{let t=f0.deserializeMessageVersion(e);if(t==="legacy")return dd.from(e);if(t===0)return e6.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var Q7=xe.Buffer.alloc(o0).fill(0),Qe=class{constructor(t){this.keys=void 0,this.programId=void 0,this.data=xe.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data);}toJSON(){return {keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:o})=>({pubkey:t.toJSON(),isSigner:r,isWritable:o})),programId:this.programId.toJSON(),data:[...this.data]}}},tt=class e{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){let{minContextSlot:r,nonceInfo:o}=t;this.minNonceContextSlot=r,this.nonceInfo=o;}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){let{blockhash:r,lastValidBlockHeight:o}=t;this.recentBlockhash=r,this.lastValidBlockHeight=o;}else {let{recentBlockhash:r,nonceInfo:o}=t;o&&(this.nonceInfo=o),this.recentBlockhash=r;}}toJSON(){return {recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new Qe(r));}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let o;if(this.feePayer)o=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)o=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let w=0;w<r.length;w++)if(r[w].programId===void 0)throw new Error(`Transaction instruction index ${w} has undefined program id`);let n=[],i=[];r.forEach(w=>{w.keys.forEach(T=>{i.push({...T});});let k=w.programId.toString();n.includes(k)||n.push(k);}),n.forEach(w=>{i.push({pubkey:new Ie(w),isSigner:false,isWritable:false});});let s=[];i.forEach(w=>{let k=w.pubkey.toString(),T=s.findIndex(P=>P.pubkey.toString()===k);T>-1?(s[T].isWritable=s[T].isWritable||w.isWritable,s[T].isSigner=s[T].isSigner||w.isSigner):s.push(w);}),s.sort(function(w,k){if(w.isSigner!==k.isSigner)return w.isSigner?-1:1;if(w.isWritable!==k.isWritable)return w.isWritable?-1:1;let T={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return w.pubkey.toBase58().localeCompare(k.pubkey.toBase58(),"en",T)});let a=s.findIndex(w=>w.pubkey.equals(o));if(a>-1){let[w]=s.splice(a,1);w.isSigner=true,w.isWritable=true,s.unshift(w);}else s.unshift({pubkey:o,isSigner:true,isWritable:true});for(let w of this.signatures){let k=s.findIndex(T=>T.pubkey.equals(w.publicKey));if(k>-1)s[k].isSigner||(s[k].isSigner=true,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${w.publicKey.toString()}`)}let c=0,u=0,f=0,d=[],g=[];s.forEach(({pubkey:w,isSigner:k,isWritable:T})=>{k?(d.push(w.toString()),c+=1,T||(u+=1)):(g.push(w.toString()),T||(f+=1));});let h=d.concat(g),x=r.map(w=>{let{data:k,programId:T}=w;return {programIdIndex:h.indexOf(T.toString()),accounts:w.keys.map(P=>h.indexOf(P.pubkey.toString())),data:Nr.default.encode(k)}});return x.forEach(w=>{it(w.programIdIndex>=0),w.accounts.forEach(k=>it(k>=0));}),new dd({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:f},accountKeys:h,recentBlockhash:t,instructions:x})}_compile(){let t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((n,i)=>r[i].equals(n.publicKey))||(this.signatures=r.map(o=>({signature:null,publicKey:o}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return (await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");let r=new Set;this.signatures=t.filter(o=>{let n=o.toString();return r.has(n)?false:(r.add(n),true)}).map(o=>({signature:null,publicKey:o}));}sign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}this.signatures=o.map(i=>({signature:null,publicKey:i.publicKey}));let n=this._compile();this._partialSign(n,...o);}partialSign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}let n=this._compile();this._partialSign(n,...o);}_partialSign(t,...r){let o=t.serialize();r.forEach(n=>{let i=u6(o,n.secretKey);this._addSignature(n.publicKey,He(i));});}addSignature(t,r){this._compile(),this._addSignature(t,r);}_addSignature(t,r){it(r.length===64);let o=this.signatures.findIndex(n=>t.equals(n.publicKey));if(o<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[o].signature=xe.Buffer.from(r);}verifySignatures(t=true){return !this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){let o={};for(let{signature:n,publicKey:i}of this.signatures)n===null?r&&(o.missing||=[]).push(i):Z7(n,t,i.toBytes())||(o.invalid||=[]).push(i);return o.invalid||o.missing?o:void 0}serialize(t){let{requireAllSignatures:r,verifySignatures:o}=Object.assign({requireAllSignatures:true,verifySignatures:true},t),n=this.serializeMessage();if(o){let i=this._getMessageSignednessErrors(n,r);if(i){let s="Signature verification failed.";throw i.invalid&&(s+=`
63
63
  Invalid signature for public key${i.invalid.length===1?"":"(s)"} [\`${i.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),i.missing&&(s+=`
64
- Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(s)}}return this._serialize(n)}_serialize(t){let{signatures:r}=this,o=[];wn(o,r.length);let n=o.length+r.length*64+t.length,i=xe.Buffer.alloc(n);return it(r.length<256),xe.Buffer.from(o).copy(i,0),r.forEach(({signature:s},a)=>{s!==null&&(it(s.length===64,"signature has invalid length"),xe.Buffer.from(s).copy(i,o.length+a*64));}),t.copy(i,o.length+r.length*64),it(i.length<=$a,`Transaction too large: ${i.length} > ${$a}`),i}get keys(){return it(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return it(this.instructions.length===1),this.instructions[0].programId}get data(){return it(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t],o=vn(r),n=[];for(let i=0;i<o;i++){let s=_n(r,0,t0);n.push(Nr.default.encode(xe.Buffer.from(s)));}return e.populate(id.from(r),n)}static populate(t,r=[]){let o=new e;return o.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(o.feePayer=t.accountKeys[0]),r.forEach((n,i)=>{let s={signature:n==Nr.default.encode(Y7)?null:Nr.default.decode(n),publicKey:t.accountKeys[i]};o.signatures.push(s);}),t.instructions.forEach(n=>{let i=n.accounts.map(s=>{let a=t.accountKeys[s];return {pubkey:a,isSigner:o.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(s),isWritable:t.isAccountWritable(s)}});o.instructions.push(new Qe({keys:i,programId:t.accountKeys[n.programIdIndex],data:Nr.default.decode(n.data)}));}),o._message=t,o._json=o.toJSON(),o}};var n0=class e{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)it(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else {let o=[];for(let n=0;n<t.header.numRequiredSignatures;n++)o.push(new Uint8Array(t0));this.signatures=o;}this.message=t;}serialize(){let t=this.message.serialize(),r=Array();wn(r,this.signatures.length);let o=T.struct([T.blob(r.length,"encodedSignaturesLength"),T.seq(G7(),this.signatures.length,"signatures"),T.blob(t.length,"serializedMessage")]),n=new Uint8Array(2048),i=o.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},n);return n.slice(0,i)}static deserialize(t){let r=[...t],o=[],n=vn(r);for(let s=0;s<n;s++)o.push(new Uint8Array(_n(r,0,t0)));let i=a0.deserialize(new Uint8Array(r));return new e(i,o)}sign(t){let r=this.message.serialize(),o=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(let n of t){let i=o.findIndex(s=>s.equals(n.publicKey));it(i>=0,`Cannot sign with non signer key ${n.publicKey.toBase58()}`),this.signatures[i]=s6(r,n.secretKey);}}addSignature(t,r){it(r.byteLength===64,"Signature must be 64 bytes long");let n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(t));it(n>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[n]=r;}};new Ie("SysvarC1ock11111111111111111111111111111111");new Ie("SysvarEpochSchedu1e111111111111111111111111");new Ie("Sysvar1nstructions1111111111111111111111111");new Ie("SysvarRecentB1ockHashes11111111111111111111");new Ie("SysvarRent111111111111111111111111111111111");new Ie("SysvarRewards111111111111111111111111111111");new Ie("SysvarS1otHashes111111111111111111111111111");new Ie("SysvarS1otHistory11111111111111111111111111");new Ie("SysvarStakeHistory1111111111111111111111111");var nF=T.nu64("lamportsPerSignature"),oF=T.struct([T.u32("version"),T.u32("state"),Pe("authorizedPubkey"),Pe("nonce"),T.struct([nF],"feeCalculator")]);oF.span;function Yc(e){let t=(0, hR.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=sk();return n.decode=(s,a)=>{let c=r(s,a);return i.decode(c)},n.encode=(s,a,c)=>{let u=i.encode(s);return o(u,a,c)},n}Object.freeze({Create:{index:0,layout:T.struct([T.u32("instruction"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},Assign:{index:1,layout:T.struct([T.u32("instruction"),Pe("programId")])},Transfer:{index:2,layout:T.struct([T.u32("instruction"),Yc("lamports")])},CreateWithSeed:{index:3,layout:T.struct([T.u32("instruction"),Pe("base"),Kc("seed"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},AdvanceNonceAccount:{index:4,layout:T.struct([T.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:T.struct([T.u32("instruction"),Pe("authorized")])},AuthorizeNonceAccount:{index:7,layout:T.struct([T.u32("instruction"),Pe("authorized")])},Allocate:{index:8,layout:T.struct([T.u32("instruction"),T.ns64("space")])},AllocateWithSeed:{index:9,layout:T.struct([T.u32("instruction"),Pe("base"),Kc("seed"),T.ns64("space"),Pe("programId")])},AssignWithSeed:{index:10,layout:T.struct([T.u32("instruction"),Pe("base"),Kc("seed"),Pe("programId")])},TransferWithSeed:{index:11,layout:T.struct([T.u32("instruction"),Yc("lamports"),Kc("seed"),Pe("programId")])},UpgradeNonceAccount:{index:12,layout:T.struct([T.u32("instruction")])}});new Ie("11111111111111111111111111111111");new Ie("BPFLoader2111111111111111111111111111111111");({layout:T.struct([T.u32("typeIndex"),Yc("deactivationSlot"),T.nu64("lastExtendedSlot"),T.u8("lastExtendedStartIndex"),T.u8(),T.seq(Pe(),T.offset(T.u8(),-1),"authority")])});var xt=qc(Dh(Ie),ne(),e=>new Ie(e)),xR=jh([ne(),ct("base64")]),c6=qc(Dh(xe.Buffer),xR,e=>xe.Buffer.from(e[0],"base64"));function vR(e){return Ar([W({jsonrpc:ct("2.0"),id:ne(),result:e}),W({jsonrpc:ct("2.0"),id:ne(),error:W({code:Ra(),message:ne(),data:me(fk())})})])}var sF=vR(Ra());function rt(e){return qc(vR(e),sF,t=>"error"in t?t:{...t,result:Gc(t.result,e)})}function ao(e){return rt(W({context:W({slot:U()}),value:e}))}function c0(e){return W({context:W({slot:U()}),value:e})}var aF=W({foundation:U(),foundationTerm:U(),initial:U(),taper:U(),terminal:U()});rt(ue(fe(W({epoch:U(),effectiveSlot:U(),amount:U(),postBalance:U(),commission:me(fe(U()))}))));var cF=ue(W({slot:U(),prioritizationFee:U()})),uF=W({total:U(),validator:U(),foundation:U(),epoch:U()}),fF=W({epoch:U(),slotIndex:U(),slotsInEpoch:U(),absoluteSlot:U(),blockHeight:me(U()),transactionCount:me(U())}),lF=W({slotsPerEpoch:U(),leaderScheduleSlotOffset:U(),warmup:io(),firstNormalEpoch:U(),firstNormalSlot:U()}),dF=y_(ne(),ue(U())),Oa=fe(Ar([W({}),ne()])),pF=W({err:Oa}),mF=ct("receivedSignature");W({"solana-core":ne(),"feature-set":me(U())});var hF=W({program:ne(),programId:xt,parsed:Ra()}),gF=W({programId:xt,accounts:ue(xt),data:ne()});ao(W({err:fe(Ar([W({}),ne()])),logs:fe(ue(ne())),accounts:me(fe(ue(fe(W({executable:io(),owner:ne(),lamports:U(),data:ue(ne()),rentEpoch:me(U())}))))),unitsConsumed:me(U()),returnData:me(fe(W({programId:ne(),data:jh([ne(),ct("base64")])}))),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(Ar([hF,gF]))}))))}));ao(W({byIdentity:y_(ne(),ue(U())),range:W({firstSlot:U(),lastSlot:U()})}));rt(aF);rt(uF);rt(cF);rt(fF);rt(lF);rt(dF);rt(U());ao(W({total:U(),circulating:U(),nonCirculating:U(),nonCirculatingAccounts:ue(xt)}));var yF=W({amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())});ao(ue(W({address:xt,amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())})));ao(ue(W({pubkey:xt,account:W({executable:io(),owner:xt,lamports:U(),data:c6,rentEpoch:U()})})));var e6=W({program:ne(),parsed:Ra(),space:U()});ao(ue(W({pubkey:xt,account:W({executable:io(),owner:xt,lamports:U(),data:e6,rentEpoch:U()})})));ao(ue(W({lamports:U(),address:xt})));var u6=W({executable:io(),owner:xt,lamports:U(),data:c6,rentEpoch:U()});W({pubkey:xt,account:u6});var bF=qc(Ar([Dh(xe.Buffer),e6]),Ar([xR,e6]),e=>Array.isArray(e)?Gc(e,c6):e),xF=W({executable:io(),owner:xt,lamports:U(),data:bF,rentEpoch:U()});W({pubkey:xt,account:xF});W({state:Ar([ct("active"),ct("inactive"),ct("activating"),ct("deactivating")]),active:U(),inactive:U()});rt(ue(W({signature:ne(),slot:U(),err:Oa,memo:fe(ne()),blockTime:me(fe(U()))})));rt(ue(W({signature:ne(),slot:U(),err:Oa,memo:fe(ne()),blockTime:me(fe(U()))})));W({subscription:U(),result:c0(u6)});var vF=W({pubkey:xt,account:u6});W({subscription:U(),result:c0(vF)});var wF=W({parent:U(),slot:U(),root:U()});W({subscription:U(),result:wF});var _F=Ar([W({type:Ar([ct("firstShredReceived"),ct("completed"),ct("optimisticConfirmation"),ct("root")]),slot:U(),timestamp:U()}),W({type:ct("createdBank"),parent:U(),slot:U(),timestamp:U()}),W({type:ct("frozen"),slot:U(),timestamp:U(),stats:W({numTransactionEntries:U(),numSuccessfulTransactions:U(),numFailedTransactions:U(),maxTransactionsPerEntry:U()})}),W({type:ct("dead"),slot:U(),timestamp:U(),err:ne()})]);W({subscription:U(),result:_F});W({subscription:U(),result:c0(Ar([pF,mF]))});W({subscription:U(),result:U()});W({pubkey:ne(),gossip:fe(ne()),tpu:fe(ne()),rpc:fe(ne()),version:fe(ne())});var cR=W({votePubkey:ne(),nodePubkey:ne(),activatedStake:U(),epochVoteAccount:io(),epochCredits:ue(jh([U(),U(),U()])),commission:U(),lastVote:U(),rootSlot:fe(U())});rt(W({current:ue(cR),delinquent:ue(cR)}));var EF=Ar([ct("processed"),ct("confirmed"),ct("finalized")]),SF=W({slot:U(),confirmations:fe(U()),err:Oa,confirmationStatus:me(EF)});ao(ue(fe(SF)));rt(U());var wR=W({accountKey:xt,writableIndexes:ue(U()),readonlyIndexes:ue(U())}),f6=W({signatures:ue(ne()),message:W({accountKeys:ue(ne()),header:W({numRequiredSignatures:U(),numReadonlySignedAccounts:U(),numReadonlyUnsignedAccounts:U()}),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()})),recentBlockhash:ne(),addressTableLookups:me(ue(wR))})}),_R=W({pubkey:xt,signer:io(),writable:io(),source:me(Ar([ct("transaction"),ct("lookupTable")]))}),ER=W({accountKeys:ue(_R),signatures:ue(ne())}),SR=W({parsed:Ra(),program:ne(),programId:xt}),IR=W({accounts:ue(xt),data:ne(),programId:xt}),IF=Ar([IR,SR]),AF=Ar([W({parsed:Ra(),program:ne(),programId:ne()}),W({accounts:ue(ne()),data:ne(),programId:ne()})]),AR=qc(IF,AF,e=>"accounts"in e?Gc(e,IR):Gc(e,SR)),kR=W({signatures:ue(ne()),message:W({accountKeys:ue(_R),instructions:ue(AR),recentBlockhash:ne(),addressTableLookups:me(fe(ue(wR)))})}),o0=W({accountIndex:U(),mint:ne(),owner:me(ne()),programId:me(ne()),uiTokenAmount:yF}),RR=W({writable:ue(xt),readonly:ue(xt)}),u0=W({err:Oa,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()}))})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(RR),computeUnitsConsumed:me(U()),costUnits:me(U())}),l6=W({err:Oa,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(AR)})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(RR),computeUnitsConsumed:me(U()),costUnits:me(U())}),Qc=Ar([ct(0),ct("legacy")]),Na=W({pubkey:ne(),lamports:U(),postBalance:fe(U()),rewardType:fe(ne()),commission:me(fe(U()))});rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:f6,meta:fe(u0),version:me(Qc)})),rewards:me(ue(Na)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Na)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:ER,meta:fe(u0),version:me(Qc)})),rewards:me(ue(Na)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:kR,meta:fe(l6),version:me(Qc)})),rewards:me(ue(Na)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:ER,meta:fe(l6),version:me(Qc)})),rewards:me(ue(Na)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Na)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:f6,meta:fe(u0)})),rewards:me(ue(Na)),blockTime:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),signatures:ue(ne()),blockTime:fe(U())})));rt(fe(W({slot:U(),meta:fe(u0),blockTime:me(fe(U())),transaction:f6,version:me(Qc)})));rt(fe(W({slot:U(),transaction:kR,meta:fe(l6),blockTime:me(fe(U())),version:me(Qc)})));ao(W({blockhash:ne(),lastValidBlockHeight:U()}));ao(io());var kF=W({slot:U(),numTransactions:U(),numSlots:U(),samplePeriodSecs:U()});rt(ue(kF));ao(fe(W({feeCalculator:W({lamportsPerSignature:U()})})));rt(ne());rt(ne());var RF=W({err:Oa,logs:ue(ne()),signature:ne()});W({result:c0(RF),subscription:U()});Object.freeze({CreateLookupTable:{index:0,layout:T.struct([T.u32("instruction"),Yc("recentSlot"),T.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:T.struct([T.u32("instruction")])},ExtendLookupTable:{index:2,layout:T.struct([T.u32("instruction"),Yc(),T.seq(Pe(),T.offset(T.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:T.struct([T.u32("instruction")])},CloseLookupTable:{index:4,layout:T.struct([T.u32("instruction")])}});new Ie("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:T.struct([T.u8("instruction"),T.u32("units"),T.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:T.struct([T.u8("instruction"),T.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:T.struct([T.u8("instruction"),T.u32("units")])},SetComputeUnitPrice:{index:3,layout:T.struct([T.u8("instruction"),Yc("microLamports")])}});new Ie("ComputeBudget111111111111111111111111111111");T.struct([T.u8("numSignatures"),T.u8("padding"),T.u16("signatureOffset"),T.u16("signatureInstructionIndex"),T.u16("publicKeyOffset"),T.u16("publicKeyInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u16("messageInstructionIndex")]);new Ie("Ed25519SigVerify111111111111111111111111111");xn.utils.isValidPrivateKey;xn.getPublicKey;T.struct([T.u8("numSignatures"),T.u16("signatureOffset"),T.u8("signatureInstructionIndex"),T.u16("ethAddressOffset"),T.u8("ethAddressInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u8("messageInstructionIndex"),T.blob(20,"ethAddress"),T.blob(64,"signature"),T.u8("recoveryId")]);new Ie("KeccakSecp256k11111111111111111111111111111");var TR;new Ie("StakeConfig11111111111111111111111111111111");var ad=class{constructor(t,r,o){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=o;}};TR=ad;ad.default=new TR(0,0,Ie.default);Object.freeze({Initialize:{index:0,layout:T.struct([T.u32("instruction"),q7(),W7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:T.struct([T.u32("instruction")])},Split:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Withdraw:{index:4,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Deactivate:{index:5,layout:T.struct([T.u32("instruction")])},Merge:{index:7,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType"),Kc("authoritySeed"),Pe("authorityOwner")])}});new Ie("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:T.struct([T.u32("instruction"),K7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:T.struct([T.u32("instruction"),J7()])}});new Ie("Vote111111111111111111111111111111111111111");new Ie("Va1idator1nfo111111111111111111111111111111");W({name:ne(),website:me(ne()),details:me(ne()),iconUrl:me(ne()),keybaseUsername:me(ne())});new Ie("Vote111111111111111111111111111111111111111");T.struct([Pe("nodePubkey"),Pe("authorizedWithdrawer"),T.u8("commission"),T.nu64(),T.seq(T.struct([T.nu64("slot"),T.u32("confirmationCount")]),T.offset(T.u32(),-8),"votes"),T.u8("rootSlotValid"),T.nu64("rootSlot"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),Pe("authorizedVoter")]),T.offset(T.u32(),-8),"authorizedVoters"),T.struct([T.seq(T.struct([Pe("authorizedPubkey"),T.nu64("epochOfLastAuthorizedSwitch"),T.nu64("targetEpoch")]),32,"buf"),T.nu64("idx"),T.u8("isEmpty")],"priorVoters"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),T.nu64("credits"),T.nu64("prevCredits")]),T.offset(T.u32(),-8),"epochCredits"),T.struct([T.nu64("slot"),T.nu64("timestamp")],"lastTimestamp")]);var $R=e=>({request:e,signMessage:t=>e({method:"signMessage",params:{message:t}}),signTransaction:t=>e({method:"signTransaction",params:{transaction:t}}),signAndSendTransaction:t=>e({method:"signAndSendTransaction",params:t})});function OR(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function PF(e){let t=Buffer.from(e,"base64");return a0.deserializeMessageVersion(t)==="legacy"?n0.deserialize(t):tt.from(t)}function NR(e){return async r=>{if(r.method==="connect")return await e(r);if(r.method==="signMessage")return await e(r);if(r.method==="signAndSendTransaction"){let{transaction:o}=r.params,n={transaction:OR(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:OR(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:PF(i)}}}}var PR=({miniAppHost:e,emitter:t})=>{let r,o=null;return {visible:false,get onback(){return o},set onback(n){o&&t.removeListener("backNavigationTriggered",o),o=n,n&&t.addListener("backNavigationTriggered",n);},async show(){await e.updateBackState({visible:true}),this.visible=true;},async hide(){await e.updateBackState({visible:false}),this.visible=false;},async enableWebNavigation(){r=BF({back:this,emitter:t});},async disableWebNavigation(){r?.(),r=void 0;}}};function BF({emitter:e,back:t}){let r=CF();if(r)return zF({emitter:e,back:t,navigation:r});if(typeof window<"u")return LF({emitter:e,back:t,window})}function CF(){if(typeof window<"u"&&window.navigation!==void 0)return window.navigation}function zF({emitter:e,back:t,navigation:r}){function o(){r.canGoBack?t.show():t.hide();}function n(){t.visible&&r.canGoBack&&r.back();}return r.addEventListener("navigatesuccess",o),e.addListener("backNavigationTriggered",n),()=>{r.removeEventListener("navigatesuccess",o),e.removeListener("backNavigationTriggered",n);}}function LF({emitter:e,back:t,window:r}){t.show();function o(){t.visible&&r.history.back();}return e.addListener("backNavigationTriggered",o),()=>{e.removeListener("backNavigationTriggered",o);}}var BR="0.1.1";function CR(){return BR}var f0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=`https://oxlib.sh${n??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
65
- `);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${CR()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return zR(this,t)}};function zR(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?zR(e.cause,t):t?null:e}function l0(e,t={}){let{raw:r=false}=t,o=e;if(r)return e;if(o.error){let{code:n}=o.error,i=n===Pa.code?Pa:n===cd.code?cd:n===yd.code?yd:n===hd.code?hd:n===pd.code?pd:n===gd.code?gd:n===dd.code?dd:n===bd.code?bd:n===ud.code?ud:n===fd.code?fd:n===ld.code?ld:n===md.code?md:br;throw new i(o.error)}return o.result}var br=class extends Error{constructor(t){let{code:r,message:o,data:n}=t;super(o),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r,this.data=n;}},cd=class e extends br{constructor(t={}){super({message:"Missing or invalid parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32e3}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidInputError"});}};Object.defineProperty(cd,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var ud=class e extends br{constructor(t={}){super({message:"Requested resource not found.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32001}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceNotFoundError"});}};Object.defineProperty(ud,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var fd=class e extends br{constructor(t={}){super({message:"Requested resource not available.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32002}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceUnavailableError"});}};Object.defineProperty(fd,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var ld=class e extends br{constructor(t={}){super({message:"Transaction creation failed.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32003}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.TransactionRejectedError"});}};Object.defineProperty(ld,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var dd=class e extends br{constructor(t={}){super({message:"Method is not implemented.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32004}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotSupportedError"});}};Object.defineProperty(dd,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var pd=class e extends br{constructor(t={}){super({message:"Rate limit exceeded.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32005}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.LimitExceededError"});}};Object.defineProperty(pd,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var md=class e extends br{constructor(t={}){super({message:"JSON-RPC version not supported.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32006}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.VersionNotSupportedError"});}};Object.defineProperty(md,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var hd=class e extends br{constructor(t={}){super({message:"Input is not a valid JSON-RPC request.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32600}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidRequestError"});}};Object.defineProperty(hd,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var gd=class e extends br{constructor(t={}){super({message:"Method does not exist.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32601}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotFoundError"});}};Object.defineProperty(gd,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var yd=class e extends br{constructor(t={}){super({message:"Invalid method parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32602}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidParamsError"});}};Object.defineProperty(yd,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var Pa=class e extends br{constructor(t={}){super({message:"Internal JSON-RPC error.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32603}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InternalErrorError"});}};Object.defineProperty(Pa,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var bd=class e extends br{constructor(t={}){super({message:"Failed to parse JSON-RPC response.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32700}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ParseError"});}};Object.defineProperty(bd,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var Bo=class extends Error{constructor(t,r){super(r),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=t,this.details=r;}},xd=class extends Bo{constructor({message:t="The user rejected the request."}={}){super(4001,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UserRejectedRequestError"});}};Object.defineProperty(xd,"code",{enumerable:true,configurable:true,writable:true,value:4001});var vd=class extends Bo{constructor({message:t="The requested method and/or account has not been authorized by the user."}={}){super(4100,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnauthorizedError"});}};Object.defineProperty(vd,"code",{enumerable:true,configurable:true,writable:true,value:4100});var wd=class extends Bo{constructor({message:t="The provider does not support the requested method."}={}){super(4200,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnsupportedMethodError"});}};Object.defineProperty(wd,"code",{enumerable:true,configurable:true,writable:true,value:4200});var _d=class extends Bo{constructor({message:t="The provider is disconnected from all chains."}={}){super(4900,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.DisconnectedError"});}};Object.defineProperty(_d,"code",{enumerable:true,configurable:true,writable:true,value:4900});var Ed=class extends Bo{constructor({message:t="The provider is not connected to the requested chain."}={}){super(4901,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.ChainDisconnectedError"});}};Object.defineProperty(Ed,"code",{enumerable:true,configurable:true,writable:true,value:4901});function UR(){let e=new Jl.default;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}function MR(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new d6;return {...r?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(o){let n=await e.request(o);return n&&typeof n=="object"&&"jsonrpc"in n?l0(n):n}}}var d6=class extends f0{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function DR(e={}){let t=e.id??0;return {prepare(r){return DF({id:t++,...r})},get id(){return t}}}function DF(e){return {...e,jsonrpc:"2.0"}}var FR=Symbol("Comlink.proxy"),FF=Symbol("Comlink.endpoint"),HF=Symbol("Comlink.releaseProxy"),p6=Symbol("Comlink.finalizer"),p0=Symbol("Comlink.thrown"),HR=e=>typeof e=="object"&&e!==null||typeof e=="function",VF={canHandle:e=>HR(e)&&e[FR],serialize(e){let{port1:t,port2:r}=new MessageChannel;return ZR(e,t),[r,[r]]},deserialize(e){return e.start(),h6(e)}},ZF={canHandle:e=>HR(e)&&p0 in e,serialize({value:e}){let t;return e instanceof Error?t={isError:true,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:false,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},VR=new Map([["proxy",VF],["throw",ZF]]);function GF(e,t){for(let r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return true;return false}function ZR(e,t=globalThis,r=["*"]){t.addEventListener("message",function o(n){if(!n||!n.data)return;if(!GF(r,n.origin)){console.warn(`Invalid origin '${n.origin}' for comlink proxy`);return}let{id:i,type:s,path:a}=Object.assign({path:[]},n.data),c=(n.data.argumentList||[]).map(Ba),u;try{let f=a.slice(0,-1).reduce((g,h)=>g[h],e),d=a.reduce((g,h)=>g[h],e);switch(s){case "GET":u=d;break;case "SET":f[a.slice(-1)[0]]=Ba(n.data.value),u=!0;break;case "APPLY":u=d.apply(f,c);break;case "CONSTRUCT":{let g=new d(...c);u=XF(g);}break;case "ENDPOINT":{let{port1:g,port2:h}=new MessageChannel;ZR(e,h),u=YF(g,[g]);}break;case "RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[p0]:0};}Promise.resolve(u).catch(f=>({value:f,[p0]:0})).then(f=>{let[d,g]=g0(f);t.postMessage(Object.assign(Object.assign({},d),{id:i}),g),s==="RELEASE"&&(t.removeEventListener("message",o),GR(t),p6 in e&&typeof e[p6]=="function"&&e[p6]());}).catch(f=>{let[d,g]=g0({value:new TypeError("Unserializable return value"),[p0]:0});t.postMessage(Object.assign(Object.assign({},d),{id:i}),g);});}),t.start&&t.start();}function qF(e){return e.constructor.name==="MessagePort"}function GR(e){qF(e)&&e.close();}function h6(e,t){let r=new Map;return e.addEventListener("message",function(n){let{data:i}=n;if(!i||!i.id)return;let s=r.get(i.id);if(s)try{s(i);}finally{r.delete(i.id);}}),m6(e,r,[],t)}function d0(e){if(e)throw new Error("Proxy has been released and is not useable")}function qR(e){return eu(e,new Map,{type:"RELEASE"}).then(()=>{GR(e);})}var m0=new WeakMap,h0="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(m0.get(e)||0)-1;m0.set(e,t),t===0&&qR(e);});function WF(e,t){let r=(m0.get(t)||0)+1;m0.set(t,r),h0&&h0.register(e,t,e);}function KF(e){h0&&h0.unregister(e);}function m6(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(d0(n),a===HF)return ()=>{KF(i),qR(e),t.clear(),n=true;};if(a==="then"){if(r.length===0)return {then:()=>i};let c=eu(e,t,{type:"GET",path:r.map(u=>u.toString())}).then(Ba);return c.then.bind(c)}return m6(e,t,[...r,a])},set(s,a,c){d0(n);let[u,f]=g0(c);return eu(e,t,{type:"SET",path:[...r,a].map(d=>d.toString()),value:u},f).then(Ba)},apply(s,a,c){d0(n);let u=r[r.length-1];if(u===FF)return eu(e,t,{type:"ENDPOINT"}).then(Ba);if(u==="bind")return m6(e,t,r.slice(0,-1));let[f,d]=jR(c);return eu(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:f},d).then(Ba)},construct(s,a){d0(n);let[c,u]=jR(a);return eu(e,t,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(Ba)}});return WF(i,e),i}function JF(e){return Array.prototype.concat.apply([],e)}function jR(e){let t=e.map(g0);return [t.map(r=>r[0]),JF(t.map(r=>r[1]))]}var WR=new WeakMap;function YF(e,t){return WR.set(e,t),e}function XF(e){return Object.assign(e,{[FR]:true})}function KR(e,t=globalThis,r="*"){return {postMessage:(o,n)=>e.postMessage(o,r,n),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function g0(e){for(let[t,r]of VR)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},WR.get(e)||[]]}function Ba(e){switch(e.type){case "HANDLER":return VR.get(e.name).deserialize(e.value);case "RAW":return e.value}}function eu(e,t,r,o){return new Promise(n=>{let i=QF();t.set(i,n),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),o);})}function QF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var eH={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},tH={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e));},addEventListener:(e,t,...r)=>{document.addEventListener("FarcasterFrameCallback",t,...r);},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t);}},JR=typeof window>"u"?eH:window?.ReactNativeWebView?tH:KR(window?.parent??window);var ve=h6(JR);var g6=UR(),rH=DR();function nH({code:e,details:t}){switch(e){case 4001:return new xd;case 4100:return new vd;case 4200:return new wd;case 4900:return new _d;case 4901:return new Ed;default:return new Bo(e,t??"Unknown provider RPC error")}}var tu=MR({...g6,async request(e){let t=rH.prepare(e);try{let r=await ve.ethProviderRequestV2(t).then(o=>l0(o,{request:t,raw:!0}));if(r.error)throw nH(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await ve.ethProviderRequest(t);throw r instanceof Bo||r instanceof br?r:new Pa({message:r instanceof Error?r.message:void 0})}}});async function YR(){try{let e=await ve.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:tu}catch{return tu}}function XR(e){let t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);let r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)}typeof document<"u"&&(document.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),document.addEventListener("FarcasterFrameEthProviderEvent",e=>{if(e instanceof MessageEvent){let t=e.data;g6.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&XR({info:t.info,provider:tu});}}));typeof window<"u"&&(window.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEthProviderEvent"){let t=e.data;g6.emit(t.event,...t.params);}}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="eip6963:announceProvider"&&XR({info:t.info,provider:tu});}}));new TextEncoder;var y0=new TextDecoder;var iH=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r},QR=e=>{let t=e;t instanceof Uint8Array&&(t=y0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return iH(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};var eT=QR;function aH(e){return typeof e=="object"&&e!==null}function y6(e){if(!aH(e)||Object.prototype.toString.call(e)!=="[object Object]")return false;if(Object.getPrototypeOf(e)===null)return true;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var xr=class extends Error{constructor(t,r){super(t,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor);}};xr.code="ERR_JOSE_GENERIC";var b6=class extends xr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=o,this.reason=n,this.payload=r;}};b6.code="ERR_JWT_CLAIM_VALIDATION_FAILED";var x6=class extends xr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};x6.code="ERR_JWT_EXPIRED";var v6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};v6.code="ERR_JOSE_ALG_NOT_ALLOWED";var w6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};w6.code="ERR_JOSE_NOT_SUPPORTED";var _6=class extends xr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};_6.code="ERR_JWE_DECRYPTION_FAILED";var E6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};E6.code="ERR_JWE_INVALID";var S6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};S6.code="ERR_JWS_INVALID";var co=class extends xr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};co.code="ERR_JWT_INVALID";var I6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};I6.code="ERR_JWK_INVALID";var A6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};A6.code="ERR_JWKS_INVALID";var k6=class extends xr{constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_NO_MATCHING_KEY";}};k6.code="ERR_JWKS_NO_MATCHING_KEY";var R6=class extends xr{constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";}};R6.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var T6=class extends xr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};T6.code="ERR_JWKS_TIMEOUT";var $6=class extends xr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};$6.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function tT(e){if(typeof e!="string")throw new co("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new co("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new co("Invalid JWT");if(!t)throw new co("JWTs must contain a payload");let o;try{o=eT(t);}catch{throw new co("Failed to base64url decode the payload")}let n;try{n=JSON.parse(y0.decode(o));}catch{throw new co("Failed to parse the decoded payload as JSON")}if(!y6(n))throw new co("Invalid JWT Claims Set");return n}function rT(e){return tT(e)}var b0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o?["",o?`Details: ${o}`:void 0]:[]].filter(i=>typeof i=="string").join(`
66
- `);super(n,r.cause?{cause:r.cause}:void 0),this.name="BaseError",this.cause=r.cause,this.details=o,this.shortMessage=t;}},ru=class extends b0{constructor({status:t}){super(`Request failed with status ${t}`),this.name="RequestFailedError";}},x0=class extends b0{constructor(t){super(t),this.name="InvalidToken";}};async function nT({origin:e}){let t=await fetch(`${e}/nonce`,{method:"POST"});if(!t.ok)throw new ru({status:t.status});return await t.json()}async function oT({origin:e},t){let r=await fetch(`${e}/verify-siwf`,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(t)});if(!r.ok)throw new ru({status:r.status});let o=await r.json();if(o.valid===false)throw new x0(o.message??"unknown");return {token:o.token}}function iT(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function sT(e={}){let t=iT(e);return {generateNonce:()=>nT(t),verifySiwf:r=>oT(t,r)}}var cH=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,uH=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function aT(e){let{scheme:t,statement:r,...o}=e.match(cH)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(uH)?.groups??{},f=e.split("Resources:")[1]?.split(`
67
- - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:new Date(i)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var v0=(()=>{let e,t;async function r(o){let n=sT({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await ve.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=aT(s.result.message);if(!a.domain)throw new Error("Missing domain on SIWE message");let c=await n.verifySiwf({domain:a.domain,message:s.result.message,signature:s.result.signature});return e={token:c.token,payload:rT(c.token)},c}throw s.error.type==="rejected_by_user"?new Ec.RejectedByUser:new Error("Unreachable")}return {get token(){if(e&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3))return e.token},async getToken(o={}){let n=o.force??false;return e&&!n&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3)?{token:e.token}:(t||(t=r(o)),t.finally(()=>{t=void 0;}),t)},async fetch(o,n){let{token:i}=await this.getToken(),s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${i}`),fetch(o,{...n,headers:s})}}})();function dH(){let e=new Lk;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}var vr=dH();var{solanaProviderRequest:cT}=ve,uT;cT&&(uT=$R(NR(cT)));async function O6(){let e;try{e=await ve.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return uT}var fT=null;async function pH(e=1e3){if(fT===true)return true;if(typeof window>"u"||!window.ReactNativeWebView&&window===window.parent)return false;let t=await Promise.race([ve.context.then(r=>!!r),new Promise(r=>{setTimeout(()=>r(false),e);})]).catch(()=>false);return t&&(fT=true),t}var lT=async()=>{let e=await ve.addFrame();if(e.result)return e.result;throw e.error.type==="invalid_domain_manifest"?new wl.InvalidDomainManifest:e.error.type==="rejected_by_user"?new wl.RejectedByUser:new Error("Unreachable")},dT={...vr,getCapabilities:ve.getCapabilities,getChains:ve.getChains,isInMiniApp:pH,context:ve.context,back:PR({miniAppHost:ve,emitter:vr}),quickAuth:v0,actions:{setPrimaryButton:ve.setPrimaryButton.bind(ve),ready:async(e={})=>await ve.ready(e),close:ve.close.bind(ve),viewCast:ve.viewCast.bind(ve),viewProfile:ve.viewProfile.bind(ve),openMiniApp:ve.openMiniApp.bind(ve),signIn:async e=>{let t=await ve.signIn({...e,acceptAuthAddress:e.acceptAuthAddress??true});if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Ec.RejectedByUser:new Error("Unreachable")},openUrl:e=>{let t=typeof e=="string"?e:e.url;return ve.openUrl(t.trim())},addFrame:lT,addMiniApp:lT,composeCast(e={}){return ve.composeCast(e)},viewToken:ve.viewToken.bind(ve),sendToken:ve.sendToken.bind(ve),swapToken:ve.swapToken.bind(ve),requestCameraAndMicrophoneAccess:ve.requestCameraAndMicrophoneAccess.bind(ve)},experimental:{getSolanaProvider:O6,signManifest:async e=>{let t=await ve.signManifest(e);if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Sc.RejectedByUser:t.error.type==="invalid_domain"?new Sc.InvalidDomain:t.error.type==="generic_error"?new Sc.GenericError(t.error.message):new Error("Unreachable")},quickAuth(e){return v0.getToken(e)}},wallet:{ethProvider:tu,getEthereumProvider:YR,getSolanaProvider:O6},haptics:{impactOccurred:ve.impactOccurred.bind(ve),notificationOccurred:ve.notificationOccurred.bind(ve),selectionChanged:ve.selectionChanged.bind(ve)}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="primary_button_clicked"?vr.emit("primaryButtonClicked"):t.event==="miniapp_added"?vr.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?vr.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?vr.emit("miniAppRemoved"):t.event==="notifications_enabled"?vr.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?vr.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&vr.emit("backNavigationTriggered");}});typeof window<"u"&&window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="primary_button_clicked"?vr.emit("primaryButtonClicked"):t.event==="miniapp_added"?vr.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?vr.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?vr.emit("miniAppRemoved"):t.event==="notifications_enabled"?vr.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?vr.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&vr.emit("backNavigationTriggered");}});var Co=dT;au();function oe(e,t,r){let o=e[t.name];if(typeof o=="function")return o;let n=e[r];return typeof n=="function"?n:i=>t(e,i)}Et();Te();var F0=class extends z{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"});}};lr();Un();Jd();Ai();vi();vs();var a4="/docs/contract/encodeEventTopics";function jo(e){let{abi:t,eventName:r,args:o}=e,n=t[0];if(r){let c=fn({abi:t,name:r});if(!c)throw new Hd(r,{docsPath:a4});n=c;}if(n.type!=="event")throw new Hd(void 0,{docsPath:a4});let i=[];if(o&&"inputs"in n){let c=n.inputs?.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(o)?o:Object.values(o).length>0?c?.map(f=>o[f.name])??[]:[];u.length>0&&(i=c?.map((f,d)=>Array.isArray(u[d])?u[d].map((g,h)=>c4({param:f,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?c4({param:f,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=nr(n);return [ys(s),...i]}function c4({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return qe(qr(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new F0(e.type);return Wr([e],[t])}Ae();function ws(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:o,response:n,status:i,transport:s})=>{i==="success"&&t===o&&(r[n]=s.request);}),(o=>r[o]||e.request)}async function J0(e,t){let{address:r,abi:o,args:n,eventName:i,fromBlock:s,strict:a,toBlock:c}=t,u=ws(e,{method:"eth_newFilter"}),f=i?jo({abi:o,args:n,eventName:i}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof s=="bigint"?K(s):s,toBlock:typeof c=="bigint"?K(c):c,topics:f}]});return {abi:o,args:n,eventName:i,id:d,request:u(d),strict:!!a,type:"event"}}ln();Dn();Et();Te();Ri();Da();np();var QH=3;function ho(e,{abi:t,address:r,args:o,docsPath:n,functionName:i,sender:s}){let a=e instanceof Ho?e:e instanceof z?e.walk(v=>"data"in v)||e.walk():{},{code:c,data:u,details:f,message:d,shortMessage:g}=a,h=e instanceof zn?new mg({functionName:i,cause:e}):[QH,Ti.code].includes(c)&&(u||f||d||g)||c===Hn.code&&f==="execution reverted"&&u?new Ua({abi:t,data:typeof u=="object"?u.data:u,functionName:i,message:a instanceof Ss?f:g??d,cause:e}):e;return new xu(h,{abi:t,args:o,contractAddress:r,docsPath:n,functionName:i,sender:s})}ln();Te();Ii();Un();function I4(e){let t=qe(`0x${e.substring(4)}`).substring(26);return bs(`0x${t}`)}lo();sn();ur();Ae();async function k4({hash:e,signature:t}){let r=St(e)?e:ft(e),{secp256k1:o}=await Promise.resolve().then(()=>(rd(),rR));return `0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:f,v:d,yParity:g}=t,h=Number(g??d),v=A4(h);return new o.Signature(ut(u),ut(f)).addRecoveryBit(v)}let s=St(t)?t:ft(t);if($e(s)!==65)throw new Error("invalid signature length");let a=vt(`0x${s.slice(130)}`),c=A4(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function A4(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function op({hash:e,signature:t}){return I4(await k4({hash:e,signature:t}))}cn();lr();Ae();Te();eg();lr();Ae();function go(e,t="hex"){let r=R4(e),o=mu(new Uint8Array(r.length));return r.encode(o),t==="hex"?Le(o.bytes):o.bytes}function R4(e){return Array.isArray(e)?eV(e.map(t=>R4(t))):tV(e)}function eV(e){let t=e.reduce((n,i)=>n+i.length,0),r=T4(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function tV(e){let t=typeof e=="string"?fr(e):e,r=T4(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function T4(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new z("Length is too large.")}Un();function $4(e){let{chainId:t,nonce:r,to:o}=e,n=e.contractAddress??e.address,i=qe(st(["0x05",go([t?K(t):"0x",n,r?K(r):"0x"])]));return o==="bytes"?fr(i):i}async function yg(e){let{authorization:t,signature:r}=e;return op({hash:$4(t),signature:r??t})}Ae();ig();yu();Te();jn();var bg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=za({from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}};$i();ip();function O4(e,{docsPath:t,...r}){let o=(()=>{let n=As(e,r);return n instanceof Zn?e:n})();return new bg(o,{docsPath:t,...r})}sp();Ju();vg();Ha();ln();yu();Te();var Qu=class extends z{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"});}},Rs=class extends z{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"});}},wg=class extends z{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${or(t)} gwei).`,{name:"MaxFeePerGasTooLowError"});}};ur();Te();var Ts=class extends z{constructor({blockHash:t,blockNumber:r}){let o="Block";t&&(o=`Block at hash "${t}"`),r&&(o=`Block at number "${r}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"});}};Ae();xg();ur();xg();var o2={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Oi(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?vt(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?vt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?o2[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=iV(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}var P4=Ku("transaction",Oi);function iV(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Va(e,t){let r=(e.transactions??[]).map(o=>typeof o=="string"?o:Oi(o));return {...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var B4=Ku("block",Va);async function er(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:n}={}){let i=n??false,s=r!==void 0?K(r):void 0,a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:true}):a=await e.request({method:"eth_getBlockByNumber",params:[s||o,i]},{dedupe:!!s}),!a)throw new Ts({blockHash:t,blockNumber:r});return (e.chain?.formatters?.block?.format||Va)(a,"getBlock")}async function ef(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function C4(e,t){return i2(e,t)}async function i2(e,t){let{block:r,chain:o=e.chain,request:n}=t||{};try{let i=o?.fees?.maxPriorityFeePerGas??o?.fees?.defaultPriorityFee;if(typeof i=="function"){let a=r||await oe(e,er,"getBlock")({}),c=await i({block:a,client:e,request:n});if(c===null)throw new Error;return c}if(typeof i<"u")return i;let s=await e.request({method:"eth_maxPriorityFeePerGas"});return ut(s)}catch{let[i,s]=await Promise.all([r?Promise.resolve(r):oe(e,er,"getBlock")({}),oe(e,ef,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new Rs;let a=s-i.baseFeePerGas;return a<0n?0n:a}}async function z4(e,t){return _g(e,t)}async function _g(e,t){let{block:r,chain:o=e.chain,request:n,type:i="eip1559"}=t||{},s=await(async()=>typeof o?.fees?.baseFeeMultiplier=="function"?o.fees.baseFeeMultiplier({block:r,client:e,request:n}):o?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new Qu;let c=10**(s.toString().split(".")[1]?.length??0),u=g=>g*BigInt(Math.round(s*c))/BigInt(c),f=r||await oe(e,er,"getBlock")({});if(typeof o?.fees?.estimateFeesPerGas=="function"){let g=await o.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:n,type:i});if(g!==null)return g}if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new Rs;let g=typeof n?.maxPriorityFeePerGas=="bigint"?n.maxPriorityFeePerGas:await i2(e,{block:f,chain:o,request:n}),h=u(f.baseFeePerGas);return {maxFeePerGas:n?.maxFeePerGas??h+g,maxPriorityFeePerGas:g}}return {gasPrice:n?.gasPrice??u(await oe(e,ef,"getGasPrice")({}))}}Za();ur();async function Eg(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=In({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});return vt(a)}lr();Ae();function tf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(i=>fr(i)):e.blobs,n=[];for(let i of o)n.push(Uint8Array.from(t.blobToKzgCommitment(i)));return r==="bytes"?n:n.map(i=>Le(i))}lr();Ae();function rf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(s=>fr(s)):e.blobs,n=typeof e.commitments[0]=="string"?e.commitments.map(s=>fr(s)):e.commitments,i=[];for(let s=0;s<o.length;s++){let a=o[s],c=n[s];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)));}return r==="bytes"?i:i.map(s=>Le(s))}Ae();lo();lr();Ae();function L4(e,t){let r=t,o=Ll(St(e,{strict:false})?qr(e):e);return r==="bytes"?o:ft(o)}function U4(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=L4(t,"bytes");return n.set([r],0),o==="bytes"?n:Le(n)}function Sg(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(U4({commitment:i,to:o,version:r}));return n}Te();var Ig=class extends z{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"});}},nf=class extends z{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"});}},Ag=class extends z{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},kg=class extends z{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};eg();sn();lr();Ae();function M4(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?fr(e.data):e.data,o=$e(r);if(!o)throw new nf;if(o>761855)throw new Ig({maxSize:761855,size:o});let n=[],i=true,s=0;for(;i;){let a=mu(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(s,s+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),i=false;break}c++,s+=31;}n.push(a);}return t==="bytes"?n.map(a=>a.bytes):n.map(a=>Le(a.bytes))}function Rg(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??M4({data:t,to:o}),i=e.commitments??tf({blobs:n,kzg:r,to:o}),s=e.proofs??rf({blobs:n,commitments:i,kzg:r,to:o}),a=[];for(let c=0;c<n.length;c++)a.push({blob:n[c],commitment:i[c],proof:s[c]});return a}Yd();Ha();jn();function Tg(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return "eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return "eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return "eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new ug({transaction:e})}ln();$i();jn();ip();function D4(e,{docsPath:t,...r}){let o=(()=>{let n=As(e,r);return n instanceof Zn?e:n})();return new lg(o,{docsPath:t,...r})}sp();Ju();Ha();ur();async function of(e){let t=await e.request({method:"eth_chainId"},{dedupe:true});return vt(t)}async function $g(e,t){let{account:r=e.account,accessList:o,authorizationList:n,chain:i=e.chain,blobVersionedHashes:s,blobs:a,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:v,nonceManager:E,to:R,type:$,value:N,...O}=t,I=await(async()=>{if(!r||!E||typeof v<"u")return v;let D=We(r),q=i?i.id:await oe(e,of,"getChainId")({});return await E.consume({address:D.address,chainId:q,client:e})})();Gn(t);let P=i?.formatters?.transactionRequest?.format,C=(P||Zo)({...ks(O,{format:P}),account:r?We(r):void 0,accessList:o,authorizationList:n,blobs:a,blobVersionedHashes:s,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:I,to:R,type:$,value:N},"fillTransaction");try{let D=await e.request({method:"eth_fillTransaction",params:[C]}),H=(i?.formatters?.transaction?.format||Oi)(D.tx);delete H.blockHash,delete H.blockNumber,delete H.r,delete H.s,delete H.transactionIndex,delete H.v,delete H.yParity,H.data=H.input,H.gas&&(H.gas=t.gas??H.gas),H.gasPrice&&(H.gasPrice=t.gasPrice??H.gasPrice),H.maxFeePerBlobGas&&(H.maxFeePerBlobGas=t.maxFeePerBlobGas??H.maxFeePerBlobGas),H.maxFeePerGas&&(H.maxFeePerGas=t.maxFeePerGas??H.maxFeePerGas),H.maxPriorityFeePerGas&&(H.maxPriorityFeePerGas=t.maxPriorityFeePerGas??H.maxPriorityFeePerGas),typeof H.nonce<"u"&&(H.nonce=t.nonce??H.nonce);let Z=await(async()=>{if(typeof i?.fees?.baseFeeMultiplier=="function"){let m=await oe(e,er,"getBlock")({});return i.fees.baseFeeMultiplier({block:m,client:e,request:t})}return i?.fees?.baseFeeMultiplier??1.2})();if(Z<1)throw new Qu;let S=10**(Z.toString().split(".")[1]?.length??0),l=m=>m*BigInt(Math.round(Z*S))/BigInt(S);return H.feePayerSignature||(H.maxFeePerGas&&!t.maxFeePerGas&&(H.maxFeePerGas=l(H.maxFeePerGas)),H.gasPrice&&!t.gasPrice&&(H.gasPrice=l(H.gasPrice))),{raw:D.raw,transaction:{from:C.from,...H},...D.capabilities?{capabilities:D.capabilities}:{}}}catch(D){throw D4(D,{...t,chain:e.chain})}}var cV=["blobVersionedHashes","chainId","fees","gas","nonce","type"],j4=new Map,s2=new Uo(128);async function Og(e,t){let r=t;r.account??=e.account,r.parameters??=cV;let{account:o,chain:n=e.chain,nonceManager:i,parameters:s}=r,a=(()=>{if(typeof n?.prepareTransactionRequest=="function")return {fn:n.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(n?.prepareTransactionRequest))return {fn:n.prepareTransactionRequest[0],runAt:n.prepareTransactionRequest[1].runAt}})(),c;async function u(){return c||(typeof r.chainId<"u"?r.chainId:n?n.id:(c=await oe(e,of,"getChainId")({}),c))}let f=o&&We(o),d=r.nonce;if(a?.fn&&a.runAt?.includes("beforeFillTransaction")){r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillTransaction"}),d??=r.nonce;let I=r.account??r.from;f=I?We(I):void 0;}if(s.includes("nonce")&&typeof d>"u"&&f&&i){let I=await u();d=await i.consume({address:f.address,chainId:I,client:e});}let h=((s.includes("blobVersionedHashes")||s.includes("sidecars"))&&r.kzg&&r.blobs?false:s.length>0&&"feePayer"in r&&r.feePayer&&!("feePayerSignature"in r&&r.feePayerSignature)?true:s2.get(e.uid)===false||!["fees","gas"].some(P=>s.includes(P))?false:!!(s.includes("chainId")&&typeof r.chainId!="number"||s.includes("nonce")&&typeof d!="number"||s.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||s.includes("gas")&&typeof r.gas!="bigint"))?await oe(e,$g,"fillTransaction")({...r,nonce:d}).then(I=>{let{chainId:P,from:L,gas:C,gasPrice:D,nonce:q,maxFeePerBlobGas:H,maxFeePerGas:Z,maxPriorityFeePerGas:re,type:S,...l}=I.transaction,m="feeToken"in l?l.feeToken:void 0,y="feePayerSignature"in l&&l.feePayerSignature!==null&&typeof l.feePayerSignature<"u",b=typeof m<"u"&&m!==null&&(!("feeToken"in r)||y);return s2.set(e.uid,true),{...r,...L?{from:L}:{},...S&&!r.type?{type:S}:{},...typeof P<"u"?{chainId:P}:{},...typeof C<"u"?{gas:C}:{},...typeof D<"u"?{gasPrice:D}:{},...typeof q<"u"?{nonce:q}:{},...typeof H<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerBlobGas:H}:{},...typeof Z<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerGas:Z}:{},...typeof re<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxPriorityFeePerGas:re}:{},..."nonceKey"in l&&typeof l.nonceKey<"u"?{nonceKey:l.nonceKey}:{},..."keyAuthorization"in l&&typeof l.keyAuthorization<"u"&&l.keyAuthorization!==null&&!("keyAuthorization"in r)?{keyAuthorization:l.keyAuthorization}:{},..."feePayerSignature"in l&&typeof l.feePayerSignature<"u"&&l.feePayerSignature!==null?{feePayerSignature:l.feePayerSignature}:{},...b?{feeToken:m}:{},...I.capabilities?{_capabilities:I.capabilities}:{}}}).catch(I=>{let P=I;if(P.name!=="TransactionExecutionError")return r;if(P.walk?.(D=>D.name==="ExecutionRevertedError"))throw I;return P.walk?.(D=>{let q=D;return q.name==="MethodNotFoundRpcError"||q.name==="MethodNotSupportedRpcError"||q.message?.includes("eth_fillTransaction is not available")})&&s2.set(e.uid,false),r}):r;d??=h.nonce,r={...h,...f?{from:f?.address}:{},...typeof d<"u"?{nonce:d}:{}};let{blobs:v,gas:E,kzg:R,type:$}=r;a?.fn&&a.runAt?.includes("beforeFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillParameters"}));let N;async function O(){return N||(N=await oe(e,er,"getBlock")({blockTag:"latest"}),N)}if(s.includes("nonce")&&typeof d>"u"&&f&&!i&&(r.nonce=await oe(e,Eg,"getTransactionCount")({address:f.address,blockTag:"pending"})),(s.includes("blobVersionedHashes")||s.includes("sidecars"))&&v&&R){let I=tf({blobs:v,kzg:R});if(s.includes("blobVersionedHashes")){let P=Sg({commitments:I,to:"hex"});r.blobVersionedHashes=P;}if(s.includes("sidecars")){let P=rf({blobs:v,commitments:I,kzg:R}),L=Rg({blobs:v,commitments:I,proofs:P,to:"hex"});r.sidecars=L;}}if(s.includes("chainId")&&(r.chainId=await u()),(s.includes("fees")||s.includes("type"))&&typeof $>"u")try{r.type=Tg(r);}catch{let I=j4.get(e.uid);typeof I>"u"&&(I=typeof(await O())?.baseFeePerGas=="bigint",j4.set(e.uid,I)),r.type=I?"eip1559":"legacy";}if(s.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){let I=await O(),{maxFeePerGas:P,maxPriorityFeePerGas:L}=await _g(e,{block:I,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<L)throw new wg({maxPriorityFeePerGas:L});r.maxPriorityFeePerGas=L,r.maxFeePerGas=P;}}else {if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new Rs;if(typeof r.gasPrice>"u"){let I=await O(),{gasPrice:P}=await _g(e,{block:I,chain:n,request:r,type:"legacy"});r.gasPrice=P;}}return s.includes("gas")&&typeof E>"u"&&(r.gas=await oe(e,sf,"estimateGas")({...r,account:f,prepare:f?.type==="local"?[]:["blobVersionedHashes"]})),a?.fn&&a.runAt?.includes("afterFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"afterFillParameters"})),Gn(r),delete r.parameters,r}async function sf(e,t){let{account:r=e.account,prepare:o=true}=t,n=r?We(r):void 0,i=(()=>{if(Array.isArray(o))return o;if(n?.type!=="local")return ["blobVersionedHashes"]})();try{let s=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await yg({authorization:t.authorizationList[0]}).catch(()=>{throw new z("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,blockNumber:d,blockTag:g,data:h,gas:v,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,value:I,stateOverride:P,...L}=o?await Og(e,{...t,parameters:i,to:s}):t;if(v&&t.gas!==v)return v;let D=(typeof d=="bigint"?K(d):void 0)||g,q=Yu(P);Gn(t);let H=e.chain?.formatters?.transactionRequest?.format,re=(H||Zo)({...ks(L,{format:H}),account:n,accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,data:h,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,to:s,value:I},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:q?[re,D??e.experimental_blockTag??"latest",q]:D?[re,D]:[re]}))}catch(s){throw O4(s,{...t,account:n,chain:e.chain})}}async function F4(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=lt({abi:r,args:n,functionName:i});try{return await oe(e,sf,"estimateGas")({data:`${c}${s?s.replace("0x",""):""}`,to:o,...a})}catch(u){let f=a.account?We(a.account):void 0;throw ho(u,{abi:r,address:o,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:f?.address})}}vs();$s();lr();function dr(e,{args:t,eventName:r}={}){return {...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}Un();Jd();Et();J6();sn();Jd();tp();vi();var H4="/docs/contract/decodeEventLog";function Ga(e){let{abi:t,data:r,strict:o,topics:n}=e,i=o??true,[s,...a]=n;if(!s)throw new C0({docsPath:H4});let c=t.find($=>$.type==="event"&&s===ys(nr($)));if(!(c&&"name"in c)||c.type!=="event")throw new z0(s,{docsPath:H4});let{name:u,inputs:f}=c,d=f?.some($=>!("name"in $&&$.name)),g=d?[]:{},h=f.map(($,N)=>[$,N]).filter(([$])=>"indexed"in $&&$.indexed),v=[];for(let $=0;$<h.length;$++){let[N,O]=h[$],I=a[$];if(!I){if(i)throw new hs({abiItem:c,param:N});v.push([N,O]);continue}g[d?O:N.name||O]=uV({param:N,value:I});}let E=f.filter($=>!("indexed"in $&&$.indexed)),R=i?E:[...v.map(([$])=>$),...E];if(R.length>0){if(r&&r!=="0x")try{let $=ki(R,r);if($){let N=0;if(!i)for(let[O,I]of v)g[d?I:O.name||I]=$[N++];if(d)for(let O=0;O<f.length;O++)g[O]===void 0&&N<$.length&&(g[O]=$[N++]);else for(let O=0;O<E.length;O++)g[E[O].name]=$[N++];}}catch($){if(i)throw $ instanceof cu||$ instanceof pu?new wi({abiItem:c,data:r,params:R,size:$e(r)}):$}else if(i)throw new wi({abiItem:c,data:"0x",params:R,size:0})}return {eventName:u,args:Object.values(g).length>0?g:void 0}}function uV({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(ki([e],t)||[])[0]}function af(e){let{abi:t,args:r,logs:o,strict:n=true}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),s=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:ys(a)}));return o.map(a=>{let c=typeof a.blockNumber=="string"?dr(a):a,u=s.filter(g=>c.topics[0]===g.selector);if(u.length===0)return null;let f,d;for(let g of u)try{f=Ga({...c,abi:[g.abi],strict:!0}),d=g;break}catch{}if(!f&&!n){d=u[0];try{f=Ga({data:c.data,topics:c.topics,abi:[d.abi],strict:!1});}catch{let g=d.abi.inputs?.some(h=>!("name"in h&&h.name));return {...c,args:g?[]:{},eventName:d.abi.name}}}return !f||!d||i&&!i.includes(f.eventName)||!fV({args:f.args,inputs:d.abi.inputs,matchArgs:r})?null:{...f,...c}}).filter(Boolean)}function fV(e){let{args:t,inputs:r,matchArgs:o}=e;if(!o)return true;if(!t)return false;function n(i,s,a){try{return i.type==="address"?zr(s,a):i.type==="string"||i.type==="bytes"?qe(qr(s))===a:s===a}catch{return false}}return Array.isArray(t)&&Array.isArray(o)?o.every((i,s)=>{if(i==null)return true;let a=r[s];return a?(Array.isArray(i)?i:[i]).some(u=>n(a,u,t[s])):false}):typeof t=="object"&&!Array.isArray(t)&&typeof o=="object"&&!Array.isArray(o)?Object.entries(o).every(([i,s])=>{if(s==null)return true;let a=r.find(u=>u.name===i);return a?(Array.isArray(s)?s:[s]).some(u=>n(a,u,t[i])):false}):false}Ae();async function cf(e,{address:t,blockHash:r,fromBlock:o,toBlock:n,event:i,events:s,args:a,strict:c}={}){let u=c??false,f=s??(i?[i]:void 0),d=[];f&&(d=[f.flatMap(E=>jo({abi:[E],eventName:E.name,args:s?void 0:a}))],i&&(d=d[0]));let g;r?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof o=="bigint"?K(o):o,toBlock:typeof n=="bigint"?K(n):n}]});let h=g.map(v=>dr(v));return f?af({abi:f,args:a,logs:h,strict:u}):h}async function Ng(e,t){let{abi:r,address:o,args:n,blockHash:i,eventName:s,fromBlock:a,toBlock:c,strict:u}=t,f=s?fn({abi:r,name:s}):void 0,d=f?void 0:r.filter(g=>g.type==="event");return oe(e,cf,"getLogs")({address:o,args:n,blockHash:i,event:f,events:d,fromBlock:a,toBlock:c,strict:u})}Ni();Dn();Ps();async function De(e,t){let{abi:r,address:o,args:n,functionName:i,...s}=t,a=lt({abi:r,args:n,functionName:i});try{let{data:c}=await oe(e,hn,"call")({...s,data:a,to:o});return Lr({abi:r,args:n,functionName:i,data:c||"0x"})}catch(c){throw ho(c,{abi:r,address:o,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}ln();Ni();Dn();Ps();async function N$(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=a.account?We(a.account):e.account,u=lt({abi:r,args:n,functionName:i});try{let{data:f}=await oe(e,hn,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:o,...a,account:c}),d=Lr({abi:r,args:n,functionName:i,data:f||"0x"}),g=r.filter(h=>"name"in h&&h.name===t.functionName);return {result:d,request:{abi:g,address:o,args:n,dataSuffix:s,functionName:i,...a,account:c}}}catch(f){throw ho(f,{abi:r,address:o,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}Et();np();var Qg=new Map,$2=new Map,PV=0;function Ur(e,t,r){let o=++PV,n=()=>Qg.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){Qg.delete(e),$2.delete(e);return}Qg.set(e,d);},s=()=>{let f=n();if(!f.some(g=>g.id===o))return;let d=$2.get(e);if(f.length===1&&d){let g=d();g instanceof Promise&&g.catch(()=>{});}i();},a=n();if(Qg.set(e,[...a,{id:o,fns:t}]),a&&a.length>0)return s;let c={};for(let f in t)c[f]=((...d)=>{let g=n();if(g.length!==0)for(let h of g)h.fns[f]?.(...d);});let u=r(c);return typeof u=="function"&&$2.set(e,u),s}mo();async function gp(e,{signal:t}={}){return new Promise((r,o)=>{if(t?.aborted){o(wr(t));return}let n=()=>t?.removeEventListener("abort",s),i=setTimeout(()=>{n(),r();},e),s=()=>{clearTimeout(i),n(),o(wr(t));};t?.addEventListener("abort",s,{once:true});})}function Wo(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let n=true,i=()=>n=false;return (async()=>{let a;t&&(a=await e({unpoll:i}));let c=await r?.(a)??o;await gp(c);let u=async()=>{n&&(await e({unpoll:i}),await gp(o),u());};u();})(),i}Pr();var BV=new Map,CV=new Map;function P$(e){let t=(n,i)=>({clear:()=>i.delete(n),get:()=>i.get(n),set:s=>i.set(n,s)}),r=t(e,BV),o=t(e,CV);return {clear:()=>{r.clear(),o.clear();},promise:r,response:o}}async function B$(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=P$(t),n=o.response.get();if(n&&r>0&&Date.now()-n.created.getTime()<r)return n.data;let i=o.promise.get();i||(i=e(),o.promise.set(i));try{let s=await i;return o.response.set({created:new Date,data:s}),s}finally{o.promise.clear();}}var zV=e=>`blockNumber.${e}`;async function Jn(e,{cacheTime:t=e.cacheTime}={}){let r=await B$(()=>e.request({method:"eth_blockNumber"}),{cacheKey:zV(e.uid),cacheTime:t});return BigInt(r)}async function Bs(e,{filter:t}){let r="strict"in t&&t.strict,o=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof o[0]=="string")return o;let n=o.map(i=>dr(i));return !("abi"in t)||!t.abi?n:af({abi:t.abi,logs:n,strict:r})}async function Cs(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function C$(e,t){let{abi:r,address:o,args:n,batch:i=true,eventName:s,fromBlock:a,onError:c,onLogs:u,poll:f,pollingInterval:d=e.pollingInterval,strict:g}=t;return (typeof f<"u"?f:typeof a=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R,a]);return Ur($,{onLogs:u,onError:c},N=>{let O;a!==void 0&&(O=a-1n);let I,P=false,L=Wo(async()=>{if(!P){try{I=await oe(e,J0,"createContractEventFilter")({abi:r,address:o,args:n,eventName:s,strict:R,fromBlock:a});}catch{}P=true;return}try{let C;if(I)C=await oe(e,Bs,"getFilterChanges")({filter:I});else {let D=await oe(e,Jn,"getBlockNumber")({});O&&O<D?C=await oe(e,Ng,"getContractEvents")({abi:r,address:o,args:n,eventName:s,fromBlock:O+1n,toBlock:D,strict:R}):C=[],O=D;}if(C.length===0)return;if(i)N.onLogs(C);else for(let D of C)N.onLogs([D]);}catch(C){I&&C instanceof Hn&&(P=false),N.onError?.(C);}},{emitOnBegin:true,interval:d});return async()=>{I&&await oe(e,Cs,"uninstallFilter")({filter:I}),L();}})})():(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R]),N=true,O=()=>N=false;return Ur($,{onLogs:u,onError:c},I=>((async()=>{try{let P=(()=>{if(e.transport.type==="fallback"){let D=e.transport.transports.find(q=>q.config.type==="webSocket"||q.config.type==="ipc");return D?D.value:e.transport}return e.transport})(),L=s?jo({abi:r,eventName:s,args:n}):[],{unsubscribe:C}=await P.subscribe({params:["logs",{address:o,topics:L}],onData(D){if(!N)return;let q=D.result;try{let{eventName:H,args:Z}=Ga({abi:r,data:q.data,topics:q.topics,strict:g}),re=dr(q,{args:Z,eventName:H});I.onLogs([re]);}catch(H){let Z,re;if(H instanceof wi||H instanceof hs){if(g)return;Z=H.abiItem.name,re=H.abiItem.inputs?.some(l=>!("name"in l&&l.name));}let S=dr(q,{args:re?[]:{},eventName:Z});I.onLogs([S]);}},onError(D){I.onError?.(D);}});O=C,N||O();}catch(P){c?.(P);}})(),()=>O()))})()}Te();var yp=class extends z{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
68
- `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"});}};async function z$(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}mo();function bp(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>true,signal:n}={}){return new Promise((i,s)=>{let a=async({count:c=0}={})=>{if(n?.aborted){s(wr(n));return}let u=async({error:f})=>{let d=typeof t=="function"?t({count:c,error:f}):t;if(d)try{await gp(d,{signal:n});}catch(g){s(g);return}return a({count:c+1})};try{let f=await e();i(f);}catch(f){if(n?.aborted){s(wr(n));return}if(dn(f)){s(f);return}if(c<r&&await o({count:c,error:f}))return u({error:f});s(f);}};a().catch(s);})}ur();xg();var LV={"0x0":"reverted","0x1":"success"};function Xa(e,t){let r={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>dr(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?vt(e.transactionIndex):null,status:e.status?LV[e.status]:null,type:e.type?o2[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}var L$=Ku("transactionReceipt",Xa);ln();var ey=256,ty;function ry(e=11){if(!ty||ey+e>256*2){ty="",ey=0;for(let t=0;t<256;t++)ty+=(256+Math.random()*256|0).toString(16).substring(1);}return ty.substring(ey,ey+++e)}function M$(e){let{batch:t,chain:r,ccipRead:o,dataSuffix:n,key:i="base",name:s="Base Client",tokens:a,type:c="base"}=e,u=e.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),f=r?.blockTime??12e3,d=Math.min(Math.max(Math.floor(f/2),500),4e3),g=e.pollingInterval??d,h=e.cacheTime??g,v=e.account?We(e.account):void 0,{config:E,request:R,value:$}=e.transport({account:v,chain:r,pollingInterval:g}),N={...E,...$},O={account:v,batch:t,cacheTime:h,ccipRead:o,chain:r,dataSuffix:n,key:i,name:s,pollingInterval:g,request:R,tokens:a,transport:N,type:c,uid:ry(),...u?{experimental_blockTag:u}:{}};function I(P){return L=>{let C=L(P);for(let q in O)delete C[q];let D={...P,...C};for(let q in C){let H=P[q],Z=C[q];U$(H)&&U$(Z)&&(D[q]={...H,...Z});}return Object.assign(D,{extend:I(D)})}}return Object.assign(O,{extend:I(O)})}function U$(e){if(typeof e!="object"||e===null)return false;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xp(e,t){let r=(o={})=>t(e,o);for(let o of ["call","calls","callWithPeriod","estimateGas","prepare","prepareRecipient","predict","simulate"])if(Object.hasOwn(t,o)){let n=t[o];r[o]=(i={})=>n.length===1?n(i):n(e,i);}for(let o of ["extractEvent","extractEvents"])Object.hasOwn(t,o)&&(r[o]=t[o]);return r}mn();Ni();Dn();Ii();Ya();sn();Kd();Ae();Te();Ri();function gf(e){if(!(e instanceof z))return false;let t=e.walk(r=>r instanceof Ua);return t instanceof Ua?t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile":false}hp();cn();lr();Ae();Un();lo();function ny(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return St(t)?t:null}function vp(e){let t=new Uint8Array(32).fill(0);if(!e)return Le(t);let r=e.split(".");for(let o=r.length-1;o>=0;o-=1){let n=ny(r[o]),i=n?qr(n):qe(Ln(r[o]),"bytes");t=qe(Mo([t,i]),"bytes");}return Le(t)}lr();function D$(e){return `[${e.slice(2)}]`}lr();Ae();Un();function j$(e){let t=new Uint8Array(32).fill(0);return e?ny(e)||qe(Ln(e)):Le(t)}function yf(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(Ln(t).byteLength+2),o=0,n=t.split(".");for(let i=0;i<n.length;i++){let s=Ln(n[i]);s.byteLength>255&&(s=Ln(D$(j$(n[i])))),r[o]=s.length,r.set(s,o+1),o+=s.length+1;}return r.byteLength!==o+1?r.slice(0,o+1):r}async function F$(e,t){let{blockNumber:r,blockTag:o,coinType:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Kn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(g=>i.endsWith(g)))return null;let d=n!=null?[vp(i),BigInt(n)]:[vp(i)];try{let g=lt({abi:b2,functionName:"addr",args:d}),h={address:u,abi:Vg,functionName:"resolveWithGateways",args:[ft(yf(i)),g,s??[Ci]],blockNumber:r,blockTag:o},E=await oe(e,De,"readContract")(h);if(E[0]==="0x")return null;let R=UV({coinType:n,data:E[0],args:d});return R==="0x"||Gr(R)==="0x00"?null:R}catch(g){if(a)throw g;if(gf(g))return null;throw g}}function UV({coinType:e,data:t,args:r}){try{return Lr({abi:b2,args:r,functionName:"addr",data:t})}catch(o){if(e==null)throw o;let n=Gr(t);if($e(n)===20)return Mn(n);throw o}}Te();var oy=class extends z{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"});}},zs=class extends z{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"});}},bf=class extends z{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"});}},iy=class extends z{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"});}};var MV=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,DV=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,jV=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,FV=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function HV(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?false:new Promise(r=>{let o=new Image;o.onload=()=>{r(true);},o.onerror=()=>{r(false);},o.src=e;})}}function H$(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function O2({uri:e,gatewayUrls:t}){let r=jV.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=H$(t?.ipfs,"https://ipfs.io"),n=H$(t?.arweave,"https://arweave.net"),i=e.match(MV),{protocol:s,subpath:a,target:c,subtarget:u=""}=i?.groups||{},f=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||DV.test(e);if(e.startsWith("http")&&!f&&!d){let h=e;return t?.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:h,isOnChain:false,isEncoded:false}}if((f||d)&&c)return {uri:`${o}/${f?"ipns":"ipfs"}/${c}${u}`,isOnChain:false,isEncoded:false};if(s==="ar:/"&&c)return {uri:`${n}/${c}${u||""}`,isOnChain:false,isEncoded:false};let g=e.replace(FV,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return {uri:g,isOnChain:true,isEncoded:false};throw new bf({uri:e})}function N2(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new oy({data:e});return e.image||e.image_url||e.image_data}async function V$({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await sy({gatewayUrls:e,uri:N2(r)})}catch{throw new bf({uri:t})}}async function sy({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=O2({uri:t,gatewayUrls:e});if(o||await HV(r))return r;throw new bf({uri:t})}function Z$(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,o,n]=t.split("/"),[i,s]=r.split(":"),[a,c]=o.split(":");if(!i||i.toLowerCase()!=="eip155")throw new zs({reason:"Only EIP-155 supported"});if(!s)throw new zs({reason:"Chain ID not found"});if(!c)throw new zs({reason:"Contract address not found"});if(!n)throw new zs({reason:"Token ID not found"});if(!a)throw new zs({reason:"ERC namespace not found"});return {chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:n}}async function G$(e,{nft:t}){if(t.namespace==="erc721")return De(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return De(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new iy({namespace:t.namespace})}async function q$(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?VV(e,{gatewayUrls:t,record:r}):sy({uri:r,gatewayUrls:t})}async function VV(e,{gatewayUrls:t,record:r}){let o=Z$(r),n=await G$(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:a}=O2({uri:n,gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){let u=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(u);return sy({uri:N2(f),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),V$({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}mn();Ni();Dn();Ya();Ae();hp();async function ay(e,t){let{blockNumber:r,blockTag:o,key:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Kn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(d=>i.endsWith(d)))return null;try{let d={address:u,abi:Vg,args:[ft(yf(i)),lt({abi:y2,functionName:"text",args:[vp(i),n]}),s??[Ci]],functionName:"resolveWithGateways",blockNumber:r,blockTag:o},h=await oe(e,De,"readContract")(d);if(h[0]==="0x")return null;let v=Lr({abi:y2,functionName:"text",data:h[0]});return v===""?null:v}catch(d){if(a)throw d;if(gf(d))return null;throw d}}async function W$(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await oe(e,ay,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await q$(e,{record:c,gatewayUrls:o})}catch{return null}}mn();Ya();hp();async function K$(e,t){let{address:r,blockNumber:o,blockTag:n,coinType:i=60n,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Kn({blockNumber:o,chain:c,contract:"ensUniversalResolver"})})();try{let f={address:u,abi:m$,args:[r,i,s??[Ci]],functionName:"reverseWithGateways",blockNumber:o,blockTag:n},d=oe(e,De,"readContract"),[g]=await d(f);return g||null}catch(f){if(a)throw f;if(gf(f))return null;throw f}}Ya();Ae();async function J$(e,t){let{blockNumber:r,blockTag:o,name:n}=t,{chain:i}=e,s=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return Kn({blockNumber:r,chain:i,contract:"ensUniversalResolver"})})(),a=i?.ensTlds;if(a&&!a.some(u=>n.endsWith(u)))throw new Error(`${n} is not a valid ENS TLD (${a?.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);let[c]=await oe(e,De,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ft(yf(n))],blockNumber:r,blockTag:o});return c}Ps();ln();Te();Ae();E2();sp();Ju();Ha();async function Y$(e,t){let{account:r=e.account,blockNumber:o,blockTag:n="latest",blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h,...v}=t,E=r?We(r):void 0;try{Gn(t);let $=(typeof o=="bigint"?K(o):void 0)||n,N=e.chain?.formatters?.transactionRequest?.format,I=(N||Zo)({...ks(v,{format:N}),account:E,blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h},"createAccessList"),P=await e.request({method:"eth_createAccessList",params:[I,$]});if(P.error)throw new z(P.error,{details:P.error});return {accessList:P.accessList,gasUsed:BigInt(P.gasUsed)}}catch(R){throw qg(R,{...t,account:E,chain:e.chain})}}async function X$(e){let t=ws(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return {id:r,request:t(r),type:"block"}}Ae();async function cy(e,{address:t,args:r,event:o,events:n,fromBlock:i,strict:s,toBlock:a}={}){let c=n??(o?[o]:void 0),u=ws(e,{method:"eth_newFilter"}),f=[];c&&(f=[c.flatMap(h=>jo({abi:[h],eventName:h.name,args:r}))],o&&(f=f[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?K(i):i,toBlock:typeof a=="bigint"?K(a):a,...f.length?{topics:f}:{}}]});return {abi:c,args:r,eventName:o?o.name:void 0,fromBlock:i,id:d,request:u(d),strict:!!s,toBlock:a,type:"event"}}async function uy(e){let t=ws(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return {id:r,request:t(r),type:"transaction"}}mn();Ni();Dn();Za();Ps();async function Q$(e,{address:t,blockHash:r,blockNumber:o,blockTag:n=e.experimental_blockTag??"latest",requireCanonical:i}){let s=In({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});if(e.batch?.multicall&&e.chain?.contracts?.multicall3){let c=e.chain.contracts.multicall3.address,u=lt({abi:bo,functionName:"getEthBalance",args:[t]}),{data:f}=await oe(e,hn,"call")({to:c,data:u,blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return Lr({abi:bo,functionName:"getEthBalance",args:[t],data:f||"0x"})}let a=await e.request({method:"eth_getBalance",params:[t,s]});return BigInt(a)}async function e8(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}Ae();async function t8(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}={}){let n=r!==void 0?K(r):void 0,i=await e.request({method:"eth_getBlockReceipts",params:[t||n||o]},{dedupe:!!(t||n)});if(!i)throw new Ts({blockHash:t,blockNumber:r});let s=e.chain?.formatters?.transactionReceipt?.format||Xa;return i.map(a=>s(a,"getBlockReceipts"))}ur();Ae();async function r8(e,{blockHash:t,blockNumber:r,blockTag:o="latest"}={}){let n=r!==void 0?K(r):void 0,i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:true}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[n||o]},{dedupe:!!n}),vt(i)}Za();async function Qa(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=In({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getCode",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});if(a!=="0x")return a}Ii();sn();xs();async function n8(e,{address:t,blockNumber:r,blockTag:o="latest"}){let n=await Qa(e,{address:t,...r!==void 0?{blockNumber:r}:{blockTag:o}});if(n&&$e(n)===23&&n.startsWith("0xef0100"))return Mn(un(n,3,23))}Te();var fy=class extends z{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"});}};async function o8(e,t){let{address:r,factory:o,factoryData:n}=t;try{let[i,s,a,c,u,f,d]=await oe(e,De,"readContract")({abi:ZV,address:r,functionName:"eip712Domain",factory:o,factoryData:n});return {domain:{name:s,version:a,chainId:Number(c),verifyingContract:u,salt:f},extensions:d,fields:i}}catch(i){let s=i;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new fy({address:r}):s}}var ZV=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];Ae();function i8(e){return {baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function s8(e,{blockCount:t,blockNumber:r,blockTag:o="latest",rewardPercentiles:n}){let i=typeof r=="bigint"?K(r):void 0,s=await e.request({method:"eth_feeHistory",params:[K(t),i||o,n]},{dedupe:!!i});return i8(s)}async function a8(e,{filter:t}){let r=t.strict??false,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>dr(i));return t.abi?af({abi:t.abi,logs:n,strict:r}):n}Za();Dn();Ae();jn();cn();Kd();Ae();n2();Lo();Te();Gg();$i();Sn();sn();xs();ur();function c8(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:o}=r,n=r.address;if(!Me(n))throw new nt({address:n});if(o<0)throw new Ja({chainId:o})}ly(e);}function u8(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new nf;for(let r of t){let o=$e(r),n=vt(un(r,0,1));if(o!==32)throw new Ag({hash:r,size:o});if(n!==1)throw new kg({hash:r,version:n})}}ly(e);}function ly(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:o,to:n}=e;if(t<=0)throw new Ja({chainId:t});if(n&&!Me(n))throw new nt({address:n});if(o&&o>Xu)throw new Vn({maxFeePerGas:o});if(r&&o&&r>o)throw new Vo({maxFeePerGas:o,maxPriorityFeePerGas:r})}function f8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(t<=0)throw new Ja({chainId:t});if(i&&!Me(i))throw new nt({address:i});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>Xu)throw new Vn({maxFeePerGas:o})}function l8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(i&&!Me(i))throw new nt({address:i});if(typeof t<"u"&&t<=0)throw new Ja({chainId:t});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>Xu)throw new Vn({maxFeePerGas:o})}Lo();jn();Sn();function wp(e){if(!e||e.length===0)return [];let t=[];for(let r=0;r<e.length;r++){let{address:o,storageKeys:n}=e[r];for(let i=0;i<n.length;i++)if(n[i].length-2!==64)throw new fg({storageKey:n[i]});if(!Me(o,{strict:false}))throw new nt({address:o});t.push([o,n]);}return t}function d8(e,t){let r=Tg(e);return r==="eip1559"?WV(e,t):r==="eip2930"?KV(e,t):r==="eip4844"?qV(e,t):r==="eip7702"?GV(e,t):JV(e,t)}function GV(e,t){let{authorizationList:r,chainId:o,gas:n,nonce:i,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;c8(e);let g=wp(f),h=p8(r);return st(["0x04",go([K(o),i?K(i):"0x",u?K(u):"0x",c?K(c):"0x",n?K(n):"0x",s??"0x",a?K(a):"0x",d??"0x",g,h,...xf(e,t)])])}function qV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;u8(e);let g=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof h>"u")){let O=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(L=>Le(L)),I=e.kzg,P=tf({blobs:O,kzg:I});if(typeof g>"u"&&(g=Sg({commitments:P})),typeof h>"u"){let L=rf({blobs:O,commitments:P,kzg:I});h=Rg({blobs:O,commitments:P,proofs:L});}}let v=wp(f),E=[K(r),n?K(n):"0x",u?K(u):"0x",c?K(c):"0x",o?K(o):"0x",i??"0x",s?K(s):"0x",d??"0x",v,a?K(a):"0x",g??[],...xf(e,t)],R=[],$=[],N=[];if(h)for(let O=0;O<h.length;O++){let{blob:I,commitment:P,proof:L}=h[O];R.push(I),$.push(P),N.push(L);}return st(["0x03",h?go([E,R,$,N]):go(E)])}function WV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:f}=e;ly(e);let d=wp(u),g=[K(r),n?K(n):"0x",c?K(c):"0x",a?K(a):"0x",o?K(o):"0x",i??"0x",s?K(s):"0x",f??"0x",d,...xf(e,t)];return st(["0x02",go(g)])}function KV(e,t){let{chainId:r,gas:o,data:n,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;f8(e);let f=wp(c),d=[K(r),i?K(i):"0x",u?K(u):"0x",o?K(o):"0x",s??"0x",a?K(a):"0x",n??"0x",f,...xf(e,t)];return st(["0x01",go(d)])}function JV(e,t){let{chainId:r=0,gas:o,data:n,nonce:i,to:s,value:a,gasPrice:c}=e;l8(e);let u=[i?K(i):"0x",c?K(c):"0x",o?K(o):"0x",s??"0x",a?K(a):"0x",n??"0x"];if(t){let f=(()=>{if(t.v>=35n)return (t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new cg({v:t.v});return h})(),d=Gr(t.r),g=Gr(t.s);u=[...u,K(f),d==="0x00"?"0x":d,g==="0x00"?"0x":g];}else r>0&&(u=[...u,K(r),"0x","0x"]);return go(u)}function xf(e,t){let r=t??e,{v:o,yParity:n}=r;if(typeof r.r>"u")return [];if(typeof r.s>"u")return [];if(typeof o>"u"&&typeof n>"u")return [];let i=Gr(r.r),s=Gr(r.s);return [typeof n=="number"?n?K(1):"0x":o===0n?"0x":o===1n?K(1):o===27n?"0x":K(1),i==="0x00"?"0x":i,s==="0x00"?"0x":s]}function p8(e){if(!e||e.length===0)return [];let t=[];for(let r of e){let{chainId:o,nonce:n,...i}=r,s=r.address;t.push([o?ft(o):"0x",s,n?ft(n):"0x",...xf({},i)]);}return t}Ii();$s();async function m8({address:e,authorization:t,signature:r}){return zr(Mn(e),await yg({authorization:t,signature:r}))}Te();Da();np();mo();Yd();var dy=new Uo(8192);function h8(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(dy.get(r))return dy.get(r);let o=e().finally(()=>dy.delete(r));return dy.set(r,o),o}Pr();function g8(e,t={}){return async(r,o={})=>{let{dedupe:n=false,methods:i,retryDelay:s=150,retryCount:a=3,signal:c,uid:u}={...t,...o},{method:f}=r;if(i?.exclude?.includes(f))throw new Is(new Error("method not supported"),{method:f});if(i?.include&&!i.include.includes(f))throw new Is(new Error("method not supported"),{method:f});if(c?.aborted)throw wr(c);let d=n?XV(`${u}.${Be(r)}`):void 0;return h8(()=>bp(async()=>{try{return await e(r,c?{signal:c}:void 0)}catch(g){if(c?.aborted)throw wr(c);if(dn(g))throw g;let h=g;switch(h.code){case vu.code:throw new vu(h);case wu.code:throw new wu(h);case _u.code:throw new _u(h,{method:r.method});case Eu.code:throw new Eu(h);case Ti.code:throw new Ti(h);case Hn.code:throw new Hn(h);case Su.code:throw new Su(h);case Iu.code:throw new Iu(h);case Au.code:throw new Au(h);case Is.code:throw new Is(h,{method:r.method});case ja.code:throw new ja(h);case ku.code:throw new ku(h);case Fa.code:throw new Fa(h);case Ru.code:throw new Ru(h);case Tu.code:throw new Tu(h);case $u.code:throw new $u(h);case Ou.code:throw new Ou(h);case Nu.code:throw new Nu(h);case Pu.code:throw new Pu(h);case Bu.code:throw new Bu(h);case Cu.code:throw new Cu(h);case zu.code:throw new zu(h);case Lu.code:throw new Lu(h);case Uu.code:throw new Uu(h);case Mu.code:throw new Mu(h);case 5e3:throw new Fa(h);case Du.code:throw new Du(h);default:throw g instanceof z?g:new gg(h)}}},{delay:({count:g,error:h})=>{if(h&&h instanceof Fn){let v=h?.headers?.get("Retry-After");if(v?.match(/\d/))return Number.parseInt(v,10)*1e3}return ~~(1<<g)*s},retryCount:a,signal:c,shouldRetry:({error:g})=>YV(g)}),{enabled:n,id:d})}}function YV(e){return dn(e)?false:"code"in e&&typeof e.code=="number"?e.code===-1||e.code===ja.code||e.code===Ti.code||e.code===429:e instanceof Fn&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:true}function XV(e,t=0){let r=3735928559^t,o=1103547991^t;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);r=Math.imul(r^i,2654435761),o=Math.imul(o^i,1597334677);}return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(o^o>>>16,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(r^r>>>16,3266489909),(4294967296*(2097151&o)+(r>>>0)).toString(36)}function vf(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(o){return n=>{let i=typeof n=="function"?n(o):n,s={...o,...i};return Object.assign(s,{extend:r(s)})}}return Object.assign(t,{extend:r(t)})}ur();Da();mo();mo();function y8(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:o}){return new Promise((n,i)=>{(async()=>{let s,a=new AbortController;try{r>0&&(s=setTimeout(()=>{o?a.abort():i(t);},r)),n(await e({signal:a?.signal||null}));}catch(c){if(a?.signal.aborted&&dn(c)){i(t);return}i(c);}finally{clearTimeout(s);}})();})}Pr();function QV(){return {current:0,take(){return this.current++},reset(){this.current=0;}}}var P2=QV();var eZ=10485760;function b8(e,t={}){let{url:r,headers:o}=rZ(e);return {async request(n){let{body:i,fetchFn:s=t.fetchFn??fetch,maxResponseBodySize:a=t.maxResponseBodySize??eZ,onRequest:c=t.onRequest,onResponse:u=t.onResponse,timeout:f=t.timeout??1e4}=n,d={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:g,method:h,signal:v}=d;try{let E=await y8(async({signal:N})=>{let O={...d,body:Array.isArray(i)?Be(i.map(C=>({jsonrpc:"2.0",id:C.id??P2.take(),...C}))):Be({jsonrpc:"2.0",id:i.id??P2.take(),...i}),headers:{...o,"Content-Type":"application/json",...g},method:h||"POST",signal:v||(f>0?N:null)},I=new Request(r,O),P=await c?.(I,O)??{...O,url:r};return await s(P.url??r,P)},{errorInstance:new rp({body:i,url:r}),timeout:f,signal:!0});u&&await u(E);let R,$=await tZ(E,{maxResponseBodySize:a});if(E.headers.get("Content-Type")?.startsWith("application/json"))R=JSON.parse($);else {R=$;try{R=JSON.parse(R||"{}");}catch(N){if(E.ok)throw N;R={error:R};}}if(!E.ok){if(typeof R.error?.code=="number"&&typeof R.error?.message=="string")return R;throw new Fn({body:i,details:Be(R.error)||E.statusText,headers:E.headers,status:E.status,url:r})}return R}catch(E){throw v?.aborted?wr(v):dn(E)||E instanceof Fn||E instanceof Ma||E instanceof rp?E:new Fn({body:i,cause:E,url:r})}}}}async function tZ(e,{maxResponseBodySize:t}){if(t===false)return e.text();let r=e.headers.get("Content-Length");if(r){let a=Number(r);if(a>t)throw new Ma({maxSize:t,size:a})}if(!e.body){let a=await e.text(),c=new TextEncoder().encode(a).length;if(c>t)throw new Ma({maxSize:t,size:c});return a}let o=e.body.getReader(),n=new TextDecoder,i="",s=0;try{for(;;){let{done:a,value:c}=await o.read();if(a)break;if(s+=c.byteLength,s>t)throw await o.cancel(),new Ma({maxSize:t,size:s});i+=n.decode(c,{stream:!0});}return i+=n.decode(),i}finally{o.releaseLock();}}function rZ(e){try{let t=new URL(e),r=(()=>{if(t.username){let o=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(o)}`}}}})();return {url:t.toString(),...r}}catch{return {url:e}}}Un();var x8=`Ethereum Signed Message:
69
- `;cn();sn();Ae();function v8(e){let t=typeof e=="string"?Ei(e):typeof e.raw=="string"?e.raw:Le(e.raw),r=Ei(`${x8}${$e(t)}`);return Mo([r,t])}function py(e,t){return qe(v8(e),t)}Ai();cn();Ae();Un();Et();Lo();Pr();Te();var my=class extends z{constructor({domain:t}){super(`Invalid domain "${Be(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},hy=class extends z{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]});}},gy=class extends z{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}},yy=class extends z{constructor({type:t}){let r=t.replace(/^(u?int)/,"$&256");super(`Type "${t}" is not a valid EIP-712 type.`,{metaMessages:[`Use "${r}" instead.`],name:"InvalidTypedDataTypeError"});}};Sn();sn();Ae();Z6();function w8(e){let{domain:t,message:r,primaryType:o,types:n}=e,i=(s,a)=>{for(let c of s){let{name:u,type:f}=c,d=a[u],g=f.replace(/(\[[0-9]*\])+$/,"");if(g==="int"||g==="uint")throw new yy({type:f});let h=f.match(K0);if(h&&(typeof d=="number"||typeof d=="bigint")){let[R,$,N]=h;K(d,{signed:$==="int",size:Number.parseInt(N,10)/8});}if(f==="address"&&typeof d=="string"&&!Me(d))throw new nt({address:d});let v=f.match(i4);if(v){let[R,$]=v;if($&&$e(d)!==Number.parseInt($,10))throw new M0({expectedSize:Number.parseInt($,10),givenSize:$e(d)})}let E=n[f];E&&(nZ(f),i(E,d));}};if(n.EIP712Domain&&t){if(typeof t!="object")throw new my({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new hy({primaryType:o,types:n})}function _8({domain:e}){return [typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function nZ(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new gy({type:e})}function E8(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:_8({domain:t}),...e.types};w8({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(oZ({domain:t,types:n})),o!=="EIP712Domain"&&i.push(S8({data:r,primaryType:o,types:n})),qe(Mo(i))}function oZ({domain:e,types:t}){return S8({data:e,primaryType:"EIP712Domain",types:t})}function S8({data:e,primaryType:t,types:r}){let o=I8({data:e,primaryType:t,types:r});return qe(o)}function I8({data:e,primaryType:t,types:r}){let o=[{type:"bytes32"}],n=[iZ({primaryType:t,types:r})];for(let i of r[t]){let[s,a]=k8({types:r,name:i.name,type:i.type,value:e[i.name]});o.push(s),n.push(a);}return Wr(o,n)}function iZ({primaryType:e,types:t}){let r=ft(sZ({primaryType:e,types:t}));return qe(r)}function sZ({primaryType:e,types:t}){let r="",o=A8({primaryType:e,types:t});o.delete(e);let n=[e,...Array.from(o).sort()];for(let i of n)r+=`${i}(${t[i].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return r}function A8({primaryType:e,types:t},r=new Set){let n=e.match(/^\w*/u)?.[0];if(r.has(n)||t[n]===void 0)return r;r.add(n);for(let i of t[n])A8({primaryType:i.type,types:t},r);return r}function k8({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},qe(I8({data:o,primaryType:r,types:e}))];if(r==="bytes")return [{type:"bytes32"},qe(o)];if(r==="string")return [{type:"bytes32"},qe(ft(o))];if(r.lastIndexOf("]")===r.length-1){let n=r.slice(0,r.lastIndexOf("[")),i=o.map(s=>k8({name:t,type:n,types:e,value:s}));return [{type:"bytes32"},qe(Wr(i.map(([s])=>s),i.map(([,s])=>s)))]}return [{type:r},o]}var kp={};Er(kp,{InvalidWrappedSignatureError:()=>Ny,assert:()=>Py,from:()=>jZ,magicBytes:()=>iE,suffixParameters:()=>sE,unwrap:()=>W8,validate:()=>HZ,wrap:()=>FZ});au();Os();var by=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o);}return this}};var aZ={checksum:new by(8192)},xy=aZ.checksum;pn();Wh();Os();pr();function ec(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=Ta(n$(e));return r==="Bytes"?o:It(o)}Os();pn();pr();up();function R8(e,t={}){let{compressed:r}=t,{prefix:o,x:n,y:i}=e;if(r===false||typeof n=="bigint"&&typeof i=="bigint"){if(o!==4)throw new vy({prefix:o,cause:new L2});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new vy({prefix:o,cause:new z2});return}throw new C2({publicKey:e})}function T8(e){let t=(()=>{if(lp(e))return $8(e);if(u$(e))return uZ(e);let{prefix:r,x:o,y:n}=e;return typeof o=="bigint"&&typeof n=="bigint"?{prefix:r??4,x:o,y:n}:{prefix:r,x:o}})();return R8(t),t}function uZ(e){return $8(It(e))}function $8(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new U2({publicKey:e});if(e.length===130){let o=BigInt(pt(e,0,32)),n=BigInt(pt(e,32,64));return {prefix:4,x:o,y:n}}if(e.length===132){let o=Number(pt(e,0,1)),n=BigInt(pt(e,1,33)),i=BigInt(pt(e,33,65));return {prefix:o,x:n,y:i}}let t=Number(pt(e,0,1)),r=BigInt(pt(e,1,33));return {prefix:t,x:r}}function M2(e,t={}){R8(e);let{prefix:r,x:o,y:n}=e,{includePrefix:i=true}=t;return ht(i?Ve(r,{size:1}):"0x",Ve(o,{size:32}),typeof n=="bigint"?Ve(n,{size:32}):"0x")}var C2=class extends de{constructor({publicKey:t}){super(`Value \`${Ns(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidError"});}},vy=class extends de{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidPrefixError"});}},z2=class extends de{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidCompressedPrefixError"});}},L2=class extends de{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidUncompressedPrefixError"});}},U2=class extends de{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${dt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidSerializedSizeError"});}};var fZ=/^0x[a-fA-F0-9]{40}$/;function tc(e,t={}){let{strict:r=true}=t;if(!fZ.test(e))throw new wy({address:e,cause:new D2});if(r){if(e.toLowerCase()===e)return;if(_y(e)!==e)throw new wy({address:e,cause:new j2})}}function _y(e){if(xy.has(e))return xy.get(e);tc(e,{strict:false});let t=e.substring(2).toLowerCase(),r=ec(o$(t),{as:"Bytes"}),o=t.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let n=`0x${o.join("")}`;return xy.set(e,n),n}function lZ(e,t={}){let{checksum:r=false}=t;return tc(e),r?_y(e):e}function N8(e,t={}){let r=ec(`0x${M2(e).slice(4)}`).substring(26);return lZ(`0x${r}`,t)}function Ey(e,t={}){let{strict:r=true}=t??{};try{return tc(e,{strict:r}),!0}catch{return false}}var wy=class extends de{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidAddressError"});}},D2=class extends de{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidInputError"});}},j2=class extends de{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidChecksumError"});}};Os();pn();pr();Os();pn();pr();var P8=/^(.*)\[([0-9]*)\]$/,B8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Iy=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,F2=2n**256n-1n;function rc(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=Z2(t.type);if(i){let[s,a]=i;return pZ(e,{...t,type:a},{checksumAddress:o,length:s,staticPosition:n})}if(t.type==="tuple")return yZ(e,t,{checksumAddress:o,staticPosition:n});if(t.type==="address")return dZ(e,{checksum:o});if(t.type==="bool")return mZ(e);if(t.type.startsWith("bytes"))return hZ(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return gZ(e,t);if(t.type==="string")return bZ(e,{staticPosition:n});throw new _f(t.type)}var z8=32,H2=32;function dZ(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?_y(i):i)(It(i$(o,-20))),32]}function pZ(e,t,r){let{checksumAddress:o,length:n,staticPosition:i}=r;if(n===null){let c=Go(e.readBytes(H2)),u=i+c,f=u+z8;e.setPosition(u);let d=Go(e.readBytes(z8)),g=wf(t),h=0,v=[];for(let E=0;E<d;++E){e.setPosition(f+(g?E*32:h));let[R,$]=rc(e,t,{checksumAddress:o,staticPosition:f});h+=$,v.push(R),$===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(i+32),[v,32]}if(wf(t)){let c=Go(e.readBytes(H2)),u=i+c,f=[];for(let d=0;d<n;++d){e.setPosition(u+d*32);let[g]=rc(e,t,{checksumAddress:o,staticPosition:u});f.push(g);}return e.setPosition(i+32),[f,32]}let s=0,a=[];for(let c=0;c<n;++c){let[u,f]=rc(e,t,{checksumAddress:o,staticPosition:i+s});s+=f,a.push(u),f===0&&(e.assertReadLimit(),e._touch());}return [a,s]}function mZ(e){return [a$(e.readBytes(32),{size:32}),32]}function hZ(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Go(e.readBytes(32));e.setPosition(r+s);let a=Go(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[It(c),32]}return [It(e.readBytes(Number.parseInt(n,10),32)),32]}function gZ(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?s$(n,{signed:r}):Go(n,{signed:r}),32]}function yZ(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=t.components.length===0||t.components.some(({name:c})=>!c),s=i?[]:{},a=0;if(wf(t)){let c=Go(e.readBytes(H2)),u=n+c;for(let f=0;f<t.components.length;++f){let d=t.components[f];e.setPosition(u+a);let[g,h]=rc(e,d,{checksumAddress:o,staticPosition:u});a+=h,s[i?f:d?.name]=g;}return e.setPosition(n+32),[s,32]}for(let c=0;c<t.components.length;++c){let u=t.components[c],[f,d]=rc(e,u,{checksumAddress:o,staticPosition:n});s[i?c:u?.name]=f,a+=d;}return [s,a]}function bZ(e,{staticPosition:t}){let r=Go(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Go(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=c$(p2(i));return e.setPosition(t+32),[s,32]}function L8({checksumAddress:e,parameters:t,values:r}){let o=[];for(let n=0;n<t.length;n++)o.push(V2({checksumAddress:e,parameter:t[n],value:r[n]}));return o}function V2({checksumAddress:e=false,parameter:t,value:r}){let o=t,n=Z2(o.type);if(n){let[i,s]=n;return vZ(r,{checksumAddress:e,length:i,parameter:{...o,type:s}})}if(o.type==="tuple")return IZ(r,{checksumAddress:e,parameter:o});if(o.type==="address")return xZ(r,{checksum:e});if(o.type==="bool")return _Z(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){let i=o.type.startsWith("int"),[,,s="256"]=Iy.exec(o.type)??[];return EZ(r,{signed:i,size:Number(s)})}if(o.type.startsWith("bytes"))return wZ(r,{type:o.type});if(o.type==="string")return SZ(r);throw new _f(o.type)}function Ay(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=dt(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(Ve(t+n,{size:32})),o.push(a),n+=dt(a)):r.push(a);}return ht(...r,...o)}function xZ(e,t){let{checksum:r=false}=t;return tc(e,{strict:r}),{dynamic:false,encoded:Bi(e.toLowerCase())}}function vZ(e,t){let{checksumAddress:r,length:o,parameter:n}=t,i=o===null;if(!Array.isArray(e))throw new Ry(e);if(!i&&e.length!==o)throw new ky({expectedLength:o,givenLength:e.length,type:`${n.type}[${o}]`});let s=e.length===0&&wf(n),a=[];for(let c=0;c<e.length;c++){let u=V2({checksumAddress:r,parameter:n,value:e[c]});u.dynamic&&(s=true),a.push(u);}if(i||s){let c=Ay(a);if(i){let u=Ve(a.length,{size:32});return {dynamic:true,encoded:a.length>0?ht(u,c):u}}if(s)return {dynamic:true,encoded:c}}return {dynamic:false,encoded:ht(...a.map(({encoded:c})=>c))}}function wZ(e,{type:t}){let[,r]=t.split("bytes"),o=dt(e);if(!r){let n=e;return o%32!==0&&(n=qo(n,Math.ceil((e.length-2)/2/32)*32)),{dynamic:true,encoded:ht(Bi(Ve(o,{size:32})),n)}}if(o!==Number.parseInt(r,10))throw new _p({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:qo(e)}}function _Z(e){if(typeof e!="boolean")throw new de(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:Bi(jg(e))}}function EZ(e,{signed:t,size:r}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new fp({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:Ve(e,{size:32,signed:t})}}function SZ(e){let t=mf(e),r=Math.ceil(dt(t)/32),o=[];for(let n=0;n<r;n++)o.push(qo(pt(t,n*32,(n+1)*32)));return {dynamic:true,encoded:ht(qo(Ve(dt(t),{size:32})),...o)}}function IZ(e,t){let{checksumAddress:r,parameter:o}=t,n=false,i=[];for(let s=0;s<o.components.length;s++){let a=o.components[s],c=Array.isArray(e)?s:a.name,u=V2({checksumAddress:r,parameter:a,value:e[c]});i.push(u),u.dynamic&&(n=true);}return {dynamic:n,encoded:n?Ay(i):ht(...i.map(({encoded:s})=>s))}}function Z2(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function wf(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(wf);let r=Z2(e.type);return !!(r&&wf({...e,type:r[1]}))}pn();var kZ={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new q2({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new G2({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ty({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Ty({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};function $y(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(kZ);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Ty=class extends de{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.NegativeOffsetError"});}},G2=class extends de{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.PositionOutOfBoundsError"});}},q2=class extends de{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.RecursiveReadLimitExceededError"});}};function nc(e,t,r={}){let{as:o="Array",checksumAddress:n=false}=r,i=typeof t=="string"?df(t):t,s=$y(i);if(qn(i)===0&&e.length>0)throw new J2;if(qn(i)&&qn(i)<32)throw new K2({data:typeof t=="string"?t:It(t),parameters:e,size:qn(i)});let a=0,c=o==="Array"?[]:{};for(let u=0;u<e.length;++u){let f=e[u];a<i.length&&s.setPosition(a);let[d,g]=rc(s,f,{checksumAddress:n,staticPosition:0});a+=g,o==="Array"?c.push(d):c[f.name??u]=d;}return c}function Ls(e,t,r){let{checksumAddress:o=false}={};if(e.length!==t.length)throw new Oy({expectedLength:e.length,givenLength:t.length});let n=L8({checksumAddress:o,parameters:e,values:t}),i=Ay(n);return i.length===0?"0x":i}function W2(e,t){if(e.length!==t.length)throw new Oy({expectedLength:e.length,givenLength:t.length});let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o];r.push(W2.encode(n,i));}return ht(...r)}(function(e){function t(r,o,n=false){if(r==="address"){let c=o;return tc(c),Bi(c.toLowerCase(),n?32:0)}if(r==="string")return mf(o);if(r==="bytes")return o;if(r==="bool")return Bi(jg(o),n?32:1);let i=r.match(Iy);if(i){let[c,u,f="256"]=i,d=Number.parseInt(f,10)/8;return Ve(o,{size:n?32:d,signed:u==="int"})}let s=r.match(B8);if(s){let[c,u]=s;if(Number.parseInt(u,10)!==(o.length-2)/2)throw new _p({expectedSize:Number.parseInt(u,10),value:o});return qo(o,n?32:0)}let a=r.match(P8);if(a&&Array.isArray(o)){let[c,u]=a,f=[];for(let d=0;d<o.length;d++)f.push(t(u,o[d],true));return f.length===0?"0x":ht(...f)}throw new _f(r)}e.encode=t;})(W2||(W2={}));function Sp(e){return Array.isArray(e)&&typeof e[0]=="string"?Md(e):typeof e=="string"?Md(e):e}var K2=class extends de{constructor({data:t,parameters:r,size:o}){super(`Data size of ${o} bytes is too small for given parameters.`,{metaMessages:[`Params: (${bi(r)})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.DataSizeTooSmallError"});}},J2=class extends de{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ZeroDataError"});}},ky=class extends de{constructor({expectedLength:t,givenLength:r,type:o}){super(`Array length mismatch for type \`${o}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ArrayLengthMismatchError"});}},_p=class extends de{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${dt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.BytesSizeMismatchError"});}},Oy=class extends de{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
70
- `)),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.LengthMismatchError"});}},Ry=class extends de{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidArrayError"});}},_f=class extends de{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidTypeError"});}};pr();Os();pn();pr();function RZ(e,t){let{as:r}=t,o=D8(e),n=$y(new Uint8Array(o.length));return o.encode(n),r==="Hex"?It(n.bytes):n.bytes}function M8(e,t={}){let{as:r="Hex"}=t;return RZ(e,{as:r})}function D8(e){return Array.isArray(e)?TZ(e.map(t=>D8(t))):$Z(e)}function TZ(e){let t=e.reduce((n,i)=>n+i.length,0),r=j8(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function $Z(e){let t=typeof e=="string"?df(e):e,r=j8(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function j8(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new de("Length is too large.")}pn();pr();up();function tE(e,t={}){let{recovered:r}=t;if(typeof e.r>"u")throw new Ip({signature:e});if(typeof e.s>"u")throw new Ip({signature:e});if(r&&typeof e.yParity>"u")throw new Ip({signature:e});if(e.r<0n||e.r>F2)throw new X2({value:e.r});if(e.s<0n||e.s>F2)throw new Q2({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Ap({value:e.yParity})}function NZ(e){return F8(It(e))}function F8(e){if(e.length!==130&&e.length!==132)throw new Y2({signature:e});let t=BigInt(pt(e,0,32)),r=BigInt(pt(e,32,64)),o=(()=>{let n=+`0x${e.slice(130)}`;if(!Number.isNaN(n))try{return oE(n)}catch{throw new Ap({value:n})}})();return typeof o>"u"?{r:t,s:r}:{r:t,s:r,yParity:o}}function rE(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return nE(e)}function nE(e){let t=typeof e=="string"?F8(e):e instanceof Uint8Array?NZ(e):typeof e.r=="string"?BZ(e):e.v?PZ(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return tE(t),t}function PZ(e){return {r:e.r,s:e.s,yParity:oE(e.v)}}function BZ(e){let t=(()=>{let r=e.v?Number(e.v):void 0,o=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof o!="number"&&(o=oE(r)),typeof o!="number")throw new Ap({value:e.yParity});return o})();return {r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function H8(e){let{r:t,s:r,yParity:o}=e;return [o?"0x01":"0x",t===0n?"0x":h2(Ve(t)),r===0n?"0x":h2(Ve(r))]}function oE(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new eE({value:e})}var Y2=class extends de{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${dt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSerializedSizeError"});}},Ip=class extends de{constructor({signature:t}){super(`Signature \`${Ns(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.MissingPropertiesError"});}},X2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidRError"});}},Q2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSError"});}},Ap=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidYParityError"});}},eE=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidVError"});}};function Z8(e,t={}){return typeof e.chainId=="string"?CZ(e):{...e,...t.signature}}function CZ(e){let{address:t,chainId:r,nonce:o}=e,n=rE(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function G8(e){return zZ(e,{presign:true})}function zZ(e,t={}){let{presign:r}=t;return ec(ht("0x05",M8(LZ(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function LZ(e){let{address:t,chainId:r,nonce:o}=e,n=rE(e);return [r?Ve(r):"0x",t,o?Ve(o):"0x",...n?H8(n):[]]}pn();pr();rd();pr();function q8(e){return N8(MZ(e))}function MZ(e){let{payload:t,signature:r}=e,{r:o,s:n,yParity:i}=r,a=new xn.Signature(BigInt(o),BigInt(n)).addRecoveryBit(i).recoverPublicKey(pf(t).substring(2));return T8(a)}var iE="0x8010801080108010801080108010801080108010801080108010801080108010",sE=Sp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Py(e){if(typeof e=="string"){if(pt(e,-32)!==iE)throw new Ny(e)}else tE(e.authorization);}function jZ(e){return typeof e=="string"?W8(e):e}function W8(e){Py(e);let t=Ug(pt(e,-64,-32)),r=pt(e,-t-64,-64),o=pt(e,0,-t-64),[n,i,s]=nc(sE,r);return {authorization:Z8({address:n.delegation,chainId:Number(n.chainId),nonce:n.nonce,yParity:n.yParity,r:n.r,s:n.s}),signature:o,...s&&s!=="0x"?{data:s,to:i}:{}}}function FZ(e){let{data:t,signature:r}=e;Py(e);let o=q8({payload:G8(e.authorization),signature:nE(e.authorization)}),n=Ls(sE,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??o,t??"0x"]),i=Ve(dt(n),{size:32});return ht(r,n,i,iE)}function HZ(e){try{return Py(e),!0}catch{return false}}var Ny=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc8010.InvalidWrappedSignatureError"});}};og();function K8(e,t){return ng(e,t)}function VZ(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function J8(e){return {...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?vt(e.nonce):void 0,storageProof:e.storageProof?VZ(e.storageProof):void 0}}async function Y8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,storageKeys:s}){let a=In({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),c=await e.request({method:"eth_getProof",params:[t,s,a]});return J8(c)}jn();async function X8(e,{hash:t}){let r=await e.request({method:"eth_getRawTransactionByHash",params:[t]},{dedupe:true});if(!r)throw new _s({hash:t});return r}Za();async function Q8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,slot:s}){let a=In({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return await e.request({method:"eth_getStorageAt",params:[t,s,a]})}jn();Ae();async function Ef(e,{blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i,sender:s,nonce:a}){let c=o||"latest",u=r!==void 0?K(r):void 0,f=null;if(n?f=await e.request({method:"eth_getTransactionByHash",params:[n]},{dedupe:true}):t?f=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,K(i)]},{dedupe:true}):typeof i=="number"?f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,K(i)]},{dedupe:!!u}):s&&typeof a=="number"&&(f=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[s,K(a)]},{dedupe:true})),!f)throw new _s({blockHash:t,blockNumber:r,blockTag:c,hash:n,index:i});return (e.chain?.formatters?.transaction?.format||Oi)(f,"getTransaction")}async function eO(e,{hash:t,transactionReceipt:r}){let[o,n]=await Promise.all([oe(e,Jn,"getBlockNumber")({}),t?oe(e,Ef,"getTransaction")({hash:t}):void 0]),i=r?.blockNumber||n?.blockNumber;return i?o-i+1n:0n}jn();async function Sf(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:true});if(!r)throw new bu({hash:t});return (e.chain?.formatters?.transactionReceipt?.format||Xa)(r,"getTransactionReceipt")}mn();dp();Et();Te();Ri();Ni();Dn();Ya();Kg();Pr();async function tO(e,t){let{account:r,authorizationList:o,allowFailure:n=true,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,requireCanonical:u,stateOverride:f}=t,d=t.contracts,g=typeof e.batch?.multicall=="object"?e.batch.multicall:{},h=t.batchSize??g.batchSize??1024,v=t.deployless??g.deployless??false,E=(()=>{if(t.multicallAddress)return t.multicallAddress;if(v)return null;if(e.chain)return Kn({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),R=[[]],$=0,N=0;for(let C=0;C<d.length;C++){let{abi:D,address:q,args:H,functionName:Z}=d[C];try{let re=lt({abi:D,args:H,functionName:Z});N+=(re.length-2)/2,h>0&&N>h&&R[$].length>0&&($++,N=(re.length-2)/2,R[$]=[]),R[$]=[...R[$],{allowFailure:!0,callData:re,target:q}];}catch(re){let S=ho(re,{abi:D,address:q,args:H,docsPath:"/docs/contract/multicall",functionName:Z,sender:r});if(!n)throw S;R[$]=[...R[$],{allowFailure:true,callData:"0x",target:q}];}}let O=!!e.batch?.multicall,I=O?R.flatMap(C=>C.map(D=>[D])):R,P=await Promise.allSettled(I.map(C=>O?ZZ(e,{account:r,authorizationList:o,batchSize:h,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,call:C[0],multicallAddress:E,requireCanonical:u,stateOverride:f}).then(D=>[D]):oe(e,De,"readContract")({...E===null?{code:Wa}:{address:E},abi:bo,account:r,args:[C],authorizationList:o,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,functionName:"aggregate3",requireCanonical:u,stateOverride:f}))),L=[];for(let C=0;C<P.length;C++){let D=P[C];if(D.status==="rejected"){if(!n)throw D.reason;for(let H=0;H<I[C].length;H++)L.push({status:"failure",error:D.reason,result:void 0});continue}let q=D.value;for(let H=0;H<q.length;H++){let{returnData:Z,success:re}=q[H],{callData:S}=I[C][H],{abi:l,address:m,functionName:y,args:b}=d[L.length];try{if(S==="0x")throw new zn;if(!re)throw new Ho({data:Z});let x=Lr({abi:l,args:b,data:Z,functionName:y});L.push(n?{result:x,status:"success"}:x);}catch(x){let _=ho(x,{abi:l,address:m,args:b,docsPath:"/docs/contract/multicall",functionName:y});if(!n)throw _;L.push({error:_,result:void 0,status:"failure"});}}}if(L.length!==d.length)throw new z("multicall results mismatch");return L}async function ZZ(e,t){let{batchSize:r,call:o,multicallAddress:n,...i}=t,{wait:s=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{schedule:a}=hf({id:Be(["multicall",e.uid,r,n,i]),wait:s,shouldSplitBatch(u){return r===0?false:u.reduce((d,{callData:g})=>d+(g.length-2)/2,0)>r},fn:u=>oe(e,De,"readContract")({...n===null?{code:Wa}:{address:n},...i,abi:bo,args:[u],functionName:"aggregate3"})}),[c]=await a(o);return c}g2();ln();Et();Ri();$i();Ni();Dn();cn();Ae();ip();Ju();vg();Ha();async function If(e,t){let{blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",blocks:n,returnFullTransactions:i,traceTransfers:s,validation:a}=t;try{let c=[];for(let g of n){let h=g.blockOverrides?Fg(g.blockOverrides):void 0,v=g.calls.map(R=>{let $=R,N=$.account?We($.account):void 0,O=$.abi?lt($):$.data,I={...$,account:N,data:$.dataSuffix?Mo([O||"0x",$.dataSuffix]):O,from:$.from??N?.address};return Gn(I),Zo(I)}),E=g.stateOverrides?Yu(g.stateOverrides):void 0;c.push({blockOverrides:h,calls:v,stateOverrides:E});}let f=(typeof r=="bigint"?K(r):void 0)||o;return (await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:i,traceTransfers:s,validation:a},f]})).map((g,h)=>({...Va(g),calls:g.calls.map((v,E)=>{let{abi:R,args:$,functionName:N,to:O}=n[h].calls[E],I=v.error?.data??v.returnData,P=BigInt(v.gasUsed),L=v.logs?.map(H=>dr(H)),C=v.status==="0x1"?"success":"failure",D=R&&C==="success"&&I!=="0x"?Lr({abi:R,data:I,functionName:N}):null,q=(()=>{if(C==="success")return;let H;if(I==="0x"?H=new zn:I&&(H=new Ho({data:I})),!!H)return ho(H,{abi:R??[],address:O??"0x",args:$,functionName:N??"<unknown>"})})();return {data:I,gasUsed:P,logs:L,status:C,...C==="success"?{result:D}:{error:q}}})}))}catch(c){let u=c,f=As(u,{});throw f instanceof Zn?u:f}}au();pn();pr();pn();function Cy(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function","error",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new de("Unable to normalize signature.");return n}function By(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Ey(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>By(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>By(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function aE(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return aE(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Ey(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Ey(r[o],{strict:false}):false)return s}}function Af(e,t={}){let{prepare:r=true}=t,o=Array.isArray(e)?Ud(e):typeof e=="string"?Ud(e):e;return {...o,...r?{hash:Us(o)}:{}}}function kf(e,t,r){let{args:o=[],prepare:n=true}=r??{},i=lp(t,{strict:false}),s=e.filter(u=>i?u.type==="function"||u.type==="error"?uE(u)===pt(t,0,4):u.type==="event"?Us(u)===t:false:"name"in u&&u.name===t);if(s.length===0)throw new zi({name:t});if(s.length===1)return {...s[0],...n?{hash:Us(s[0])}:{}};let a;for(let u of s){if(!("inputs"in u))continue;if(!o||o.length===0){if(!u.inputs||u.inputs.length===0)return {...u,...n?{hash:Us(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==o.length)continue;if(o.every((d,g)=>{let h="inputs"in u&&u.inputs[g];return h?By(d,h):false})){if(a&&"inputs"in a&&a.inputs){let d=aE(u.inputs,a.inputs,o);if(d)throw new cE({abiItem:u,type:d[0]},{abiItem:a,type:d[1]})}a=u;}}let c=(()=>{if(a)return a;let[u,...f]=s;return {...u,overloads:f}})();if(!c)throw new zi({name:t});return {...c,...n?{hash:Us(c)}:{}}}function uE(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return pt(Us(t),0,4)}function qZ(...e){let t=(()=>{if(Array.isArray(e[0])){let[o,n]=e;return kf(o,n)}return e[0]})(),r=typeof t=="string"?t:Ca(t);return Cy(r)}function Us(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:ec(mf(qZ(t)))}var cE=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Cy(Ca(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Cy(Ca(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.AmbiguityError"});}},zi=class extends de{constructor({name:t,data:r,type:o="item"}){let n=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${o}${n} not found.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.NotFoundError"});}};pr();function rO(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[i,s]=e;return [WZ(i),s]}return e})(),{bytecode:o,args:n}=r;return ht(o,t.inputs?.length&&n?.length?Ls(t.inputs,n):"0x")}function nO(e){return Af(e)}function WZ(e){let t=e.find(r=>r.type==="constructor");if(!t)throw new zi({name:"constructor"});return t}function oO(e,t={}){return Af(e,t)}function iO(e){return Us(e)}pr();function sO(...e){let[t,r,o={}]=(()=>{if(Array.isArray(e[0])){let[i,s,a,c]=e;return [lE(i,s),a,c]}return e})(),n=nc(t.outputs,r,o);if(!(n&&Object.keys(n).length===0))return n&&Object.keys(n).length===1?Array.isArray(n)?n[0]:Object.values(n)[0]:n}function Ms(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[u,f,d]=e;return [lE(u,f,{args:d}),d]}let[a,c]=e;return [a,c]})(),{overloads:o}=t,n=o?lE([t,...o],t.name,{args:r}):t,i=YZ(n),s=r.length>0?Ls(n.inputs,r):void 0;return s?ht(i,s):i}function oc(e,t={}){return Af(e,t)}function lE(e,t,r){let o=kf(e,t,r);if(o.type!=="function")throw new zi({name:t,type:"function"});return o}function YZ(e){return uE(e)}ln();var zy="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Ly="0x0000000000000000000000000000000000000000";dp();Te();Ri();$i();qd();ur();Ps();var QZ="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",pO="0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033",eG=0x00000000000000000000000000000000deadbeefn,tG=iO(oO("event Transfer(address indexed from, address indexed to, uint256 value)")),aO=oc("function balanceOf(address) returns (uint256)"),cO=oc("function decimals() returns (uint256)"),uO=oc("function tokenURI(uint256) returns (string)"),fO=oc("function symbol() returns (string)"),rG=oc("function query(address target, bytes data)");async function mO(e,t){let{blockNumber:r,blockTag:o,calls:n,stateOverrides:i,traceAssetChanges:s,traceTransfers:a,validation:c}=t,u=t.account?We(t.account):void 0;if(s&&!u)throw new z("`account` is required when `traceAssetChanges` is true");let f=u?rO(nO("constructor(bytes, bytes)"),{bytecode:Zg,args:[QZ,Ms(oc("function getBalance(address)"),[u.address])]}):void 0,d=o??e.experimental_blockTag??"latest",g=r;if(s&&typeof g!="bigint"&&d!=="earliest"&&d!=="pending")if(d==="latest")g=await Jn(e,{cacheTime:0});else {let p=await er(e,{blockTag:d});if(typeof p.number!="bigint")throw new z(`Block tag \`${d}\` did not resolve to a number.`);g=p.number;}let h=typeof g=="bigint"?{blockNumber:g}:{blockTag:d},v=s?await If(e,{...h,blocks:[{calls:n.map(p=>({...p,from:u.address})),stateOverrides:i}],traceTransfers:a,validation:c}):void 0,E=v?[...new Set([...nG(v[0].calls.flatMap(p=>p.logs??[]),u.address),...t.calls.map(p=>p.to?.toLowerCase())])].filter(p=>!!p&&p!==zy&&p!==Ly):[],R=oG([...u?[u.address]:[],...E,...i?.map(({address:p})=>p)??[]]),$=[{address:R,code:pO}],[N,O]=await Promise.all([s?Promise.all([dO(e,{account:u.address,...h,data:f,stateOverride:i}),...E.map(p=>dO(e,{account:u.address,address:p,...h,data:Ms(aO,[u.address]),staticCallAddress:R,stateOverride:i}))]):[],If(e,{...h,blocks:[{calls:[...n,{to:Ly}].map(p=>({...p,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:f}]},{calls:E.map(p=>({to:R,data:Rp(p,Ms(aO,[u.address]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Ms(cO))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Ms(uO,[0n]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Ms(fO))})),stateOverrides:$}]:[]],traceTransfers:a,validation:c})]),I=O[0],[P,L,C,D,q]=s?O.slice(1):[],{calls:H,...Z}=I,re=H.slice(0,-1),S=N.map(p=>lO(p)?ut(p.data):null),l=P?.calls??[],m=L?.calls??[],b=[...l,...m].map(p=>lO(p)?ut(p.data):null),x=(C?.calls??[]).map(p=>dE(p,cO)),_=(q?.calls??[]).map(p=>dE(p,fO)),k=(D?.calls??[]).map(p=>dE(p,uO)),w=[];for(let[p,A]of b.entries()){let G=S[p],J=N[p],Q=typeof G=="bigint"?G:p>0&&J?.status==="success"&&J.data==="0x"?0n:null;if(typeof A!="bigint"||typeof Q!="bigint")continue;let ae=x[p-1],he=_[p-1],ye=k[p-1],Ke=p===0?{address:zy,decimals:18,symbol:"ETH"}:{address:E[p-1],decimals:ye||ae?Number(ae??1):void 0,symbol:he??void 0};w.push({token:Ke,value:{pre:Q,post:A,diff:A-Q}});}return {assetChanges:w,block:Z,results:re}}function Rp(e,t){return Ms(rG,[e,t])}function nG(e,t){let r=zo(t.toLowerCase(),{size:32});return e.filter(o=>o.topics[0]?.toLowerCase()!==tG||o.address.toLowerCase()===zy?false:o.topics[1]?.toLowerCase()===r||o.topics[2]?.toLowerCase()===r).map(o=>o.address.toLowerCase())}function lO(e){return e.status==="success"&&/^0x[\da-f]{64}$/i.test(e.data)}function dE(e,t){if(e.status==="failure"||e.data==="0x")return null;try{return sO(t,e.data)}catch{return null}}async function dO(e,t){let{account:r,address:o,blockNumber:n,blockTag:i,data:s,staticCallAddress:a,stateOverride:c}=t;try{return {data:(await hn({...e,ccipRead:!1},{account:o?Ly:r,data:o?Rp(o,s):s,stateOverride:o&&a?[...c??[],{address:a,code:pO}]:c,...o?{to:a}:{},...typeof n=="bigint"?{blockNumber:n}:{blockTag:i}})).data??"0x",status:"success"}}catch(u){if(!(u instanceof Es)||!(u.cause instanceof yo))throw u;return {data:"0x",status:"failure"}}}function oG(e){let t=new Set(e.map(o=>o.toLowerCase())),r=eG;for(;t.has(`0x${r.toString(16).padStart(40,"0")}`);)r++;return `0x${r.toString(16).padStart(40,"0")}`}var Tp={};Er(Tp,{InvalidWrappedSignatureError:()=>Uy,assert:()=>mE,from:()=>aG,magicBytes:()=>pE,universalSignatureValidatorAbi:()=>sG,universalSignatureValidatorBytecode:()=>iG,unwrap:()=>hO,validate:()=>uG,wrap:()=>cG});pn();pr();var pE="0x6492649264926492649264926492649264926492649264926492649264926492",iG="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",sG=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function mE(e){if(pt(e,-32)!==pE)throw new Uy(e)}function aG(e){return typeof e=="string"?hO(e):e}function hO(e){mE(e);let[t,r,o]=nc(Sp("address, bytes, bytes"),e);return {data:r,signature:o,to:t}}function cG(e){let{data:t,signature:r,to:o}=e;return ht(Ls(Sp("address, bytes, bytes"),[o,t,r]),pE)}function uG(e){try{return mE(e),!0}catch{return false}}var Uy=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc6492.InvalidWrappedSignatureError"});}};mn();dp();Ri();_2();Dn();Ii();$s();cn();lo();ur();Ae();rd();ur();lr();function gO({r:e,s:t,to:r="hex",v:o,yParity:n}){let i=(()=>{if(n===0||n===1)return n;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new xn.Signature(ut(e),ut(t)).toCompactHex()}${i===0?"1b":"1c"}`;return r==="hex"?s:fr(s)}Ps();async function Ds(e,t){let{address:r,chain:o=e.chain,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??o?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??o?.contracts?.multicall3?.address,mode:a="auto"}=t;if(o?.verifyHash)return await o.verifyHash(e,t);let c=(()=>{let u=t.signature;return St(u)?u:typeof u=="object"&&"r"in u&&"s"in u?gO(u):Le(u)})();try{if(a==="eoa")try{if(zr(Mn(r),await op({hash:n,signature:c})))return !0}catch{}return kp.validate(c)?await fG(e,{...t,multicallAddress:s,signature:c}):await lG(e,{...t,verifierAddress:i,signature:c})}catch(u){if(a!=="eoa")try{if(zr(Mn(r),await op({hash:n,signature:c})))return !0}catch{}if(u instanceof Li)return false;throw u}}async function fG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,multicallAddress:a,requireCanonical:c}=t,{authorization:u,data:f,signature:d,to:g}=kp.unwrap(t.signature);if(await Qa(e,{address:r,blockHash:o,blockNumber:n,blockTag:i,requireCanonical:c})===st(["0xef0100",u.address]))return await dG(e,{...t,signature:d});let v={address:u.address,chainId:Number(u.chainId),nonce:Number(u.nonce),r:K(u.r,{size:32}),s:K(u.s,{size:32}),yParity:u.yParity};if(!await m8({address:r,authorization:v}))throw new Li;let R=await oe(e,De,"readContract")({...a?{address:a}:{code:Wa},authorizationList:[v],abi:bo,blockHash:o,blockNumber:n,blockTag:"pending",functionName:"aggregate3",requireCanonical:c,args:[[...f?[{allowFailure:true,target:g??r,callData:f}]:[],{allowFailure:true,target:r,callData:lt({abi:x2,functionName:"isValidSignature",args:[s,d]})}]]});if(R[R.length-1]?.returnData?.startsWith("0x1626ba7e"))return true;throw new Li}async function lG(e,t){let{address:r,factory:o,factoryData:n,hash:i,signature:s,verifierAddress:a,...c}=t,u=await(async()=>!o&&!n||Tp.validate(s)?s:Tp.wrap({data:n,signature:s,to:o}))(),f=a?{to:a,data:lt({abi:v2,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:mp({abi:v2,args:[r,i,u],bytecode:b$}),...c},{data:d}=await oe(e,hn,"call")(f).catch(g=>{throw g instanceof Es?new Li:g});if(D6(d??"0x0"))return true;throw new Li}async function dG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,requireCanonical:a,signature:c}=t;if((await oe(e,De,"readContract")({address:r,abi:x2,args:[s,c],blockHash:o,blockNumber:n,blockTag:i,functionName:"isValidSignature",requireCanonical:a}).catch(f=>{throw f instanceof xu?new Li:f})).startsWith("0x1626ba7e"))return true;throw new Li}var Li=class extends Error{};async function yO(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=py(r);return oe(e,Ds,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function bO(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...f}=t,d=E8({message:s,primaryType:a,types:c,domain:u});return oe(e,Ds,"verifyHash")({address:r,factory:o,factoryData:n,hash:d,signature:i,...f})}jn();S2();Pr();ur();Pr();function My(e,{emitOnBegin:t=false,emitMissed:r=false,onBlockNumber:o,onError:n,poll:i,pollingInterval:s=e.pollingInterval}){let a=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),c;return a?(()=>{let d=Be(["watchBlockNumber",e.uid,t,r,s]);return Ur(d,{onBlockNumber:o,onError:n},g=>Wo(async()=>{try{let h=await oe(e,Jn,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(h===c)return;if(h-c>1&&r)for(let v=c+1n;v<h;v++)g.onBlockNumber(v,c),c=v;}(c===void 0||h>c)&&(g.onBlockNumber(h,c),c=h);}catch(h){g.onError?.(h);}},{emitOnBegin:t,interval:s}))})():(()=>{let d=Be(["watchBlockNumber",e.uid,t,r]);return Ur(d,{onBlockNumber:o,onError:n},g=>{let h=true,v=()=>h=false;return (async()=>{try{let E=(()=>{if(e.transport.type==="fallback"){let $=e.transport.transports.find(N=>N.config.type==="webSocket"||N.config.type==="ipc");return $?$.value:e.transport}return e.transport})(),{unsubscribe:R}=await E.subscribe({params:["newHeads"],onData($){if(!h)return;let N=ut($.result?.number);g.onBlockNumber(N,c),c=N;},onError($){g.onError?.($);}});v=R,h||v();}catch(E){n?.(E);}})(),()=>v()})})()}async function xO(e,t){let{checkReplacement:r=e.chain?.supportsTransactionReplacementDetection??true,confirmations:o=1,hash:n,onReplaced:i,retryCount:s=6,retryDelay:a=({count:P})=>~~(1<<P)*200,timeout:c=18e4}=t,u=Be(["waitForTransactionReceipt",e.uid,n]),f=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,d,g,h,v=false,E,R,{promise:$,resolve:N,reject:O}=Wg(),I=c?setTimeout(()=>{R?.(),E?.(),O(new pg({hash:n}));},c):void 0;return E=Ur(u,{onReplaced:i,resolve:N,reject:O},async P=>{if(h=await oe(e,Sf,"getTransactionReceipt")({hash:n}).catch(()=>{}),h&&o<=1){clearTimeout(I),P.resolve(h),E?.();return}R=oe(e,My,"watchBlockNumber")({emitMissed:true,emitOnBegin:true,poll:true,pollingInterval:f,async onBlockNumber(L){let C=q=>{clearTimeout(I),R?.(),q(),E?.();},D=L;if(!v)try{if(h){if(o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));return}if(r&&!d&&(v=!0,await bp(async()=>{d=await oe(e,Ef,"getTransaction")({hash:n}),d.blockNumber&&(D=d.blockNumber);},{delay:a,retryCount:s}),v=!1),h=await oe(e,Sf,"getTransactionReceipt")({hash:n}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));}catch(q){if(q instanceof _s||q instanceof bu){if(!d){v=false;return}try{g=d,v=!0;let H=await bp(()=>oe(e,er,"getBlock")({blockNumber:D,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:({error:S})=>S instanceof Ts});v=!1;let Z=H.transactions.find(({from:S,nonce:l})=>S===g.from&&l===g.nonce);if(!Z||(h=await oe(e,Sf,"getTransactionReceipt")({hash:Z.hash}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o)))return;let re="replaced";Z.to===g.to&&Z.value===g.value&&Z.input===g.input?re="repriced":Z.from===Z.to&&Z.value===0n&&(re="cancelled"),C(()=>{P.onReplaced?.({reason:re,replacedTransaction:g,transaction:Z,transactionReceipt:h}),P.resolve(h);});}catch(H){C(()=>P.reject(H));}}else C(()=>P.reject(q));}}});}),$}Pr();var pG=["size","totalDifficulty","transactions","uncles","withdrawals"];function vO(e,{onBlockHeader:t,onError:r}){let o,n=Be(["watchBlockHeaders",e.uid]);return Ur(n,{onBlockHeader:t,onError:r},i=>{let s=true,a=false,c=()=>s=false;return (async()=>{try{let u=(()=>{if(e.transport.type==="fallback"){let d=e.transport.transports.find(g=>g.config.type==="webSocket"||g.config.type==="ipc");return d?d.value:e.transport}return e.transport})(),{unsubscribe:f}=await u.subscribe({params:["newHeads"],onData(d){if(!s)return;let g=(e.chain?.formatters?.block?.format||Va)(d.result,"watchBlockHeaders");for(let h of pG)delete g[h];i.onBlockHeader(g,o),o=g;},onError(d){a&&i.onError?.(d);}});a=!0,c=f,s||c();}catch(u){i.onError?.(u);}})(),()=>c()})}Pr();function wO(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=false,emitOnBegin:o=false,onBlock:n,onError:i,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),f=s??false,d;return u?(()=>{let v=Be(["watchBlocks",e.uid,t,r,o,f,c]);return Ur(v,{onBlock:n,onError:i},E=>Wo(async()=>{try{let R=await oe(e,er,"getBlock")({blockTag:t,includeTransactions:f});if(R.number!==null&&d?.number!=null){if(R.number===d.number)return;if(R.number-d.number>1&&r)for(let $=d?.number+1n;$<R.number;$++){let N=await oe(e,er,"getBlock")({blockNumber:$,includeTransactions:f});E.onBlock(N,d),d=N;}}(d?.number==null||t==="pending"&&R?.number==null||R.number!==null&&R.number>d.number)&&(E.onBlock(R,d),d=R);}catch(R){E.onError?.(R);}},{emitOnBegin:o,interval:c}))})():(()=>{let v=true,E=true,R=()=>v=false;return (async()=>{try{o&&oe(e,er,"getBlock")({blockTag:t,includeTransactions:f}).then(O=>{v&&E&&(n(O,void 0),E=!1);}).catch(i);let $=(()=>{if(e.transport.type==="fallback"){let O=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return O?O.value:e.transport}return e.transport})(),{unsubscribe:N}=await $.subscribe({params:["newHeads"],async onData(O){if(!v)return;let I=await oe(e,er,"getBlock")({blockNumber:O.result?.number,includeTransactions:f}).catch(()=>{});v&&(n(I,d),E=!1,d=I);},onError(O){i?.(O);}});R=N,v||R();}catch($){i?.($);}})(),()=>R()})()}Et();np();Pr();function _O(e,{address:t,args:r,batch:o=true,event:n,events:i,fromBlock:s,onError:a,onLogs:c,poll:u,pollingInterval:f=e.pollingInterval,strict:d}){let g=typeof u<"u"?u:typeof s=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??false;return g?(()=>{let R=Be(["watchEvent",t,r,o,e.uid,n,f,s]);return Ur(R,{onLogs:c,onError:a},$=>{let N;s!==void 0&&(N=s-1n);let O,I=false,P=Wo(async()=>{if(!I){try{O=await oe(e,cy,"createEventFilter")({address:t,args:r,event:n,events:i,strict:h,fromBlock:s});}catch{}I=true;return}try{let L;if(O)L=await oe(e,Bs,"getFilterChanges")({filter:O});else {let C=await oe(e,Jn,"getBlockNumber")({});N&&N!==C?L=await oe(e,cf,"getLogs")({address:t,args:r,event:n,events:i,fromBlock:N+1n,toBlock:C}):L=[],N=C;}if(L.length===0)return;if(o)$.onLogs(L);else for(let C of L)$.onLogs([C]);}catch(L){O&&L instanceof Hn&&(I=false),$.onError?.(L);}},{emitOnBegin:true,interval:f});return async()=>{O&&await oe(e,Cs,"uninstallFilter")({filter:O}),P();}})})():(()=>{let R=true,$=()=>R=false;return (async()=>{try{let N=(()=>{if(e.transport.type==="fallback"){let L=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),O=i??(n?[n]:void 0),I=[];O&&(I=[O.flatMap(C=>jo({abi:[C],eventName:C.name,args:r}))],n&&(I=I[0]));let{unsubscribe:P}=await N.subscribe({params:["logs",{address:t,topics:I}],onData(L){if(!R)return;let C=L.result;try{let{eventName:D,args:q}=Ga({abi:O??[],data:C.data,topics:C.topics,strict:h}),H=dr(C,{args:q,eventName:D});c([H]);}catch(D){let q,H;if(D instanceof wi||D instanceof hs){if(d)return;q=D.abiItem.name,H=D.abiItem.inputs?.some(re=>!("name"in re&&re.name));}let Z=dr(C,{args:H?[]:{},eventName:q});c([Z]);}},onError(L){a?.(L);}});$=P,R||$();}catch(N){a?.(N);}})(),()=>$()})()}Pr();function EO(e,{batch:t=true,onError:r,onTransactions:o,poll:n,pollingInterval:i=e.pollingInterval}){return (typeof n<"u"?n:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{let u=Be(["watchPendingTransactions",e.uid,t,i]);return Ur(u,{onTransactions:o,onError:r},f=>{let d,g=Wo(async()=>{try{if(!d)try{d=await oe(e,uy,"createPendingTransactionFilter")({});return}catch(v){throw g(),v}let h=await oe(e,Bs,"getFilterChanges")({filter:d});if(h.length===0)return;if(t)f.onTransactions(h);else for(let v of h)f.onTransactions([v]);}catch(h){f.onError?.(h);}},{emitOnBegin:true,interval:i});return async()=>{d&&await oe(e,Cs,"uninstallFilter")({filter:d}),g();}})})():(()=>{let u=true,f=()=>u=false;return (async()=>{try{let{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!u)return;let h=g.result;o([h]);},onError(g){r?.(g);}});f=d,u||f();}catch(d){r?.(d);}})(),()=>f()})()}var mG=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function hG(e){return mG.test(e)?!Number.isNaN(new Date(e).getTime()):false}function hE(e){return hG(e)?new Date(e):new Date(Number.NaN)}function SO(e){let{scheme:t,statement:r,...o}=e.match(gG)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(yG)?.groups??{},f=e.split("Resources:")[1]?.split(`
71
- - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:hE(i)}:{},...s?{issuedAt:hE(s)}:{},...a?{notBefore:hE(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var gG=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,yG=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;Sn();$s();function IO(e){let{address:t,domain:r,message:o,nonce:n,scheme:i,time:s=new Date}=e;if(r&&o.domain!==r||n&&o.nonce!==n||i&&o.scheme!==i||Number.isNaN(s.getTime())||o.expirationTime&&(Number.isNaN(o.expirationTime.getTime())||s>=o.expirationTime)||o.notBefore&&(Number.isNaN(o.notBefore.getTime())||s<o.notBefore))return false;try{if(!o.address||!Me(o.address,{strict:!1})||t&&!zr(o.address,t))return !1}catch{return false}return true}async function AO(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,f=SO(n);if(!f.address||!IO({address:r,domain:o,message:f,nonce:i,scheme:s,time:c}))return false;let g=py(n);return Ds(e,{address:f.address,hash:g,signature:a,...u})}mn();Sn();$s();function Rf(e,t){return {amount:e,decimals:t,formatted:K8(e,t)}}function Ui(e,t){let{decimals:r,token:o}=t,n=yE(e,o);if(n)return {address:n.address,decimals:r??n.decimals};if(Me(o,{strict:false}))return {address:o,decimals:r??xG(e,o)};throw new Error(`Token "${o}" is not a declared ERC-20 token on the client's \`tokens\` array (with an address for the client's chain), and is not a valid address.`)}function yE(e,t){let r=e.tokens,o=e.chain?.id;if(!r||o===void 0)return;let n=bG(r,t);if(n)return gE(n,o);if(Me(t,{strict:false}))for(let i of r){let s=gE(i,o);if(s&&zr(s.address,t))return s}}function gE(e,t){let r=e.addresses[t];if(r)return {address:r,currency:e.currency,decimals:e.decimals,name:e.name,popular:e.popular,symbol:e.symbol}}function bG(e,t){let r=t.toLowerCase();for(let o of e)if(o.symbol?.toLowerCase()===r)return o}function xG(e,t){let r=e.tokens,o=e.chain?.id;if(r&&o!==void 0)for(let n of r){let i=gE(n,o);if(i&&zr(i.address,t))return i.decimals}}async function Tf(e,t){let{address:r,decimals:o}=Ui(e,t);return o!==void 0?{address:r,decimals:o}:{address:r,decimals:await De(e,{abi:Wn,address:r,functionName:"decimals"})}}function $f(e){return {...e,data:lt(e),to:e.address}}jn();async function kO(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:o}){let n=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,o]:[t]},{retryCount:0}),s=(e.chain?.formatters?.transactionReceipt?.format||Xa)(n);if(s.status==="reverted"&&r)throw new dg({receipt:s});return s}mn();async function Of(e,t){let{account:r,decimals:o,spender:n,token:i,...s}=t,[a,{decimals:c}]=await Promise.all([De(e,{...s,...Of.call(e,{account:r,spender:n,token:i})}),Tf(e,{decimals:o,token:i})]);return Rf(a,c)}(function(e){function t(r,o){return $f({address:Ui(r,o).address,abi:Wn,functionName:"allowance",args:[o.account,o.spender]})}e.call=t;})(Of||(Of={}));ln();mn();async function Nf(e,t){let{account:r=e.account,decimals:o,token:n,...i}=t;if(!r)throw new yp;let s=We(r).address,[a,{decimals:c}]=await Promise.all([De(e,{...i,...Nf.call(e,{account:s,token:n})}),Tf(e,{decimals:o,token:n})]);return Rf(a,c)}(function(e){function t(r,o){let n=o.account??r.account;if(!n)throw new yp;let i=We(n).address;return $f({address:Ui(r,o).address,abi:Wn,functionName:"balanceOf",args:[i]})}e.call=t;})(Nf||(Nf={}));mn();async function bE(e,t){let{token:r,...o}=t,{address:n}=Ui(e,{token:r}),i=yE(e,r),[s,a,c]=await Promise.all([i?.decimals??De(e,{...o,abi:Wn,address:n,functionName:"decimals"}),i?.name??De(e,{...o,abi:Wn,address:n,functionName:"name"}),i?.symbol??De(e,{...o,abi:Wn,address:n,functionName:"symbol"})]);return {decimals:s,name:a,symbol:c}}mn();async function Pf(e,t){let{decimals:r,token:o,...n}=t,[i,{decimals:s}]=await Promise.all([De(e,{...n,...Pf.call(e,{token:o})}),Tf(e,{decimals:r,token:o})]);return Rf(i,s)}(function(e){function t(r,o){return $f({address:Ui(r,o).address,abi:Wn,args:[],functionName:"totalSupply"})}e.call=t;})(Pf||(Pf={}));function RO(e){return {call:t=>hn(e,t),createAccessList:t=>Y$(e,t),createBlockFilter:()=>X$(e),createContractEventFilter:t=>J0(e,t),createEventFilter:t=>cy(e,t),createPendingTransactionFilter:()=>uy(e),estimateContractGas:t=>F4(e,t),estimateGas:t=>sf(e,t),getBalance:t=>Q$(e,t),getBlobBaseFee:()=>e8(e),getBlock:t=>er(e,t),getBlockNumber:t=>Jn(e,t),getBlockReceipts:t=>t8(e,t),getBlockTransactionCount:t=>r8(e,t),getBytecode:t=>Qa(e,t),getChainId:()=>of(e),getCode:t=>Qa(e,t),getContractEvents:t=>Ng(e,t),getDelegation:t=>n8(e,t),getEip712Domain:t=>o8(e,t),getEnsAddress:t=>F$(e,t),getEnsAvatar:t=>W$(e,t),getEnsName:t=>K$(e,t),getEnsResolver:t=>J$(e,t),getEnsText:t=>ay(e,t),getFeeHistory:t=>s8(e,t),estimateFeesPerGas:t=>z4(e,t),getFilterChanges:t=>Bs(e,t),getFilterLogs:t=>a8(e,t),getGasPrice:()=>ef(e),getLogs:t=>cf(e,t),getProof:t=>Y8(e,t),estimateMaxPriorityFeePerGas:t=>C4(e,t),fillTransaction:t=>$g(e,t),getRawTransaction:t=>X8(e,t),getStorageAt:t=>Q8(e,t),getTransaction:t=>Ef(e,t),getTransactionConfirmations:t=>eO(e,t),getTransactionCount:t=>Eg(e,t),getTransactionReceipt:t=>Sf(e,t),multicall:t=>tO(e,t),prepareTransactionRequest:t=>Og(e,t),readContract:t=>De(e,t),sendRawTransaction:t=>z$(e,t),sendRawTransactionSync:t=>kO(e,t),simulate:t=>If(e,t),simulateBlocks:t=>If(e,t),simulateCalls:t=>mO(e,t),simulateContract:t=>N$(e,t),verifyHash:t=>Ds(e,t),verifyMessage:t=>yO(e,t),verifySiweMessage:t=>AO(e,t),verifyTypedData:t=>bO(e,t),uninstallFilter:t=>Cs(e,t),waitForTransactionReceipt:t=>xO(e,t),watchBlockHeaders:t=>vO(e,t),watchBlocks:t=>wO(e,t),watchBlockNumber:t=>My(e,t),watchContractEvent:t=>C$(e,t),watchEvent:t=>_O(e,t),watchPendingTransactions:t=>EO(e,t),token:vG(e)}}function vG(e){return {getAllowance:xp(e,Of),getBalance:xp(e,Nf),getMetadata:xp(e,bE),getTotalSupply:xp(e,Pf)}}function xE(e){let{key:t="public",name:r="Public Client"}=e;return M$({...e,key:t,name:r,type:"publicClient"}).extend(RO)}function TO({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=ry();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:g8(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Da();Te();var Dy=class extends z{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"});}};Kg();var wG=0,$O=new WeakMap;function _G(e){if(!e)return "default";let t=$O.get(e);if(t!==void 0)return t;let r=wG++;return $O.set(e,r),r}function vE(e,t={}){let{batch:r,fetchFn:o,fetchOptions:n,key:i="http",maxResponseBodySize:s,methods:a,name:c="HTTP JSON-RPC",onFetchRequest:u,onFetchResponse:f,retryDelay:d,raw:g}=t;return ({chain:h,retryCount:v,timeout:E})=>{let{batchSize:R=1e3,wait:$=0}=typeof r=="object"?r:{},N=t.retryCount??v,O=E??t.timeout??1e4,I=e||h?.rpcUrls.default.http[0];if(!I)throw new Dy;let P=b8(I,{fetchFn:o,fetchOptions:n,maxResponseBodySize:s,onRequest:u,onResponse:f,timeout:O});return TO({key:i,methods:a,name:c,async request({method:L,params:C},D){let q={method:L,params:C},H=D?.signal?{signal:D.signal}:void 0,{schedule:Z}=hf({id:`${I}.${_G(D?.signal)}`,wait:$,shouldSplitBatch(m){return m.length>R},fn:m=>P.request({body:m,fetchOptions:H}),sort:(m,y)=>m.id-y.id}),re=async m=>r?Z(m):[await P.request({body:m,fetchOptions:H})],[{error:S,result:l}]=await re(q);if(g)return {error:S,result:l};if(S)throw new Ss({body:q,error:S,url:I});return l},retryCount:N,retryDelay:d,timeout:O,type:"http"},{fetchOptions:n,url:I})}}Ii();lr();Ae();Un();function OO(e){window.open(e,"_blank","noopener,noreferrer");}var NO={performAdAction(e){let t=uw(e);t?OO(t):console.warn(`[@adland/react] WebActionAdapter has no web action for ad type "${e.type}"`);},performEmptyAdAction(e,t,r){OO(`${r}/slots/${e}?chain=${t}`);}},jy=null,EG=Co.isInMiniApp().then(e=>(jy=e,e)).catch(()=>(jy=false,false));async function PO(){return jy!==null?jy:EG}async function SG(e,t){let r=tI(e,Mn(t));try{await Co.actions.swapToken({buyToken:r});}catch{await Co.actions.viewToken({token:r});}}async function IG(e){if(!await PO())return NO.performAdAction(e);try{switch(e.type){case "link":await Co.actions.openUrl(e.data.url);break;case "cast":await Co.actions.viewCast({hash:e.data.hash});break;case "tweet":await Co.actions.openUrl(e.data.url);break;case "miniapp":await Co.actions.openMiniApp({url:e.data.url});break;case "token":await SG(e.data.chainId,e.data.address);break;case "farcasterProfile":await Co.actions.viewProfile({fid:Number.parseInt(e.data.fid,10)});break}}catch(t){console.warn("[@adland/react] Mini App host refused the action, opening on the web:",t),NO.performAdAction(e);}}async function AG(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await PO()?Co.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var BO={performAdAction:IG,performEmptyAdAction:AG};var CO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};ur();var zO={block:B4({format(e){return {transactions:e.transactions?.map(r=>{if(typeof r=="string")return r;let o=Oi(r);return o.typeHex==="0x7e"&&(o.isSystemTx=r.isSystemTx,o.mint=r.mint?ut(r.mint):void 0,o.sourceHash=r.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:P4({format(e){let t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ut(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:L$({format(e){return {...e.depositNonce?{depositNonce:ut(e.depositNonce)}:{},...e.depositReceiptVersion?{depositReceiptVersion:vt(e.depositReceiptVersion)}:{},l1GasPrice:e.l1GasPrice?ut(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ut(e.l1GasUsed):null,l1Fee:e.l1Fee?ut(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};Lo();Sn();cn();Ae();function kG(e,t){return TG(e)?RG(e):d8(e,t)}var LO={transaction:kG};function RG(e){$G(e);let{sourceHash:t,data:r,from:o,gas:n,isSystemTx:i,mint:s,to:a,value:c}=e,u=[t,o,a??"0x",s?ft(s):"0x",c?ft(c):"0x",n?ft(n):"0x",i?"0x1":"0x",r??"0x"];return st(["0x7e",go(u)])}function TG(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function $G(e){let{from:t,to:r}=e;if(t&&!Me(t))throw new nt({address:t});if(r&&!Me(r))throw new nt({address:r})}var Bf={blockTime:2e3,contracts:CO,formatters:zO,serializers:LO};var $p=1,Op=vf({...Bf,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[$p]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[$p]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[$p]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[$p]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:$p});vf({...Op,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var Np=11155111,Pp=vf({...Bf,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[Np]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Np]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Np]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Np]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:true,sourceId:Np});vf({...Pp,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var PG=xi(["function module() view returns (address)"]),BG=xi(["function tokenURI(address slot) view returns (string)"]),MO="0x0000000000000000000000000000000000000000",CG="https://ipfs-gateway.econome.studio";function zG(e,t){return `${(t??CG).replace(/\/$/,"")}/ipfs/${e}`}var LG={[Op.id]:Op,[Pp.id]:Pp};function DO(e,t,r=LG){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return xE({chain:o,transport:vE(t),batch:{multicall:true}})}function UG(e){return e.startsWith("ipfs://")?e.slice(7):e.startsWith("Qm")||e.startsWith("bafy")?e:null}var MG=/^data:application\/json(;[^,]*)?,/i;function DG(e){let t=e.indexOf(","),r=e.slice(t+1);if(!/;base64/i.test(e.slice(0,t)))return decodeURIComponent(r);let o=typeof atob=="function"?atob(r):Buffer.from(r,"base64").toString("binary");return new TextDecoder().decode(Uint8Array.from(o,n=>n.charCodeAt(0)))}function jG(e){return qe(qr(e))}var wE=async(e,t)=>{if(!e)throw new Error("NO_AD");if(MG.test(e)){let s,a=DG(e);try{s=JSON.parse(a);}catch{throw new Error("NO_AD")}if(s&&typeof s=="object"&&"error"in s&&s.error)throw new Error(String(s.error));return {data:s,cid:jG(a)}}let r=UG(e),o=r?zG(r,t):e,n=await fetch(o,{method:"GET",headers:{Accept:"application/json"}});if(!n.ok)throw n.status===404?new Error("NO_AD"):new Error("ERROR");let i=await n.json();if(i.error)throw new Error(i.error);return {data:i,cid:r}},jO=async(e,t)=>{let r;try{r=await e.readContract({address:t,abi:PG,functionName:"module"});}catch(o){throw new Error(`[@adland/react] No slot found at ${t} on chain ${e.chain?.id??"unknown"}. Check the \`chainId\` prop, and any \`rpcUrl\` override \u2014 a custom RPC queries whatever chain it serves, whatever \`chainId\` says.`,{cause:o})}return !r||r===MO?"":e.readContract({address:r,abi:BG,functionName:"tokenURI",args:[t]})},FG=xi(["function adByKey(bytes32 key) view returns ((address slot,address module,string uri,address occupant,bool vacant,uint256 price,uint256 deposit,uint256 taxOwed,uint256 collectedTax,uint256 taxPercentage,address currency,uint256 occupiedSince))","function ad(address slot) view returns ((address slot,address module,string uri,address occupant,bool vacant,uint256 price,uint256 deposit,uint256 taxOwed,uint256 collectedTax,uint256 taxPercentage,address currency,uint256 occupiedSince))"]),HG={8453:"0x0896A90c75d2cF195427fb4128F3f4b28f5b2Ef7",84532:"0x2d852910adb7a0eC9725109C192D8217b4bD7FA4"};function VG(e){return Ei(e,{size:32})}var FO=async(e,t,r)=>{let o=r?.adModule??HG[e.chain?.id??-1];if(!o)throw new Error(`[@adland/react] No ad module known for chain ${e.chain?.id}. Pass \`adModule\` to resolve a slot by name there.`);let n=await e.readContract({address:o,abi:FG,functionName:"adByKey",args:[VG(t)]});if(n.slot===MO||!n.uri)return null;try{return {...await wE(n.uri,r?.gateway),slot:n.slot}}catch(i){if(i instanceof Error&&i.message==="NO_AD")return null;throw i}};var qG={link:["image","icon"],miniapp:["imageUrl","icon"],token:["logoURI"],farcasterProfile:["pfpUrl"],cast:["image","pfpUrl"],tweet:["image","pfpUrl"]};var WG=["image","imageUrl","icon","pfpUrl","logoURI"];var KG=["title","displayName","username","name","symbol"],JG=["description","bio","text","name"];function _E(e){return {...e.data,...e.metadata??{}}}function HO(e){if(!e)return null;let t=_E(e);for(let r of qG[e.type]??WG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function EE(e){if(!e)return null;let t=_E(e);for(let r of KG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function VO(e){if(!e)return null;let t=_E(e),r=EE(e);for(let o of JG){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}function ZO(e){return e?e.type:null}var ic=new Set,UO=1e3;function YG(e){return e==="view"?"view":"click"}function SE(e){return e.endpoint??aw}function GO(e,t,r){t.onEvent?.({type:e,slot:t.slot,chainId:t.chainId,cid:t.cid??null,placement:t.placement,empty:t.empty??false,auth:t.auth??"none",...r===void 0?{}:{verified:r}});}async function qO(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${SE(t)}/track`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:YG(e),slot:t.slot,cid:t.cid??null,domain:window.location.hostname,auth:r,...typeof t.chainId=="number"?{chainId:t.chainId}:{},...t.placement?{placement:t.placement}:{},...o?{token:o}:{}}),keepalive:!0}).catch(()=>{});}catch{}}async function WO(e,t){typeof window>"u"||(GO(e,t),(t.consent??"granted")==="granted"&&await qO(e,t));}async function XG(e,t,r){let o=e.auth??"none",n=null;o==="farcaster"&&e.getAuthToken&&(n=await e.getAuthToken());try{return (await fetch(`${SE(e)}/v1/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:t,type:"view",slot:e.slot,cid:e.cid??null,placement:e.placement,viewable_ms:r,chainId:e.chainId,auth:o,...n?{token:n,domain:window.location.hostname}:{}}),keepalive:!0})).ok}catch{return false}}async function QG(e,t,r){let o=false;return (e.consent??"granted")==="granted"&&(o=t?await XG(e,t,r):false,o||await qO("view",e)),GO("view",e,o),o}function KO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(ic.has(r))return;let o=new IntersectionObserver(n=>{for(let i of n)i.isIntersecting&&!ic.has(r)&&(ic.add(r),WO("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function JO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(ic.has(r))return;let o=fetch(`${SE(t)}/v1/serve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slot:t.slot})}).then(s=>s.ok?s.json():null).then(s=>s?.nonce??null).catch(()=>null),n,i=new IntersectionObserver(s=>{for(let a of s)if(a.isIntersecting){if(ic.has(r)||n)continue;n=setTimeout(async()=>{if(ic.has(r))return;ic.add(r),i.disconnect();let c=await o;await QG(t,c,UO);},UO);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}function IE(e,t){return WO(e,t)}var eq={link:"Link",cast:"Cast",miniapp:"Mini App",token:"Token",farcasterProfile:"Profile"};function AE(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function kE(e){return e.replace(/"/g,"&quot;").replace(/</g,"&lt;")}var RE=`
64
+ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(s)}}return this._serialize(n)}_serialize(t){let{signatures:r}=this,o=[];wn(o,r.length);let n=o.length+r.length*64+t.length,i=xe.Buffer.alloc(n);return it(r.length<256),xe.Buffer.from(o).copy(i,0),r.forEach(({signature:s},a)=>{s!==null&&(it(s.length===64,"signature has invalid length"),xe.Buffer.from(s).copy(i,o.length+a*64));}),t.copy(i,o.length+r.length*64),it(i.length<=Pa,`Transaction too large: ${i.length} > ${Pa}`),i}get keys(){return it(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return it(this.instructions.length===1),this.instructions[0].programId}get data(){return it(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t],o=vn(r),n=[];for(let i=0;i<o;i++){let s=_n(r,0,o0);n.push(Nr.default.encode(xe.Buffer.from(s)));}return e.populate(dd.from(r),n)}static populate(t,r=[]){let o=new e;return o.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(o.feePayer=t.accountKeys[0]),r.forEach((n,i)=>{let s={signature:n==Nr.default.encode(Q7)?null:Nr.default.decode(n),publicKey:t.accountKeys[i]};o.signatures.push(s);}),t.instructions.forEach(n=>{let i=n.accounts.map(s=>{let a=t.accountKeys[s];return {pubkey:a,isSigner:o.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(s),isWritable:t.isAccountWritable(s)}});o.instructions.push(new Qe({keys:i,programId:t.accountKeys[n.programIdIndex],data:Nr.default.decode(n.data)}));}),o._message=t,o._json=o.toJSON(),o}};var s0=class e{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)it(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else {let o=[];for(let n=0;n<t.header.numRequiredSignatures;n++)o.push(new Uint8Array(o0));this.signatures=o;}this.message=t;}serialize(){let t=this.message.serialize(),r=Array();wn(r,this.signatures.length);let o=$.struct([$.blob(r.length,"encodedSignaturesLength"),$.seq(W7(),this.signatures.length,"signatures"),$.blob(t.length,"serializedMessage")]),n=new Uint8Array(2048),i=o.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},n);return n.slice(0,i)}static deserialize(t){let r=[...t],o=[],n=vn(r);for(let s=0;s<n;s++)o.push(new Uint8Array(_n(r,0,o0)));let i=f0.deserialize(new Uint8Array(r));return new e(i,o)}sign(t){let r=this.message.serialize(),o=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(let n of t){let i=o.findIndex(s=>s.equals(n.publicKey));it(i>=0,`Cannot sign with non signer key ${n.publicKey.toBase58()}`),this.signatures[i]=u6(r,n.secretKey);}}addSignature(t,r){it(r.byteLength===64,"Signature must be 64 bytes long");let n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(t));it(n>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[n]=r;}};new Ie("SysvarC1ock11111111111111111111111111111111");new Ie("SysvarEpochSchedu1e111111111111111111111111");new Ie("Sysvar1nstructions1111111111111111111111111");new Ie("SysvarRecentB1ockHashes11111111111111111111");new Ie("SysvarRent111111111111111111111111111111111");new Ie("SysvarRewards111111111111111111111111111111");new Ie("SysvarS1otHashes111111111111111111111111111");new Ie("SysvarS1otHistory11111111111111111111111111");new Ie("SysvarStakeHistory1111111111111111111111111");var iF=$.nu64("lamportsPerSignature"),sF=$.struct([$.u32("version"),$.u32("state"),Pe("authorizedPubkey"),Pe("nonce"),$.struct([iF],"feeCalculator")]);sF.span;function eu(e){let t=(0, bR.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=uk();return n.decode=(s,a)=>{let c=r(s,a);return i.decode(c)},n.encode=(s,a,c)=>{let u=i.encode(s);return o(u,a,c)},n}Object.freeze({Create:{index:0,layout:$.struct([$.u32("instruction"),$.ns64("lamports"),$.ns64("space"),Pe("programId")])},Assign:{index:1,layout:$.struct([$.u32("instruction"),Pe("programId")])},Transfer:{index:2,layout:$.struct([$.u32("instruction"),eu("lamports")])},CreateWithSeed:{index:3,layout:$.struct([$.u32("instruction"),Pe("base"),Xc("seed"),$.ns64("lamports"),$.ns64("space"),Pe("programId")])},AdvanceNonceAccount:{index:4,layout:$.struct([$.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:$.struct([$.u32("instruction"),$.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:$.struct([$.u32("instruction"),Pe("authorized")])},AuthorizeNonceAccount:{index:7,layout:$.struct([$.u32("instruction"),Pe("authorized")])},Allocate:{index:8,layout:$.struct([$.u32("instruction"),$.ns64("space")])},AllocateWithSeed:{index:9,layout:$.struct([$.u32("instruction"),Pe("base"),Xc("seed"),$.ns64("space"),Pe("programId")])},AssignWithSeed:{index:10,layout:$.struct([$.u32("instruction"),Pe("base"),Xc("seed"),Pe("programId")])},TransferWithSeed:{index:11,layout:$.struct([$.u32("instruction"),eu("lamports"),Xc("seed"),Pe("programId")])},UpgradeNonceAccount:{index:12,layout:$.struct([$.u32("instruction")])}});new Ie("11111111111111111111111111111111");new Ie("BPFLoader2111111111111111111111111111111111");({layout:$.struct([$.u32("typeIndex"),eu("deactivationSlot"),$.nu64("lastExtendedSlot"),$.u8("lastExtendedStartIndex"),$.u8(),$.seq(Pe(),$.offset($.u8(),-1),"authority")])});var xt=Jc(Hh(Ie),ne(),e=>new Ie(e)),_R=Vh([ne(),ct("base64")]),l6=Jc(Hh(xe.Buffer),_R,e=>xe.Buffer.from(e[0],"base64"));function ER(e){return Ar([W({jsonrpc:ct("2.0"),id:ne(),result:e}),W({jsonrpc:ct("2.0"),id:ne(),error:W({code:Oa(),message:ne(),data:me(pk())})})])}var cF=ER(Oa());function rt(e){return Jc(ER(e),cF,t=>"error"in t?t:{...t,result:Kc(t.result,e)})}function co(e){return rt(W({context:W({slot:U()}),value:e}))}function l0(e){return W({context:W({slot:U()}),value:e})}var uF=W({foundation:U(),foundationTerm:U(),initial:U(),taper:U(),terminal:U()});rt(ue(fe(W({epoch:U(),effectiveSlot:U(),amount:U(),postBalance:U(),commission:me(fe(U()))}))));var fF=ue(W({slot:U(),prioritizationFee:U()})),lF=W({total:U(),validator:U(),foundation:U(),epoch:U()}),dF=W({epoch:U(),slotIndex:U(),slotsInEpoch:U(),absoluteSlot:U(),blockHeight:me(U()),transactionCount:me(U())}),pF=W({slotsPerEpoch:U(),leaderScheduleSlotOffset:U(),warmup:so(),firstNormalEpoch:U(),firstNormalSlot:U()}),mF=v_(ne(),ue(U())),Ba=fe(Ar([W({}),ne()])),hF=W({err:Ba}),gF=ct("receivedSignature");W({"solana-core":ne(),"feature-set":me(U())});var yF=W({program:ne(),programId:xt,parsed:Oa()}),bF=W({programId:xt,accounts:ue(xt),data:ne()});co(W({err:fe(Ar([W({}),ne()])),logs:fe(ue(ne())),accounts:me(fe(ue(fe(W({executable:so(),owner:ne(),lamports:U(),data:ue(ne()),rentEpoch:me(U())}))))),unitsConsumed:me(U()),returnData:me(fe(W({programId:ne(),data:Vh([ne(),ct("base64")])}))),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(Ar([yF,bF]))}))))}));co(W({byIdentity:v_(ne(),ue(U())),range:W({firstSlot:U(),lastSlot:U()})}));rt(uF);rt(lF);rt(fF);rt(dF);rt(pF);rt(mF);rt(U());co(W({total:U(),circulating:U(),nonCirculating:U(),nonCirculatingAccounts:ue(xt)}));var xF=W({amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())});co(ue(W({address:xt,amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())})));co(ue(W({pubkey:xt,account:W({executable:so(),owner:xt,lamports:U(),data:l6,rentEpoch:U()})})));var n6=W({program:ne(),parsed:Oa(),space:U()});co(ue(W({pubkey:xt,account:W({executable:so(),owner:xt,lamports:U(),data:n6,rentEpoch:U()})})));co(ue(W({lamports:U(),address:xt})));var d6=W({executable:so(),owner:xt,lamports:U(),data:l6,rentEpoch:U()});W({pubkey:xt,account:d6});var vF=Jc(Ar([Hh(xe.Buffer),n6]),Ar([_R,n6]),e=>Array.isArray(e)?Kc(e,l6):e),wF=W({executable:so(),owner:xt,lamports:U(),data:vF,rentEpoch:U()});W({pubkey:xt,account:wF});W({state:Ar([ct("active"),ct("inactive"),ct("activating"),ct("deactivating")]),active:U(),inactive:U()});rt(ue(W({signature:ne(),slot:U(),err:Ba,memo:fe(ne()),blockTime:me(fe(U()))})));rt(ue(W({signature:ne(),slot:U(),err:Ba,memo:fe(ne()),blockTime:me(fe(U()))})));W({subscription:U(),result:l0(d6)});var _F=W({pubkey:xt,account:d6});W({subscription:U(),result:l0(_F)});var EF=W({parent:U(),slot:U(),root:U()});W({subscription:U(),result:EF});var SF=Ar([W({type:Ar([ct("firstShredReceived"),ct("completed"),ct("optimisticConfirmation"),ct("root")]),slot:U(),timestamp:U()}),W({type:ct("createdBank"),parent:U(),slot:U(),timestamp:U()}),W({type:ct("frozen"),slot:U(),timestamp:U(),stats:W({numTransactionEntries:U(),numSuccessfulTransactions:U(),numFailedTransactions:U(),maxTransactionsPerEntry:U()})}),W({type:ct("dead"),slot:U(),timestamp:U(),err:ne()})]);W({subscription:U(),result:SF});W({subscription:U(),result:l0(Ar([hF,gF]))});W({subscription:U(),result:U()});W({pubkey:ne(),gossip:fe(ne()),tpu:fe(ne()),rpc:fe(ne()),version:fe(ne())});var lR=W({votePubkey:ne(),nodePubkey:ne(),activatedStake:U(),epochVoteAccount:so(),epochCredits:ue(Vh([U(),U(),U()])),commission:U(),lastVote:U(),rootSlot:fe(U())});rt(W({current:ue(lR),delinquent:ue(lR)}));var IF=Ar([ct("processed"),ct("confirmed"),ct("finalized")]),AF=W({slot:U(),confirmations:fe(U()),err:Ba,confirmationStatus:me(IF)});co(ue(fe(AF)));rt(U());var SR=W({accountKey:xt,writableIndexes:ue(U()),readonlyIndexes:ue(U())}),p6=W({signatures:ue(ne()),message:W({accountKeys:ue(ne()),header:W({numRequiredSignatures:U(),numReadonlySignedAccounts:U(),numReadonlyUnsignedAccounts:U()}),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()})),recentBlockhash:ne(),addressTableLookups:me(ue(SR))})}),IR=W({pubkey:xt,signer:so(),writable:so(),source:me(Ar([ct("transaction"),ct("lookupTable")]))}),AR=W({accountKeys:ue(IR),signatures:ue(ne())}),kR=W({parsed:Oa(),program:ne(),programId:xt}),RR=W({accounts:ue(xt),data:ne(),programId:xt}),kF=Ar([RR,kR]),RF=Ar([W({parsed:Oa(),program:ne(),programId:ne()}),W({accounts:ue(ne()),data:ne(),programId:ne()})]),TR=Jc(kF,RF,e=>"accounts"in e?Kc(e,RR):Kc(e,kR)),$R=W({signatures:ue(ne()),message:W({accountKeys:ue(IR),instructions:ue(TR),recentBlockhash:ne(),addressTableLookups:me(fe(ue(SR)))})}),a0=W({accountIndex:U(),mint:ne(),owner:me(ne()),programId:me(ne()),uiTokenAmount:xF}),OR=W({writable:ue(xt),readonly:ue(xt)}),d0=W({err:Ba,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()}))})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(a0))),postTokenBalances:me(fe(ue(a0))),loadedAddresses:me(OR),computeUnitsConsumed:me(U()),costUnits:me(U())}),m6=W({err:Ba,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(TR)})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(a0))),postTokenBalances:me(fe(ue(a0))),loadedAddresses:me(OR),computeUnitsConsumed:me(U()),costUnits:me(U())}),ru=Ar([ct(0),ct("legacy")]),Ca=W({pubkey:ne(),lamports:U(),postBalance:fe(U()),rewardType:fe(ne()),commission:me(fe(U()))});rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:p6,meta:fe(d0),version:me(ru)})),rewards:me(ue(Ca)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Ca)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:AR,meta:fe(d0),version:me(ru)})),rewards:me(ue(Ca)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:$R,meta:fe(m6),version:me(ru)})),rewards:me(ue(Ca)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:AR,meta:fe(m6),version:me(ru)})),rewards:me(ue(Ca)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Ca)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:p6,meta:fe(d0)})),rewards:me(ue(Ca)),blockTime:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),signatures:ue(ne()),blockTime:fe(U())})));rt(fe(W({slot:U(),meta:fe(d0),blockTime:me(fe(U())),transaction:p6,version:me(ru)})));rt(fe(W({slot:U(),transaction:$R,meta:fe(m6),blockTime:me(fe(U())),version:me(ru)})));co(W({blockhash:ne(),lastValidBlockHeight:U()}));co(so());var TF=W({slot:U(),numTransactions:U(),numSlots:U(),samplePeriodSecs:U()});rt(ue(TF));co(fe(W({feeCalculator:W({lamportsPerSignature:U()})})));rt(ne());rt(ne());var $F=W({err:Ba,logs:ue(ne()),signature:ne()});W({result:l0($F),subscription:U()});Object.freeze({CreateLookupTable:{index:0,layout:$.struct([$.u32("instruction"),eu("recentSlot"),$.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:$.struct([$.u32("instruction")])},ExtendLookupTable:{index:2,layout:$.struct([$.u32("instruction"),eu(),$.seq(Pe(),$.offset($.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:$.struct([$.u32("instruction")])},CloseLookupTable:{index:4,layout:$.struct([$.u32("instruction")])}});new Ie("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:$.struct([$.u8("instruction"),$.u32("units"),$.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:$.struct([$.u8("instruction"),$.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:$.struct([$.u8("instruction"),$.u32("units")])},SetComputeUnitPrice:{index:3,layout:$.struct([$.u8("instruction"),eu("microLamports")])}});new Ie("ComputeBudget111111111111111111111111111111");$.struct([$.u8("numSignatures"),$.u8("padding"),$.u16("signatureOffset"),$.u16("signatureInstructionIndex"),$.u16("publicKeyOffset"),$.u16("publicKeyInstructionIndex"),$.u16("messageDataOffset"),$.u16("messageDataSize"),$.u16("messageInstructionIndex")]);new Ie("Ed25519SigVerify111111111111111111111111111");xn.utils.isValidPrivateKey;xn.getPublicKey;$.struct([$.u8("numSignatures"),$.u16("signatureOffset"),$.u8("signatureInstructionIndex"),$.u16("ethAddressOffset"),$.u8("ethAddressInstructionIndex"),$.u16("messageDataOffset"),$.u16("messageDataSize"),$.u8("messageInstructionIndex"),$.blob(20,"ethAddress"),$.blob(64,"signature"),$.u8("recoveryId")]);new Ie("KeccakSecp256k11111111111111111111111111111");var NR;new Ie("StakeConfig11111111111111111111111111111111");var md=class{constructor(t,r,o){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=o;}};NR=md;md.default=new NR(0,0,Ie.default);Object.freeze({Initialize:{index:0,layout:$.struct([$.u32("instruction"),K7(),J7()])},Authorize:{index:1,layout:$.struct([$.u32("instruction"),Pe("newAuthorized"),$.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:$.struct([$.u32("instruction")])},Split:{index:3,layout:$.struct([$.u32("instruction"),$.ns64("lamports")])},Withdraw:{index:4,layout:$.struct([$.u32("instruction"),$.ns64("lamports")])},Deactivate:{index:5,layout:$.struct([$.u32("instruction")])},Merge:{index:7,layout:$.struct([$.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:$.struct([$.u32("instruction"),Pe("newAuthorized"),$.u32("stakeAuthorizationType"),Xc("authoritySeed"),Pe("authorityOwner")])}});new Ie("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:$.struct([$.u32("instruction"),Y7()])},Authorize:{index:1,layout:$.struct([$.u32("instruction"),Pe("newAuthorized"),$.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:$.struct([$.u32("instruction"),$.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:$.struct([$.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:$.struct([$.u32("instruction"),X7()])}});new Ie("Vote111111111111111111111111111111111111111");new Ie("Va1idator1nfo111111111111111111111111111111");W({name:ne(),website:me(ne()),details:me(ne()),iconUrl:me(ne()),keybaseUsername:me(ne())});new Ie("Vote111111111111111111111111111111111111111");$.struct([Pe("nodePubkey"),Pe("authorizedWithdrawer"),$.u8("commission"),$.nu64(),$.seq($.struct([$.nu64("slot"),$.u32("confirmationCount")]),$.offset($.u32(),-8),"votes"),$.u8("rootSlotValid"),$.nu64("rootSlot"),$.nu64(),$.seq($.struct([$.nu64("epoch"),Pe("authorizedVoter")]),$.offset($.u32(),-8),"authorizedVoters"),$.struct([$.seq($.struct([Pe("authorizedPubkey"),$.nu64("epochOfLastAuthorizedSwitch"),$.nu64("targetEpoch")]),32,"buf"),$.nu64("idx"),$.u8("isEmpty")],"priorVoters"),$.nu64(),$.seq($.struct([$.nu64("epoch"),$.nu64("credits"),$.nu64("prevCredits")]),$.offset($.u32(),-8),"epochCredits"),$.struct([$.nu64("slot"),$.nu64("timestamp")],"lastTimestamp")]);var PR=e=>({request:e,signMessage:t=>e({method:"signMessage",params:{message:t}}),signTransaction:t=>e({method:"signTransaction",params:{transaction:t}}),signAndSendTransaction:t=>e({method:"signAndSendTransaction",params:t})});function BR(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function CF(e){let t=Buffer.from(e,"base64");return f0.deserializeMessageVersion(t)==="legacy"?s0.deserialize(t):tt.from(t)}function CR(e){return async r=>{if(r.method==="connect")return await e(r);if(r.method==="signMessage")return await e(r);if(r.method==="signAndSendTransaction"){let{transaction:o}=r.params,n={transaction:BR(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:BR(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:CF(i)}}}}var zR=({miniAppHost:e,emitter:t})=>{let r,o=null;return {visible:false,get onback(){return o},set onback(n){o&&t.removeListener("backNavigationTriggered",o),o=n,n&&t.addListener("backNavigationTriggered",n);},async show(){await e.updateBackState({visible:true}),this.visible=true;},async hide(){await e.updateBackState({visible:false}),this.visible=false;},async enableWebNavigation(){r=zF({back:this,emitter:t});},async disableWebNavigation(){r?.(),r=void 0;}}};function zF({emitter:e,back:t}){let r=LF();if(r)return UF({emitter:e,back:t,navigation:r});if(typeof window<"u")return MF({emitter:e,back:t,window})}function LF(){if(typeof window<"u"&&window.navigation!==void 0)return window.navigation}function UF({emitter:e,back:t,navigation:r}){function o(){r.canGoBack?t.show():t.hide();}function n(){t.visible&&r.canGoBack&&r.back();}return r.addEventListener("navigatesuccess",o),e.addListener("backNavigationTriggered",n),()=>{r.removeEventListener("navigatesuccess",o),e.removeListener("backNavigationTriggered",n);}}function MF({emitter:e,back:t,window:r}){t.show();function o(){t.visible&&r.history.back();}return e.addListener("backNavigationTriggered",o),()=>{e.removeListener("backNavigationTriggered",o);}}var LR="0.1.1";function UR(){return LR}var p0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=`https://oxlib.sh${n??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
65
+ `);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${UR()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return MR(this,t)}};function MR(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?MR(e.cause,t):t?null:e}function m0(e,t={}){let{raw:r=false}=t,o=e;if(r)return e;if(o.error){let{code:n}=o.error,i=n===za.code?za:n===hd.code?hd:n===Sd.code?Sd:n===_d.code?_d:n===vd.code?vd:n===Ed.code?Ed:n===xd.code?xd:n===Id.code?Id:n===gd.code?gd:n===yd.code?yd:n===bd.code?bd:n===wd.code?wd:br;throw new i(o.error)}return o.result}var br=class extends Error{constructor(t){let{code:r,message:o,data:n}=t;super(o),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r,this.data=n;}},hd=class e extends br{constructor(t={}){super({message:"Missing or invalid parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32e3}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidInputError"});}};Object.defineProperty(hd,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var gd=class e extends br{constructor(t={}){super({message:"Requested resource not found.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32001}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceNotFoundError"});}};Object.defineProperty(gd,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var yd=class e extends br{constructor(t={}){super({message:"Requested resource not available.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32002}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceUnavailableError"});}};Object.defineProperty(yd,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var bd=class e extends br{constructor(t={}){super({message:"Transaction creation failed.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32003}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.TransactionRejectedError"});}};Object.defineProperty(bd,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var xd=class e extends br{constructor(t={}){super({message:"Method is not implemented.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32004}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotSupportedError"});}};Object.defineProperty(xd,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var vd=class e extends br{constructor(t={}){super({message:"Rate limit exceeded.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32005}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.LimitExceededError"});}};Object.defineProperty(vd,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var wd=class e extends br{constructor(t={}){super({message:"JSON-RPC version not supported.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32006}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.VersionNotSupportedError"});}};Object.defineProperty(wd,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var _d=class e extends br{constructor(t={}){super({message:"Input is not a valid JSON-RPC request.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32600}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidRequestError"});}};Object.defineProperty(_d,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var Ed=class e extends br{constructor(t={}){super({message:"Method does not exist.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32601}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotFoundError"});}};Object.defineProperty(Ed,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var Sd=class e extends br{constructor(t={}){super({message:"Invalid method parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32602}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidParamsError"});}};Object.defineProperty(Sd,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var za=class e extends br{constructor(t={}){super({message:"Internal JSON-RPC error.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32603}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InternalErrorError"});}};Object.defineProperty(za,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var Id=class e extends br{constructor(t={}){super({message:"Failed to parse JSON-RPC response.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32700}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ParseError"});}};Object.defineProperty(Id,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var Bo=class extends Error{constructor(t,r){super(r),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=t,this.details=r;}},Ad=class extends Bo{constructor({message:t="The user rejected the request."}={}){super(4001,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UserRejectedRequestError"});}};Object.defineProperty(Ad,"code",{enumerable:true,configurable:true,writable:true,value:4001});var kd=class extends Bo{constructor({message:t="The requested method and/or account has not been authorized by the user."}={}){super(4100,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnauthorizedError"});}};Object.defineProperty(kd,"code",{enumerable:true,configurable:true,writable:true,value:4100});var Rd=class extends Bo{constructor({message:t="The provider does not support the requested method."}={}){super(4200,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnsupportedMethodError"});}};Object.defineProperty(Rd,"code",{enumerable:true,configurable:true,writable:true,value:4200});var Td=class extends Bo{constructor({message:t="The provider is disconnected from all chains."}={}){super(4900,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.DisconnectedError"});}};Object.defineProperty(Td,"code",{enumerable:true,configurable:true,writable:true,value:4900});var $d=class extends Bo{constructor({message:t="The provider is not connected to the requested chain."}={}){super(4901,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.ChainDisconnectedError"});}};Object.defineProperty($d,"code",{enumerable:true,configurable:true,writable:true,value:4901});function jR(){let e=new nd.default;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}function FR(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new h6;return {...r?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(o){let n=await e.request(o);return n&&typeof n=="object"&&"jsonrpc"in n?m0(n):n}}}var h6=class extends p0{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function HR(e={}){let t=e.id??0;return {prepare(r){return FF({id:t++,...r})},get id(){return t}}}function FF(e){return {...e,jsonrpc:"2.0"}}var ZR=Symbol("Comlink.proxy"),VF=Symbol("Comlink.endpoint"),ZF=Symbol("Comlink.releaseProxy"),g6=Symbol("Comlink.finalizer"),g0=Symbol("Comlink.thrown"),GR=e=>typeof e=="object"&&e!==null||typeof e=="function",GF={canHandle:e=>GR(e)&&e[ZR],serialize(e){let{port1:t,port2:r}=new MessageChannel;return WR(e,t),[r,[r]]},deserialize(e){return e.start(),b6(e)}},qF={canHandle:e=>GR(e)&&g0 in e,serialize({value:e}){let t;return e instanceof Error?t={isError:true,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:false,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},qR=new Map([["proxy",GF],["throw",qF]]);function WF(e,t){for(let r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return true;return false}function WR(e,t=globalThis,r=["*"]){t.addEventListener("message",function o(n){if(!n||!n.data)return;if(!WF(r,n.origin)){console.warn(`Invalid origin '${n.origin}' for comlink proxy`);return}let{id:i,type:s,path:a}=Object.assign({path:[]},n.data),c=(n.data.argumentList||[]).map(La),u;try{let f=a.slice(0,-1).reduce((g,h)=>g[h],e),d=a.reduce((g,h)=>g[h],e);switch(s){case "GET":u=d;break;case "SET":f[a.slice(-1)[0]]=La(n.data.value),u=!0;break;case "APPLY":u=d.apply(f,c);break;case "CONSTRUCT":{let g=new d(...c);u=eH(g);}break;case "ENDPOINT":{let{port1:g,port2:h}=new MessageChannel;WR(e,h),u=QF(g,[g]);}break;case "RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[g0]:0};}Promise.resolve(u).catch(f=>({value:f,[g0]:0})).then(f=>{let[d,g]=x0(f);t.postMessage(Object.assign(Object.assign({},d),{id:i}),g),s==="RELEASE"&&(t.removeEventListener("message",o),KR(t),g6 in e&&typeof e[g6]=="function"&&e[g6]());}).catch(f=>{let[d,g]=x0({value:new TypeError("Unserializable return value"),[g0]:0});t.postMessage(Object.assign(Object.assign({},d),{id:i}),g);});}),t.start&&t.start();}function KF(e){return e.constructor.name==="MessagePort"}function KR(e){KF(e)&&e.close();}function b6(e,t){let r=new Map;return e.addEventListener("message",function(n){let{data:i}=n;if(!i||!i.id)return;let s=r.get(i.id);if(s)try{s(i);}finally{r.delete(i.id);}}),y6(e,r,[],t)}function h0(e){if(e)throw new Error("Proxy has been released and is not useable")}function JR(e){return nu(e,new Map,{type:"RELEASE"}).then(()=>{KR(e);})}var y0=new WeakMap,b0="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(y0.get(e)||0)-1;y0.set(e,t),t===0&&JR(e);});function JF(e,t){let r=(y0.get(t)||0)+1;y0.set(t,r),b0&&b0.register(e,t,e);}function YF(e){b0&&b0.unregister(e);}function y6(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(h0(n),a===ZF)return ()=>{YF(i),JR(e),t.clear(),n=true;};if(a==="then"){if(r.length===0)return {then:()=>i};let c=nu(e,t,{type:"GET",path:r.map(u=>u.toString())}).then(La);return c.then.bind(c)}return y6(e,t,[...r,a])},set(s,a,c){h0(n);let[u,f]=x0(c);return nu(e,t,{type:"SET",path:[...r,a].map(d=>d.toString()),value:u},f).then(La)},apply(s,a,c){h0(n);let u=r[r.length-1];if(u===VF)return nu(e,t,{type:"ENDPOINT"}).then(La);if(u==="bind")return y6(e,t,r.slice(0,-1));let[f,d]=VR(c);return nu(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:f},d).then(La)},construct(s,a){h0(n);let[c,u]=VR(a);return nu(e,t,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(La)}});return JF(i,e),i}function XF(e){return Array.prototype.concat.apply([],e)}function VR(e){let t=e.map(x0);return [t.map(r=>r[0]),XF(t.map(r=>r[1]))]}var YR=new WeakMap;function QF(e,t){return YR.set(e,t),e}function eH(e){return Object.assign(e,{[ZR]:true})}function XR(e,t=globalThis,r="*"){return {postMessage:(o,n)=>e.postMessage(o,r,n),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function x0(e){for(let[t,r]of qR)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},YR.get(e)||[]]}function La(e){switch(e.type){case "HANDLER":return qR.get(e.name).deserialize(e.value);case "RAW":return e.value}}function nu(e,t,r,o){return new Promise(n=>{let i=tH();t.set(i,n),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),o);})}function tH(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var rH={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},nH={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e));},addEventListener:(e,t,...r)=>{document.addEventListener("FarcasterFrameCallback",t,...r);},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t);}},QR=typeof window>"u"?rH:window?.ReactNativeWebView?nH:XR(window?.parent??window);var ve=b6(QR);var x6=jR(),oH=HR();function iH({code:e,details:t}){switch(e){case 4001:return new Ad;case 4100:return new kd;case 4200:return new Rd;case 4900:return new Td;case 4901:return new $d;default:return new Bo(e,t??"Unknown provider RPC error")}}var ou=FR({...x6,async request(e){let t=oH.prepare(e);try{let r=await ve.ethProviderRequestV2(t).then(o=>m0(o,{request:t,raw:!0}));if(r.error)throw iH(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await ve.ethProviderRequest(t);throw r instanceof Bo||r instanceof br?r:new za({message:r instanceof Error?r.message:void 0})}}});async function eT(){try{let e=await ve.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:ou}catch{return ou}}function tT(e){let t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);let r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)}typeof document<"u"&&(document.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),document.addEventListener("FarcasterFrameEthProviderEvent",e=>{if(e instanceof MessageEvent){let t=e.data;x6.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&tT({info:t.info,provider:ou});}}));typeof window<"u"&&(window.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEthProviderEvent"){let t=e.data;x6.emit(t.event,...t.params);}}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="eip6963:announceProvider"&&tT({info:t.info,provider:ou});}}));new TextEncoder;var v0=new TextDecoder;var aH=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r},rT=e=>{let t=e;t instanceof Uint8Array&&(t=v0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return aH(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};var nT=rT;function uH(e){return typeof e=="object"&&e!==null}function v6(e){if(!uH(e)||Object.prototype.toString.call(e)!=="[object Object]")return false;if(Object.getPrototypeOf(e)===null)return true;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var xr=class extends Error{constructor(t,r){super(t,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor);}};xr.code="ERR_JOSE_GENERIC";var w6=class extends xr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=o,this.reason=n,this.payload=r;}};w6.code="ERR_JWT_CLAIM_VALIDATION_FAILED";var _6=class extends xr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};_6.code="ERR_JWT_EXPIRED";var E6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};E6.code="ERR_JOSE_ALG_NOT_ALLOWED";var S6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};S6.code="ERR_JOSE_NOT_SUPPORTED";var I6=class extends xr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};I6.code="ERR_JWE_DECRYPTION_FAILED";var A6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};A6.code="ERR_JWE_INVALID";var k6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};k6.code="ERR_JWS_INVALID";var uo=class extends xr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};uo.code="ERR_JWT_INVALID";var R6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};R6.code="ERR_JWK_INVALID";var T6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};T6.code="ERR_JWKS_INVALID";var $6=class extends xr{constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_NO_MATCHING_KEY";}};$6.code="ERR_JWKS_NO_MATCHING_KEY";var O6=class extends xr{constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";}};O6.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var N6=class extends xr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};N6.code="ERR_JWKS_TIMEOUT";var P6=class extends xr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};P6.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function oT(e){if(typeof e!="string")throw new uo("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new uo("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new uo("Invalid JWT");if(!t)throw new uo("JWTs must contain a payload");let o;try{o=nT(t);}catch{throw new uo("Failed to base64url decode the payload")}let n;try{n=JSON.parse(v0.decode(o));}catch{throw new uo("Failed to parse the decoded payload as JSON")}if(!v6(n))throw new uo("Invalid JWT Claims Set");return n}function iT(e){return oT(e)}var w0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o?["",o?`Details: ${o}`:void 0]:[]].filter(i=>typeof i=="string").join(`
66
+ `);super(n,r.cause?{cause:r.cause}:void 0),this.name="BaseError",this.cause=r.cause,this.details=o,this.shortMessage=t;}},iu=class extends w0{constructor({status:t}){super(`Request failed with status ${t}`),this.name="RequestFailedError";}},_0=class extends w0{constructor(t){super(t),this.name="InvalidToken";}};async function sT({origin:e}){let t=await fetch(`${e}/nonce`,{method:"POST"});if(!t.ok)throw new iu({status:t.status});return await t.json()}async function aT({origin:e},t){let r=await fetch(`${e}/verify-siwf`,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(t)});if(!r.ok)throw new iu({status:r.status});let o=await r.json();if(o.valid===false)throw new _0(o.message??"unknown");return {token:o.token}}function cT(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function uT(e={}){let t=cT(e);return {generateNonce:()=>sT(t),verifySiwf:r=>aT(t,r)}}var fH=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,lH=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function fT(e){let{scheme:t,statement:r,...o}=e.match(fH)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(lH)?.groups??{},f=e.split("Resources:")[1]?.split(`
67
+ - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:new Date(i)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var E0=(()=>{let e,t;async function r(o){let n=uT({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await ve.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=fT(s.result.message);if(!a.domain)throw new Error("Missing domain on SIWE message");let c=await n.verifySiwf({domain:a.domain,message:s.result.message,signature:s.result.signature});return e={token:c.token,payload:iT(c.token)},c}throw s.error.type==="rejected_by_user"?new Ac.RejectedByUser:new Error("Unreachable")}return {get token(){if(e&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3))return e.token},async getToken(o={}){let n=o.force??false;return e&&!n&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3)?{token:e.token}:(t||(t=r(o)),t.finally(()=>{t=void 0;}),t)},async fetch(o,n){let{token:i}=await this.getToken(),s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${i}`),fetch(o,{...n,headers:s})}}})();function mH(){let e=new Dk;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}var vr=mH();var{solanaProviderRequest:lT}=ve,dT;lT&&(dT=PR(CR(lT)));async function B6(){let e;try{e=await ve.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return dT}var pT=null;async function hH(e=1e3){if(pT===true)return true;if(typeof window>"u"||!window.ReactNativeWebView&&window===window.parent)return false;let t=await Promise.race([ve.context.then(r=>!!r),new Promise(r=>{setTimeout(()=>r(false),e);})]).catch(()=>false);return t&&(pT=true),t}var mT=async()=>{let e=await ve.addFrame();if(e.result)return e.result;throw e.error.type==="invalid_domain_manifest"?new Rl.InvalidDomainManifest:e.error.type==="rejected_by_user"?new Rl.RejectedByUser:new Error("Unreachable")},hT={...vr,getCapabilities:ve.getCapabilities,getChains:ve.getChains,isInMiniApp:hH,context:ve.context,back:zR({miniAppHost:ve,emitter:vr}),quickAuth:E0,actions:{setPrimaryButton:ve.setPrimaryButton.bind(ve),ready:async(e={})=>await ve.ready(e),close:ve.close.bind(ve),viewCast:ve.viewCast.bind(ve),viewProfile:ve.viewProfile.bind(ve),openMiniApp:ve.openMiniApp.bind(ve),signIn:async e=>{let t=await ve.signIn({...e,acceptAuthAddress:e.acceptAuthAddress??true});if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Ac.RejectedByUser:new Error("Unreachable")},openUrl:e=>{let t=typeof e=="string"?e:e.url;return ve.openUrl(t.trim())},addFrame:mT,addMiniApp:mT,composeCast(e={}){return ve.composeCast(e)},viewToken:ve.viewToken.bind(ve),sendToken:ve.sendToken.bind(ve),swapToken:ve.swapToken.bind(ve),requestCameraAndMicrophoneAccess:ve.requestCameraAndMicrophoneAccess.bind(ve)},experimental:{getSolanaProvider:B6,signManifest:async e=>{let t=await ve.signManifest(e);if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new kc.RejectedByUser:t.error.type==="invalid_domain"?new kc.InvalidDomain:t.error.type==="generic_error"?new kc.GenericError(t.error.message):new Error("Unreachable")},quickAuth(e){return E0.getToken(e)}},wallet:{ethProvider:ou,getEthereumProvider:eT,getSolanaProvider:B6},haptics:{impactOccurred:ve.impactOccurred.bind(ve),notificationOccurred:ve.notificationOccurred.bind(ve),selectionChanged:ve.selectionChanged.bind(ve)}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="primary_button_clicked"?vr.emit("primaryButtonClicked"):t.event==="miniapp_added"?vr.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?vr.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?vr.emit("miniAppRemoved"):t.event==="notifications_enabled"?vr.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?vr.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&vr.emit("backNavigationTriggered");}});typeof window<"u"&&window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="primary_button_clicked"?vr.emit("primaryButtonClicked"):t.event==="miniapp_added"?vr.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?vr.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?vr.emit("miniAppRemoved"):t.event==="notifications_enabled"?vr.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?vr.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&vr.emit("backNavigationTriggered");}});var Co=hT;fu();function oe(e,t,r){let o=e[t.name];if(typeof o=="function")return o;let n=e[r];return typeof n=="function"?n:i=>t(e,i)}Et();Te();var Z0=class extends L{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"});}};lr();Mn();np();ki();wi();ws();var f4="/docs/contract/encodeEventTopics";function jo(e){let{abi:t,eventName:r,args:o}=e,n=t[0];if(r){let c=fn({abi:t,name:r});if(!c)throw new Jd(r,{docsPath:f4});n=c;}if(n.type!=="event")throw new Jd(void 0,{docsPath:f4});let i=[];if(o&&"inputs"in n){let c=n.inputs?.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(o)?o:Object.values(o).length>0?c?.map(f=>o[f.name])??[]:[];u.length>0&&(i=c?.map((f,d)=>Array.isArray(u[d])?u[d].map((g,h)=>l4({param:f,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?l4({param:f,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=nr(n);return [bs(s),...i]}function l4({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return qe(qr(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new Z0(e.type);return Wr([e],[t])}Ae();function _s(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:o,response:n,status:i,transport:s})=>{i==="success"&&t===o&&(r[n]=s.request);}),(o=>r[o]||e.request)}async function Q0(e,t){let{address:r,abi:o,args:n,eventName:i,fromBlock:s,strict:a,toBlock:c}=t,u=_s(e,{method:"eth_newFilter"}),f=i?jo({abi:o,args:n,eventName:i}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof s=="bigint"?K(s):s,toBlock:typeof c=="bigint"?K(c):c,topics:f}]});return {abi:o,args:n,eventName:i,id:d,request:u(d),strict:!!a,type:"event"}}ln();jn();Et();Te();Ti();Ha();Fu();var tV=3;function go(e,{abi:t,address:r,args:o,docsPath:n,functionName:i,sender:s}){let a=e instanceof Ho?e:e instanceof L?e.walk(x=>"data"in x)||e.walk():{},{code:c,data:u,details:f,message:d,shortMessage:g}=a,h=e instanceof Ln?new yg({functionName:i,cause:e}):[tV,$i.code].includes(c)&&(u||f||d||g)||c===Vn.code&&f==="execution reverted"&&u?new ja({abi:t,data:typeof u=="object"?u.data:u,functionName:i,message:a instanceof Is?f:g??d,cause:e}):e;return new _u(h,{abi:t,args:o,contractAddress:r,docsPath:n,functionName:i,sender:s})}ln();Te();Ai();Mn();function R4(e){let t=qe(`0x${e.substring(4)}`).substring(26);return xs(`0x${t}`)}po();sn();ur();Ae();async function $4({hash:e,signature:t}){let r=St(e)?e:ft(e),{secp256k1:o}=await Promise.resolve().then(()=>(ud(),iR));return `0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:f,v:d,yParity:g}=t,h=Number(g??d),x=T4(h);return new o.Signature(ut(u),ut(f)).addRecoveryBit(x)}let s=St(t)?t:ft(t);if($e(s)!==65)throw new Error("invalid signature length");let a=vt(`0x${s.slice(130)}`),c=T4(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function T4(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function fp({hash:e,signature:t}){return R4(await $4({hash:e,signature:t}))}cn();lr();Ae();Te();ng();lr();Ae();function yo(e,t="hex"){let r=O4(e),o=yu(new Uint8Array(r.length));return r.encode(o),t==="hex"?Le(o.bytes):o.bytes}function O4(e){return Array.isArray(e)?rV(e.map(t=>O4(t))):nV(e)}function rV(e){let t=e.reduce((n,i)=>n+i.length,0),r=N4(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function nV(e){let t=typeof e=="string"?fr(e):e,r=N4(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function N4(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new L("Length is too large.")}Mn();function P4(e){let{chainId:t,nonce:r,to:o}=e,n=e.contractAddress??e.address,i=qe(st(["0x05",yo([t?K(t):"0x",n,r?K(r):"0x"])]));return o==="bytes"?fr(i):i}async function vg(e){let{authorization:t,signature:r}=e;return fp({hash:P4(t),signature:r??t})}Ae();cg();vu();Te();Fn();var wg=class extends L{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ma({from:r?.address,to:d,value:typeof g<"u"&&`${xu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}};Zo();lp();function B4(e,{docsPath:t,...r}){let o=(()=>{let n=Ts(e,r);return n instanceof Gn?e:n})();return new wg(o,{docsPath:t,...r})}dp();Xu();Eg();Za();ln();vu();Te();var tf=class extends L{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"});}},Os=class extends L{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"});}},Sg=class extends L{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${or(t)} gwei).`,{name:"MaxFeePerGasTooLowError"});}};ur();Te();var Ns=class extends L{constructor({blockHash:t,blockNumber:r}){let o="Block";t&&(o=`Block at hash "${t}"`),r&&(o=`Block at number "${r}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"});}};Ae();_g();ur();_g();var a2={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ni(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?vt(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?vt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?a2[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=aV(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}var z4=Yu("transaction",Ni);function aV(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Ga(e,t){let r=(e.transactions??[]).map(o=>typeof o=="string"?o:Ni(o));return {...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var L4=Yu("block",Ga);async function er(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:n}={}){let i=n??false,s=r!==void 0?K(r):void 0,a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:true}):a=await e.request({method:"eth_getBlockByNumber",params:[s||o,i]},{dedupe:!!s}),!a)throw new Ns({blockHash:t,blockNumber:r});return (e.chain?.formatters?.block?.format||Ga)(a,"getBlock")}async function rf(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function U4(e,t){return c2(e,t)}async function c2(e,t){let{block:r,chain:o=e.chain,request:n}=t||{};try{let i=o?.fees?.maxPriorityFeePerGas??o?.fees?.defaultPriorityFee;if(typeof i=="function"){let a=r||await oe(e,er,"getBlock")({}),c=await i({block:a,client:e,request:n});if(c===null)throw new Error;return c}if(typeof i<"u")return i;let s=await e.request({method:"eth_maxPriorityFeePerGas"});return ut(s)}catch{let[i,s]=await Promise.all([r?Promise.resolve(r):oe(e,er,"getBlock")({}),oe(e,rf,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new Os;let a=s-i.baseFeePerGas;return a<0n?0n:a}}async function M4(e,t){return Ig(e,t)}async function Ig(e,t){let{block:r,chain:o=e.chain,request:n,type:i="eip1559"}=t||{},s=await(async()=>typeof o?.fees?.baseFeeMultiplier=="function"?o.fees.baseFeeMultiplier({block:r,client:e,request:n}):o?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new tf;let c=10**(s.toString().split(".")[1]?.length??0),u=g=>g*BigInt(Math.round(s*c))/BigInt(c),f=r||await oe(e,er,"getBlock")({});if(typeof o?.fees?.estimateFeesPerGas=="function"){let g=await o.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:n,type:i});if(g!==null)return g}if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new Os;let g=typeof n?.maxPriorityFeePerGas=="bigint"?n.maxPriorityFeePerGas:await c2(e,{block:f,chain:o,request:n}),h=u(f.baseFeePerGas);return {maxFeePerGas:n?.maxFeePerGas??h+g,maxPriorityFeePerGas:g}}return {gasPrice:n?.gasPrice??u(await oe(e,rf,"getGasPrice")({}))}}qa();ur();async function Ag(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=An({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});return vt(a)}lr();Ae();function nf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(i=>fr(i)):e.blobs,n=[];for(let i of o)n.push(Uint8Array.from(t.blobToKzgCommitment(i)));return r==="bytes"?n:n.map(i=>Le(i))}lr();Ae();function of(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(s=>fr(s)):e.blobs,n=typeof e.commitments[0]=="string"?e.commitments.map(s=>fr(s)):e.commitments,i=[];for(let s=0;s<o.length;s++){let a=o[s],c=n[s];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)));}return r==="bytes"?i:i.map(s=>Le(s))}Ae();po();lr();Ae();function D4(e,t){let r=t,o=Vl(St(e,{strict:false})?qr(e):e);return r==="bytes"?o:ft(o)}function j4(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=D4(t,"bytes");return n.set([r],0),o==="bytes"?n:Le(n)}function kg(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(j4({commitment:i,to:o,version:r}));return n}Te();var Rg=class extends L{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"});}},sf=class extends L{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"});}},Tg=class extends L{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},$g=class extends L{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};ng();sn();lr();Ae();function F4(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?fr(e.data):e.data,o=$e(r);if(!o)throw new sf;if(o>761855)throw new Rg({maxSize:761855,size:o});let n=[],i=true,s=0;for(;i;){let a=yu(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(s,s+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),i=false;break}c++,s+=31;}n.push(a);}return t==="bytes"?n.map(a=>a.bytes):n.map(a=>Le(a.bytes))}function Og(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??F4({data:t,to:o}),i=e.commitments??nf({blobs:n,kzg:r,to:o}),s=e.proofs??of({blobs:n,commitments:i,kzg:r,to:o}),a=[];for(let c=0;c<n.length;c++)a.push({blob:n[c],commitment:i[c],proof:s[c]});return a}op();Za();Fn();function Ng(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return "eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return "eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return "eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new dg({transaction:e})}ln();Zo();Fn();lp();function H4(e,{docsPath:t,...r}){let o=(()=>{let n=Ts(e,r);return n instanceof Gn?e:n})();return new mg(o,{docsPath:t,...r})}dp();Xu();Za();ur();async function af(e){let t=await e.request({method:"eth_chainId"},{dedupe:true});return vt(t)}async function Pg(e,t){let{account:r=e.account,accessList:o,authorizationList:n,chain:i=e.chain,blobVersionedHashes:s,blobs:a,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:x,nonceManager:w,to:k,type:T,value:P,...O}=t,S=await(async()=>{if(!r||!w||typeof x<"u")return x;let D=We(r),q=i?i.id:await oe(e,af,"getChainId")({});return await w.consume({address:D.address,chainId:q,client:e})})();qn(t);let N=i?.formatters?.transactionRequest?.format,C=(N||Go)({...$s(O,{format:N}),account:r?We(r):void 0,accessList:o,authorizationList:n,blobs:a,blobVersionedHashes:s,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:S,to:k,type:T,value:P},"fillTransaction");try{let D=await e.request({method:"eth_fillTransaction",params:[C]}),H=(i?.formatters?.transaction?.format||Ni)(D.tx);delete H.blockHash,delete H.blockNumber,delete H.r,delete H.s,delete H.transactionIndex,delete H.v,delete H.yParity,H.data=H.input,H.gas&&(H.gas=t.gas??H.gas),H.gasPrice&&(H.gasPrice=t.gasPrice??H.gasPrice),H.maxFeePerBlobGas&&(H.maxFeePerBlobGas=t.maxFeePerBlobGas??H.maxFeePerBlobGas),H.maxFeePerGas&&(H.maxFeePerGas=t.maxFeePerGas??H.maxFeePerGas),H.maxPriorityFeePerGas&&(H.maxPriorityFeePerGas=t.maxPriorityFeePerGas??H.maxPriorityFeePerGas),typeof H.nonce<"u"&&(H.nonce=t.nonce??H.nonce);let Z=await(async()=>{if(typeof i?.fees?.baseFeeMultiplier=="function"){let m=await oe(e,er,"getBlock")({});return i.fees.baseFeeMultiplier({block:m,client:e,request:t})}return i?.fees?.baseFeeMultiplier??1.2})();if(Z<1)throw new tf;let I=10**(Z.toString().split(".")[1]?.length??0),l=m=>m*BigInt(Math.round(Z*I))/BigInt(I);return H.feePayerSignature||(H.maxFeePerGas&&!t.maxFeePerGas&&(H.maxFeePerGas=l(H.maxFeePerGas)),H.gasPrice&&!t.gasPrice&&(H.gasPrice=l(H.gasPrice))),{raw:D.raw,transaction:{from:C.from,...H},...D.capabilities?{capabilities:D.capabilities}:{}}}catch(D){throw H4(D,{...t,chain:e.chain})}}var fV=["blobVersionedHashes","chainId","fees","gas","nonce","type"],V4=new Map,u2=new Uo(128);async function Bg(e,t){let r=t;r.account??=e.account,r.parameters??=fV;let{account:o,chain:n=e.chain,nonceManager:i,parameters:s}=r,a=(()=>{if(typeof n?.prepareTransactionRequest=="function")return {fn:n.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(n?.prepareTransactionRequest))return {fn:n.prepareTransactionRequest[0],runAt:n.prepareTransactionRequest[1].runAt}})(),c;async function u(){return c||(typeof r.chainId<"u"?r.chainId:n?n.id:(c=await oe(e,af,"getChainId")({}),c))}let f=o&&We(o),d=r.nonce;if(a?.fn&&a.runAt?.includes("beforeFillTransaction")){r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillTransaction"}),d??=r.nonce;let S=r.account??r.from;f=S?We(S):void 0;}if(s.includes("nonce")&&typeof d>"u"&&f&&i){let S=await u();d=await i.consume({address:f.address,chainId:S,client:e});}let h=((s.includes("blobVersionedHashes")||s.includes("sidecars"))&&r.kzg&&r.blobs?false:s.length>0&&"feePayer"in r&&r.feePayer&&!("feePayerSignature"in r&&r.feePayerSignature)?true:u2.get(e.uid)===false||!["fees","gas"].some(N=>s.includes(N))?false:!!(s.includes("chainId")&&typeof r.chainId!="number"||s.includes("nonce")&&typeof d!="number"||s.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||s.includes("gas")&&typeof r.gas!="bigint"))?await oe(e,Pg,"fillTransaction")({...r,nonce:d}).then(S=>{let{chainId:N,from:z,gas:C,gasPrice:D,nonce:q,maxFeePerBlobGas:H,maxFeePerGas:Z,maxPriorityFeePerGas:re,type:I,...l}=S.transaction,m="feeToken"in l?l.feeToken:void 0,y="feePayerSignature"in l&&l.feePayerSignature!==null&&typeof l.feePayerSignature<"u",b=typeof m<"u"&&m!==null&&(!("feeToken"in r)||y);return u2.set(e.uid,true),{...r,...z?{from:z}:{},...I&&!r.type?{type:I}:{},...typeof N<"u"?{chainId:N}:{},...typeof C<"u"?{gas:C}:{},...typeof D<"u"?{gasPrice:D}:{},...typeof q<"u"?{nonce:q}:{},...typeof H<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerBlobGas:H}:{},...typeof Z<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerGas:Z}:{},...typeof re<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxPriorityFeePerGas:re}:{},..."nonceKey"in l&&typeof l.nonceKey<"u"?{nonceKey:l.nonceKey}:{},..."keyAuthorization"in l&&typeof l.keyAuthorization<"u"&&l.keyAuthorization!==null&&!("keyAuthorization"in r)?{keyAuthorization:l.keyAuthorization}:{},..."feePayerSignature"in l&&typeof l.feePayerSignature<"u"&&l.feePayerSignature!==null?{feePayerSignature:l.feePayerSignature}:{},...b?{feeToken:m}:{},...S.capabilities?{_capabilities:S.capabilities}:{}}}).catch(S=>{let N=S;if(N.name!=="TransactionExecutionError")return r;if(N.walk?.(D=>D.name==="ExecutionRevertedError"))throw S;return N.walk?.(D=>{let q=D;return q.name==="MethodNotFoundRpcError"||q.name==="MethodNotSupportedRpcError"||q.message?.includes("eth_fillTransaction is not available")})&&u2.set(e.uid,false),r}):r;d??=h.nonce,r={...h,...f?{from:f?.address}:{},...typeof d<"u"?{nonce:d}:{}};let{blobs:x,gas:w,kzg:k,type:T}=r;a?.fn&&a.runAt?.includes("beforeFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillParameters"}));let P;async function O(){return P||(P=await oe(e,er,"getBlock")({blockTag:"latest"}),P)}if(s.includes("nonce")&&typeof d>"u"&&f&&!i&&(r.nonce=await oe(e,Ag,"getTransactionCount")({address:f.address,blockTag:"pending"})),(s.includes("blobVersionedHashes")||s.includes("sidecars"))&&x&&k){let S=nf({blobs:x,kzg:k});if(s.includes("blobVersionedHashes")){let N=kg({commitments:S,to:"hex"});r.blobVersionedHashes=N;}if(s.includes("sidecars")){let N=of({blobs:x,commitments:S,kzg:k}),z=Og({blobs:x,commitments:S,proofs:N,to:"hex"});r.sidecars=z;}}if(s.includes("chainId")&&(r.chainId=await u()),(s.includes("fees")||s.includes("type"))&&typeof T>"u")try{r.type=Ng(r);}catch{let S=V4.get(e.uid);typeof S>"u"&&(S=typeof(await O())?.baseFeePerGas=="bigint",V4.set(e.uid,S)),r.type=S?"eip1559":"legacy";}if(s.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){let S=await O(),{maxFeePerGas:N,maxPriorityFeePerGas:z}=await Ig(e,{block:S,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<z)throw new Sg({maxPriorityFeePerGas:z});r.maxPriorityFeePerGas=z,r.maxFeePerGas=N;}}else {if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new Os;if(typeof r.gasPrice>"u"){let S=await O(),{gasPrice:N}=await Ig(e,{block:S,chain:n,request:r,type:"legacy"});r.gasPrice=N;}}return s.includes("gas")&&typeof w>"u"&&(r.gas=await oe(e,cf,"estimateGas")({...r,account:f,prepare:f?.type==="local"?[]:["blobVersionedHashes"]})),a?.fn&&a.runAt?.includes("afterFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"afterFillParameters"})),qn(r),delete r.parameters,r}async function cf(e,t){let{account:r=e.account,prepare:o=true}=t,n=r?We(r):void 0,i=(()=>{if(Array.isArray(o))return o;if(n?.type!=="local")return ["blobVersionedHashes"]})();try{let s=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await vg({authorization:t.authorizationList[0]}).catch(()=>{throw new L("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,blockNumber:d,blockTag:g,data:h,gas:x,gasPrice:w,maxFeePerBlobGas:k,maxFeePerGas:T,maxPriorityFeePerGas:P,nonce:O,value:S,stateOverride:N,...z}=o?await Bg(e,{...t,parameters:i,to:s}):t;if(x&&t.gas!==x)return x;let D=(typeof d=="bigint"?K(d):void 0)||g,q=Qu(N);qn(t);let H=e.chain?.formatters?.transactionRequest?.format,re=(H||Go)({...$s(z,{format:H}),account:n,accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,data:h,gasPrice:w,maxFeePerBlobGas:k,maxFeePerGas:T,maxPriorityFeePerGas:P,nonce:O,to:s,value:S},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:q?[re,D??e.experimental_blockTag??"latest",q]:D?[re,D]:[re]}))}catch(s){throw B4(s,{...t,account:n,chain:e.chain})}}async function Z4(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=lt({abi:r,args:n,functionName:i});try{return await oe(e,cf,"estimateGas")({data:`${c}${s?s.replace("0x",""):""}`,to:o,...a})}catch(u){let f=a.account?We(a.account):void 0;throw go(u,{abi:r,address:o,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:f?.address})}}ws();Ps();lr();function dr(e,{args:t,eventName:r}={}){return {...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}Mn();np();Et();Q6();sn();np();cp();wi();var G4="/docs/contract/decodeEventLog";function Wa(e){let{abi:t,data:r,strict:o,topics:n}=e,i=o??true,[s,...a]=n;if(!s)throw new U0({docsPath:G4});let c=t.find(T=>T.type==="event"&&s===bs(nr(T)));if(!(c&&"name"in c)||c.type!=="event")throw new M0(s,{docsPath:G4});let{name:u,inputs:f}=c,d=f?.some(T=>!("name"in T&&T.name)),g=d?[]:{},h=f.map((T,P)=>[T,P]).filter(([T])=>"indexed"in T&&T.indexed),x=[];for(let T=0;T<h.length;T++){let[P,O]=h[T],S=a[T];if(!S){if(i)throw new gs({abiItem:c,param:P});x.push([P,O]);continue}g[d?O:P.name||O]=lV({param:P,value:S});}let w=f.filter(T=>!("indexed"in T&&T.indexed)),k=i?w:[...x.map(([T])=>T),...w];if(k.length>0){if(r&&r!=="0x")try{let T=Ri(k,r);if(T){let P=0;if(!i)for(let[O,S]of x)g[d?S:O.name||S]=T[P++];if(d)for(let O=0;O<f.length;O++)g[O]===void 0&&P<T.length&&(g[O]=T[P++]);else for(let O=0;O<w.length;O++)g[w[O].name]=T[P++];}}catch(T){if(i)throw T instanceof lu||T instanceof gu?new _i({abiItem:c,data:r,params:k,size:$e(r)}):T}else if(i)throw new _i({abiItem:c,data:"0x",params:k,size:0})}return {eventName:u,args:Object.values(g).length>0?g:void 0}}function lV({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ri([e],t)||[])[0]}function uf(e){let{abi:t,args:r,logs:o,strict:n=true}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),s=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:bs(a)}));return o.map(a=>{let c=typeof a.blockNumber=="string"?dr(a):a,u=s.filter(g=>c.topics[0]===g.selector);if(u.length===0)return null;let f,d;for(let g of u)try{f=Wa({...c,abi:[g.abi],strict:!0}),d=g;break}catch{}if(!f&&!n){d=u[0];try{f=Wa({data:c.data,topics:c.topics,abi:[d.abi],strict:!1});}catch{let g=d.abi.inputs?.some(h=>!("name"in h&&h.name));return {...c,args:g?[]:{},eventName:d.abi.name}}}return !f||!d||i&&!i.includes(f.eventName)||!dV({args:f.args,inputs:d.abi.inputs,matchArgs:r})?null:{...f,...c}}).filter(Boolean)}function dV(e){let{args:t,inputs:r,matchArgs:o}=e;if(!o)return true;if(!t)return false;function n(i,s,a){try{return i.type==="address"?zr(s,a):i.type==="string"||i.type==="bytes"?qe(qr(s))===a:s===a}catch{return false}}return Array.isArray(t)&&Array.isArray(o)?o.every((i,s)=>{if(i==null)return true;let a=r[s];return a?(Array.isArray(i)?i:[i]).some(u=>n(a,u,t[s])):false}):typeof t=="object"&&!Array.isArray(t)&&typeof o=="object"&&!Array.isArray(o)?Object.entries(o).every(([i,s])=>{if(s==null)return true;let a=r.find(u=>u.name===i);return a?(Array.isArray(s)?s:[s]).some(u=>n(a,u,t[i])):false}):false}Ae();async function ff(e,{address:t,blockHash:r,fromBlock:o,toBlock:n,event:i,events:s,args:a,strict:c}={}){let u=c??false,f=s??(i?[i]:void 0),d=[];f&&(d=[f.flatMap(w=>jo({abi:[w],eventName:w.name,args:s?void 0:a}))],i&&(d=d[0]));let g;r?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof o=="bigint"?K(o):o,toBlock:typeof n=="bigint"?K(n):n}]});let h=g.map(x=>dr(x));return f?uf({abi:f,args:a,logs:h,strict:u}):h}async function Cg(e,t){let{abi:r,address:o,args:n,blockHash:i,eventName:s,fromBlock:a,toBlock:c,strict:u}=t,f=s?fn({abi:r,name:s}):void 0,d=f?void 0:r.filter(g=>g.type==="event");return oe(e,ff,"getLogs")({address:o,args:n,blockHash:i,event:f,events:d,fromBlock:a,toBlock:c,strict:u})}Pi();jn();zs();async function De(e,t){let{abi:r,address:o,args:n,functionName:i,...s}=t,a=lt({abi:r,args:n,functionName:i});try{let{data:c}=await oe(e,hn,"call")({...s,data:a,to:o});return Lr({abi:r,args:n,functionName:i,data:c||"0x"})}catch(c){throw go(c,{abi:r,address:o,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}ln();Pi();jn();zs();async function C$(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=a.account?We(a.account):e.account,u=lt({abi:r,args:n,functionName:i});try{let{data:f}=await oe(e,hn,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:o,...a,account:c}),d=Lr({abi:r,args:n,functionName:i,data:f||"0x"}),g=r.filter(h=>"name"in h&&h.name===t.functionName);return {result:d,request:{abi:g,address:o,args:n,dataSuffix:s,functionName:i,...a,account:c}}}catch(f){throw go(f,{abi:r,address:o,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}Et();Fu();var ry=new Map,P2=new Map,CV=0;function Ur(e,t,r){let o=++CV,n=()=>ry.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){ry.delete(e),P2.delete(e);return}ry.set(e,d);},s=()=>{let f=n();if(!f.some(g=>g.id===o))return;let d=P2.get(e);if(f.length===1&&d){let g=d();g instanceof Promise&&g.catch(()=>{});}i();},a=n();if(ry.set(e,[...a,{id:o,fns:t}]),a&&a.length>0)return s;let c={};for(let f in t)c[f]=((...d)=>{let g=n();if(g.length!==0)for(let h of g)h.fns[f]?.(...d);});let u=r(c);return typeof u=="function"&&P2.set(e,u),s}ho();async function ec(e,{signal:t}={}){return new Promise((r,o)=>{if(t?.aborted){o(wr(t));return}let n=()=>t?.removeEventListener("abort",s),i=setTimeout(()=>{n(),r();},e),s=()=>{clearTimeout(i),n(),o(wr(t));};t?.addEventListener("abort",s,{once:true});})}function Ko(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let n=true,i=()=>n=false;return (async()=>{let a;t&&(a=await e({unpoll:i}));let c=await r?.(a)??o;await ec(c);let u=async()=>{n&&(await e({unpoll:i}),await ec(o),u());};u();})(),i}Pr();var zV=new Map,LV=new Map;function z$(e){let t=(n,i)=>({clear:()=>i.delete(n),get:()=>i.get(n),set:s=>i.set(n,s)}),r=t(e,zV),o=t(e,LV);return {clear:()=>{r.clear(),o.clear();},promise:r,response:o}}async function L$(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=z$(t),n=o.response.get();if(n&&r>0&&Date.now()-n.created.getTime()<r)return n.data;let i=o.promise.get();i||(i=e(),o.promise.set(i));try{let s=await i;return o.response.set({created:new Date,data:s}),s}finally{o.promise.clear();}}var UV=e=>`blockNumber.${e}`;async function Yn(e,{cacheTime:t=e.cacheTime}={}){let r=await L$(()=>e.request({method:"eth_blockNumber"}),{cacheKey:UV(e.uid),cacheTime:t});return BigInt(r)}async function Ls(e,{filter:t}){let r="strict"in t&&t.strict,o=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof o[0]=="string")return o;let n=o.map(i=>dr(i));return !("abi"in t)||!t.abi?n:uf({abi:t.abi,logs:n,strict:r})}async function Us(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function U$(e,t){let{abi:r,address:o,args:n,batch:i=true,eventName:s,fromBlock:a,onError:c,onLogs:u,poll:f,pollingInterval:d=e.pollingInterval,strict:g}=t;return (typeof f<"u"?f:typeof a=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{let k=g??false,T=Be(["watchContractEvent",o,n,i,e.uid,s,d,k,a]);return Ur(T,{onLogs:u,onError:c},P=>{let O;a!==void 0&&(O=a-1n);let S,N=false,z=Ko(async()=>{if(!N){try{S=await oe(e,Q0,"createContractEventFilter")({abi:r,address:o,args:n,eventName:s,strict:k,fromBlock:a});}catch{}N=true;return}try{let C;if(S)C=await oe(e,Ls,"getFilterChanges")({filter:S});else {let D=await oe(e,Yn,"getBlockNumber")({});O&&O<D?C=await oe(e,Cg,"getContractEvents")({abi:r,address:o,args:n,eventName:s,fromBlock:O+1n,toBlock:D,strict:k}):C=[],O=D;}if(C.length===0)return;if(i)P.onLogs(C);else for(let D of C)P.onLogs([D]);}catch(C){S&&C instanceof Vn&&(N=false),P.onError?.(C);}},{emitOnBegin:true,interval:d});return async()=>{S&&await oe(e,Us,"uninstallFilter")({filter:S}),z();}})})():(()=>{let k=g??false,T=Be(["watchContractEvent",o,n,i,e.uid,s,d,k]),P=true,O=()=>P=false;return Ur(T,{onLogs:u,onError:c},S=>((async()=>{try{let N=(()=>{if(e.transport.type==="fallback"){let D=e.transport.transports.find(q=>q.config.type==="webSocket"||q.config.type==="ipc");return D?D.value:e.transport}return e.transport})(),z=s?jo({abi:r,eventName:s,args:n}):[],{unsubscribe:C}=await N.subscribe({params:["logs",{address:o,topics:z}],onData(D){if(!P)return;let q=D.result;try{let{eventName:H,args:Z}=Wa({abi:r,data:q.data,topics:q.topics,strict:g}),re=dr(q,{args:Z,eventName:H});S.onLogs([re]);}catch(H){let Z,re;if(H instanceof _i||H instanceof gs){if(g)return;Z=H.abiItem.name,re=H.abiItem.inputs?.some(l=>!("name"in l&&l.name));}let I=dr(q,{args:re?[]:{},eventName:Z});S.onLogs([I]);}},onError(D){S.onError?.(D);}});O=C,P||O();}catch(N){c?.(N);}})(),()=>O()))})()}Te();var _p=class extends L{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
68
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"});}};async function M$(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}ho();function Ep(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>true,signal:n}={}){return new Promise((i,s)=>{let a=async({count:c=0}={})=>{if(n?.aborted){s(wr(n));return}let u=async({error:f})=>{let d=typeof t=="function"?t({count:c,error:f}):t;if(d)try{await ec(d,{signal:n});}catch(g){s(g);return}return a({count:c+1})};try{let f=await e();i(f);}catch(f){if(n?.aborted){s(wr(n));return}if(dn(f)){s(f);return}if(c<r&&await o({count:c,error:f}))return u({error:f});s(f);}};a().catch(s);})}ur();_g();var MV={"0x0":"reverted","0x1":"success"};function tc(e,t){let r={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>dr(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?vt(e.transactionIndex):null,status:e.status?MV[e.status]:null,type:e.type?a2[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}var D$=Yu("transactionReceipt",tc);ln();var ny=256,oy;function iy(e=11){if(!oy||ny+e>256*2){oy="",ny=0;for(let t=0;t<256;t++)oy+=(256+Math.random()*256|0).toString(16).substring(1);}return oy.substring(ny,ny+++e)}function F$(e){let{batch:t,chain:r,ccipRead:o,dataSuffix:n,key:i="base",name:s="Base Client",tokens:a,type:c="base"}=e,u=e.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),f=r?.blockTime??12e3,d=Math.min(Math.max(Math.floor(f/2),500),4e3),g=e.pollingInterval??d,h=e.cacheTime??g,x=e.account?We(e.account):void 0,{config:w,request:k,value:T}=e.transport({account:x,chain:r,pollingInterval:g}),P={...w,...T},O={account:x,batch:t,cacheTime:h,ccipRead:o,chain:r,dataSuffix:n,key:i,name:s,pollingInterval:g,request:k,tokens:a,transport:P,type:c,uid:iy(),...u?{experimental_blockTag:u}:{}};function S(N){return z=>{let C=z(N);for(let q in O)delete C[q];let D={...N,...C};for(let q in C){let H=N[q],Z=C[q];j$(H)&&j$(Z)&&(D[q]={...H,...Z});}return Object.assign(D,{extend:S(D)})}}return Object.assign(O,{extend:S(O)})}function j$(e){if(typeof e!="object"||e===null)return false;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Sp(e,t){let r=(o={})=>t(e,o);for(let o of ["call","calls","callWithPeriod","estimateGas","prepare","prepareRecipient","predict","simulate"])if(Object.hasOwn(t,o)){let n=t[o];r[o]=(i={})=>n.length===1?n(i):n(e,i);}for(let o of ["extractEvent","extractEvents"])Object.hasOwn(t,o)&&(r[o]=t[o]);return r}mn();Pi();jn();Ai();Qa();sn();rp();Ae();Te();Ti();function bf(e){if(!(e instanceof L))return false;let t=e.walk(r=>r instanceof ja);return t instanceof ja?t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile":false}wp();cn();lr();Ae();Mn();po();function sy(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return St(t)?t:null}function Ip(e){let t=new Uint8Array(32).fill(0);if(!e)return Le(t);let r=e.split(".");for(let o=r.length-1;o>=0;o-=1){let n=sy(r[o]),i=n?qr(n):qe(Un(r[o]),"bytes");t=qe(Mo([t,i]),"bytes");}return Le(t)}lr();function H$(e){return `[${e.slice(2)}]`}lr();Ae();Mn();function V$(e){let t=new Uint8Array(32).fill(0);return e?sy(e)||qe(Un(e)):Le(t)}function xf(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(Un(t).byteLength+2),o=0,n=t.split(".");for(let i=0;i<n.length;i++){let s=Un(n[i]);s.byteLength>255&&(s=Un(H$(V$(n[i])))),r[o]=s.length,r.set(s,o+1),o+=s.length+1;}return r.byteLength!==o+1?r.slice(0,o+1):r}async function Z$(e,t){let{blockNumber:r,blockTag:o,coinType:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Jn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(g=>i.endsWith(g)))return null;let d=n!=null?[Ip(i),BigInt(n)]:[Ip(i)];try{let g=lt({abi:w2,functionName:"addr",args:d}),h={address:u,abi:qg,functionName:"resolveWithGateways",args:[ft(xf(i)),g,s??[zi]],blockNumber:r,blockTag:o},w=await oe(e,De,"readContract")(h);if(w[0]==="0x")return null;let k=DV({coinType:n,data:w[0],args:d});return k==="0x"||Gr(k)==="0x00"?null:k}catch(g){if(a)throw g;if(bf(g))return null;throw g}}function DV({coinType:e,data:t,args:r}){try{return Lr({abi:w2,args:r,functionName:"addr",data:t})}catch(o){if(e==null)throw o;let n=Gr(t);if($e(n)===20)return Dn(n);throw o}}Te();var ay=class extends L{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"});}},Ms=class extends L{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"});}},vf=class extends L{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"});}},cy=class extends L{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"});}};var jV=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,FV=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,HV=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,VV=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function ZV(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?false:new Promise(r=>{let o=new Image;o.onload=()=>{r(true);},o.onerror=()=>{r(false);},o.src=e;})}}function G$(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function B2({uri:e,gatewayUrls:t}){let r=HV.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=G$(t?.ipfs,"https://ipfs.io"),n=G$(t?.arweave,"https://arweave.net"),i=e.match(jV),{protocol:s,subpath:a,target:c,subtarget:u=""}=i?.groups||{},f=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||FV.test(e);if(e.startsWith("http")&&!f&&!d){let h=e;return t?.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:h,isOnChain:false,isEncoded:false}}if((f||d)&&c)return {uri:`${o}/${f?"ipns":"ipfs"}/${c}${u}`,isOnChain:false,isEncoded:false};if(s==="ar:/"&&c)return {uri:`${n}/${c}${u||""}`,isOnChain:false,isEncoded:false};let g=e.replace(VV,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return {uri:g,isOnChain:true,isEncoded:false};throw new vf({uri:e})}function C2(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new ay({data:e});return e.image||e.image_url||e.image_data}async function q$({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await uy({gatewayUrls:e,uri:C2(r)})}catch{throw new vf({uri:t})}}async function uy({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=B2({uri:t,gatewayUrls:e});if(o||await ZV(r))return r;throw new vf({uri:t})}function W$(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,o,n]=t.split("/"),[i,s]=r.split(":"),[a,c]=o.split(":");if(!i||i.toLowerCase()!=="eip155")throw new Ms({reason:"Only EIP-155 supported"});if(!s)throw new Ms({reason:"Chain ID not found"});if(!c)throw new Ms({reason:"Contract address not found"});if(!n)throw new Ms({reason:"Token ID not found"});if(!a)throw new Ms({reason:"ERC namespace not found"});return {chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:n}}async function K$(e,{nft:t}){if(t.namespace==="erc721")return De(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return De(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new cy({namespace:t.namespace})}async function J$(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?GV(e,{gatewayUrls:t,record:r}):uy({uri:r,gatewayUrls:t})}async function GV(e,{gatewayUrls:t,record:r}){let o=W$(r),n=await K$(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:a}=B2({uri:n,gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){let u=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(u);return uy({uri:C2(f),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),q$({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}mn();Pi();jn();Qa();Ae();wp();async function fy(e,t){let{blockNumber:r,blockTag:o,key:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Jn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(d=>i.endsWith(d)))return null;try{let d={address:u,abi:qg,args:[ft(xf(i)),lt({abi:v2,functionName:"text",args:[Ip(i),n]}),s??[zi]],functionName:"resolveWithGateways",blockNumber:r,blockTag:o},h=await oe(e,De,"readContract")(d);if(h[0]==="0x")return null;let x=Lr({abi:v2,functionName:"text",data:h[0]});return x===""?null:x}catch(d){if(a)throw d;if(bf(d))return null;throw d}}async function Y$(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await oe(e,fy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await J$(e,{record:c,gatewayUrls:o})}catch{return null}}mn();Qa();wp();async function X$(e,t){let{address:r,blockNumber:o,blockTag:n,coinType:i=60n,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Jn({blockNumber:o,chain:c,contract:"ensUniversalResolver"})})();try{let f={address:u,abi:y$,args:[r,i,s??[zi]],functionName:"reverseWithGateways",blockNumber:o,blockTag:n},d=oe(e,De,"readContract"),[g]=await d(f);return g||null}catch(f){if(a)throw f;if(bf(f))return null;throw f}}Qa();Ae();async function Q$(e,t){let{blockNumber:r,blockTag:o,name:n}=t,{chain:i}=e,s=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return Jn({blockNumber:r,chain:i,contract:"ensUniversalResolver"})})(),a=i?.ensTlds;if(a&&!a.some(u=>n.endsWith(u)))throw new Error(`${n} is not a valid ENS TLD (${a?.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);let[c]=await oe(e,De,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ft(xf(n))],blockNumber:r,blockTag:o});return c}zs();ln();Te();Ae();A2();dp();Xu();Za();async function e8(e,t){let{account:r=e.account,blockNumber:o,blockTag:n="latest",blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h,...x}=t,w=r?We(r):void 0;try{qn(t);let T=(typeof o=="bigint"?K(o):void 0)||n,P=e.chain?.formatters?.transactionRequest?.format,S=(P||Go)({...$s(x,{format:P}),account:w,blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h},"createAccessList"),N=await e.request({method:"eth_createAccessList",params:[S,T]});if(N.error)throw new L(N.error,{details:N.error});return {accessList:N.accessList,gasUsed:BigInt(N.gasUsed)}}catch(k){throw Jg(k,{...t,account:w,chain:e.chain})}}async function t8(e){let t=_s(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return {id:r,request:t(r),type:"block"}}Ae();async function ly(e,{address:t,args:r,event:o,events:n,fromBlock:i,strict:s,toBlock:a}={}){let c=n??(o?[o]:void 0),u=_s(e,{method:"eth_newFilter"}),f=[];c&&(f=[c.flatMap(h=>jo({abi:[h],eventName:h.name,args:r}))],o&&(f=f[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?K(i):i,toBlock:typeof a=="bigint"?K(a):a,...f.length?{topics:f}:{}}]});return {abi:c,args:r,eventName:o?o.name:void 0,fromBlock:i,id:d,request:u(d),strict:!!s,toBlock:a,type:"event"}}async function dy(e){let t=_s(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return {id:r,request:t(r),type:"transaction"}}mn();Pi();jn();qa();zs();async function r8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n=e.experimental_blockTag??"latest",requireCanonical:i}){let s=An({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});if(e.batch?.multicall&&e.chain?.contracts?.multicall3){let c=e.chain.contracts.multicall3.address,u=lt({abi:bo,functionName:"getEthBalance",args:[t]}),{data:f}=await oe(e,hn,"call")({to:c,data:u,blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return Lr({abi:bo,functionName:"getEthBalance",args:[t],data:f||"0x"})}let a=await e.request({method:"eth_getBalance",params:[t,s]});return BigInt(a)}async function n8(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}Ae();async function o8(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}={}){let n=r!==void 0?K(r):void 0,i=await e.request({method:"eth_getBlockReceipts",params:[t||n||o]},{dedupe:!!(t||n)});if(!i)throw new Ns({blockHash:t,blockNumber:r});let s=e.chain?.formatters?.transactionReceipt?.format||tc;return i.map(a=>s(a,"getBlockReceipts"))}ur();Ae();async function i8(e,{blockHash:t,blockNumber:r,blockTag:o="latest"}={}){let n=r!==void 0?K(r):void 0,i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:true}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[n||o]},{dedupe:!!n}),vt(i)}qa();async function rc(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=An({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getCode",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});if(a!=="0x")return a}Ai();sn();vs();async function s8(e,{address:t,blockNumber:r,blockTag:o="latest"}){let n=await rc(e,{address:t,...r!==void 0?{blockNumber:r}:{blockTag:o}});if(n&&$e(n)===23&&n.startsWith("0xef0100"))return Dn(un(n,3,23))}Te();var py=class extends L{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"});}};async function a8(e,t){let{address:r,factory:o,factoryData:n}=t;try{let[i,s,a,c,u,f,d]=await oe(e,De,"readContract")({abi:qV,address:r,functionName:"eip712Domain",factory:o,factoryData:n});return {domain:{name:s,version:a,chainId:Number(c),verifyingContract:u,salt:f},extensions:d,fields:i}}catch(i){let s=i;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new py({address:r}):s}}var qV=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];Ae();function c8(e){return {baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function u8(e,{blockCount:t,blockNumber:r,blockTag:o="latest",rewardPercentiles:n}){let i=typeof r=="bigint"?K(r):void 0,s=await e.request({method:"eth_feeHistory",params:[K(t),i||o,n]},{dedupe:!!i});return c8(s)}async function f8(e,{filter:t}){let r=t.strict??false,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>dr(i));return t.abi?uf({abi:t.abi,logs:n,strict:r}):n}qa();jn();Ae();Fn();cn();rp();Ae();s2();Lo();Te();Kg();Zo();Sn();sn();vs();ur();function l8(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:o}=r,n=r.address;if(!Me(n))throw new nt({address:n});if(o<0)throw new Xa({chainId:o})}my(e);}function d8(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new sf;for(let r of t){let o=$e(r),n=vt(un(r,0,1));if(o!==32)throw new Tg({hash:r,size:o});if(n!==1)throw new $g({hash:r,version:n})}}my(e);}function my(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:o,to:n}=e;if(t<=0)throw new Xa({chainId:t});if(n&&!Me(n))throw new nt({address:n});if(o&&o>ef)throw new Zn({maxFeePerGas:o});if(r&&o&&r>o)throw new Vo({maxFeePerGas:o,maxPriorityFeePerGas:r})}function p8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(t<=0)throw new Xa({chainId:t});if(i&&!Me(i))throw new nt({address:i});if(r||n)throw new L("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>ef)throw new Zn({maxFeePerGas:o})}function m8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(i&&!Me(i))throw new nt({address:i});if(typeof t<"u"&&t<=0)throw new Xa({chainId:t});if(r||n)throw new L("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>ef)throw new Zn({maxFeePerGas:o})}Lo();Fn();Sn();function Ap(e){if(!e||e.length===0)return [];let t=[];for(let r=0;r<e.length;r++){let{address:o,storageKeys:n}=e[r];for(let i=0;i<n.length;i++)if(n[i].length-2!==64)throw new pg({storageKey:n[i]});if(!Me(o,{strict:false}))throw new nt({address:o});t.push([o,n]);}return t}function h8(e,t){let r=Ng(e);return r==="eip1559"?JV(e,t):r==="eip2930"?YV(e,t):r==="eip4844"?KV(e,t):r==="eip7702"?WV(e,t):XV(e,t)}function WV(e,t){let{authorizationList:r,chainId:o,gas:n,nonce:i,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;l8(e);let g=Ap(f),h=g8(r);return st(["0x04",yo([K(o),i?K(i):"0x",u?K(u):"0x",c?K(c):"0x",n?K(n):"0x",s??"0x",a?K(a):"0x",d??"0x",g,h,...wf(e,t)])])}function KV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;d8(e);let g=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof h>"u")){let O=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(z=>Le(z)),S=e.kzg,N=nf({blobs:O,kzg:S});if(typeof g>"u"&&(g=kg({commitments:N})),typeof h>"u"){let z=of({blobs:O,commitments:N,kzg:S});h=Og({blobs:O,commitments:N,proofs:z});}}let x=Ap(f),w=[K(r),n?K(n):"0x",u?K(u):"0x",c?K(c):"0x",o?K(o):"0x",i??"0x",s?K(s):"0x",d??"0x",x,a?K(a):"0x",g??[],...wf(e,t)],k=[],T=[],P=[];if(h)for(let O=0;O<h.length;O++){let{blob:S,commitment:N,proof:z}=h[O];k.push(S),T.push(N),P.push(z);}return st(["0x03",h?yo([w,k,T,P]):yo(w)])}function JV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:f}=e;my(e);let d=Ap(u),g=[K(r),n?K(n):"0x",c?K(c):"0x",a?K(a):"0x",o?K(o):"0x",i??"0x",s?K(s):"0x",f??"0x",d,...wf(e,t)];return st(["0x02",yo(g)])}function YV(e,t){let{chainId:r,gas:o,data:n,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;p8(e);let f=Ap(c),d=[K(r),i?K(i):"0x",u?K(u):"0x",o?K(o):"0x",s??"0x",a?K(a):"0x",n??"0x",f,...wf(e,t)];return st(["0x01",yo(d)])}function XV(e,t){let{chainId:r=0,gas:o,data:n,nonce:i,to:s,value:a,gasPrice:c}=e;m8(e);let u=[i?K(i):"0x",c?K(c):"0x",o?K(o):"0x",s??"0x",a?K(a):"0x",n??"0x"];if(t){let f=(()=>{if(t.v>=35n)return (t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new lg({v:t.v});return h})(),d=Gr(t.r),g=Gr(t.s);u=[...u,K(f),d==="0x00"?"0x":d,g==="0x00"?"0x":g];}else r>0&&(u=[...u,K(r),"0x","0x"]);return yo(u)}function wf(e,t){let r=t??e,{v:o,yParity:n}=r;if(typeof r.r>"u")return [];if(typeof r.s>"u")return [];if(typeof o>"u"&&typeof n>"u")return [];let i=Gr(r.r),s=Gr(r.s);return [typeof n=="number"?n?K(1):"0x":o===0n?"0x":o===1n?K(1):o===27n?"0x":K(1),i==="0x00"?"0x":i,s==="0x00"?"0x":s]}function g8(e){if(!e||e.length===0)return [];let t=[];for(let r of e){let{chainId:o,nonce:n,...i}=r,s=r.address;t.push([o?ft(o):"0x",s,n?ft(n):"0x",...wf({},i)]);}return t}Ai();Ps();async function y8({address:e,authorization:t,signature:r}){return zr(Dn(e),await vg({authorization:t,signature:r}))}Te();Ha();Fu();ho();op();var hy=new Uo(8192);function b8(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(hy.get(r))return hy.get(r);let o=e().finally(()=>hy.delete(r));return hy.set(r,o),o}Pr();function x8(e,t={}){return async(r,o={})=>{let{dedupe:n=false,methods:i,retryDelay:s=150,retryCount:a=3,signal:c,uid:u}={...t,...o},{method:f}=r;if(i?.exclude?.includes(f))throw new ks(new Error("method not supported"),{method:f});if(i?.include&&!i.include.includes(f))throw new ks(new Error("method not supported"),{method:f});if(c?.aborted)throw wr(c);let d=n?eZ(`${u}.${Be(r)}`):void 0;return b8(()=>Ep(async()=>{try{return await e(r,c?{signal:c}:void 0)}catch(g){if(c?.aborted)throw wr(c);if(dn(g))throw g;let h=g;switch(h.code){case Eu.code:throw new Eu(h);case Su.code:throw new Su(h);case Iu.code:throw new Iu(h,{method:r.method});case Au.code:throw new Au(h);case $i.code:throw new $i(h);case Vn.code:throw new Vn(h);case ku.code:throw new ku(h);case Ru.code:throw new Ru(h);case As.code:throw new As(h);case ks.code:throw new ks(h,{method:r.method});case Va.code:throw new Va(h);case Tu.code:throw new Tu(h);case Oi.code:throw new Oi(h);case $u.code:throw new $u(h);case Ou.code:throw new Ou(h);case Nu.code:throw new Nu(h);case Pu.code:throw new Pu(h);case Bu.code:throw new Bu(h);case Cu.code:throw new Cu(h);case zu.code:throw new zu(h);case Lu.code:throw new Lu(h);case Uu.code:throw new Uu(h);case Mu.code:throw new Mu(h);case Du.code:throw new Du(h);case ju.code:throw new ju(h);case 5e3:throw new Oi(h);case Rs.code:throw new Rs(h);default:throw g instanceof L?g:new xg(h)}}},{delay:({count:g,error:h})=>{if(h&&h instanceof Hn){let x=h?.headers?.get("Retry-After");if(x?.match(/\d/))return Number.parseInt(x,10)*1e3}return ~~(1<<g)*s},retryCount:a,signal:c,shouldRetry:({error:g})=>QV(g)}),{enabled:n,id:d})}}function QV(e){return dn(e)?false:"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Va.code||e.code===$i.code||e.code===429:e instanceof Hn&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:true}function eZ(e,t=0){let r=3735928559^t,o=1103547991^t;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);r=Math.imul(r^i,2654435761),o=Math.imul(o^i,1597334677);}return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(o^o>>>16,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(r^r>>>16,3266489909),(4294967296*(2097151&o)+(r>>>0)).toString(36)}function _f(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(o){return n=>{let i=typeof n=="function"?n(o):n,s={...o,...i};return Object.assign(s,{extend:r(s)})}}return Object.assign(t,{extend:r(t)})}ur();Ha();ho();ho();function v8(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:o}){return new Promise((n,i)=>{(async()=>{let s,a=new AbortController;try{r>0&&(s=setTimeout(()=>{o?a.abort():i(t);},r)),n(await e({signal:a?.signal||null}));}catch(c){if(a?.signal.aborted&&dn(c)){i(t);return}i(c);}finally{clearTimeout(s);}})();})}Pr();function tZ(){return {current:0,take(){return this.current++},reset(){this.current=0;}}}var z2=tZ();var rZ=10485760;function w8(e,t={}){let{url:r,headers:o}=oZ(e);return {async request(n){let{body:i,fetchFn:s=t.fetchFn??fetch,maxResponseBodySize:a=t.maxResponseBodySize??rZ,onRequest:c=t.onRequest,onResponse:u=t.onResponse,timeout:f=t.timeout??1e4}=n,d={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:g,method:h,signal:x}=d;try{let w=await v8(async({signal:P})=>{let O={...d,body:Array.isArray(i)?Be(i.map(C=>({jsonrpc:"2.0",id:C.id??z2.take(),...C}))):Be({jsonrpc:"2.0",id:i.id??z2.take(),...i}),headers:{...o,"Content-Type":"application/json",...g},method:h||"POST",signal:x||(f>0?P:null)},S=new Request(r,O),N=await c?.(S,O)??{...O,url:r};return await s(N.url??r,N)},{errorInstance:new up({body:i,url:r}),timeout:f,signal:!0});u&&await u(w);let k,T=await nZ(w,{maxResponseBodySize:a});if(w.headers.get("Content-Type")?.startsWith("application/json"))k=JSON.parse(T);else {k=T;try{k=JSON.parse(k||"{}");}catch(P){if(w.ok)throw P;k={error:k};}}if(!w.ok){if(typeof k.error?.code=="number"&&typeof k.error?.message=="string")return k;throw new Hn({body:i,details:Be(k.error)||w.statusText,headers:w.headers,status:w.status,url:r})}return k}catch(w){throw x?.aborted?wr(x):dn(w)||w instanceof Hn||w instanceof Fa||w instanceof up?w:new Hn({body:i,cause:w,url:r})}}}}async function nZ(e,{maxResponseBodySize:t}){if(t===false)return e.text();let r=e.headers.get("Content-Length");if(r){let a=Number(r);if(a>t)throw new Fa({maxSize:t,size:a})}if(!e.body){let a=await e.text(),c=new TextEncoder().encode(a).length;if(c>t)throw new Fa({maxSize:t,size:c});return a}let o=e.body.getReader(),n=new TextDecoder,i="",s=0;try{for(;;){let{done:a,value:c}=await o.read();if(a)break;if(s+=c.byteLength,s>t)throw await o.cancel(),new Fa({maxSize:t,size:s});i+=n.decode(c,{stream:!0});}return i+=n.decode(),i}finally{o.releaseLock();}}function oZ(e){try{let t=new URL(e),r=(()=>{if(t.username){let o=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(o)}`}}}})();return {url:t.toString(),...r}}catch{return {url:e}}}Mn();var _8=`Ethereum Signed Message:
69
+ `;cn();sn();Ae();function E8(e){let t=typeof e=="string"?Si(e):typeof e.raw=="string"?e.raw:Le(e.raw),r=Si(`${_8}${$e(t)}`);return Mo([r,t])}function gy(e,t){return qe(E8(e),t)}ki();cn();Ae();Mn();Et();Lo();Pr();Te();var yy=class extends L{constructor({domain:t}){super(`Invalid domain "${Be(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},by=class extends L{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]});}},xy=class extends L{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}},vy=class extends L{constructor({type:t}){let r=t.replace(/^(u?int)/,"$&256");super(`Type "${t}" is not a valid EIP-712 type.`,{metaMessages:[`Use "${r}" instead.`],name:"InvalidTypedDataTypeError"});}};Sn();sn();Ae();W6();function S8(e){let{domain:t,message:r,primaryType:o,types:n}=e,i=(s,a)=>{for(let c of s){let{name:u,type:f}=c,d=a[u],g=f.replace(/(\[[0-9]*\])+$/,"");if(g==="int"||g==="uint")throw new vy({type:f});let h=f.match(X0);if(h&&(typeof d=="number"||typeof d=="bigint")){let[k,T,P]=h;K(d,{signed:T==="int",size:Number.parseInt(P,10)/8});}if(f==="address"&&typeof d=="string"&&!Me(d))throw new nt({address:d});let x=f.match(c4);if(x){let[k,T]=x;if(T&&$e(d)!==Number.parseInt(T,10))throw new F0({expectedSize:Number.parseInt(T,10),givenSize:$e(d)})}let w=n[f];w&&(iZ(f),i(w,d));}};if(n.EIP712Domain&&t){if(typeof t!="object")throw new yy({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new by({primaryType:o,types:n})}function I8({domain:e}){return [typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function iZ(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new xy({type:e})}function A8(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:I8({domain:t}),...e.types};S8({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(sZ({domain:t,types:n})),o!=="EIP712Domain"&&i.push(k8({data:r,primaryType:o,types:n})),qe(Mo(i))}function sZ({domain:e,types:t}){return k8({data:e,primaryType:"EIP712Domain",types:t})}function k8({data:e,primaryType:t,types:r}){let o=R8({data:e,primaryType:t,types:r});return qe(o)}function R8({data:e,primaryType:t,types:r}){let o=[{type:"bytes32"}],n=[aZ({primaryType:t,types:r})];for(let i of r[t]){let[s,a]=$8({types:r,name:i.name,type:i.type,value:e[i.name]});o.push(s),n.push(a);}return Wr(o,n)}function aZ({primaryType:e,types:t}){let r=ft(cZ({primaryType:e,types:t}));return qe(r)}function cZ({primaryType:e,types:t}){let r="",o=T8({primaryType:e,types:t});o.delete(e);let n=[e,...Array.from(o).sort()];for(let i of n)r+=`${i}(${t[i].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return r}function T8({primaryType:e,types:t},r=new Set){let n=e.match(/^\w*/u)?.[0];if(r.has(n)||t[n]===void 0)return r;r.add(n);for(let i of t[n])T8({primaryType:i.type,types:t},r);return r}function $8({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},qe(R8({data:o,primaryType:r,types:e}))];if(r==="bytes")return [{type:"bytes32"},qe(o)];if(r==="string")return [{type:"bytes32"},qe(ft(o))];if(r.lastIndexOf("]")===r.length-1){let n=r.slice(0,r.lastIndexOf("[")),i=o.map(s=>$8({name:t,type:n,types:e,value:s}));return [{type:"bytes32"},qe(Wr(i.map(([s])=>s),i.map(([,s])=>s)))]}return [{type:r},o]}var Np={};Er(Np,{InvalidWrappedSignatureError:()=>Cy,assert:()=>zy,from:()=>HZ,magicBytes:()=>cE,suffixParameters:()=>uE,unwrap:()=>Y8,validate:()=>ZZ,wrap:()=>VZ});fu();Bs();var wy=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o);}return this}};var uZ={checksum:new wy(8192)},_y=uZ.checksum;pn();Yh();Bs();pr();function nc(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=Na(s$(e));return r==="Bytes"?o:It(o)}Bs();pn();pr();hp();function O8(e,t={}){let{compressed:r}=t,{prefix:o,x:n,y:i}=e;if(r===false||typeof n=="bigint"&&typeof i=="bigint"){if(o!==4)throw new Ey({prefix:o,cause:new D2});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new Ey({prefix:o,cause:new M2});return}throw new U2({publicKey:e})}function N8(e){let t=(()=>{if(yp(e))return P8(e);if(d$(e))return lZ(e);let{prefix:r,x:o,y:n}=e;return typeof o=="bigint"&&typeof n=="bigint"?{prefix:r??4,x:o,y:n}:{prefix:r,x:o}})();return O8(t),t}function lZ(e){return P8(It(e))}function P8(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new j2({publicKey:e});if(e.length===130){let o=BigInt(pt(e,0,32)),n=BigInt(pt(e,32,64));return {prefix:4,x:o,y:n}}if(e.length===132){let o=Number(pt(e,0,1)),n=BigInt(pt(e,1,33)),i=BigInt(pt(e,33,65));return {prefix:o,x:n,y:i}}let t=Number(pt(e,0,1)),r=BigInt(pt(e,1,33));return {prefix:t,x:r}}function F2(e,t={}){O8(e);let{prefix:r,x:o,y:n}=e,{includePrefix:i=true}=t;return ht(i?Ve(r,{size:1}):"0x",Ve(o,{size:32}),typeof n=="bigint"?Ve(n,{size:32}):"0x")}var U2=class extends de{constructor({publicKey:t}){super(`Value \`${Cs(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidError"});}},Ey=class extends de{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidPrefixError"});}},M2=class extends de{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidCompressedPrefixError"});}},D2=class extends de{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidUncompressedPrefixError"});}},j2=class extends de{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${dt(hf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidSerializedSizeError"});}};var dZ=/^0x[a-fA-F0-9]{40}$/;function oc(e,t={}){let{strict:r=true}=t;if(!dZ.test(e))throw new Sy({address:e,cause:new H2});if(r){if(e.toLowerCase()===e)return;if(Iy(e)!==e)throw new Sy({address:e,cause:new V2})}}function Iy(e){if(_y.has(e))return _y.get(e);oc(e,{strict:false});let t=e.substring(2).toLowerCase(),r=nc(a$(t),{as:"Bytes"}),o=t.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let n=`0x${o.join("")}`;return _y.set(e,n),n}function pZ(e,t={}){let{checksum:r=false}=t;return oc(e),r?Iy(e):e}function C8(e,t={}){let r=nc(`0x${F2(e).slice(4)}`).substring(26);return pZ(`0x${r}`,t)}function Ay(e,t={}){let{strict:r=true}=t??{};try{return oc(e,{strict:r}),!0}catch{return false}}var Sy=class extends de{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidAddressError"});}},H2=class extends de{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidInputError"});}},V2=class extends de{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidChecksumError"});}};Bs();pn();pr();Bs();pn();pr();var z8=/^(.*)\[([0-9]*)\]$/,L8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ry=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Z2=2n**256n-1n;function ic(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=W2(t.type);if(i){let[s,a]=i;return hZ(e,{...t,type:a},{checksumAddress:o,length:s,staticPosition:n})}if(t.type==="tuple")return xZ(e,t,{checksumAddress:o,staticPosition:n});if(t.type==="address")return mZ(e,{checksum:o});if(t.type==="bool")return gZ(e);if(t.type.startsWith("bytes"))return yZ(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return bZ(e,t);if(t.type==="string")return vZ(e,{staticPosition:n});throw new Sf(t.type)}var M8=32,G2=32;function mZ(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?Iy(i):i)(It(c$(o,-20))),32]}function hZ(e,t,r){let{checksumAddress:o,length:n,staticPosition:i}=r;if(n===null){let c=qo(e.readBytes(G2)),u=i+c,f=u+M8;e.setPosition(u);let d=qo(e.readBytes(M8)),g=Ef(t),h=0,x=[];for(let w=0;w<d;++w){e.setPosition(f+(g?w*32:h));let[k,T]=ic(e,t,{checksumAddress:o,staticPosition:f});h+=T,x.push(k),T===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(i+32),[x,32]}if(Ef(t)){let c=qo(e.readBytes(G2)),u=i+c,f=[];for(let d=0;d<n;++d){e.setPosition(u+d*32);let[g]=ic(e,t,{checksumAddress:o,staticPosition:u});f.push(g);}return e.setPosition(i+32),[f,32]}let s=0,a=[];for(let c=0;c<n;++c){let[u,f]=ic(e,t,{checksumAddress:o,staticPosition:i+s});s+=f,a.push(u),f===0&&(e.assertReadLimit(),e._touch());}return [a,s]}function gZ(e){return [f$(e.readBytes(32),{size:32}),32]}function yZ(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=qo(e.readBytes(32));e.setPosition(r+s);let a=qo(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[It(c),32]}return [It(e.readBytes(Number.parseInt(n,10),32)),32]}function bZ(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?u$(n,{signed:r}):qo(n,{signed:r}),32]}function xZ(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=t.components.length===0||t.components.some(({name:c})=>!c),s=i?[]:{},a=0;if(Ef(t)){let c=qo(e.readBytes(G2)),u=n+c;for(let f=0;f<t.components.length;++f){let d=t.components[f];e.setPosition(u+a);let[g,h]=ic(e,d,{checksumAddress:o,staticPosition:u});a+=h,s[i?f:d?.name]=g;}return e.setPosition(n+32),[s,32]}for(let c=0;c<t.components.length;++c){let u=t.components[c],[f,d]=ic(e,u,{checksumAddress:o,staticPosition:n});s[i?c:u?.name]=f,a+=d;}return [s,a]}function vZ(e,{staticPosition:t}){let r=qo(e.readBytes(32)),o=t+r;e.setPosition(o);let n=qo(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=l$(g2(i));return e.setPosition(t+32),[s,32]}function D8({checksumAddress:e,parameters:t,values:r}){let o=[];for(let n=0;n<t.length;n++)o.push(q2({checksumAddress:e,parameter:t[n],value:r[n]}));return o}function q2({checksumAddress:e=false,parameter:t,value:r}){let o=t,n=W2(o.type);if(n){let[i,s]=n;return _Z(r,{checksumAddress:e,length:i,parameter:{...o,type:s}})}if(o.type==="tuple")return kZ(r,{checksumAddress:e,parameter:o});if(o.type==="address")return wZ(r,{checksum:e});if(o.type==="bool")return SZ(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){let i=o.type.startsWith("int"),[,,s="256"]=Ry.exec(o.type)??[];return IZ(r,{signed:i,size:Number(s)})}if(o.type.startsWith("bytes"))return EZ(r,{type:o.type});if(o.type==="string")return AZ(r);throw new Sf(o.type)}function Ty(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=dt(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(Ve(t+n,{size:32})),o.push(a),n+=dt(a)):r.push(a);}return ht(...r,...o)}function wZ(e,t){let{checksum:r=false}=t;return oc(e,{strict:r}),{dynamic:false,encoded:Ci(e.toLowerCase())}}function _Z(e,t){let{checksumAddress:r,length:o,parameter:n}=t,i=o===null;if(!Array.isArray(e))throw new Oy(e);if(!i&&e.length!==o)throw new $y({expectedLength:o,givenLength:e.length,type:`${n.type}[${o}]`});let s=e.length===0&&Ef(n),a=[];for(let c=0;c<e.length;c++){let u=q2({checksumAddress:r,parameter:n,value:e[c]});u.dynamic&&(s=true),a.push(u);}if(i||s){let c=Ty(a);if(i){let u=Ve(a.length,{size:32});return {dynamic:true,encoded:a.length>0?ht(u,c):u}}if(s)return {dynamic:true,encoded:c}}return {dynamic:false,encoded:ht(...a.map(({encoded:c})=>c))}}function EZ(e,{type:t}){let[,r]=t.split("bytes"),o=dt(e);if(!r){let n=e;return o%32!==0&&(n=Wo(n,Math.ceil((e.length-2)/2/32)*32)),{dynamic:true,encoded:ht(Ci(Ve(o,{size:32})),n)}}if(o!==Number.parseInt(r,10))throw new kp({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:Wo(e)}}function SZ(e){if(typeof e!="boolean")throw new de(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:Ci(Vg(e))}}function IZ(e,{signed:t,size:r}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new gp({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:Ve(e,{size:32,signed:t})}}function AZ(e){let t=gf(e),r=Math.ceil(dt(t)/32),o=[];for(let n=0;n<r;n++)o.push(Wo(pt(t,n*32,(n+1)*32)));return {dynamic:true,encoded:ht(Wo(Ve(dt(t),{size:32})),...o)}}function kZ(e,t){let{checksumAddress:r,parameter:o}=t,n=false,i=[];for(let s=0;s<o.components.length;s++){let a=o.components[s],c=Array.isArray(e)?s:a.name,u=q2({checksumAddress:r,parameter:a,value:e[c]});i.push(u),u.dynamic&&(n=true);}return {dynamic:n,encoded:n?Ty(i):ht(...i.map(({encoded:s})=>s))}}function W2(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Ef(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(Ef);let r=W2(e.type);return !!(r&&Ef({...e,type:r[1]}))}pn();var TZ={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new J2({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new K2({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ny({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Ny({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};function Py(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(TZ);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Ny=class extends de{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.NegativeOffsetError"});}},K2=class extends de{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.PositionOutOfBoundsError"});}},J2=class extends de{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.RecursiveReadLimitExceededError"});}};function sc(e,t,r={}){let{as:o="Array",checksumAddress:n=false}=r,i=typeof t=="string"?mf(t):t,s=Py(i);if(Wn(i)===0&&e.length>0)throw new Q2;if(Wn(i)&&Wn(i)<32)throw new X2({data:typeof t=="string"?t:It(t),parameters:e,size:Wn(i)});let a=0,c=o==="Array"?[]:{};for(let u=0;u<e.length;++u){let f=e[u];a<i.length&&s.setPosition(a);let[d,g]=ic(s,f,{checksumAddress:n,staticPosition:0});a+=g,o==="Array"?c.push(d):c[f.name??u]=d;}return c}function Ds(e,t,r){let{checksumAddress:o=false}={};if(e.length!==t.length)throw new By({expectedLength:e.length,givenLength:t.length});let n=D8({checksumAddress:o,parameters:e,values:t}),i=Ty(n);return i.length===0?"0x":i}function Y2(e,t){if(e.length!==t.length)throw new By({expectedLength:e.length,givenLength:t.length});let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o];r.push(Y2.encode(n,i));}return ht(...r)}(function(e){function t(r,o,n=false){if(r==="address"){let c=o;return oc(c),Ci(c.toLowerCase(),n?32:0)}if(r==="string")return gf(o);if(r==="bytes")return o;if(r==="bool")return Ci(Vg(o),n?32:1);let i=r.match(Ry);if(i){let[c,u,f="256"]=i,d=Number.parseInt(f,10)/8;return Ve(o,{size:n?32:d,signed:u==="int"})}let s=r.match(L8);if(s){let[c,u]=s;if(Number.parseInt(u,10)!==(o.length-2)/2)throw new kp({expectedSize:Number.parseInt(u,10),value:o});return Wo(o,n?32:0)}let a=r.match(z8);if(a&&Array.isArray(o)){let[c,u]=a,f=[];for(let d=0;d<o.length;d++)f.push(t(u,o[d],true));return f.length===0?"0x":ht(...f)}throw new Sf(r)}e.encode=t;})(Y2||(Y2={}));function Tp(e){return Array.isArray(e)&&typeof e[0]=="string"?Gd(e):typeof e=="string"?Gd(e):e}var X2=class extends de{constructor({data:t,parameters:r,size:o}){super(`Data size of ${o} bytes is too small for given parameters.`,{metaMessages:[`Params: (${xi(r)})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.DataSizeTooSmallError"});}},Q2=class extends de{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ZeroDataError"});}},$y=class extends de{constructor({expectedLength:t,givenLength:r,type:o}){super(`Array length mismatch for type \`${o}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ArrayLengthMismatchError"});}},kp=class extends de{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${dt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.BytesSizeMismatchError"});}},By=class extends de{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
70
+ `)),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.LengthMismatchError"});}},Oy=class extends de{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidArrayError"});}},Sf=class extends de{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidTypeError"});}};pr();Bs();pn();pr();function $Z(e,t){let{as:r}=t,o=H8(e),n=Py(new Uint8Array(o.length));return o.encode(n),r==="Hex"?It(n.bytes):n.bytes}function F8(e,t={}){let{as:r="Hex"}=t;return $Z(e,{as:r})}function H8(e){return Array.isArray(e)?OZ(e.map(t=>H8(t))):NZ(e)}function OZ(e){let t=e.reduce((n,i)=>n+i.length,0),r=V8(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function NZ(e){let t=typeof e=="string"?mf(e):e,r=V8(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function V8(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new de("Length is too large.")}pn();pr();hp();function oE(e,t={}){let{recovered:r}=t;if(typeof e.r>"u")throw new $p({signature:e});if(typeof e.s>"u")throw new $p({signature:e});if(r&&typeof e.yParity>"u")throw new $p({signature:e});if(e.r<0n||e.r>Z2)throw new tE({value:e.r});if(e.s<0n||e.s>Z2)throw new rE({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Op({value:e.yParity})}function BZ(e){return Z8(It(e))}function Z8(e){if(e.length!==130&&e.length!==132)throw new eE({signature:e});let t=BigInt(pt(e,0,32)),r=BigInt(pt(e,32,64)),o=(()=>{let n=+`0x${e.slice(130)}`;if(!Number.isNaN(n))try{return aE(n)}catch{throw new Op({value:n})}})();return typeof o>"u"?{r:t,s:r}:{r:t,s:r,yParity:o}}function iE(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return sE(e)}function sE(e){let t=typeof e=="string"?Z8(e):e instanceof Uint8Array?BZ(e):typeof e.r=="string"?zZ(e):e.v?CZ(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return oE(t),t}function CZ(e){return {r:e.r,s:e.s,yParity:aE(e.v)}}function zZ(e){let t=(()=>{let r=e.v?Number(e.v):void 0,o=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof o!="number"&&(o=aE(r)),typeof o!="number")throw new Op({value:e.yParity});return o})();return {r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function G8(e){let{r:t,s:r,yParity:o}=e;return [o?"0x01":"0x",t===0n?"0x":b2(Ve(t)),r===0n?"0x":b2(Ve(r))]}function aE(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new nE({value:e})}var eE=class extends de{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${dt(hf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSerializedSizeError"});}},$p=class extends de{constructor({signature:t}){super(`Signature \`${Cs(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.MissingPropertiesError"});}},tE=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidRError"});}},rE=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSError"});}},Op=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidYParityError"});}},nE=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidVError"});}};function W8(e,t={}){return typeof e.chainId=="string"?LZ(e):{...e,...t.signature}}function LZ(e){let{address:t,chainId:r,nonce:o}=e,n=iE(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function K8(e){return UZ(e,{presign:true})}function UZ(e,t={}){let{presign:r}=t;return nc(ht("0x05",F8(MZ(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function MZ(e){let{address:t,chainId:r,nonce:o}=e,n=iE(e);return [r?Ve(r):"0x",t,o?Ve(o):"0x",...n?G8(n):[]]}pn();pr();ud();pr();function J8(e){return C8(jZ(e))}function jZ(e){let{payload:t,signature:r}=e,{r:o,s:n,yParity:i}=r,a=new xn.Signature(BigInt(o),BigInt(n)).addRecoveryBit(i).recoverPublicKey(hf(t).substring(2));return N8(a)}var cE="0x8010801080108010801080108010801080108010801080108010801080108010",uE=Tp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function zy(e){if(typeof e=="string"){if(pt(e,-32)!==cE)throw new Cy(e)}else oE(e.authorization);}function HZ(e){return typeof e=="string"?Y8(e):e}function Y8(e){zy(e);let t=jg(pt(e,-64,-32)),r=pt(e,-t-64,-64),o=pt(e,0,-t-64),[n,i,s]=sc(uE,r);return {authorization:W8({address:n.delegation,chainId:Number(n.chainId),nonce:n.nonce,yParity:n.yParity,r:n.r,s:n.s}),signature:o,...s&&s!=="0x"?{data:s,to:i}:{}}}function VZ(e){let{data:t,signature:r}=e;zy(e);let o=J8({payload:K8(e.authorization),signature:sE(e.authorization)}),n=Ds(uE,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??o,t??"0x"]),i=Ve(dt(n),{size:32});return ht(r,n,i,cE)}function ZZ(e){try{return zy(e),!0}catch{return false}}var Cy=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc8010.InvalidWrappedSignatureError"});}};ag();function X8(e,t){return sg(e,t)}function GZ(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function Q8(e){return {...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?vt(e.nonce):void 0,storageProof:e.storageProof?GZ(e.storageProof):void 0}}async function eO(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,storageKeys:s}){let a=An({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),c=await e.request({method:"eth_getProof",params:[t,s,a]});return Q8(c)}Fn();async function tO(e,{hash:t}){let r=await e.request({method:"eth_getRawTransactionByHash",params:[t]},{dedupe:true});if(!r)throw new Es({hash:t});return r}qa();async function rO(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,slot:s}){let a=An({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return await e.request({method:"eth_getStorageAt",params:[t,s,a]})}Fn();Ae();async function If(e,{blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i,sender:s,nonce:a}){let c=o||"latest",u=r!==void 0?K(r):void 0,f=null;if(n?f=await e.request({method:"eth_getTransactionByHash",params:[n]},{dedupe:true}):t?f=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,K(i)]},{dedupe:true}):typeof i=="number"?f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,K(i)]},{dedupe:!!u}):s&&typeof a=="number"&&(f=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[s,K(a)]},{dedupe:true})),!f)throw new Es({blockHash:t,blockNumber:r,blockTag:c,hash:n,index:i});return (e.chain?.formatters?.transaction?.format||Ni)(f,"getTransaction")}async function nO(e,{hash:t,transactionReceipt:r}){let[o,n]=await Promise.all([oe(e,Yn,"getBlockNumber")({}),t?oe(e,If,"getTransaction")({hash:t}):void 0]),i=r?.blockNumber||n?.blockNumber;return i?o-i+1n:0n}Fn();async function Af(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:true});if(!r)throw new wu({hash:t});return (e.chain?.formatters?.transactionReceipt?.format||tc)(r,"getTransactionReceipt")}mn();bp();Et();Te();Ti();Pi();jn();Qa();Xg();Pr();async function oO(e,t){let{account:r,authorizationList:o,allowFailure:n=true,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,requireCanonical:u,stateOverride:f}=t,d=t.contracts,g=typeof e.batch?.multicall=="object"?e.batch.multicall:{},h=t.batchSize??g.batchSize??1024,x=t.deployless??g.deployless??false,w=(()=>{if(t.multicallAddress)return t.multicallAddress;if(x)return null;if(e.chain)return Jn({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),k=[[]],T=0,P=0;for(let C=0;C<d.length;C++){let{abi:D,address:q,args:H,functionName:Z}=d[C];try{let re=lt({abi:D,args:H,functionName:Z});P+=(re.length-2)/2,h>0&&P>h&&k[T].length>0&&(T++,P=(re.length-2)/2,k[T]=[]),k[T]=[...k[T],{allowFailure:!0,callData:re,target:q}];}catch(re){let I=go(re,{abi:D,address:q,args:H,docsPath:"/docs/contract/multicall",functionName:Z,sender:r});if(!n)throw I;k[T]=[...k[T],{allowFailure:true,callData:"0x",target:q}];}}let O=!!e.batch?.multicall,S=O?k.flatMap(C=>C.map(D=>[D])):k,N=await Promise.allSettled(S.map(C=>O?qZ(e,{account:r,authorizationList:o,batchSize:h,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,call:C[0],multicallAddress:w,requireCanonical:u,stateOverride:f}).then(D=>[D]):oe(e,De,"readContract")({...w===null?{code:Ja}:{address:w},abi:bo,account:r,args:[C],authorizationList:o,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,functionName:"aggregate3",requireCanonical:u,stateOverride:f}))),z=[];for(let C=0;C<N.length;C++){let D=N[C];if(D.status==="rejected"){if(!n)throw D.reason;for(let H=0;H<S[C].length;H++)z.push({status:"failure",error:D.reason,result:void 0});continue}let q=D.value;for(let H=0;H<q.length;H++){let{returnData:Z,success:re}=q[H],{callData:I}=S[C][H],{abi:l,address:m,functionName:y,args:b}=d[z.length];try{if(I==="0x")throw new Ln;if(!re)throw new Ho({data:Z});let v=Lr({abi:l,args:b,data:Z,functionName:y});z.push(n?{result:v,status:"success"}:v);}catch(v){let E=go(v,{abi:l,address:m,args:b,docsPath:"/docs/contract/multicall",functionName:y});if(!n)throw E;z.push({error:E,result:void 0,status:"failure"});}}}if(z.length!==d.length)throw new L("multicall results mismatch");return z}async function qZ(e,t){let{batchSize:r,call:o,multicallAddress:n,...i}=t,{wait:s=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{schedule:a}=yf({id:Be(["multicall",e.uid,r,n,i]),wait:s,shouldSplitBatch(u){return r===0?false:u.reduce((d,{callData:g})=>d+(g.length-2)/2,0)>r},fn:u=>oe(e,De,"readContract")({...n===null?{code:Ja}:{address:n},...i,abi:bo,args:[u],functionName:"aggregate3"})}),[c]=await a(o);return c}x2();ln();Et();Ti();Zo();Pi();jn();cn();Ae();lp();Xu();Eg();Za();async function kf(e,t){let{blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",blocks:n,returnFullTransactions:i,traceTransfers:s,validation:a}=t;try{let c=[];for(let g of n){let h=g.blockOverrides?Zg(g.blockOverrides):void 0,x=g.calls.map(k=>{let T=k,P=T.account?We(T.account):void 0,O=T.abi?lt(T):T.data,S={...T,account:P,data:T.dataSuffix?Mo([O||"0x",T.dataSuffix]):O,from:T.from??P?.address};return qn(S),Go(S)}),w=g.stateOverrides?Qu(g.stateOverrides):void 0;c.push({blockOverrides:h,calls:x,stateOverrides:w});}let f=(typeof r=="bigint"?K(r):void 0)||o;return (await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:i,traceTransfers:s,validation:a},f]})).map((g,h)=>({...Ga(g),calls:g.calls.map((x,w)=>{let{abi:k,args:T,functionName:P,to:O}=n[h].calls[w],S=x.error?.data??x.returnData,N=BigInt(x.gasUsed),z=x.logs?.map(H=>dr(H)),C=x.status==="0x1"?"success":"failure",D=k&&C==="success"&&S!=="0x"?Lr({abi:k,data:S,functionName:P}):null,q=(()=>{if(C==="success")return;let H;if(S==="0x"?H=new Ln:S&&(H=new Ho({data:S})),!!H)return go(H,{abi:k??[],address:O??"0x",args:T,functionName:P??"<unknown>"})})();return {data:S,gasUsed:N,logs:z,status:C,...C==="success"?{result:D}:{error:q}}})}))}catch(c){let u=c,f=Ts(u,{});throw f instanceof Gn?u:f}}fu();pn();pr();pn();function Uy(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function","error",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new de("Unable to normalize signature.");return n}function Ly(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Ay(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>Ly(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>Ly(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function fE(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return fE(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Ay(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Ay(r[o],{strict:false}):false)return s}}function Rf(e,t={}){let{prepare:r=true}=t,o=Array.isArray(e)?Zd(e):typeof e=="string"?Zd(e):e;return {...o,...r?{hash:js(o)}:{}}}function Tf(e,t,r){let{args:o=[],prepare:n=true}=r??{},i=yp(t,{strict:false}),s=e.filter(u=>i?u.type==="function"||u.type==="error"?dE(u)===pt(t,0,4):u.type==="event"?js(u)===t:false:"name"in u&&u.name===t);if(s.length===0)throw new Li({name:t});if(s.length===1)return {...s[0],...n?{hash:js(s[0])}:{}};let a;for(let u of s){if(!("inputs"in u))continue;if(!o||o.length===0){if(!u.inputs||u.inputs.length===0)return {...u,...n?{hash:js(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==o.length)continue;if(o.every((d,g)=>{let h="inputs"in u&&u.inputs[g];return h?Ly(d,h):false})){if(a&&"inputs"in a&&a.inputs){let d=fE(u.inputs,a.inputs,o);if(d)throw new lE({abiItem:u,type:d[0]},{abiItem:a,type:d[1]})}a=u;}}let c=(()=>{if(a)return a;let[u,...f]=s;return {...u,overloads:f}})();if(!c)throw new Li({name:t});return {...c,...n?{hash:js(c)}:{}}}function dE(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return Tf(r,o)}return e[0]})();return pt(js(t),0,4)}function KZ(...e){let t=(()=>{if(Array.isArray(e[0])){let[o,n]=e;return Tf(o,n)}return e[0]})(),r=typeof t=="string"?t:Ua(t);return Uy(r)}function js(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return Tf(r,o)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:nc(gf(KZ(t)))}var lE=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Uy(Ua(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Uy(Ua(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.AmbiguityError"});}},Li=class extends de{constructor({name:t,data:r,type:o="item"}){let n=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${o}${n} not found.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.NotFoundError"});}};pr();function iO(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[i,s]=e;return [JZ(i),s]}return e})(),{bytecode:o,args:n}=r;return ht(o,t.inputs?.length&&n?.length?Ds(t.inputs,n):"0x")}function sO(e){return Rf(e)}function JZ(e){let t=e.find(r=>r.type==="constructor");if(!t)throw new Li({name:"constructor"});return t}function aO(e,t={}){return Rf(e,t)}function cO(e){return js(e)}pr();function uO(...e){let[t,r,o={}]=(()=>{if(Array.isArray(e[0])){let[i,s,a,c]=e;return [mE(i,s),a,c]}return e})(),n=sc(t.outputs,r,o);if(!(n&&Object.keys(n).length===0))return n&&Object.keys(n).length===1?Array.isArray(n)?n[0]:Object.values(n)[0]:n}function Fs(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[u,f,d]=e;return [mE(u,f,{args:d}),d]}let[a,c]=e;return [a,c]})(),{overloads:o}=t,n=o?mE([t,...o],t.name,{args:r}):t,i=QZ(n),s=r.length>0?Ds(n.inputs,r):void 0;return s?ht(i,s):i}function ac(e,t={}){return Rf(e,t)}function mE(e,t,r){let o=Tf(e,t,r);if(o.type!=="function")throw new Li({name:t,type:"function"});return o}function QZ(e){return dE(e)}ln();var My="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Dy="0x0000000000000000000000000000000000000000";bp();Te();Ti();Zo();ep();ur();zs();var tG="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",gO="0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033",rG=0x00000000000000000000000000000000deadbeefn,nG=cO(aO("event Transfer(address indexed from, address indexed to, uint256 value)")),fO=ac("function balanceOf(address) returns (uint256)"),lO=ac("function decimals() returns (uint256)"),dO=ac("function tokenURI(uint256) returns (string)"),pO=ac("function symbol() returns (string)"),oG=ac("function query(address target, bytes data)");async function yO(e,t){let{blockNumber:r,blockTag:o,calls:n,stateOverrides:i,traceAssetChanges:s,traceTransfers:a,validation:c}=t,u=t.account?We(t.account):void 0;if(s&&!u)throw new L("`account` is required when `traceAssetChanges` is true");let f=u?iO(sO("constructor(bytes, bytes)"),{bytecode:Wg,args:[tG,Fs(ac("function getBalance(address)"),[u.address])]}):void 0,d=o??e.experimental_blockTag??"latest",g=r;if(s&&typeof g!="bigint"&&d!=="earliest"&&d!=="pending")if(d==="latest")g=await Yn(e,{cacheTime:0});else {let p=await er(e,{blockTag:d});if(typeof p.number!="bigint")throw new L(`Block tag \`${d}\` did not resolve to a number.`);g=p.number;}let h=typeof g=="bigint"?{blockNumber:g}:{blockTag:d},x=s?await kf(e,{...h,blocks:[{calls:n.map(p=>({...p,from:u.address})),stateOverrides:i}],traceTransfers:a,validation:c}):void 0,w=x?[...new Set([...iG(x[0].calls.flatMap(p=>p.logs??[]),u.address),...t.calls.map(p=>p.to?.toLowerCase())])].filter(p=>!!p&&p!==My&&p!==Dy):[],k=sG([...u?[u.address]:[],...w,...i?.map(({address:p})=>p)??[]]),T=[{address:k,code:gO}],[P,O]=await Promise.all([s?Promise.all([hO(e,{account:u.address,...h,data:f,stateOverride:i}),...w.map(p=>hO(e,{account:u.address,address:p,...h,data:Fs(fO,[u.address]),staticCallAddress:k,stateOverride:i}))]):[],kf(e,{...h,blocks:[{calls:[...n,{to:Dy}].map(p=>({...p,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:f}]},{calls:w.map(p=>({to:k,data:Pp(p,Fs(fO,[u.address]))})),stateOverrides:T},{calls:w.map(p=>({to:k,data:Pp(p,Fs(lO))})),stateOverrides:T},{calls:w.map(p=>({to:k,data:Pp(p,Fs(dO,[0n]))})),stateOverrides:T},{calls:w.map(p=>({to:k,data:Pp(p,Fs(pO))})),stateOverrides:T}]:[]],traceTransfers:a,validation:c})]),S=O[0],[N,z,C,D,q]=s?O.slice(1):[],{calls:H,...Z}=S,re=H.slice(0,-1),I=P.map(p=>mO(p)?ut(p.data):null),l=N?.calls??[],m=z?.calls??[],b=[...l,...m].map(p=>mO(p)?ut(p.data):null),v=(C?.calls??[]).map(p=>hE(p,lO)),E=(q?.calls??[]).map(p=>hE(p,pO)),R=(D?.calls??[]).map(p=>hE(p,dO)),_=[];for(let[p,A]of b.entries()){let G=I[p],J=P[p],Q=typeof G=="bigint"?G:p>0&&J?.status==="success"&&J.data==="0x"?0n:null;if(typeof A!="bigint"||typeof Q!="bigint")continue;let ae=v[p-1],he=E[p-1],ye=R[p-1],Ke=p===0?{address:My,decimals:18,symbol:"ETH"}:{address:w[p-1],decimals:ye||ae?Number(ae??1):void 0,symbol:he??void 0};_.push({token:Ke,value:{pre:Q,post:A,diff:A-Q}});}return {assetChanges:_,block:Z,results:re}}function Pp(e,t){return Fs(oG,[e,t])}function iG(e,t){let r=zo(t.toLowerCase(),{size:32});return e.filter(o=>o.topics[0]?.toLowerCase()!==nG||o.address.toLowerCase()===My?false:o.topics[1]?.toLowerCase()===r||o.topics[2]?.toLowerCase()===r).map(o=>o.address.toLowerCase())}function mO(e){return e.status==="success"&&/^0x[\da-f]{64}$/i.test(e.data)}function hE(e,t){if(e.status==="failure"||e.data==="0x")return null;try{return uO(t,e.data)}catch{return null}}async function hO(e,t){let{account:r,address:o,blockNumber:n,blockTag:i,data:s,staticCallAddress:a,stateOverride:c}=t;try{return {data:(await hn({...e,ccipRead:!1},{account:o?Dy:r,data:o?Pp(o,s):s,stateOverride:o&&a?[...c??[],{address:a,code:gO}]:c,...o?{to:a}:{},...typeof n=="bigint"?{blockNumber:n}:{blockTag:i}})).data??"0x",status:"success"}}catch(u){if(!(u instanceof Ss)||!(u.cause instanceof In))throw u;return {data:"0x",status:"failure"}}}function sG(e){let t=new Set(e.map(o=>o.toLowerCase())),r=rG;for(;t.has(`0x${r.toString(16).padStart(40,"0")}`);)r++;return `0x${r.toString(16).padStart(40,"0")}`}var Bp={};Er(Bp,{InvalidWrappedSignatureError:()=>jy,assert:()=>yE,from:()=>uG,magicBytes:()=>gE,universalSignatureValidatorAbi:()=>cG,universalSignatureValidatorBytecode:()=>aG,unwrap:()=>bO,validate:()=>lG,wrap:()=>fG});pn();pr();var gE="0x6492649264926492649264926492649264926492649264926492649264926492",aG="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",cG=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function yE(e){if(pt(e,-32)!==gE)throw new jy(e)}function uG(e){return typeof e=="string"?bO(e):e}function bO(e){yE(e);let[t,r,o]=sc(Tp("address, bytes, bytes"),e);return {data:r,signature:o,to:t}}function fG(e){let{data:t,signature:r,to:o}=e;return ht(Ds(Tp("address, bytes, bytes"),[o,t,r]),gE)}function lG(e){try{return yE(e),!0}catch{return false}}var jy=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc6492.InvalidWrappedSignatureError"});}};mn();bp();Ti();I2();jn();Ai();Ps();cn();po();ur();Ae();ud();ur();lr();function xO({r:e,s:t,to:r="hex",v:o,yParity:n}){let i=(()=>{if(n===0||n===1)return n;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new xn.Signature(ut(e),ut(t)).toCompactHex()}${i===0?"1b":"1c"}`;return r==="hex"?s:fr(s)}zs();async function Hs(e,t){let{address:r,chain:o=e.chain,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??o?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??o?.contracts?.multicall3?.address,mode:a="auto"}=t;if(o?.verifyHash)return await o.verifyHash(e,t);let c=(()=>{let u=t.signature;return St(u)?u:typeof u=="object"&&"r"in u&&"s"in u?xO(u):Le(u)})();try{if(a==="eoa")try{if(zr(Dn(r),await fp({hash:n,signature:c})))return !0}catch{}return Np.validate(c)?await dG(e,{...t,multicallAddress:s,signature:c}):await pG(e,{...t,verifierAddress:i,signature:c})}catch(u){if(a!=="eoa")try{if(zr(Dn(r),await fp({hash:n,signature:c})))return !0}catch{}if(u instanceof Ui)return false;throw u}}async function dG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,multicallAddress:a,requireCanonical:c}=t,{authorization:u,data:f,signature:d,to:g}=Np.unwrap(t.signature);if(await rc(e,{address:r,blockHash:o,blockNumber:n,blockTag:i,requireCanonical:c})===st(["0xef0100",u.address]))return await mG(e,{...t,signature:d});let x={address:u.address,chainId:Number(u.chainId),nonce:Number(u.nonce),r:K(u.r,{size:32}),s:K(u.s,{size:32}),yParity:u.yParity};if(!await y8({address:r,authorization:x}))throw new Ui;let k=await oe(e,De,"readContract")({...a?{address:a}:{code:Ja},authorizationList:[x],abi:bo,blockHash:o,blockNumber:n,blockTag:"pending",functionName:"aggregate3",requireCanonical:c,args:[[...f?[{allowFailure:true,target:g??r,callData:f}]:[],{allowFailure:true,target:r,callData:lt({abi:_2,functionName:"isValidSignature",args:[s,d]})}]]});if(k[k.length-1]?.returnData?.startsWith("0x1626ba7e"))return true;throw new Ui}async function pG(e,t){let{address:r,factory:o,factoryData:n,hash:i,signature:s,verifierAddress:a,...c}=t,u=await(async()=>!o&&!n||Bp.validate(s)?s:Bp.wrap({data:n,signature:s,to:o}))(),f=a?{to:a,data:lt({abi:E2,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:vp({abi:E2,args:[r,i,u],bytecode:w$}),...c},{data:d}=await oe(e,hn,"call")(f).catch(g=>{throw g instanceof Ss?new Ui:g});if(H6(d??"0x0"))return true;throw new Ui}async function mG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,requireCanonical:a,signature:c}=t;if((await oe(e,De,"readContract")({address:r,abi:_2,args:[s,c],blockHash:o,blockNumber:n,blockTag:i,functionName:"isValidSignature",requireCanonical:a}).catch(f=>{throw f instanceof _u?new Ui:f})).startsWith("0x1626ba7e"))return true;throw new Ui}var Ui=class extends Error{};async function vO(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=gy(r);return oe(e,Hs,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function wO(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...f}=t,d=A8({message:s,primaryType:a,types:c,domain:u});return oe(e,Hs,"verifyHash")({address:r,factory:o,factoryData:n,hash:d,signature:i,...f})}Fn();k2();Pr();ur();Pr();function Fy(e,{emitOnBegin:t=false,emitMissed:r=false,onBlockNumber:o,onError:n,poll:i,pollingInterval:s=e.pollingInterval}){let a=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),c;return a?(()=>{let d=Be(["watchBlockNumber",e.uid,t,r,s]);return Ur(d,{onBlockNumber:o,onError:n},g=>Ko(async()=>{try{let h=await oe(e,Yn,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(h===c)return;if(h-c>1&&r)for(let x=c+1n;x<h;x++)g.onBlockNumber(x,c),c=x;}(c===void 0||h>c)&&(g.onBlockNumber(h,c),c=h);}catch(h){g.onError?.(h);}},{emitOnBegin:t,interval:s}))})():(()=>{let d=Be(["watchBlockNumber",e.uid,t,r]);return Ur(d,{onBlockNumber:o,onError:n},g=>{let h=true,x=()=>h=false;return (async()=>{try{let w=(()=>{if(e.transport.type==="fallback"){let T=e.transport.transports.find(P=>P.config.type==="webSocket"||P.config.type==="ipc");return T?T.value:e.transport}return e.transport})(),{unsubscribe:k}=await w.subscribe({params:["newHeads"],onData(T){if(!h)return;let P=ut(T.result?.number);g.onBlockNumber(P,c),c=P;},onError(T){g.onError?.(T);}});x=k,h||x();}catch(w){n?.(w);}})(),()=>x()})})()}async function _O(e,t){let{checkReplacement:r=e.chain?.supportsTransactionReplacementDetection??true,confirmations:o=1,hash:n,onReplaced:i,retryCount:s=6,retryDelay:a=({count:N})=>~~(1<<N)*200,timeout:c=18e4}=t,u=Be(["waitForTransactionReceipt",e.uid,n]),f=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,d,g,h,x=false,w,k,{promise:T,resolve:P,reject:O}=Yg(),S=c?setTimeout(()=>{k?.(),w?.(),O(new gg({hash:n}));},c):void 0;return w=Ur(u,{onReplaced:i,resolve:P,reject:O},async N=>{if(h=await oe(e,Af,"getTransactionReceipt")({hash:n}).catch(()=>{}),h&&o<=1){clearTimeout(S),N.resolve(h),w?.();return}k=oe(e,Fy,"watchBlockNumber")({emitMissed:true,emitOnBegin:true,poll:true,pollingInterval:f,async onBlockNumber(z){let C=q=>{clearTimeout(S),k?.(),q(),w?.();},D=z;if(!x)try{if(h){if(o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>N.resolve(h));return}if(r&&!d&&(x=!0,await Ep(async()=>{d=await oe(e,If,"getTransaction")({hash:n}),d.blockNumber&&(D=d.blockNumber);},{delay:a,retryCount:s}),x=!1),h=await oe(e,Af,"getTransactionReceipt")({hash:n}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>N.resolve(h));}catch(q){if(q instanceof Es||q instanceof wu){if(!d){x=false;return}try{g=d,x=!0;let H=await Ep(()=>oe(e,er,"getBlock")({blockNumber:D,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:({error:I})=>I instanceof Ns});x=!1;let Z=H.transactions.find(({from:I,nonce:l})=>I===g.from&&l===g.nonce);if(!Z||(h=await oe(e,Af,"getTransactionReceipt")({hash:Z.hash}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o)))return;let re="replaced";Z.to===g.to&&Z.value===g.value&&Z.input===g.input?re="repriced":Z.from===Z.to&&Z.value===0n&&(re="cancelled"),C(()=>{N.onReplaced?.({reason:re,replacedTransaction:g,transaction:Z,transactionReceipt:h}),N.resolve(h);});}catch(H){C(()=>N.reject(H));}}else C(()=>N.reject(q));}}});}),T}Pr();var hG=["size","totalDifficulty","transactions","uncles","withdrawals"];function EO(e,{onBlockHeader:t,onError:r}){let o,n=Be(["watchBlockHeaders",e.uid]);return Ur(n,{onBlockHeader:t,onError:r},i=>{let s=true,a=false,c=()=>s=false;return (async()=>{try{let u=(()=>{if(e.transport.type==="fallback"){let d=e.transport.transports.find(g=>g.config.type==="webSocket"||g.config.type==="ipc");return d?d.value:e.transport}return e.transport})(),{unsubscribe:f}=await u.subscribe({params:["newHeads"],onData(d){if(!s)return;let g=(e.chain?.formatters?.block?.format||Ga)(d.result,"watchBlockHeaders");for(let h of hG)delete g[h];i.onBlockHeader(g,o),o=g;},onError(d){a&&i.onError?.(d);}});a=!0,c=f,s||c();}catch(u){i.onError?.(u);}})(),()=>c()})}Pr();function SO(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=false,emitOnBegin:o=false,onBlock:n,onError:i,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),f=s??false,d;return u?(()=>{let x=Be(["watchBlocks",e.uid,t,r,o,f,c]);return Ur(x,{onBlock:n,onError:i},w=>Ko(async()=>{try{let k=await oe(e,er,"getBlock")({blockTag:t,includeTransactions:f});if(k.number!==null&&d?.number!=null){if(k.number===d.number)return;if(k.number-d.number>1&&r)for(let T=d?.number+1n;T<k.number;T++){let P=await oe(e,er,"getBlock")({blockNumber:T,includeTransactions:f});w.onBlock(P,d),d=P;}}(d?.number==null||t==="pending"&&k?.number==null||k.number!==null&&k.number>d.number)&&(w.onBlock(k,d),d=k);}catch(k){w.onError?.(k);}},{emitOnBegin:o,interval:c}))})():(()=>{let x=true,w=true,k=()=>x=false;return (async()=>{try{o&&oe(e,er,"getBlock")({blockTag:t,includeTransactions:f}).then(O=>{x&&w&&(n(O,void 0),w=!1);}).catch(i);let T=(()=>{if(e.transport.type==="fallback"){let O=e.transport.transports.find(S=>S.config.type==="webSocket"||S.config.type==="ipc");return O?O.value:e.transport}return e.transport})(),{unsubscribe:P}=await T.subscribe({params:["newHeads"],async onData(O){if(!x)return;let S=await oe(e,er,"getBlock")({blockNumber:O.result?.number,includeTransactions:f}).catch(()=>{});x&&(n(S,d),w=!1,d=S);},onError(O){i?.(O);}});k=P,x||k();}catch(T){i?.(T);}})(),()=>k()})()}Et();Fu();Pr();function IO(e,{address:t,args:r,batch:o=true,event:n,events:i,fromBlock:s,onError:a,onLogs:c,poll:u,pollingInterval:f=e.pollingInterval,strict:d}){let g=typeof u<"u"?u:typeof s=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??false;return g?(()=>{let k=Be(["watchEvent",t,r,o,e.uid,n,f,s]);return Ur(k,{onLogs:c,onError:a},T=>{let P;s!==void 0&&(P=s-1n);let O,S=false,N=Ko(async()=>{if(!S){try{O=await oe(e,ly,"createEventFilter")({address:t,args:r,event:n,events:i,strict:h,fromBlock:s});}catch{}S=true;return}try{let z;if(O)z=await oe(e,Ls,"getFilterChanges")({filter:O});else {let C=await oe(e,Yn,"getBlockNumber")({});P&&P!==C?z=await oe(e,ff,"getLogs")({address:t,args:r,event:n,events:i,fromBlock:P+1n,toBlock:C}):z=[],P=C;}if(z.length===0)return;if(o)T.onLogs(z);else for(let C of z)T.onLogs([C]);}catch(z){O&&z instanceof Vn&&(S=false),T.onError?.(z);}},{emitOnBegin:true,interval:f});return async()=>{O&&await oe(e,Us,"uninstallFilter")({filter:O}),N();}})})():(()=>{let k=true,T=()=>k=false;return (async()=>{try{let P=(()=>{if(e.transport.type==="fallback"){let z=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return z?z.value:e.transport}return e.transport})(),O=i??(n?[n]:void 0),S=[];O&&(S=[O.flatMap(C=>jo({abi:[C],eventName:C.name,args:r}))],n&&(S=S[0]));let{unsubscribe:N}=await P.subscribe({params:["logs",{address:t,topics:S}],onData(z){if(!k)return;let C=z.result;try{let{eventName:D,args:q}=Wa({abi:O??[],data:C.data,topics:C.topics,strict:h}),H=dr(C,{args:q,eventName:D});c([H]);}catch(D){let q,H;if(D instanceof _i||D instanceof gs){if(d)return;q=D.abiItem.name,H=D.abiItem.inputs?.some(re=>!("name"in re&&re.name));}let Z=dr(C,{args:H?[]:{},eventName:q});c([Z]);}},onError(z){a?.(z);}});T=N,k||T();}catch(P){a?.(P);}})(),()=>T()})()}Pr();function AO(e,{batch:t=true,onError:r,onTransactions:o,poll:n,pollingInterval:i=e.pollingInterval}){return (typeof n<"u"?n:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{let u=Be(["watchPendingTransactions",e.uid,t,i]);return Ur(u,{onTransactions:o,onError:r},f=>{let d,g=Ko(async()=>{try{if(!d)try{d=await oe(e,dy,"createPendingTransactionFilter")({});return}catch(x){throw g(),x}let h=await oe(e,Ls,"getFilterChanges")({filter:d});if(h.length===0)return;if(t)f.onTransactions(h);else for(let x of h)f.onTransactions([x]);}catch(h){f.onError?.(h);}},{emitOnBegin:true,interval:i});return async()=>{d&&await oe(e,Us,"uninstallFilter")({filter:d}),g();}})})():(()=>{let u=true,f=()=>u=false;return (async()=>{try{let{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!u)return;let h=g.result;o([h]);},onError(g){r?.(g);}});f=d,u||f();}catch(d){r?.(d);}})(),()=>f()})()}var gG=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function yG(e){return gG.test(e)?!Number.isNaN(new Date(e).getTime()):false}function bE(e){return yG(e)?new Date(e):new Date(Number.NaN)}function kO(e){let{scheme:t,statement:r,...o}=e.match(bG)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(xG)?.groups??{},f=e.split("Resources:")[1]?.split(`
71
+ - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:bE(i)}:{},...s?{issuedAt:bE(s)}:{},...a?{notBefore:bE(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var bG=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,xG=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;Sn();Ps();function RO(e){let{address:t,domain:r,message:o,nonce:n,scheme:i,time:s=new Date}=e;if(r&&o.domain!==r||n&&o.nonce!==n||i&&o.scheme!==i||Number.isNaN(s.getTime())||o.expirationTime&&(Number.isNaN(o.expirationTime.getTime())||s>=o.expirationTime)||o.notBefore&&(Number.isNaN(o.notBefore.getTime())||s<o.notBefore))return false;try{if(!o.address||!Me(o.address,{strict:!1})||t&&!zr(o.address,t))return !1}catch{return false}return true}async function TO(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,f=kO(n);if(!f.address||!RO({address:r,domain:o,message:f,nonce:i,scheme:s,time:c}))return false;let g=gy(n);return Hs(e,{address:f.address,hash:g,signature:a,...u})}mn();Sn();Ps();function $f(e,t){return {amount:e,decimals:t,formatted:X8(e,t)}}function Mi(e,t){let{decimals:r,token:o}=t,n=vE(e,o);if(n)return {address:n.address,decimals:r??n.decimals};if(Me(o,{strict:false}))return {address:o,decimals:r??wG(e,o)};throw new Error(`Token "${o}" is not a declared ERC-20 token on the client's \`tokens\` array (with an address for the client's chain), and is not a valid address.`)}function vE(e,t){let r=e.tokens,o=e.chain?.id;if(!r||o===void 0)return;let n=vG(r,t);if(n)return xE(n,o);if(Me(t,{strict:false}))for(let i of r){let s=xE(i,o);if(s&&zr(s.address,t))return s}}function xE(e,t){let r=e.addresses[t];if(r)return {address:r,currency:e.currency,decimals:e.decimals,name:e.name,popular:e.popular,symbol:e.symbol}}function vG(e,t){let r=t.toLowerCase();for(let o of e)if(o.symbol?.toLowerCase()===r)return o}function wG(e,t){let r=e.tokens,o=e.chain?.id;if(r&&o!==void 0)for(let n of r){let i=xE(n,o);if(i&&zr(i.address,t))return i.decimals}}async function Of(e,t){let{address:r,decimals:o}=Mi(e,t);return o!==void 0?{address:r,decimals:o}:{address:r,decimals:await De(e,{abi:Kn,address:r,functionName:"decimals"})}}function Nf(e){return {...e,data:lt(e),to:e.address}}Fn();async function $O(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:o}){let n=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,o]:[t]},{retryCount:0}),s=(e.chain?.formatters?.transactionReceipt?.format||tc)(n);if(s.status==="reverted"&&r)throw new hg({receipt:s});return s}mn();async function Pf(e,t){let{account:r,decimals:o,spender:n,token:i,...s}=t,[a,{decimals:c}]=await Promise.all([De(e,{...s,...Pf.call(e,{account:r,spender:n,token:i})}),Of(e,{decimals:o,token:i})]);return $f(a,c)}(function(e){function t(r,o){return Nf({address:Mi(r,o).address,abi:Kn,functionName:"allowance",args:[o.account,o.spender]})}e.call=t;})(Pf||(Pf={}));ln();mn();async function Bf(e,t){let{account:r=e.account,decimals:o,token:n,...i}=t;if(!r)throw new _p;let s=We(r).address,[a,{decimals:c}]=await Promise.all([De(e,{...i,...Bf.call(e,{account:s,token:n})}),Of(e,{decimals:o,token:n})]);return $f(a,c)}(function(e){function t(r,o){let n=o.account??r.account;if(!n)throw new _p;let i=We(n).address;return Nf({address:Mi(r,o).address,abi:Kn,functionName:"balanceOf",args:[i]})}e.call=t;})(Bf||(Bf={}));mn();async function wE(e,t){let{token:r,...o}=t,{address:n}=Mi(e,{token:r}),i=vE(e,r),[s,a,c]=await Promise.all([i?.decimals??De(e,{...o,abi:Kn,address:n,functionName:"decimals"}),i?.name??De(e,{...o,abi:Kn,address:n,functionName:"name"}),i?.symbol??De(e,{...o,abi:Kn,address:n,functionName:"symbol"})]);return {decimals:s,name:a,symbol:c}}mn();async function Cf(e,t){let{decimals:r,token:o,...n}=t,[i,{decimals:s}]=await Promise.all([De(e,{...n,...Cf.call(e,{token:o})}),Of(e,{decimals:r,token:o})]);return $f(i,s)}(function(e){function t(r,o){return Nf({address:Mi(r,o).address,abi:Kn,args:[],functionName:"totalSupply"})}e.call=t;})(Cf||(Cf={}));function OO(e){return {call:t=>hn(e,t),createAccessList:t=>e8(e,t),createBlockFilter:()=>t8(e),createContractEventFilter:t=>Q0(e,t),createEventFilter:t=>ly(e,t),createPendingTransactionFilter:()=>dy(e),estimateContractGas:t=>Z4(e,t),estimateGas:t=>cf(e,t),getBalance:t=>r8(e,t),getBlobBaseFee:()=>n8(e),getBlock:t=>er(e,t),getBlockNumber:t=>Yn(e,t),getBlockReceipts:t=>o8(e,t),getBlockTransactionCount:t=>i8(e,t),getBytecode:t=>rc(e,t),getChainId:()=>af(e),getCode:t=>rc(e,t),getContractEvents:t=>Cg(e,t),getDelegation:t=>s8(e,t),getEip712Domain:t=>a8(e,t),getEnsAddress:t=>Z$(e,t),getEnsAvatar:t=>Y$(e,t),getEnsName:t=>X$(e,t),getEnsResolver:t=>Q$(e,t),getEnsText:t=>fy(e,t),getFeeHistory:t=>u8(e,t),estimateFeesPerGas:t=>M4(e,t),getFilterChanges:t=>Ls(e,t),getFilterLogs:t=>f8(e,t),getGasPrice:()=>rf(e),getLogs:t=>ff(e,t),getProof:t=>eO(e,t),estimateMaxPriorityFeePerGas:t=>U4(e,t),fillTransaction:t=>Pg(e,t),getRawTransaction:t=>tO(e,t),getStorageAt:t=>rO(e,t),getTransaction:t=>If(e,t),getTransactionConfirmations:t=>nO(e,t),getTransactionCount:t=>Ag(e,t),getTransactionReceipt:t=>Af(e,t),multicall:t=>oO(e,t),prepareTransactionRequest:t=>Bg(e,t),readContract:t=>De(e,t),sendRawTransaction:t=>M$(e,t),sendRawTransactionSync:t=>$O(e,t),simulate:t=>kf(e,t),simulateBlocks:t=>kf(e,t),simulateCalls:t=>yO(e,t),simulateContract:t=>C$(e,t),verifyHash:t=>Hs(e,t),verifyMessage:t=>vO(e,t),verifySiweMessage:t=>TO(e,t),verifyTypedData:t=>wO(e,t),uninstallFilter:t=>Us(e,t),waitForTransactionReceipt:t=>_O(e,t),watchBlockHeaders:t=>EO(e,t),watchBlocks:t=>SO(e,t),watchBlockNumber:t=>Fy(e,t),watchContractEvent:t=>U$(e,t),watchEvent:t=>IO(e,t),watchPendingTransactions:t=>AO(e,t),token:_G(e)}}function _G(e){return {getAllowance:Sp(e,Pf),getBalance:Sp(e,Bf),getMetadata:Sp(e,wE),getTotalSupply:Sp(e,Cf)}}function _E(e){let{key:t="public",name:r="Public Client"}=e;return F$({...e,key:t,name:r,type:"publicClient"}).extend(OO)}function Hy({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=iy();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:x8(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Zo();Fu();function EE(e,t={}){let{key:r="fallback",name:o="Fallback",rank:n=false,shouldThrow:i=NO,retryCount:s,retryDelay:a}=t;return(({chain:c,pollingInterval:u=4e3,timeout:f,...d})=>{let g=e,h=()=>{},x=Hy({key:r,name:o,async request({method:w,params:k}){let T,P=async(O=0)=>{let S=g[O]({...d,chain:c,retryCount:0,timeout:f});try{let N=await S.request({method:w,params:k});return h({method:w,params:k,response:N,transport:S,status:"success"}),N}catch(N){if(h({error:N,method:w,params:k,transport:S,status:"error"}),i(N)||O===g.length-1||(T??=g.slice(O+1).some(z=>{let{include:C,exclude:D}=z({chain:c}).config.methods||{};return C?C.includes(w):D?!D.includes(w):true}),!T))throw N;return P(O+1)}};return P()},retryCount:s,retryDelay:a,type:"fallback"},{onResponse:w=>h=w,transports:g.map(w=>w({chain:c,retryCount:0}))});if(n){let w=typeof n=="object"?n:{};EG({chain:c,interval:w.interval??u,onTransports:k=>g=k,ping:w.ping,sampleCount:w.sampleCount,timeout:w.timeout,transports:g,weights:w.weights});}return x})}function NO(e){return !!("code"in e&&typeof e.code=="number"&&(e.code===As.code||e.code===Oi.code||e.code===Rs.code||In.nodeMessage.test(e.message)||e.code===5e3))}function EG({chain:e,interval:t=4e3,onTransports:r,ping:o,sampleCount:n=10,timeout:i=1e3,transports:s,weights:a={}}){let{stability:c=.7,latency:u=.3}=a,f=[],d=async()=>{let g=await Promise.all(s.map(async w=>{let k=w({chain:e,retryCount:0,timeout:i}),T=Date.now(),P,O;try{await(o?o({transport:k}):k.request({method:"net_listening"})),O=1;}catch{O=0;}finally{P=Date.now();}return {latency:P-T,success:O}}));f.push(g),f.length>n&&f.shift();let h=Math.max(...f.map(w=>Math.max(...w.map(({latency:k})=>k)))),x=s.map((w,k)=>{let T=f.map(z=>z[k].latency),O=1-T.reduce((z,C)=>z+C,0)/T.length/h,S=f.map(z=>z[k].success),N=S.reduce((z,C)=>z+C,0)/S.length;return N===0?[0,k]:[u*O+c*N,k]}).sort((w,k)=>k[0]-w[0]);r(x.map(([,w])=>s[w])),await ec(t),d();};d();}Ha();Te();var Vy=class extends L{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"});}};Xg();var SG=0,PO=new WeakMap;function IG(e){if(!e)return "default";let t=PO.get(e);if(t!==void 0)return t;let r=SG++;return PO.set(e,r),r}function zf(e,t={}){let{batch:r,fetchFn:o,fetchOptions:n,key:i="http",maxResponseBodySize:s,methods:a,name:c="HTTP JSON-RPC",onFetchRequest:u,onFetchResponse:f,retryDelay:d,raw:g}=t;return ({chain:h,retryCount:x,timeout:w})=>{let{batchSize:k=1e3,wait:T=0}=typeof r=="object"?r:{},P=t.retryCount??x,O=w??t.timeout??1e4,S=e||h?.rpcUrls.default.http[0];if(!S)throw new Vy;let N=w8(S,{fetchFn:o,fetchOptions:n,maxResponseBodySize:s,onRequest:u,onResponse:f,timeout:O});return Hy({key:i,methods:a,name:c,async request({method:z,params:C},D){let q={method:z,params:C},H=D?.signal?{signal:D.signal}:void 0,{schedule:Z}=yf({id:`${S}.${IG(D?.signal)}`,wait:T,shouldSplitBatch(m){return m.length>k},fn:m=>N.request({body:m,fetchOptions:H}),sort:(m,y)=>m.id-y.id}),re=async m=>r?Z(m):[await N.request({body:m,fetchOptions:H})],[{error:I,result:l}]=await re(q);if(g)return {error:I,result:l};if(I)throw new Is({body:q,error:I,url:S});return l},retryCount:P,retryDelay:d,timeout:O,type:"http"},{fetchOptions:n,url:S})}}Ai();lr();Ae();Mn();function BO(e){window.open(e,"_blank","noopener,noreferrer");}var CO={performAdAction(e){let t=kl(e);t?BO(t):console.warn(`[@adland/react] WebActionAdapter has no web action for ad type "${e.type}"`);},performEmptyAdAction(e,t,r){BO(`${r}/slots/${e}?chain=${t}`);}},Zy=null,AG=Co.isInMiniApp().then(e=>(Zy=e,e)).catch(()=>(Zy=false,false));async function zO(){return Zy!==null?Zy:AG}async function kG(e,t){let r=oI(e,Dn(t));try{await Co.actions.swapToken({buyToken:r});}catch{await Co.actions.viewToken({token:r});}}async function RG(e){if(!await zO())return CO.performAdAction(e);try{switch(e.type){case "link":await Co.actions.openUrl(e.data.url);break;case "cast":await Co.actions.viewCast({hash:e.data.hash});break;case "tweet":await Co.actions.openUrl(e.data.url);break;case "miniapp":await Co.actions.openMiniApp({url:e.data.url});break;case "token":await kG(e.data.chainId,e.data.address);break;case "farcasterProfile":await Co.actions.viewProfile({fid:Number.parseInt(e.data.fid,10)});break}}catch(t){console.warn("[@adland/react] Mini App host refused the action, opening on the web:",t),CO.performAdAction(e);}}async function TG(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await zO()?Co.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var LO={performAdAction:RG,performEmptyAdAction:TG};var UO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};ur();var MO={block:L4({format(e){return {transactions:e.transactions?.map(r=>{if(typeof r=="string")return r;let o=Ni(r);return o.typeHex==="0x7e"&&(o.isSystemTx=r.isSystemTx,o.mint=r.mint?ut(r.mint):void 0,o.sourceHash=r.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:z4({format(e){let t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ut(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:D$({format(e){return {...e.depositNonce?{depositNonce:ut(e.depositNonce)}:{},...e.depositReceiptVersion?{depositReceiptVersion:vt(e.depositReceiptVersion)}:{},l1GasPrice:e.l1GasPrice?ut(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ut(e.l1GasUsed):null,l1Fee:e.l1Fee?ut(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};Lo();Sn();cn();Ae();function $G(e,t){return NG(e)?OG(e):h8(e,t)}var DO={transaction:$G};function OG(e){PG(e);let{sourceHash:t,data:r,from:o,gas:n,isSystemTx:i,mint:s,to:a,value:c}=e,u=[t,o,a??"0x",s?ft(s):"0x",c?ft(c):"0x",n?ft(n):"0x",i?"0x1":"0x",r??"0x"];return st(["0x7e",yo(u)])}function NG(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function PG(e){let{from:t,to:r}=e;if(t&&!Me(t))throw new nt({address:t});if(r&&!Me(r))throw new nt({address:r})}var Lf={blockTime:2e3,contracts:UO,formatters:MO,serializers:DO};var Cp=1,Uf=_f({...Lf,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Lf.contracts,disputeGameFactory:{[Cp]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Cp]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Cp]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Cp]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Cp});_f({...Uf,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var zp=11155111,Mf=_f({...Lf,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...Lf.contracts,disputeGameFactory:{[zp]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[zp]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[zp]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[zp]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:true,sourceId:zp});_f({...Mf,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var zG=vi(["function module() view returns (address)"]),LG=vi(["function tokenURI(address slot) view returns (string)"]),FO="0x0000000000000000000000000000000000000000",UG="https://ipfs-gateway.econome.studio";function MG(e,t){return `${(t??UG).replace(/\/$/,"")}/ipfs/${e}`}var DG={[Uf.id]:Uf,[Mf.id]:Mf},jG=new Set([Uf.id,Mf.id]);function FG(e){return jG.has(e)?EE([zf(`${Al}/rpc/${e}`),zf()],{rank:false}):zf()}function HO(e,t,r=DG){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return _E({chain:o,transport:t?zf(t):FG(e),batch:{multicall:true}})}function HG(e){return e.startsWith("ipfs://")?e.slice(7):e.startsWith("Qm")||e.startsWith("bafy")?e:null}var VG=/^data:application\/json(;[^,]*)?,/i;function ZG(e){let t=e.indexOf(","),r=e.slice(t+1);if(!/;base64/i.test(e.slice(0,t)))return decodeURIComponent(r);let o=typeof atob=="function"?atob(r):Buffer.from(r,"base64").toString("binary");return new TextDecoder().decode(Uint8Array.from(o,n=>n.charCodeAt(0)))}function GG(e){return qe(qr(e))}var SE=async(e,t)=>{if(!e)throw new Error("NO_AD");if(VG.test(e)){let s,a=ZG(e);try{s=JSON.parse(a);}catch{throw new Error("NO_AD")}if(s&&typeof s=="object"&&"error"in s&&s.error)throw new Error(String(s.error));return {data:s,cid:GG(a)}}let r=HG(e),o=r?MG(r,t):e,n=await fetch(o,{method:"GET",headers:{Accept:"application/json"}});if(!n.ok)throw n.status===404?new Error("NO_AD"):new Error("ERROR");let i=await n.json();if(i.error)throw new Error(i.error);return {data:i,cid:r}},VO=async(e,t)=>{let r;try{r=await e.readContract({address:t,abi:zG,functionName:"module"});}catch(o){throw new Error(`[@adland/react] No slot found at ${t} on chain ${e.chain?.id??"unknown"}. Check the \`chainId\` prop, and any \`rpcUrl\` override \u2014 a custom RPC queries whatever chain it serves, whatever \`chainId\` says.`,{cause:o})}return !r||r===FO?"":e.readContract({address:r,abi:LG,functionName:"tokenURI",args:[t]})},qG=vi(["function adByKey(bytes32 key) view returns ((address slot,address module,string uri,address occupant,bool vacant,uint256 price,uint256 deposit,uint256 taxOwed,uint256 collectedTax,uint256 taxPercentage,address currency,uint256 occupiedSince))","function ad(address slot) view returns ((address slot,address module,string uri,address occupant,bool vacant,uint256 price,uint256 deposit,uint256 taxOwed,uint256 collectedTax,uint256 taxPercentage,address currency,uint256 occupiedSince))"]),WG={8453:"0x0896A90c75d2cF195427fb4128F3f4b28f5b2Ef7",84532:"0x2d852910adb7a0eC9725109C192D8217b4bD7FA4"};function KG(e){return Si(e,{size:32})}var ZO=async(e,t,r)=>{let o=r?.adModule??WG[e.chain?.id??-1];if(!o)throw new Error(`[@adland/react] No ad module known for chain ${e.chain?.id}. Pass \`adModule\` to resolve a slot by name there.`);let n=await e.readContract({address:o,abi:qG,functionName:"adByKey",args:[KG(t)]});if(n.slot===FO||!n.uri)return null;try{return {...await SE(n.uri,r?.gateway),slot:n.slot}}catch(i){if(i instanceof Error&&i.message==="NO_AD")return null;throw i}};var XG={link:["icon","image"],miniapp:["icon","imageUrl"],token:["logoURI"],farcasterProfile:["pfpUrl"],cast:["pfpUrl"],tweet:["pfpUrl"]};var QG=["icon","pfpUrl","logoURI","imageUrl","image"],eq=["title","displayName","username","name","symbol"],tq=["description","bio","text","name"];function IE(e){return {...e.data,...e.metadata??{}}}function GO(e){if(!e)return null;let t=IE(e);for(let r of XG[e.type]??QG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function AE(e){if(!e)return null;let t=IE(e);for(let r of eq){let o=t[r];if(typeof o=="string"&&o)return o}return null}function qO(e){if(!e)return null;let t=IE(e),r=AE(e);for(let o of tq){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}var cc=new Set,jO=1e3;function rq(e){return e==="view"?"view":"click"}function Gy(e){return e.endpoint??Al}function kE(e,t,r){t.onEvent?.({type:e,slot:t.slot,chainId:t.chainId,cid:t.cid??null,placement:t.placement,empty:t.empty??false,auth:t.auth??"none",...r===void 0?{}:{verified:r}});}async function RE(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${Gy(t)}/track`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:rq(e),slot:t.slot,cid:t.cid??null,domain:window.location.hostname,auth:r,...typeof t.chainId=="number"?{chainId:t.chainId}:{},...t.placement?{placement:t.placement}:{},...o?{token:o}:{}}),keepalive:!0}).catch(()=>{});}catch{}}async function nq(e,t){typeof window>"u"||(kE(e,t),(t.consent??"granted")==="granted"&&await RE(e,t));}async function oq(e,t,r){let o=e.auth??"none",n=null;o==="farcaster"&&e.getAuthToken&&(n=await e.getAuthToken());try{let i=await fetch(`${Gy(e)}/v1/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:t,type:"view",slot:e.slot,cid:e.cid??null,placement:e.placement,viewable_ms:r,chainId:e.chainId,auth:o,...n?{token:n,domain:window.location.hostname}:{}}),keepalive:!0});if(!i.ok)return null;let s=typeof i.json=="function"?await i.json().catch(()=>null):null;return typeof s?.clickToken=="string"?s.clickToken:""}catch{return null}}var WO=new Map;function KO(e){return fetch(`${Gy(e)}/v1/serve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slot:e.slot})}).then(t=>t.ok?t.json():null).then(t=>t?.nonce??null).catch(()=>null)}async function iq(e,t,r){let o=false;if((e.consent??"granted")==="granted"){let n=t?await oq(e,t,r):null;o=n!==null,n&&WO.set(e.slot,n),o||await RE("view",e);}return kE("view",e,o),o}function JO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(cc.has(r))return;let o=new IntersectionObserver(n=>{for(let i of n)i.isIntersecting&&!cc.has(r)&&(cc.add(r),nq("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function YO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(cc.has(r))return;let o=KO(t),n,i=new IntersectionObserver(s=>{for(let a of s)if(a.isIntersecting){if(cc.has(r)||n)continue;n=setTimeout(async()=>{if(cc.has(r))return;cc.add(r),i.disconnect();let c=await o;await iq(t,c,jO);},jO);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}async function TE(e,t){if(typeof window>"u"||(kE(e,t),(t.consent??"granted")!=="granted"))return;let r=e==="click"?WO.get(t.slot):void 0;if(r){let o=await KO(t);if(o&&await sq(t,o,r))return}await RE(e,t);}async function sq(e,t,r){try{return (await fetch(`${Gy(e)}/v1/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:t,clickToken:r,type:"click",slot:e.slot,cid:e.cid??null,placement:e.placement,chainId:e.chainId,auth:"none"}),keepalive:!0})).ok}catch{return false}}function XO(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function $E(e){return e.replace(/"/g,"&quot;").replace(/</g,"&lt;")}var OE=`
72
72
  :host { display: block; }
73
73
  * { box-sizing: border-box; }
74
74
  .adland-card {
@@ -84,11 +84,25 @@ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.
84
84
  font-family: var(--adland-font, system-ui, -apple-system, sans-serif);
85
85
  cursor: pointer;
86
86
  text-decoration: none;
87
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
87
+ /* Resting shadow, not just a hover one. Only --adland-shadow-hover existed,
88
+ which quietly ruled out every style whose card is raised at rest: a hard
89
+ offset shadow is most of what makes a neo-brutalist card look like one, and
90
+ there was no way to ask for it. Defaults to none, so nothing moves. */
91
+ box-shadow: var(--adland-shadow, none);
92
+ transition: var(
93
+ --adland-transition,
94
+ border-color 0.15s ease,
95
+ box-shadow 0.15s ease,
96
+ transform 0.15s ease
97
+ );
88
98
  }
89
99
  .adland-card:hover {
90
100
  border-color: var(--adland-border-hover, #d1d5db);
91
101
  box-shadow: var(--adland-shadow-hover, 0 1px 3px rgba(0, 0, 0, 0.08));
102
+ /* The other half of a raised card: shrink the shadow AND move the card into
103
+ the space it vacated, or the card appears to grow rather than press. No
104
+ default, so a theme that sets neither is untouched. */
105
+ transform: var(--adland-transform-hover, none);
92
106
  }
93
107
  .adland-media {
94
108
  width: var(--adland-media-size, 44px);
@@ -97,6 +111,7 @@ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.
97
111
  object-fit: cover;
98
112
  flex: none;
99
113
  background: var(--adland-media-bg, #f3f4f6);
114
+ border: var(--adland-media-border, none);
100
115
  }
101
116
  .adland-body { min-width: 0; flex: 1; }
102
117
  .adland-title {
@@ -117,26 +132,17 @@ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.
117
132
  text-overflow: ellipsis;
118
133
  white-space: nowrap;
119
134
  }
120
- .adland-badge {
121
- flex: none;
122
- font-size: 10px;
123
- font-weight: 600;
124
- padding: 2px 6px;
125
- border-radius: var(--adland-badge-radius, 6px);
126
- background: var(--adland-accent-bg, #eef2ff);
127
- color: var(--adland-accent-fg, #4338ca);
128
- }
129
135
  .adland-label {
130
136
  position: absolute;
131
137
  top: 6px;
132
138
  right: 8px;
133
- font-size: 9px;
139
+ font-size: var(--adland-label-size, 9px);
134
140
  letter-spacing: 0.04em;
135
141
  text-transform: uppercase;
136
142
  color: var(--adland-label, #9ca3af);
137
143
  }
138
144
  .adland-empty { justify-content: center; color: var(--adland-muted, #6b7280); }
139
- `;function YO(e){let t=HO(e),r=EE(e),o=VO(e),n=ZO(e),i=n?eq[n]??n:"";return `<div part="card" class="adland-card">${t?`<img part="media" class="adland-media" src="${kE(t)}" alt="" loading="lazy" />`:""}<div part="body" class="adland-body">${r?`<p part="title" class="adland-title">${AE(r)}</p>`:""}${o?`<p part="description" class="adland-description">${AE(o)}</p>`:""}</div>${i?`<span part="badge" class="adland-badge">${AE(i)}</span>`:""}<span part="label" class="adland-label">Ad</span></div>`}function XO(){return '<div part="card" class="adland-card adland-empty"><span part="description" class="adland-description">Your ad here</span><span part="label" class="adland-label">Ad</span></div>'}function QO(e){if(e.type==="link"||e.type==="miniapp"){let t=e.data.url;return typeof t=="string"?t:null}return null}var tq=["--adland-bg","--adland-fg","--adland-muted","--adland-label","--adland-border","--adland-border-hover","--adland-border-width","--adland-radius","--adland-padding","--adland-gap","--adland-font","--adland-shadow-hover","--adland-media-size","--adland-media-radius","--adland-media-bg","--adland-title-size","--adland-title-weight","--adland-description-size","--adland-badge-radius","--adland-accent-bg","--adland-accent-fg"];function eN(e){let t=getComputedStyle(e),r="";for(let o of tq){let n=t.getPropertyValue(o).trim();n&&(r+=`${o}:${n};`);}return r}var tN=8453,rq="https://0xslots.org/app",nq="68px";function rN(e){return class extends HTMLElement{static observedAttributes=["slot","chain","placement","render-mode","gateway","endpoint","rpc-url","consent","verified","base-link-url","data-ad"];shadowInited=false;cleanupImpression;resolvedSlot;messageHandler;renderToken=0;connectedCallback(){this.render();}disconnectedCallback(){this.teardown();}attributeChangedCallback(){this.isConnected&&this.render();}attr(r){return this.getAttribute(r)??void 0}chainId(){return Number(this.attr("chain")??tN)||tN}teardown(){this.cleanupImpression?.(),this.cleanupImpression=void 0,this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0);}async loadAd(){let r=this.attr("data-ad");if(r)try{return {data:JSON.parse(r),cid:null}}catch{return {data:null,cid:null}}let o=this.attr("slot"),n=this.attr("slot-key");if(!o&&!n)return {data:null,cid:null};let i=DO(this.chainId(),this.attr("rpc-url"));if(!o&&n){let a=await FO(i,n,{gateway:this.attr("gateway"),adModule:this.attr("ad-module")});return a?{data:a.data,cid:a.cid,slot:a.slot}:{data:null,cid:null}}let s=await jO(i,o);return s?wE(s,this.attr("gateway")):{data:null,cid:null}}async render(){let r=++this.renderToken;this.teardown(),this.style.minHeight||(this.style.minHeight=nq);let o;try{o=await this.loadAd();}catch{o={data:null,cid:null};}if(r!==this.renderToken||!this.isConnected)return;let n=o.data?YO(o.data):XO();(this.attr("render-mode")==="inline"?"inline":"isolated")==="inline"?this.renderInline(n,o.data):this.renderIsolated(n,o.data);let s=this.attr("slot")??o.slot;if(this.resolvedSlot=s,s){let a=this.attr("verified")!=null?JO:KO;this.cleanupImpression=a(this,{slot:s,chainId:this.chainId(),placement:this.attr("placement"),cid:o.cid,empty:!o.data,endpoint:this.attr("endpoint"),consent:this.attr("consent")});}}renderInline(r,o){let n=this.shadowRoot??(this.shadowInited?null:this.attachShadow({mode:"open"}));if(!n)return;this.shadowInited=true,n.innerHTML=`<style>${RE}</style>${r}`,n.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderIsolated(r,o){this.replaceChildren();let n=o?QO(o):this.emptyUrl(),i=n?`<a href="${kE(n)}" target="_blank" rel="noopener noreferrer" style="display:block;text-decoration:none;color:inherit">${r}</a>`:r,s=eN(this),a=document.createElement("iframe");a.setAttribute("sandbox","allow-popups allow-popups-to-escape-sandbox allow-scripts"),a.setAttribute("title","Advertisement"),a.setAttribute("scrolling","no"),a.style.cssText="width:100%;border:0;display:block;height:100%",a.srcdoc=`<!doctype html><html><head><meta charset="utf-8"><style>:root{${s}}html,body{margin:0;padding:0}${RE}</style></head><body>${i}<script>(function(){function send(t,x){parent.postMessage(Object.assign({__adland:t},x||{}),'*')}addEventListener('click',function(){send('click')});function size(){send('size',{height:document.documentElement.scrollHeight})}new ResizeObserver(size).observe(document.documentElement);size()})()<\/script></body></html>`;let c=u=>{if(u.source!==a.contentWindow)return;let f=u.data;f?.__adland==="size"&&typeof f.height=="number"?(a.style.height=`${f.height}px`,this.style.minHeight=""):f?.__adland==="click"&&this.handleClick(o,true);};this.messageHandler=c,window.addEventListener("message",c),this.appendChild(a);}baseLink(){return this.attr("base-link-url")??rq}emptyUrl(){let r=this.resolvedSlot??this.attr("slot");return r?`${this.baseLink()}/slots/${r}?chain=${this.chainId()}`:null}handleClick(r,o){let n=this.resolvedSlot??this.attr("slot"),i={chainId:this.chainId(),placement:this.attr("placement"),endpoint:this.attr("endpoint"),consent:this.attr("consent")};r?(n&&IE("click",{slot:n,cid:null,...i}),o||e.performAdAction(r)):n&&(IE("click-empty",{slot:n,...i}),o||e.performEmptyAdAction(n,this.chainId(),this.baseLink()));}}}function nN(e,t="adland-slot"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,rN(e));}nN(BO);
145
+ `;function QO(e){let t=GO(e),r=AE(e),o=qO(e);return `<div part="card" class="adland-card">${t?`<img part="media" class="adland-media" src="${$E(t)}" alt="" loading="lazy" />`:""}<div part="body" class="adland-body">${r?`<p part="title" class="adland-title">${XO(r)}</p>`:""}${o?`<p part="description" class="adland-description">${XO(o)}</p>`:""}</div><span part="label" class="adland-label">Ad</span></div>`}function eN(){return '<div part="card" class="adland-card adland-empty"><span part="description" class="adland-description">Your ad here</span><span part="label" class="adland-label">Ad</span></div>'}function tN(e){return kl(e)}var aq=["--adland-bg","--adland-fg","--adland-muted","--adland-label","--adland-border","--adland-border-hover","--adland-border-width","--adland-radius","--adland-padding","--adland-bleed","--adland-gap","--adland-font","--adland-shadow","--adland-shadow-hover","--adland-transform-hover","--adland-transition","--adland-media-size","--adland-media-radius","--adland-media-bg","--adland-title-size","--adland-title-weight","--adland-description-size","--adland-media-border","--adland-label-size"];function rN(e){let t=getComputedStyle(e),r="";for(let o of aq){let n=t.getPropertyValue(o).trim();n&&(r+=`${o}:${n};`);}return r}var nN=8453,cq="https://0xslots.org/app",uq="68px";function oN(e){return class extends HTMLElement{static observedAttributes=["slot","chain","placement","render-mode","gateway","endpoint","rpc-url","consent","verified","base-link-url","data-ad"];shadowInited=false;framedInAnchor=false;cleanupImpression;resolvedSlot;messageHandler;renderToken=0;connectedCallback(){this.render();}disconnectedCallback(){this.teardown();}attributeChangedCallback(){this.isConnected&&this.render();}attr(r){return this.getAttribute(r)??void 0}chainId(){return Number(this.attr("chain")??nN)||nN}teardown(){this.cleanupImpression?.(),this.cleanupImpression=void 0,this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0);}async loadAd(){let r=this.attr("data-ad");if(r)try{return {data:JSON.parse(r),cid:null}}catch{return {data:null,cid:null}}let o=this.attr("slot"),n=this.attr("slot-key");if(!o&&!n)return {data:null,cid:null};let i=HO(this.chainId(),this.attr("rpc-url"));if(!o&&n){let a=await ZO(i,n,{gateway:this.attr("gateway"),adModule:this.attr("ad-module")});return a?{data:a.data,cid:a.cid,slot:a.slot}:{data:null,cid:null}}let s=await VO(i,o);return s?SE(s,this.attr("gateway")):{data:null,cid:null}}async render(){let r=++this.renderToken;this.teardown(),this.style.minHeight||(this.style.minHeight=uq);let o;try{o=await this.loadAd();}catch{o={data:null,cid:null};}if(r!==this.renderToken||!this.isConnected)return;let n=o.data?QO(o.data):eN(),i=this.attr("render-mode"),s=i==="inline"||i==="light"?i:"isolated";s==="inline"?this.renderInline(n,o.data):s==="light"?this.renderLight(n,o.data):this.renderIsolated(n,o.data);let a=this.attr("slot")??o.slot;if(this.resolvedSlot=a,a){let c=this.attr("verified")!=null?YO:JO;this.cleanupImpression=c(this,{slot:a,chainId:this.chainId(),placement:this.attr("placement"),cid:o.cid,empty:!o.data,endpoint:this.attr("endpoint"),consent:this.attr("consent")});}}renderInline(r,o){let n=this.shadowRoot??(this.shadowInited?null:this.attachShadow({mode:"open"}));if(!n)return;this.shadowInited=true,n.innerHTML=`<style>${OE}</style>${r}`,n.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderLight(r,o){this.innerHTML=r,this.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderIsolated(r,o){this.replaceChildren();let n=o?tN(o):this.emptyUrl();this.framedInAnchor=!!n;let i=n?`<a href="${$E(n)}" target="_blank" rel="noopener noreferrer" style="display:block;text-decoration:none;color:inherit">${r}</a>`:r,s=rN(this),a=document.createElement("iframe");a.setAttribute("sandbox","allow-popups allow-popups-to-escape-sandbox allow-scripts"),a.setAttribute("title","Advertisement"),a.setAttribute("scrolling","no"),a.style.cssText="width:100%;border:0;display:block;height:100%",a.srcdoc=`<!doctype html><html><head><meta charset="utf-8"><style>:root{${s}}html,body{margin:0;padding:0}body{padding:var(--adland-bleed,0)}${OE}</style></head><body>${i}<script>(function(){function send(t,x){parent.postMessage(Object.assign({__adland:t},x||{}),'*')}addEventListener('click',function(){send('click')});function size(){send('size',{height:document.documentElement.scrollHeight})}new ResizeObserver(size).observe(document.documentElement);size()})()<\/script></body></html>`;let c=u=>{if(u.source!==a.contentWindow)return;let f=u.data;f?.__adland==="size"&&typeof f.height=="number"?(a.style.height=`${f.height}px`,this.style.minHeight=""):f?.__adland==="click"&&this.handleClick(o,this.framedInAnchor);};this.messageHandler=c,window.addEventListener("message",c),this.appendChild(a);}baseLink(){return this.attr("base-link-url")??cq}emptyUrl(){let r=this.resolvedSlot??this.attr("slot");return r?`${this.baseLink()}/slots/${r}?chain=${this.chainId()}`:null}handleClick(r,o){let n=this.resolvedSlot??this.attr("slot"),i={chainId:this.chainId(),placement:this.attr("placement"),endpoint:this.attr("endpoint"),consent:this.attr("consent")};r?(n&&TE("click",{slot:n,cid:null,...i}),o||e.performAdAction(r)):n&&(TE("click-empty",{slot:n,...i}),o||e.performEmptyAdAction(n,this.chainId(),this.baseLink()));}}}function iN(e,t="adland-slot"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,oN(e));}iN(LO);
140
146
  /*! Bundled license information:
141
147
 
142
148
  ieee754/index.js: