@adland/embed 0.2.3 → 0.4.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 rN=Object.create;var Cp=Object.defineProperty;var nN=Object.getOwnPropertyDescriptor;var oN=Object.getOwnPropertyNames;var iN=Object.getPrototypeOf,sN=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});},FE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of oN(t))!sN.call(e,n)&&n!==r&&Cp(e,n,{get:()=>t[n],enumerable:!(o=nN(t,n))||o.enumerable});return e};var Ko=(e,t,r)=>(r=e!=null?rN(iN(e)):{},FE(t||!e||!e.__esModule?Cp(r,"default",{value:e,enumerable:true}):r,e)),HE=e=>FE(Cp({},"__esModule",{value:true}),e);var wI=Kr(Xm=>{Xm.byteLength=rL;Xm.toByteArray=oL;Xm.fromByteArray=aL;var So=[],Nn=[],tL=typeof Uint8Array<"u"?Uint8Array:Array,xw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ca=0,xI=xw.length;ca<xI;++ca)So[ca]=xw[ca],Nn[xw.charCodeAt(ca)]=ca;var ca,xI;Nn[45]=62;Nn[95]=63;function vI(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 rL(e){var t=vI(e),r=t[0],o=t[1];return (r+o)*3/4-o}function nL(e,t,r){return (t+r)*3/4-r}function oL(e){var t,r=vI(e),o=r[0],n=r[1],i=new tL(nL(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 iL(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function sL(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(iL(o));return n.join("")}function aL(e){for(var t,r=e.length,o=r%3,n=[],i=16383,s=0,a=r-o;s<a;s+=i)n.push(sL(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 _I=Kr(vw=>{vw.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)};vw.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 ww=wI(),Bc=_I(),EI=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;zc.Buffer=V;zc.SlowBuffer=pL;zc.INSPECT_MAX_BYTES=50;var Qm=2147483647;zc.kMaxLength=Qm;V.TYPED_ARRAY_SUPPORT=cL();!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 cL(){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 Iw(e)}return kI(e,t,r)}V.poolSize=8192;function kI(e,t,r){if(typeof e=="string")return fL(e,t);if(ArrayBuffer.isView(e))return lL(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 Ew(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=dL(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 kI(e,t,r)};Object.setPrototypeOf(V.prototype,Uint8Array.prototype);Object.setPrototypeOf(V,Uint8Array);function RI(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 uL(e,t,r){return RI(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 uL(e,t,r)};function Iw(e){return RI(e),ii(e<0?0:Aw(e)|0)}V.allocUnsafe=function(e){return Iw(e)};V.allocUnsafeSlow=function(e){return Iw(e)};function fL(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!V.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=TI(e,t)|0,o=ii(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function _w(e){let t=e.length<0?0:Aw(e.length)|0,r=ii(t);for(let o=0;o<t;o+=1)r[o]=e[o]&255;return r}function lL(e){if(Io(e,Uint8Array)){let t=new Uint8Array(e);return Ew(t.buffer,t.byteOffset,t.byteLength)}return _w(e)}function Ew(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 dL(e){if(V.isBuffer(e)){let t=Aw(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"||Rw(e.length)?ii(0):_w(e);if(e.type==="Buffer"&&Array.isArray(e.data))return _w(e.data)}function Aw(e){if(e>=Qm)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Qm.toString(16)+" bytes");return e|0}function pL(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 TI(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 Sw(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return UI(e).length;default:if(n)return o?-1:Sw(e).length;t=(""+t).toLowerCase(),n=true;}}V.byteLength=TI;function mL(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 SL(this,t,r);case "utf8":case "utf-8":return OI(this,t,r);case "ascii":return _L(this,t,r);case "latin1":case "binary":return EL(this,t,r);case "base64":return vL(this,t,r);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return IL(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=true;}}V.prototype._isBuffer=true;function ua(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)ua(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)ua(this,r,r+3),ua(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)ua(this,r,r+7),ua(this,r+1,r+6),ua(this,r+2,r+5),ua(this,r+3,r+4);return this};V.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?OI(this,0,t):mL.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+">"};EI&&(V.prototype[EI]=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 $I(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,Rw(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:SI(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):SI(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function SI(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 $I(this,t,r,o,true)};V.prototype.lastIndexOf=function(t,r,o){return $I(this,t,r,o,false)};function hL(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(Rw(a))return s;e[r+s]=a;}return s}function gL(e,t,r,o){return eh(Sw(t,e.length-r),e,r,o)}function yL(e,t,r,o){return eh(TL(t),e,r,o)}function bL(e,t,r,o){return eh(UI(t),e,r,o)}function xL(e,t,r,o){return eh($L(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 hL(this,t,r,o);case "utf8":case "utf-8":return gL(this,t,r,o);case "ascii":case "latin1":case "binary":return yL(this,t,r,o);case "base64":return bL(this,t,r,o);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return xL(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 vL(e,t,r){return t===0&&r===e.length?ww.fromByteArray(e):ww.fromByteArray(e.slice(t,r))}function OI(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 wL(o)}var II=4096;function wL(e){let t=e.length;if(t<=II)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=II));return r}function _L(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 EL(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 SL(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+=OL[e[i]];return n}function IL(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=Ji(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=Ji(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=Ji(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=Ji(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 NI(e,t,r,o,n){LI(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 PI(e,t,r,o,n){LI(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=Ji(function(t,r=0){return NI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeBigUInt64BE=Ji(function(t,r=0){return PI(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=Ji(function(t,r=0){return NI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V.prototype.writeBigInt64BE=Ji(function(t,r=0){return PI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function BI(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 CI(e,t,r,o,n){return t=+t,r=r>>>0,n||BI(e,t,r,4),Bc.write(e,t,r,o,23,4),r+4}V.prototype.writeFloatLE=function(t,r,o){return CI(this,t,r,true,o)};V.prototype.writeFloatBE=function(t,r,o){return CI(this,t,r,false,o)};function zI(e,t,r,o,n){return t=+t,r=r>>>0,n||BI(e,t,r,8),Bc.write(e,t,r,o,52,8),r+8}V.prototype.writeDoubleLE=function(t,r,o){return zI(this,t,r,true,o)};V.prototype.writeDoubleBE=function(t,r,o){return zI(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 kw(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}`}};}kw("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);kw("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);kw("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=AI(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=AI(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function AI(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 AL(e,t,r){Cc(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&kl(t,e.length-(r+1));}function LI(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)}AL(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 kL=/[^+/0-9A-Za-z-_]/g;function RL(e){if(e=e.split("=")[0],e=e.trim().replace(kL,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function Sw(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 TL(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function $L(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 UI(e){return ww.toByteArray(RL(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 Rw(e){return e!==e}var OL=(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 Ji(e){return typeof BigInt>"u"?NL:e}function NL(){throw new Error("BigInt not supported")}});var fa,MI=F(()=>{fa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;});function PL(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function la(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ao(e,...t){if(!PL(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 DI(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");la(e.outputLen),la(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 jI(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 CL(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function zL(e){for(let t=0;t<e.length;t++)e[t]=CL(e[t]);return e}function FI(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function da(e){return typeof e=="string"&&(e=FI(e)),Ao(e),e}function $w(...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(da(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Lc(e=32){if(fa&&typeof fa.getRandomValues=="function")return fa.getRandomValues(new Uint8Array(e));if(fa&&typeof fa.randomBytes=="function")return Uint8Array.from(fa.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var BL,Tw,Yi,ai=F(()=>{MI();BL=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;Tw=BL?e=>e:zL;Yi=class{};});function LL(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 HI(e,t,r){return e&t^~e&r}function VI(e,t,r){return e&t^e&r^t&r}var $l,ci,hr,ZI=F(()=>{ai();$l=class extends Yi{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=da(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;LL(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 UL(e,t=false){return t?{h:Number(e&nh),l:Number(e>>GI&nh)}:{h:Number(e>>GI&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}=UL(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,GI,Ow,Nw,pa,ma,Ol,Nl,qI,WI,KI,JI,YI,XI,QI,eA,tA,rA,Pw=F(()=>{nh=BigInt(4294967295),GI=BigInt(32);Ow=(e,t,r)=>e>>>r,Nw=(e,t,r)=>e<<32-r|t>>>r,pa=(e,t,r)=>e>>>r|t<<32-r,ma=(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,qI=(e,t,r)=>e<<r|t>>>32-r,WI=(e,t,r)=>t<<r|e>>>32-r,KI=(e,t,r)=>t<<r-32|e>>>64-r,JI=(e,t,r)=>e<<r-32|t>>>64-r;YI=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),XI=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,QI=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),eA=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,tA=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),rA=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var DL,Xi,ih,nA,jL,FL,Qi,es,Bw,ha,oA,sh=F(()=>{ZI();Pw();ai();DL=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]),Xi=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)Xi[d]=t.getUint32(r,false);for(let d=16;d<64;d++){let g=Xi[d-15],h=Xi[d-2],v=ro(g,7)^ro(g,18)^g>>>3,E=ro(h,17)^ro(h,19)^h>>>10;Xi[d]=E+Xi[d-7]+v+Xi[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+HI(a,c,u)+DL[d]+Xi[d]|0,E=(ro(o,2)^ro(o,13)^ro(o,22))+VI(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(Xi);}destroy(){this.set(0,0,0,0,0,0,0,0),Pn(this.buffer);}},nA=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))),jL=nA[0],FL=nA[1],Qi=new Uint32Array(80),es=new Uint32Array(80),Bw=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)Qi[O]=t.getUint32(r),es[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){let I=Qi[O-15]|0,P=es[O-15]|0,L=pa(I,P,1)^pa(I,P,8)^Ow(I,P,7),C=ma(I,P,1)^ma(I,P,8)^Nw(I,P,7),D=Qi[O-2]|0,q=es[O-2]|0,H=pa(D,q,19)^Ol(D,q,61)^Ow(D,q,6),Z=ma(D,q,19)^Nl(D,q,61)^Nw(D,q,6),re=QI(C,Z,es[O-7],es[O-16]),S=eA(re,L,H,Qi[O-7],Qi[O-16]);Qi[O]=S|0,es[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=pa(d,g,14)^pa(d,g,18)^Ol(d,g,41),P=ma(d,g,14)^ma(d,g,18)^Nl(d,g,41),L=d&h^~d&E,C=g&v^~g&R,D=tA(N,P,C,FL[O],es[O]),q=rA(D,$,I,L,jL[O],Qi[O]),H=D|0,Z=pa(o,n,28)^Ol(o,n,34)^Ol(o,n,39),re=ma(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=YI(H,re,l);o=XI(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(Qi,es);}destroy(){Pn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},ha=Tl(()=>new ih),oA=Tl(()=>new Bw);});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 aA(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Uw:BigInt("0x"+e)}function ts(e){if(fi(e),cA)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=HL[e[r]];return t}function iA(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(cA)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=iA(e.charCodeAt(i)),a=iA(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 aA(ts(e))}function ga(e){return fi(e),aA(ts(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 ya(e,t,r){return Cw(e)&&Cw(t)&&Cw(r)&&t<=e&&e<r}function Dr(e,t,r,o){if(!ya(t,r,o))throw new Error("expected valid "+e+": "+r+" <= n < "+o+", got "+t)}function uA(e){let t;for(t=0;e>Uw;e>>=Lw,t+=1);return t}function fA(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=zw(e),n=zw(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=zw(0))=>{n=a(sA([0]),d),o=a(),d.length!==0&&(n=a(sA([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=VL[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 Uw,Lw,cA,HL,ui,Cw,ba,zw,sA,VL,xa=F(()=>{Uw=BigInt(0),Lw=BigInt(1);cA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",HL=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};Cw=e=>typeof e=="bigint"&&Uw<=e;ba=e=>(Lw<<BigInt(e))-Lw,zw=e=>new Uint8Array(e),sA=e=>Uint8Array.from(e);VL={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 Le(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=Le(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 Le(n,t)}function hA(e,t){let r=(e.ORDER+cr)/dA,o=e.pow(t,r);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function GL(e,t){let r=(e.ORDER-pA)/mA,o=e.mul(t,va),n=e.pow(o,r),i=e.mul(t,n),s=e.mul(e.mul(i,va),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 qL(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-cr,r=0;for(;t%va===jr;)t/=va,r++;let o=va,n=di(e);for(;lA(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return hA;let i=n.pow(o,t),s=(t+cr)/va;return function(c,u){if(c.is0(u))return u;if(lA(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 WL(e){return e%dA===ZL?hA:e%mA===pA?GL:qL(e)}function uh(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=KL.reduce((o,n)=>(o[n]="function",o),t);return no(e,r)}function JL(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 lA(e,t){let r=(e.ORDER-cr)/va,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 Mw(e,t){t!==void 0&&la(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}=Mw(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:ba(n),ZERO:jr,ONE:cr,create:c=>Le(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=>Le(-c,e),eql:(c,u)=>c===u,sqr:c=>Le(c*c,e),add:(c,u)=>Le(c+u,e),sub:(c,u)=>Le(c-u,e),mul:(c,u)=>Le(c*u,e),pow:(c,u)=>JL(a,c,u),div:(c,u)=>Le(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=WL(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?ga(c):rn(c)},invertBatch:c=>li(a,c),cmov:(c,u,f)=>f?u:c});return Object.freeze(a)}function yA(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 Dw(e){let t=yA(e);return t+Math.ceil(t/2)}function bA(e,t,r=false){let o=e.length,n=yA(t),i=Dw(t);if(o<16||o<i||o>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+o);let s=r?ga(e):rn(e),a=Le(s,t-cr)+cr;return r?Mc(a,n):To(a,n)}var jr,cr,va,ZL,dA,pA,mA,gA,KL,wa=F(()=>{ai();xa();jr=BigInt(0),cr=BigInt(1),va=BigInt(2),ZL=BigInt(3),dA=BigInt(4),pA=BigInt(5),mA=BigInt(8);gA=(e,t)=>(Le(e,t)&cr)===cr,KL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];});function jw(e,t){let r=t.negate();return e?r:t}function wA(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Fw(e,t){wA(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=ba(e),s=BigInt(e);return {windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function vA(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+=Zw);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 YL(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 XL(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 Vw(e){return _A.get(e)||1}function fh(e,t){return {constTimeNegate:jw,hasPrecomputes(r){return Vw(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>xA;)o&Zw&&(n=n.add(i)),i=i.double(),o>>=Zw;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=Fw(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=Fw(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:v}=vA(n,c,a);n=u,d?s=s.add(jw(h,o[v])):i=i.add(jw(g,o[f]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=Fw(r,t);for(let a=0;a<s.windows&&n!==xA;a++){let{nextN:c,offset:u,isZero:f,isNeg:d}=vA(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=Hw.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&Hw.set(o,n(i))),i},wNAFCached(r,o,n){let i=Vw(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=Vw(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){wA(o,t),_A.set(r,o),Hw.delete(r);}}}function lh(e,t,r,o){YL(r,e),XL(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=uA(BigInt(n)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let u=ba(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({...Mw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var xA,Zw,Hw,_A,Gw=F(()=>{wa();xa();xA=BigInt(0),Zw=BigInt(1);Hw=new WeakMap,_A=new WeakMap;});function rs(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 nU(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 oU(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,rs(t.length,1)),c=rs(0,i),u=rs(r,2),f=new Array(s),d=o(ar(c,e,u,rs(0,1),a));f[0]=o(ar(d,rs(1,1),a));for(let h=1;h<=s;h++){let v=[nU(d,f[h-1]),rs(h+1,1),a];f[h]=o(ar(...v));}return ar(...f).slice(0,r)}function iU(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(rs(r,2)).update(t).update(rs(t.length,1)).digest()}function IA(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=oU(e,u,g,s);else if(a==="xof")h=iU(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[$]=Le(rU(O),o);}v[E]=R;}return v}function AA(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 kA(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=IA(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=IA(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 rU,RA=F(()=>{wa();xa();rU=rn;});var NA=Kr(()=>{});var Kw=Kr((PA,Ww)=>{(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=NA().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 K=G.modrn(A).toString(l);G=G.idivn(A),G.isZero()?y=K+y:y=d[p-K.length]+K+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,K=Math.min(p,l.length-1),Q=Math.max(0,p-S.length+1);Q<=K;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,K=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,Ui=b[4]|0,pt=Ui&8191,gt=Ui>>>13,Bp=b[5]|0,yt=Bp&8191,bt=Bp>>>13,RE=b[6]|0,At=RE&8191,kt=RE>>>13,TE=b[7]|0,Rt=TE&8191,Tt=TE>>>13,$E=b[8]|0,$t=$E&8191,Ot=$E>>>13,OE=b[9]|0,Nt=OE&8191,Pt=OE>>>13,NE=x[0]|0,Bt=NE&8191,Ct=NE>>>13,PE=x[1]|0,zt=PE&8191,Lt=PE>>>13,BE=x[2]|0,Ut=BE&8191,Mt=BE>>>13,CE=x[3]|0,Dt=CE&8191,jt=CE>>>13,zE=x[4]|0,Ft=zE&8191,Ht=zE>>>13,LE=x[5]|0,Vt=LE&8191,Zt=LE>>>13,UE=x[6]|0,Gt=UE&8191,qt=UE>>>13,ME=x[7]|0,Wt=ME&8191,Kt=ME>>>13,DE=x[8]|0,Jt=DE&8191,Yt=DE>>>13,jE=x[9]|0,Xt=jE&8191,Qt=jE>>>13;y.negative=l.negative^m.negative,y.length=19,w=Math.imul(K,Bt),p=Math.imul(K,Ct),p=p+Math.imul(Q,Bt)|0,A=Math.imul(Q,Ct);var jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(jy>>>26)|0,jy&=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(K,zt)|0,p=p+Math.imul(K,Lt)|0,p=p+Math.imul(Q,zt)|0,A=A+Math.imul(Q,Lt)|0;var Fy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Fy>>>26)|0,Fy&=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(K,Ut)|0,p=p+Math.imul(K,Mt)|0,p=p+Math.imul(Q,Ut)|0,A=A+Math.imul(Q,Mt)|0;var Hy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Hy>>>26)|0,Hy&=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(K,Dt)|0,p=p+Math.imul(K,jt)|0,p=p+Math.imul(Q,Dt)|0,A=A+Math.imul(Q,jt)|0;var Vy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Vy>>>26)|0,Vy&=67108863,w=Math.imul(pt,Bt),p=Math.imul(pt,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(K,Ft)|0,p=p+Math.imul(K,Ht)|0,p=p+Math.imul(Q,Ft)|0,A=A+Math.imul(Q,Ht)|0;var Zy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Zy>>>26)|0,Zy&=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(pt,zt)|0,p=p+Math.imul(pt,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(K,Vt)|0,p=p+Math.imul(K,Zt)|0,p=p+Math.imul(Q,Vt)|0,A=A+Math.imul(Q,Zt)|0;var Gy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Gy>>>26)|0,Gy&=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(pt,Ut)|0,p=p+Math.imul(pt,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(K,Gt)|0,p=p+Math.imul(K,qt)|0,p=p+Math.imul(Q,Gt)|0,A=A+Math.imul(Q,qt)|0;var qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(qy>>>26)|0,qy&=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(pt,Dt)|0,p=p+Math.imul(pt,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(K,Wt)|0,p=p+Math.imul(K,Kt)|0,p=p+Math.imul(Q,Wt)|0,A=A+Math.imul(Q,Kt)|0;var Wy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Wy>>>26)|0,Wy&=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(pt,Ft)|0,p=p+Math.imul(pt,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(K,Jt)|0,p=p+Math.imul(K,Yt)|0,p=p+Math.imul(Q,Jt)|0,A=A+Math.imul(Q,Yt)|0;var Ky=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ky>>>26)|0,Ky&=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(pt,Vt)|0,p=p+Math.imul(pt,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(K,Xt)|0,p=p+Math.imul(K,Qt)|0,p=p+Math.imul(Q,Xt)|0,A=A+Math.imul(Q,Qt)|0;var Jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Jy>>>26)|0,Jy&=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(pt,Gt)|0,p=p+Math.imul(pt,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 Yy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Yy>>>26)|0,Yy&=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(pt,Wt)|0,p=p+Math.imul(pt,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 Xy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Xy>>>26)|0,Xy&=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(pt,Jt)|0,p=p+Math.imul(pt,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 Qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Qy>>>26)|0,Qy&=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(pt,Xt)|0,p=p+Math.imul(pt,Qt)|0,p=p+Math.imul(gt,Xt)|0,A=A+Math.imul(gt,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,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 tb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(tb>>>26)|0,tb&=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 rb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(rb>>>26)|0,rb&=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 nb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(nb>>>26)|0,nb&=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 ob=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(ob>>>26)|0,ob&=67108863,w=Math.imul(Nt,Xt),p=Math.imul(Nt,Qt),p=p+Math.imul(Pt,Xt)|0,A=Math.imul(Pt,Qt);var ib=(k+w|0)+((p&8191)<<13)|0;return k=(A+(p>>>13)|0)+(ib>>>26)|0,ib&=67108863,_[0]=jy,_[1]=Fy,_[2]=Hy,_[3]=Vy,_[4]=Zy,_[5]=Gy,_[6]=qy,_[7]=Wy,_[8]=Ky,_[9]=Jy,_[10]=Yy,_[11]=Xy,_[12]=Qy,_[13]=eb,_[14]=tb,_[15]=rb,_[16]=nb,_[17]=ob,_[18]=ib,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,K=l.words[p]|0,Q=G*K,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 K=w-1;K>=0;K--){var Q=(b.words[x.length+K]|0)*67108864+(b.words[x.length+K-1]|0);for(Q=Math.min(Q/_|0,67108863),b._ishlnsubmul(x,Q,K);b.negative!==0;)Q--,b.negative=0,b._ishlnsubmul(x,1,K),b.isZero()||(b.negative^=1);p&&(p.words[K]=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,K=1;(m.words[0]&K)===0&&G<26;++G,K<<=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)),K=this.pow(l,b),Q=x;K.cmp(_)!==0;){for(var ae=K,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(),K=K.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 K=A>>G&1;if(_!==b[0]&&(_=this.sqr(_)),K===0&&k===0){w=0;continue}k<<=1,k|=K,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 Ww>"u"||Ww,PA);});var zA=Kr((Jw,CA)=>{var dh=Rl(),Oo=dh.Buffer;function BA(e,t){for(var r in e)t[r]=e[r];}Oo.from&&Oo.alloc&&Oo.allocUnsafe&&Oo.allocUnsafeSlow?CA.exports=dh:(BA(dh,Jw),Jw.Buffer=Ea);function Ea(e,t,r){return Oo(e,t,r)}Ea.prototype=Object.create(Oo.prototype);BA(Oo,Ea);Ea.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Oo(e,t,r)};Ea.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};Ea.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Oo(e)};Ea.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return dh.SlowBuffer(e)};});var UA=Kr((CY,LA)=>{var ph=zA().Buffer;function pU(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}}LA.exports=pU;});var Yw=Kr((zY,MA)=>{var mU=UA(),hU="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";MA.exports=mU(hU);});var DA=Kr(e_=>{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 gU(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 yU(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 Qw(e){this.tokens=[].slice.call(e);}Qw.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 Xw(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 bU({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new Qw(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),yU(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 xU(this._options)),this._streaming=!!r.stream;for(var o=[],n=new Qw(gU(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 bU(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,Xw(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 Xw(t);return r=r<<6*n,null}if(!pi(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),Xw(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 xU(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};}e_.TextEncoder=yh;e_.TextDecoder=gh;});var ZA=Kr(Je=>{var vU=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];})),wU=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},_U=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)&&vU(t,e,r);return wU(t,e),t},jA=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 ns=jA(Kw()),FA=jA(Yw()),EU=_U(DA()),SU=typeof TextDecoder!="function"?EU.TextDecoder:TextDecoder,IU=new SU("utf-8",{fatal:true});function AU(e){return typeof e=="string"&&(e=Buffer.from(e,"utf8")),FA.default.encode(Buffer.from(e))}Je.baseEncode=AU;function kU(e){return Buffer.from(FA.default.decode(e))}Je.baseDecode=kU;var t_=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(t_),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(t_)]));}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 ns.default(t).toArray("le",8)));}writeU128(t){this.maybeResize(),this.writeBuffer(Buffer.from(new ns.default(t).toArray("le",16)));}writeU256(t){this.maybeResize(),this.writeBuffer(Buffer.from(new ns.default(t).toArray("le",32)));}writeU512(t){this.maybeResize(),this.writeBuffer(Buffer.from(new ns.default(t).toArray("le",64)));}writeBuffer(t){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),t,Buffer.alloc(t_)]),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 ns.default(t,"le")}readU128(){let t=this.readBuffer(16);return new ns.default(t,"le")}readU256(){let t=this.readBuffer(32);return new ns.default(t,"le")}readU512(){let t=this.readBuffer(64);return new ns.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 IU.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 HA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Sa(e,t,r,o,n){try{if(typeof o=="string")n[`write${HA(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++)Sa(e,null,r[i],o[0],n);}else n.writeArray(r,i=>{Sa(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),Sa(e,t,r,o.type,n));break}case "map":{n.writeU32(r.size),r.forEach((i,s)=>{Sa(e,t,s,o.key,n),Sa(e,t,i,o.value,n);});break}default:throw new gr(`FieldType ${o} unrecognized`)}else VA(e,r,n);}catch(i){throw i instanceof gr&&i.addToFieldPath(t),i}}function VA(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])=>{Sa(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),Sa(e,s,t[s],a,r);break}}}else throw new gr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function RU(e,t,r=xh){let o=new r;return VA(e,t,o),o.toArray()}Je.serialize=RU;function Ia(e,t,r,o){try{if(typeof r=="string")return o[`read${HA(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(Ia(e,null,r[0],o));return n}else return o.readArray(()=>Ia(e,t,r[0],o))}if(r.kind==="option")return o.readU8()?Ia(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=Ia(e,t,r.key,o),c=Ia(e,t,r.value,o);n.set(a,c);}return n}return r_(e,r,o)}catch(n){throw n instanceof gr&&n.addToFieldPath(t),n}}function r_(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]=Ia(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=Ia(e,i,s,r);return new t({[i]:a})}throw new gr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function TU(e,t,r,o=Hr){let n=new o(r),i=r_(e,t,n);if(n.offset<r.length)throw new gr(`Unexpected ${r.length-n.offset} bytes after deserialized data`);return i}Je.deserialize=TU;function $U(e,t,r,o=Hr){let n=new o(r);return r_(e,t,n)}Je.deserializeUnchecked=$U;});var s_=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 o_=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),o_.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 i_(e,t){return t.property?e+"["+t.property+"]":e}M.nameWithProperty=i_;function OU(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=OU;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 os=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=os;var n_=Math.pow(2,32);function Lh(e){let t=Math.floor(e/n_),r=e-t*n_;return {hi32:t,lo32:r}}function Uh(e,t){return e*n_+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(i_("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(i_("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=o_.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=o_.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 os(2,e));M.s24be=(e=>new os(3,e));M.s32be=(e=>new os(4,e));M.s40be=(e=>new os(5,e));M.s48be=(e=>new os(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(Zj)}var Fh,Zj,y_=F(()=>{Zj=new Uint8Array(16);});var fk,lk=F(()=>{fk=/^(?:[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 Gj(e){return typeof e=="string"&&fk.test(e)}var ss,Gl=F(()=>{lk();ss=Gj;});function qj(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(!ss(r))throw TypeError("Stringified UUID is invalid");return r}var yr,Hh,as,ql=F(()=>{Gl();yr=[];for(Hh=0;Hh<256;++Hh)yr.push((Hh+256).toString(16).substr(1));as=qj;});function Wj(e,t,r){var o=t&&r||0,n=t||new Array(16);e=e||{};var i=e.node||dk,s=e.clockseq!==void 0?e.clockseq:b_;if(i==null||s==null){var a=e.random||(e.rng||Zl)();i==null&&(i=dk=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=b_=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:v_+1,f=c-x_+(u-v_)/1e4;if(f<0&&e.clockseq===void 0&&(s=s+1&16383),(f<0||c>x_)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");x_=c,v_=u,b_=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||as(n)}var dk,b_,x_,v_,pk,mk=F(()=>{y_();ql();x_=0,v_=0;pk=Wj;});function Kj(e){if(!ss(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,w_=F(()=>{Gl();Vh=Kj;});function Jj(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=Jj(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 as(c)}try{o.name=e;}catch{}return o.DNS=Yj,o.URL=Xj,o}var Yj,Xj,__=F(()=>{ql();w_();Yj="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Xj="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function Qj(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 e7(t7(r7(e),e.length*8))}function e7(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 hk(e){return (e+64>>>9<<4)+14+1}function t7(e,t){e[t>>5]|=128<<t%32,e[hk(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=cs(r,a),o=cs(o,c),n=cs(n,u),i=cs(i,f);}return [r,o,n,i]}function r7(e){if(e.length===0)return [];for(var t=e.length*8,r=new Uint32Array(hk(t)),o=0;o<t;o+=8)r[o>>5]|=(e[o/8]&255)<<o%32;return r}function cs(e,t){var r=(e&65535)+(t&65535),o=(e>>16)+(t>>16)+(r>>16);return o<<16|r&65535}function n7(e,t){return e<<t|e>>>32-t}function Gh(e,t,r,o,n,i){return cs(n7(cs(cs(t,e),cs(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 gk,yk=F(()=>{gk=Qj;});var o7,bk,xk=F(()=>{__();yk();o7=Zh("v3",48,gk),bk=o7;});function i7(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 as(o)}var vk,wk=F(()=>{y_();ql();vk=i7;});function s7(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 E_(e,t){return e<<t|e>>>32-t}function a7(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]=E_(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=E_(E,5)+s7(P,R,$,N)+O+t[P]+g[I]>>>0;O=N,N=$,$=E_(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 _k,Ek=F(()=>{_k=a7;});var c7,Sk,Ik=F(()=>{__();Ek();c7=Zh("v5",80,_k),Sk=c7;});var Ak,kk=F(()=>{Ak="00000000-0000-0000-0000-000000000000";});function u7(e){if(!ss(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Rk,Tk=F(()=>{Gl();Rk=u7;});var S_={};Er(S_,{NIL:()=>Ak,parse:()=>Vh,stringify:()=>as,v1:()=>pk,v3:()=>bk,v4:()=>vk,v5:()=>Sk,validate:()=>ss,version:()=>Rk});var I_=F(()=>{mk();xk();wk();Ik();kk();Tk();Gl();ql();w_();});var Ok=Kr((zX,$k)=>{var f7=(I_(),HE(S_)).v4,l7=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 f7()};i.id=s(i,o);}else n===2&&r===null?o.notificationIdNull&&(i.id=null):i.id=r;return i};$k.exports=l7;});var Pk=Kr((LX,Nk)=>{var d7=(I_(),HE(S_)).v4,p7=Ok(),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 d7()},version:typeof t.version<"u"?t.version:2,notificationIdNull:typeof t.notificationIdNull=="boolean"?t.notificationIdNull:false},this.callServer=e;};Nk.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=p7(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 Ck=Kr((UX,A_)=>{var m7=Object.prototype.hasOwnProperty,Vr="~";function Kl(){}Object.create&&(Kl.prototype=Object.create(null),new Kl().__proto__||(Vr=false));function h7(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function Bk(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new h7(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)m7.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 Bk(this,t,r,o,false)};Or.prototype.once=function(t,r,o){return Bk(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 A_<"u"&&(A_.exports=Or);});function S7(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=Lk(u,f,1)^r[a],g=Uk(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=Dk[s],c=Lk(n,i,a),u=Uk(n,i,a),f=Mk[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]^=_7[o],e[1]^=E7[o];}Pn(r);}var y7,Yl,b7,x7,v7,w7,Mk,Dk,jk,Fk,_7,E7,Lk,Uk,k_,I7,Ra,Wh=F(()=>{Pw();ai();y7=BigInt(0),Yl=BigInt(1),b7=BigInt(2),x7=BigInt(7),v7=BigInt(256),w7=BigInt(113),Mk=[],Dk=[],jk=[];for(let e=0,t=Yl,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Mk.push(2*(5*o+r)),Dk.push((e+1)*(e+2)/2%64);let n=y7;for(let i=0;i<7;i++)t=(t<<Yl^(t>>x7)*w7)%v7,t&b7&&(n^=Yl<<(Yl<<BigInt(i))-Yl);jk.push(n);}Fk=oh(jk,true),_7=Fk[0],E7=Fk[1],Lk=(e,t,r)=>r>32?KI(e,t,r):qI(e,t,r),Uk=(e,t,r)=>r>32?JI(e,t,r):WI(e,t,r);k_=class e extends Yi{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,la(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=jI(this.state);}clone(){return this._cloneInto()}keccak(){Tw(this.state32),S7(this.state32,this.rounds),Tw(this.state32),this.posOut=0,this.pos=0;}update(t){si(this),t=da(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 la(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}},I7=(e,t,r)=>Tl(()=>new k_(t,e,r)),Ra=I7(1,136,256/8);});var Kh,R_,Hk=F(()=>{ai();Kh=class extends Yi{constructor(t,r){super(),this.finished=false,this.destroyed=false,DI(t);let o=da(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();}},R_=(e,t,r)=>new Kh(e,t).update(r).digest();R_.create=(e,t)=>new Kh(e,t);});function Vk(e){e.lowS!==void 0&&Ro("lowS",e.lowS),e.prehash!==void 0&&Ro("prehash",e.prehash);}function A7(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 T_(e,t){return ts(To(e,t))}function k7(e){let t=A7(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),O_),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 ya(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=ts(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=Le(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),ts(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 R7(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 Zk(e){let t=R7(e),{Fp:r,n:o,nByteLength:n,nBitLength:i}=t,s=r.BYTES+1,a=2*r.BYTES+1;function c(m){return Le(m,o)}function u(m){return ch(m,o)}let{ProjectivePoint:f,normPrivateKeyToScalar:d,weierstrassEquation:g,isWithinCurveOrder:h}=k7({...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(!ya(_,Ye,r.ORDER))throw new Error("Point is not on curve");let k=g(_),w;try{w=r.sqrt(k);}catch(G){let K=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+K)}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+T_(w,r.BYTES)),G=u(w),K=c(-k*G),Q=c(x*G),ae=f.BASE.multiplyAndAddUnsafe(A,K,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 T_(this.r,y)+T_(this.s,y)}}let N={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=Dw(t.n);return bA(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=ba(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),Vk(b),w&&(m=Ge("prehashed msgHash",x(m)));let A=C(m),G=d(y),K=[q(G),q(A)];if(p!=null&&p!==false){let ye=p===true?_(r.BYTES):p;K.push(Ge("extraEntropy",ye));}let Q=ar(...K),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),Ui=Ce;return k&&v(Ce)&&(Ui=E(Ce),je^=1),new $(tr,Ui,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 fA(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(Vk(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 K,Q;try{if(G&&(K=new $(_.r,_.s)),A){try{p!=="compact"&&(K=$.fromDER(_));}catch(je){if(!(je instanceof hi.Err))throw je}!K&&p!=="der"&&(K=$.fromCompact(_));}Q=f.fromHex(b);}catch{return false}if(!K||k&&K.hasHighS())return false;w&&(y=t.hash(y));let{r:ae,s:he}=K,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 T7(e,t){let r=e.ORDER,o=so;for(let v=r-Ye;v%us===so;v/=us)o+=Ye;let n=o,i=us<<n-Ye-Ye,s=i*us,a=(r-Ye)/s,c=(a-Ye)/us,u=s-Ye,f=i,d=e.pow(t,a),g=e.pow(t,(a+Ye)/us),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-us;C=us<<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%O_===Xl){let v=(e.ORDER-Xl)/O_,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 Gk(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=T7(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 $_,hi,so,Ye,us,Xl,O_,N_=F(()=>{Gw();wa();xa();$_=class extends Error{constructor(t=""){super(t);}},hi={Err:$_,_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),us=BigInt(2),Xl=BigInt(3),O_=BigInt(4);});function $7(e){return {hash:e,hmac:(t,...r)=>R_(e,t,$w(...r)),randomBytes:Lc}}function qk(e,t){let r=o=>Zk({...e,...$7(o)});return {...r(t),create:r}}var Wk=F(()=>{Hk();ai();N_();});var tR={};Er(tR,{encodeToCurve:()=>U7,hashToCurve:()=>L7,schnorr:()=>B7,secp256k1:()=>xn,secp256k1_hasher:()=>M_});function Yk(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(!fs.eql(fs.sqr(L),e))throw new Error("Cannot find square root");return L}function Xh(e,...t){let r=Jk[e];if(r===void 0){let o=ha(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ar(o,o),Jk[e]=r;}return ha(ar(r,...t))}function C_(e){let t=xn.utils.normPrivateKeyToScalar(e),r=U_.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:ed(-t),bytes:L_(r)}}function Xk(e){Dr("x",e,Ql,td);let t=P_(e*e),r=P_(t*e+BigInt(7)),o=Yk(r);o%Yh!==z_&&(o=P_(-o));let n=new U_(e,o,Ql);return n.assertValidity(),n}function Qk(...e){return ed(Wc(Xh("BIP0340/challenge",...e)))}function N7(e){return C_(e).bytes}function P7(e,t,r=Lc(32)){let o=Ge("message",e),{bytes:n,scalar:i}=C_(t),s=Ge("auxRand",r,32),a=B_(i^Wc(Xh("BIP0340/aux",s))),c=Xh("BIP0340/nonce",a,n,o),u=ed(Wc(c));if(u===z_)throw new Error("sign failed: k is zero");let{bytes:f,scalar:d}=C_(u),g=Qk(f,n,o),h=new Uint8Array(64);if(h.set(f,0),h.set(B_(ed(d+g*i)),32),!eR(h,o,n))throw new Error("sign: Invalid signature produced");return h}function eR(e,t,r){let o=Ge("signature",e,64),n=Ge("message",t),i=Ge("publicKey",r,32);try{let s=Xk(Wc(i)),a=Wc(o.subarray(0,32));if(!ya(a,Ql,td))return !1;let c=Wc(o.subarray(32,64));if(!ya(c,Ql,Jh))return !1;let u=Qk(B_(a),L_(s),n),f=O7(s,c,ed(-u));return !(!f||!f.hasEvenY()||f.toAffine().x!==a)}catch{return false}}var td,Jh,z_,Ql,Yh,Kk,fs,xn,Jk,L_,B_,P_,ed,U_,O7,Wc,B7,C7,z7,M_,L7,U7,rd=F(()=>{sh();ai();Wk();RA();wa();xa();N_();td=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Jh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),z_=BigInt(0),Ql=BigInt(1),Yh=BigInt(2),Kk=(e,t)=>(e+t/Yh)/t;fs=di(td,void 0,void 0,{sqrt:Yk}),xn=qk({a:z_,b:BigInt(7),Fp:fs,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=Kk(i*e,t),c=Kk(-o*e,t),u=Le(e-a*r-c*n,t),f=Le(-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}}}},ha),Jk={};L_=e=>e.toRawBytes(true).slice(1),B_=e=>To(e,32),P_=e=>Le(e,td),ed=e=>Le(e,Jh),U_=xn.ProjectivePoint,O7=(e,t,r)=>U_.BASE.multiplyAndAddUnsafe(e,t,r);Wc=rn;B7={getPublicKey:N7,sign:P7,verify:eR,utils:{randomPrivateKey:xn.utils.randomPrivateKey,lift_x:Xk,pointToBytes:L_,numberToBytesBE:To,bytesToNumberBE:rn,taggedHash:Xh,mod:Le}},C7=AA(fs,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),z7=Gk(fs,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:fs.create(BigInt("-11"))}),M_=kA(xn.ProjectivePoint,e=>{let{x:t,y:r}=z7(fs.create(e[0]));return C7(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:fs.ORDER,m:1,k:128,expand:"xmd",hash:ha}),L7=M_.hashToCurve,U7=M_.encodeToCurve;});var dT,pT=F(()=>{dT="1.2.3";});var _t,nu=F(()=>{pT();_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@${dT}`].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 O6,N6,w0,Sd=F(()=>{O6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,N6=/^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(mT.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(mT,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 mT,hT=F(()=>{Sd();mT=/^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 P6=F(()=>{hT();});function Ba(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 gT=F(()=>{P6();});function bT(e){return yT.test(e)}function xT(e){return En(yT,e)}function wT(e){return vT.test(e)}function _T(e){return En(vT,e)}function ST(e){return ET.test(e)}function IT(e){return En(ET,e)}function ps(e){return AT.test(e)}function kT(e){return En(AT,e)}function TT(e){return RT.test(e)}function $T(e){return En(RT,e)}function NT(e){return OT.test(e)}function PT(e){return En(OT,e)}function BT(e){return lH.test(e)}var yT,vT,ET,AT,RT,OT,lH,B6,CT,E0,ou=F(()=>{Sd();yT=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;vT=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;ET=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;AT=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;RT=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;OT=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;lH=/^receive\(\) external payable$/;B6=new Set(["memory","indexed","storage","calldata"]),CT=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,C6=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,zT=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,LT=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 UT(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,MT=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(ST(e))return dH(e,t);if(wT(e))return pH(e,t);if(bT(e))return mH(e,t);if(TT(e))return hH(e,t);if(NT(e))return gH(e);if(BT(e))return {type:"receive",stateMutability:"payable"};throw new Pd({signature:e})}function dH(e,t={}){let r=IT(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 pH(e,t={}){let r=_T(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:CT,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function mH(e,t={}){let r=xT(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 hH(e,t={}){let r=$T(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 gH(e){let t=PT(e);if(!t)throw new uo({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function fo(e,t){let r=UT(e,t?.type,t?.structs);if(k0.has(r))return k0.get(r);let o=w0.test(e),n=En(o?bH:yH,e);if(!n)throw new Rd({param:e});if(n.name&&wH(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(xH.test(n.type))c=`${n.type}256`;else if(n.type==="address payable")c="address";else if(c=n.type,t?.type!=="struct"&&!z6(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)&&!_H(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 z6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||O6.test(e)||N6.test(e)}function wH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||O6.test(e)||N6.test(e)||vH.test(e)}function _H(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var yH,bH,xH,vH,iu=F(()=>{Sd();I0();A0();C6();LT();MT();ou();yH=/^(?<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$_]*))?$/,bH=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,xH=/^u?int$/;vH=/^(?: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(!ps(a))continue;let c=kT(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]=DT(c,t);}return o}function DT(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(EH,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:DT(t[f],t,new Set([...r,f]))});}else if(z6(f))o.push(s);else throw new Ad({type:f})}}return o}var EH,R0=F(()=>{Sd();I0();A0();C6();zT();ou();iu();EH=/^(?<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];ps(i)||r.push(Ld(i,t));}return r}var jT=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(!ps(i)){t=Ld(i,r);break}}}if(!t)throw new Id({signature:e});return t}var FT=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:B6}));}else {let r=su(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(ps(i))continue;let s=on(i),a=s.length;for(let c=0;c<a;c++)t.push(fo(s[c],{modifiers:B6,structs:r}));}}if(t.length===0)throw new kd({params:e});return t}var HT=F(()=>{A0();ou();R0();iu();iu();});var au=F(()=>{gT();P6();jT();FT();HT();});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=>SH(r,{includeName:t})).join(t?", ":","):""}function SH(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 L6,ZT=F(()=>{L6="2.55.16";});function GT(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?GT(e.cause,t):t?null:e}var U6,z,Te=F(()=>{ZT();U6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${L6}`},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=U6.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...U6.version?[`Version: ${U6.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=L6;}walk(t){return GT(this,t)}};});var $0,jd,cu,zn,O0,N0,P0,B0,Fd,uu,C0,z0,Hd,po,fu,L0,U0,M0,wi,ms,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;}},ms=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}):IH(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 IH(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 hs,V0,Z0,G0,Wd=F(()=>{Te();hs=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 M6(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 hs({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 mt(e,t={}){return typeof e=="number"||typeof e=="bigint"?J(e,t):typeof e=="string"?Ca(e,t):typeof e=="boolean"?D6(e,t):Ue(e,t)}function D6(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{size:t.size})):r}function Ue(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=AH[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 J(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 hs({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 Ca(e,t={}){let r=kH.encode(e);return Ue(r,t)}var AH,kH,Re=F(()=>{Wd();qd();ur();AH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));kH=new TextEncoder;});function qr(e,t={}){return typeof e=="number"||typeof e=="bigint"?KT(e,t):typeof e=="boolean"?WT(e,t):St(e)?fr(e,t):Ln(e,t)}function WT(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 qT(e){if(e>=Ei.zero&&e<=Ei.nine)return e-Ei.zero;if(e>=Ei.A&&e<=Ei.F)return e-(Ei.A-10);if(e>=Ei.a&&e<=Ei.f)return e-(Ei.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=qT(o.charCodeAt(a++)),u=qT(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 KT(e,t){let r=J(e,t);return fr(r)}function Ln(e,t={}){let r=RH.encode(e);return typeof t.size=="number"?(an(r,{size:t.size}),zo(r,{dir:"right",size:t.size})):r}var RH,Ei,lr=F(()=>{Te();lo();qd();ur();Re();RH=new TextEncoder;Ei={zero:48,nine:57,A:65,F:70,a:97,f:102};});function qe(e,t){let r=t||"hex",o=Ra(St(e,{strict:false})?qr(e):e);return r==="bytes"?o:mt(o)}var Un=F(()=>{Wh();lo();lr();Re();});function JT(e){return TH(e)}var TH,YT=F(()=>{lr();Un();TH=e=>qe(qr(e));});function XT(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 QT=F(()=>{Te();});var e4,t4=F(()=>{au();QT();e4=e=>{let t=typeof e=="string"?e:Ba(e);return XT(t)};});function q0(e){return JT(e4(e))}var j6=F(()=>{YT();t4();});var gs,Jd=F(()=>{j6();gs=q0;});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 ys(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 ys(e,t)}var F6,Si=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=$H.test(e)?e.toLowerCase()===e?true:r?ys(e)===e:true:false;return H6.set(o,n),n}var $H,H6,Sn=F(()=>{Yd();Si();$H=/^0x[a-fA-F0-9]{40}$/,H6=new Uo(8192);});function Mo(e){return typeof e[0]=="string"?st(e):OH(e)}function OH(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})?NH(e,t,r,{strict:o}):V6(e,t,r,{strict:o})}function r4(e,t){if(typeof t=="number"&&t>0&&t>$e(e)-1)throw new Vd({offset:t,position:"start",size:$e(e)})}function n4(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}={}){r4(e,t);let n=e.slice(t,r);return o&&n4(n,t,r),n}function NH(e,t,r,{strict:o}={}){r4(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&n4(n,t,r),n}var bs=F(()=>{H0();lo();sn();});var o4,W0,Z6=F(()=>{o4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,W0=/^(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=PH({params:e,values:t});return W6(r)}function PH({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 CH(t,{length:o,param:{...e,type:n}})}if(e.type==="tuple")return DH(t,{param:e});if(e.type==="address")return BH(t);if(e.type==="bool")return LH(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let o=e.type.startsWith("int"),[,,n="256"]=W0.exec(e.type)??[];return UH(t,{signed:o,size:Number(n)})}if(e.type.startsWith("bytes"))return zH(t,{param:e});if(e.type==="string")return MH(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(J(t+n,{size:32})),o.push(a),n+=$e(a)):r.push(a);}return st([...r,...o])}function BH(e){if(!Me(e))throw new nt({address:e});return {dynamic:false,encoded:_i(e.toLowerCase())}}function CH(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=J(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 zH(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(J(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 LH(e){if(typeof e!="boolean")throw new z(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:_i(D6(e))}}function UH(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 hs({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:J(e,{size:32,signed:t})}}function MH(e){let t=Ca(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(J($e(t),{size:32})),...o])}}function DH(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 Ii=F(()=>{Et();Lo();Te();Wd();Sn();cn();qd();sn();bs();Re();Z6();});var Do,du=F(()=>{bs();j6();Do=e=>un(q0(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"?gs(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=i4(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 i4(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 i4(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 xs=F(()=>{Et();lo();Sn();Jd();du();});function We(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var ln=F(()=>{});function u4(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:c4});n=i;}if(n.type!=="function")throw new po(void 0,{docsPath:c4});return {abi:[n],functionName:Do(nr(n))}}var c4,f4=F(()=>{Et();du();vi();xs();c4="/docs/contract/encodeFunctionData";});function ft(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:u4(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();Ii();f4();});var l4,J0,d4,Y0=F(()=>{l4={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."},J0={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},d4={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var Qd,pu,X0,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"});}},X0=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(jH);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var jH,Q0=F(()=>{J6();jH={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 X0({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 p4(e,t={}){typeof t.size<"u"&&an(e,{size:t.size});let r=Ue(e);return ut(r,t)}function m4(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=Ue(e);return vt(r,t)}function h4(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 g4=F(()=>{Wd();Kd();ur();Re();});function Ai(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:Ue(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 HH(e,{...t,type:i},{length:n,staticPosition:r})}if(t.type==="tuple")return qH(e,t,{staticPosition:r});if(t.type==="address")return FH(e);if(t.type==="bool")return VH(e);if(t.type.startsWith("bytes"))return ZH(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return GH(e,t);if(t.type==="string")return WH(e,{staticPosition:r});throw new j0(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function FH(e){let t=e.readBytes(32);return [ys(Ue(V6(t,-20))),32]}function HH(e,t,{length:r,staticPosition:o}){if(r===null){let s=Fo(e.readBytes(Y6)),a=o+s,c=a+y4;e.setPosition(a);let u=Fo(e.readBytes(y4)),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 VH(e){return [m4(e.readBytes(32),{size:32}),32]}function ZH(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),[Ue(c),32]}return [Ue(e.readBytes(Number.parseInt(n,10),32)),32]}function GH(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?p4(n,{signed:r}):Fo(n,{signed:r}),32]}function qH(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 WH(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=h4(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 y4,Y6,tp=F(()=>{Et();Si();Q0();sn();bs();g4();lr();Re();Ii();y4=32,Y6=32;});function eg(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||[],J0,d4].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?Ai(s.inputs,un(r,4)):void 0,errorName:s.name}}var X6=F(()=>{Y0();Et();bs();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 b4=F(()=>{Pr();});function rg(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 x4(e,t="wei"){return rg(e,tg.ether-tg[t])}function v4(e,t="wei"){return rg(e,tg.gwei-tg[t])}var tg,e2,ng=F(()=>{tg={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 x4(e,t)}var og=F(()=>{ng();});function or(e,t="wei"){return v4(e,t)}var yu=F(()=>{ng();});function w4(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
24
- `,"")}function _4(e){return e.reduce((t,{address:r,...o})=>{let n=`${t} ${r}:
2
+ var sN=Object.create;var Lp=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)Lp(e,r,{get:t[r],enumerable:true});},ZE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cN(t))!fN.call(e,n)&&n!==r&&Lp(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)):{},ZE(t||!e||!e.__esModule?Lp(r,"default",{value:e,enumerable:true}):r,e)),GE=e=>ZE(Lp({},"__esModule",{value:true}),e);var SI=Kr(eh=>{eh.byteLength=aL;eh.toByteArray=uL;eh.fromByteArray=dL;var So=[],Pn=[],sL=typeof Uint8Array<"u"?Uint8Array:Array,_w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(da=0,_I=_w.length;da<_I;++da)So[da]=_w[da],Pn[_w.charCodeAt(da)]=da;var da,_I;Pn[45]=62;Pn[95]=63;function EI(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=EI(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=EI(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 II=Kr(Ew=>{Ew.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)};Ew.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 Bl=Kr(Mc=>{var Sw=SI(),Lc=II(),AI=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 th=2147483647;Mc.kMaxLength=th;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>th)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 Rw(e)}return $I(e,t,r)}V.poolSize=8192;function $I(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 Aw(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 $I(e,t,r)};Object.setPrototypeOf(V.prototype,Uint8Array.prototype);Object.setPrototypeOf(V,Uint8Array);function OI(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 OI(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 Rw(e){return OI(e),si(e<0?0:Tw(e)|0)}V.allocUnsafe=function(e){return Rw(e)};V.allocUnsafeSlow=function(e){return Rw(e)};function hL(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!V.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=NI(e,t)|0,o=si(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function Iw(e){let t=e.length<0?0:Tw(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 Aw(t.buffer,t.byteOffset,t.byteLength)}return Iw(e)}function Aw(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=Tw(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"||Ow(e.length)?si(0):Iw(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Iw(e.data)}function Tw(e){if(e>=th)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+th.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 NI(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 kw(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return jI(e).length;default:if(n)return o?-1:kw(e).length;t=(""+t).toLowerCase(),n=true;}}V.byteLength=NI;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 BI(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?BI(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+">"};AI&&(V.prototype[AI]=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 PI(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,Ow(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:kI(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):kI(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function kI(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 PI(this,t,r,o,true)};V.prototype.lastIndexOf=function(t,r,o){return PI(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(Ow(a))return s;e[r+s]=a;}return s}function wL(e,t,r,o){return rh(kw(t,e.length-r),e,r,o)}function _L(e,t,r,o){return rh(BL(t),e,r,o)}function EL(e,t,r,o){return rh(jI(t),e,r,o)}function SL(e,t,r,o){return rh(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?Sw.fromByteArray(e):Sw.fromByteArray(e.slice(t,r))}function BI(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 RI=4096;function AL(e){let t=e.length;if(t<=RI)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=RI));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)&&Pl(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)&&Pl(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)&&Pl(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)&&Pl(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 CI(e,t,r,o,n){DI(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 zI(e,t,r,o,n){DI(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 CI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeBigUInt64BE=Xi(function(t,r=0){return zI(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 CI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V.prototype.writeBigInt64BE=Xi(function(t,r=0){return zI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function LI(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 UI(e,t,r,o,n){return t=+t,r=r>>>0,n||LI(e,t,r,4),Lc.write(e,t,r,o,23,4),r+4}V.prototype.writeFloatLE=function(t,r,o){return UI(this,t,r,true,o)};V.prototype.writeFloatBE=function(t,r,o){return UI(this,t,r,false,o)};function MI(e,t,r,o,n){return t=+t,r=r>>>0,n||LI(e,t,r,8),Lc.write(e,t,r,o,52,8),r+8}V.prototype.writeDoubleLE=function(t,r,o){return MI(this,t,r,true,o)};V.prototype.writeDoubleBE=function(t,r,o){return MI(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 $w(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}`}};}$w("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);$w("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);$w("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=TI(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=TI(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function TI(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)&&Pl(t,e.length-(r+1));}function DI(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 Pl(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 kw(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 jI(e){return Sw.toByteArray(PL(e))}function rh(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 Ow(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,FI=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 HI(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 nh(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 VI(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 oh(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 ZI(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=ZI(e)),Ao(e),e}function Pw(...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 Cl(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,Nw,Qi,ci=F(()=>{FI();ML=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;Nw=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 GI(e,t,r){return e&t^~e&r}function qI(e,t,r){return e&t^e&r^t&r}var zl,ui,hr,WI=F(()=>{ci();zl=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=oh(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=oh(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),nh(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=oh(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&ih),l:Number(e>>KI&ih)}:{h:Number(e>>KI&ih)|0,l:Number(e&ih)|0}}function sh(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 ih,KI,Bw,Cw,ya,ba,Ll,Ul,JI,YI,XI,QI,eA,tA,rA,nA,oA,iA,zw=F(()=>{ih=BigInt(4294967295),KI=BigInt(32);Bw=(e,t,r)=>e>>>r,Cw=(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,Ll=(e,t,r)=>e<<64-r|t>>>r-32,Ul=(e,t,r)=>e>>>r-32|t<<64-r,JI=(e,t,r)=>e<<r|t>>>32-r,YI=(e,t,r)=>t<<r|e>>>32-r,XI=(e,t,r)=>t<<r-32|e>>>64-r,QI=(e,t,r)=>e<<r-32|t>>>64-r;eA=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),tA=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,rA=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),nA=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,oA=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),iA=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var ZL,es,ah,sA,GL,qL,ts,rs,Lw,xa,aA,ch=F(()=>{WI();zw();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),ah=class extends zl{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+GI(a,c,u)+ZL[d]+es[d]|0,w=(no(o,2)^no(o,13)^no(o,22))+qI(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);}},sA=sh(["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=sA[0],qL=sA[1],ts=new Uint32Array(80),rs=new Uint32Array(80),Lw=class extends zl{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)^Bw(S,N,7),C=ba(S,N,1)^ba(S,N,8)^Cw(S,N,7),D=ts[O-2]|0,q=rs[O-2]|0,H=ya(D,q,19)^Ll(D,q,61)^Bw(D,q,6),Z=ba(D,q,19)^Ul(D,q,61)^Cw(D,q,6),re=rA(C,Z,rs[O-7],rs[O-16]),I=nA(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)^Ll(d,g,41),N=ba(d,g,14)^ba(d,g,18)^Ul(d,g,41),z=d&h^~d&w,C=g&x^~g&k,D=oA(P,N,C,qL[O],rs[O]),q=iA(D,T,S,z,GL[O],ts[O]),H=D|0,Z=ya(o,n,28)^Ll(o,n,34)^Ll(o,n,39),re=ba(o,n,28)^Ul(o,n,34)^Ul(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=eA(H,re,l);o=tA(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=Cl(()=>new ah),aA=Cl(()=>new Lw);});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 Ml(e){let t=e.toString(16);return t.length&1?"0"+t:t}function fA(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?jw:BigInt("0x"+e)}function ns(e){if(li(e),lA)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=WL[e[r]];return t}function cA(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 Dl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(lA)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=cA(e.charCodeAt(i)),a=cA(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 fA(ns(e))}function va(e){return li(e),fA(ns(Uint8Array.from(e).reverse()))}function To(e,t){return Dl(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=Dl(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 uh(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function wa(e,t,r){return Uw(e)&&Uw(t)&&Uw(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 dA(e){let t;for(t=0;e>jw;e>>=Dw,t+=1);return t}function pA(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=Mw(e),n=Mw(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=Mw(0))=>{n=a(uA([0]),d),o=a(),d.length!==0&&(n=a(uA([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 jw,Dw,lA,WL,fi,Uw,_a,Mw,uA,KL,Ea=F(()=>{jw=BigInt(0),Dw=BigInt(1);lA=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};Uw=e=>typeof e=="bigint"&&jw<=e;_a=e=>(Dw<<BigInt(e))-Dw,Mw=e=>new Uint8Array(e),uA=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 fh(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 bA(e,t){let r=(e.ORDER+cr)/hA,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-gA)/yA,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(;mA(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return bA;let i=n.pow(o,t),s=(t+cr)/Sa;return function(c,u){if(c.is0(u))return u;if(mA(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%hA===JL?bA:e%yA===gA?YL:XL(e)}function lh(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 mA(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 Fw(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}=Fw(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*fh(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>fh(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 vA(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 Hw(e){let t=vA(e);return t+Math.ceil(t/2)}function wA(e,t,r=false){let o=e.length,n=vA(t),i=Hw(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,hA,gA,yA,xA,eU,Ia=F(()=>{ci();Ea();jr=BigInt(0),cr=BigInt(1),Sa=BigInt(2),JL=BigInt(3),hA=BigInt(4),gA=BigInt(5),yA=BigInt(8);xA=(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 Vw(e,t){let r=t.negate();return e?r:t}function SA(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Zw(e,t){SA(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 EA(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+=Ww);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 qw(e){return IA.get(e)||1}function dh(e,t){return {constTimeNegate:Vw,hasPrecomputes(r){return qw(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>_A;)o&Ww&&(n=n.add(i)),i=i.double(),o>>=Ww;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=Zw(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=Zw(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:x}=EA(n,c,a);n=u,d?s=s.add(Vw(h,o[x])):i=i.add(Vw(g,o[f]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=Zw(r,t);for(let a=0;a<s.windows&&n!==_A;a++){let{nextN:c,offset:u,isZero:f,isNeg:d}=EA(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=Gw.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&Gw.set(o,n(i))),i},wNAFCached(r,o,n){let i=qw(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=qw(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){SA(o,t),IA.set(r,o),Gw.delete(r);}}}function ph(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=dA(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 jl(e){return lh(e.Fp),oo(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Fw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var _A,Ww,Gw,IA,Kw=F(()=>{Ia();Ea();_A=BigInt(0),Ww=BigInt(1);Gw=new WeakMap,IA=new WeakMap;});function os(e,t){if(Fl(e),Fl(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 Fl(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function uU(e,t,r,o){li(e),li(t),Fl(r),t.length>255&&(t=o(ar(uh("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),Fl(r),t.length>255){let i=Math.ceil(2*o/8);t=n.create({dkLen:i}).update(uh("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 RA(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),Fl(t);let u=typeof c=="string"?uh(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 TA(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 $A(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=RA(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=RA(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,OA=F(()=>{Ia();Ea();aU=rn;});var CA=Kr(()=>{});var Xw=Kr((zA,Yw)=>{(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=CA().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,zp=b[5]|0,yt=zp&8191,bt=zp>>>13,OE=b[6]|0,At=OE&8191,kt=OE>>>13,NE=b[7]|0,Rt=NE&8191,Tt=NE>>>13,PE=b[8]|0,$t=PE&8191,Ot=PE>>>13,BE=b[9]|0,Nt=BE&8191,Pt=BE>>>13,CE=v[0]|0,Bt=CE&8191,Ct=CE>>>13,zE=v[1]|0,zt=zE&8191,Lt=zE>>>13,LE=v[2]|0,Ut=LE&8191,Mt=LE>>>13,UE=v[3]|0,Dt=UE&8191,jt=UE>>>13,ME=v[4]|0,Ft=ME&8191,Ht=ME>>>13,DE=v[5]|0,Vt=DE&8191,Zt=DE>>>13,jE=v[6]|0,Gt=jE&8191,qt=jE>>>13,FE=v[7]|0,Wt=FE&8191,Kt=FE>>>13,HE=v[8]|0,Jt=HE&8191,Yt=HE>>>13,VE=v[9]|0,Xt=VE&8191,Qt=VE>>>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 Zy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Zy>>>26)|0,Zy&=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 Gy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Gy>>>26)|0,Gy&=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 qy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(qy>>>26)|0,qy&=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 Wy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Wy>>>26)|0,Wy&=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 Ky=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Ky>>>26)|0,Ky&=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 Jy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Jy>>>26)|0,Jy&=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 Yy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Yy>>>26)|0,Yy&=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 Xy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Xy>>>26)|0,Xy&=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 Qy=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(Qy>>>26)|0,Qy&=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 eb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(eb>>>26)|0,eb&=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 tb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(tb>>>26)|0,tb&=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 rb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(rb>>>26)|0,rb&=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 nb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(nb>>>26)|0,nb&=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 ob=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(ob>>>26)|0,ob&=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 ib=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(ib>>>26)|0,ib&=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 sb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(sb>>>26)|0,sb&=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 ab=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(ab>>>26)|0,ab&=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 cb=(R+_|0)+((p&8191)<<13)|0;R=(A+(p>>>13)|0)+(cb>>>26)|0,cb&=67108863,_=Math.imul(Nt,Xt),p=Math.imul(Nt,Qt),p=p+Math.imul(Pt,Xt)|0,A=Math.imul(Pt,Qt);var ub=(R+_|0)+((p&8191)<<13)|0;return R=(A+(p>>>13)|0)+(ub>>>26)|0,ub&=67108863,E[0]=Zy,E[1]=Gy,E[2]=qy,E[3]=Wy,E[4]=Ky,E[5]=Jy,E[6]=Yy,E[7]=Xy,E[8]=Qy,E[9]=eb,E[10]=tb,E[11]=rb,E[12]=nb,E[13]=ob,E[14]=ib,E[15]=sb,E[16]=ab,E[17]=cb,E[18]=ub,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 Yw>"u"||Yw,zA);});var MA=Kr((Qw,UA)=>{var mh=Bl(),Oo=mh.Buffer;function LA(e,t){for(var r in e)t[r]=e[r];}Oo.from&&Oo.alloc&&Oo.allocUnsafe&&Oo.allocUnsafeSlow?UA.exports=mh:(LA(mh,Qw),Qw.Buffer=ka);function ka(e,t,r){return Oo(e,t,r)}ka.prototype=Object.create(Oo.prototype);LA(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 mh.SlowBuffer(e)};});var jA=Kr((VY,DA)=>{var hh=MA().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=hh.from(h)),!hh.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 hh.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=hh.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}}DA.exports=bU;});var e_=Kr((ZY,FA)=>{var xU=jA(),vU="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";FA.exports=xU(vU);});var HA=Kr(n_=>{function mi(e,t,r){return t<=e&&e<=r}function vh(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 gh=-1;function r_(e){this.tokens=[].slice.call(e);}r_.prototype={endOfStream:function(){return !this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():gh},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 t_(e,t){if(e)throw TypeError("Decoder error");return t||65533}var yh="utf-8";function bh(e,t){if(!(this instanceof bh))return new bh(e,t);if(e=e!==void 0?String(e).toLowerCase():yh,e!==yh)throw new Error("Encoding not supported. Only utf-8 is supported");t=vh(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});}bh.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=vh(r),this._streaming||(this._decoder=new EU({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new r_(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 xh(e,t){if(!(this instanceof xh))return new xh(e,t);if(e=e!==void 0?String(e).toLowerCase():yh,e!==yh)throw new Error("Encoding not supported. Only utf-8 is supported");t=vh(t),this._streaming=false,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"});}xh.prototype={encode:function(t,r){t=t?String(t):"",r=vh(r),this._streaming||(this._encoder=new SU(this._options)),this._streaming=!!r.stream;for(var o=[],n=new r_(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===gh&&n!==0)return n=0,t_(t);if(c===gh)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 t_(t);return r=r<<6*n,null}if(!mi(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),t_(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===gh)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};}n_.TextEncoder=xh;n_.TextDecoder=bh;});var WA=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},VA=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=VA(Xw()),ZA=VA(e_()),RU=kU(HA()),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")),ZA.default.encode(Buffer.from(e))}Je.baseEncode=OU;function NU(e){return Buffer.from(ZA.default.decode(e))}Je.baseDecode=NU;var o_=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 wh=class{constructor(){this.buf=Buffer.alloc(o_),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(o_)]));}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(o_)]),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=wh;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 GA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ra(e,t,r,o,n){try{if(typeof o=="string")n[`write${GA(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 qA(e,r,n);}catch(i){throw i instanceof gr&&i.addToFieldPath(t),i}}function qA(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=wh){let o=new r;return qA(e,t,o),o.toArray()}Je.serialize=PU;function Ta(e,t,r,o){try{if(typeof r=="string")return o[`read${GA(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 i_(e,r,o)}catch(n){throw n instanceof gr&&n.addToFieldPath(t),n}}function i_(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=i_(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 i_(e,t,n)}Je.deserializeUnchecked=CU;});var u_=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 a_=Bl();function qc(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}M.checkUint8Array=qc;function Fe(e){return qc(e),a_.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 c_(e,t){return t.property?e+"["+t.property+"]":e}M.nameWithProperty=c_;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 _h=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=_h;var Vl=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=Vl;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 s_=Math.pow(2,32);function Mh(e){let t=Math.floor(e/s_),r=e-t*s_;return {hi32:t,lo32:r}}function Dh(e,t){return e*s_+t}var Eh=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 Dh(i,n)}encode(t,r,o=0){let n=Mh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeUInt32LE(n.hi32,o+4),8}};M.NearUInt64=Eh;var Sh=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 Dh(n,i)}encode(t,r,o=0){let n=Mh(t),i=Fe(r);return i.writeUInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearUInt64BE=Sh;var Ih=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 Dh(i,n)}encode(t,r,o=0){let n=Mh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeInt32LE(n.hi32,o+4),8}};M.NearInt64=Ih;var Ah=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 Dh(n,i)}encode(t,r,o=0){let n=Mh(t),i=Fe(r);return i.writeInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearInt64BE=Ah;var kh=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=kh;var Rh=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=Rh;var Th=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=Th;var $h=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=$h;var Oh=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=Oh;var Nh=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=Nh;var Zl=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=Zl;var Gc=class extends Zl{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 Gl=class extends Ze{constructor(t,r,o){let n;if(t instanceof nn||t instanceof bn)n=new Gc(new Vl(t));else if(t instanceof Ir&&t.isCount())n=new Gc(t);else if(t instanceof Zl)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 Ph(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=Gl;var Ph=class extends Ze{constructor(t,r,o,n){if(!(t instanceof Gl))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=Ph;function Zc(e){return 0>e&&(e+=4294967296),e}var ql=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 Wl(this,t,r);return this.fields.push(o),o}addBoolean(t){let r=new Bh(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=ql;var Wl=class{constructor(t,r,o){if(!(t instanceof ql))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(c_("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=Wl;var Bh=class extends Wl{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=Bh;var Ch=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(c_("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=Ch;var zh=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=a_.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=zh;var Lh=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=a_.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=Lh;var Uh=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=Uh;M.greedy=((e,t)=>new _h(e,t));M.offset=((e,t,r)=>new Vl(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 Eh(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 Sh(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 Ih(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 Ah(e));M.f32=(e=>new kh(e));M.f32be=(e=>new Rh(e));M.f64=(e=>new Th(e));M.f64be=(e=>new $h(e));M.struct=((e,t,r)=>new Nh(e,t,r));M.bits=((e,t,r)=>new ql(e,t,r));M.seq=((e,t,r)=>new Oh(e,t,r));M.union=((e,t,r)=>new Gl(e,t,r));M.unionLayoutDiscriminator=((e,t)=>new Gc(e,t));M.blob=((e,t)=>new Ch(e,t));M.cstr=(e=>new zh(e));M.utf8=((e,t)=>new Lh(e,t));M.constant=((e,t)=>new Uh(e,t));});function Yl(){if(!Vh&&(Vh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Vh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vh(Jj)}var Vh,Jj,v_=F(()=>{Jj=new Uint8Array(16);});var pk,mk=F(()=>{pk=/^(?:[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"&&pk.test(e)}var cs,Xl=F(()=>{mk();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,Zh,us,Ql=F(()=>{Xl();yr=[];for(Zh=0;Zh<256;++Zh)yr.push((Zh+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||hk,s=e.clockseq!==void 0?e.clockseq:w_;if(i==null||s==null){var a=e.random||(e.rng||Yl)();i==null&&(i=hk=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=w_=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:E_+1,f=c-__+(u-E_)/1e4;if(f<0&&e.clockseq===void 0&&(s=s+1&16383),(f<0||c>__)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");__=c,E_=u,w_=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 hk,w_,__,E_,gk,yk=F(()=>{v_();Ql();__=0,E_=0;gk=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 Gh,S_=F(()=>{Xl();Gh=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 qh(e,t,r){function o(n,i,s,a){if(typeof n=="string"&&(n=t7(n)),typeof i=="string"&&(i=Gh(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,I_=F(()=>{Ql();S_();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 bk(e){return (e+64>>>9<<4)+14+1}function s7(e,t){e[t>>5]|=128<<t%32,e[bk(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(bk(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 Wh(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 Wh(t&r|~t&o,e,t,n,i,s)}function Rr(e,t,r,o,n,i,s){return Wh(t&o|r&~o,e,t,n,i,s)}function Tr(e,t,r,o,n,i,s){return Wh(t^r^o,e,t,n,i,s)}function $r(e,t,r,o,n,i,s){return Wh(r^(t|~o),e,t,n,i,s)}var xk,vk=F(()=>{xk=o7;});var u7,wk,_k=F(()=>{I_();vk();u7=qh("v3",48,xk),wk=u7;});function f7(e,t,r){e=e||{};var o=e.random||(e.rng||Yl)();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 Ek,Sk=F(()=>{v_();Ql();Ek=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 A_(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]=A_(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=A_(w,5)+l7(N,k,T,P)+O+t[N]+g[S]>>>0;O=P,P=T,T=A_(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 Ik,Ak=F(()=>{Ik=d7;});var p7,kk,Rk=F(()=>{I_();Ak();p7=qh("v5",80,Ik),kk=p7;});var Tk,$k=F(()=>{Tk="00000000-0000-0000-0000-000000000000";});function m7(e){if(!cs(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Ok,Nk=F(()=>{Xl();Ok=m7;});var k_={};Er(k_,{NIL:()=>Tk,parse:()=>Gh,stringify:()=>us,v1:()=>gk,v3:()=>wk,v4:()=>Ek,v5:()=>kk,validate:()=>cs,version:()=>Ok});var R_=F(()=>{yk();_k();Sk();Rk();$k();Nk();Xl();Ql();S_();});var Bk=Kr((ZX,Pk)=>{var h7=(R_(),GE(k_)).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};Pk.exports=g7;});var zk=Kr((GX,Ck)=>{var y7=(R_(),GE(k_)).v4,b7=Bk(),ed=function(e,t){if(!(this instanceof ed))return new ed(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;};Ck.exports=ed;ed.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};ed.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 Uk=Kr((qX,T_)=>{var x7=Object.prototype.hasOwnProperty,Vr="~";function td(){}Object.create&&(td.prototype=Object.create(null),new td().__proto__||(Vr=false));function v7(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function Lk(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 Kh(e,t){--e._eventsCount===0?e._events=new td:delete e._events[t];}function Or(){this._events=new td,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 Lk(this,t,r,o,false)};Or.prototype.once=function(t,r,o){return Lk(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 Kh(this,i),this;var s=this._events[i];if(s.fn)s.fn===r&&(!n||s.once)&&(!o||s.context===o)&&Kh(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:Kh(this,i);}return this};Or.prototype.removeAllListeners=function(t){var r;return t?(r=Vr?Vr+t:t,this._events[r]&&Kh(this,r)):(this._events=new td,this._eventsCount=0),this};Or.prototype.off=Or.prototype.removeListener;Or.prototype.addListener=Or.prototype.on;Or.prefixed=Vr;Or.EventEmitter=Or;typeof T_<"u"&&(T_.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=Dk(u,f,1)^r[a],g=jk(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=Hk[s],c=Dk(n,i,a),u=jk(n,i,a),f=Fk[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,nd,E7,S7,I7,A7,Fk,Hk,Vk,Zk,k7,R7,Dk,jk,$_,$7,Na,Jh=F(()=>{zw();ci();_7=BigInt(0),nd=BigInt(1),E7=BigInt(2),S7=BigInt(7),I7=BigInt(256),A7=BigInt(113),Fk=[],Hk=[],Vk=[];for(let e=0,t=nd,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Fk.push(2*(5*o+r)),Hk.push((e+1)*(e+2)/2%64);let n=_7;for(let i=0;i<7;i++)t=(t<<nd^(t>>S7)*A7)%I7,t&E7&&(n^=nd<<(nd<<BigInt(i))-nd);Vk.push(n);}Zk=sh(Vk,true),k7=Zk[0],R7=Zk[1],Dk=(e,t,r)=>r>32?XI(e,t,r):JI(e,t,r),jk=(e,t,r)=>r>32?QI(e,t,r):YI(e,t,r);$_=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=VI(this.state);}clone(){return this._cloneInto()}keccak(){Nw(this.state32),T7(this.state32,this.rounds),Nw(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(nh(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)=>Cl(()=>new $_(t,e,r)),Na=$7(1,136,256/8);});var Yh,O_,Gk=F(()=>{ci();Yh=class extends Qi{constructor(t,r){super(),this.finished=false,this.destroyed=false,HI(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();}},O_=(e,t,r)=>new Yh(e,t).update(r).digest();O_.create=(e,t)=>new Yh(e,t);});function qk(e){e.lowS!==void 0&&Ro("lowS",e.lowS),e.prehash!==void 0&&Ro("prehash",e.prehash);}function O7(e){let t=jl(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 N_(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,od),B_),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 ph(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,od),{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,od),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=dh(w,k?Math.ceil(T/2):T);return {CURVE:t,ProjectivePoint:w,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:f}}function P7(e){let t=jl(e);return oo(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:true,...t})}function Wk(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 fh(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+N_(_,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 Dl(this.toDERHex())}toDERHex(){return gi.hexFromSig(this)}toCompactRawBytes(){return Dl(this.toCompactHex())}toCompactHex(){let y=n;return N_(this.r,y)+N_(this.s,y)}}let P={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=Hw(t.n);return wA(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),qk(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 pA(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(qk(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%B_===od){let x=(e.ORDER-od)/B_,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 Kk(e,t){if(lh(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 P_,gi,ao,Ye,ls,od,B_,C_=F(()=>{Kw();Ia();Ea();P_=class extends Error{constructor(t=""){super(t);}},gi={Err:P_,_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=Ml(o);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let i=o>127?Ml(n.length/2|128):"";return Ml(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=Ml(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),od=BigInt(3),B_=BigInt(4);});function C7(e){return {hash:e,hmac:(t,...r)=>O_(e,t,Pw(...r)),randomBytes:Dc}}function Jk(e,t){let r=o=>Wk({...e,...C7(o)});return {...r(t),create:r}}var Yk=F(()=>{Gk();ci();C_();});var oR={};Er(oR,{encodeToCurve:()=>H7,hashToCurve:()=>F7,schnorr:()=>M7,secp256k1:()=>xn,secp256k1_hasher:()=>F_});function eR(e){let t=ad,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,Qh,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,Qh,t);if(!ds.eql(ds.sqr(z),e))throw new Error("Cannot find square root");return z}function e0(e,...t){let r=Qk[e];if(r===void 0){let o=xa(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ar(o,o),Qk[e]=r;}return xa(ar(r,...t))}function U_(e){let t=xn.utils.normPrivateKeyToScalar(e),r=j_.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:sd(-t),bytes:D_(r)}}function tR(e){Dr("x",e,id,ad);let t=z_(e*e),r=z_(t*e+BigInt(7)),o=eR(r);o%Qh!==M_&&(o=z_(-o));let n=new j_(e,o,id);return n.assertValidity(),n}function rR(...e){return sd(Yc(e0("BIP0340/challenge",...e)))}function L7(e){return U_(e).bytes}function U7(e,t,r=Dc(32)){let o=Ge("message",e),{bytes:n,scalar:i}=U_(t),s=Ge("auxRand",r,32),a=L_(i^Yc(e0("BIP0340/aux",s))),c=e0("BIP0340/nonce",a,n,o),u=sd(Yc(c));if(u===M_)throw new Error("sign failed: k is zero");let{bytes:f,scalar:d}=U_(u),g=rR(f,n,o),h=new Uint8Array(64);if(h.set(f,0),h.set(L_(sd(d+g*i)),32),!nR(h,o,n))throw new Error("sign: Invalid signature produced");return h}function nR(e,t,r){let o=Ge("signature",e,64),n=Ge("message",t),i=Ge("publicKey",r,32);try{let s=tR(Yc(i)),a=Yc(o.subarray(0,32));if(!wa(a,id,ad))return !1;let c=Yc(o.subarray(32,64));if(!wa(c,id,Xh))return !1;let u=rR(L_(a),D_(s),n),f=z7(s,c,sd(-u));return !(!f||!f.hasEvenY()||f.toAffine().x!==a)}catch{return false}}var ad,Xh,M_,id,Qh,Xk,ds,xn,Qk,D_,L_,z_,sd,j_,z7,Yc,M7,D7,j7,F_,F7,H7,cd=F(()=>{ch();ci();Yk();OA();Ia();Ea();C_();ad=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Xh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),M_=BigInt(0),id=BigInt(1),Qh=BigInt(2),Xk=(e,t)=>(e+t/Qh)/t;ds=pi(ad,void 0,void 0,{sqrt:eR}),xn=Jk({a:M_,b:BigInt(7),Fp:ds,n:Xh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Xh,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-id*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),a=Xk(i*e,t),c=Xk(-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),Qk={};D_=e=>e.toRawBytes(true).slice(1),L_=e=>To(e,32),z_=e=>Ue(e,ad),sd=e=>Ue(e,Xh),j_=xn.ProjectivePoint,z7=(e,t,r)=>j_.BASE.multiplyAndAddUnsafe(e,t,r);Yc=rn;M7={getPublicKey:L7,sign:U7,verify:nR,utils:{randomPrivateKey:xn.utils.randomPrivateKey,lift_x:tR,pointToBytes:D_,numberToBytesBE:To,bytesToNumberBE:rn,taggedHash:e0,mod:Ue}},D7=TA(ds,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),j7=Kk(ds,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:ds.create(BigInt("-11"))}),F_=$A(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=F_.hashToCurve,H7=F_.encodeToCurve;});var hT,gT=F(()=>{hT="1.2.3";});var _t,su=F(()=>{gT();_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@${hT}`].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 B6,C6,E0,$d=F(()=>{B6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,C6=/^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)?$/,E0=/^\(.+?\).*?$/;});function S0(e){let t=e.type;if(yT.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+=S0(i),n<r-1&&(t+=", ");}let o=En(yT,e.type);return t+=`)${o?.array||""}`,S0({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var yT,bT=F(()=>{$d();yT=/^tuple(?<array>(\[(\d*)\])*)$/;});function xi(e){let t="",r=e.length;for(let o=0;o<r;o++){let n=e[o];t+=S0(n),o!==r-1&&(t+=", ");}return t}var z6=F(()=>{bT();});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 xT=F(()=>{z6();});function wT(e){return vT.test(e)}function _T(e){return En(vT,e)}function ST(e){return ET.test(e)}function IT(e){return En(ET,e)}function kT(e){return AT.test(e)}function RT(e){return En(AT,e)}function hs(e){return TT.test(e)}function $T(e){return En(TT,e)}function NT(e){return OT.test(e)}function PT(e){return En(OT,e)}function CT(e){return BT.test(e)}function zT(e){return En(BT,e)}function LT(e){return gH.test(e)}var vT,ET,AT,TT,OT,BT,gH,L6,UT,I0,au=F(()=>{$d();vT=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;ET=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;AT=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;TT=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;OT=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;BT=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;gH=/^receive\(\) external payable$/;L6=new Set(["memory","indexed","storage","calldata"]),UT=new Set(["indexed"]),I0=new Set(["calldata","memory","storage"]);});var Od,Nd,A0,k0=F(()=>{su();Od=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"});}},Nd=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"});}},A0=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 Pd,Bd,Cd,zd,Ld,Ud,R0=F(()=>{su();Pd=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"});}},Bd=class extends _t{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},Cd=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"});}},zd=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"});}},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`:""}.`,`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"});}},Ud=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,Md,Dd,U6=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"});}},Md=class extends _t{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},Dd=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 jd,MT=F(()=>{su();jd=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 Fd,DT=F(()=>{su();Fd=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 jT(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 T0,FT=F(()=>{T0=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 Hd(e,t={}){if(kT(e))return yH(e,t);if(ST(e))return bH(e,t);if(wT(e))return xH(e,t);if(NT(e))return vH(e,t);if(CT(e))return wH(e);if(LT(e))return {type:"receive",stateMutability:"payable"};throw new Md({signature:e})}function yH(e,t={}){let r=RT(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:I0,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:I0,structs:t,type:"function"}));}return {name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:n,outputs:s}}function bH(e,t={}){let r=IT(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:UT,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function xH(e,t={}){let r=_T(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=PT(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=zT(e);if(!t)throw new fo({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function lo(e,t){let r=jT(e,t?.type,t?.structs);if(T0.has(r))return T0.get(r);let o=E0.test(e),n=En(o?EH:_H,e);if(!n)throw new Bd({param:e});if(n.name&&AH(n.name))throw new Cd({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"&&!M6(c))throw new A0({type:c});if(n.modifier){if(!t?.modifiers?.has?.(n.modifier))throw new zd({param:e,type:t?.type,modifier:n.modifier});if(I0.has(n.modifier)&&!kH(c,!!n.array))throw new Ld({param:e,type:t?.type,modifier:n.modifier})}let f={type:`${c}${n.array??""}`,...i,...s,...u};return T0.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 Fd({current:r,depth:o});return t.push(r.trim()),t}function M6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||B6.test(e)||C6.test(e)}function AH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||B6.test(e)||C6.test(e)||IH.test(e)}function kH(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var _H,EH,SH,IH,cu=F(()=>{$d();k0();R0();U6();DT();FT();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=$T(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 Dd({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]=HT(c,t);}return o}function HT(e=[],t={},r=new Set){let o=[],n=e.length;for(let i=0;i<n;i++){let s=e[i];if(E0.test(s.type))o.push(s);else {let c=En(RH,s.type);if(!c?.type)throw new Ud({abiParameter:s});let{array:u,type:f}=c;if(f in t){if(r.has(f))throw new jd({type:f});o.push({...s,type:`tuple${u??""}`,components:HT(t[f],t,new Set([...r,f]))});}else if(M6(f))o.push(s);else throw new Nd({type:f})}}return o}var RH,$0=F(()=>{$d();k0();R0();U6();MT();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(Hd(i,t));}return r}var VT=F(()=>{au();$0();cu();});function Vd(e){let t;if(typeof e=="string")t=Hd(e);else {let r=uu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(!hs(i)){t=Hd(i,r);break}}}if(!t)throw new Od({signature:e});return t}var ZT=F(()=>{k0();au();$0();cu();});function Zd(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:L6}));}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:L6,structs:r}));}}if(t.length===0)throw new Pd({params:e});return t}var GT=F(()=>{R0();au();$0();cu();cu();});var fu=F(()=>{xT();z6();VT();ZT();GT();});function nr(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new O0(e.type);return `${e.name}(${Gd(e.inputs,{includeName:t})})`}function Gd(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")?`(${Gd(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 D6,WT=F(()=>{D6="2.55.16";});function KT(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?KT(e.cause,t):t?null:e}var j6,L,Te=F(()=>{WT();j6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${D6}`},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=j6.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...j6.version?[`Version: ${j6.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=D6;}walk(t){return KT(this,t)}};});var N0,qd,lu,Ln,P0,B0,C0,z0,Wd,du,L0,U0,Kd,mo,pu,M0,D0,j0,_i,gs,F0,H0,mu,O0,Et=F(()=>{wi();sn();Te();N0=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"});}},qd=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: (${Gd(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});}},P0=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"});}},B0=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"});}},C0=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"});}},z0=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"});}},Wd=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;}},L0=class extends L{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"});}},U0=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"});}},Kd=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"});}},M0=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"});}},D0=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"});}},j0=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: (${Gd(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;}},F0=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"});}},H0=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"});}},O0=class extends L{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
23
+ `),{name:"InvalidDefinitionTypeError"});}};});var Jd,Yd,Xd,Z0=F(()=>{Te();Jd=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"});}},Yd=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"});}},Xd=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 Yd({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 Yd({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(()=>{Z0();});var ys,G0,q0,W0,ep=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"});}},G0=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"});}},q0=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"});}},W0=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 tp=F(()=>{});function an(e,{size:t}){if($e(e)>t)throw new W0({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 F6(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 q0(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(()=>{ep();sn();tp();});function ft(e,t={}){return typeof e=="number"||typeof e=="bigint"?K(e,t):typeof e=="string"?Si(e,t):typeof e=="boolean"?K0(e,t):Le(e,t)}function K0(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(()=>{ep();Qd();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"?XT(e,t):typeof e=="boolean"?YT(e,t):St(e)?fr(e,t):Un(e,t)}function YT(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 JT(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=JT(o.charCodeAt(a++)),u=JT(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 XT(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();Qd();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(()=>{Jh();po();lr();Ae();});function QT(e){return BH(e)}var BH,e4=F(()=>{lr();Mn();BH=e=>qe(qr(e));});function t4(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 r4=F(()=>{Te();});var n4,o4=F(()=>{fu();r4();n4=e=>{let t=typeof e=="string"?e:Ua(e);return t4(t)};});function J0(e){return QT(n4(e))}var H6=F(()=>{e4();o4();});var bs,rp=F(()=>{H6();bs=J0;});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,np=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(V6.has(`${e}.${t}`))return V6.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 V6.set(`${e}.${t}`,i),i}function Dn(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});return xs(e,t)}var V6,Ai=F(()=>{Lo();lr();Mn();np();Sn();V6=new Uo(8192);});function Me(e,t){let{strict:r=true}=t??{},o=`${e}.${r}`;if(Z6.has(o))return Z6.get(o);let n=CH.test(e)?e.toLowerCase()===e?true:r?xs(e)===e:true:false;return Z6.set(o,n),n}var CH,Z6,Sn=F(()=>{np();Ai();CH=/^0x[a-fA-F0-9]{40}$/,Z6=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}):G6(e,t,r,{strict:o})}function i4(e,t){if(typeof t=="number"&&t>0&&t>$e(e)-1)throw new Jd({offset:t,position:"start",size:$e(e)})}function s4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&$e(e)!==r-t)throw new Jd({offset:r,position:"end",size:$e(e)})}function G6(e,t,r,{strict:o}={}){i4(e,t);let n=e.slice(t,r);return o&&s4(n,t,r),n}function LH(e,t,r,{strict:o}={}){i4(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&s4(n,t,r),n}var vs=F(()=>{Z0();po();sn();});var a4,Y0,q6=F(()=>{a4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Y0=/^(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 C0({expectedLength:e.length,givenLength:t.length});let r=UH({params:e,values:t});return J6(r)}function UH({params:e,values:t}){let r=[];for(let o=0;o<e.length;o++)r.push(K6({param:e[o],value:t[o]}));return r}function K6({param:e,value:t}){let r=op(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"]=Y0.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 F0(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function J6(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 P0({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=e.length===0&&W6(r),i=[];for(let s=0;s<e.length;s++){let a=K6({param:r,value:e[s]});a.dynamic&&(n=true),i.push(a);}if(o||n){let s=J6(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 B0({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(K0(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=K6({param:i,value:e[s]});o.push(a),a.dynamic&&(r=true);}return {dynamic:r,encoded:r?J6(o):st(o.map(({encoded:n})=>n))}}function op(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function W6(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components.some(W6);let r=op(t);return r?W6({...e,type:r[1]}):false}var ki=F(()=>{Et();Lo();Te();ep();Sn();cn();Qd();sn();vs();Ae();q6();});var Do,hu=F(()=>{vs();H6();Do=e=>un(J0(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?Y6(u,d):false})){if(s&&"inputs"in s&&s.inputs){let u=c4(a.inputs,s.inputs,r);if(u)throw new D0({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a;}}return s||i[0]}function Y6(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"&&Y6(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=>Y6(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function c4(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 c4(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();rp();hu();});function We(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var ln=F(()=>{});function d4(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:l4});n=i;}if(n.type!=="function")throw new mo(void 0,{docsPath:l4});return {abi:[n],functionName:Do(nr(n))}}var l4,p4=F(()=>{Et();hu();wi();ws();l4="/docs/contract/encodeFunctionData";});function lt(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:d4(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();p4();});var m4,Q0,h4,eg=F(()=>{m4={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."},Q0={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},h4={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var ip,gu,tg,X6=F(()=>{Te();ip=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"});}},tg=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,rg=F(()=>{X6();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 tg({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 ip({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 ip({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 g4(e,t={}){typeof t.size<"u"&&an(e,{size:t.size});let r=Le(e);return ut(r,t)}function y4(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 G0(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 b4(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 x4=F(()=>{ep();tp();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=op(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 H0(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function qH(e){let t=e.readBytes(32);return [xs(Le(G6(t,-20))),32]}function WH(e,t,{length:r,staticPosition:o}){if(r===null){let s=Fo(e.readBytes(Q6)),a=o+s,c=a+v4;e.setPosition(a);let u=Fo(e.readBytes(v4)),f=sp(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(sp(t)){let s=Fo(e.readBytes(Q6)),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 [y4(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?g4(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(sp(t)){let s=Fo(e.readBytes(Q6)),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=b4(i);return e.setPosition(t+32),[s,32]}function sp(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(sp);let r=op(e.type);return !!(r&&sp({...e,type:r[1]}))}var v4,Q6,ap=F(()=>{Et();Ai();rg();sn();vs();x4();lr();Ae();ki();v4=32,Q6=32;});function ng(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||[],Q0,h4].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 e2=F(()=>{eg();Et();vs();hu();ap();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 t2({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 w4=F(()=>{Pr();});function ig(e,t=0){if(!Number.isInteger(t)||t<0)throw new r2({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 _4(e,t="wei"){return ig(e,og.ether-og[t])}function E4(e,t="wei"){return ig(e,og.gwei-og[t])}var og,r2,sg=F(()=>{og={wei:0,gwei:9,szabo:12,finney:15,ether:18};r2=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 _4(e,t)}var ag=F(()=>{sg();});function or(e,t="wei"){return E4(e,t)}var vu=F(()=>{sg();});function S4(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
24
+ `,"")}function I4(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+=w4(o.state)),o.stateDiff&&(n+=` stateDiff:
30
- `,n+=w4(o.stateDiff)),n},` State Override:
31
- `).slice(0,-1)}var ig,sg,r2=F(()=>{Te();ig=class extends z{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"});}},sg=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 ag,cg,ug,fg,ws,bu,lg,dg,jn=F(()=>{og();yu();Te();ag=class extends z{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"});}},cg=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"});}},ug=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"});}},fg=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;}},ws=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"});}},lg=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;}},dg=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 E4,La,mo=F(()=>{E4=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 _s,xu,Ua,pg,mg,Ho,ki=F(()=>{ln();Y0();X6();vi();b4();xs();og();yu();Et();Te();r2();jn();mo();_s=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
- ${_4(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&&E4(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=eg({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=l4[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;}},pg=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});}},mg=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,Es,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;}},Es=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 KH,Br,Cr,vu,wu,_u,Eu,Ri,Hn,Su,Iu,Au,Ss,ja,ku,Fa,Ru,Tu,$u,Ou,Nu,Pu,Bu,Cu,zu,Lu,Uu,Mu,Du,hg,np=F(()=>{Te();Da();KH=-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 Es?t.code:r??KH;}},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});Ri=class e extends Br{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."});}};Object.defineProperty(Ri,"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});Ss=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`});}};Object.defineProperty(Ss,"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});hg=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,Ti=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 Is(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();Ti();});function As(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 bg=F(()=>{});function Zo(e,t){let r={};return typeof e.authorizationList<"u"&&(r.authorizationList=eV(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=>Ue(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=J(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=J(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=J(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=J(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=J(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=J(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=QH[e.type]),typeof e.value<"u"&&(r.value=J(e.value)),r}function eV(e){return e.map(t=>({address:t.address,r:t.r?J(BigInt(t.r)):t.r,s:t.s?J(BigInt(t.s)):t.s,chainId:J(t.chainId),nonce:J(t.nonce),...typeof t.yParity<"u"?{yParity:J(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:J(t.v)}:{}}))}var QH,Ju=F(()=>{Re();QH={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};});function O4(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 tV(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=J(t)),r!==void 0&&(s.nonce=J(r)),o!==void 0&&(s.state=O4(o)),n!==void 0){if(s.state)throw new sg;s.stateDiff=O4(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 ig({address:r});t[r]=tV(o);}return t}var xg=F(()=>{Lo();H0();r2();Sn();Re();});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();Ti();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"?J(r):o??"latest"}var Za=F(()=>{Te();Re();});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 Ts=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=Ai(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var a2,Oi=F(()=>{Et();tp();xs();a2="/docs/contract/decodeFunctionResult";});var H4,V4=F(()=>{H4="0.1.1";});function Z4(){return H4}var G4=F(()=>{V4();});function q4(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?q4(e.cause,t):t?null:e}var de,pn=F(()=>{G4();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 q4(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${Z4()}`}});de.setStaticOptions(de.defaultStaticOptions);});function uf(e,t){if(qn(e)>t)throw new Ng({givenSize:qn(e),maxSize:t})}function c2(e){if(e>=Ni.zero&&e<=Ni.nine)return e-Ni.zero;if(e>=Ni.A&&e<=Ni.F)return e-(Ni.A-10);if(e>=Ni.a&&e<=Ni.f)return e-(Ni.a-10)}function J4(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new Pg({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 Ni,Y4=F(()=>{$s();Ni={zero:48,nine:57,A:65,F:70,a:97,f:102};});function ff(e,t){if(lt(e)>t)throw new Bg({givenSize:lt(e),maxSize:t})}function X4(e,t){if(typeof t=="number"&&t>0&&t>lt(e)-1)throw new cp({offset:t,position:"start",size:lt(e)})}function Q4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&lt(e)!==r-t)throw new cp({offset:r,position:"end",size:lt(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 Cg({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function e$(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 Os(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+uV:n,r)}var uV,up=F(()=>{uV="#__bigint";});function dV(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 r$(e){return e instanceof Uint8Array?e:typeof e=="string"?df(e):pV(e)}function pV(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 n$(e,t={}){let{size:r}=t,o=lV.encode(e);return typeof r=="number"?(uf(o,r),mV(o,r)):o}function mV(e,t){return J4(e,{dir:"right",size:t})}function qn(e){return e.length}function o$(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function i$(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return m2(o,t)}function s$(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 Lg(o,t)}function a$(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(uf(o,r),o=hV(o)),fV.decode(o)}function p2(e){return u2(e,{dir:"left"})}function hV(e){return u2(e,{dir:"right"})}function c$(e){try{return dV(e),!0}catch{return false}}var fV,lV,d2,lf,Ng,Pg,$s=F(()=>{pn();pr();Y4();l2();up();fV=new TextDecoder,lV=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"?Os(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"});}},Ng=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"});}},Pg=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 bV(e,t={}){let{strict:r=false}=t;if(!e)throw new Ug(e);if(typeof e!="string")throw new Ug(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Mg(e);if(!e.startsWith("0x"))throw new Mg(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 Dg(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(ff(r,t.size),Pi(r,t.size)):r}function It(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=yV[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?Pi(c,o):c}function mf(e,t={}){return It(gV.encode(e),t)}function Pi(e,t){return f2(e,{dir:"left",size:t})}function qo(e,t){return f2(e,{dir:"right",size:t})}function dt(e,t,r,o={}){let{strict:n}=o;X4(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&Q4(i,t,r),i}function lt(e){return Math.ceil((e.length-2)/2)}function h2(e){return e$(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 Lg(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 bV(e,{strict:r}),!0}catch{return false}}var gV,yV,fp,Ug,Mg,Bg,cp,Cg,pr=F(()=>{pn();l2();up();gV=new TextEncoder,yV=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"});}},Ug=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Os(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"});}},Mg=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"});}},Bg=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"});}},Cg=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 u$(e){return {address:e.address,amount:Ve(e.amount),index:Ve(e.index),validatorIndex:Ve(e.validatorIndex)}}var f$=F(()=>{pr();});function jg(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(u$)}}}var g2=F(()=>{pr();f$();});var bo,Fg,d$,Hg,p$,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"}],Fg=[{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"}]}],d$=[{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"}],Hg=[...d$,{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"}]}],p$=[...d$,{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 m$,h$=F(()=>{m$="0x82ad56cb";});var Vg,g$,y$,Wa,dp=F(()=>{Vg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",g$="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",y$="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Wa="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Ka,pp,Ja,Zg=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();Ii();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(()=>{Zg();});function Gg(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Zn?e:n})();return new _s(o,{docsPath:t,...r})}var E2=F(()=>{ki();Ti();ip();});function qg(){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}=qg();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,Wg=F(()=>{S2();I2=new Map;});var Kg,Jg,Yg,b$=F(()=>{Pr();Te();mo();Kg=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"});}},Jg=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"});}},Yg=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 x$(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?Ai(n.inputs,un(r,4)):void 0}}var v$=F(()=>{Et();bs();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,w$=F(()=>{Et();cn();du();Ii();vi();xs();A2="/docs/contract/encodeErrorResult";});function _$(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,E$=F(()=>{Et();Ii();xs();R2="/docs/contract/encodeFunctionResult";});async function T2(e){let{data:t,ccipRequest:r}=e,{args:[o]}=x$({abi:Fg,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(Bi)?await T2({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=vV(c);}})),_$({abi:Fg,functionName:"query",result:[n,i]})}function vV(e){return e.name==="HttpRequestError"&&e.status?k2({abi:Fg,errorName:"HttpError",args:[e.status,e.shortMessage]}):k2({abi:[J0],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var Bi,hp=F(()=>{mn();Y0();v$();w$();E$();Bi="x-batch-gateway:true";});var A$={};Er(A$,{ccipRequest:()=>I$,offchainLookup:()=>_V,offchainLookupAbiItem:()=>S$,offchainLookupSignature:()=>wV});async function _V(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=eg({data:o,abi:[S$]}),[a,c,u,f,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:I$;try{if(!zr(i,a))throw new Yg({sender:a,to:i});let v=c.includes(Bi)?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 Kg({callbackSelector:f,cause:v,data:o,extraData:d,sender:a,urls:c})}}async function I$({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 Jg({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 wV,S$,k$=F(()=>{Ns();b$();Da();mo();X6();Ii();Ts();cn();lo();hp();Pr();wV="0x556f1830",S$={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?$$({code:g,data:h}):S?RV({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?jg(d):void 0,x=Yu(q),_=e.chain?.formatters?.transactionRequest?.format,w=(_||Zo)({...As(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&&EV({request:w})&&!b&&i===void 0)try{let{deployless:G=!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},K=T$(e,{blockNumber:s,deployless:G});if(!K||!kV(x,K))return await AV(e,{...w,blockHash:i,blockNumber:s,blockTag:a,multicallAddress:K,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=TV(y),{offchainLookup:x,offchainLookupSignature:_}=await Promise.resolve().then(()=>(k$(),A$));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 mg({factory:v}):Gg(y,{...t,account:Z,chain:e.chain})}}function EV({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(m$)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function IV(e){if(!e)return "default";let t=R$.get(e);if(t!==void 0)return t;let r=SV++;return R$.set(e,r),r}async function AV(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:T$(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}.${IV(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=ft({abi:bo,args:[L],functionName:"aggregate3"}),D={...v===null?{data:$$({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 T$(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 kV(e,t){return e?Object.keys(e).some(r=>zr(r,t)):false}function $$(e){let{code:t,data:r}=e;return mp({abi:xi(["constructor(bytes, bytes)"]),bytecode:Vg,args:[t,r]})}function RV(e){let{data:t,factory:r,factoryData:o,to:n}=e;return mp({abi:xi(["constructor(address, bytes, address, bytes)"]),bytecode:g$,args:[n,t,r,o]})}function TV(e){if(!(e instanceof z))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var SV,R$,Ns=F(()=>{au();g2();ln();mn();h$();dp();Te();Zg();ki();mo();Oi();_2();Dn();Ts();Za();Ya();E2();sp();Ju();Wg();xg();Ha();SV=0,R$=new WeakMap;});var pe={};Er(pe,{$brand:()=>zp,$input:()=>E1,$output:()=>_1,NEVER:()=>sb,TimePrecision:()=>A1,ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>Hv,ZodBase64URL:()=>Vv,ZodBigInt:()=>xl,ZodBigIntFormat:()=>qv,ZodBoolean:()=>bl,ZodCIDRv4:()=>jv,ZodCIDRv6:()=>Fv,ZodCUID:()=>Bv,ZodCUID2:()=>Cv,ZodCatch:()=>F5,ZodCodec:()=>nw,ZodCustom:()=>Vm,ZodCustomStringFormat:()=>gl,ZodDate:()=>jm,ZodDefault:()=>z5,ZodDiscriminatedUnion:()=>S5,ZodE164:()=>Zv,ZodEmail:()=>Ov,ZodEmoji:()=>Nv,ZodEnum:()=>ml,ZodError:()=>C3,ZodFile:()=>P5,ZodFirstPartyTypeKind:()=>ow,ZodFunction:()=>Y5,ZodGUID:()=>zm,ZodIPv4:()=>Mv,ZodIPv6:()=>Dv,ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,ZodIntersection:()=>I5,ZodIssueCode:()=>GB,ZodJWT:()=>Gv,ZodKSUID:()=>Uv,ZodLazy:()=>W5,ZodLiteral:()=>N5,ZodMap:()=>$5,ZodNaN:()=>V5,ZodNanoID:()=>Pv,ZodNever:()=>w5,ZodNonOptional:()=>tw,ZodNull:()=>y5,ZodNullable:()=>C5,ZodNumber:()=>yl,ZodNumberFormat:()=>vc,ZodObject:()=>Hm,ZodOptional:()=>ew,ZodPipe:()=>rw,ZodPrefault:()=>U5,ZodPromise:()=>J5,ZodReadonly:()=>Z5,ZodRealError:()=>Xr,ZodRecord:()=>Yv,ZodSet:()=>O5,ZodString:()=>hl,ZodStringFormat:()=>et,ZodSuccess:()=>j5,ZodSymbol:()=>h5,ZodTemplateLiteral:()=>q5,ZodTransform:()=>B5,ZodTuple:()=>k5,ZodType:()=>Ae,ZodULID:()=>zv,ZodURL:()=>Dm,ZodUUID:()=>ei,ZodUndefined:()=>g5,ZodUnion:()=>Kv,ZodUnknown:()=>v5,ZodVoid:()=>_5,ZodXID:()=>Lv,_ZodString:()=>$v,_default:()=>L5,_function:()=>MB,any:()=>xB,array:()=>Fm,base64:()=>rB,base64url:()=>nB,bigint:()=>mB,boolean:()=>m5,catch:()=>H5,check:()=>DB,cidrv4:()=>eB,cidrv6:()=>tB,clone:()=>Mr,codec:()=>zB,coerce:()=>iw,config:()=>wt,core:()=>Qo,cuid:()=>q3,cuid2:()=>W3,custom:()=>jB,date:()=>wB,decode:()=>wv,decodeAsync:()=>Ev,discriminatedUnion:()=>AB,e164:()=>oB,email:()=>L3,emoji:()=>Z3,encode:()=>vv,encodeAsync:()=>_v,endsWith:()=>al,enum:()=>Xv,file:()=>NB,flattenError:()=>Hf,float32:()=>fB,float64:()=>lB,formatError:()=>Vf,function:()=>MB,getErrorMap:()=>WB,globalRegistry:()=>vo,gt:()=>Yo,gte:()=>Yr,guid:()=>U3,hash:()=>uB,hex:()=>cB,hostname:()=>aB,httpUrl:()=>V3,includes:()=>il,instanceof:()=>FB,int:()=>Tv,int32:()=>dB,int64:()=>hB,intersection:()=>A5,ipv4:()=>X3,ipv6:()=>Q3,iso:()=>Cm,json:()=>VB,jwt:()=>iB,keyof:()=>_B,ksuid:()=>Y3,lazy:()=>K5,length:()=>yc,literal:()=>OB,locales:()=>Xf,looseObject:()=>IB,lowercase:()=>nl,lt:()=>Jo,lte:()=>Rn,map:()=>RB,maxLength:()=>gc,maxSize:()=>hc,mime:()=>cl,minLength:()=>Zi,minSize:()=>Vs,multipleOf:()=>Hs,nan:()=>CB,nanoid:()=>G3,nativeEnum:()=>$B,negative:()=>tv,never:()=>Wv,nonnegative:()=>nv,nonoptional:()=>D5,nonpositive:()=>rv,normalize:()=>ul,null:()=>b5,nullable:()=>Um,nullish:()=>PB,number:()=>p5,object:()=>EB,optional:()=>Lm,overwrite:()=>Xo,parse:()=>gv,parseAsync:()=>yv,partialRecord:()=>kB,pipe:()=>Mm,positive:()=>ev,prefault:()=>M5,preprocess:()=>ZB,prettifyError:()=>yb,promise:()=>UB,property:()=>ov,readonly:()=>G5,record:()=>T5,refine:()=>X5,regex:()=>rl,regexes:()=>kn,registry:()=>fm,safeDecode:()=>Iv,safeDecodeAsync:()=>kv,safeEncode:()=>Sv,safeEncodeAsync:()=>Av,safeParse:()=>bv,safeParseAsync:()=>xv,set:()=>TB,setErrorMap:()=>qB,size:()=>tl,startsWith:()=>sl,strictObject:()=>SB,string:()=>Rv,stringFormat:()=>sB,stringbool:()=>HB,success:()=>BB,superRefine:()=>Q5,symbol:()=>yB,templateLiteral:()=>LB,toJSONSchema:()=>lv,toLowerCase:()=>ll,toUpperCase:()=>dl,transform:()=>Qv,treeifyError:()=>gb,trim:()=>fl,tuple:()=>R5,uint32:()=>pB,uint64:()=>gB,ulid:()=>K3,undefined:()=>bB,union:()=>Jv,unknown:()=>xc,uppercase:()=>ol,url:()=>H3,util:()=>te,uuid:()=>M3,uuidv4:()=>D3,uuidv6:()=>j3,uuidv7:()=>F3,void:()=>vB,xid:()=>J3});var Qo={};Er(Qo,{$ZodAny:()=>Zx,$ZodArray:()=>Jx,$ZodAsyncError:()=>Yn,$ZodBase64:()=>Cx,$ZodBase64URL:()=>zx,$ZodBigInt:()=>om,$ZodBigIntFormat:()=>jx,$ZodBoolean:()=>Wf,$ZodCIDRv4:()=>Nx,$ZodCIDRv6:()=>Px,$ZodCUID:()=>wx,$ZodCUID2:()=>_x,$ZodCatch:()=>p1,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>Yb,$ZodCheckEndsWith:()=>ux,$ZodCheckGreaterThan:()=>Yp,$ZodCheckIncludes:()=>ax,$ZodCheckLengthEquals:()=>nx,$ZodCheckLessThan:()=>Jp,$ZodCheckLowerCase:()=>ix,$ZodCheckMaxLength:()=>tx,$ZodCheckMaxSize:()=>Xb,$ZodCheckMimeType:()=>lx,$ZodCheckMinLength:()=>rx,$ZodCheckMinSize:()=>Qb,$ZodCheckMultipleOf:()=>Kb,$ZodCheckNumberFormat:()=>Jb,$ZodCheckOverwrite:()=>dx,$ZodCheckProperty:()=>fx,$ZodCheckRegex:()=>ox,$ZodCheckSizeEquals:()=>ex,$ZodCheckStartsWith:()=>cx,$ZodCheckStringFormat:()=>pc,$ZodCheckUpperCase:()=>sx,$ZodCodec:()=>Kf,$ZodCustom:()=>w1,$ZodCustomStringFormat:()=>Mx,$ZodDate:()=>Kx,$ZodDefault:()=>u1,$ZodDiscriminatedUnion:()=>Xx,$ZodE164:()=>Lx,$ZodEmail:()=>yx,$ZodEmoji:()=>xx,$ZodEncodeError:()=>Mi,$ZodEnum:()=>n1,$ZodError:()=>Ff,$ZodFile:()=>i1,$ZodFunction:()=>b1,$ZodGUID:()=>hx,$ZodIPv4:()=>$x,$ZodIPv6:()=>Ox,$ZodISODate:()=>kx,$ZodISODateTime:()=>Ax,$ZodISODuration:()=>Tx,$ZodISOTime:()=>Rx,$ZodIntersection:()=>Qx,$ZodJWT:()=>Ux,$ZodKSUID:()=>Ix,$ZodLazy:()=>v1,$ZodLiteral:()=>o1,$ZodMap:()=>t1,$ZodNaN:()=>m1,$ZodNanoID:()=>vx,$ZodNever:()=>qx,$ZodNonOptional:()=>l1,$ZodNull:()=>Vx,$ZodNullable:()=>c1,$ZodNumber:()=>nm,$ZodNumberFormat:()=>Dx,$ZodObject:()=>hS,$ZodObjectJIT:()=>Yx,$ZodOptional:()=>a1,$ZodPipe:()=>h1,$ZodPrefault:()=>f1,$ZodPromise:()=>x1,$ZodReadonly:()=>g1,$ZodRealError:()=>Jr,$ZodRecord:()=>e1,$ZodRegistry:()=>mc,$ZodSet:()=>r1,$ZodString:()=>Fs,$ZodStringFormat:()=>Xe,$ZodSuccess:()=>d1,$ZodSymbol:()=>Fx,$ZodTemplateLiteral:()=>y1,$ZodTransform:()=>s1,$ZodTuple:()=>sm,$ZodType:()=>we,$ZodULID:()=>Ex,$ZodURL:()=>bx,$ZodUUID:()=>gx,$ZodUndefined:()=>Hx,$ZodUnion:()=>im,$ZodUnknown:()=>Gx,$ZodVoid:()=>Wx,$ZodXID:()=>Sx,$brand:()=>zp,$constructor:()=>B,$input:()=>E1,$output:()=>_1,Doc:()=>qf,JSONSchema:()=>f5,JSONSchemaGenerator:()=>pl,NEVER:()=>sb,TimePrecision:()=>A1,_any:()=>q1,_array:()=>iv,_base64:()=>km,_base64url:()=>Rm,_bigint:()=>D1,_boolean:()=>U1,_catch:()=>R3,_check:()=>u5,_cidrv4:()=>Im,_cidrv6:()=>Am,_coercedBigint:()=>j1,_coercedBoolean:()=>M1,_coercedDate:()=>X1,_coercedNumber:()=>N1,_coercedString:()=>I1,_cuid:()=>bm,_cuid2:()=>xm,_custom:()=>av,_date:()=>Y1,_decode:()=>Fp,_decodeAsync:()=>Vp,_default:()=>I3,_discriminatedUnion:()=>p3,_e164:()=>Tm,_email:()=>lm,_emoji:()=>gm,_encode:()=>jp,_encodeAsync:()=>Hp,_endsWith:()=>al,_enum:()=>x3,_file:()=>sv,_float32:()=>B1,_float64:()=>C1,_gt:()=>Yo,_gte:()=>Yr,_guid:()=>Qf,_includes:()=>il,_int:()=>P1,_int32:()=>z1,_int64:()=>F1,_intersection:()=>m3,_ipv4:()=>Em,_ipv6:()=>Sm,_isoDate:()=>R1,_isoDateTime:()=>k1,_isoDuration:()=>$1,_isoTime:()=>T1,_jwt:()=>$m,_ksuid:()=>_m,_lazy:()=>N3,_length:()=>yc,_literal:()=>w3,_lowercase:()=>nl,_lt:()=>Jo,_lte:()=>Rn,_map:()=>y3,_max:()=>Rn,_maxLength:()=>gc,_maxSize:()=>hc,_mime:()=>cl,_min:()=>Yr,_minLength:()=>Zi,_minSize:()=>Vs,_multipleOf:()=>Hs,_nan:()=>Q1,_nanoid:()=>ym,_nativeEnum:()=>v3,_negative:()=>tv,_never:()=>K1,_nonnegative:()=>nv,_nonoptional:()=>A3,_nonpositive:()=>rv,_normalize:()=>ul,_null:()=>G1,_nullable:()=>S3,_number:()=>O1,_optional:()=>E3,_overwrite:()=>Xo,_parse:()=>uc,_parseAsync:()=>fc,_pipe:()=>T3,_positive:()=>ev,_promise:()=>P3,_property:()=>ov,_readonly:()=>$3,_record:()=>g3,_refine:()=>cv,_regex:()=>rl,_safeDecode:()=>Gp,_safeDecodeAsync:()=>Wp,_safeEncode:()=>Zp,_safeEncodeAsync:()=>qp,_safeParse:()=>lc,_safeParseAsync:()=>dc,_set:()=>b3,_size:()=>tl,_startsWith:()=>sl,_string:()=>S1,_stringFormat:()=>bc,_stringbool:()=>fv,_success:()=>k3,_superRefine:()=>uv,_symbol:()=>V1,_templateLiteral:()=>O3,_toLowerCase:()=>ll,_toUpperCase:()=>dl,_transform:()=>_3,_trim:()=>fl,_tuple:()=>h3,_uint32:()=>L1,_uint64:()=>H1,_ulid:()=>vm,_undefined:()=>Z1,_union:()=>d3,_unknown:()=>W1,_uppercase:()=>ol,_url:()=>el,_uuid:()=>dm,_uuidv4:()=>pm,_uuidv6:()=>mm,_uuidv7:()=>hm,_void:()=>J1,_xid:()=>wm,clone:()=>Mr,config:()=>wt,decode:()=>BN,decodeAsync:()=>zN,encode:()=>PN,encodeAsync:()=>CN,flattenError:()=>Hf,formatError:()=>Vf,globalConfig:()=>Cf,globalRegistry:()=>vo,isValidBase64:()=>Bx,isValidBase64URL:()=>lS,isValidJWT:()=>dS,locales:()=>Xf,parse:()=>Mp,parseAsync:()=>Dp,prettifyError:()=>yb,regexes:()=>kn,registry:()=>fm,safeDecode:()=>UN,safeDecodeAsync:()=>DN,safeEncode:()=>LN,safeEncodeAsync:()=>MN,safeParse:()=>bb,safeParseAsync:()=>xb,toDotPath:()=>WE,toJSONSchema:()=>lv,treeifyError:()=>gb,util:()=>te,version:()=>px});var sb=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.");}},Mi=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:()=>hb,Class:()=>cb,NUMBER_FORMAT_RANGES:()=>mb,aborted:()=>Vi,allowsEval:()=>fb,assert:()=>lN,assertEqual:()=>aN,assertIs:()=>uN,assertNever:()=>fN,assertNotEqual:()=>cN,assignProp:()=>ji,base64ToUint8Array:()=>ZE,base64urlToUint8Array:()=>RN,cached:()=>ac,captureStackTrace:()=>Up,cleanEnum:()=>kN,cleanRegex:()=>Uf,clone:()=>Mr,cloneDef:()=>pN,createTransparentProxy:()=>xN,defineLazy:()=>Oe,esc:()=>Lp,escapeRegex:()=>xo,extend:()=>_N,finalizeIssue:()=>yn,floatSafeRemainder:()=>ub,getElementAtPath:()=>mN,getEnumValues:()=>Lf,getLengthableOrigin:()=>jf,getParsedType:()=>bN,getSizableOrigin:()=>Df,hexToUint8Array:()=>$N,isObject:()=>Ds,isPlainObject:()=>Hi,issue:()=>cc,joinValues:()=>j,jsonStringifyReplacer:()=>sc,merge:()=>SN,mergeDefs:()=>Fi,normalizeParams:()=>ee,nullish:()=>Di,numKeys:()=>yN,objectClone:()=>dN,omit:()=>wN,optionalKeys:()=>pb,partial:()=>IN,pick:()=>vN,prefixIssues:()=>gn,primitiveTypes:()=>db,promiseAllObject:()=>hN,propertyKeyTypes:()=>Mf,randomString:()=>gN,required:()=>AN,safeExtend:()=>EN,shallowClone:()=>lb,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>GE,uint8ArrayToBase64url:()=>TN,uint8ArrayToHex:()=>ON,unwrapMessage:()=>zf});function aN(e){return e}function cN(e){return e}function uN(e){}function fN(e){throw new Error}function lN(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 Di(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 ub(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 VE=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==VE)return o===void 0&&(o=VE,o=r()),o},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function dN(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ji(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function Fi(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o);}return Object.defineProperties({},t)}function pN(e){return Fi(e._zod.def)}function mN(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function hN(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 gN(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 Ds(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var fb=ac(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Hi(e){if(Ds(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(Ds(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function lb(e){return Hi(e)?{...e}:Array.isArray(e)?[...e]:e}function yN(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var bN=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"]),db=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 xN(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 pb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var mb={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]},hb={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function vN(e,t){let r=e._zod.def,o=Fi(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 ji(this,"shape",n),n},checks:[]});return Mr(e,o)}function wN(e,t){let r=e._zod.def,o=Fi(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 ji(this,"shape",n),n},checks:[]});return Mr(e,o)}function _N(e,t){if(!Hi(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=Fi(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return ji(this,"shape",i),i},checks:[]});return Mr(e,n)}function EN(e,t){if(!Hi(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 ji(this,"shape",o),o},checks:e._zod.def.checks};return Mr(e,r)}function SN(e,t){let r=Fi(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return ji(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Mr(e,r)}function IN(e,t,r){let o=Fi(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 ji(this,"shape",i),i},checks:[]});return Mr(t,o)}function AN(e,t,r){let o=Fi(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 ji(this,"shape",i),i},checks:[]});return Mr(t,o)}function Vi(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 kN(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function ZE(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 GE(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function RN(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return ZE(t+r)}function TN(e){return GE(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $N(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 ON(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var cb=class{constructor(...t){}};var qE=(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",qE),Jr=B("$ZodError",qE,{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 gb(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 WE(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 yb(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 ${WE(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}},bb=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}},xb=dc(Jr),jp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return uc(e)(t,r,n)},PN=jp(Jr),Fp=e=>(t,r,o)=>uc(e)(t,r,o),BN=Fp(Jr),Hp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fc(e)(t,r,n)},CN=Hp(Jr),Vp=e=>async(t,r,o)=>fc(e)(t,r,o),zN=Vp(Jr),Zp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return lc(e)(t,r,n)},LN=Zp(Jr),Gp=e=>(t,r,o)=>lc(e)(t,r,o),UN=Gp(Jr),qp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return dc(e)(t,r,n)},MN=qp(Jr),Wp=e=>async(t,r,o)=>dc(e)(t,r,o),DN=Wp(Jr);var kn={};Er(kn,{base64:()=>Bb,base64url:()=>Kp,bigint:()=>jb,boolean:()=>Vb,browserEmail:()=>WN,cidrv4:()=>Nb,cidrv6:()=>Pb,cuid:()=>vb,cuid2:()=>wb,date:()=>Lb,datetime:()=>Mb,domain:()=>JN,duration:()=>Ab,e164:()=>zb,email:()=>Rb,emoji:()=>Tb,extendedDuration:()=>jN,guid:()=>kb,hex:()=>YN,hostname:()=>Cb,html5Email:()=>ZN,idnEmail:()=>qN,integer:()=>Fb,ipv4:()=>$b,ipv6:()=>Ob,ksuid:()=>Sb,lowercase:()=>qb,md5_base64:()=>QN,md5_base64url:()=>eP,md5_hex:()=>XN,nanoid:()=>Ib,null:()=>Zb,number:()=>Hb,rfc5322Email:()=>GN,sha1_base64:()=>rP,sha1_base64url:()=>nP,sha1_hex:()=>tP,sha256_base64:()=>iP,sha256_base64url:()=>sP,sha256_hex:()=>oP,sha384_base64:()=>cP,sha384_base64url:()=>uP,sha384_hex:()=>aP,sha512_base64:()=>lP,sha512_base64url:()=>dP,sha512_hex:()=>fP,string:()=>Db,time:()=>Ub,ulid:()=>_b,undefined:()=>Gb,unicodeEmail:()=>KE,uppercase:()=>Wb,uuid:()=>js,uuid4:()=>FN,uuid6:()=>HN,uuid7:()=>VN,xid:()=>Eb});var vb=/^[cC][^\s-]{8,}$/,wb=/^[0-9a-z]+$/,_b=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eb=/^[0-9a-vA-V]{20}$/,Sb=/^[A-Za-z0-9]{27}$/,Ib=/^[a-zA-Z0-9_-]{21}$/,Ab=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jN=/^[-+]?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)?)??$/,kb=/^([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})$/,js=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)$/,FN=js(4),HN=js(6),VN=js(7),Rb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ZN=/^[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])?)*$/,GN=/^(([^<>()\[\]\\.,;:\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,}))$/,KE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,qN=KE,WN=/^[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])?)*$/,KN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Tb(){return new RegExp(KN,"u")}var $b=/^(?:(?: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])$/,Ob=/^(([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}|:))$/,Nb=/^((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])$/,Pb=/^(([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])$/,Bb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kp=/^[A-Za-z0-9_-]*$/,Cb=/^(?=.{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])?)*\.?$/,JN=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,zb=/^\+(?:[0-9]){6,14}[0-9]$/,JE="(?:(?:\\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])))",Lb=new RegExp(`^${JE}$`);function YE(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 Ub(e){return new RegExp(`^${YE(e)}$`)}function Mb(e){let t=YE({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(`^${JE}T(?:${o})$`)}var Db=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},jb=/^-?\d+n?$/,Fb=/^-?\d+$/,Hb=/^-?\d+(?:\.\d+)?/,Vb=/^(?:true|false)$/i,Zb=/^null$/i;var Gb=/^undefined$/i;var qb=/^[^A-Z]*$/,Wb=/^[^a-z]*$/,YN=/^[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 XN=/^[0-9a-fA-F]{32}$/,QN=Zf(22,"=="),eP=Gf(22),tP=/^[0-9a-fA-F]{40}$/,rP=Zf(27,"="),nP=Gf(27),oP=/^[0-9a-fA-F]{64}$/,iP=Zf(43,"="),sP=Gf(43),aP=/^[0-9a-fA-F]{96}$/,cP=Zf(64,""),uP=Gf(64),fP=/^[0-9a-fA-F]{128}$/,lP=Zf(86,"=="),dP=Gf(86);var ot=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),QE={number:"number",bigint:"bigint",object:"date"},Jp=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=QE[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=QE[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});};}),Kb=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):ub(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});};}),Jb=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]=mb[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=Fb);}),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});};}),Yb=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=hb[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});};}),Xb=B("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Di(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});};}),Qb=B("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Di(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});};}),ex=B("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Di(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});};}),tx=B("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Di(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});};}),rx=B("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Di(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});};}),nx=B("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Di(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=()=>{});}),ox=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});};}),ix=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=qb),pc.init(e,t);}),sx=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wb),pc.init(e,t);}),ax=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});};}),cx=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});};}),ux=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 XE(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues));}var fx=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=>XE(n,r,t.property));XE(o,r,t.property);};}),lx=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});};}),dx=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+=S4(o.state)),o.stateDiff&&(n+=` stateDiff:
30
+ `,n+=S4(o.stateDiff)),n},` State Override:
31
+ `).slice(0,-1)}var cg,ug,o2=F(()=>{Te();cg=class extends L{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"});}},ug=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 fg,lg,dg,pg,Es,wu,mg,hg,Fn=F(()=>{ag();vu();Te();fg=class extends L{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"});}},lg=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"});}},dg=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"});}},pg=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"});}},mg=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;}},hg=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 A4,Da,ho=F(()=>{A4=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,gg,yg,Ho,Ti=F(()=>{ln();eg();e2();wi();w4();ws();ag();vu();Et();Te();o2();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
+ ${I4(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?t2({abiItem:c,args:o,includeFunctionName:false,includeName:false}):void 0,f=c?nr(c,{includeName:true}):void 0,d=Ma({address:n&&A4(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=ng({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=m4[x];}else {let x=d?nr(d,{includeName:!0}):void 0,w=d&&h?t2({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;}},gg=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});}},yg=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,cp,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;}},cp=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,bg,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});bg=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 fp=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 lp=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 wg=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 B4(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:o})=>{if(r.length!==66)throw new Xd({size:r.length,targetSize:66,type:"hex"});if(o.length!==66)throw new Xd({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=B4(o)),n!==void 0){if(s.state)throw new ug;s.stateDiff=B4(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 cg({address:r});t[r]=sV(o);}return t}var _g=F(()=>{Lo();Z0();o2();Sn();Ae();});var ef,i2=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();i2();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:u2});i=a;}if(i.type!=="function")throw new mo(void 0,{docsPath:u2});if(!i.outputs)throw new pu(i.name,{docsPath:u2});let s=Ri(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var u2,Pi=F(()=>{Et();ap();ws();u2="/docs/contract/decodeFunctionResult";});var G4,q4=F(()=>{G4="0.1.1";});function W4(){return G4}var K4=F(()=>{q4();});function J4(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?J4(e.cause,t):t?null:e}var de,pn=F(()=>{K4();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 J4(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${W4()}`}});de.setStaticOptions(de.defaultStaticOptions);});function lf(e,t){if(Wn(e)>t)throw new Cg({givenSize:Wn(e),maxSize:t})}function f2(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 Q4(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new zg({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 l2(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,e$=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 Lg({givenSize:dt(e),maxSize:t})}function t$(e,t){if(typeof t=="number"&&t>0&&t>dt(e)-1)throw new pp({offset:t,position:"start",size:dt(e)})}function r$(e,t,r){if(typeof t=="number"&&typeof r=="number"&&dt(e)!==r-t)throw new pp({offset:r,position:"end",size:dt(e)})}function d2(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 Ug({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function n$(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 p2=F(()=>{pr();});function Cs(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+mV:n,r)}var mV,mp=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 i$(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=f2(n.charCodeAt(c++)),f=f2(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 s$(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 Q4(e,{dir:"right",size:t})}function Wn(e){return e.length}function a$(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function c$(e,t={}){let{size:r}=t;typeof r<"u"&&lf(e,r);let o=It(e,t);return g2(o,t)}function u$(e,t={}){let{size:r}=t,o=e;if(typeof r<"u"&&(lf(o,r),o=h2(o)),o.length>1||o[0]>1)throw new m2(o);return !!o[0]}function qo(e,t={}){let{size:r}=t;typeof r<"u"&&lf(e,r);let o=It(e,t);return Dg(o,t)}function f$(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(lf(o,r),o=vV(o)),hV.decode(o)}function h2(e){return l2(e,{dir:"left"})}function vV(e){return l2(e,{dir:"right"})}function l$(e){try{return yV(e),!0}catch{return false}}var hV,gV,m2,pf,Cg,zg,Bs=F(()=>{pn();pr();e$();p2();mp();hV=new TextDecoder,gV=new TextEncoder;m2=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"});}},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:"Bytes.SizeOverflowError"});}},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:"Bytes.SizeExceedsPaddingSizeError"});}};});function EV(e,t={}){let{strict:r=false}=t;if(!e)throw new jg(e);if(typeof e!="string")throw new jg(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Fg(e);if(!e.startsWith("0x"))throw new Fg(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 Hg(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 hp({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 d2(e,{dir:"left",size:t})}function Wo(e,t){return d2(e,{dir:"right",size:t})}function pt(e,t,r,o={}){let{strict:n}=o;t$(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&r$(i,t,r),i}function dt(e){return Math.ceil((e.length-2)/2)}function y2(e){return n$(e,{dir:"left"})}function g2(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 Dg(e,t={}){let{signed:r,size:o}=t;return Number(!r&&!o?e:g2(e,t))}function gp(e,t={}){let{strict:r=false}=t;try{return EV(e,{strict:r}),!0}catch{return false}}var wV,_V,hp,jg,Fg,Lg,pp,Ug,pr=F(()=>{pn();p2();mp();wV=new TextEncoder,_V=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));hp=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"});}},jg=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"});}},Fg=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"});}},Lg=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"});}},pp=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"});}},Ug=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 d$(e){return {address:e.address,amount:Ve(e.amount),index:Ve(e.index),validatorIndex:Ve(e.validatorIndex)}}var p$=F(()=>{pr();});function Vg(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(d$)}}}var b2=F(()=>{pr();p$();});var bo,Zg,h$,Gg,g$,x2,v2,w2,_2,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"}],Zg=[{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"}]}],h$=[{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"}],Gg=[...h$,{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"}]}],g$=[...h$,{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"}]}],x2=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],v2=[{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"}]}],w2=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],_2=[{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 y$,b$=F(()=>{y$="0x82ad56cb";});var qg,x$,v$,Ja,yp=F(()=>{qg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",x$="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",v$="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Ja="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Ya,bp,Xa,Wg=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"});}},bp=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 xp(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 N0({docsPath:E2});if(!("inputs"in n))throw new qd({docsPath:E2});if(!n.inputs||n.inputs.length===0)throw new qd({docsPath:E2});let i=Wr(n.inputs,r);return st([o,i])}var E2,S2=F(()=>{Et();cn();ki();E2="/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(()=>{Wg();});function Kg(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 I2=F(()=>{Ti();Zo();fp();});function Jg(){let e=()=>{},t=()=>{};return {promise:new Promise((o,n)=>{e=o,t=n;}),resolve:e,reject:t}}var A2=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=()=>k2.delete(t),a=()=>c().map(({args:f})=>f),c=()=>k2.get(t)||[],u=f=>k2.set(t,[...c(),f]);return {flush:s,async schedule(f){let{promise:d,resolve:g,reject:h}=Jg();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 k2,Yg=F(()=>{A2();k2=new Map;});var Xg,Qg,ey,w$=F(()=>{Pr();Te();ho();Xg=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"});}},Qg=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"});}},ey=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){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 M0(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 E$=F(()=>{Et();vs();hu();ap();wi();});function T2(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 Wd(r,{docsPath:R2});n=c;}if(n.type!=="error")throw new Wd(void 0,{docsPath:R2});let i=nr(n),s=Do(i),a="0x";if(o&&o.length>0){if(!n.inputs)throw new z0(n.name,{docsPath:R2});a=Wr(n.inputs,o);}return st([s,a])}var R2,S$=F(()=>{Et();cn();hu();ki();wi();ws();R2="/docs/contract/encodeErrorResult";});function I$(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:$2});n=s;}if(n.type!=="function")throw new mo(void 0,{docsPath:$2});if(!n.outputs)throw new pu(n.name,{docsPath:$2});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 $2,A$=F(()=>{Et();ki();ws();$2="/docs/contract/encodeFunctionResult";});async function O2(e){let{data:t,ccipRequest:r}=e,{args:[o]}=_$({abi:Zg,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(zi)?await O2({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=IV(c);}})),I$({abi:Zg,functionName:"query",result:[n,i]})}function IV(e){return e.name==="HttpRequestError"&&e.status?T2({abi:Zg,errorName:"HttpError",args:[e.status,e.shortMessage]}):T2({abi:[Q0],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var zi,vp=F(()=>{mn();eg();E$();S$();A$();zi="x-batch-gateway:true";});var T$={};Er(T$,{ccipRequest:()=>R$,offchainLookup:()=>kV,offchainLookupAbiItem:()=>k$,offchainLookupSignature:()=>AV});async function kV(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=ng({data:o,abi:[k$]}),[a,c,u,f,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:R$;try{if(!zr(i,a))throw new ey({sender:a,to:i});let x=c.includes(zi)?await O2({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 Xg({callbackSelector:f,cause:x,data:o,extraData:d,sender:a,urls:c})}}async function R$({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 Qg({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,k$,$$=F(()=>{zs();w$();Ha();ho();e2();ki();Ps();cn();po();vp();Pr();AV="0x556f1830",k$={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?P$({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?Vg(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=N$(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 bp)&&!(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(()=>($$(),T$));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 yg({factory:x}):Kg(y,{...t,account:Z,chain:e.chain})}}function RV({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(y$)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function $V(e){if(!e)return "default";let t=O$.get(e);if(t!==void 0)return t;let r=TV++;return O$.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:N$(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:P$({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 N$(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 bp}function NV(e,t){return e?Object.keys(e).some(r=>zr(r,t)):false}function P$(e){let{code:t,data:r}=e;return xp({abi:vi(["constructor(bytes, bytes)"]),bytecode:qg,args:[t,r]})}function PV(e){let{data:t,factory:r,factoryData:o,to:n}=e;return xp({abi:vi(["constructor(address, bytes, address, bytes)"]),bytecode:x$,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,O$,zs=F(()=>{fu();b2();ln();mn();b$();yp();Te();Wg();Ti();ho();Pi();S2();jn();Ps();qa();Qa();I2();lp();Xu();Yg();_g();Za();TV=0,O$=new WeakMap;});var pe={};Er(pe,{$brand:()=>Up,$input:()=>k1,$output:()=>A1,NEVER:()=>fb,TimePrecision:()=>$1,ZodAny:()=>_5,ZodArray:()=>A5,ZodBase64:()=>qv,ZodBase64URL:()=>Wv,ZodBigInt:()=>Sl,ZodBigIntFormat:()=>Yv,ZodBoolean:()=>El,ZodCIDRv4:()=>Zv,ZodCIDRv6:()=>Gv,ZodCUID:()=>Uv,ZodCUID2:()=>Mv,ZodCatch:()=>Z5,ZodCodec:()=>aw,ZodCustom:()=>Gm,ZodCustomStringFormat:()=>wl,ZodDate:()=>Hm,ZodDefault:()=>M5,ZodDiscriminatedUnion:()=>k5,ZodE164:()=>Kv,ZodEmail:()=>Cv,ZodEmoji:()=>zv,ZodEnum:()=>xl,ZodError:()=>M3,ZodFile:()=>z5,ZodFirstPartyTypeKind:()=>cw,ZodFunction:()=>eI,ZodGUID:()=>Um,ZodIPv4:()=>Hv,ZodIPv6:()=>Vv,ZodISODate:()=>Bm,ZodISODateTime:()=>Pm,ZodISODuration:()=>zm,ZodISOTime:()=>Cm,ZodIntersection:()=>R5,ZodIssueCode:()=>JB,ZodJWT:()=>Jv,ZodKSUID:()=>Fv,ZodLazy:()=>Y5,ZodLiteral:()=>C5,ZodMap:()=>P5,ZodNaN:()=>q5,ZodNanoID:()=>Lv,ZodNever:()=>S5,ZodNonOptional:()=>iw,ZodNull:()=>v5,ZodNullable:()=>U5,ZodNumber:()=>_l,ZodNumberFormat:()=>Ec,ZodObject:()=>Zm,ZodOptional:()=>ow,ZodPipe:()=>sw,ZodPrefault:()=>j5,ZodPromise:()=>Q5,ZodReadonly:()=>W5,ZodRealError:()=>Xr,ZodRecord:()=>tw,ZodSet:()=>B5,ZodString:()=>vl,ZodStringFormat:()=>et,ZodSuccess:()=>V5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>J5,ZodTransform:()=>L5,ZodTuple:()=>$5,ZodType:()=>ke,ZodULID:()=>Dv,ZodURL:()=>Fm,ZodUUID:()=>ti,ZodUndefined:()=>x5,ZodUnion:()=>Qv,ZodUnknown:()=>E5,ZodVoid:()=>I5,ZodXID:()=>jv,_ZodString:()=>Bv,_default:()=>D5,_function:()=>HB,any:()=>EB,array:()=>Vm,base64:()=>sB,base64url:()=>aB,bigint:()=>bB,boolean:()=>y5,catch:()=>G5,check:()=>VB,cidrv4:()=>oB,cidrv6:()=>iB,clone:()=>Mr,codec:()=>DB,coerce:()=>uw,config:()=>wt,core:()=>ei,cuid:()=>Y3,cuid2:()=>X3,custom:()=>ZB,date:()=>IB,decode:()=>Iv,decodeAsync:()=>kv,discriminatedUnion:()=>$B,e164:()=>cB,email:()=>j3,emoji:()=>K3,encode:()=>Sv,encodeAsync:()=>Av,endsWith:()=>dl,enum:()=>rw,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:()=>Pv,int32:()=>gB,int64:()=>xB,intersection:()=>T5,ipv4:()=>rB,ipv6:()=>nB,iso:()=>Lm,json:()=>WB,jwt:()=>uB,keyof:()=>AB,ksuid:()=>tB,lazy:()=>X5,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:()=>iv,never:()=>Xv,nonnegative:()=>av,nonoptional:()=>H5,nonpositive:()=>sv,normalize:()=>ml,null:()=>w5,nullable:()=>Dm,nullish:()=>LB,number:()=>g5,object:()=>kB,optional:()=>Mm,overwrite:()=>Qo,parse:()=>vv,parseAsync:()=>wv,partialRecord:()=>OB,pipe:()=>jm,positive:()=>ov,prefault:()=>F5,preprocess:()=>KB,prettifyError:()=>wb,promise:()=>FB,property:()=>cv,readonly:()=>K5,record:()=>N5,refine:()=>tI,regex:()=>al,regexes:()=>Rn,registry:()=>dm,safeDecode:()=>Tv,safeDecodeAsync:()=>Ov,safeEncode:()=>Rv,safeEncodeAsync:()=>$v,safeParse:()=>_v,safeParseAsync:()=>Ev,set:()=>PB,setErrorMap:()=>YB,size:()=>sl,startsWith:()=>ll,strictObject:()=>RB,string:()=>Nv,stringFormat:()=>fB,stringbool:()=>qB,success:()=>UB,superRefine:()=>rI,symbol:()=>wB,templateLiteral:()=>jB,toJSONSchema:()=>hv,toLowerCase:()=>gl,toUpperCase:()=>yl,transform:()=>nw,treeifyError:()=>vb,trim:()=>hl,tuple:()=>O5,uint32:()=>yB,uint64:()=>vB,ulid:()=>Q3,undefined:()=>_B,union:()=>ew,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:()=>Kx,$ZodArray:()=>e1,$ZodAsyncError:()=>Xn,$ZodBase64:()=>Mx,$ZodBase64URL:()=>Dx,$ZodBigInt:()=>sm,$ZodBigIntFormat:()=>Zx,$ZodBoolean:()=>Qf,$ZodCIDRv4:()=>zx,$ZodCIDRv6:()=>Lx,$ZodCUID:()=>Ix,$ZodCUID2:()=>Ax,$ZodCatch:()=>y1,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>tx,$ZodCheckEndsWith:()=>px,$ZodCheckGreaterThan:()=>Qp,$ZodCheckIncludes:()=>lx,$ZodCheckLengthEquals:()=>ax,$ZodCheckLessThan:()=>Xp,$ZodCheckLowerCase:()=>ux,$ZodCheckMaxLength:()=>ix,$ZodCheckMaxSize:()=>rx,$ZodCheckMimeType:()=>hx,$ZodCheckMinLength:()=>sx,$ZodCheckMinSize:()=>nx,$ZodCheckMultipleOf:()=>Qb,$ZodCheckNumberFormat:()=>ex,$ZodCheckOverwrite:()=>gx,$ZodCheckProperty:()=>mx,$ZodCheckRegex:()=>cx,$ZodCheckSizeEquals:()=>ox,$ZodCheckStartsWith:()=>dx,$ZodCheckStringFormat:()=>gc,$ZodCheckUpperCase:()=>fx,$ZodCodec:()=>el,$ZodCustom:()=>I1,$ZodCustomStringFormat:()=>Hx,$ZodDate:()=>Qx,$ZodDefault:()=>p1,$ZodDiscriminatedUnion:()=>r1,$ZodE164:()=>jx,$ZodEmail:()=>wx,$ZodEmoji:()=>Ex,$ZodEncodeError:()=>ji,$ZodEnum:()=>a1,$ZodError:()=>qf,$ZodFile:()=>u1,$ZodFunction:()=>_1,$ZodGUID:()=>xx,$ZodIPv4:()=>Bx,$ZodIPv6:()=>Cx,$ZodISODate:()=>Ox,$ZodISODateTime:()=>$x,$ZodISODuration:()=>Px,$ZodISOTime:()=>Nx,$ZodIntersection:()=>n1,$ZodJWT:()=>Fx,$ZodKSUID:()=>Tx,$ZodLazy:()=>S1,$ZodLiteral:()=>c1,$ZodMap:()=>i1,$ZodNaN:()=>b1,$ZodNanoID:()=>Sx,$ZodNever:()=>Yx,$ZodNonOptional:()=>h1,$ZodNull:()=>Wx,$ZodNullable:()=>d1,$ZodNumber:()=>im,$ZodNumberFormat:()=>Vx,$ZodObject:()=>bS,$ZodObjectJIT:()=>t1,$ZodOptional:()=>l1,$ZodPipe:()=>x1,$ZodPrefault:()=>m1,$ZodPromise:()=>E1,$ZodReadonly:()=>v1,$ZodRealError:()=>Jr,$ZodRecord:()=>o1,$ZodRegistry:()=>yc,$ZodSet:()=>s1,$ZodString:()=>Gs,$ZodStringFormat:()=>Xe,$ZodSuccess:()=>g1,$ZodSymbol:()=>Gx,$ZodTemplateLiteral:()=>w1,$ZodTransform:()=>f1,$ZodTuple:()=>cm,$ZodType:()=>we,$ZodULID:()=>kx,$ZodURL:()=>_x,$ZodUUID:()=>vx,$ZodUndefined:()=>qx,$ZodUnion:()=>am,$ZodUnknown:()=>Jx,$ZodVoid:()=>Xx,$ZodXID:()=>Rx,$brand:()=>Up,$constructor:()=>B,$input:()=>k1,$output:()=>A1,Doc:()=>Xf,JSONSchema:()=>p5,JSONSchemaGenerator:()=>bl,NEVER:()=>fb,TimePrecision:()=>$1,_any:()=>Y1,_array:()=>uv,_base64:()=>Tm,_base64url:()=>$m,_bigint:()=>V1,_boolean:()=>F1,_catch:()=>N3,_check:()=>d5,_cidrv4:()=>km,_cidrv6:()=>Rm,_coercedBigint:()=>Z1,_coercedBoolean:()=>H1,_coercedDate:()=>rv,_coercedNumber:()=>z1,_coercedString:()=>T1,_cuid:()=>vm,_cuid2:()=>wm,_custom:()=>lv,_date:()=>tv,_decode:()=>Vp,_decodeAsync:()=>Gp,_default:()=>T3,_discriminatedUnion:()=>y3,_e164:()=>Om,_email:()=>pm,_emoji:()=>bm,_encode:()=>Hp,_encodeAsync:()=>Zp,_endsWith:()=>dl,_enum:()=>E3,_file:()=>fv,_float32:()=>U1,_float64:()=>M1,_gt:()=>Xo,_gte:()=>Yr,_guid:()=>ol,_includes:()=>fl,_int:()=>L1,_int32:()=>D1,_int64:()=>G1,_intersection:()=>b3,_ipv4:()=>Im,_ipv6:()=>Am,_isoDate:()=>N1,_isoDateTime:()=>O1,_isoDuration:()=>B1,_isoTime:()=>P1,_jwt:()=>Nm,_ksuid:()=>Sm,_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:()=>nv,_nanoid:()=>xm,_nativeEnum:()=>S3,_negative:()=>iv,_never:()=>Q1,_nonnegative:()=>av,_nonoptional:()=>$3,_nonpositive:()=>sv,_normalize:()=>ml,_null:()=>J1,_nullable:()=>R3,_number:()=>C1,_optional:()=>k3,_overwrite:()=>Qo,_parse:()=>dc,_parseAsync:()=>pc,_pipe:()=>P3,_positive:()=>ov,_promise:()=>L3,_property:()=>cv,_readonly:()=>B3,_record:()=>v3,_refine:()=>dv,_regex:()=>al,_safeDecode:()=>Wp,_safeDecodeAsync:()=>Jp,_safeEncode:()=>qp,_safeEncodeAsync:()=>Kp,_safeParse:()=>mc,_safeParseAsync:()=>hc,_set:()=>_3,_size:()=>sl,_startsWith:()=>ll,_string:()=>R1,_stringFormat:()=>wc,_stringbool:()=>mv,_success:()=>O3,_superRefine:()=>pv,_symbol:()=>W1,_templateLiteral:()=>C3,_toLowerCase:()=>gl,_toUpperCase:()=>yl,_transform:()=>A3,_trim:()=>hl,_tuple:()=>x3,_uint32:()=>j1,_uint64:()=>q1,_ulid:()=>_m,_undefined:()=>K1,_union:()=>g3,_unknown:()=>X1,_uppercase:()=>ul,_url:()=>il,_uuid:()=>mm,_uuidv4:()=>hm,_uuidv6:()=>gm,_uuidv7:()=>ym,_void:()=>ev,_xid:()=>Em,clone:()=>Mr,config:()=>wt,decode:()=>UN,decodeAsync:()=>DN,encode:()=>LN,encodeAsync:()=>MN,flattenError:()=>Wf,formatError:()=>Kf,globalConfig:()=>Df,globalRegistry:()=>vo,isValidBase64:()=>Ux,isValidBase64URL:()=>mS,isValidJWT:()=>hS,locales:()=>nl,parse:()=>jp,parseAsync:()=>Fp,prettifyError:()=>wb,regexes:()=>Rn,registry:()=>dm,safeDecode:()=>FN,safeDecodeAsync:()=>VN,safeEncode:()=>jN,safeEncodeAsync:()=>HN,safeParse:()=>_b,safeParseAsync:()=>Eb,toDotPath:()=>YE,toJSONSchema:()=>hv,treeifyError:()=>vb,util:()=>te,version:()=>yx});var fb=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 Up=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:()=>xb,Class:()=>db,NUMBER_FORMAT_RANGES:()=>bb,aborted:()=>Gi,allowsEval:()=>mb,assert:()=>hN,assertEqual:()=>lN,assertIs:()=>pN,assertNever:()=>mN,assertNotEqual:()=>dN,assignProp:()=>Hi,base64ToUint8Array:()=>WE,base64urlToUint8Array:()=>NN,cached:()=>fc,captureStackTrace:()=>Dp,cleanEnum:()=>ON,cleanRegex:()=>Hf,clone:()=>Mr,cloneDef:()=>yN,createTransparentProxy:()=>EN,defineLazy:()=>Oe,esc:()=>Mp,escapeRegex:()=>xo,extend:()=>AN,finalizeIssue:()=>yn,floatSafeRemainder:()=>pb,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:()=>yb,partial:()=>TN,pick:()=>SN,prefixIssues:()=>gn,primitiveTypes:()=>gb,promiseAllObject:()=>xN,propertyKeyTypes:()=>Vf,randomString:()=>vN,required:()=>$N,safeExtend:()=>kN,shallowClone:()=>hb,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>KE,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 pb(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 qE=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==qE)return o===void 0&&(o=qE,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 Mp(e){return JSON.stringify(e)}var Dp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var mb=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 hb(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"]),gb=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 yb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var bb={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]},xb={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 WE(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 KE(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 WE(t+r)}function PN(e){return KE(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 db=class{constructor(...t){}};var JE=(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",JE),Jr=B("$ZodError",JE,{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 vb(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 YE(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 wb(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 ${YE(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 Dp(a,n?.callee),a}return s.value},jp=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 Dp(a,n?.callee),a}return s.value},Fp=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}},_b=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}},Eb=hc(Jr),Hp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return dc(e)(t,r,n)},LN=Hp(Jr),Vp=e=>(t,r,o)=>dc(e)(t,r,o),UN=Vp(Jr),Zp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return pc(e)(t,r,n)},MN=Zp(Jr),Gp=e=>async(t,r,o)=>pc(e)(t,r,o),DN=Gp(Jr),qp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return mc(e)(t,r,n)},jN=qp(Jr),Wp=e=>(t,r,o)=>mc(e)(t,r,o),FN=Wp(Jr),Kp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return hc(e)(t,r,n)},HN=Kp(Jr),Jp=e=>async(t,r,o)=>hc(e)(t,r,o),VN=Jp(Jr);var Rn={};Er(Rn,{base64:()=>Ub,base64url:()=>Yp,bigint:()=>Zb,boolean:()=>Wb,browserEmail:()=>XN,cidrv4:()=>zb,cidrv6:()=>Lb,cuid:()=>Sb,cuid2:()=>Ib,date:()=>jb,datetime:()=>Hb,domain:()=>eP,duration:()=>$b,e164:()=>Db,email:()=>Nb,emoji:()=>Pb,extendedDuration:()=>ZN,guid:()=>Ob,hex:()=>tP,hostname:()=>Mb,html5Email:()=>KN,idnEmail:()=>YN,integer:()=>Gb,ipv4:()=>Bb,ipv6:()=>Cb,ksuid:()=>Rb,lowercase:()=>Yb,md5_base64:()=>nP,md5_base64url:()=>oP,md5_hex:()=>rP,nanoid:()=>Tb,null:()=>Kb,number:()=>qb,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:()=>Vb,time:()=>Fb,ulid:()=>Ab,undefined:()=>Jb,unicodeEmail:()=>XE,uppercase:()=>Xb,uuid:()=>Zs,uuid4:()=>GN,uuid6:()=>qN,uuid7:()=>WN,xid:()=>kb});var Sb=/^[cC][^\s-]{8,}$/,Ib=/^[0-9a-z]+$/,Ab=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kb=/^[0-9a-vA-V]{20}$/,Rb=/^[A-Za-z0-9]{27}$/,Tb=/^[a-zA-Z0-9_-]{21}$/,$b=/^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)?)??$/,Ob=/^([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),Nb=/^(?!\.)(?!.*\.\.)([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,}))$/,XE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,YN=XE,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 Pb(){return new RegExp(QN,"u")}var Bb=/^(?:(?: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])$/,Cb=/^(([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}|:))$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Lb=/^(([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])$/,Ub=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yp=/^[A-Za-z0-9_-]*$/,Mb=/^(?=.{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,}$/,Db=/^\+(?:[0-9]){6,14}[0-9]$/,QE="(?:(?:\\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])))",jb=new RegExp(`^${QE}$`);function eS(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 Fb(e){return new RegExp(`^${eS(e)}$`)}function Hb(e){let t=eS({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(`^${QE}T(?:${o})$`)}var Vb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Zb=/^-?\d+n?$/,Gb=/^-?\d+$/,qb=/^-?\d+(?:\.\d+)?/,Wb=/^(?:true|false)$/i,Kb=/^null$/i;var Jb=/^undefined$/i;var Yb=/^[^A-Z]*$/,Xb=/^[^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=[]);}),rS={number:"number",bigint:"bigint",object:"date"},Xp=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=rS[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});};}),Qp=B("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=rS[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});};}),Qb=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):pb(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});};}),ex=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]=bb[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=Gb);}),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});};}),tx=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=xb[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});};}),rx=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});};}),nx=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});};}),ox=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});};}),ix=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});};}),sx=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});};}),ax=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=()=>{});}),cx=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});};}),ux=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Yb),gc.init(e,t);}),fx=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xb),gc.init(e,t);}),lx=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});};}),dx=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});};}),px=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 tS(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues));}var mx=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=>tS(n,r,t.property));tS(o,r,t.property);};}),hx=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});};}),gx=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 px={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=px;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=Vi(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=Vi(s,g)));});else {if(s.issues.length===g)continue;u||(u=Vi(s,g));}}return f?f.then(()=>s):s},i=(s,a,c)=>{if(Vi(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=bb(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return xb(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1};}),Fs=B("$ZodString",(e,t)=>{we.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Db(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),Fs.init(e,t);}),hx=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kb),Xe.init(e,t);}),gx=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=js(o));}else t.pattern??(t.pattern=js());Xe.init(e,t);}),yx=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rb),Xe.init(e,t);}),bx=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:Cb.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});}};}),xx=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Tb()),Xe.init(e,t);}),vx=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ib),Xe.init(e,t);}),wx=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vb),Xe.init(e,t);}),_x=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wb),Xe.init(e,t);}),Ex=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=_b),Xe.init(e,t);}),Sx=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Eb),Xe.init(e,t);}),Ix=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sb),Xe.init(e,t);}),Ax=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Mb(t)),Xe.init(e,t);}),kx=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Lb),Xe.init(e,t);}),Rx=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ub(t)),Xe.init(e,t);}),Tx=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ab),Xe.init(e,t);}),$x=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$b),Xe.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),Ox=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ob),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});}};}),Nx=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nb),Xe.init(e,t);}),Px=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pb),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 Bx(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Cx=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Bb),Xe.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Bx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function lS(e){if(!Kp.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Bx(r)}var zx=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=>{lS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Lx=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zb),Xe.init(e,t);});function dS(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 Ux=B("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{dS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Mx=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??Hb,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};}),Dx=B("$ZodNumber",(e,t)=>{Jb.init(e,t),nm.init(e,t);}),Wf=B("$ZodBoolean",(e,t)=>{we.init(e,t),e._zod.pattern=Vb,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=jb,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};}),jx=B("$ZodBigInt",(e,t)=>{Yb.init(e,t),om.init(e,t);}),Fx=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};}),Hx=B("$ZodUndefined",(e,t)=>{we.init(e,t),e._zod.pattern=Gb,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};}),Vx=B("$ZodNull",(e,t)=>{we.init(e,t),e._zod.pattern=Zb,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};}),Zx=B("$ZodAny",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Gx=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);}),Wx=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};}),Kx=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 tS(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues)),t.value[r]=e.value;}var Jx=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=>tS(u,r,s))):tS(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 pS(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=pb(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function mS(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 hS=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(()=>pS(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=Ds,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?mS(f,u,a,c,o.value,e):f.length?Promise.all(f).then(()=>a):a};}),Yx=B("$ZodObjectJIT",(e,t)=>{hS.init(e,t);let r=e._zod.parse,o=ac(()=>pS(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 yx={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=yx;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=_b(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Eb(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()??Vb(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);}),xx=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ob),Xe.init(e,t);}),vx=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);}),wx=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Nb),Xe.init(e,t);}),_x=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:Mb.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});}};}),Ex=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Pb()),Xe.init(e,t);}),Sx=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Tb),Xe.init(e,t);}),Ix=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Sb),Xe.init(e,t);}),Ax=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ib),Xe.init(e,t);}),kx=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ab),Xe.init(e,t);}),Rx=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=kb),Xe.init(e,t);}),Tx=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Rb),Xe.init(e,t);}),$x=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Hb(t)),Xe.init(e,t);}),Ox=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=jb),Xe.init(e,t);}),Nx=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Fb(t)),Xe.init(e,t);}),Px=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=$b),Xe.init(e,t);}),Bx=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Bb),Xe.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),Cx=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Cb),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});}};}),zx=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=zb),Xe.init(e,t);}),Lx=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Lb),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 Ux(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Mx=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ub),Xe.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Ux(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function mS(e){if(!Yp.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ux(r)}var Dx=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Yp),Xe.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{mS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),jx=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Db),Xe.init(e,t);});function hS(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 Fx=B("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{hS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Hx=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});};}),im=B("$ZodNumber",(e,t)=>{we.init(e,t),e._zod.pattern=e._zod.bag.pattern??qb,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};}),Vx=B("$ZodNumber",(e,t)=>{ex.init(e,t),im.init(e,t);}),Qf=B("$ZodBoolean",(e,t)=>{we.init(e,t),e._zod.pattern=Wb,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};}),sm=B("$ZodBigInt",(e,t)=>{we.init(e,t),e._zod.pattern=Zb,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};}),Zx=B("$ZodBigInt",(e,t)=>{tx.init(e,t),sm.init(e,t);}),Gx=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};}),qx=B("$ZodUndefined",(e,t)=>{we.init(e,t),e._zod.pattern=Jb,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};}),Wx=B("$ZodNull",(e,t)=>{we.init(e,t),e._zod.pattern=Kb,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};}),Kx=B("$ZodAny",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Jx=B("$ZodUnknown",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Yx=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);}),Xx=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};}),Qx=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 oS(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues)),t.value[r]=e.value;}var e1=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=>oS(u,r,s))):oS(c,r,s);}return i.length?Promise.all(i).then(()=>r):r};});function om(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 gS(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=yb(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function yS(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=>om(g,r,f,t))):om(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 bS=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(()=>gS(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=>om(w,a,g,u))):om(x,a,g,u);}return i?yS(f,u,a,c,o.value,e):f.length?Promise.all(f).then(()=>a):a};}),t1=B("$ZodObjectJIT",(e,t)=>{bS.init(e,t);let r=e._zod.parse,o=fc(()=>gS(t)),n=g=>{let h=new Xf(["shape","payload","ctx"]),x=o.value,w=O=>{let S=Mp(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=Mp(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=Ds,a=!Cf.jitless,u=a&&fb.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?mS([],v,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),g)};});function rS(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=>!Vi(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=>rS(c,n,e,i)):rS(a,n,e,i)};}),Xx=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(!Ds(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)};}),Qx=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])=>nS(r,c,u)):nS(r,i,s)};});function mx(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(Hi(e)&&Hi(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=mx(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=mx(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 nS(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Vi(e))return e;let o=mx(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 e1=B("$ZodRecord",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Hi(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};}),t1=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])=>{oS(f,d,r,s,n,e,o);})):oS(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function oS(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 r1=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=>iS(c,r))):iS(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function iS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var n1=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};}),o1=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};}),i1=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};}),s1=B("$ZodTransform",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Mi(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 sS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var a1=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=>sS(i,r.value)):sS(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),c1=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);}),u1=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=>aS(i,t)):aS(n,t)};});function aS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var f1=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));}),l1=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=>cS(i,e)):cS(n,e)};});function cS(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 d1=B("$ZodSuccess",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Mi("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)};}),p1=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)};}),m1=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);}),h1=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 g1=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(uS):uS(n)};});function uS(e){return e.value=Object.freeze(e.value),e}var y1=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||db.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);}),b1=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)),x1=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));}),v1=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);}),w1=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=>fS(i,r,o,e));fS(n,r,o,e);};});function fS(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:()=>gS,az:()=>yS,be:()=>xS,bg:()=>vS,ca:()=>wS,cs:()=>_S,da:()=>ES,de:()=>SS,en:()=>am,eo:()=>IS,es:()=>AS,fa:()=>kS,fi:()=>RS,fr:()=>TS,frCA:()=>$S,he:()=>OS,hu:()=>NS,id:()=>PS,is:()=>BS,it:()=>CS,ja:()=>zS,ka:()=>LS,kh:()=>US,km:()=>cm,ko:()=>MS,lt:()=>jS,mk:()=>FS,ms:()=>HS,nl:()=>VS,no:()=>ZS,ota:()=>GS,pl:()=>WS,ps:()=>qS,pt:()=>KS,ru:()=>YS,sl:()=>XS,sv:()=>QS,ta:()=>e5,th:()=>t5,tr:()=>r5,ua:()=>n5,uk:()=>um,ur:()=>o5,vi:()=>i5,yo:()=>c5,zhCN:()=>s5,zhTW:()=>a5});var mP=()=>{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 gS(){return {localeError:mP()}}var hP=()=>{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 yS(){return {localeError:hP()}}function bS(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 gP=()=>{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=bS(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=bS(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 xS(){return {localeError:gP()}}var yP=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},bP=()=>{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 ${yP(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 vS(){return {localeError:bP()}}var xP=()=>{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 wS(){return {localeError:xP()}}var vP=()=>{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 _S(){return {localeError:vP()}}var wP=()=>{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 ES(){return {localeError:wP()}}var _P=()=>{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 SS(){return {localeError:_P()}}var EP=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},SP=()=>{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 ${EP(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:SP()}}var IP=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},AP=()=>{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 ${IP(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 IS(){return {localeError:AP()}}var kP=()=>{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 AS(){return {localeError:kP()}}var RP=()=>{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 kS(){return {localeError:RP()}}var TP=()=>{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 RS(){return {localeError:TP()}}var $P=()=>{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 TS(){return {localeError:$P()}}var OP=()=>{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 $S(){return {localeError:OP()}}var NP=()=>{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 OS(){return {localeError:NP()}}var PP=()=>{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 NS(){return {localeError:PP()}}var BP=()=>{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 PS(){return {localeError:BP()}}var CP=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},zP=()=>{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 ${CP(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 BS(){return {localeError:zP()}}var LP=()=>{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 CS(){return {localeError:LP()}}var UP=()=>{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 zS(){return {localeError:UP()}}var MP=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},DP=()=>{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 ${MP(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 LS(){return {localeError:DP()}}var jP=()=>{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:jP()}}function US(){return cm()}var FP=()=>{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 MS(){return {localeError:FP()}}var HP=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 DS(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 VP=()=>{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 ${HP(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,DS(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,DS(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 jS(){return {localeError:VP()}}var ZP=()=>{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 FS(){return {localeError:ZP()}}var GP=()=>{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 HS(){return {localeError:GP()}}var qP=()=>{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 VS(){return {localeError:qP()}}var WP=()=>{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 ZS(){return {localeError:WP()}}var KP=()=>{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 GS(){return {localeError:KP()}}var JP=()=>{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 qS(){return {localeError:JP()}}var YP=()=>{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 WS(){return {localeError:YP()}}var XP=()=>{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 KS(){return {localeError:XP()}}function JS(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 QP=()=>{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=JS(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=JS(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 YS(){return {localeError:QP()}}var e3=()=>{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 XS(){return {localeError:e3()}}var t3=()=>{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 QS(){return {localeError:t3()}}var r3=()=>{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 e5(){return {localeError:r3()}}var n3=()=>{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 t5(){return {localeError:n3()}}var o3=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},i3=()=>{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 ${o3(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 r5(){return {localeError:i3()}}var s3=()=>{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:s3()}}function n5(){return um()}var a3=()=>{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 o5(){return {localeError:a3()}}var c3=()=>{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 i5(){return {localeError:c3()}}var u3=()=>{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 s5(){return {localeError:u3()}}var f3=()=>{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 a5(){return {localeError:f3()}}var l3=()=>{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 c5(){return {localeError:l3()}}var _1=Symbol("ZodOutput"),E1=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 S1(e,t){return new e({type:"string",...ee(t)})}function I1(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 A1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function k1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...ee(t)})}function R1(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function T1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function $1(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function O1(e,t){return new e({type:"number",checks:[],...ee(t)})}function N1(e,t){return new e({type:"number",coerce:true,checks:[],...ee(t)})}function P1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...ee(t)})}function B1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...ee(t)})}function C1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...ee(t)})}function z1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...ee(t)})}function L1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...ee(t)})}function U1(e,t){return new e({type:"boolean",...ee(t)})}function M1(e,t){return new e({type:"boolean",coerce:true,...ee(t)})}function D1(e,t){return new e({type:"bigint",...ee(t)})}function j1(e,t){return new e({type:"bigint",coerce:true,...ee(t)})}function F1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...ee(t)})}function H1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...ee(t)})}function V1(e,t){return new e({type:"symbol",...ee(t)})}function Z1(e,t){return new e({type:"undefined",...ee(t)})}function G1(e,t){return new e({type:"null",...ee(t)})}function q1(e){return new e({type:"any"})}function W1(e){return new e({type:"unknown"})}function K1(e,t){return new e({type:"never",...ee(t)})}function J1(e,t){return new e({type:"void",...ee(t)})}function Y1(e,t){return new e({type:"date",...ee(t)})}function X1(e,t){return new e({type:"date",coerce:true,...ee(t)})}function Q1(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 ev(e){return Yo(0,e)}function tv(e){return Jo(0,e)}function rv(e){return Rn(0,e)}function nv(e){return Yr(0,e)}function Hs(e,t){return new Kb({check:"multiple_of",...ee(t),value:e})}function hc(e,t){return new Xb({check:"max_size",...ee(t),maximum:e})}function Vs(e,t){return new Qb({check:"min_size",...ee(t),minimum:e})}function tl(e,t){return new ex({check:"size_equals",...ee(t),size:e})}function gc(e,t){return new tx({check:"max_length",...ee(t),maximum:e})}function Zi(e,t){return new rx({check:"min_length",...ee(t),minimum:e})}function yc(e,t){return new nx({check:"length_equals",...ee(t),length:e})}function rl(e,t){return new ox({check:"string_format",format:"regex",...ee(t),pattern:e})}function nl(e){return new ix({check:"string_format",format:"lowercase",...ee(e)})}function ol(e){return new sx({check:"string_format",format:"uppercase",...ee(e)})}function il(e,t){return new ax({check:"string_format",format:"includes",...ee(t),includes:e})}function sl(e,t){return new cx({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function al(e,t){return new ux({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function ov(e,t,r){return new fx({check:"property",property:e,schema:t,...ee(r)})}function cl(e,t){return new lx({check:"mime_type",mime:e,...ee(t)})}function Xo(e){return new dx({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 iv(e,t,r){return new e({type:"array",element:t,...ee(r)})}function d3(e,t,r){return new e({type:"union",options:t,...ee(r)})}function p3(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...ee(o)})}function m3(e,t,r){return new e({type:"intersection",left:t,right:r})}function h3(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 g3(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...ee(o)})}function y3(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...ee(o)})}function b3(e,t,r){return new e({type:"set",valueType:t,...ee(r)})}function x3(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 v3(e,t,r){return new e({type:"enum",entries:t,...ee(r)})}function w3(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ee(r)})}function sv(e,t){return new e({type:"file",...ee(t)})}function _3(e,t){return new e({type:"transform",transform:t})}function E3(e,t){return new e({type:"optional",innerType:t})}function S3(e,t){return new e({type:"nullable",innerType:t})}function I3(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():lb(r)}})}function A3(e,t,r){return new e({type:"nonoptional",innerType:t,...ee(r)})}function k3(e,t){return new e({type:"success",innerType:t})}function R3(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function T3(e,t,r){return new e({type:"pipe",in:t,out:r})}function $3(e,t){return new e({type:"readonly",innerType:t})}function O3(e,t,r){return new e({type:"template_literal",parts:t,...ee(r)})}function N3(e,t){return new e({type:"lazy",getter:t})}function P3(e,t){return new e({type:"promise",innerType:t})}function av(e,t,r){let o=ee(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function cv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ee(r)})}function uv(e){let t=u5(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 u5(e,t){let r=new ot({check:"custom",...ee(t)});return r._zod.check=e,r}function fv(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??Fs,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&&mb.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?yS([],x,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),g)};});function iS(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 am=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=>iS(c,n,e,i)):iS(a,n,e,i)};}),r1=B("$ZodDiscriminatedUnion",(e,t)=>{am.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)};}),n1=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])=>sS(r,c,u)):sS(r,i,s)};});function bx(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=bx(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=bx(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 sS(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=bx(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 cm=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=>em(d,n,c))):em(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=>em(g,n,c))):em(d,n,c);}}return a.length?Promise.all(a).then(()=>n):n};});function em(e,t,r){e.issues.length&&t.issues.push(...gn(r,e.issues)),t.value[r]=e.value;}var o1=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};}),i1=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])=>{aS(f,d,r,s,n,e,o);})):aS(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function aS(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 s1=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=>cS(c,r))):cS(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function cS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var a1=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};}),c1=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};}),u1=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};}),f1=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 uS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var l1=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=>uS(i,r.value)):uS(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),d1=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);}),p1=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=>fS(i,t)):fS(n,t)};});function fS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var m1=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));}),h1=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=>lS(i,e)):lS(n,e)};});function lS(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 g1=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)};}),y1=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)};}),b1=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);}),x1=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=>tm(s,t.in,o)):tm(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>tm(i,t.out,o)):tm(n,t.out,o)};});function tm(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=>rm(s,t,o)):rm(i,t,o)}else {let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>rm(s,t,o)):rm(i,t,o)}};});function rm(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=>nm(e,i,t.out,r)):nm(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>nm(e,i,t.in,r)):nm(e,n,t.in,r)}}function nm(e,t,r,o){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},o)}var v1=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(dS):dS(n)};});function dS(e){return e.value=Object.freeze(e.value),e}var w1=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||gb.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);}),_1=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?jp(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?jp(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 Fp(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Fp(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 cm({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)),E1=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));}),S1=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);}),I1=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=>pS(i,r,o,e));pS(n,r,o,e);};});function pS(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:()=>xS,az:()=>vS,be:()=>_S,bg:()=>ES,ca:()=>SS,cs:()=>IS,da:()=>AS,de:()=>kS,en:()=>um,eo:()=>RS,es:()=>TS,fa:()=>$S,fi:()=>OS,fr:()=>NS,frCA:()=>PS,he:()=>BS,hu:()=>CS,id:()=>zS,is:()=>LS,it:()=>US,ja:()=>MS,ka:()=>DS,kh:()=>jS,km:()=>fm,ko:()=>FS,lt:()=>VS,mk:()=>ZS,ms:()=>GS,nl:()=>qS,no:()=>WS,ota:()=>KS,pl:()=>YS,ps:()=>JS,pt:()=>XS,ru:()=>e5,sl:()=>t5,sv:()=>r5,ta:()=>n5,th:()=>o5,tr:()=>i5,ua:()=>s5,uk:()=>lm,ur:()=>a5,vi:()=>c5,yo:()=>l5,zhCN:()=>u5,zhTW:()=>f5});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 xS(){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 vS(){return {localeError:xP()}}function wS(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=wS(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=wS(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 _S(){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 ES(){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 SS(){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 IS(){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 AS(){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 kS(){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 um(){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 RS(){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 TS(){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 $S(){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 OS(){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 NS(){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 PS(){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 BS(){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 CS(){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 zS(){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 LS(){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 US(){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 MS(){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 DS(){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 fm(){return {localeError:ZP()}}function jS(){return fm()}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 FS(){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 HS(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,HS(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,HS(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 VS(){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 ZS(){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 GS(){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 qS(){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 WS(){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 KS(){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 JS(){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 YS(){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 XS(){return {localeError:r3()}}function QS(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=QS(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=QS(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 e5(){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 t5(){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 r5(){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 n5(){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 o5(){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 i5(){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 lm(){return {localeError:f3()}}function s5(){return lm()}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 a5(){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 c5(){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 u5(){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 f5(){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 l5(){return {localeError:h3()}}var A1=Symbol("ZodOutput"),k1=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 dm(){return new yc}var vo=dm();function R1(e,t){return new e({type:"string",...ee(t)})}function T1(e,t){return new e({type:"string",coerce:true,...ee(t)})}function pm(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 mm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...ee(t)})}function hm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...ee(t)})}function gm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...ee(t)})}function ym(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 bm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...ee(t)})}function xm(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...ee(t)})}function vm(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...ee(t)})}function wm(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...ee(t)})}function _m(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...ee(t)})}function Em(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...ee(t)})}function Sm(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...ee(t)})}function Im(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...ee(t)})}function Am(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...ee(t)})}function km(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...ee(t)})}function Rm(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...ee(t)})}function Tm(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...ee(t)})}function $m(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...ee(t)})}function Om(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...ee(t)})}function Nm(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...ee(t)})}var $1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function O1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...ee(t)})}function N1(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function P1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function B1(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function C1(e,t){return new e({type:"number",checks:[],...ee(t)})}function z1(e,t){return new e({type:"number",coerce:true,checks:[],...ee(t)})}function L1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...ee(t)})}function U1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...ee(t)})}function M1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...ee(t)})}function D1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...ee(t)})}function j1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...ee(t)})}function F1(e,t){return new e({type:"boolean",...ee(t)})}function H1(e,t){return new e({type:"boolean",coerce:true,...ee(t)})}function V1(e,t){return new e({type:"bigint",...ee(t)})}function Z1(e,t){return new e({type:"bigint",coerce:true,...ee(t)})}function G1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...ee(t)})}function q1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...ee(t)})}function W1(e,t){return new e({type:"symbol",...ee(t)})}function K1(e,t){return new e({type:"undefined",...ee(t)})}function J1(e,t){return new e({type:"null",...ee(t)})}function Y1(e){return new e({type:"any"})}function X1(e){return new e({type:"unknown"})}function Q1(e,t){return new e({type:"never",...ee(t)})}function ev(e,t){return new e({type:"void",...ee(t)})}function tv(e,t){return new e({type:"date",...ee(t)})}function rv(e,t){return new e({type:"date",coerce:true,...ee(t)})}function nv(e,t){return new e({type:"nan",...ee(t)})}function Yo(e,t){return new Xp({check:"less_than",...ee(t),value:e,inclusive:false})}function Tn(e,t){return new Xp({check:"less_than",...ee(t),value:e,inclusive:true})}function Xo(e,t){return new Qp({check:"greater_than",...ee(t),value:e,inclusive:false})}function Yr(e,t){return new Qp({check:"greater_than",...ee(t),value:e,inclusive:true})}function ov(e){return Xo(0,e)}function iv(e){return Yo(0,e)}function sv(e){return Tn(0,e)}function av(e){return Yr(0,e)}function qs(e,t){return new Qb({check:"multiple_of",...ee(t),value:e})}function bc(e,t){return new rx({check:"max_size",...ee(t),maximum:e})}function Ws(e,t){return new nx({check:"min_size",...ee(t),minimum:e})}function sl(e,t){return new ox({check:"size_equals",...ee(t),size:e})}function xc(e,t){return new ix({check:"max_length",...ee(t),maximum:e})}function qi(e,t){return new sx({check:"min_length",...ee(t),minimum:e})}function vc(e,t){return new ax({check:"length_equals",...ee(t),length:e})}function al(e,t){return new cx({check:"string_format",format:"regex",...ee(t),pattern:e})}function cl(e){return new ux({check:"string_format",format:"lowercase",...ee(e)})}function ul(e){return new fx({check:"string_format",format:"uppercase",...ee(e)})}function fl(e,t){return new lx({check:"string_format",format:"includes",...ee(t),includes:e})}function ll(e,t){return new dx({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function dl(e,t){return new px({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function cv(e,t,r){return new mx({check:"property",property:e,schema:t,...ee(r)})}function pl(e,t){return new hx({check:"mime_type",mime:e,...ee(t)})}function Qo(e){return new gx({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 uv(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 fv(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():hb(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 lv(e,t,r){let o=ee(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function dv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ee(r)})}function pv(e){let t=d5(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 d5(e,t){let r=new ot({check:"custom",...ee(t)});return r._zod.check=e,r}function mv(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 lv(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 f5={};var Cm={};Er(Cm,{ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,date:()=>pv,datetime:()=>dv,duration:()=>hv,time:()=>mv});var Om=B("ZodISODateTime",(e,t)=>{Ax.init(e,t),et.init(e,t);});function dv(e){return k1(Om,e)}var Nm=B("ZodISODate",(e,t)=>{kx.init(e,t),et.init(e,t);});function pv(e){return R1(Nm,e)}var Pm=B("ZodISOTime",(e,t)=>{Rx.init(e,t),et.init(e,t);});function mv(e){return T1(Pm,e)}var Bm=B("ZodISODuration",(e,t)=>{Tx.init(e,t),et.init(e,t);});function hv(e){return $1(Bm,e)}var d5=(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}}});},C3=B("ZodError",d5),Xr=B("ZodError",d5,{Parent:Error});var gv=uc(Xr),yv=fc(Xr),bv=lc(Xr),xv=dc(Xr),vv=jp(Xr),wv=Fp(Xr),_v=Hp(Xr),Ev=Vp(Xr),Sv=Zp(Xr),Iv=Gp(Xr),Av=qp(Xr),kv=Wp(Xr);var Ae=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)=>gv(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>bv(e,r,o),e.parseAsync=async(r,o)=>yv(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>xv(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>vv(e,r,o),e.decode=(r,o)=>wv(e,r,o),e.encodeAsync=async(r,o)=>_v(e,r,o),e.decodeAsync=async(r,o)=>Ev(e,r,o),e.safeEncode=(r,o)=>Sv(e,r,o),e.safeDecode=(r,o)=>Iv(e,r,o),e.safeEncodeAsync=async(r,o)=>Av(e,r,o),e.safeDecodeAsync=async(r,o)=>kv(e,r,o),e.refine=(r,o)=>e.check(X5(r,o)),e.superRefine=r=>e.check(Q5(r)),e.overwrite=r=>e.check(Xo(r)),e.optional=()=>Lm(e),e.nullable=()=>Um(e),e.nullish=()=>Lm(Um(e)),e.nonoptional=r=>D5(e,r),e.array=()=>Fm(e),e.or=r=>Jv([e,r]),e.and=r=>A5(e,r),e.transform=r=>Mm(e,Qv(r)),e.default=r=>L5(e,r),e.prefault=r=>M5(e,r),e.catch=r=>H5(e,r),e.pipe=r=>Mm(e,r),e.readonly=()=>G5(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)),$v=B("_ZodString",(e,t)=>{Fs.init(e,t),Ae.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(Zi(...o)),e.max=(...o)=>e.check(gc(...o)),e.length=(...o)=>e.check(yc(...o)),e.nonempty=(...o)=>e.check(Zi(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)=>{Fs.init(e,t),$v.init(e,t),e.email=r=>e.check(lm(Ov,r)),e.url=r=>e.check(el(Dm,r)),e.jwt=r=>e.check($m(Gv,r)),e.emoji=r=>e.check(gm(Nv,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(Pv,r)),e.guid=r=>e.check(Qf(zm,r)),e.cuid=r=>e.check(bm(Bv,r)),e.cuid2=r=>e.check(xm(Cv,r)),e.ulid=r=>e.check(vm(zv,r)),e.base64=r=>e.check(km(Hv,r)),e.base64url=r=>e.check(Rm(Vv,r)),e.xid=r=>e.check(wm(Lv,r)),e.ksuid=r=>e.check(_m(Uv,r)),e.ipv4=r=>e.check(Em(Mv,r)),e.ipv6=r=>e.check(Sm(Dv,r)),e.cidrv4=r=>e.check(Im(jv,r)),e.cidrv6=r=>e.check(Am(Fv,r)),e.e164=r=>e.check(Tm(Zv,r)),e.datetime=r=>e.check(dv(r)),e.date=r=>e.check(pv(r)),e.time=r=>e.check(mv(r)),e.duration=r=>e.check(hv(r));});function Rv(e){return S1(hl,e)}var et=B("ZodStringFormat",(e,t)=>{Xe.init(e,t),$v.init(e,t);}),Ov=B("ZodEmail",(e,t)=>{yx.init(e,t),et.init(e,t);});function L3(e){return lm(Ov,e)}var zm=B("ZodGUID",(e,t)=>{hx.init(e,t),et.init(e,t);});function U3(e){return Qf(zm,e)}var ei=B("ZodUUID",(e,t)=>{gx.init(e,t),et.init(e,t);});function M3(e){return dm(ei,e)}function D3(e){return pm(ei,e)}function j3(e){return mm(ei,e)}function F3(e){return hm(ei,e)}var Dm=B("ZodURL",(e,t)=>{bx.init(e,t),et.init(e,t);});function H3(e){return el(Dm,e)}function V3(e){return el(Dm,{protocol:/^https?$/,hostname:kn.domain,...te.normalizeParams(e)})}var Nv=B("ZodEmoji",(e,t)=>{xx.init(e,t),et.init(e,t);});function Z3(e){return gm(Nv,e)}var Pv=B("ZodNanoID",(e,t)=>{vx.init(e,t),et.init(e,t);});function G3(e){return ym(Pv,e)}var Bv=B("ZodCUID",(e,t)=>{wx.init(e,t),et.init(e,t);});function q3(e){return bm(Bv,e)}var Cv=B("ZodCUID2",(e,t)=>{_x.init(e,t),et.init(e,t);});function W3(e){return xm(Cv,e)}var zv=B("ZodULID",(e,t)=>{Ex.init(e,t),et.init(e,t);});function K3(e){return vm(zv,e)}var Lv=B("ZodXID",(e,t)=>{Sx.init(e,t),et.init(e,t);});function J3(e){return wm(Lv,e)}var Uv=B("ZodKSUID",(e,t)=>{Ix.init(e,t),et.init(e,t);});function Y3(e){return _m(Uv,e)}var Mv=B("ZodIPv4",(e,t)=>{$x.init(e,t),et.init(e,t);});function X3(e){return Em(Mv,e)}var Dv=B("ZodIPv6",(e,t)=>{Ox.init(e,t),et.init(e,t);});function Q3(e){return Sm(Dv,e)}var jv=B("ZodCIDRv4",(e,t)=>{Nx.init(e,t),et.init(e,t);});function eB(e){return Im(jv,e)}var Fv=B("ZodCIDRv6",(e,t)=>{Px.init(e,t),et.init(e,t);});function tB(e){return Am(Fv,e)}var Hv=B("ZodBase64",(e,t)=>{Cx.init(e,t),et.init(e,t);});function rB(e){return km(Hv,e)}var Vv=B("ZodBase64URL",(e,t)=>{zx.init(e,t),et.init(e,t);});function nB(e){return Rm(Vv,e)}var Zv=B("ZodE164",(e,t)=>{Lx.init(e,t),et.init(e,t);});function oB(e){return Tm(Zv,e)}var Gv=B("ZodJWT",(e,t)=>{Ux.init(e,t),et.init(e,t);});function iB(e){return $m(Gv,e)}var gl=B("ZodCustomStringFormat",(e,t)=>{Mx.init(e,t),et.init(e,t);});function sB(e,t,r={}){return bc(gl,e,t,r)}function aB(e){return bc(gl,"hostname",kn.hostname,e)}function cB(e){return bc(gl,"hex",kn.hex,e)}function uB(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),Ae.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(Tv(o)),e.safe=o=>e.check(Tv(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(Hs(o,n)),e.step=(o,n)=>e.check(Hs(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 p5(e){return O1(yl,e)}var vc=B("ZodNumberFormat",(e,t)=>{Dx.init(e,t),yl.init(e,t);});function Tv(e){return P1(vc,e)}function fB(e){return B1(vc,e)}function lB(e){return C1(vc,e)}function dB(e){return z1(vc,e)}function pB(e){return L1(vc,e)}var bl=B("ZodBoolean",(e,t)=>{Wf.init(e,t),Ae.init(e,t);});function m5(e){return U1(bl,e)}var xl=B("ZodBigInt",(e,t)=>{om.init(e,t),Ae.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(Hs(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function mB(e){return D1(xl,e)}var qv=B("ZodBigIntFormat",(e,t)=>{jx.init(e,t),xl.init(e,t);});function hB(e){return F1(qv,e)}function gB(e){return H1(qv,e)}var h5=B("ZodSymbol",(e,t)=>{Fx.init(e,t),Ae.init(e,t);});function yB(e){return V1(h5,e)}var g5=B("ZodUndefined",(e,t)=>{Hx.init(e,t),Ae.init(e,t);});function bB(e){return Z1(g5,e)}var y5=B("ZodNull",(e,t)=>{Vx.init(e,t),Ae.init(e,t);});function b5(e){return G1(y5,e)}var x5=B("ZodAny",(e,t)=>{Zx.init(e,t),Ae.init(e,t);});function xB(){return q1(x5)}var v5=B("ZodUnknown",(e,t)=>{Gx.init(e,t),Ae.init(e,t);});function xc(){return W1(v5)}var w5=B("ZodNever",(e,t)=>{qx.init(e,t),Ae.init(e,t);});function Wv(e){return K1(w5,e)}var _5=B("ZodVoid",(e,t)=>{Wx.init(e,t),Ae.init(e,t);});function vB(e){return J1(_5,e)}var jm=B("ZodDate",(e,t)=>{Kx.init(e,t),Ae.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 wB(e){return Y1(jm,e)}var E5=B("ZodArray",(e,t)=>{Jx.init(e,t),Ae.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Zi(r,o)),e.nonempty=r=>e.check(Zi(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 iv(E5,e,t)}function _B(e){let t=e._zod.def.shape;return Xv(Object.keys(t))}var Hm=B("ZodObject",(e,t)=>{Yx.init(e,t),Ae.init(e,t),te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Xv(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:Wv()}),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(ew,e,r[0]),e.required=(...r)=>te.required(tw,e,r[0]);});function EB(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new Hm(r)}function SB(e,t){return new Hm({type:"object",shape:e,catchall:Wv(),...te.normalizeParams(t)})}function IB(e,t){return new Hm({type:"object",shape:e,catchall:xc(),...te.normalizeParams(t)})}var Kv=B("ZodUnion",(e,t)=>{im.init(e,t),Ae.init(e,t),e.options=t.options;});function Jv(e,t){return new Kv({type:"union",options:e,...te.normalizeParams(t)})}var S5=B("ZodDiscriminatedUnion",(e,t)=>{Kv.init(e,t),Xx.init(e,t);});function AB(e,t,r){return new S5({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}var I5=B("ZodIntersection",(e,t)=>{Qx.init(e,t),Ae.init(e,t);});function A5(e,t){return new I5({type:"intersection",left:e,right:t})}var k5=B("ZodTuple",(e,t)=>{sm.init(e,t),Ae.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function R5(e,t,r){let o=t instanceof we,n=o?r:t,i=o?t:null;return new k5({type:"tuple",items:e,rest:i,...te.normalizeParams(n)})}var Yv=B("ZodRecord",(e,t)=>{e1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function T5(e,t,r){return new Yv({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}function kB(e,t,r){let o=Mr(e);return o._zod.values=void 0,new Yv({type:"record",keyType:o,valueType:t,...te.normalizeParams(r)})}var $5=B("ZodMap",(e,t)=>{t1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function RB(e,t,r){return new $5({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}var O5=B("ZodSet",(e,t)=>{r1.init(e,t),Ae.init(e,t),e.min=(...r)=>e.check(Vs(...r)),e.nonempty=r=>e.check(Vs(1,r)),e.max=(...r)=>e.check(hc(...r)),e.size=(...r)=>e.check(tl(...r));});function TB(e,t){return new O5({type:"set",valueType:e,...te.normalizeParams(t)})}var ml=B("ZodEnum",(e,t)=>{n1.init(e,t),Ae.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 Xv(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 $B(e,t){return new ml({type:"enum",entries:e,...te.normalizeParams(t)})}var N5=B("ZodLiteral",(e,t)=>{o1.init(e,t),Ae.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 OB(e,t){return new N5({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}var P5=B("ZodFile",(e,t)=>{i1.init(e,t),Ae.init(e,t),e.min=(r,o)=>e.check(Vs(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 NB(e){return sv(P5,e)}var B5=B("ZodTransform",(e,t)=>{s1.init(e,t),Ae.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Mi(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 Qv(e){return new B5({type:"transform",transform:e})}var ew=B("ZodOptional",(e,t)=>{a1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Lm(e){return new ew({type:"optional",innerType:e})}var C5=B("ZodNullable",(e,t)=>{c1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Um(e){return new C5({type:"nullable",innerType:e})}function PB(e){return Lm(Um(e))}var z5=B("ZodDefault",(e,t)=>{u1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function L5(e,t){return new z5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var U5=B("ZodPrefault",(e,t)=>{f1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function M5(e,t){return new U5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var tw=B("ZodNonOptional",(e,t)=>{l1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function D5(e,t){return new tw({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}var j5=B("ZodSuccess",(e,t)=>{d1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function BB(e){return new j5({type:"success",innerType:e})}var F5=B("ZodCatch",(e,t)=>{p1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function H5(e,t){return new F5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var V5=B("ZodNaN",(e,t)=>{m1.init(e,t),Ae.init(e,t);});function CB(e){return Q1(V5,e)}var rw=B("ZodPipe",(e,t)=>{h1.init(e,t),Ae.init(e,t),e.in=t.in,e.out=t.out;});function Mm(e,t){return new rw({type:"pipe",in:e,out:t})}var nw=B("ZodCodec",(e,t)=>{rw.init(e,t),Kf.init(e,t);});function zB(e,t,r){return new nw({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var Z5=B("ZodReadonly",(e,t)=>{g1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function G5(e){return new Z5({type:"readonly",innerType:e})}var q5=B("ZodTemplateLiteral",(e,t)=>{y1.init(e,t),Ae.init(e,t);});function LB(e,t){return new q5({type:"template_literal",parts:e,...te.normalizeParams(t)})}var W5=B("ZodLazy",(e,t)=>{v1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.getter();});function K5(e){return new W5({type:"lazy",getter:e})}var J5=B("ZodPromise",(e,t)=>{x1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function UB(e){return new J5({type:"promise",innerType:e})}var Y5=B("ZodFunction",(e,t)=>{b1.init(e,t),Ae.init(e,t);});function MB(e){return new Y5({type:"function",input:Array.isArray(e?.input)?R5(e?.input):e?.input??Fm(xc()),output:e?.output??xc()})}var Vm=B("ZodCustom",(e,t)=>{w1.init(e,t),Ae.init(e,t);});function DB(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function jB(e,t){return av(Vm,e??(()=>true),t)}function X5(e,t={}){return cv(Vm,e,t)}function Q5(e){return uv(e)}function FB(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 HB=(...e)=>fv({Codec:nw,Boolean:bl,String:hl},...e);function VB(e){let t=K5(()=>Jv([Rv(e),p5(),m5(),b5(),Fm(t),T5(Rv(),t)]));return t}function ZB(e,t){return Mm(Qv(e),t)}var GB={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 qB(e){wt({customError:e});}function WB(){return wt().customError}var ow;ow||(ow={});var iw={};Er(iw,{bigint:()=>XB,boolean:()=>YB,date:()=>QB,number:()=>JB,string:()=>KB});function KB(e){return I1(hl,e)}function JB(e){return N1(yl,e)}function YB(e){return M1(bl,e)}function XB(e){return j1(xl,e)}function QB(e){return X1(jm,e)}wt(am());var eC="https://api.adland.space",tC="http://localhost:3069";function rC(e,t){return e?e.replace(/\/$/,""):t==="development"?tC:eC}function nC(){return typeof process>"u"||!process.env?{}:{override:process.env.NEXT_PUBLIC_ADLAND_API_URL,nodeEnv:"production"}}var{override:oC,nodeEnv:iC}=nC(),sw=rC(oC,iC);function sC(e,t){return Object.assign(e,{choices:t})}function _c(e){return {...e,process:t=>aC(e,t),safeProcess:t=>cC(e,t)}}async function aC(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 cC(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=`${sw}/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 uC(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:uC(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 fC="eip155",aw=[{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}],lC=aw.map(e=>e.chainId);function dC(e){return lC.includes(e)}function cw(e){return aw.find(t=>t.chainId===e)}function eI(e,t){return `${fC}:${e}/erc20:${t}`}_c({type:"token",data:pe.object({address:pe.string().nonempty("Address is required"),chainId:sC(pe.number().int().positive("Chain ID is required").refine(dC,"Token ads are only supported on Ethereum, Base, Arbitrum and Robinhood"),aw.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 pC=/(?: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(!pC.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}}});var wl={};Er(wl,{InvalidDomainManifest:()=>uw,RejectedByUser:()=>fw});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 uw=class extends eo{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},fw=class extends eo{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var Ec={};Er(Ec,{RejectedByUser:()=>lw});var lw=class extends eo{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var Sc={};Er(Sc,{GenericError:()=>mw,InvalidDomain:()=>pw,RejectedByUser:()=>dw});var dw=class extends eo{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},pw=class extends eo{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},mw=class extends eo{name="SignManifest.GenericError";constructor(t="Manifest signing failed"){super(t);}};var ie={};Er(ie,{BRAND:()=>FC,DIRTY:()=>Zs,EMPTY_PATH:()=>vC,INVALID:()=>ge,NEVER:()=>Az,OK:()=>Sr,ParseStatus:()=>mr,Schema:()=>ke,ZodAny:()=>Wi,ZodArray:()=>oi,ZodBigInt:()=>qs,ZodBoolean:()=>Ws,ZodBranded:()=>El,ZodCatch:()=>ia,ZodDate:()=>Ks,ZodDefault:()=>oa,ZodDiscriminatedUnion:()=>Wm,ZodEffects:()=>On,ZodEnum:()=>ra,ZodError:()=>Qr,ZodFirstPartyTypeKind:()=>be,ZodFunction:()=>Jm,ZodIntersection:()=>Qs,ZodIssueCode:()=>Y,ZodLazy:()=>ea,ZodLiteral:()=>ta,ZodMap:()=>$c,ZodNaN:()=>Nc,ZodNativeEnum:()=>na,ZodNever:()=>to,ZodNull:()=>Ys,ZodNullable:()=>Eo,ZodNumber:()=>Gs,ZodObject:()=>en,ZodOptional:()=>Tn,ZodParsedType:()=>ce,ZodPipeline:()=>Sl,ZodPromise:()=>Ki,ZodReadonly:()=>sa,ZodRecord:()=>Km,ZodSchema:()=>ke,ZodSet:()=>Oc,ZodString:()=>qi,ZodSymbol:()=>Rc,ZodTransformer:()=>On,ZodTuple:()=>_o,ZodType:()=>ke,ZodUndefined:()=>Js,ZodUnion:()=>Xs,ZodUnknown:()=>ni,ZodVoid:()=>Tc,addIssueToContext:()=>se,any:()=>YC,array:()=>tz,bigint:()=>GC,boolean:()=>lI,coerce:()=>Iz,custom:()=>cI,date:()=>qC,datetimeRegex:()=>sI,defaultErrorMap:()=>ti,discriminatedUnion:()=>iz,effect:()=>yz,enum:()=>mz,function:()=>lz,getErrorMap:()=>Ic,getParsedType:()=>wo,instanceof:()=>VC,intersection:()=>sz,isAborted:()=>Gm,isAsync:()=>Ac,isDirty:()=>qm,isValid:()=>Gi,late:()=>HC,lazy:()=>dz,literal:()=>pz,makeIssue:()=>_l,map:()=>uz,nan:()=>ZC,nativeEnum:()=>hz,never:()=>QC,null:()=>JC,nullable:()=>xz,number:()=>fI,object:()=>rz,objectUtil:()=>hw,oboolean:()=>Sz,onumber:()=>Ez,optional:()=>bz,ostring:()=>_z,pipeline:()=>wz,preprocess:()=>vz,promise:()=>gz,quotelessJson:()=>yC,record:()=>cz,set:()=>fz,setErrorMap:()=>xC,strictObject:()=>nz,string:()=>uI,symbol:()=>WC,transformer:()=>yz,tuple:()=>az,undefined:()=>KC,union:()=>oz,unknown:()=>XC,util:()=>Ne,void:()=>ez});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 hw;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(hw||(hw={}));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"]),yC=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 bC=(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=bC;var tI=ti;function xC(e){tI=e;}function Ic(){return tI}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}},vC=[];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"}),Zs=e=>({status:"dirty",value:e}),Sr=e=>({status:"valid",value:e}),Gm=e=>e.status==="aborted",qm=e=>e.status==="dirty",Gi=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}},rI=(e,t)=>{if(Gi(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 ke=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 rI(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 Gi(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=>Gi(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 rI(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 Ki.create(this,this._def)}or(t){return Xs.create([this,t],this._def)}and(t){return Qs.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 oa({...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 ia({...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 sa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},wC=/^c[^\s-]{8,}$/i,_C=/^[0-9a-z]+$/,EC=/^[0-9A-HJKMNP-TV-Z]{26}$/i,SC=/^[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,IC=/^[a-z0-9_-]{21}$/i,AC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,kC=/^[-+]?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)?)??$/,RC=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,TC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gw,$C=/^(?:(?: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])$/,OC=/^(?:(?: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])$/,NC=/^(([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]))$/,PC=/^(([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])$/,BC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,CC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,oI="((\\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])))",zC=new RegExp(`^${oI}$`);function iI(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 LC(e){return new RegExp(`^${iI(e)}$`)}function sI(e){let t=`${oI}T${iI(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 UC(e,t){return !!((t==="v4"||!t)&&$C.test(e)||(t==="v6"||!t)&&NC.test(e))}function MC(e,t){if(!AC.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 DC(e,t){return !!((t==="v4"||!t)&&OC.test(e)||(t==="v6"||!t)&&PC.test(e))}var qi=class e extends ke{_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")RC.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")gw||(gw=new RegExp(TC,"u")),gw.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")SC.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")IC.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")wC.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")_C.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")EC.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"?sI(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"?zC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?LC(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"?kC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?UC(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"?MC(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"?DC(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"?BC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?CC.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}};qi.create=e=>new qi({checks:[],typeName:be.ZodString,coerce:e?.coerce??false,...Ee(e)});function jC(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 Gs=class e extends ke{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"?jC(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)}};Gs.create=e=>new Gs({checks:[],typeName:be.ZodNumber,coerce:e?.coerce||false,...Ee(e)});var qs=class e extends ke{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}};qs.create=e=>new qs({checks:[],typeName:be.ZodBigInt,coerce:e?.coerce??false,...Ee(e)});var Ws=class extends ke{_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)}};Ws.create=e=>new Ws({typeName:be.ZodBoolean,coerce:e?.coerce||false,...Ee(e)});var Ks=class e extends ke{_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}};Ks.create=e=>new Ks({checks:[],coerce:e?.coerce||false,typeName:be.ZodDate,...Ee(e)});var Rc=class extends ke{_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 Js=class extends ke{_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)}};Js.create=e=>new Js({typeName:be.ZodUndefined,...Ee(e)});var Ys=class extends ke{_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)}};Ys.create=e=>new Ys({typeName:be.ZodNull,...Ee(e)});var Wi=class extends ke{constructor(){super(...arguments),this._any=true;}_parse(t){return Sr(t.data)}};Wi.create=e=>new Wi({typeName:be.ZodAny,...Ee(e)});var ni=class extends ke{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 ke{_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 ke{_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 ke{_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 ke{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 aI(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 Xs=class extends ke{_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}};Xs.create=(e,t)=>new Xs({options:e,typeName:be.ZodUnion,...Ee(t)});var ri=e=>e instanceof ea?ri(e.schema):e instanceof On?ri(e.innerType()):e instanceof ta?[e.value]:e instanceof ra?e.options:e instanceof na?Ne.objectValues(e.enum):e instanceof oa?ri(e._def.innerType):e instanceof Js?[void 0]:e instanceof Ys?[null]:e instanceof Tn?[void 0,...ri(e.unwrap())]:e instanceof Eo?[null,...ri(e.unwrap())]:e instanceof El||e instanceof sa?ri(e.unwrap()):e instanceof ia?ri(e._def.innerType):[],Wm=class e extends ke{_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 yw(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=yw(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=yw(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 Qs=class extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Gm(i)||Gm(s))return ge;let a=yw(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}))}};Qs.create=(e,t,r)=>new Qs({left:e,right:t,typeName:be.ZodIntersection,...Ee(r)});var _o=class e extends ke{_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 ke{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 ke?new e({keyType:t,valueType:r,typeName:be.ZodRecord,...Ee(o)}):new e({keyType:qi.create(),valueType:t,typeName:be.ZodRecord,...Ee(r)})}},$c=class extends ke{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 ke{_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 ke{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 Ki){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)})}},ea=class extends ke{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})}};ea.create=(e,t)=>new ea({getter:e,typeName:be.ZodLazy,...Ee(t)});var ta=class extends ke{_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}};ta.create=(e,t)=>new ta({value:e,typeName:be.ZodLiteral,...Ee(t)});function aI(e,t){return new ra({values:e,typeName:be.ZodEnum,...Ee(t)})}var ra=class e extends ke{_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})}};ra.create=aI;var na=class extends ke{_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}};na.create=(e,t)=>new na({values:e,typeName:be.ZodNativeEnum,...Ee(t)});var Ki=class extends ke{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})))}};Ki.create=(e,t)=>new Ki({type:e,typeName:be.ZodPromise,...Ee(t)});var On=class extends ke{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"?Zs(c.value):r.value==="dirty"?Zs(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"?Zs(a.value):r.value==="dirty"?Zs(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(!Gi(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=>Gi(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 ke{_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 ke{_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 oa=class extends ke{_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}};oa.create=(e,t)=>new oa({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});var ia=class extends ke{_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}};ia.create=(e,t)=>new ia({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});var Nc=class extends ke{_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 FC=Symbol("zod_brand"),El=class extends ke{_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 ke{_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(),Zs(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})}},sa=class extends ke{_parse(t){let r=this._def.innerType._parse(t),o=n=>(Gi(n)&&(n.value=Object.freeze(n.value)),n);return Ac(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};sa.create=(e,t)=>new sa({innerType:e,typeName:be.ZodReadonly,...Ee(t)});function nI(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function cI(e,t={},r){return e?Wi.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=nI(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=nI(t,o),a=s.fatal??r??true;n.addIssue({code:"custom",...s,fatal:a});}}):Wi.create()}var HC={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 VC=(e,t={message:`Input not instance of ${e.name}`})=>cI(r=>r instanceof e,t),uI=qi.create,fI=Gs.create,ZC=Nc.create,GC=qs.create,lI=Ws.create,qC=Ks.create,WC=Rc.create,KC=Js.create,JC=Ys.create,YC=Wi.create,XC=ni.create,QC=to.create,ez=Tc.create,tz=oi.create,rz=en.create,nz=en.strictCreate,oz=Xs.create,iz=Wm.create,sz=Qs.create,az=_o.create,cz=Km.create,uz=$c.create,fz=Oc.create,lz=Jm.create,dz=ea.create,pz=ta.create,mz=ra.create,hz=na.create,gz=Ki.create,yz=On.create,bz=Tn.create,xz=Eo.create,vz=On.createWithPreprocess,wz=Sl.create,_z=()=>uI().optional(),Ez=()=>fI().optional(),Sz=()=>lI().optional(),Iz={string:(e=>qi.create({...e,coerce:true})),number:(e=>Gs.create({...e,coerce:true})),boolean:(e=>Ws.create({...e,coerce:true})),bigint:(e=>qs.create({...e,coerce:true})),date:(e=>Ks.create({...e,coerce:true}))};var Az=ge;var kz=/[@#$%^&*+=/\\|~«»]/,Rz=/(!{2,}|\?{2,}|-{2,})/,Tz=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,aa=({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=>!Tz.test(o),{message:"Emojis and symbols are not allowed"}).refine(o=>!kz.test(o),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, \xAB, \xBB) are not allowed"}).refine(o=>!Rz.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),$z=/^[-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)$/,dI=ie.string().regex($z,{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."}),Oz=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,pI=ie.string().max(1024).regex(Oz,{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"}),mI=ie.union([ie.literal("1:1"),ie.literal("3:2")]),hI=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 Nz=ie.object({type:ie.literal("launch_frame"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),Pz=ie.object({type:ie.literal("launch_miniapp"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),Bz=ie.object({type:ie.literal("view_token"),token:dI}),Cz=ie.discriminatedUnion("type",[Pz,Bz,Nz]),zz=ie.object({title:Ym,action:Cz});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:mI.optional(),button:zz});var bw=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 Lz=ie.object({event:ie.literal("miniapp_added"),notificationDetails:bw.optional()}),Uz=ie.object({event:ie.literal("miniapp_removed")}),Mz=ie.object({event:ie.literal("notifications_enabled"),notificationDetails:bw.required()}),Dz=ie.object({event:ie.literal("notifications_disabled")});ie.discriminatedUnion("event",[Lz,Uz,Mz,Dz]);var gI=["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 jz=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],Fz=ie.enum(jz),Hz=ie.union([ie.literal("0.0.0"),ie.literal("0.0.1"),ie.literal("1"),ie.literal("next")]),Vz=aa({max:30}),Zz=aa({max:170}),Gz=ie.array(ir).max(3),qz=ie.array(aa({max:20,noSpaces:true})).max(5),Wz=aa({max:30}),Kz=aa({max:30}),Jz=aa({max:100}),Yz=ie.boolean(),Xz=["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 bI(e){let t=new Set(e);return Array.from(t)}var Qz=ie.array(ie.enum(Xz)).transform(bI),eL=ie.array(ie.enum(gI)).transform(bI),yI=ie.object({version:Hz,name:Il,iconUrl:ir,homeUrl:ir,imageUrl:ir.optional(),buttonTitle:Ym.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional(),webhookUrl:ir.optional(),subtitle:Vz.optional(),description:Zz.optional(),screenshotUrls:Gz.optional(),primaryCategory:Fz.optional(),tags:qz.optional(),heroImageUrl:ir.optional(),tagline:Wz.optional(),ogTitle:Kz.optional(),ogDescription:Jz.optional(),ogImageUrl:ir.optional(),noindex:Yz.optional(),requiredChains:Qz.optional(),requiredCapabilities:eL.optional(),castShareUrl:ir.optional(),canonicalDomain:pI.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:hI,miniapp:yI.optional(),frame:yI.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();Gw();wa();xa();var $o=BigInt(0),Fr=BigInt(1),EA=BigInt(2),QL=BigInt(8),eU={zip215:true};function tU(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 SA(e){let t=tU(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=EA<<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?QL:r.inv(p));let G=f(k*_),K=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:K}}),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,K=f(w*w),Q=f(p*p),ae=f(A*A),he=f(ae*ae),ye=f(K*_),Ke=f(ae*f(ye+Q)),Se=f(he+f(k*f(K*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:K}=_,Q=f(k*K),ae=f(A*p),he=f(w*K),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),K=f(EA*f(p*p)),Q=f(_*A),ae=k+w,he=f(f(ae*ae)-A-G),ye=Q+G,Ke=ye-K,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:K}=this,{ex:Q,ey:ae,ez:he,et:ye}=_,Ke=f(p*Q),Se=f(A*ae),_e=f(K*w*ye),tr=f(G*he),Ce=f((p+A)*(Q+ae)-Ke-Se),je=tr-_e,Ui=tr+_e,pt=f(Se-k*Ke),gt=f(Ce*je),Bp=f(Ui*pt),yt=f(Ce*pt),bt=f(je*Ui);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(),K=_[A-1];G[A-1]=K&-129;let Q=ga(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=(K&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 ts(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 Le(x,o)}function q(x){return D(ga(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),K=P.multiply(G).toRawBytes(),Q=S(k.context,K,A,x),ae=D(G+Q*p);Dr("signature.s",ae,$o,o);let he=ar(K,Mc(ae,r.BYTES));return Ge("result",he,r.BYTES*2)}let m=eU;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 K=ga(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(K);}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)),_}}}}wa();var qw=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),TA=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var sU=BigInt(1),$A=BigInt(2);BigInt(3);var aU=BigInt(5),cU=BigInt(8);function uU(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=qw,a=e*e%i*e%i,c=at(a,$A,i)*a%i,u=at(c,sU,i)*e%i,f=at(u,aU,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,$A,i)*e%i,b2:a}}function fU(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function lU(e,t){let r=qw,o=Le(t*t*t,r),n=Le(o*o*t,r),i=uU(e*n).pow_p_5_8,s=Le(e*o*i,r),a=Le(t*s*s,r),c=s,u=Le(s*TA,r),f=a===e,d=a===Le(-e,r),g=a===Le(-e*TA,r);return f&&(s=c),(d||g)&&(s=u),gA(s,r)&&(s=Le(-s,r)),{isValid:f||d,value:s}}var OA=di(qw,void 0,true),dU={a:OA.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:OA,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:cU,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:oA,randomBytes:Lc,adjustScalarBytes:fU,uvRatio:lU},_a=SA(dU);var V_=Ko(Kw()),Nr=Ko(Yw());sh();var Ll=ha;var Xc=Ko(ZA()),T=Ko(s_()),mR=Ko(s_());var a_=8078e3,c_=8078001,u_=8078004,f_=8078005,l_=8078006,d_=8078011;function XA(e){return Array.isArray(e)?"%5B"+e.map(XA).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Oj([e,t]){return `${e}=${XA(t)}`}function Nj(e){let t=Object.entries(e).map(Oj).join("&");return btoa(t)}function Pj(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${Nj(t)}'`),`${r}\``}}var is=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=Pj(e,r);super(n,o),this.context={__code:e,...r},this.name="SolanaError";}};function Bj(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function QA(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(Bj(t,e));return e.write(t,r,0),r}})}function ek(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 tk(e,t){if(Zc(e)!==Zc(t))throw new is(u_);if(Zc(e)&&Zc(t)&&e.fixedSize!==t.fixedSize)throw new is(f_,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Zc(e)&&!Zc(t)&&e.maxSize!==t.maxSize)throw new is(l_,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function rk(e,t,r=0){if(t.length-r<=0)throw new is(a_,{codecDescription:e})}function nk(e,t,r,o=0){let n=r.length-o;if(n<t)throw new is(c_,{bytesLength:n,codecDescription:e,expected:t})}function Cj(e,t,r,o){if(o<t||o>r)throw new is(d_,{codecDescription:e,max:r,min:t,value:o})}function ok(e){return e?.endian!==1}function zj(e){return QA({fixedSize:e.size,write(t,r,o){e.range&&Cj(e.name,e.range[0],e.range[1],t);let n=new ArrayBuffer(e.size);return e.set(new DataView(n),t,ok(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function Lj(e){return ek({fixedSize:e.size,read(t,r=0){rk(e.name,t,r),nk(e.name,e.size,t,r);let o=new DataView(Uj(t,r,e.size));return [e.get(o,ok(e.config)),r+e.size]}})}function Uj(e,t,r){let o=e.byteOffset+(t??0),n=r??e.byteLength;return e.buffer.slice(o,o+n)}var p_=(e={})=>zj({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,o)=>t.setBigUint64(0,BigInt(r),o),size:8}),Mj=(e={})=>Lj({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),ik=(e={})=>tk(p_(e),Mj(e));var m_=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 Dj(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 jj(e){let{done:t,value:r}=e.next();return t?void 0:r}function Fj(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*sk(e,t,r,o){Dj(e)||(e=[e]);for(let n of e){let i=Fj(n,t,r,o);i&&(yield i);}}function*h_(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=h_(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 sk(f,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let f=i(c,u);return sk(f,u,this,c)}:this.refiner=()=>[];}assert(t,r){return ak(t,this,r)}create(t,r){return Gc(t,this,r)}is(t){return ck(t,this)}mask(t,r){return Hj(t,this,r)}validate(t,r={}){return Vl(t,this,r)}};function ak(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 Hj(e,t,r){let o=Vl(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function ck(e,t){return !Vl(e,t)[0]}function Vl(e,t,r={}){let o=h_(e,t,r),n=jj(o);return n[0]?[new m_(n[0],function*(){for(let s of o)s[0]&&(yield s[0]);}),void 0]:[void 0,n[1]]}function Aa(e,t){return new Bn({type:e,schema:null,validator:t})}function uk(){return Aa("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 Aa("boolean",e=>typeof e=="boolean")}function Dh(e){return Aa("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 Vj(){return Aa("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 Aa("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 g_(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 Aa("string",e=>typeof e=="string"||`Expected a string, but received: ${oo(e)}`)}function jh(e){let t=Vj();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]=h_(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 ka(){return Aa("unknown",()=>true)}function qc(e,t,r){return new Bn({...e,coercer:(o,n)=>ck(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Ko(Pk());Ko(Rl(),1);var Jl=Ko(Ck(),1);var zk=Jl.default;Wh();rd();function nR(e){try{return _a.ExtendedPoint.fromHex(e),!0}catch{return false}}var i6=(e,t)=>_a.sign(e,t.slice(0,32)),D7=_a.verify,He=e=>xe.Buffer.isBuffer(e)?e:e instanceof Uint8Array?xe.Buffer.from(e.buffer,e.byteOffset,e.byteLength):xe.Buffer.from(e),G_=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,hR,j7=32,ds=32;function F7(e){return e._bn!==void 0}var oR=1,Ie=class e extends G_{constructor(t){if(super({}),this._bn=void 0,F7(t))this._bn=t._bn;else {if(typeof t=="string"){let r=Nr.default.decode(t);if(r.length!=ds)throw new Error("Invalid public key input");this._bn=new V_.default(r);}else this._bn=new V_.default(t);if(this._bn.byteLength()>ds)throw new Error("Invalid public key input")}}static unique(){let t=new e(oR);return oR+=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===ds)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>j7)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(nR(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 nR(r.toBytes())}};hR=Ie;Ie.default=new hR("11111111111111111111111111111111");e0.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var Ta=1232,s6=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),H7=(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},V7=(e="authorized")=>T.struct([Pe("staker"),Pe("withdrawer")],e),Z7=(e="lockup")=>T.struct([T.ns64("unixTimestamp"),T.ns64("epoch"),Pe("custodian")],e),G7=(e="voteInit")=>T.struct([Pe("nodePubkey"),Pe("authorizedVoter"),Pe("authorizedWithdrawer"),T.u8("commission")],e),q7=(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]}},yR="Reached end of buffer unexpectedly";function yi(e){if(e.length===0)throw new Error(yR);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(yR);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(Ta);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&s6))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,ds);a.push(new Ie(xe.Buffer.from(h)));}let c=_n(r,0,ds),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)}},J_=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(Ta),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(Ta);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(Ta);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&s6;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,ds)));let u=Nr.default.encode(_n(r,0,ds)),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,ds)),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&s6;return r===t?"legacy":r},deserialize:e=>{let t=a0.deserializeMessageVersion(e);if(t==="legacy")return id.from(e);if(t===0)return J_.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var W7=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=i6(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):D7(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 hv(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 p5={};var Lm={};Er(Lm,{ZodISODate:()=>Bm,ZodISODateTime:()=>Pm,ZodISODuration:()=>zm,ZodISOTime:()=>Cm,date:()=>yv,datetime:()=>gv,duration:()=>xv,time:()=>bv});var Pm=B("ZodISODateTime",(e,t)=>{$x.init(e,t),et.init(e,t);});function gv(e){return O1(Pm,e)}var Bm=B("ZodISODate",(e,t)=>{Ox.init(e,t),et.init(e,t);});function yv(e){return N1(Bm,e)}var Cm=B("ZodISOTime",(e,t)=>{Nx.init(e,t),et.init(e,t);});function bv(e){return P1(Cm,e)}var zm=B("ZodISODuration",(e,t)=>{Px.init(e,t),et.init(e,t);});function xv(e){return B1(zm,e)}var h5=(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",h5),Xr=B("ZodError",h5,{Parent:Error});var vv=dc(Xr),wv=pc(Xr),_v=mc(Xr),Ev=hc(Xr),Sv=Hp(Xr),Iv=Vp(Xr),Av=Zp(Xr),kv=Gp(Xr),Rv=qp(Xr),Tv=Wp(Xr),$v=Kp(Xr),Ov=Jp(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)=>vv(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>_v(e,r,o),e.parseAsync=async(r,o)=>wv(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Ev(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Sv(e,r,o),e.decode=(r,o)=>Iv(e,r,o),e.encodeAsync=async(r,o)=>Av(e,r,o),e.decodeAsync=async(r,o)=>kv(e,r,o),e.safeEncode=(r,o)=>Rv(e,r,o),e.safeDecode=(r,o)=>Tv(e,r,o),e.safeEncodeAsync=async(r,o)=>$v(e,r,o),e.safeDecodeAsync=async(r,o)=>Ov(e,r,o),e.refine=(r,o)=>e.check(tI(r,o)),e.superRefine=r=>e.check(rI(r)),e.overwrite=r=>e.check(Qo(r)),e.optional=()=>Mm(e),e.nullable=()=>Dm(e),e.nullish=()=>Mm(Dm(e)),e.nonoptional=r=>H5(e,r),e.array=()=>Vm(e),e.or=r=>ew([e,r]),e.and=r=>T5(e,r),e.transform=r=>jm(e,nw(r)),e.default=r=>D5(e,r),e.prefault=r=>F5(e,r),e.catch=r=>G5(e,r),e.pipe=r=>jm(e,r),e.readonly=()=>K5(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)),Bv=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),Bv.init(e,t),e.email=r=>e.check(pm(Cv,r)),e.url=r=>e.check(il(Fm,r)),e.jwt=r=>e.check(Nm(Jv,r)),e.emoji=r=>e.check(bm(zv,r)),e.guid=r=>e.check(ol(Um,r)),e.uuid=r=>e.check(mm(ti,r)),e.uuidv4=r=>e.check(hm(ti,r)),e.uuidv6=r=>e.check(gm(ti,r)),e.uuidv7=r=>e.check(ym(ti,r)),e.nanoid=r=>e.check(xm(Lv,r)),e.guid=r=>e.check(ol(Um,r)),e.cuid=r=>e.check(vm(Uv,r)),e.cuid2=r=>e.check(wm(Mv,r)),e.ulid=r=>e.check(_m(Dv,r)),e.base64=r=>e.check(Tm(qv,r)),e.base64url=r=>e.check($m(Wv,r)),e.xid=r=>e.check(Em(jv,r)),e.ksuid=r=>e.check(Sm(Fv,r)),e.ipv4=r=>e.check(Im(Hv,r)),e.ipv6=r=>e.check(Am(Vv,r)),e.cidrv4=r=>e.check(km(Zv,r)),e.cidrv6=r=>e.check(Rm(Gv,r)),e.e164=r=>e.check(Om(Kv,r)),e.datetime=r=>e.check(gv(r)),e.date=r=>e.check(yv(r)),e.time=r=>e.check(bv(r)),e.duration=r=>e.check(xv(r));});function Nv(e){return R1(vl,e)}var et=B("ZodStringFormat",(e,t)=>{Xe.init(e,t),Bv.init(e,t);}),Cv=B("ZodEmail",(e,t)=>{wx.init(e,t),et.init(e,t);});function j3(e){return pm(Cv,e)}var Um=B("ZodGUID",(e,t)=>{xx.init(e,t),et.init(e,t);});function F3(e){return ol(Um,e)}var ti=B("ZodUUID",(e,t)=>{vx.init(e,t),et.init(e,t);});function H3(e){return mm(ti,e)}function V3(e){return hm(ti,e)}function Z3(e){return gm(ti,e)}function G3(e){return ym(ti,e)}var Fm=B("ZodURL",(e,t)=>{_x.init(e,t),et.init(e,t);});function q3(e){return il(Fm,e)}function W3(e){return il(Fm,{protocol:/^https?$/,hostname:Rn.domain,...te.normalizeParams(e)})}var zv=B("ZodEmoji",(e,t)=>{Ex.init(e,t),et.init(e,t);});function K3(e){return bm(zv,e)}var Lv=B("ZodNanoID",(e,t)=>{Sx.init(e,t),et.init(e,t);});function J3(e){return xm(Lv,e)}var Uv=B("ZodCUID",(e,t)=>{Ix.init(e,t),et.init(e,t);});function Y3(e){return vm(Uv,e)}var Mv=B("ZodCUID2",(e,t)=>{Ax.init(e,t),et.init(e,t);});function X3(e){return wm(Mv,e)}var Dv=B("ZodULID",(e,t)=>{kx.init(e,t),et.init(e,t);});function Q3(e){return _m(Dv,e)}var jv=B("ZodXID",(e,t)=>{Rx.init(e,t),et.init(e,t);});function eB(e){return Em(jv,e)}var Fv=B("ZodKSUID",(e,t)=>{Tx.init(e,t),et.init(e,t);});function tB(e){return Sm(Fv,e)}var Hv=B("ZodIPv4",(e,t)=>{Bx.init(e,t),et.init(e,t);});function rB(e){return Im(Hv,e)}var Vv=B("ZodIPv6",(e,t)=>{Cx.init(e,t),et.init(e,t);});function nB(e){return Am(Vv,e)}var Zv=B("ZodCIDRv4",(e,t)=>{zx.init(e,t),et.init(e,t);});function oB(e){return km(Zv,e)}var Gv=B("ZodCIDRv6",(e,t)=>{Lx.init(e,t),et.init(e,t);});function iB(e){return Rm(Gv,e)}var qv=B("ZodBase64",(e,t)=>{Mx.init(e,t),et.init(e,t);});function sB(e){return Tm(qv,e)}var Wv=B("ZodBase64URL",(e,t)=>{Dx.init(e,t),et.init(e,t);});function aB(e){return $m(Wv,e)}var Kv=B("ZodE164",(e,t)=>{jx.init(e,t),et.init(e,t);});function cB(e){return Om(Kv,e)}var Jv=B("ZodJWT",(e,t)=>{Fx.init(e,t),et.init(e,t);});function uB(e){return Nm(Jv,e)}var wl=B("ZodCustomStringFormat",(e,t)=>{Hx.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)=>{im.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(Pv(o)),e.safe=o=>e.check(Pv(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 g5(e){return C1(_l,e)}var Ec=B("ZodNumberFormat",(e,t)=>{Vx.init(e,t),_l.init(e,t);});function Pv(e){return L1(Ec,e)}function mB(e){return U1(Ec,e)}function hB(e){return M1(Ec,e)}function gB(e){return D1(Ec,e)}function yB(e){return j1(Ec,e)}var El=B("ZodBoolean",(e,t)=>{Qf.init(e,t),ke.init(e,t);});function y5(e){return F1(El,e)}var Sl=B("ZodBigInt",(e,t)=>{sm.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 V1(Sl,e)}var Yv=B("ZodBigIntFormat",(e,t)=>{Zx.init(e,t),Sl.init(e,t);});function xB(e){return G1(Yv,e)}function vB(e){return q1(Yv,e)}var b5=B("ZodSymbol",(e,t)=>{Gx.init(e,t),ke.init(e,t);});function wB(e){return W1(b5,e)}var x5=B("ZodUndefined",(e,t)=>{qx.init(e,t),ke.init(e,t);});function _B(e){return K1(x5,e)}var v5=B("ZodNull",(e,t)=>{Wx.init(e,t),ke.init(e,t);});function w5(e){return J1(v5,e)}var _5=B("ZodAny",(e,t)=>{Kx.init(e,t),ke.init(e,t);});function EB(){return Y1(_5)}var E5=B("ZodUnknown",(e,t)=>{Jx.init(e,t),ke.init(e,t);});function _c(){return X1(E5)}var S5=B("ZodNever",(e,t)=>{Yx.init(e,t),ke.init(e,t);});function Xv(e){return Q1(S5,e)}var I5=B("ZodVoid",(e,t)=>{Xx.init(e,t),ke.init(e,t);});function SB(e){return ev(I5,e)}var Hm=B("ZodDate",(e,t)=>{Qx.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 tv(Hm,e)}var A5=B("ZodArray",(e,t)=>{e1.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 Vm(e,t){return uv(A5,e,t)}function AB(e){let t=e._zod.def.shape;return rw(Object.keys(t))}var Zm=B("ZodObject",(e,t)=>{t1.init(e,t),ke.init(e,t),te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>rw(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:Xv()}),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(ow,e,r[0]),e.required=(...r)=>te.required(iw,e,r[0]);});function kB(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new Zm(r)}function RB(e,t){return new Zm({type:"object",shape:e,catchall:Xv(),...te.normalizeParams(t)})}function TB(e,t){return new Zm({type:"object",shape:e,catchall:_c(),...te.normalizeParams(t)})}var Qv=B("ZodUnion",(e,t)=>{am.init(e,t),ke.init(e,t),e.options=t.options;});function ew(e,t){return new Qv({type:"union",options:e,...te.normalizeParams(t)})}var k5=B("ZodDiscriminatedUnion",(e,t)=>{Qv.init(e,t),r1.init(e,t);});function $B(e,t,r){return new k5({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}var R5=B("ZodIntersection",(e,t)=>{n1.init(e,t),ke.init(e,t);});function T5(e,t){return new R5({type:"intersection",left:e,right:t})}var $5=B("ZodTuple",(e,t)=>{cm.init(e,t),ke.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function O5(e,t,r){let o=t instanceof we,n=o?r:t,i=o?t:null;return new $5({type:"tuple",items:e,rest:i,...te.normalizeParams(n)})}var tw=B("ZodRecord",(e,t)=>{o1.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function N5(e,t,r){return new tw({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 tw({type:"record",keyType:o,valueType:t,...te.normalizeParams(r)})}var P5=B("ZodMap",(e,t)=>{i1.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function NB(e,t,r){return new P5({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}var B5=B("ZodSet",(e,t)=>{s1.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 B5({type:"set",valueType:e,...te.normalizeParams(t)})}var xl=B("ZodEnum",(e,t)=>{a1.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 rw(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 C5=B("ZodLiteral",(e,t)=>{c1.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 C5({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}var z5=B("ZodFile",(e,t)=>{u1.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 fv(z5,e)}var L5=B("ZodTransform",(e,t)=>{f1.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 nw(e){return new L5({type:"transform",transform:e})}var ow=B("ZodOptional",(e,t)=>{l1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Mm(e){return new ow({type:"optional",innerType:e})}var U5=B("ZodNullable",(e,t)=>{d1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Dm(e){return new U5({type:"nullable",innerType:e})}function LB(e){return Mm(Dm(e))}var M5=B("ZodDefault",(e,t)=>{p1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function D5(e,t){return new M5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var j5=B("ZodPrefault",(e,t)=>{m1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function F5(e,t){return new j5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var iw=B("ZodNonOptional",(e,t)=>{h1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function H5(e,t){return new iw({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}var V5=B("ZodSuccess",(e,t)=>{g1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function UB(e){return new V5({type:"success",innerType:e})}var Z5=B("ZodCatch",(e,t)=>{y1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function G5(e,t){return new Z5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var q5=B("ZodNaN",(e,t)=>{b1.init(e,t),ke.init(e,t);});function MB(e){return nv(q5,e)}var sw=B("ZodPipe",(e,t)=>{x1.init(e,t),ke.init(e,t),e.in=t.in,e.out=t.out;});function jm(e,t){return new sw({type:"pipe",in:e,out:t})}var aw=B("ZodCodec",(e,t)=>{sw.init(e,t),el.init(e,t);});function DB(e,t,r){return new aw({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var W5=B("ZodReadonly",(e,t)=>{v1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function K5(e){return new W5({type:"readonly",innerType:e})}var J5=B("ZodTemplateLiteral",(e,t)=>{w1.init(e,t),ke.init(e,t);});function jB(e,t){return new J5({type:"template_literal",parts:e,...te.normalizeParams(t)})}var Y5=B("ZodLazy",(e,t)=>{S1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.getter();});function X5(e){return new Y5({type:"lazy",getter:e})}var Q5=B("ZodPromise",(e,t)=>{E1.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function FB(e){return new Q5({type:"promise",innerType:e})}var eI=B("ZodFunction",(e,t)=>{_1.init(e,t),ke.init(e,t);});function HB(e){return new eI({type:"function",input:Array.isArray(e?.input)?O5(e?.input):e?.input??Vm(_c()),output:e?.output??_c()})}var Gm=B("ZodCustom",(e,t)=>{I1.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 lv(Gm,e??(()=>true),t)}function tI(e,t={}){return dv(Gm,e,t)}function rI(e){return pv(e)}function GB(e,t={error:`Input not instance of ${e.name}`}){let r=new Gm({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...te.normalizeParams(t)});return r._zod.bag.Class=e,r}var qB=(...e)=>mv({Codec:aw,Boolean:El,String:vl},...e);function WB(e){let t=X5(()=>ew([Nv(e),g5(),y5(),w5(),Vm(t),N5(Nv(),t)]));return t}function KB(e,t){return jm(nw(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 cw;cw||(cw={});var uw={};Er(uw,{bigint:()=>rC,boolean:()=>tC,date:()=>nC,number:()=>eC,string:()=>QB});function QB(e){return T1(vl,e)}function eC(e){return z1(_l,e)}function tC(e){return H1(El,e)}function rC(e){return Z1(Sl,e)}function nC(e){return rv(Hm,e)}wt(um());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",fw=[{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=fw.map(e=>e.chainId);function gC(e){return hC.includes(e)}function yC(e){return fw.find(t=>t.chainId===e)}function nI(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"),fw.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 lw(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 kl={};Er(kl,{InvalidDomainManifest:()=>dw,RejectedByUser:()=>pw});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 dw=class extends to{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},pw=class extends to{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var Ac={};Er(Ac,{RejectedByUser:()=>mw});var mw=class extends to{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var kc={};Er(kc,{GenericError:()=>yw,InvalidDomain:()=>gw,RejectedByUser:()=>hw});var hw=class extends to{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},gw=class extends to{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},yw=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:()=>Tl,ZodCatch:()=>ua,ZodDate:()=>Qs,ZodDefault:()=>ca,ZodDiscriminatedUnion:()=>Jm,ZodEffects:()=>Nn,ZodEnum:()=>sa,ZodError:()=>Qr,ZodFirstPartyTypeKind:()=>be,ZodFunction:()=>Xm,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:()=>$l,ZodPromise:()=>Yi,ZodReadonly:()=>fa,ZodRecord:()=>Ym,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:()=>mI,coerce:()=>$z,custom:()=>lI,date:()=>XC,datetimeRegex:()=>uI,defaultErrorMap:()=>ri,discriminatedUnion:()=>fz,effect:()=>_z,enum:()=>xz,function:()=>gz,getErrorMap:()=>Rc,getParsedType:()=>wo,instanceof:()=>KC,intersection:()=>lz,isAborted:()=>Wm,isAsync:()=>Tc,isDirty:()=>Km,isValid:()=>Wi,late:()=>WC,lazy:()=>yz,literal:()=>bz,makeIssue:()=>Rl,map:()=>mz,nan:()=>JC,nativeEnum:()=>vz,never:()=>oz,null:()=>tz,nullable:()=>Sz,number:()=>pI,object:()=>az,objectUtil:()=>bw,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:()=>dI,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 bw;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(bw||(bw={}));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 oI=ri;function SC(e){oI=e;}function Rc(){return oI}var Rl=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=Rl({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}),Wm=e=>e.status==="aborted",Km=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}},iI=(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 iI(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 iI(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 Tl({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 $l.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})+$",xw,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}(=)?))?$/,aI="((\\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(`^${aI}$`);function cI(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(`^${cI(e)}$`)}function uI(e){let t=`${aI}T${cI(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")xw||(xw=new RegExp(BC,"u")),xw.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"?uI(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 fI(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 Tl||e instanceof fa?ni(e.unwrap()):e instanceof ua?ni(e._def.innerType):[],Jm=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 vw(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=vw(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=vw(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(Wm(i)||Wm(s))return ge;let a=vw(i.value,s.value);return a.valid?((Km(i)||Km(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 Ym=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 Xm=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 Rl({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 Rl({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 fI(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=fI;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"),Tl=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}},$l=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 sI(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function lI(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=sI(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=sI(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}`})=>lI(r=>r instanceof e,t),dI=Ki.create,pI=Js.create,JC=Cc.create,YC=Ys.create,mI=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=Jm.create,lz=na.create,dz=_o.create,pz=Ym.create,mz=Pc.create,hz=Bc.create,gz=Xm.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=$l.create,kz=()=>dI().optional(),Rz=()=>pI().optional(),Tz=()=>mI().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"}),Ol=ie.string().max(32),Qm=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)$/,hI=ie.string().regex(Cz,{message:"Invalid CAIP-19 asset ID"}),Nl=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,}$/,gI=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"}),yI=ie.union([ie.literal("1:1"),ie.literal("3:2")]),bI=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:Ol,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Nl.optional()}),Uz=ie.object({type:ie.literal("launch_miniapp"),name:Ol,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Nl.optional()}),Mz=ie.object({type:ie.literal("view_token"),token:hI}),Dz=ie.discriminatedUnion("type",[Uz,Mz,Lz]),jz=ie.object({title:Qm,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:yI.optional(),button:jz});var ww=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:ww.optional()}),Hz=ie.object({event:ie.literal("miniapp_removed")}),Vz=ie.object({event:ie.literal("notifications_enabled"),notificationDetails:ww.required()}),Zz=ie.object({event:ie.literal("notifications_disabled")});ie.discriminatedUnion("event",[Fz,Hz,Vz,Zz]);var xI=["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 wI(e){let t=new Set(e);return Array.from(t)}var oL=ie.array(ie.enum(nL)).transform(wI),iL=ie.array(ie.enum(xI)).transform(wI),vI=ie.object({version:Wz,name:Ol,iconUrl:ir,homeUrl:ir,imageUrl:ir.optional(),buttonTitle:Qm.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Nl.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:gI.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:bI,miniapp:vI.optional(),frame:vI.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(Bl());ch();ci();Kw();Ia();Ea();var $o=BigInt(0),Fr=BigInt(1),AA=BigInt(2),oU=BigInt(8),iU={zip215:true};function sU(e){let t=jl(e);return oo(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function kA(e){let t=sU(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=AA<<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 ph(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(AA*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),zp=f(Di*mt),yt=f(Ce*mt),bt=f(je*Di);return new S(gt,zp,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=dh(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 Jw=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),NA=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var lU=BigInt(1),PA=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=Jw,a=e*e%i*e%i,c=at(a,PA,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,PA,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=Jw,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*NA,r),f=a===e,d=a===Ue(-e,r),g=a===Ue(-e*NA,r);return f&&(s=c),(d||g)&&(s=u),xA(s,r)&&(s=Ue(-s,r)),{isValid:f||d,value:s}}var BA=pi(Jw,void 0,true),yU={a:BA.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:BA,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:pU,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:aA,randomBytes:Dc,adjustScalarBytes:hU,uvRatio:gU},Aa=kA(yU);var q_=Jo(Xw()),Nr=Jo(e_());ch();var Hl=xa;var tu=Jo(WA()),$=Jo(u_()),yR=Jo(u_());var f_=8078e3,l_=8078001,d_=8078004,p_=8078005,m_=8078006,h_=8078011;function tk(e){return Array.isArray(e)?"%5B"+e.map(tk).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}=${tk(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 rk(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(Mj(t,e));return e.write(t,r,0),r}})}function nk(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 ok(e,t){if(Wc(e)!==Wc(t))throw new as(d_);if(Wc(e)&&Wc(t)&&e.fixedSize!==t.fixedSize)throw new as(p_,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Wc(e)&&!Wc(t)&&e.maxSize!==t.maxSize)throw new as(m_,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function ik(e,t,r=0){if(t.length-r<=0)throw new as(f_,{codecDescription:e})}function sk(e,t,r,o=0){let n=r.length-o;if(n<t)throw new as(l_,{bytesLength:n,codecDescription:e,expected:t})}function Dj(e,t,r,o){if(o<t||o>r)throw new as(h_,{codecDescription:e,max:r,min:t,value:o})}function ak(e){return e?.endian!==1}function jj(e){return rk({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,ak(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function Fj(e){return nk({fixedSize:e.size,read(t,r=0){ik(e.name,t,r),sk(e.name,e.size,t,r);let o=new DataView(Hj(t,r,e.size));return [e.get(o,ak(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 g_=(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}),ck=(e={})=>ok(g_(e),Vj(e));var y_=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 Kl(e)&&typeof e[Symbol.iterator]=="function"}function Kl(e){return typeof e=="object"&&e!=null}function jh(e){return Kl(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*uk(e,t,r,o){Zj(e)||(e=[e]);for(let n of e){let i=qj(n,t,r,o);i&&(yield i);}}function*b_(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=b_(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):Kl(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 uk(f,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let f=i(c,u);return uk(f,u,this,c)}:this.refiner=()=>[];}assert(t,r){return fk(t,this,r)}create(t,r){return Kc(t,this,r)}is(t){return lk(t,this)}mask(t,r){return Wj(t,this,r)}validate(t,r={}){return Jl(t,this,r)}};function fk(e,t,r){let o=Jl(e,t,{message:r});if(o[0])throw o[0]}function Kc(e,t,r){let o=Jl(e,t,{coerce:true,message:r});if(o[0])throw o[0];return o[1]}function Wj(e,t,r){let o=Jl(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function lk(e,t){return !Jl(e,t)[0]}function Jl(e,t,r={}){let o=b_(e,t,r),n=Gj(o);return n[0]?[new y_(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 dk(){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 Fh(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 x_(e,t){return new Cn({type:"record",schema:null,*entries(r){if(Kl(r))for(let o in r){let n=r[o];yield [o,o,e],yield [o,n,t];}},validator(r){return jh(r)||`Expected an object, but received: ${io(r)}`},coercer(r){return jh(r)?{...r}:r}})}function ne(){return $a("string",e=>typeof e=="string"||`Expected a string, but received: ${io(e)}`)}function Hh(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(Kl(r))for(let o of t)yield [o,r[o],e[o]];},validator(r){return jh(r)||`Expected an object, but received: ${io(r)}`},coercer(r){return jh(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]=b_(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)=>lk(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Jo(zk());Jo(Bl(),1);var rd=Jo(Uk(),1);var Mk=rd.default;Jh();cd();function sR(e){try{return Aa.ExtendedPoint.fromHex(e),!0}catch{return false}}var c6=(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),K_=class{constructor(t){Object.assign(this,t);}encode(){return xe.Buffer.from((0, tu.serialize)(r0,this))}static decode(t){return (0, tu.deserialize)(r0,this,t)}static decodeUnchecked(t){return (0, tu.deserializeUnchecked)(r0,this,t)}};var r0=new Map,bR,G7=32,ms=32;function q7(e){return e._bn!==void 0}var aR=1,Ie=class e extends K_{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 q_.default(r);}else this._bn=new q_.default(t);if(this._bn.byteLength()>ms)throw new Error("Invalid public key input")}}static unique(){let t=new e(aR);return aR+=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=Hl(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=Hl(o);if(sR(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 sR(r.toBytes())}};bR=Ie;Ie.default=new bR("11111111111111111111111111111111");r0.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var Pa=1232,u6=127,n0=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 o0=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]}},vR="Reached end of buffer unexpectedly";function bi(e){if(e.length===0)throw new Error(vR);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(vR);return e.splice(...t)}var ld=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=o0.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&u6))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)}},Q_=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=o0.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&u6;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})}},u0={deserializeMessageVersion(e){let t=e[0],r=t&u6;return r===t?"legacy":r},deserialize:e=>{let t=u0.deserializeMessageVersion(e);if(t==="legacy")return ld.from(e);if(t===0)return Q_.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var Q7=xe.Buffer.alloc(n0).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 ld({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=c6(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<=Ta,`Transaction too large: ${i.length} > ${Ta}`),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(W7)?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(H7(),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]=i6(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 eF=T.nu64("lamportsPerSignature"),tF=T.struct([T.u32("version"),T.u32("state"),Pe("authorizedPubkey"),Pe("nonce"),T.struct([eF],"feeCalculator")]);tF.span;function Yc(e){let t=(0, mR.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=ik();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)),bR=jh([ne(),ct("base64")]),a6=qc(Dh(xe.Buffer),bR,e=>xe.Buffer.from(e[0],"base64"));function xR(e){return Ar([W({jsonrpc:ct("2.0"),id:ne(),result:e}),W({jsonrpc:ct("2.0"),id:ne(),error:W({code:ka(),message:ne(),data:me(uk())})})])}var nF=xR(ka());function rt(e){return qc(xR(e),nF,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 oF=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 iF=ue(W({slot:U(),prioritizationFee:U()})),sF=W({total:U(),validator:U(),foundation:U(),epoch:U()}),aF=W({epoch:U(),slotIndex:U(),slotsInEpoch:U(),absoluteSlot:U(),blockHeight:me(U()),transactionCount:me(U())}),cF=W({slotsPerEpoch:U(),leaderScheduleSlotOffset:U(),warmup:io(),firstNormalEpoch:U(),firstNormalSlot:U()}),uF=g_(ne(),ue(U())),$a=fe(Ar([W({}),ne()])),fF=W({err:$a}),lF=ct("receivedSignature");W({"solana-core":ne(),"feature-set":me(U())});var dF=W({program:ne(),programId:xt,parsed:ka()}),pF=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([dF,pF]))}))))}));ao(W({byIdentity:g_(ne(),ue(U())),range:W({firstSlot:U(),lastSlot:U()})}));rt(oF);rt(sF);rt(iF);rt(aF);rt(cF);rt(uF);rt(U());ao(W({total:U(),circulating:U(),nonCirculating:U(),nonCirculatingAccounts:ue(xt)}));var mF=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:a6,rentEpoch:U()})})));var Q_=W({program:ne(),parsed:ka(),space:U()});ao(ue(W({pubkey:xt,account:W({executable:io(),owner:xt,lamports:U(),data:Q_,rentEpoch:U()})})));ao(ue(W({lamports:U(),address:xt})));var c6=W({executable:io(),owner:xt,lamports:U(),data:a6,rentEpoch:U()});W({pubkey:xt,account:c6});var hF=qc(Ar([Dh(xe.Buffer),Q_]),Ar([bR,Q_]),e=>Array.isArray(e)?Gc(e,a6):e),gF=W({executable:io(),owner:xt,lamports:U(),data:hF,rentEpoch:U()});W({pubkey:xt,account:gF});W({state:Ar([ct("active"),ct("inactive"),ct("activating"),ct("deactivating")]),active:U(),inactive:U()});rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));W({subscription:U(),result:c0(c6)});var yF=W({pubkey:xt,account:c6});W({subscription:U(),result:c0(yF)});var bF=W({parent:U(),slot:U(),root:U()});W({subscription:U(),result:bF});var xF=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:xF});W({subscription:U(),result:c0(Ar([fF,lF]))});W({subscription:U(),result:U()});W({pubkey:ne(),gossip:fe(ne()),tpu:fe(ne()),rpc:fe(ne()),version:fe(ne())});var aR=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(aR),delinquent:ue(aR)}));var vF=Ar([ct("processed"),ct("confirmed"),ct("finalized")]),wF=W({slot:U(),confirmations:fe(U()),err:$a,confirmationStatus:me(vF)});ao(ue(fe(wF)));rt(U());var vR=W({accountKey:xt,writableIndexes:ue(U()),readonlyIndexes:ue(U())}),u6=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(vR))})}),wR=W({pubkey:xt,signer:io(),writable:io(),source:me(Ar([ct("transaction"),ct("lookupTable")]))}),_R=W({accountKeys:ue(wR),signatures:ue(ne())}),ER=W({parsed:ka(),program:ne(),programId:xt}),SR=W({accounts:ue(xt),data:ne(),programId:xt}),_F=Ar([SR,ER]),EF=Ar([W({parsed:ka(),program:ne(),programId:ne()}),W({accounts:ue(ne()),data:ne(),programId:ne()})]),IR=qc(_F,EF,e=>"accounts"in e?Gc(e,SR):Gc(e,ER)),AR=W({signatures:ue(ne()),message:W({accountKeys:ue(wR),instructions:ue(IR),recentBlockhash:ne(),addressTableLookups:me(fe(ue(vR)))})}),o0=W({accountIndex:U(),mint:ne(),owner:me(ne()),programId:me(ne()),uiTokenAmount:mF}),kR=W({writable:ue(xt),readonly:ue(xt)}),u0=W({err:$a,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(kR),computeUnitsConsumed:me(U()),costUnits:me(U())}),f6=W({err:$a,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(IR)})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(kR),computeUnitsConsumed:me(U()),costUnits:me(U())}),Qc=Ar([ct(0),ct("legacy")]),Oa=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:u6,meta:fe(u0),version:me(Qc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:_R,meta:fe(u0),version:me(Qc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:AR,meta:fe(f6),version:me(Qc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:_R,meta:fe(f6),version:me(Qc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:u6,meta:fe(u0)})),rewards:me(ue(Oa)),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:u6,version:me(Qc)})));rt(fe(W({slot:U(),transaction:AR,meta:fe(f6),blockTime:me(fe(U())),version:me(Qc)})));ao(W({blockhash:ne(),lastValidBlockHeight:U()}));ao(io());var SF=W({slot:U(),numTransactions:U(),numSlots:U(),samplePeriodSecs:U()});rt(ue(SF));ao(fe(W({feeCalculator:W({lamportsPerSignature:U()})})));rt(ne());rt(ne());var IF=W({err:$a,logs:ue(ne()),signature:ne()});W({result:c0(IF),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 RR;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;}};RR=ad;ad.default=new RR(0,0,Ie.default);Object.freeze({Initialize:{index:0,layout:T.struct([T.u32("instruction"),V7(),Z7()])},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"),G7()])},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"),q7()])}});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 TR=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 $R(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function $F(e){let t=Buffer.from(e,"base64");return a0.deserializeMessageVersion(t)==="legacy"?n0.deserialize(t):tt.from(t)}function OR(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:$R(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:$R(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:$F(i)}}}}var NR=({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=OF({back:this,emitter:t});},async disableWebNavigation(){r?.(),r=void 0;}}};function OF({emitter:e,back:t}){let r=NF();if(r)return PF({emitter:e,back:t,navigation:r});if(typeof window<"u")return BF({emitter:e,back:t,window})}function NF(){if(typeof window<"u"&&window.navigation!==void 0)return window.navigation}function PF({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 BF({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 PR="0.1.1";function BR(){return PR}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@${BR()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return CR(this,t)}};function CR(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?CR(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===Na.code?Na: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 Na=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(Na,"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 LR(){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 UR(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new l6;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 l6=class extends f0{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function MR(e={}){let t=e.id??0;return {prepare(r){return LF({id:t++,...r})},get id(){return t}}}function LF(e){return {...e,jsonrpc:"2.0"}}var jR=Symbol("Comlink.proxy"),MF=Symbol("Comlink.endpoint"),DF=Symbol("Comlink.releaseProxy"),d6=Symbol("Comlink.finalizer"),p0=Symbol("Comlink.thrown"),FR=e=>typeof e=="object"&&e!==null||typeof e=="function",jF={canHandle:e=>FR(e)&&e[jR],serialize(e){let{port1:t,port2:r}=new MessageChannel;return VR(e,t),[r,[r]]},deserialize(e){return e.start(),m6(e)}},FF={canHandle:e=>FR(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}},HR=new Map([["proxy",jF],["throw",FF]]);function HF(e,t){for(let r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return true;return false}function VR(e,t=globalThis,r=["*"]){t.addEventListener("message",function o(n){if(!n||!n.data)return;if(!HF(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(Pa),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]]=Pa(n.data.value),u=!0;break;case "APPLY":u=d.apply(f,c);break;case "CONSTRUCT":{let g=new d(...c);u=KF(g);}break;case "ENDPOINT":{let{port1:g,port2:h}=new MessageChannel;VR(e,h),u=WF(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),ZR(t),d6 in e&&typeof e[d6]=="function"&&e[d6]());}).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 VF(e){return e.constructor.name==="MessagePort"}function ZR(e){VF(e)&&e.close();}function m6(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);}}),p6(e,r,[],t)}function d0(e){if(e)throw new Error("Proxy has been released and is not useable")}function GR(e){return eu(e,new Map,{type:"RELEASE"}).then(()=>{ZR(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&&GR(e);});function ZF(e,t){let r=(m0.get(t)||0)+1;m0.set(t,r),h0&&h0.register(e,t,e);}function GF(e){h0&&h0.unregister(e);}function p6(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(d0(n),a===DF)return ()=>{GF(i),GR(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(Pa);return c.then.bind(c)}return p6(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(Pa)},apply(s,a,c){d0(n);let u=r[r.length-1];if(u===MF)return eu(e,t,{type:"ENDPOINT"}).then(Pa);if(u==="bind")return p6(e,t,r.slice(0,-1));let[f,d]=DR(c);return eu(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:f},d).then(Pa)},construct(s,a){d0(n);let[c,u]=DR(a);return eu(e,t,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(Pa)}});return ZF(i,e),i}function qF(e){return Array.prototype.concat.apply([],e)}function DR(e){let t=e.map(g0);return [t.map(r=>r[0]),qF(t.map(r=>r[1]))]}var qR=new WeakMap;function WF(e,t){return qR.set(e,t),e}function KF(e){return Object.assign(e,{[jR]:true})}function WR(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 HR)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},qR.get(e)||[]]}function Pa(e){switch(e.type){case "HANDLER":return HR.get(e.name).deserialize(e.value);case "RAW":return e.value}}function eu(e,t,r,o){return new Promise(n=>{let i=JF();t.set(i,n),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),o);})}function JF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var YF={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},XF={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e));},addEventListener:(e,t,...r)=>{document.addEventListener("FarcasterFrameCallback",t,...r);},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t);}},KR=typeof window>"u"?YF:window?.ReactNativeWebView?XF:WR(window?.parent??window);var ve=m6(KR);var h6=LR(),QF=MR();function eH({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=UR({...h6,async request(e){let t=QF.prepare(e);try{let r=await ve.ethProviderRequestV2(t).then(o=>l0(o,{request:t,raw:!0}));if(r.error)throw eH(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 Na({message:r instanceof Error?r.message:void 0})}}});async function JR(){try{let e=await ve.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:tu}catch{return tu}}function YR(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;h6.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&YR({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;h6.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"&&YR({info:t.info,provider:tu});}}));new TextEncoder;var y0=new TextDecoder;var rH=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},XR=e=>{let t=e;t instanceof Uint8Array&&(t=y0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return rH(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};var QR=XR;function oH(e){return typeof e=="object"&&e!==null}function g6(e){if(!oH(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 y6=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;}};y6.code="ERR_JWT_CLAIM_VALIDATION_FAILED";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_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};b6.code="ERR_JWT_EXPIRED";var x6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};x6.code="ERR_JOSE_ALG_NOT_ALLOWED";var v6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};v6.code="ERR_JOSE_NOT_SUPPORTED";var w6=class extends xr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};w6.code="ERR_JWE_DECRYPTION_FAILED";var _6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};_6.code="ERR_JWE_INVALID";var E6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};E6.code="ERR_JWS_INVALID";var co=class extends xr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};co.code="ERR_JWT_INVALID";var S6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};S6.code="ERR_JWK_INVALID";var I6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};I6.code="ERR_JWKS_INVALID";var A6=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";}};A6.code="ERR_JWKS_NO_MATCHING_KEY";var k6=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";}};k6.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var R6=class extends xr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};R6.code="ERR_JWKS_TIMEOUT";var T6=class extends xr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};T6.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function eT(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=QR(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(!g6(n))throw new co("Invalid JWT Claims Set");return n}function tT(e){return eT(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 rT({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 nT({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 oT(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function iT(e={}){let t=oT(e);return {generateNonce:()=>rT(t),verifySiwf:r=>nT(t,r)}}var iH=/^(?:(?<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)?/,sH=/(?: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 sT(e){let{scheme:t,statement:r,...o}=e.match(iH)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(sH)?.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=iT({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await ve.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=sT(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:tT(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 uH(){let e=new zk;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=uH();var{solanaProviderRequest:aT}=ve,cT;aT&&(cT=TR(OR(aT)));async function $6(){let e;try{e=await ve.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return cT}var uT=null;async function fH(e=1e3){if(uT===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&&(uT=true),t}var fT=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")},lT={...vr,getCapabilities:ve.getCapabilities,getChains:ve.getChains,isInMiniApp:fH,context:ve.context,back:NR({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:fT,addMiniApp:fT,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:$6,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:JR,getSolanaProvider:$6},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=lT;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();Ii();vi();xs();var s4="/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:s4});n=c;}if(n.type!=="event")throw new Hd(void 0,{docsPath:s4});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)=>a4({param:f,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?a4({param:f,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=nr(n);return [gs(s),...i]}function a4({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])}Re();function vs(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 K0(e,t){let{address:r,abi:o,args:n,eventName:i,fromBlock:s,strict:a,toBlock:c}=t,u=vs(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"?J(s):s,toBlock:typeof c=="bigint"?J(c):c,topics:f}]});return {abi:o,args:n,eventName:i,id:d,request:u(d),strict:!!a,type:"event"}}ln();Dn();Et();Te();ki();Da();np();var JH=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 pg({functionName:i,cause:e}):[JH,Ri.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 Es?f:g??d,cause:e}):e;return new xu(h,{abi:t,args:o,contractAddress:r,docsPath:n,functionName:i,sender:s})}ln();Te();Si();Un();function S4(e){let t=qe(`0x${e.substring(4)}`).substring(26);return ys(`0x${t}`)}lo();sn();ur();Re();async function A4({hash:e,signature:t}){let r=St(e)?e:mt(e),{secp256k1:o}=await Promise.resolve().then(()=>(rd(),tR));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=I4(h);return new o.Signature(ut(u),ut(f)).addRecoveryBit(v)}let s=St(t)?t:mt(t);if($e(s)!==65)throw new Error("invalid signature length");let a=vt(`0x${s.slice(130)}`),c=I4(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function I4(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 S4(await A4({hash:e,signature:t}))}cn();lr();Re();Te();Q0();lr();Re();function go(e,t="hex"){let r=k4(e),o=mu(new Uint8Array(r.length));return r.encode(o),t==="hex"?Ue(o.bytes):o.bytes}function k4(e){return Array.isArray(e)?YH(e.map(t=>k4(t))):XH(e)}function YH(e){let t=e.reduce((n,i)=>n+i.length,0),r=R4(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 XH(e){let t=typeof e=="string"?fr(e):e,r=R4(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 R4(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 T4(e){let{chainId:t,nonce:r,to:o}=e,n=e.contractAddress??e.address,i=qe(st(["0x05",go([t?J(t):"0x",n,r?J(r):"0x"])]));return o==="bytes"?fr(i):i}async function gg(e){let{authorization:t,signature:r}=e;return op({hash:T4(t),signature:r??t})}Re();og();yu();Te();jn();var yg=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;}};Ti();ip();function $4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Zn?e:n})();return new yg(o,{docsPath:t,...r})}sp();Ju();xg();Ha();ln();yu();Te();var Qu=class extends z{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"});}},ks=class extends z{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"});}},vg=class extends z{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${or(t)} gwei).`,{name:"MaxFeePerGasTooLowError"});}};ur();Te();var Rs=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"});}};Re();bg();ur();bg();var o2={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function $i(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=rV(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 N4=Ku("transaction",$i);function rV(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:$i(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 P4=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?J(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 Rs({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 B4(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 ks;let a=s-i.baseFeePerGas;return a<0n?0n:a}}async function C4(e,t){return wg(e,t)}async function wg(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 ks;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 _g(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();Re();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=>Ue(i))}lr();Re();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=>Ue(s))}Re();lo();lr();Re();function z4(e,t){let r=t,o=Ll(St(e,{strict:false})?qr(e):e);return r==="bytes"?o:mt(o)}function L4(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=z4(t,"bytes");return n.set([r],0),o==="bytes"?n:Ue(n)}function Eg(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(L4({commitment:i,to:o,version:r}));return n}Te();var Sg=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"});}},Ig=class extends z{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},Ag=class extends z{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};Q0();sn();lr();Re();function U4(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 Sg({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=>Ue(a.bytes))}function kg(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??U4({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 Rg(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 cg({transaction:e})}ln();Ti();jn();ip();function M4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Zn?e:n})();return new fg(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 Tg(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)({...As(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||$i)(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 M4(D,{...t,chain:e.chain})}}var iV=["blobVersionedHashes","chainId","fees","gas","nonce","type"],D4=new Map,s2=new Uo(128);async function $g(e,t){let r=t;r.account??=e.account,r.parameters??=iV;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,Tg,"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,_g,"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=Eg({commitments:I,to:"hex"});r.blobVersionedHashes=P;}if(s.includes("sidecars")){let P=rf({blobs:v,commitments:I,kzg:R}),L=kg({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=Rg(r);}catch{let I=D4.get(e.uid);typeof I>"u"&&(I=typeof(await O())?.baseFeePerGas=="bigint",D4.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 wg(e,{block:I,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<L)throw new vg({maxPriorityFeePerGas:L});r.maxPriorityFeePerGas=L,r.maxFeePerGas=P;}}else {if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new ks;if(typeof r.gasPrice>"u"){let I=await O(),{gasPrice:P}=await wg(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 gg({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 $g(e,{...t,parameters:i,to:s}):t;if(v&&t.gas!==v)return v;let D=(typeof d=="bigint"?J(d):void 0)||g,q=Yu(P);Gn(t);let H=e.chain?.formatters?.transactionRequest?.format,re=(H||Zo)({...As(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 $4(s,{...t,account:n,chain:e.chain})}}async function j4(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=ft({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})}}xs();Ts();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 F4="/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:F4});let c=t.find($=>$.type==="event"&&s===gs(nr($)));if(!(c&&"name"in c)||c.type!=="event")throw new z0(s,{docsPath:F4});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 ms({abiItem:c,param:N});v.push([N,O]);continue}g[d?O:N.name||O]=sV({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 $=Ai(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 sV({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ai([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:gs(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)||!aV({args:f.args,inputs:d.abi.inputs,matchArgs:r})?null:{...f,...c}}).filter(Boolean)}function aV(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}Re();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"?J(o):o,toBlock:typeof n=="bigint"?J(n):n}]});let h=g.map(v=>dr(v));return f?af({abi:f,args:a,logs:h,strict:u}):h}async function Og(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})}Oi();Dn();Ns();async function De(e,t){let{abi:r,address:o,args:n,functionName:i,...s}=t,a=ft({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();Oi();Dn();Ns();async function O$(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=ft({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 Xg=new Map,$2=new Map,$V=0;function Ur(e,t,r){let o=++$V,n=()=>Xg.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){Xg.delete(e),$2.delete(e);return}Xg.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(Xg.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 OV=new Map,NV=new Map;function N$(e){let t=(n,i)=>({clear:()=>i.delete(n),get:()=>i.get(n),set:s=>i.set(n,s)}),r=t(e,OV),o=t(e,NV);return {clear:()=>{r.clear(),o.clear();},promise:r,response:o}}async function P$(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=N$(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 PV=e=>`blockNumber.${e}`;async function Jn(e,{cacheTime:t=e.cacheTime}={}){let r=await P$(()=>e.request({method:"eth_blockNumber"}),{cacheKey:PV(e.uid),cacheTime:t});return BigInt(r)}async function Ps(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 Bs(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function B$(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,K0,"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,Ps,"getFilterChanges")({filter:I});else {let D=await oe(e,Jn,"getBlockNumber")({});O&&O<D?C=await oe(e,Og,"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,Bs,"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 ms){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 C$(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();bg();var BV={"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?BV[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 z$=Ku("transactionReceipt",Xa);ln();var Qg=256,ey;function ty(e=11){if(!ey||Qg+e>256*2){ey="",Qg=0;for(let t=0;t<256;t++)ey+=(256+Math.random()*256|0).toString(16).substring(1);}return ey.substring(Qg,Qg+++e)}function U$(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:ty(),...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];L$(H)&&L$(Z)&&(D[q]={...H,...Z});}return Object.assign(D,{extend:I(D)})}}return Object.assign(O,{extend:I(O)})}function L$(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();Oi();Dn();Si();Ya();sn();Kd();Re();Te();ki();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();Re();Un();lo();function ry(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 Ue(t);let r=e.split(".");for(let o=r.length-1;o>=0;o-=1){let n=ry(r[o]),i=n?qr(n):qe(Ln(r[o]),"bytes");t=qe(Mo([t,i]),"bytes");}return Ue(t)}lr();function M$(e){return `[${e.slice(2)}]`}lr();Re();Un();function D$(e){let t=new Uint8Array(32).fill(0);return e?ry(e)||qe(Ln(e)):Ue(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(M$(D$(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 j$(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=ft({abi:b2,functionName:"addr",args:d}),h={address:u,abi:Hg,functionName:"resolveWithGateways",args:[mt(yf(i)),g,s??[Bi]],blockNumber:r,blockTag:o},E=await oe(e,De,"readContract")(h);if(E[0]==="0x")return null;let R=CV({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 CV({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 ny=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"});}},Cs=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"});}},oy=class extends z{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"});}};var zV=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,LV=/^(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>\/.*)?$/,UV=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,MV=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function DV(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 F$(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function O2({uri:e,gatewayUrls:t}){let r=UV.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=F$(t?.ipfs,"https://ipfs.io"),n=F$(t?.arweave,"https://arweave.net"),i=e.match(zV),{protocol:s,subpath:a,target:c,subtarget:u=""}=i?.groups||{},f=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||LV.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(MV,"");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 ny({data:e});return e.image||e.image_url||e.image_data}async function H$({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await iy({gatewayUrls:e,uri:N2(r)})}catch{throw new bf({uri:t})}}async function iy({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=O2({uri:t,gatewayUrls:e});if(o||await DV(r))return r;throw new bf({uri:t})}function V$(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 Cs({reason:"Only EIP-155 supported"});if(!s)throw new Cs({reason:"Chain ID not found"});if(!c)throw new Cs({reason:"Contract address not found"});if(!n)throw new Cs({reason:"Token ID not found"});if(!a)throw new Cs({reason:"ERC namespace not found"});return {chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:n}}async function Z$(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 oy({namespace:t.namespace})}async function G$(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?jV(e,{gatewayUrls:t,record:r}):iy({uri:r,gatewayUrls:t})}async function jV(e,{gatewayUrls:t,record:r}){let o=V$(r),n=await Z$(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 iy({uri:N2(f),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),H$({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}mn();Oi();Dn();Ya();Re();hp();async function sy(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:Hg,args:[mt(yf(i)),ft({abi:y2,functionName:"text",args:[vp(i),n]}),s??[Bi]],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 q$(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await oe(e,sy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await G$(e,{record:c,gatewayUrls:o})}catch{return null}}mn();Ya();hp();async function W$(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:p$,args:[r,i,s??[Bi]],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();Re();async function K$(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:[mt(yf(n))],blockNumber:r,blockTag:o});return c}Ns();ln();Te();Re();E2();sp();Ju();Ha();async function J$(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"?J(o):void 0)||n,N=e.chain?.formatters?.transactionRequest?.format,I=(N||Zo)({...As(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 Gg(R,{...t,account:E,chain:e.chain})}}async function Y$(e){let t=vs(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return {id:r,request:t(r),type:"block"}}Re();async function ay(e,{address:t,args:r,event:o,events:n,fromBlock:i,strict:s,toBlock:a}={}){let c=n??(o?[o]:void 0),u=vs(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"?J(i):i,toBlock:typeof a=="bigint"?J(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 cy(e){let t=vs(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return {id:r,request:t(r),type:"transaction"}}mn();Oi();Dn();Za();Ns();async function X$(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=ft({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 Q$(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}Re();async function e8(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}={}){let n=r!==void 0?J(r):void 0,i=await e.request({method:"eth_getBlockReceipts",params:[t||n||o]},{dedupe:!!(t||n)});if(!i)throw new Rs({blockHash:t,blockNumber:r});let s=e.chain?.formatters?.transactionReceipt?.format||Xa;return i.map(a=>s(a,"getBlockReceipts"))}ur();Re();async function t8(e,{blockHash:t,blockNumber:r,blockTag:o="latest"}={}){let n=r!==void 0?J(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}Si();sn();bs();async function r8(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 uy=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 n8(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:FV,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 uy({address:r}):s}}var FV=[{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"}];Re();function o8(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 i8(e,{blockCount:t,blockNumber:r,blockTag:o="latest",rewardPercentiles:n}){let i=typeof r=="bigint"?J(r):void 0,s=await e.request({method:"eth_feeHistory",params:[J(t),i||o,n]},{dedupe:!!i});return o8(s)}async function s8(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();Re();jn();cn();Kd();Re();n2();Lo();Te();Zg();Ti();Sn();sn();bs();ur();function a8(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})}fy(e);}function c8(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 Ig({hash:r,size:o});if(n!==1)throw new Ag({hash:r,version:n})}}fy(e);}function fy(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 u8(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 f8(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 ug({storageKey:n[i]});if(!Me(o,{strict:false}))throw new nt({address:o});t.push([o,n]);}return t}function l8(e,t){let r=Rg(e);return r==="eip1559"?ZV(e,t):r==="eip2930"?GV(e,t):r==="eip4844"?VV(e,t):r==="eip7702"?HV(e,t):qV(e,t)}function HV(e,t){let{authorizationList:r,chainId:o,gas:n,nonce:i,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;a8(e);let g=wp(f),h=d8(r);return st(["0x04",go([J(o),i?J(i):"0x",u?J(u):"0x",c?J(c):"0x",n?J(n):"0x",s??"0x",a?J(a):"0x",d??"0x",g,h,...xf(e,t)])])}function VV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;c8(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=>Ue(L)),I=e.kzg,P=tf({blobs:O,kzg:I});if(typeof g>"u"&&(g=Eg({commitments:P})),typeof h>"u"){let L=rf({blobs:O,commitments:P,kzg:I});h=kg({blobs:O,commitments:P,proofs:L});}}let v=wp(f),E=[J(r),n?J(n):"0x",u?J(u):"0x",c?J(c):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",d??"0x",v,a?J(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 ZV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:f}=e;fy(e);let d=wp(u),g=[J(r),n?J(n):"0x",c?J(c):"0x",a?J(a):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",f??"0x",d,...xf(e,t)];return st(["0x02",go(g)])}function GV(e,t){let{chainId:r,gas:o,data:n,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;u8(e);let f=wp(c),d=[J(r),i?J(i):"0x",u?J(u):"0x",o?J(o):"0x",s??"0x",a?J(a):"0x",n??"0x",f,...xf(e,t)];return st(["0x01",go(d)])}function qV(e,t){let{chainId:r=0,gas:o,data:n,nonce:i,to:s,value:a,gasPrice:c}=e;f8(e);let u=[i?J(i):"0x",c?J(c):"0x",o?J(o):"0x",s??"0x",a?J(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 ag({v:t.v});return h})(),d=Gr(t.r),g=Gr(t.s);u=[...u,J(f),d==="0x00"?"0x":d,g==="0x00"?"0x":g];}else r>0&&(u=[...u,J(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?J(1):"0x":o===0n?"0x":o===1n?J(1):o===27n?"0x":J(1),i==="0x00"?"0x":i,s==="0x00"?"0x":s]}function d8(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?mt(o):"0x",s,n?mt(n):"0x",...xf({},i)]);}return t}Si();Ts();async function p8({address:e,authorization:t,signature:r}){return zr(Mn(e),await gg({authorization:t,signature:r}))}Te();Da();np();mo();Yd();var ly=new Uo(8192);function m8(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(ly.get(r))return ly.get(r);let o=e().finally(()=>ly.delete(r));return ly.set(r,o),o}Pr();function h8(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 Ss(new Error("method not supported"),{method:f});if(i?.include&&!i.include.includes(f))throw new Ss(new Error("method not supported"),{method:f});if(c?.aborted)throw wr(c);let d=n?KV(`${u}.${Be(r)}`):void 0;return m8(()=>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 Ri.code:throw new Ri(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 Ss.code:throw new Ss(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 hg(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})=>WV(g)}),{enabled:n,id:d})}}function WV(e){return dn(e)?false:"code"in e&&typeof e.code=="number"?e.code===-1||e.code===ja.code||e.code===Ri.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 KV(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 g8(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 JV(){return {current:0,take(){return this.current++},reset(){this.current=0;}}}var P2=JV();var YV=10485760;function y8(e,t={}){let{url:r,headers:o}=QV(e);return {async request(n){let{body:i,fetchFn:s=t.fetchFn??fetch,maxResponseBodySize:a=t.maxResponseBodySize??YV,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 g8(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 XV(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 XV(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 QV(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 b8=`Ethereum Signed Message:
69
- `;cn();sn();Re();function x8(e){let t=typeof e=="string"?Ca(e):typeof e.raw=="string"?e.raw:Ue(e.raw),r=Ca(`${b8}${$e(t)}`);return Mo([r,t])}function dy(e,t){return qe(x8(e),t)}Ii();cn();Re();Un();Et();Lo();Pr();Te();var py=class extends z{constructor({domain:t}){super(`Invalid domain "${Be(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},my=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`."]});}},hy=class extends z{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}},gy=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();Re();Z6();function v8(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 gy({type:f});let h=f.match(W0);if(h&&(typeof d=="number"||typeof d=="bigint")){let[R,$,N]=h;J(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(o4);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&&(eZ(f),i(E,d));}};if(n.EIP712Domain&&t){if(typeof t!="object")throw new py({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new my({primaryType:o,types:n})}function w8({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 eZ(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new hy({type:e})}function _8(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:w8({domain:t}),...e.types};v8({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(tZ({domain:t,types:n})),o!=="EIP712Domain"&&i.push(E8({data:r,primaryType:o,types:n})),qe(Mo(i))}function tZ({domain:e,types:t}){return E8({data:e,primaryType:"EIP712Domain",types:t})}function E8({data:e,primaryType:t,types:r}){let o=S8({data:e,primaryType:t,types:r});return qe(o)}function S8({data:e,primaryType:t,types:r}){let o=[{type:"bytes32"}],n=[rZ({primaryType:t,types:r})];for(let i of r[t]){let[s,a]=A8({types:r,name:i.name,type:i.type,value:e[i.name]});o.push(s),n.push(a);}return Wr(o,n)}function rZ({primaryType:e,types:t}){let r=mt(nZ({primaryType:e,types:t}));return qe(r)}function nZ({primaryType:e,types:t}){let r="",o=I8({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 I8({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])I8({primaryType:i.type,types:t},r);return r}function A8({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},qe(S8({data:o,primaryType:r,types:e}))];if(r==="bytes")return [{type:"bytes32"},qe(o)];if(r==="string")return [{type:"bytes32"},qe(mt(o))];if(r.lastIndexOf("]")===r.length-1){let n=r.slice(0,r.lastIndexOf("[")),i=o.map(s=>A8({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:()=>Oy,assert:()=>Ny,from:()=>UZ,magicBytes:()=>iE,suffixParameters:()=>sE,unwrap:()=>q8,validate:()=>DZ,wrap:()=>MZ});au();$s();var yy=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 oZ={checksum:new yy(8192)},by=oZ.checksum;pn();Wh();$s();pr();function ec(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=Ra(r$(e));return r==="Bytes"?o:It(o)}$s();pn();pr();up();function k8(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 xy({prefix:o,cause:new L2});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new xy({prefix:o,cause:new z2});return}throw new C2({publicKey:e})}function R8(e){let t=(()=>{if(lp(e))return T8(e);if(c$(e))return sZ(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 k8(t),t}function sZ(e){return T8(It(e))}function T8(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new U2({publicKey:e});if(e.length===130){let o=BigInt(dt(e,0,32)),n=BigInt(dt(e,32,64));return {prefix:4,x:o,y:n}}if(e.length===132){let o=Number(dt(e,0,1)),n=BigInt(dt(e,1,33)),i=BigInt(dt(e,33,65));return {prefix:o,x:n,y:i}}let t=Number(dt(e,0,1)),r=BigInt(dt(e,1,33));return {prefix:t,x:r}}function M2(e,t={}){k8(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 \`${Os(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"});}},xy=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 ${lt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidSerializedSizeError"});}};var aZ=/^0x[a-fA-F0-9]{40}$/;function tc(e,t={}){let{strict:r=true}=t;if(!aZ.test(e))throw new vy({address:e,cause:new D2});if(r){if(e.toLowerCase()===e)return;if(wy(e)!==e)throw new vy({address:e,cause:new j2})}}function wy(e){if(by.has(e))return by.get(e);tc(e,{strict:false});let t=e.substring(2).toLowerCase(),r=ec(n$(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 by.set(e,n),n}function cZ(e,t={}){let{checksum:r=false}=t;return tc(e),r?wy(e):e}function O8(e,t={}){let r=ec(`0x${M2(e).slice(4)}`).substring(26);return cZ(`0x${r}`,t)}function _y(e,t={}){let{strict:r=true}=t??{};try{return tc(e,{strict:r}),!0}catch{return false}}var vy=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"});}};$s();pn();pr();$s();pn();pr();var N8=/^(.*)\[([0-9]*)\]$/,P8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Sy=/^(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 fZ(e,{...t,type:a},{checksumAddress:o,length:s,staticPosition:n})}if(t.type==="tuple")return mZ(e,t,{checksumAddress:o,staticPosition:n});if(t.type==="address")return uZ(e,{checksum:o});if(t.type==="bool")return lZ(e);if(t.type.startsWith("bytes"))return dZ(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return pZ(e,t);if(t.type==="string")return hZ(e,{staticPosition:n});throw new _f(t.type)}var C8=32,H2=32;function uZ(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?wy(i):i)(It(o$(o,-20))),32]}function fZ(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+C8;e.setPosition(u);let d=Go(e.readBytes(C8)),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 lZ(e){return [s$(e.readBytes(32),{size:32}),32]}function dZ(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 pZ(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?i$(n,{signed:r}):Go(n,{signed:r}),32]}function mZ(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 hZ(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=a$(p2(i));return e.setPosition(t+32),[s,32]}function z8({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 yZ(r,{checksumAddress:e,length:i,parameter:{...o,type:s}})}if(o.type==="tuple")return _Z(r,{checksumAddress:e,parameter:o});if(o.type==="address")return gZ(r,{checksum:e});if(o.type==="bool")return xZ(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){let i=o.type.startsWith("int"),[,,s="256"]=Sy.exec(o.type)??[];return vZ(r,{signed:i,size:Number(s)})}if(o.type.startsWith("bytes"))return bZ(r,{type:o.type});if(o.type==="string")return wZ(r);throw new _f(o.type)}function Iy(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=lt(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+=lt(a)):r.push(a);}return ht(...r,...o)}function gZ(e,t){let{checksum:r=false}=t;return tc(e,{strict:r}),{dynamic:false,encoded:Pi(e.toLowerCase())}}function yZ(e,t){let{checksumAddress:r,length:o,parameter:n}=t,i=o===null;if(!Array.isArray(e))throw new ky(e);if(!i&&e.length!==o)throw new Ay({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=Iy(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 bZ(e,{type:t}){let[,r]=t.split("bytes"),o=lt(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(Pi(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 xZ(e){if(typeof e!="boolean")throw new de(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:Pi(Dg(e))}}function vZ(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 wZ(e){let t=mf(e),r=Math.ceil(lt(t)/32),o=[];for(let n=0;n<r;n++)o.push(qo(dt(t,n*32,(n+1)*32)));return {dynamic:true,encoded:ht(qo(Ve(lt(t),{size:32})),...o)}}function _Z(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?Iy(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 SZ={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 Ry({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 Ry({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 Ty(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(SZ);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Ry=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=Ty(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 zs(e,t,r){let{checksumAddress:o=false}={};if(e.length!==t.length)throw new $y({expectedLength:e.length,givenLength:t.length});let n=z8({checksumAddress:o,parameters:e,values:t}),i=Iy(n);return i.length===0?"0x":i}function W2(e,t){if(e.length!==t.length)throw new $y({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),Pi(c.toLowerCase(),n?32:0)}if(r==="string")return mf(o);if(r==="bytes")return o;if(r==="bool")return Pi(Dg(o),n?32:1);let i=r.match(Sy);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(P8);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(N8);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"});}},Ay=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${lt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.BytesSizeMismatchError"});}},$y=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"});}},ky=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();$s();pn();pr();function IZ(e,t){let{as:r}=t,o=M8(e),n=Ty(new Uint8Array(o.length));return o.encode(n),r==="Hex"?It(n.bytes):n.bytes}function U8(e,t={}){let{as:r="Hex"}=t;return IZ(e,{as:r})}function M8(e){return Array.isArray(e)?AZ(e.map(t=>M8(t))):kZ(e)}function AZ(e){let t=e.reduce((n,i)=>n+i.length,0),r=D8(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 kZ(e){let t=typeof e=="string"?df(e):e,r=D8(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 D8(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 TZ(e){return j8(It(e))}function j8(e){if(e.length!==130&&e.length!==132)throw new Y2({signature:e});let t=BigInt(dt(e,0,32)),r=BigInt(dt(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"?j8(e):e instanceof Uint8Array?TZ(e):typeof e.r=="string"?OZ(e):e.v?$Z(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return tE(t),t}function $Z(e){return {r:e.r,s:e.s,yParity:oE(e.v)}}function OZ(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 F8(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 ${lt(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 \`${Os(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 V8(e,t={}){return typeof e.chainId=="string"?NZ(e):{...e,...t.signature}}function NZ(e){let{address:t,chainId:r,nonce:o}=e,n=rE(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function Z8(e){return PZ(e,{presign:true})}function PZ(e,t={}){let{presign:r}=t;return ec(ht("0x05",U8(BZ(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function BZ(e){let{address:t,chainId:r,nonce:o}=e,n=rE(e);return [r?Ve(r):"0x",t,o?Ve(o):"0x",...n?F8(n):[]]}pn();pr();rd();pr();function G8(e){return O8(zZ(e))}function zZ(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 R8(a)}var iE="0x8010801080108010801080108010801080108010801080108010801080108010",sE=Sp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Ny(e){if(typeof e=="string"){if(dt(e,-32)!==iE)throw new Oy(e)}else tE(e.authorization);}function UZ(e){return typeof e=="string"?q8(e):e}function q8(e){Ny(e);let t=Lg(dt(e,-64,-32)),r=dt(e,-t-64,-64),o=dt(e,0,-t-64),[n,i,s]=nc(sE,r);return {authorization:V8({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 MZ(e){let{data:t,signature:r}=e;Ny(e);let o=G8({payload:Z8(e.authorization),signature:nE(e.authorization)}),n=zs(sE,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??o,t??"0x"]),i=Ve(lt(n),{size:32});return ht(r,n,i,iE)}function DZ(e){try{return Ny(e),!0}catch{return false}}var Oy=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"});}};ng();function W8(e,t){return rg(e,t)}function jZ(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function K8(e){return {...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?vt(e.nonce):void 0,storageProof:e.storageProof?jZ(e.storageProof):void 0}}async function J8(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 K8(c)}jn();async function Y8(e,{hash:t}){let r=await e.request({method:"eth_getRawTransactionByHash",params:[t]},{dedupe:true});if(!r)throw new ws({hash:t});return r}Za();async function X8(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();Re();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?J(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,J(i)]},{dedupe:true}):typeof i=="number"?f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,J(i)]},{dedupe:!!u}):s&&typeof a=="number"&&(f=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[s,J(a)]},{dedupe:true})),!f)throw new ws({blockHash:t,blockNumber:r,blockTag:c,hash:n,index:i});return (e.chain?.formatters?.transaction?.format||$i)(f,"getTransaction")}async function Q8(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();ki();Oi();Dn();Ya();Wg();Pr();async function eO(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=ft({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?FZ(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 FZ(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();ki();Ti();Oi();Dn();cn();Re();ip();Ju();xg();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?jg(g.blockOverrides):void 0,v=g.calls.map(R=>{let $=R,N=$.account?We($.account):void 0,O=$.abi?ft($):$.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"?J(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=Is(u,{});throw f instanceof Zn?u:f}}au();pn();pr();pn();function By(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 Py(e,t){let r=typeof e,o=t.type;switch(o){case "address":return _y(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)=>Py(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=>Py(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")?_y(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?_y(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:Ls(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)===dt(t,0,4):u.type==="event"?Ls(u)===t:false:"name"in u&&u.name===t);if(s.length===0)throw new Ci({name:t});if(s.length===1)return {...s[0],...n?{hash:Ls(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:Ls(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?Py(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 Ci({name:t});return {...c,...n?{hash:Ls(c)}:{}}}function uE(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return dt(Ls(t),0,4)}function VZ(...e){let t=(()=>{if(Array.isArray(e[0])){let[o,n]=e;return kf(o,n)}return e[0]})(),r=typeof t=="string"?t:Ba(t);return By(r)}function Ls(...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(VZ(t)))}var cE=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${By(Ba(t.abiItem))}\`, and`,`\`${r.type}\` in \`${By(Ba(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"});}},Ci=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 tO(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[i,s]=e;return [ZZ(i),s]}return e})(),{bytecode:o,args:n}=r;return ht(o,t.inputs?.length&&n?.length?zs(t.inputs,n):"0x")}function rO(e){return Af(e)}function ZZ(e){let t=e.find(r=>r.type==="constructor");if(!t)throw new Ci({name:"constructor"});return t}function nO(e,t={}){return Af(e,t)}function oO(e){return Ls(e)}pr();function iO(...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 Us(...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=WZ(n),s=r.length>0?zs(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 Ci({name:t,type:"function"});return o}function WZ(e){return uE(e)}ln();var Cy="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",zy="0x0000000000000000000000000000000000000000";dp();Te();ki();Ti();qd();ur();Ns();var JZ="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",dO="0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033",YZ=0x00000000000000000000000000000000deadbeefn,XZ=oO(nO("event Transfer(address indexed from, address indexed to, uint256 value)")),sO=oc("function balanceOf(address) returns (uint256)"),aO=oc("function decimals() returns (uint256)"),cO=oc("function tokenURI(uint256) returns (string)"),uO=oc("function symbol() returns (string)"),QZ=oc("function query(address target, bytes data)");async function pO(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?tO(rO("constructor(bytes, bytes)"),{bytecode:Vg,args:[JZ,Us(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([...eG(v[0].calls.flatMap(p=>p.logs??[]),u.address),...t.calls.map(p=>p.to?.toLowerCase())])].filter(p=>!!p&&p!==Cy&&p!==zy):[],R=tG([...u?[u.address]:[],...E,...i?.map(({address:p})=>p)??[]]),$=[{address:R,code:dO}],[N,O]=await Promise.all([s?Promise.all([lO(e,{account:u.address,...h,data:f,stateOverride:i}),...E.map(p=>lO(e,{account:u.address,address:p,...h,data:Us(sO,[u.address]),staticCallAddress:R,stateOverride:i}))]):[],If(e,{...h,blocks:[{calls:[...n,{to:zy}].map(p=>({...p,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:f}]},{calls:E.map(p=>({to:R,data:Rp(p,Us(sO,[u.address]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(aO))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(cO,[0n]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(uO))})),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=>fO(p)?ut(p.data):null),l=P?.calls??[],m=L?.calls??[],b=[...l,...m].map(p=>fO(p)?ut(p.data):null),x=(C?.calls??[]).map(p=>dE(p,aO)),_=(q?.calls??[]).map(p=>dE(p,uO)),k=(D?.calls??[]).map(p=>dE(p,cO)),w=[];for(let[p,A]of b.entries()){let G=S[p],K=N[p],Q=typeof G=="bigint"?G:p>0&&K?.status==="success"&&K.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:Cy,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 Us(QZ,[e,t])}function eG(e,t){let r=zo(t.toLowerCase(),{size:32});return e.filter(o=>o.topics[0]?.toLowerCase()!==XZ||o.address.toLowerCase()===Cy?false:o.topics[1]?.toLowerCase()===r||o.topics[2]?.toLowerCase()===r).map(o=>o.address.toLowerCase())}function fO(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 iO(t,e.data)}catch{return null}}async function lO(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?zy:r,data:o?Rp(o,s):s,stateOverride:o&&a?[...c??[],{address:a,code:dO}]:c,...o?{to:a}:{},...typeof n=="bigint"?{blockNumber:n}:{blockTag:i}})).data??"0x",status:"success"}}catch(u){if(!(u instanceof _s)||!(u.cause instanceof yo))throw u;return {data:"0x",status:"failure"}}}function tG(e){let t=new Set(e.map(o=>o.toLowerCase())),r=YZ;for(;t.has(`0x${r.toString(16).padStart(40,"0")}`);)r++;return `0x${r.toString(16).padStart(40,"0")}`}var Tp={};Er(Tp,{InvalidWrappedSignatureError:()=>Ly,assert:()=>mE,from:()=>oG,magicBytes:()=>pE,universalSignatureValidatorAbi:()=>nG,universalSignatureValidatorBytecode:()=>rG,unwrap:()=>mO,validate:()=>sG,wrap:()=>iG});pn();pr();var pE="0x6492649264926492649264926492649264926492649264926492649264926492",rG="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",nG=[{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(dt(e,-32)!==pE)throw new Ly(e)}function oG(e){return typeof e=="string"?mO(e):e}function mO(e){mE(e);let[t,r,o]=nc(Sp("address, bytes, bytes"),e);return {data:r,signature:o,to:t}}function iG(e){let{data:t,signature:r,to:o}=e;return ht(zs(Sp("address, bytes, bytes"),[o,t,r]),pE)}function sG(e){try{return mE(e),!0}catch{return false}}var Ly=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();ki();_2();Dn();Si();Ts();cn();lo();ur();Re();rd();ur();lr();function hO({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)}Ns();async function Ms(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?hO(u):Ue(u)})();try{if(a==="eoa")try{if(zr(Mn(r),await op({hash:n,signature:c})))return !0}catch{}return kp.validate(c)?await aG(e,{...t,multicallAddress:s,signature:c}):await cG(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 zi)return false;throw u}}async function aG(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 uG(e,{...t,signature:d});let v={address:u.address,chainId:Number(u.chainId),nonce:Number(u.nonce),r:J(u.r,{size:32}),s:J(u.s,{size:32}),yParity:u.yParity};if(!await p8({address:r,authorization:v}))throw new zi;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:ft({abi:x2,functionName:"isValidSignature",args:[s,d]})}]]});if(R[R.length-1]?.returnData?.startsWith("0x1626ba7e"))return true;throw new zi}async function cG(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:ft({abi:v2,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:mp({abi:v2,args:[r,i,u],bytecode:y$}),...c},{data:d}=await oe(e,hn,"call")(f).catch(g=>{throw g instanceof _s?new zi:g});if(M6(d??"0x0"))return true;throw new zi}async function uG(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 zi:f})).startsWith("0x1626ba7e"))return true;throw new zi}var zi=class extends Error{};async function gO(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=dy(r);return oe(e,Ms,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function yO(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...f}=t,d=_8({message:s,primaryType:a,types:c,domain:u});return oe(e,Ms,"verifyHash")({address:r,factory:o,factoryData:n,hash:d,signature:i,...f})}jn();S2();Pr();ur();Pr();function Uy(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 bO(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}=qg(),I=c?setTimeout(()=>{R?.(),E?.(),O(new dg({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,Uy,"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 ws||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 Rs});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 fG=["size","totalDifficulty","transactions","uncles","withdrawals"];function xO(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 fG)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 vO(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 wO(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,ay,"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,Ps,"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,Bs,"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 ms){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 _O(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,cy,"createPendingTransactionFilter")({});return}catch(v){throw g(),v}let h=await oe(e,Ps,"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,Bs,"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 lG=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function dG(e){return lG.test(e)?!Number.isNaN(new Date(e).getTime()):false}function hE(e){return dG(e)?new Date(e):new Date(Number.NaN)}function EO(e){let{scheme:t,statement:r,...o}=e.match(pG)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(mG)?.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 pG=/^(?:(?<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)?/,mG=/(?: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();Ts();function SO(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 IO(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,f=EO(n);if(!f.address||!SO({address:r,domain:o,message:f,nonce:i,scheme:s,time:c}))return false;let g=dy(n);return Ms(e,{address:f.address,hash:g,signature:a,...u})}mn();Sn();Ts();function Rf(e,t){return {amount:e,decimals:t,formatted:W8(e,t)}}function Li(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??gG(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=hG(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 hG(e,t){let r=t.toLowerCase();for(let o of e)if(o.symbol?.toLowerCase()===r)return o}function gG(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}=Li(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:ft(e),to:e.address}}jn();async function AO(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 lg({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:Li(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:Li(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}=Li(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:Li(r,o).address,abi:Wn,args:[],functionName:"totalSupply"})}e.call=t;})(Pf||(Pf={}));function kO(e){return {call:t=>hn(e,t),createAccessList:t=>J$(e,t),createBlockFilter:()=>Y$(e),createContractEventFilter:t=>K0(e,t),createEventFilter:t=>ay(e,t),createPendingTransactionFilter:()=>cy(e),estimateContractGas:t=>j4(e,t),estimateGas:t=>sf(e,t),getBalance:t=>X$(e,t),getBlobBaseFee:()=>Q$(e),getBlock:t=>er(e,t),getBlockNumber:t=>Jn(e,t),getBlockReceipts:t=>e8(e,t),getBlockTransactionCount:t=>t8(e,t),getBytecode:t=>Qa(e,t),getChainId:()=>of(e),getCode:t=>Qa(e,t),getContractEvents:t=>Og(e,t),getDelegation:t=>r8(e,t),getEip712Domain:t=>n8(e,t),getEnsAddress:t=>j$(e,t),getEnsAvatar:t=>q$(e,t),getEnsName:t=>W$(e,t),getEnsResolver:t=>K$(e,t),getEnsText:t=>sy(e,t),getFeeHistory:t=>i8(e,t),estimateFeesPerGas:t=>C4(e,t),getFilterChanges:t=>Ps(e,t),getFilterLogs:t=>s8(e,t),getGasPrice:()=>ef(e),getLogs:t=>cf(e,t),getProof:t=>J8(e,t),estimateMaxPriorityFeePerGas:t=>B4(e,t),fillTransaction:t=>Tg(e,t),getRawTransaction:t=>Y8(e,t),getStorageAt:t=>X8(e,t),getTransaction:t=>Ef(e,t),getTransactionConfirmations:t=>Q8(e,t),getTransactionCount:t=>_g(e,t),getTransactionReceipt:t=>Sf(e,t),multicall:t=>eO(e,t),prepareTransactionRequest:t=>$g(e,t),readContract:t=>De(e,t),sendRawTransaction:t=>C$(e,t),sendRawTransactionSync:t=>AO(e,t),simulate:t=>If(e,t),simulateBlocks:t=>If(e,t),simulateCalls:t=>pO(e,t),simulateContract:t=>O$(e,t),verifyHash:t=>Ms(e,t),verifyMessage:t=>gO(e,t),verifySiweMessage:t=>IO(e,t),verifyTypedData:t=>yO(e,t),uninstallFilter:t=>Bs(e,t),waitForTransactionReceipt:t=>bO(e,t),watchBlockHeaders:t=>xO(e,t),watchBlocks:t=>vO(e,t),watchBlockNumber:t=>Uy(e,t),watchContractEvent:t=>B$(e,t),watchEvent:t=>wO(e,t),watchPendingTransactions:t=>_O(e,t),token:yG(e)}}function yG(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 U$({...e,key:t,name:r,type:"publicClient"}).extend(kO)}function RO({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=ty();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:h8(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Da();Te();var My=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"});}};Wg();var bG=0,TO=new WeakMap;function xG(e){if(!e)return "default";let t=TO.get(e);if(t!==void 0)return t;let r=bG++;return TO.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 My;let P=y8(I,{fetchFn:o,fetchOptions:n,maxResponseBodySize:s,onRequest:u,onResponse:f,timeout:O});return RO({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}.${xG(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 Es({body:q,error:S,url:I});return l},retryCount:N,retryDelay:d,timeout:O,type:"http"},{fetchOptions:n,url:I})}}Si();lr();Un();function $O(e){window.open(e,"_blank","noopener,noreferrer");}function vG(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=cw(e.data.chainId)?.dexscreenerSlug;return t?`https://dexscreener.com/${t}/${e.data.address}`:null}default:return null}}var OO={performAdAction(e){let t=vG(e);t?$O(t):console.warn(`[@adland/react] WebActionAdapter has no web action for ad type "${e.type}"`);},performEmptyAdAction(e,t,r){$O(`${r}/slots/${e}?chain=${t}`);}},Dy=null,wG=Co.isInMiniApp().then(e=>(Dy=e,e)).catch(()=>(Dy=false,false));async function NO(){return Dy!==null?Dy:wG}async function _G(e,t){let r=eI(e,Mn(t));try{await Co.actions.swapToken({buyToken:r});}catch{await Co.actions.viewToken({token:r});}}async function EG(e){if(!await NO())return OO.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 _G(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),OO.performAdAction(e);}}async function SG(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await NO()?Co.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var PO={performAdAction:EG,performEmptyAdAction:SG};var BO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};ur();var CO={block:P4({format(e){return {transactions:e.transactions?.map(r=>{if(typeof r=="string")return r;let o=$i(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:N4({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:z$({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();Re();function IG(e,t){return kG(e)?AG(e):l8(e,t)}var zO={transaction:IG};function AG(e){RG(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?mt(s):"0x",c?mt(c):"0x",n?mt(n):"0x",i?"0x1":"0x",r??"0x"];return st(["0x7e",go(u)])}function kG(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function RG(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:BO,formatters:CO,serializers:zO};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 OG=xi(["function module() view returns (address)"]),NG=xi(["function tokenURI(address slot) view returns (string)"]),PG="0x0000000000000000000000000000000000000000",BG="https://ipfs-gateway.econome.studio";function CG(e,t){return `${(t??BG).replace(/\/$/,"")}/ipfs/${e}`}var zG={[Op.id]:Op,[Pp.id]:Pp};function UO(e,t,r=zG){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return xE({chain:o,transport:vE(t),batch:{multicall:true}})}function LG(e){return e.startsWith("ipfs://")?e.slice(7):e.startsWith("Qm")||e.startsWith("bafy")?e:null}var UG=/^data:application\/json(;[^,]*)?,/i;function MG(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 DG(e){return qe(qr(e))}var MO=async(e,t)=>{if(!e)throw new Error("NO_AD");if(UG.test(e)){let s,a=MG(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:DG(a)}}let r=LG(e),o=r?CG(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}},DO=async(e,t)=>{let r;try{r=await e.readContract({address:t,abi:OG,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===PG?"":e.readContract({address:r,abi:NG,functionName:"tokenURI",args:[t]})};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))"]);var HG={link:["image","icon"],miniapp:["imageUrl","icon"],token:["logoURI"],farcasterProfile:["pfpUrl"],cast:["image","pfpUrl"],tweet:["image","pfpUrl"]};var VG=["image","imageUrl","icon","pfpUrl","logoURI"];var ZG=["title","displayName","username","name","symbol"],GG=["description","bio","text","name"];function wE(e){return {...e.data,...e.metadata??{}}}function jO(e){if(!e)return null;let t=wE(e);for(let r of HG[e.type]??VG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function _E(e){if(!e)return null;let t=wE(e);for(let r of ZG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function FO(e){if(!e)return null;let t=wE(e),r=_E(e);for(let o of GG){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}function HO(e){return e?e.type:null}var ic=new Set,LO=1e3;function qG(e){return e==="view"?"view":"click"}function EE(e){return e.endpoint??sw}function VO(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 ZO(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${EE(t)}/track`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:qG(e),slot:t.slot,cid:t.cid??null,domain:window.location.hostname,auth:r,...o?{token:o}:{}}),keepalive:!0}).catch(()=>{});}catch{}}async function GO(e,t){typeof window>"u"||(VO(e,t),(t.consent??"granted")==="granted"&&await ZO(e,t));}async function WG(e,t,r){let o=e.auth??"none",n=null;o==="farcaster"&&e.getAuthToken&&(n=await e.getAuthToken());try{return (await fetch(`${EE(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 KG(e,t,r){let o=false;return (e.consent??"granted")==="granted"&&(o=t?await WG(e,t,r):false,o||await ZO("view",e)),VO("view",e,o),o}function qO(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),GO("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function WO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(ic.has(r))return;let o=fetch(`${EE(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 KG(t,c,LO);},LO);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}function SE(e,t){return GO(e,t)}var JG={link:"Link",cast:"Cast",miniapp:"Mini App",token:"Token",farcasterProfile:"Profile"};function IE(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function AE(e){return e.replace(/"/g,"&quot;").replace(/</g,"&lt;")}var kE=`
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,n0);n.push(Nr.default.encode(xe.Buffer.from(s)));}return e.populate(ld.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 i0=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(n0));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,n0)));let i=u0.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]=c6(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, yR.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=ck();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(Fh(Ie),ne(),e=>new Ie(e)),wR=Hh([ne(),ct("base64")]),f6=Jc(Fh(xe.Buffer),wR,e=>xe.Buffer.from(e[0],"base64"));function _R(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(dk())})})])}var cF=_R(Oa());function rt(e){return Jc(_R(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 f0(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=x_(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:Hh([ne(),ct("base64")])}))),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(Ar([yF,bF]))}))))}));co(W({byIdentity:x_(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:f6,rentEpoch:U()})})));var r6=W({program:ne(),parsed:Oa(),space:U()});co(ue(W({pubkey:xt,account:W({executable:so(),owner:xt,lamports:U(),data:r6,rentEpoch:U()})})));co(ue(W({lamports:U(),address:xt})));var l6=W({executable:so(),owner:xt,lamports:U(),data:f6,rentEpoch:U()});W({pubkey:xt,account:l6});var vF=Jc(Ar([Fh(xe.Buffer),r6]),Ar([wR,r6]),e=>Array.isArray(e)?Kc(e,f6):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:f0(l6)});var _F=W({pubkey:xt,account:l6});W({subscription:U(),result:f0(_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:f0(Ar([hF,gF]))});W({subscription:U(),result:U()});W({pubkey:ne(),gossip:fe(ne()),tpu:fe(ne()),rpc:fe(ne()),version:fe(ne())});var fR=W({votePubkey:ne(),nodePubkey:ne(),activatedStake:U(),epochVoteAccount:so(),epochCredits:ue(Hh([U(),U(),U()])),commission:U(),lastVote:U(),rootSlot:fe(U())});rt(W({current:ue(fR),delinquent:ue(fR)}));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 ER=W({accountKey:xt,writableIndexes:ue(U()),readonlyIndexes:ue(U())}),d6=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(ER))})}),SR=W({pubkey:xt,signer:so(),writable:so(),source:me(Ar([ct("transaction"),ct("lookupTable")]))}),IR=W({accountKeys:ue(SR),signatures:ue(ne())}),AR=W({parsed:Oa(),program:ne(),programId:xt}),kR=W({accounts:ue(xt),data:ne(),programId:xt}),kF=Ar([kR,AR]),RF=Ar([W({parsed:Oa(),program:ne(),programId:ne()}),W({accounts:ue(ne()),data:ne(),programId:ne()})]),RR=Jc(kF,RF,e=>"accounts"in e?Kc(e,kR):Kc(e,AR)),TR=W({signatures:ue(ne()),message:W({accountKeys:ue(SR),instructions:ue(RR),recentBlockhash:ne(),addressTableLookups:me(fe(ue(ER)))})}),s0=W({accountIndex:U(),mint:ne(),owner:me(ne()),programId:me(ne()),uiTokenAmount:xF}),$R=W({writable:ue(xt),readonly:ue(xt)}),l0=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(s0))),postTokenBalances:me(fe(ue(s0))),loadedAddresses:me($R),computeUnitsConsumed:me(U()),costUnits:me(U())}),p6=W({err:Ba,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(RR)})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(s0))),postTokenBalances:me(fe(ue(s0))),loadedAddresses:me($R),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:d6,meta:fe(l0),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:IR,meta:fe(l0),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:TR,meta:fe(p6),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:IR,meta:fe(p6),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:d6,meta:fe(l0)})),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(l0),blockTime:me(fe(U())),transaction:d6,version:me(ru)})));rt(fe(W({slot:U(),transaction:TR,meta:fe(p6),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:f0($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 OR;new Ie("StakeConfig11111111111111111111111111111111");var pd=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;}};OR=pd;pd.default=new OR(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 NR=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 PR(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function CF(e){let t=Buffer.from(e,"base64");return u0.deserializeMessageVersion(t)==="legacy"?i0.deserialize(t):tt.from(t)}function BR(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:PR(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:PR(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:CF(i)}}}}var CR=({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 zR="0.1.1";function LR(){return zR}var d0=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@${LR()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return UR(this,t)}};function UR(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?UR(e.cause,t):t?null:e}function p0(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===md.code?md:n===Ed.code?Ed:n===wd.code?wd:n===xd.code?xd:n===_d.code?_d:n===bd.code?bd:n===Sd.code?Sd:n===hd.code?hd:n===gd.code?gd:n===yd.code?yd:n===vd.code?vd: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;}},md=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(md,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var hd=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(hd,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var gd=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(gd,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var yd=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(yd,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var bd=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(bd,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var xd=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(xd,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var vd=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(vd,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var wd=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(wd,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var _d=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(_d,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var Ed=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(Ed,"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 Sd=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(Sd,"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;}},Id=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(Id,"code",{enumerable:true,configurable:true,writable:true,value:4001});var Ad=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(Ad,"code",{enumerable:true,configurable:true,writable:true,value:4100});var kd=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(kd,"code",{enumerable:true,configurable:true,writable:true,value:4200});var Rd=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(Rd,"code",{enumerable:true,configurable:true,writable:true,value:4900});var Td=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(Td,"code",{enumerable:true,configurable:true,writable:true,value:4901});function DR(){let e=new rd.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 jR(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new m6;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?p0(n):n}}}var m6=class extends d0{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function FR(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 VR=Symbol("Comlink.proxy"),VF=Symbol("Comlink.endpoint"),ZF=Symbol("Comlink.releaseProxy"),h6=Symbol("Comlink.finalizer"),h0=Symbol("Comlink.thrown"),ZR=e=>typeof e=="object"&&e!==null||typeof e=="function",GF={canHandle:e=>ZR(e)&&e[VR],serialize(e){let{port1:t,port2:r}=new MessageChannel;return qR(e,t),[r,[r]]},deserialize(e){return e.start(),y6(e)}},qF={canHandle:e=>ZR(e)&&h0 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}},GR=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 qR(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;qR(e,h),u=QF(g,[g]);}break;case "RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[h0]:0};}Promise.resolve(u).catch(f=>({value:f,[h0]:0})).then(f=>{let[d,g]=b0(f);t.postMessage(Object.assign(Object.assign({},d),{id:i}),g),s==="RELEASE"&&(t.removeEventListener("message",o),WR(t),h6 in e&&typeof e[h6]=="function"&&e[h6]());}).catch(f=>{let[d,g]=b0({value:new TypeError("Unserializable return value"),[h0]:0});t.postMessage(Object.assign(Object.assign({},d),{id:i}),g);});}),t.start&&t.start();}function KF(e){return e.constructor.name==="MessagePort"}function WR(e){KF(e)&&e.close();}function y6(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);}}),g6(e,r,[],t)}function m0(e){if(e)throw new Error("Proxy has been released and is not useable")}function KR(e){return nu(e,new Map,{type:"RELEASE"}).then(()=>{WR(e);})}var g0=new WeakMap,y0="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(g0.get(e)||0)-1;g0.set(e,t),t===0&&KR(e);});function JF(e,t){let r=(g0.get(t)||0)+1;g0.set(t,r),y0&&y0.register(e,t,e);}function YF(e){y0&&y0.unregister(e);}function g6(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(m0(n),a===ZF)return ()=>{YF(i),KR(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 g6(e,t,[...r,a])},set(s,a,c){m0(n);let[u,f]=b0(c);return nu(e,t,{type:"SET",path:[...r,a].map(d=>d.toString()),value:u},f).then(La)},apply(s,a,c){m0(n);let u=r[r.length-1];if(u===VF)return nu(e,t,{type:"ENDPOINT"}).then(La);if(u==="bind")return g6(e,t,r.slice(0,-1));let[f,d]=HR(c);return nu(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:f},d).then(La)},construct(s,a){m0(n);let[c,u]=HR(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 HR(e){let t=e.map(b0);return [t.map(r=>r[0]),XF(t.map(r=>r[1]))]}var JR=new WeakMap;function QF(e,t){return JR.set(e,t),e}function eH(e){return Object.assign(e,{[VR]:true})}function YR(e,t=globalThis,r="*"){return {postMessage:(o,n)=>e.postMessage(o,r,n),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function b0(e){for(let[t,r]of GR)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},JR.get(e)||[]]}function La(e){switch(e.type){case "HANDLER":return GR.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);}},XR=typeof window>"u"?rH:window?.ReactNativeWebView?nH:YR(window?.parent??window);var ve=y6(XR);var b6=DR(),oH=FR();function iH({code:e,details:t}){switch(e){case 4001:return new Id;case 4100:return new Ad;case 4200:return new kd;case 4900:return new Rd;case 4901:return new Td;default:return new Bo(e,t??"Unknown provider RPC error")}}var ou=jR({...b6,async request(e){let t=oH.prepare(e);try{let r=await ve.ethProviderRequestV2(t).then(o=>p0(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 QR(){try{let e=await ve.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:ou}catch{return ou}}function eT(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;b6.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&eT({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;b6.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"&&eT({info:t.info,provider:ou});}}));new TextEncoder;var x0=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},tT=e=>{let t=e;t instanceof Uint8Array&&(t=x0.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 rT=tT;function uH(e){return typeof e=="object"&&e!==null}function x6(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 v6=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;}};v6.code="ERR_JWT_CLAIM_VALIDATION_FAILED";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_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};w6.code="ERR_JWT_EXPIRED";var _6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};_6.code="ERR_JOSE_ALG_NOT_ALLOWED";var E6=class extends xr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};E6.code="ERR_JOSE_NOT_SUPPORTED";var S6=class extends xr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};S6.code="ERR_JWE_DECRYPTION_FAILED";var I6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};I6.code="ERR_JWE_INVALID";var A6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};A6.code="ERR_JWS_INVALID";var uo=class extends xr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};uo.code="ERR_JWT_INVALID";var k6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};k6.code="ERR_JWK_INVALID";var R6=class extends xr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};R6.code="ERR_JWKS_INVALID";var T6=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";}};T6.code="ERR_JWKS_NO_MATCHING_KEY";var $6=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";}};$6.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var O6=class extends xr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};O6.code="ERR_JWKS_TIMEOUT";var N6=class extends xr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};N6.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function nT(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=rT(t);}catch{throw new uo("Failed to base64url decode the payload")}let n;try{n=JSON.parse(x0.decode(o));}catch{throw new uo("Failed to parse the decoded payload as JSON")}if(!x6(n))throw new uo("Invalid JWT Claims Set");return n}function oT(e){return nT(e)}var v0=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 v0{constructor({status:t}){super(`Request failed with status ${t}`),this.name="RequestFailedError";}},w0=class extends v0{constructor(t){super(t),this.name="InvalidToken";}};async function iT({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 sT({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 w0(o.message??"unknown");return {token:o.token}}function aT(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function cT(e={}){let t=aT(e);return {generateNonce:()=>iT(t),verifySiwf:r=>sT(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 uT(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 _0=(()=>{let e,t;async function r(o){let n=cT({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await ve.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=uT(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:oT(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 Mk;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:fT}=ve,lT;fT&&(lT=NR(BR(fT)));async function P6(){let e;try{e=await ve.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return lT}var dT=null;async function hH(e=1e3){if(dT===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&&(dT=true),t}var pT=async()=>{let e=await ve.addFrame();if(e.result)return e.result;throw e.error.type==="invalid_domain_manifest"?new kl.InvalidDomainManifest:e.error.type==="rejected_by_user"?new kl.RejectedByUser:new Error("Unreachable")},mT={...vr,getCapabilities:ve.getCapabilities,getChains:ve.getChains,isInMiniApp:hH,context:ve.context,back:CR({miniAppHost:ve,emitter:vr}),quickAuth:_0,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:pT,addMiniApp:pT,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:P6,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 _0.getToken(e)}},wallet:{ethProvider:ou,getEthereumProvider:QR,getSolanaProvider:P6},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=mT;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 V0=class extends L{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"});}};lr();Mn();rp();ki();wi();ws();var u4="/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 Kd(r,{docsPath:u4});n=c;}if(n.type!=="event")throw new Kd(void 0,{docsPath:u4});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)=>f4({param:f,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?f4({param:f,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=nr(n);return [bs(s),...i]}function f4({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 V0(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 X0(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 gg({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 k4(e){let t=qe(`0x${e.substring(4)}`).substring(26);return xs(`0x${t}`)}po();sn();ur();Ae();async function T4({hash:e,signature:t}){let r=St(e)?e:ft(e),{secp256k1:o}=await Promise.resolve().then(()=>(cd(),oR));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=R4(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=R4(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function R4(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 up({hash:e,signature:t}){return k4(await T4({hash:e,signature:t}))}cn();lr();Ae();Te();rg();lr();Ae();function yo(e,t="hex"){let r=$4(e),o=yu(new Uint8Array(r.length));return r.encode(o),t==="hex"?Le(o.bytes):o.bytes}function $4(e){return Array.isArray(e)?rV(e.map(t=>$4(t))):nV(e)}function rV(e){let t=e.reduce((n,i)=>n+i.length,0),r=O4(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=O4(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 O4(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 N4(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 xg(e){let{authorization:t,signature:r}=e;return up({hash:N4(t),signature:r??t})}Ae();ag();vu();Te();Fn();var vg=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();fp();function P4(e,{docsPath:t,...r}){let o=(()=>{let n=Ts(e,r);return n instanceof Gn?e:n})();return new vg(o,{docsPath:t,...r})}lp();Xu();_g();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"});}},Eg=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();wg();ur();wg();var s2={"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?s2[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 C4=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 z4=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 L4(e,t){return a2(e,t)}async function a2(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 U4(e,t){return Sg(e,t)}async function Sg(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 a2(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 Ig(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 M4(e,t){let r=t,o=Hl(St(e,{strict:false})?qr(e):e);return r==="bytes"?o:ft(o)}function D4(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=M4(t,"bytes");return n.set([r],0),o==="bytes"?n:Le(n)}function Ag(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(D4({commitment:i,to:o,version:r}));return n}Te();var kg=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"});}},Rg=class extends L{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},Tg=class extends L{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};rg();sn();lr();Ae();function j4(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 kg({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 $g(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??j4({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}np();Za();Fn();function Og(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 lg({transaction:e})}ln();Zo();Fn();fp();function F4(e,{docsPath:t,...r}){let o=(()=>{let n=Ts(e,r);return n instanceof Gn?e:n})();return new pg(o,{docsPath:t,...r})}lp();Xu();Za();ur();async function af(e){let t=await e.request({method:"eth_chainId"},{dedupe:true});return vt(t)}async function Ng(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 F4(D,{...t,chain:e.chain})}}var fV=["blobVersionedHashes","chainId","fees","gas","nonce","type"],H4=new Map,c2=new Uo(128);async function Pg(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:c2.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,Ng,"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 c2.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")})&&c2.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,Ig,"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=Ag({commitments:S,to:"hex"});r.blobVersionedHashes=N;}if(s.includes("sidecars")){let N=of({blobs:x,commitments:S,kzg:k}),z=$g({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=Og(r);}catch{let S=H4.get(e.uid);typeof S>"u"&&(S=typeof(await O())?.baseFeePerGas=="bigint",H4.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 Sg(e,{block:S,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<z)throw new Eg({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 Sg(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 xg({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 Pg(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 P4(s,{...t,account:n,chain:e.chain})}}async function V4(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();rp();Et();X6();sn();rp();ap();wi();var Z4="/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 L0({docsPath:Z4});let c=t.find(T=>T.type==="event"&&s===bs(nr(T)));if(!(c&&"name"in c)||c.type!=="event")throw new U0(s,{docsPath:Z4});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 Bg(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 B$(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 ty=new Map,N2=new Map,CV=0;function Ur(e,t,r){let o=++CV,n=()=>ty.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){ty.delete(e),N2.delete(e);return}ty.set(e,d);},s=()=>{let f=n();if(!f.some(g=>g.id===o))return;let d=N2.get(e);if(f.length===1&&d){let g=d();g instanceof Promise&&g.catch(()=>{});}i();},a=n();if(ty.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"&&N2.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 C$(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 z$(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=C$(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 z$(()=>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 L$(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,X0,"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,Bg,"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 wp=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 U$(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}ho();function _p(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();wg();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?s2[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}var M$=Yu("transactionReceipt",tc);ln();var ry=256,ny;function oy(e=11){if(!ny||ry+e>256*2){ny="",ry=0;for(let t=0;t<256;t++)ny+=(256+Math.random()*256|0).toString(16).substring(1);}return ny.substring(ry,ry+++e)}function j$(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:oy(),...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];D$(H)&&D$(Z)&&(D[q]={...H,...Z});}return Object.assign(D,{extend:S(D)})}}return Object.assign(O,{extend:S(O)})}function D$(e){if(typeof e!="object"||e===null)return false;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Ep(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();tp();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}vp();cn();lr();Ae();Mn();po();function iy(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 Sp(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=iy(r[o]),i=n?qr(n):qe(Un(r[o]),"bytes");t=qe(Mo([t,i]),"bytes");}return Le(t)}lr();function F$(e){return `[${e.slice(2)}]`}lr();Ae();Mn();function H$(e){let t=new Uint8Array(32).fill(0);return e?iy(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(F$(H$(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 V$(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?[Sp(i),BigInt(n)]:[Sp(i)];try{let g=lt({abi:v2,functionName:"addr",args:d}),h={address:u,abi:Gg,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:v2,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 sy=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"});}},ay=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 Z$(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function P2({uri:e,gatewayUrls:t}){let r=HV.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=Z$(t?.ipfs,"https://ipfs.io"),n=Z$(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 B2(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new sy({data:e});return e.image||e.image_url||e.image_data}async function G$({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await cy({gatewayUrls:e,uri:B2(r)})}catch{throw new vf({uri:t})}}async function cy({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=P2({uri:t,gatewayUrls:e});if(o||await ZV(r))return r;throw new vf({uri:t})}function q$(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 W$(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 ay({namespace:t.namespace})}async function K$(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?GV(e,{gatewayUrls:t,record:r}):cy({uri:r,gatewayUrls:t})}async function GV(e,{gatewayUrls:t,record:r}){let o=q$(r),n=await W$(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:a}=P2({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 cy({uri:B2(f),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),G$({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}mn();Pi();jn();Qa();Ae();vp();async function uy(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:Gg,args:[ft(xf(i)),lt({abi:x2,functionName:"text",args:[Sp(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:x2,functionName:"text",data:h[0]});return x===""?null:x}catch(d){if(a)throw d;if(bf(d))return null;throw d}}async function J$(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await oe(e,uy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await K$(e,{record:c,gatewayUrls:o})}catch{return null}}mn();Qa();vp();async function Y$(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:g$,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 X$(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();I2();lp();Xu();Za();async function Q$(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 Kg(k,{...t,account:w,chain:e.chain})}}async function e8(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 fy(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 ly(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 t8(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 r8(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}Ae();async function n8(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 o8(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 i8(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 dy=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 s8(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 dy({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 a8(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 c8(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 a8(s)}async function u8(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();tp();Ae();i2();Lo();Te();Wg();Zo();Sn();sn();vs();ur();function f8(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})}py(e);}function l8(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 Rg({hash:r,size:o});if(n!==1)throw new Tg({hash:r,version:n})}}py(e);}function py(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 d8(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 p8(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 Ip(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 dg({storageKey:n[i]});if(!Me(o,{strict:false}))throw new nt({address:o});t.push([o,n]);}return t}function m8(e,t){let r=Og(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;f8(e);let g=Ip(f),h=h8(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;l8(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=Ag({commitments:N})),typeof h>"u"){let z=of({blobs:O,commitments:N,kzg:S});h=$g({blobs:O,commitments:N,proofs:z});}}let x=Ip(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;py(e);let d=Ip(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;d8(e);let f=Ip(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;p8(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 fg({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 h8(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 g8({address:e,authorization:t,signature:r}){return zr(Dn(e),await xg({authorization:t,signature:r}))}Te();Ha();Fu();ho();np();var my=new Uo(8192);function y8(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(my.get(r))return my.get(r);let o=e().finally(()=>my.delete(r));return my.set(r,o),o}Pr();function b8(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 y8(()=>_p(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 bg(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 x8(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 C2=tZ();var rZ=10485760;function v8(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 x8(async({signal:P})=>{let O={...d,body:Array.isArray(i)?Be(i.map(C=>({jsonrpc:"2.0",id:C.id??C2.take(),...C}))):Be({jsonrpc:"2.0",id:i.id??C2.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 cp({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 cp?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 w8=`Ethereum Signed Message:
69
+ `;cn();sn();Ae();function _8(e){let t=typeof e=="string"?Si(e):typeof e.raw=="string"?e.raw:Le(e.raw),r=Si(`${w8}${$e(t)}`);return Mo([r,t])}function hy(e,t){return qe(_8(e),t)}ki();cn();Ae();Mn();Et();Lo();Pr();Te();var gy=class extends L{constructor({domain:t}){super(`Invalid domain "${Be(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},yy=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`."]});}},by=class extends L{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}},xy=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();q6();function E8(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 xy({type:f});let h=f.match(Y0);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(a4);if(x){let[k,T]=x;if(T&&$e(d)!==Number.parseInt(T,10))throw new j0({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 gy({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new yy({primaryType:o,types:n})}function S8({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 by({type:e})}function I8(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:S8({domain:t}),...e.types};E8({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(sZ({domain:t,types:n})),o!=="EIP712Domain"&&i.push(A8({data:r,primaryType:o,types:n})),qe(Mo(i))}function sZ({domain:e,types:t}){return A8({data:e,primaryType:"EIP712Domain",types:t})}function A8({data:e,primaryType:t,types:r}){let o=k8({data:e,primaryType:t,types:r});return qe(o)}function k8({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]=T8({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=R8({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 R8({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])R8({primaryType:i.type,types:t},r);return r}function T8({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},qe(k8({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=>T8({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 Op={};Er(Op,{InvalidWrappedSignatureError:()=>By,assert:()=>Cy,from:()=>HZ,magicBytes:()=>aE,suffixParameters:()=>cE,unwrap:()=>J8,validate:()=>ZZ,wrap:()=>VZ});fu();Bs();var vy=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 vy(8192)},wy=uZ.checksum;pn();Jh();Bs();pr();function nc(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=Na(i$(e));return r==="Bytes"?o:It(o)}Bs();pn();pr();mp();function $8(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 _y({prefix:o,cause:new M2});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new _y({prefix:o,cause:new U2});return}throw new L2({publicKey:e})}function O8(e){let t=(()=>{if(gp(e))return N8(e);if(l$(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 $8(t),t}function lZ(e){return N8(It(e))}function N8(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new D2({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 j2(e,t={}){$8(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 L2=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"});}},_y=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"});}},U2=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"});}},M2=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"});}},D2=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 Ey({address:e,cause:new F2});if(r){if(e.toLowerCase()===e)return;if(Sy(e)!==e)throw new Ey({address:e,cause:new H2})}}function Sy(e){if(wy.has(e))return wy.get(e);oc(e,{strict:false});let t=e.substring(2).toLowerCase(),r=nc(s$(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 wy.set(e,n),n}function pZ(e,t={}){let{checksum:r=false}=t;return oc(e),r?Sy(e):e}function B8(e,t={}){let r=nc(`0x${j2(e).slice(4)}`).substring(26);return pZ(`0x${r}`,t)}function Iy(e,t={}){let{strict:r=true}=t??{};try{return oc(e,{strict:r}),!0}catch{return false}}var Ey=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"});}},F2=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"});}},H2=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 C8=/^(.*)\[([0-9]*)\]$/,z8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ky=/^(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)?$/,V2=2n**256n-1n;function ic(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=q2(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 U8=32,Z2=32;function mZ(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?Sy(i):i)(It(a$(o,-20))),32]}function hZ(e,t,r){let{checksumAddress:o,length:n,staticPosition:i}=r;if(n===null){let c=qo(e.readBytes(Z2)),u=i+c,f=u+U8;e.setPosition(u);let d=qo(e.readBytes(U8)),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(Z2)),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 [u$(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?c$(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(Z2)),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=f$(h2(i));return e.setPosition(t+32),[s,32]}function M8({checksumAddress:e,parameters:t,values:r}){let o=[];for(let n=0;n<t.length;n++)o.push(G2({checksumAddress:e,parameter:t[n],value:r[n]}));return o}function G2({checksumAddress:e=false,parameter:t,value:r}){let o=t,n=q2(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"]=ky.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 Ry(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 $y(e);if(!i&&e.length!==o)throw new Ty({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=G2({checksumAddress:r,parameter:n,value:e[c]});u.dynamic&&(s=true),a.push(u);}if(i||s){let c=Ry(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 Ap({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(Hg(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 hp({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=G2({checksumAddress:r,parameter:a,value:e[c]});i.push(u),u.dynamic&&(n=true);}return {dynamic:n,encoded:n?Ry(i):ht(...i.map(({encoded:s})=>s))}}function q2(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=q2(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 K2({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new W2({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Oy({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 Oy({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 Ny(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 Oy=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"});}},W2=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"});}},K2=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=Ny(i);if(Wn(i)===0&&e.length>0)throw new X2;if(Wn(i)&&Wn(i)<32)throw new Y2({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 Py({expectedLength:e.length,givenLength:t.length});let n=M8({checksumAddress:o,parameters:e,values:t}),i=Ry(n);return i.length===0?"0x":i}function J2(e,t){if(e.length!==t.length)throw new Py({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(J2.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(Hg(o),n?32:1);let i=r.match(ky);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(z8);if(s){let[c,u]=s;if(Number.parseInt(u,10)!==(o.length-2)/2)throw new Ap({expectedSize:Number.parseInt(u,10),value:o});return Wo(o,n?32:0)}let a=r.match(C8);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;})(J2||(J2={}));function Rp(e){return Array.isArray(e)&&typeof e[0]=="string"?Zd(e):typeof e=="string"?Zd(e):e}var Y2=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"});}},X2=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"});}},Ty=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"});}},Ap=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"});}},Py=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"});}},$y=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=F8(e),n=Ny(new Uint8Array(o.length));return o.encode(n),r==="Hex"?It(n.bytes):n.bytes}function j8(e,t={}){let{as:r="Hex"}=t;return $Z(e,{as:r})}function F8(e){return Array.isArray(e)?OZ(e.map(t=>F8(t))):NZ(e)}function OZ(e){let t=e.reduce((n,i)=>n+i.length,0),r=H8(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=H8(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 H8(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();mp();function nE(e,t={}){let{recovered:r}=t;if(typeof e.r>"u")throw new Tp({signature:e});if(typeof e.s>"u")throw new Tp({signature:e});if(r&&typeof e.yParity>"u")throw new Tp({signature:e});if(e.r<0n||e.r>V2)throw new eE({value:e.r});if(e.s<0n||e.s>V2)throw new tE({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new $p({value:e.yParity})}function BZ(e){return V8(It(e))}function V8(e){if(e.length!==130&&e.length!==132)throw new Q2({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 sE(n)}catch{throw new $p({value:n})}})();return typeof o>"u"?{r:t,s:r}:{r:t,s:r,yParity:o}}function oE(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return iE(e)}function iE(e){let t=typeof e=="string"?V8(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 nE(t),t}function CZ(e){return {r:e.r,s:e.s,yParity:sE(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=sE(r)),typeof o!="number")throw new $p({value:e.yParity});return o})();return {r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Z8(e){let{r:t,s:r,yParity:o}=e;return [o?"0x01":"0x",t===0n?"0x":y2(Ve(t)),r===0n?"0x":y2(Ve(r))]}function sE(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 rE({value:e})}var Q2=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"});}},Tp=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"});}},eE=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"});}},tE=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"});}},$p=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"});}},rE=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 q8(e,t={}){return typeof e.chainId=="string"?LZ(e):{...e,...t.signature}}function LZ(e){let{address:t,chainId:r,nonce:o}=e,n=oE(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function W8(e){return UZ(e,{presign:true})}function UZ(e,t={}){let{presign:r}=t;return nc(ht("0x05",j8(MZ(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function MZ(e){let{address:t,chainId:r,nonce:o}=e,n=oE(e);return [r?Ve(r):"0x",t,o?Ve(o):"0x",...n?Z8(n):[]]}pn();pr();cd();pr();function K8(e){return B8(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 O8(a)}var aE="0x8010801080108010801080108010801080108010801080108010801080108010",cE=Rp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Cy(e){if(typeof e=="string"){if(pt(e,-32)!==aE)throw new By(e)}else nE(e.authorization);}function HZ(e){return typeof e=="string"?J8(e):e}function J8(e){Cy(e);let t=Dg(pt(e,-64,-32)),r=pt(e,-t-64,-64),o=pt(e,0,-t-64),[n,i,s]=sc(cE,r);return {authorization:q8({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;Cy(e);let o=K8({payload:W8(e.authorization),signature:iE(e.authorization)}),n=Ds(cE,[{...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,aE)}function ZZ(e){try{return Cy(e),!0}catch{return false}}var By=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"});}};sg();function Y8(e,t){return ig(e,t)}function GZ(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function X8(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 Q8(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 X8(c)}Fn();async function eO(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 tO(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 rO(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();yp();Et();Te();Ti();Pi();jn();Qa();Yg();Pr();async function nO(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}b2();ln();Et();Ti();Zo();Pi();jn();cn();Ae();fp();Xu();_g();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?Vg(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 Ly(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 zy(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Iy(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)=>zy(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=>zy(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function uE(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 uE(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")?Iy(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Iy(r[o],{strict:false}):false)return s}}function Rf(e,t={}){let{prepare:r=true}=t,o=Array.isArray(e)?Vd(e):typeof e=="string"?Vd(e):e;return {...o,...r?{hash:js(o)}:{}}}function Tf(e,t,r){let{args:o=[],prepare:n=true}=r??{},i=gp(t,{strict:false}),s=e.filter(u=>i?u.type==="function"||u.type==="error"?lE(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?zy(d,h):false})){if(a&&"inputs"in a&&a.inputs){let d=uE(u.inputs,a.inputs,o);if(d)throw new fE({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 lE(...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 Ly(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 fE=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Ly(Ua(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Ly(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 oO(...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 iO(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 sO(e,t={}){return Rf(e,t)}function aO(e){return js(e)}pr();function cO(...e){let[t,r,o={}]=(()=>{if(Array.isArray(e[0])){let[i,s,a,c]=e;return [pE(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 [pE(u,f,{args:d}),d]}let[a,c]=e;return [a,c]})(),{overloads:o}=t,n=o?pE([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 pE(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 lE(e)}ln();var Uy="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",My="0x0000000000000000000000000000000000000000";yp();Te();Ti();Zo();Qd();ur();zs();var tG="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",hO="0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033",rG=0x00000000000000000000000000000000deadbeefn,nG=aO(sO("event Transfer(address indexed from, address indexed to, uint256 value)")),uO=ac("function balanceOf(address) returns (uint256)"),fO=ac("function decimals() returns (uint256)"),lO=ac("function tokenURI(uint256) returns (string)"),dO=ac("function symbol() returns (string)"),oG=ac("function query(address target, bytes data)");async function gO(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?oO(iO("constructor(bytes, bytes)"),{bytecode:qg,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!==Uy&&p!==My):[],k=sG([...u?[u.address]:[],...w,...i?.map(({address:p})=>p)??[]]),T=[{address:k,code:hO}],[P,O]=await Promise.all([s?Promise.all([mO(e,{account:u.address,...h,data:f,stateOverride:i}),...w.map(p=>mO(e,{account:u.address,address:p,...h,data:Fs(uO,[u.address]),staticCallAddress:k,stateOverride:i}))]):[],kf(e,{...h,blocks:[{calls:[...n,{to:My}].map(p=>({...p,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:f}]},{calls:w.map(p=>({to:k,data:Np(p,Fs(uO,[u.address]))})),stateOverrides:T},{calls:w.map(p=>({to:k,data:Np(p,Fs(fO))})),stateOverrides:T},{calls:w.map(p=>({to:k,data:Np(p,Fs(lO,[0n]))})),stateOverrides:T},{calls:w.map(p=>({to:k,data:Np(p,Fs(dO))})),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=>pO(p)?ut(p.data):null),l=N?.calls??[],m=z?.calls??[],b=[...l,...m].map(p=>pO(p)?ut(p.data):null),v=(C?.calls??[]).map(p=>mE(p,fO)),E=(q?.calls??[]).map(p=>mE(p,dO)),R=(D?.calls??[]).map(p=>mE(p,lO)),_=[];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:Uy,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 Np(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()===Uy?false:o.topics[1]?.toLowerCase()===r||o.topics[2]?.toLowerCase()===r).map(o=>o.address.toLowerCase())}function pO(e){return e.status==="success"&&/^0x[\da-f]{64}$/i.test(e.data)}function mE(e,t){if(e.status==="failure"||e.data==="0x")return null;try{return cO(t,e.data)}catch{return null}}async function mO(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?My:r,data:o?Np(o,s):s,stateOverride:o&&a?[...c??[],{address:a,code:hO}]: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 Pp={};Er(Pp,{InvalidWrappedSignatureError:()=>Dy,assert:()=>gE,from:()=>uG,magicBytes:()=>hE,universalSignatureValidatorAbi:()=>cG,universalSignatureValidatorBytecode:()=>aG,unwrap:()=>yO,validate:()=>lG,wrap:()=>fG});pn();pr();var hE="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 gE(e){if(pt(e,-32)!==hE)throw new Dy(e)}function uG(e){return typeof e=="string"?yO(e):e}function yO(e){gE(e);let[t,r,o]=sc(Rp("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(Rp("address, bytes, bytes"),[o,t,r]),hE)}function lG(e){try{return gE(e),!0}catch{return false}}var Dy=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();yp();Ti();S2();jn();Ai();Ps();cn();po();ur();Ae();cd();ur();lr();function bO({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?bO(u):Le(u)})();try{if(a==="eoa")try{if(zr(Dn(r),await up({hash:n,signature:c})))return !0}catch{}return Op.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 up({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}=Op.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 g8({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:w2,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||Pp.validate(s)?s:Pp.wrap({data:n,signature:s,to:o}))(),f=a?{to:a,data:lt({abi:_2,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:xp({abi:_2,args:[r,i,u],bytecode:v$}),...c},{data:d}=await oe(e,hn,"call")(f).catch(g=>{throw g instanceof Ss?new Ui:g});if(F6(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:w2,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 xO(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=hy(r);return oe(e,Hs,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function vO(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...f}=t,d=I8({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();A2();Pr();ur();Pr();function jy(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 wO(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}=Jg(),S=c?setTimeout(()=>{k?.(),w?.(),O(new hg({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,jy,"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 _p(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 _p(()=>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 _O(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 EO(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 SO(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,fy,"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 IO(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,ly,"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 yE(e){return yG(e)?new Date(e):new Date(Number.NaN)}function AO(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:yE(i)}:{},...s?{issuedAt:yE(s)}:{},...a?{notBefore:yE(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 kO(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 RO(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,f=AO(n);if(!f.address||!kO({address:r,domain:o,message:f,nonce:i,scheme:s,time:c}))return false;let g=hy(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:Y8(e,t)}}function Mi(e,t){let{decimals:r,token:o}=t,n=xE(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 xE(e,t){let r=e.tokens,o=e.chain?.id;if(!r||o===void 0)return;let n=vG(r,t);if(n)return bE(n,o);if(Me(t,{strict:false}))for(let i of r){let s=bE(i,o);if(s&&zr(s.address,t))return s}}function bE(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=bE(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 TO(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 mg({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 wp;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 wp;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 vE(e,t){let{token:r,...o}=t,{address:n}=Mi(e,{token:r}),i=xE(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 $O(e){return {call:t=>hn(e,t),createAccessList:t=>Q$(e,t),createBlockFilter:()=>e8(e),createContractEventFilter:t=>X0(e,t),createEventFilter:t=>fy(e,t),createPendingTransactionFilter:()=>ly(e),estimateContractGas:t=>V4(e,t),estimateGas:t=>cf(e,t),getBalance:t=>t8(e,t),getBlobBaseFee:()=>r8(e),getBlock:t=>er(e,t),getBlockNumber:t=>Yn(e,t),getBlockReceipts:t=>n8(e,t),getBlockTransactionCount:t=>o8(e,t),getBytecode:t=>rc(e,t),getChainId:()=>af(e),getCode:t=>rc(e,t),getContractEvents:t=>Bg(e,t),getDelegation:t=>i8(e,t),getEip712Domain:t=>s8(e,t),getEnsAddress:t=>V$(e,t),getEnsAvatar:t=>J$(e,t),getEnsName:t=>Y$(e,t),getEnsResolver:t=>X$(e,t),getEnsText:t=>uy(e,t),getFeeHistory:t=>c8(e,t),estimateFeesPerGas:t=>U4(e,t),getFilterChanges:t=>Ls(e,t),getFilterLogs:t=>u8(e,t),getGasPrice:()=>rf(e),getLogs:t=>ff(e,t),getProof:t=>Q8(e,t),estimateMaxPriorityFeePerGas:t=>L4(e,t),fillTransaction:t=>Ng(e,t),getRawTransaction:t=>eO(e,t),getStorageAt:t=>tO(e,t),getTransaction:t=>If(e,t),getTransactionConfirmations:t=>rO(e,t),getTransactionCount:t=>Ig(e,t),getTransactionReceipt:t=>Af(e,t),multicall:t=>nO(e,t),prepareTransactionRequest:t=>Pg(e,t),readContract:t=>De(e,t),sendRawTransaction:t=>U$(e,t),sendRawTransactionSync:t=>TO(e,t),simulate:t=>kf(e,t),simulateBlocks:t=>kf(e,t),simulateCalls:t=>gO(e,t),simulateContract:t=>B$(e,t),verifyHash:t=>Hs(e,t),verifyMessage:t=>xO(e,t),verifySiweMessage:t=>RO(e,t),verifyTypedData:t=>vO(e,t),uninstallFilter:t=>Us(e,t),waitForTransactionReceipt:t=>wO(e,t),watchBlockHeaders:t=>_O(e,t),watchBlocks:t=>EO(e,t),watchBlockNumber:t=>jy(e,t),watchContractEvent:t=>L$(e,t),watchEvent:t=>SO(e,t),watchPendingTransactions:t=>IO(e,t),token:_G(e)}}function _G(e){return {getAllowance:Ep(e,Pf),getBalance:Ep(e,Bf),getMetadata:Ep(e,vE),getTotalSupply:Ep(e,Cf)}}function wE(e){let{key:t="public",name:r="Public Client"}=e;return j$({...e,key:t,name:r,type:"publicClient"}).extend($O)}function Fy({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=oy();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:b8(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Zo();Fu();function _E(e,t={}){let{key:r="fallback",name:o="Fallback",rank:n=false,shouldThrow:i=OO,retryCount:s,retryDelay:a}=t;return(({chain:c,pollingInterval:u=4e3,timeout:f,...d})=>{let g=e,h=()=>{},x=Fy({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 OO(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 Hy=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"});}};Yg();var SG=0,NO=new WeakMap;function IG(e){if(!e)return "default";let t=NO.get(e);if(t!==void 0)return t;let r=SG++;return NO.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 Hy;let N=v8(S,{fetchFn:o,fetchOptions:n,maxResponseBodySize:s,onRequest:u,onResponse:f,timeout:O});return Fy({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 PO(e){window.open(e,"_blank","noopener,noreferrer");}var BO={performAdAction(e){let t=lw(e);t?PO(t):console.warn(`[@adland/react] WebActionAdapter has no web action for ad type "${e.type}"`);},performEmptyAdAction(e,t,r){PO(`${r}/slots/${e}?chain=${t}`);}},Vy=null,AG=Co.isInMiniApp().then(e=>(Vy=e,e)).catch(()=>(Vy=false,false));async function CO(){return Vy!==null?Vy:AG}async function kG(e,t){let r=nI(e,Dn(t));try{await Co.actions.swapToken({buyToken:r});}catch{await Co.actions.viewToken({token:r});}}async function RG(e){if(!await CO())return BO.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),BO.performAdAction(e);}}async function TG(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await CO()?Co.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var zO={performAdAction:RG,performEmptyAdAction:TG};var LO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};ur();var UO={block:z4({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:C4({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:M$({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):m8(e,t)}var MO={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:LO,formatters:UO,serializers:MO};var Bp=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:{[Bp]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Bp]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Bp]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Bp]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Bp});_f({...Uf,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var Cp=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:{[Cp]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Cp]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Cp]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Cp]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:true,sourceId:Cp});_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)"]),jO="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)?_E([zf(`${Al}/rpc/${e}`),zf()],{rank:false}):zf()}function FO(e,t,r=DG){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return wE({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 EE=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}},HO=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===jO?"":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 VO=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===jO||!n.uri)return null;try{return {...await EE(n.uri,r?.gateway),slot:n.slot}}catch(i){if(i instanceof Error&&i.message==="NO_AD")return null;throw i}};var XG={link:["image","icon"],miniapp:["imageUrl","icon"],token:["logoURI"],farcasterProfile:["pfpUrl"],cast:["image","pfpUrl"],tweet:["image","pfpUrl"]};var QG=["image","imageUrl","icon","pfpUrl","logoURI"];var eq=["title","displayName","username","name","symbol"],tq=["description","bio","text","name"];function SE(e){return {...e.data,...e.metadata??{}}}function ZO(e){if(!e)return null;let t=SE(e);for(let r of XG[e.type]??QG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function IE(e){if(!e)return null;let t=SE(e);for(let r of eq){let o=t[r];if(typeof o=="string"&&o)return o}return null}function GO(e){if(!e)return null;let t=SE(e),r=IE(e);for(let o of tq){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}function qO(e){return e?e.type:null}var cc=new Set,DO=1e3;function rq(e){return e==="view"?"view":"click"}function AE(e){return e.endpoint??Al}function WO(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 KO(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${AE(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 JO(e,t){typeof window>"u"||(WO(e,t),(t.consent??"granted")==="granted"&&await KO(e,t));}async function nq(e,t,r){let o=e.auth??"none",n=null;o==="farcaster"&&e.getAuthToken&&(n=await e.getAuthToken());try{return (await fetch(`${AE(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 oq(e,t,r){let o=false;return (e.consent??"granted")==="granted"&&(o=t?await nq(e,t,r):false,o||await KO("view",e)),WO("view",e,o),o}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=new IntersectionObserver(n=>{for(let i of n)i.isIntersecting&&!cc.has(r)&&(cc.add(r),JO("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function XO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(cc.has(r))return;let o=fetch(`${AE(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(cc.has(r)||n)continue;n=setTimeout(async()=>{if(cc.has(r))return;cc.add(r),i.disconnect();let c=await o;await oq(t,c,DO);},DO);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}function kE(e,t){return JO(e,t)}var iq={link:"Link",cast:"Cast",miniapp:"Mini App",token:"Token",farcasterProfile:"Profile"};function RE(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function TE(e){return e.replace(/"/g,"&quot;").replace(/</g,"&lt;")}var $E=`
72
72
  :host { display: block; }
73
73
  * { box-sizing: border-box; }
74
74
  .adland-card {
@@ -136,7 +136,7 @@ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.
136
136
  color: var(--adland-label, #9ca3af);
137
137
  }
138
138
  .adland-empty { justify-content: center; color: var(--adland-muted, #6b7280); }
139
- `;function KO(e){let t=jO(e),r=_E(e),o=FO(e),n=HO(e),i=n?JG[n]??n:"";return `<div part="card" class="adland-card">${t?`<img part="media" class="adland-media" src="${AE(t)}" alt="" loading="lazy" />`:""}<div part="body" class="adland-body">${r?`<p part="title" class="adland-title">${IE(r)}</p>`:""}${o?`<p part="description" class="adland-description">${IE(o)}</p>`:""}</div>${i?`<span part="badge" class="adland-badge">${IE(i)}</span>`:""}<span part="label" class="adland-label">Ad</span></div>`}function JO(){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 YO(e){if(e.type==="link"||e.type==="miniapp"){let t=e.data.url;return typeof t=="string"?t:null}return null}var YG=["--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 XO(e){let t=getComputedStyle(e),r="";for(let o of YG){let n=t.getPropertyValue(o).trim();n&&(r+=`${o}:${n};`);}return r}var QO=8453,XG="https://0xslots.org/app",QG="68px";function eN(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;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")??QO)||QO}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");if(!o)return {data:null,cid:null};let n=UO(this.chainId(),this.attr("rpc-url")),i=await DO(n,o);return i?MO(i,this.attr("gateway")):{data:null,cid:null}}async render(){let r=++this.renderToken;this.teardown(),this.style.minHeight||(this.style.minHeight=QG);let o;try{o=await this.loadAd();}catch{o={data:null,cid:null};}if(r!==this.renderToken||!this.isConnected)return;let n=o.data?KO(o.data):JO();(this.attr("render-mode")==="inline"?"inline":"isolated")==="inline"?this.renderInline(n,o.data):this.renderIsolated(n,o.data);let s=this.attr("slot");if(s){let a=this.attr("verified")!=null?WO:qO;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>${kE}</style>${r}`,n.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderIsolated(r,o){this.replaceChildren();let n=o?YO(o):this.emptyUrl(),i=n?`<a href="${AE(n)}" target="_blank" rel="noopener noreferrer" style="display:block;text-decoration:none;color:inherit">${r}</a>`:r,s=XO(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}${kE}</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")??XG}emptyUrl(){let r=this.attr("slot");return r?`${this.baseLink()}/slots/${r}?chain=${this.chainId()}`:null}handleClick(r,o){let n=this.attr("slot"),i={chainId:this.chainId(),placement:this.attr("placement"),endpoint:this.attr("endpoint"),consent:this.attr("consent")};r?(n&&SE("click",{slot:n,cid:null,...i}),o||e.performAdAction(r)):n&&(SE("click-empty",{slot:n,...i}),o||e.performEmptyAdAction(n,this.chainId(),this.baseLink()));}}}function tN(e,t="adland-slot"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,eN(e));}tN(PO);
139
+ `;function QO(e){let t=ZO(e),r=IE(e),o=GO(e),n=qO(e),i=n?iq[n]??n:"";return `<div part="card" class="adland-card">${t?`<img part="media" class="adland-media" src="${TE(t)}" alt="" loading="lazy" />`:""}<div part="body" class="adland-body">${r?`<p part="title" class="adland-title">${RE(r)}</p>`:""}${o?`<p part="description" class="adland-description">${RE(o)}</p>`:""}</div>${i?`<span part="badge" class="adland-badge">${RE(i)}</span>`:""}<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){if(e.type==="link"||e.type==="miniapp"){let t=e.data.url;return typeof t=="string"?t:null}return null}var sq=["--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 rN(e){let t=getComputedStyle(e),r="";for(let o of sq){let n=t.getPropertyValue(o).trim();n&&(r+=`${o}:${n};`);}return r}var nN=8453,aq="https://0xslots.org/app",cq="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;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=FO(this.chainId(),this.attr("rpc-url"));if(!o&&n){let a=await VO(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 HO(i,o);return s?EE(s,this.attr("gateway")):{data:null,cid:null}}async render(){let r=++this.renderToken;this.teardown(),this.style.minHeight||(this.style.minHeight=cq);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();(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?XO:YO;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>${$E}</style>${r}`,n.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderIsolated(r,o){this.replaceChildren();let n=o?tN(o):this.emptyUrl(),i=n?`<a href="${TE(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}${$E}</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")??aq}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&&kE("click",{slot:n,cid:null,...i}),o||e.performAdAction(r)):n&&(kE("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(zO);
140
140
  /*! Bundled license information:
141
141
 
142
142
  ieee754/index.js: