@fern-api/typescript-dynamic-snippets 3.85.2 → 3.87.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.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Gt=Object.defineProperty;var ms=Object.getOwnPropertyDescriptor;var hs=Object.getOwnPropertyNames;var ys=Object.prototype.hasOwnProperty;var gs=(n,e,t)=>e in n?Gt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ot=(n,e,t)=>()=>{if(t)throw t[0];try{return n&&(e=n(n=0)),e}catch(r){throw t=[r],r}};var pe=(n,e)=>{for(var t in e)Gt(n,t,{get:e[t],enumerable:!0})},xs=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of hs(e))!ys.call(n,a)&&a!==t&&Gt(n,a,{get:()=>e[a],enumerable:!(r=ms(e,a))||r.enumerable});return n};var vs=n=>xs(Gt({},"__esModule",{value:!0}),n);var I=(n,e,t)=>gs(n,typeof e!="symbol"?e+"":e,t);var p=ot(()=>{"use strict"});var v={};pe(v,{_debugEnd:()=>On,_debugProcess:()=>Bn,_events:()=>Yn,_eventsCount:()=>Kn,_exiting:()=>mn,_fatalExceptions:()=>Sn,_getActiveHandles:()=>xn,_getActiveRequests:()=>gn,_kill:()=>bn,_linkedBinding:()=>dn,_maxListeners:()=>Jn,_preload_modules:()=>Zn,_rawDebug:()=>ln,_startProfilerIdleNotifier:()=>Ln,_stopProfilerIdleNotifier:()=>Pn,_tickCallback:()=>Fn,abort:()=>$n,addListener:()=>Xn,allowedNodeEnvironmentFlags:()=>En,arch:()=>Jr,argv:()=>Xr,argv0:()=>zn,assert:()=>An,binding:()=>nn,browser:()=>cn,chdir:()=>on,config:()=>hn,cpuUsage:()=>Yt,cwd:()=>sn,debugPort:()=>qn,default:()=>oi,dlopen:()=>yn,domain:()=>fn,emit:()=>ni,emitWarning:()=>rn,env:()=>Kr,execArgv:()=>Qr,execPath:()=>Wn,exit:()=>kn,features:()=>Rn,hasUncaughtExceptionCaptureCallback:()=>Cn,hrtime:()=>Jt,kill:()=>Tn,listeners:()=>si,memoryUsage:()=>_n,moduleLoadList:()=>pn,nextTick:()=>Zr,off:()=>ei,on:()=>we,once:()=>Qn,openStdin:()=>In,pid:()=>Dn,platform:()=>Yr,ppid:()=>Vn,prependListener:()=>ii,prependOnceListener:()=>ai,reallyExit:()=>vn,release:()=>un,removeAllListeners:()=>ri,removeListener:()=>ti,resourceUsage:()=>wn,setSourceMapsEnabled:()=>Gn,setUncaughtExceptionCaptureCallback:()=>Nn,stderr:()=>Mn,stdin:()=>Un,stdout:()=>jn,title:()=>Hr,umask:()=>an,uptime:()=>Hn,version:()=>en,versions:()=>tn});function gr(n){throw new Error("Node.js process "+n+" is not supported by JSPM core outside of Node.js")}function bs(){!ut||!Pe||(ut=!1,Pe.length?be=Pe.concat(be):Ht=-1,be.length&&zr())}function zr(){if(!ut){var n=setTimeout(bs,0);ut=!0;for(var e=be.length;e;){for(Pe=be,be=[];++Ht<e;)Pe&&Pe[Ht].run();Ht=-1,e=be.length}Pe=null,ut=!1,clearTimeout(n)}}function Zr(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];be.push(new Gr(n,e)),be.length===1&&!ut&&setTimeout(zr,0)}function Gr(n,e){this.fun=n,this.array=e}function Q(){}function dn(n){gr("_linkedBinding")}function yn(n){gr("dlopen")}function gn(){return[]}function xn(){return[]}function An(n,e){if(!n)throw new Error(e||"assertion error")}function Cn(){return!1}function Hn(){return Se.now()/1e3}function Jt(n){var e=Math.floor((Date.now()-Se.now())*.001),t=Se.now()*.001,r=Math.floor(t)+e,a=Math.floor(t%1*1e9);return n&&(r=r-n[0],a=a-n[1],a<0&&(r--,a+=yr)),[r,a]}function we(){return oi}function si(n){return[]}var be,ut,Pe,Ht,Hr,Jr,Yr,Kr,Xr,Qr,en,tn,rn,nn,an,sn,on,un,cn,ln,pn,fn,mn,hn,vn,bn,Yt,wn,_n,Tn,kn,In,En,Rn,Sn,Nn,Fn,Bn,On,Ln,Pn,jn,Mn,Un,$n,Dn,Vn,Wn,qn,zn,Zn,Gn,Se,hr,yr,Jn,Yn,Kn,Xn,Qn,ei,ti,ri,ni,ii,ai,oi,ui=ot(()=>{"use strict";p();f();d();be=[],ut=!1,Ht=-1;Gr.prototype.run=function(){this.fun.apply(null,this.array)};Hr="browser",Jr="x64",Yr="browser",Kr={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Xr=["/usr/bin/node"],Qr=[],en="v16.8.0",tn={},rn=function(n,e){console.warn((e?e+": ":"")+n)},nn=function(n){gr("binding")},an=function(n){return 0},sn=function(){return"/"},on=function(n){},un={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};cn=!0,ln=Q,pn=[];fn={},mn=!1,hn={};vn=Q,bn=Q,Yt=function(){return{}},wn=Yt,_n=Yt,Tn=Q,kn=Q,In=Q,En={};Rn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Sn=Q,Nn=Q;Fn=Q,Bn=Q,On=Q,Ln=Q,Pn=Q,jn=void 0,Mn=void 0,Un=void 0,$n=Q,Dn=2,Vn=1,Wn="/bin/usr/node",qn=9229,zn="node",Zn=[],Gn=Q,Se={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Se.now===void 0&&(hr=Date.now(),Se.timing&&Se.timing.navigationStart&&(hr=Se.timing.navigationStart),Se.now=()=>Date.now()-hr);yr=1e9;Jt.bigint=function(n){var e=Jt(n);return typeof BigInt>"u"?e[0]*yr+e[1]:BigInt(e[0]*yr)+BigInt(e[1])};Jn=10,Yn={},Kn=0;Xn=we,Qn=we,ei=we,ti=we,ri=we,ni=Q,ii=we,ai=we;oi={version:en,versions:tn,arch:Jr,platform:Yr,browser:cn,release:un,_rawDebug:ln,moduleLoadList:pn,binding:nn,_linkedBinding:dn,_events:Yn,_eventsCount:Kn,_maxListeners:Jn,on:we,addListener:Xn,once:Qn,off:ei,removeListener:ti,removeAllListeners:ri,emit:ni,prependListener:ii,prependOnceListener:ai,listeners:si,domain:fn,_exiting:mn,config:hn,dlopen:yn,uptime:Hn,_getActiveRequests:gn,_getActiveHandles:xn,reallyExit:vn,_kill:bn,cpuUsage:Yt,resourceUsage:wn,memoryUsage:_n,kill:Tn,exit:kn,openStdin:In,allowedNodeEnvironmentFlags:En,assert:An,features:Rn,_fatalExceptions:Sn,setUncaughtExceptionCaptureCallback:Nn,hasUncaughtExceptionCaptureCallback:Cn,emitWarning:rn,nextTick:Zr,_tickCallback:Fn,_debugProcess:Bn,_debugEnd:On,_startProfilerIdleNotifier:Ln,_stopProfilerIdleNotifier:Pn,stdout:jn,stdin:Un,stderr:Mn,abort:$n,umask:an,chdir:on,cwd:sn,env:Kr,title:Hr,argv:Xr,execArgv:Qr,pid:Dn,ppid:Vn,execPath:Wn,debugPort:qn,hrtime:Jt,argv0:zn,_preload_modules:Zn,setSourceMapsEnabled:Gn}});var d=ot(()=>{"use strict";ui()});function ws(){if(ci)return At;ci=!0,At.byteLength=m,At.toByteArray=k,At.fromByteArray=Y;for(var n=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=r.length;a<o;++a)n[a]=r[a],e[r.charCodeAt(a)]=a;e[45]=62,e[95]=63;function u(C){var j=C.length;if(j%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var D=C.indexOf("=");D===-1&&(D=j);var J=D===j?0:4-D%4;return[D,J]}function m(C){var j=u(C),D=j[0],J=j[1];return(D+J)*3/4-J}function x(C,j,D){return(j+D)*3/4-D}function k(C){var j,D=u(C),J=D[0],re=D[1],H=new t(x(C,J,re)),ne=0,oe=re>0?J-4:J,te;for(te=0;te<oe;te+=4)j=e[C.charCodeAt(te)]<<18|e[C.charCodeAt(te+1)]<<12|e[C.charCodeAt(te+2)]<<6|e[C.charCodeAt(te+3)],H[ne++]=j>>16&255,H[ne++]=j>>8&255,H[ne++]=j&255;return re===2&&(j=e[C.charCodeAt(te)]<<2|e[C.charCodeAt(te+1)]>>4,H[ne++]=j&255),re===1&&(j=e[C.charCodeAt(te)]<<10|e[C.charCodeAt(te+1)]<<4|e[C.charCodeAt(te+2)]>>2,H[ne++]=j>>8&255,H[ne++]=j&255),H}function R(C){return n[C>>18&63]+n[C>>12&63]+n[C>>6&63]+n[C&63]}function P(C,j,D){for(var J,re=[],H=j;H<D;H+=3)J=(C[H]<<16&16711680)+(C[H+1]<<8&65280)+(C[H+2]&255),re.push(R(J));return re.join("")}function Y(C){for(var j,D=C.length,J=D%3,re=[],H=16383,ne=0,oe=D-J;ne<oe;ne+=H)re.push(P(C,ne,ne+H>oe?oe:ne+H));return J===1?(j=C[D-1],re.push(n[j>>2]+n[j<<4&63]+"==")):J===2&&(j=(C[D-2]<<8)+C[D-1],re.push(n[j>>10]+n[j>>4&63]+n[j<<2&63]+"=")),re.join("")}return At}function _s(){if(li)return Kt;li=!0;return Kt.read=function(n,e,t,r,a){var o,u,m=a*8-r-1,x=(1<<m)-1,k=x>>1,R=-7,P=t?a-1:0,Y=t?-1:1,C=n[e+P];for(P+=Y,o=C&(1<<-R)-1,C>>=-R,R+=m;R>0;o=o*256+n[e+P],P+=Y,R-=8);for(u=o&(1<<-R)-1,o>>=-R,R+=r;R>0;u=u*256+n[e+P],P+=Y,R-=8);if(o===0)o=1-k;else{if(o===x)return u?NaN:(C?-1:1)*(1/0);u=u+Math.pow(2,r),o=o-k}return(C?-1:1)*u*Math.pow(2,o-r)},Kt.write=function(n,e,t,r,a,o){var u,m,x,k=o*8-a-1,R=(1<<k)-1,P=R>>1,Y=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=r?0:o-1,j=r?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,u=R):(u=Math.floor(Math.log(e)/Math.LN2),e*(x=Math.pow(2,-u))<1&&(u--,x*=2),u+P>=1?e+=Y/x:e+=Y*Math.pow(2,1-P),e*x>=2&&(u++,x/=2),u+P>=R?(m=0,u=R):u+P>=1?(m=(e*x-1)*Math.pow(2,a),u=u+P):(m=e*Math.pow(2,P-1)*Math.pow(2,a),u=0));a>=8;n[t+C]=m&255,C+=j,m/=256,a-=8);for(u=u<<a|m,k+=a;k>0;n[t+C]=u&255,C+=j,u/=256,k-=8);n[t+C-j]|=D*128},Kt}function di(){if(pi)return je;pi=!0;let n=ws(),e=_s(),t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;je.Buffer=u,je.SlowBuffer=re,je.INSPECT_MAX_BYTES=50;let r=2147483647;je.kMaxLength=r,u.TYPED_ARRAY_SUPPORT=a(),!u.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 a(){try{let c=new Uint8Array(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(c,i),c.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function o(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');let i=new Uint8Array(c);return Object.setPrototypeOf(i,u.prototype),i}function u(c,i,s){if(typeof c=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(c)}return m(c,i,s)}u.poolSize=8192;function m(c,i,s){if(typeof c=="string")return P(c,i);if(ArrayBuffer.isView(c))return C(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(he(c,ArrayBuffer)||c&&he(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(c,SharedArrayBuffer)||c&&he(c.buffer,SharedArrayBuffer)))return j(c,i,s);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let l=c.valueOf&&c.valueOf();if(l!=null&&l!==c)return u.from(l,i,s);let h=D(c);if(h)return h;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return u.from(c[Symbol.toPrimitive]("string"),i,s);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}u.from=function(c,i,s){return m(c,i,s)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function x(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function k(c,i,s){return x(c),c<=0?o(c):i!==void 0?typeof s=="string"?o(c).fill(i,s):o(c).fill(i):o(c)}u.alloc=function(c,i,s){return k(c,i,s)};function R(c){return x(c),o(c<0?0:J(c)|0)}u.allocUnsafe=function(c){return R(c)},u.allocUnsafeSlow=function(c){return R(c)};function P(c,i){if((typeof i!="string"||i==="")&&(i="utf8"),!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);let s=H(c,i)|0,l=o(s),h=l.write(c,i);return h!==s&&(l=l.slice(0,h)),l}function Y(c){let i=c.length<0?0:J(c.length)|0,s=o(i);for(let l=0;l<i;l+=1)s[l]=c[l]&255;return s}function C(c){if(he(c,Uint8Array)){let i=new Uint8Array(c);return j(i.buffer,i.byteOffset,i.byteLength)}return Y(c)}function j(c,i,s){if(i<0||c.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<i+(s||0))throw new RangeError('"length" is outside of buffer bounds');let l;return i===void 0&&s===void 0?l=new Uint8Array(c):s===void 0?l=new Uint8Array(c,i):l=new Uint8Array(c,i,s),Object.setPrototypeOf(l,u.prototype),l}function D(c){if(u.isBuffer(c)){let i=J(c.length)|0,s=o(i);return s.length===0||c.copy(s,0,0,i),s}if(c.length!==void 0)return typeof c.length!="number"||mr(c.length)?o(0):Y(c);if(c.type==="Buffer"&&Array.isArray(c.data))return Y(c.data)}function J(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return c|0}function re(c){return+c!=c&&(c=0),u.alloc(+c)}u.isBuffer=function(i){return i!=null&&i._isBuffer===!0&&i!==u.prototype},u.compare=function(i,s){if(he(i,Uint8Array)&&(i=u.from(i,i.offset,i.byteLength)),he(s,Uint8Array)&&(s=u.from(s,s.offset,s.byteLength)),!u.isBuffer(i)||!u.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===s)return 0;let l=i.length,h=s.length;for(let g=0,_=Math.min(l,h);g<_;++g)if(i[g]!==s[g]){l=i[g],h=s[g];break}return l<h?-1:h<l?1:0},u.isEncoding=function(i){switch(String(i).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!0;default:return!1}},u.concat=function(i,s){if(!Array.isArray(i))throw new TypeError('"list" argument must be an Array of Buffers');if(i.length===0)return u.alloc(0);let l;if(s===void 0)for(s=0,l=0;l<i.length;++l)s+=i[l].length;let h=u.allocUnsafe(s),g=0;for(l=0;l<i.length;++l){let _=i[l];if(he(_,Uint8Array))g+_.length>h.length?(u.isBuffer(_)||(_=u.from(_)),_.copy(h,g)):Uint8Array.prototype.set.call(h,_,g);else if(u.isBuffer(_))_.copy(h,g);else throw new TypeError('"list" argument must be an Array of Buffers');g+=_.length}return h};function H(c,i){if(u.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||he(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let s=c.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&s===0)return 0;let h=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return s;case"utf8":case"utf-8":return fr(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s*2;case"hex":return s>>>1;case"base64":return qr(c).length;default:if(h)return l?-1:fr(c).length;i=(""+i).toLowerCase(),h=!0}}u.byteLength=H;function ne(c,i,s){let l=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((s===void 0||s>this.length)&&(s=this.length),s<=0)||(s>>>=0,i>>>=0,s<=i))return"";for(c||(c="utf8");;)switch(c){case"hex":return as(this,i,s);case"utf8":case"utf-8":return Lr(this,i,s);case"ascii":return ns(this,i,s);case"latin1":case"binary":return is(this,i,s);case"base64":return ts(this,i,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ss(this,i,s);default:if(l)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),l=!0}}u.prototype._isBuffer=!0;function oe(c,i,s){let l=c[i];c[i]=c[s],c[s]=l}u.prototype.swap16=function(){let i=this.length;if(i%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<i;s+=2)oe(this,s,s+1);return this},u.prototype.swap32=function(){let i=this.length;if(i%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<i;s+=4)oe(this,s,s+3),oe(this,s+1,s+2);return this},u.prototype.swap64=function(){let i=this.length;if(i%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<i;s+=8)oe(this,s,s+7),oe(this,s+1,s+6),oe(this,s+2,s+5),oe(this,s+3,s+4);return this},u.prototype.toString=function(){let i=this.length;return i===0?"":arguments.length===0?Lr(this,0,i):ne.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(i){if(!u.isBuffer(i))throw new TypeError("Argument must be a Buffer");return this===i?!0:u.compare(this,i)===0},u.prototype.inspect=function(){let i="",s=je.INSPECT_MAX_BYTES;return i=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(i+=" ... "),"<Buffer "+i+">"},t&&(u.prototype[t]=u.prototype.inspect),u.prototype.compare=function(i,s,l,h,g){if(he(i,Uint8Array)&&(i=u.from(i,i.offset,i.byteLength)),!u.isBuffer(i))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(s===void 0&&(s=0),l===void 0&&(l=i?i.length:0),h===void 0&&(h=0),g===void 0&&(g=this.length),s<0||l>i.length||h<0||g>this.length)throw new RangeError("out of range index");if(h>=g&&s>=l)return 0;if(h>=g)return-1;if(s>=l)return 1;if(s>>>=0,l>>>=0,h>>>=0,g>>>=0,this===i)return 0;let _=g-h,M=l-s,Z=Math.min(_,M),z=this.slice(h,g),G=i.slice(s,l);for(let V=0;V<Z;++V)if(z[V]!==G[V]){_=z[V],M=G[V];break}return _<M?-1:M<_?1:0};function te(c,i,s,l,h){if(c.length===0)return-1;if(typeof s=="string"?(l=s,s=0):s>2147483647?s=2147483647:s<-2147483648&&(s=-2147483648),s=+s,mr(s)&&(s=h?0:c.length-1),s<0&&(s=c.length+s),s>=c.length){if(h)return-1;s=c.length-1}else if(s<0)if(h)s=0;else return-1;if(typeof i=="string"&&(i=u.from(i,l)),u.isBuffer(i))return i.length===0?-1:Or(c,i,s,l,h);if(typeof i=="number")return i=i&255,typeof Uint8Array.prototype.indexOf=="function"?h?Uint8Array.prototype.indexOf.call(c,i,s):Uint8Array.prototype.lastIndexOf.call(c,i,s):Or(c,[i],s,l,h);throw new TypeError("val must be string, number or Buffer")}function Or(c,i,s,l,h){let g=1,_=c.length,M=i.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(c.length<2||i.length<2)return-1;g=2,_/=2,M/=2,s/=2}function Z(G,V){return g===1?G[V]:G.readUInt16BE(V*g)}let z;if(h){let G=-1;for(z=s;z<_;z++)if(Z(c,z)===Z(i,G===-1?0:z-G)){if(G===-1&&(G=z),z-G+1===M)return G*g}else G!==-1&&(z-=z-G),G=-1}else for(s+M>_&&(s=_-M),z=s;z>=0;z--){let G=!0;for(let V=0;V<M;V++)if(Z(c,z+V)!==Z(i,V)){G=!1;break}if(G)return z}return-1}u.prototype.includes=function(i,s,l){return this.indexOf(i,s,l)!==-1},u.prototype.indexOf=function(i,s,l){return te(this,i,s,l,!0)},u.prototype.lastIndexOf=function(i,s,l){return te(this,i,s,l,!1)};function Ya(c,i,s,l){s=Number(s)||0;let h=c.length-s;l?(l=Number(l),l>h&&(l=h)):l=h;let g=i.length;l>g/2&&(l=g/2);let _;for(_=0;_<l;++_){let M=parseInt(i.substr(_*2,2),16);if(mr(M))return _;c[s+_]=M}return _}function Ka(c,i,s,l){return Zt(fr(i,c.length-s),c,s,l)}function Xa(c,i,s,l){return Zt(ls(i),c,s,l)}function Qa(c,i,s,l){return Zt(qr(i),c,s,l)}function es(c,i,s,l){return Zt(ps(i,c.length-s),c,s,l)}u.prototype.write=function(i,s,l,h){if(s===void 0)h="utf8",l=this.length,s=0;else if(l===void 0&&typeof s=="string")h=s,l=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(l)?(l=l>>>0,h===void 0&&(h="utf8")):(h=l,l=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let g=this.length-s;if((l===void 0||l>g)&&(l=g),i.length>0&&(l<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");let _=!1;for(;;)switch(h){case"hex":return Ya(this,i,s,l);case"utf8":case"utf-8":return Ka(this,i,s,l);case"ascii":case"latin1":case"binary":return Xa(this,i,s,l);case"base64":return Qa(this,i,s,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return es(this,i,s,l);default:if(_)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),_=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ts(c,i,s){return i===0&&s===c.length?n.fromByteArray(c):n.fromByteArray(c.slice(i,s))}function Lr(c,i,s){s=Math.min(c.length,s);let l=[],h=i;for(;h<s;){let g=c[h],_=null,M=g>239?4:g>223?3:g>191?2:1;if(h+M<=s){let Z,z,G,V;switch(M){case 1:g<128&&(_=g);break;case 2:Z=c[h+1],(Z&192)===128&&(V=(g&31)<<6|Z&63,V>127&&(_=V));break;case 3:Z=c[h+1],z=c[h+2],(Z&192)===128&&(z&192)===128&&(V=(g&15)<<12|(Z&63)<<6|z&63,V>2047&&(V<55296||V>57343)&&(_=V));break;case 4:Z=c[h+1],z=c[h+2],G=c[h+3],(Z&192)===128&&(z&192)===128&&(G&192)===128&&(V=(g&15)<<18|(Z&63)<<12|(z&63)<<6|G&63,V>65535&&V<1114112&&(_=V))}}_===null?(_=65533,M=1):_>65535&&(_-=65536,l.push(_>>>10&1023|55296),_=56320|_&1023),l.push(_),h+=M}return rs(l)}let Pr=4096;function rs(c){let i=c.length;if(i<=Pr)return String.fromCharCode.apply(String,c);let s="",l=0;for(;l<i;)s+=String.fromCharCode.apply(String,c.slice(l,l+=Pr));return s}function ns(c,i,s){let l="";s=Math.min(c.length,s);for(let h=i;h<s;++h)l+=String.fromCharCode(c[h]&127);return l}function is(c,i,s){let l="";s=Math.min(c.length,s);for(let h=i;h<s;++h)l+=String.fromCharCode(c[h]);return l}function as(c,i,s){let l=c.length;(!i||i<0)&&(i=0),(!s||s<0||s>l)&&(s=l);let h="";for(let g=i;g<s;++g)h+=ds[c[g]];return h}function ss(c,i,s){let l=c.slice(i,s),h="";for(let g=0;g<l.length-1;g+=2)h+=String.fromCharCode(l[g]+l[g+1]*256);return h}u.prototype.slice=function(i,s){let l=this.length;i=~~i,s=s===void 0?l:~~s,i<0?(i+=l,i<0&&(i=0)):i>l&&(i=l),s<0?(s+=l,s<0&&(s=0)):s>l&&(s=l),s<i&&(s=i);let h=this.subarray(i,s);return Object.setPrototypeOf(h,u.prototype),h};function K(c,i,s){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+i>s)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let h=this[i],g=1,_=0;for(;++_<s&&(g*=256);)h+=this[i+_]*g;return h},u.prototype.readUintBE=u.prototype.readUIntBE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let h=this[i+--s],g=1;for(;s>0&&(g*=256);)h+=this[i+--s]*g;return h},u.prototype.readUint8=u.prototype.readUInt8=function(i,s){return i=i>>>0,s||K(i,1,this.length),this[i]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(i,s){return i=i>>>0,s||K(i,2,this.length),this[i]|this[i+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(i,s){return i=i>>>0,s||K(i,2,this.length),this[i]<<8|this[i+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(i,s){return i=i>>>0,s||K(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+this[i+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(i,s){return i=i>>>0,s||K(i,4,this.length),this[i]*16777216+(this[i+1]<<16|this[i+2]<<8|this[i+3])},u.prototype.readBigUInt64LE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let h=s+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24,g=this[++i]+this[++i]*2**8+this[++i]*2**16+l*2**24;return BigInt(h)+(BigInt(g)<<BigInt(32))}),u.prototype.readBigUInt64BE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let h=s*2**24+this[++i]*2**16+this[++i]*2**8+this[++i],g=this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+l;return(BigInt(h)<<BigInt(32))+BigInt(g)}),u.prototype.readIntLE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let h=this[i],g=1,_=0;for(;++_<s&&(g*=256);)h+=this[i+_]*g;return g*=128,h>=g&&(h-=Math.pow(2,8*s)),h},u.prototype.readIntBE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let h=s,g=1,_=this[i+--h];for(;h>0&&(g*=256);)_+=this[i+--h]*g;return g*=128,_>=g&&(_-=Math.pow(2,8*s)),_},u.prototype.readInt8=function(i,s){return i=i>>>0,s||K(i,1,this.length),this[i]&128?(255-this[i]+1)*-1:this[i]},u.prototype.readInt16LE=function(i,s){i=i>>>0,s||K(i,2,this.length);let l=this[i]|this[i+1]<<8;return l&32768?l|4294901760:l},u.prototype.readInt16BE=function(i,s){i=i>>>0,s||K(i,2,this.length);let l=this[i+1]|this[i]<<8;return l&32768?l|4294901760:l},u.prototype.readInt32LE=function(i,s){return i=i>>>0,s||K(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24},u.prototype.readInt32BE=function(i,s){return i=i>>>0,s||K(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]},u.prototype.readBigInt64LE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let h=this[i+4]+this[i+5]*2**8+this[i+6]*2**16+(l<<24);return(BigInt(h)<<BigInt(32))+BigInt(s+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24)}),u.prototype.readBigInt64BE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let h=(s<<24)+this[++i]*2**16+this[++i]*2**8+this[++i];return(BigInt(h)<<BigInt(32))+BigInt(this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+l)}),u.prototype.readFloatLE=function(i,s){return i=i>>>0,s||K(i,4,this.length),e.read(this,i,!0,23,4)},u.prototype.readFloatBE=function(i,s){return i=i>>>0,s||K(i,4,this.length),e.read(this,i,!1,23,4)},u.prototype.readDoubleLE=function(i,s){return i=i>>>0,s||K(i,8,this.length),e.read(this,i,!0,52,8)},u.prototype.readDoubleBE=function(i,s){return i=i>>>0,s||K(i,8,this.length),e.read(this,i,!1,52,8)};function ie(c,i,s,l,h,g){if(!u.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>h||i<g)throw new RangeError('"value" argument is out of bounds');if(s+l>c.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(i,s,l,h){if(i=+i,s=s>>>0,l=l>>>0,!h){let M=Math.pow(2,8*l)-1;ie(this,i,s,l,M,0)}let g=1,_=0;for(this[s]=i&255;++_<l&&(g*=256);)this[s+_]=i/g&255;return s+l},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(i,s,l,h){if(i=+i,s=s>>>0,l=l>>>0,!h){let M=Math.pow(2,8*l)-1;ie(this,i,s,l,M,0)}let g=l-1,_=1;for(this[s+g]=i&255;--g>=0&&(_*=256);)this[s+g]=i/_&255;return s+l},u.prototype.writeUint8=u.prototype.writeUInt8=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,1,255,0),this[s]=i&255,s+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,65535,0),this[s]=i&255,this[s+1]=i>>>8,s+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,65535,0),this[s]=i>>>8,this[s+1]=i&255,s+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,4294967295,0),this[s+3]=i>>>24,this[s+2]=i>>>16,this[s+1]=i>>>8,this[s]=i&255,s+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,4294967295,0),this[s]=i>>>24,this[s+1]=i>>>16,this[s+2]=i>>>8,this[s+3]=i&255,s+4};function jr(c,i,s,l,h){Wr(i,l,h,c,s,7);let g=Number(i&BigInt(4294967295));c[s++]=g,g=g>>8,c[s++]=g,g=g>>8,c[s++]=g,g=g>>8,c[s++]=g;let _=Number(i>>BigInt(32)&BigInt(4294967295));return c[s++]=_,_=_>>8,c[s++]=_,_=_>>8,c[s++]=_,_=_>>8,c[s++]=_,s}function Mr(c,i,s,l,h){Wr(i,l,h,c,s,7);let g=Number(i&BigInt(4294967295));c[s+7]=g,g=g>>8,c[s+6]=g,g=g>>8,c[s+5]=g,g=g>>8,c[s+4]=g;let _=Number(i>>BigInt(32)&BigInt(4294967295));return c[s+3]=_,_=_>>8,c[s+2]=_,_=_>>8,c[s+1]=_,_=_>>8,c[s]=_,s+8}u.prototype.writeBigUInt64LE=Re(function(i,s=0){return jr(this,i,s,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Re(function(i,s=0){return Mr(this,i,s,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(i,s,l,h){if(i=+i,s=s>>>0,!h){let Z=Math.pow(2,8*l-1);ie(this,i,s,l,Z-1,-Z)}let g=0,_=1,M=0;for(this[s]=i&255;++g<l&&(_*=256);)i<0&&M===0&&this[s+g-1]!==0&&(M=1),this[s+g]=(i/_>>0)-M&255;return s+l},u.prototype.writeIntBE=function(i,s,l,h){if(i=+i,s=s>>>0,!h){let Z=Math.pow(2,8*l-1);ie(this,i,s,l,Z-1,-Z)}let g=l-1,_=1,M=0;for(this[s+g]=i&255;--g>=0&&(_*=256);)i<0&&M===0&&this[s+g+1]!==0&&(M=1),this[s+g]=(i/_>>0)-M&255;return s+l},u.prototype.writeInt8=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,1,127,-128),i<0&&(i=255+i+1),this[s]=i&255,s+1},u.prototype.writeInt16LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,32767,-32768),this[s]=i&255,this[s+1]=i>>>8,s+2},u.prototype.writeInt16BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,32767,-32768),this[s]=i>>>8,this[s+1]=i&255,s+2},u.prototype.writeInt32LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,2147483647,-2147483648),this[s]=i&255,this[s+1]=i>>>8,this[s+2]=i>>>16,this[s+3]=i>>>24,s+4},u.prototype.writeInt32BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),this[s]=i>>>24,this[s+1]=i>>>16,this[s+2]=i>>>8,this[s+3]=i&255,s+4},u.prototype.writeBigInt64LE=Re(function(i,s=0){return jr(this,i,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Re(function(i,s=0){return Mr(this,i,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ur(c,i,s,l,h,g){if(s+l>c.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("Index out of range")}function $r(c,i,s,l,h){return i=+i,s=s>>>0,h||Ur(c,i,s,4),e.write(c,i,s,l,23,4),s+4}u.prototype.writeFloatLE=function(i,s,l){return $r(this,i,s,!0,l)},u.prototype.writeFloatBE=function(i,s,l){return $r(this,i,s,!1,l)};function Dr(c,i,s,l,h){return i=+i,s=s>>>0,h||Ur(c,i,s,8),e.write(c,i,s,l,52,8),s+8}u.prototype.writeDoubleLE=function(i,s,l){return Dr(this,i,s,!0,l)},u.prototype.writeDoubleBE=function(i,s,l){return Dr(this,i,s,!1,l)},u.prototype.copy=function(i,s,l,h){if(!u.isBuffer(i))throw new TypeError("argument should be a Buffer");if(l||(l=0),!h&&h!==0&&(h=this.length),s>=i.length&&(s=i.length),s||(s=0),h>0&&h<l&&(h=l),h===l||i.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(l<0||l>=this.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),i.length-s<h-l&&(h=i.length-s+l);let g=h-l;return this===i&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,l,h):Uint8Array.prototype.set.call(i,this.subarray(l,h),s),g},u.prototype.fill=function(i,s,l,h){if(typeof i=="string"){if(typeof s=="string"?(h=s,s=0,l=this.length):typeof l=="string"&&(h=l,l=this.length),h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!u.isEncoding(h))throw new TypeError("Unknown encoding: "+h);if(i.length===1){let _=i.charCodeAt(0);(h==="utf8"&&_<128||h==="latin1")&&(i=_)}}else typeof i=="number"?i=i&255:typeof i=="boolean"&&(i=Number(i));if(s<0||this.length<s||this.length<l)throw new RangeError("Out of range index");if(l<=s)return this;s=s>>>0,l=l===void 0?this.length:l>>>0,i||(i=0);let g;if(typeof i=="number")for(g=s;g<l;++g)this[g]=i;else{let _=u.isBuffer(i)?i:u.from(i,h),M=_.length;if(M===0)throw new TypeError('The value "'+i+'" is invalid for argument "value"');for(g=0;g<l-s;++g)this[g+s]=_[g%M]}return this};let at={};function dr(c,i,s){at[c]=class extends s{constructor(){super(),Object.defineProperty(this,"message",{value:i.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(h){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:h,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}dr("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),dr("ERR_INVALID_ARG_TYPE",function(c,i){return`The "${c}" argument must be of type number. Received type ${typeof i}`},TypeError),dr("ERR_OUT_OF_RANGE",function(c,i,s){let l=`The value of "${c}" is out of range.`,h=s;return Number.isInteger(s)&&Math.abs(s)>2**32?h=Vr(String(s)):typeof s=="bigint"&&(h=String(s),(s>BigInt(2)**BigInt(32)||s<-(BigInt(2)**BigInt(32)))&&(h=Vr(h)),h+="n"),l+=` It must be ${i}. Received ${h}`,l},RangeError);function Vr(c){let i="",s=c.length,l=c[0]==="-"?1:0;for(;s>=l+4;s-=3)i=`_${c.slice(s-3,s)}${i}`;return`${c.slice(0,s)}${i}`}function os(c,i,s){st(i,"offset"),(c[i]===void 0||c[i+s]===void 0)&&Et(i,c.length-(s+1))}function Wr(c,i,s,l,h,g){if(c>s||c<i){let _=typeof i=="bigint"?"n":"",M;throw i===0||i===BigInt(0)?M=`>= 0${_} and < 2${_} ** ${(g+1)*8}${_}`:M=`>= -(2${_} ** ${(g+1)*8-1}${_}) and < 2 ** ${(g+1)*8-1}${_}`,new at.ERR_OUT_OF_RANGE("value",M,c)}os(l,h,g)}function st(c,i){if(typeof c!="number")throw new at.ERR_INVALID_ARG_TYPE(i,"number",c)}function Et(c,i,s){throw Math.floor(c)!==c?(st(c,s),new at.ERR_OUT_OF_RANGE("offset","an integer",c)):i<0?new at.ERR_BUFFER_OUT_OF_BOUNDS:new at.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${i}`,c)}let us=/[^+/0-9A-Za-z-_]/g;function cs(c){if(c=c.split("=")[0],c=c.trim().replace(us,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function fr(c,i){i=i||1/0;let s,l=c.length,h=null,g=[];for(let _=0;_<l;++_){if(s=c.charCodeAt(_),s>55295&&s<57344){if(!h){if(s>56319){(i-=3)>-1&&g.push(239,191,189);continue}else if(_+1===l){(i-=3)>-1&&g.push(239,191,189);continue}h=s;continue}if(s<56320){(i-=3)>-1&&g.push(239,191,189),h=s;continue}s=(h-55296<<10|s-56320)+65536}else h&&(i-=3)>-1&&g.push(239,191,189);if(h=null,s<128){if((i-=1)<0)break;g.push(s)}else if(s<2048){if((i-=2)<0)break;g.push(s>>6|192,s&63|128)}else if(s<65536){if((i-=3)<0)break;g.push(s>>12|224,s>>6&63|128,s&63|128)}else if(s<1114112){if((i-=4)<0)break;g.push(s>>18|240,s>>12&63|128,s>>6&63|128,s&63|128)}else throw new Error("Invalid code point")}return g}function ls(c){let i=[];for(let s=0;s<c.length;++s)i.push(c.charCodeAt(s)&255);return i}function ps(c,i){let s,l,h,g=[];for(let _=0;_<c.length&&!((i-=2)<0);++_)s=c.charCodeAt(_),l=s>>8,h=s%256,g.push(h),g.push(l);return g}function qr(c){return n.toByteArray(cs(c))}function Zt(c,i,s,l){let h;for(h=0;h<l&&!(h+s>=i.length||h>=c.length);++h)i[h+s]=c[h];return h}function he(c,i){return c instanceof i||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===i.name}function mr(c){return c!==c}let ds=(function(){let c="0123456789abcdef",i=new Array(256);for(let s=0;s<16;++s){let l=s*16;for(let h=0;h<16;++h)i[l+h]=c[s]+c[h]}return i})();function Re(c){return typeof BigInt>"u"?fs:c}function fs(){throw new Error("BigInt not supported")}return je}var At,ci,Kt,li,je,pi,fi=ot(()=>{"use strict";p();f();d();At={},ci=!1;Kt={},li=!1;je={},pi=!1});var Me,b,Qc,el,mi=ot(()=>{"use strict";p();f();d();fi();Me=di();Me.Buffer;Me.SlowBuffer;Me.INSPECT_MAX_BYTES;Me.kMaxLength;b=Me.Buffer,Qc=Me.INSPECT_MAX_BYTES,el=Me.kMaxLength});var f=ot(()=>{"use strict";mi()});var $c={};pe($c,{DynamicSnippetsGenerator:()=>pr});module.exports=vs($c);p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();var Ts=typeof global=="object"&&global&&global.Object===Object&&global,hi=Ts;var ks=typeof self=="object"&&self&&self.Object===Object&&self,Is=hi||ks||Function("return this")(),yi=Is;var Es=yi.Symbol,_e=Es;p();f();d();var gi=Object.prototype,As=gi.hasOwnProperty,Rs=gi.toString,Rt=_e?_e.toStringTag:void 0;function Ss(n){var e=As.call(n,Rt),t=n[Rt];try{n[Rt]=void 0;var r=!0}catch{}var a=Rs.call(n);return r&&(e?n[Rt]=t:delete n[Rt]),a}var xi=Ss;p();f();d();var Ns=Object.prototype,Cs=Ns.toString;function Fs(n){return Cs.call(n)}var vi=Fs;var Bs="[object Null]",Os="[object Undefined]",bi=_e?_e.toStringTag:void 0;function Ls(n){return n==null?n===void 0?Os:Bs:bi&&bi in Object(n)?xi(n):vi(n)}var wi=Ls;p();f();d();function Ps(n){return n!=null&&typeof n=="object"}var _i=Ps;var js="[object Symbol]";function Ms(n){return typeof n=="symbol"||_i(n)&&wi(n)==js}var Ti=Ms;p();f();d();p();f();d();function Us(n,e){for(var t=-1,r=n==null?0:n.length,a=Array(r);++t<r;)a[t]=e(n[t],t,n);return a}var ki=Us;p();f();d();var $s=Array.isArray,Ii=$s;var Ds=1/0,Ei=_e?_e.prototype:void 0,Ai=Ei?Ei.toString:void 0;function Ri(n){if(typeof n=="string")return n;if(Ii(n))return ki(n,Ri)+"";if(Ti(n))return Ai?Ai.call(n):"";var e=n+"";return e=="0"&&1/n==-Ds?"-0":e}var Si=Ri;p();f();d();function Vs(n){return n==null?"":Si(n)}var Ne=Vs;p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();function Ws(n,e,t){var r=-1,a=n.length;e<0&&(e=-e>a?0:a+e),t=t>a?a:t,t<0&&(t+=a),a=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(a);++r<a;)o[r]=n[r+e];return o}var Ni=Ws;function qs(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:Ni(n,e,t)}var Ci=qs;p();f();d();var zs="\\ud800-\\udfff",Zs="\\u0300-\\u036f",Gs="\\ufe20-\\ufe2f",Hs="\\u20d0-\\u20ff",Js=Zs+Gs+Hs,Ys="\\ufe0e\\ufe0f",Ks="\\u200d",Xs=RegExp("["+Ks+zs+Js+Ys+"]");function Qs(n){return Xs.test(n)}var Xt=Qs;p();f();d();p();f();d();function eo(n){return n.split("")}var Fi=eo;p();f();d();var Bi="\\ud800-\\udfff",to="\\u0300-\\u036f",ro="\\ufe20-\\ufe2f",no="\\u20d0-\\u20ff",io=to+ro+no,ao="\\ufe0e\\ufe0f",so="["+Bi+"]",xr="["+io+"]",vr="\\ud83c[\\udffb-\\udfff]",oo="(?:"+xr+"|"+vr+")",Oi="[^"+Bi+"]",Li="(?:\\ud83c[\\udde6-\\uddff]){2}",Pi="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="\\u200d",ji=oo+"?",Mi="["+ao+"]?",co="(?:"+uo+"(?:"+[Oi,Li,Pi].join("|")+")"+Mi+ji+")*",lo=Mi+ji+co,po="(?:"+[Oi+xr+"?",xr,Li,Pi,so].join("|")+")",fo=RegExp(vr+"(?="+vr+")|"+po+lo,"g");function mo(n){return n.match(fo)||[]}var Ui=mo;function ho(n){return Xt(n)?Ui(n):Fi(n)}var $i=ho;function yo(n){return function(e){e=Ne(e);var t=Xt(e)?$i(e):void 0,r=t?t[0]:e.charAt(0),a=t?Ci(t,1).join(""):e.slice(1);return r[n]()+a}}var Di=yo;var go=Di("toUpperCase"),Ue=go;function xo(n){return Ue(Ne(n).toLowerCase())}var Vi=xo;p();f();d();p();f();d();function vo(n,e,t,r){var a=-1,o=n==null?0:n.length;for(r&&o&&(t=n[++a]);++a<o;)t=e(t,n[a],a,n);return t}var Wi=vo;p();f();d();p();f();d();p();f();d();function bo(n){return function(e){return n?.[e]}}var qi=bo;var wo={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_o=qi(wo),zi=_o;var To=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ko="\\u0300-\\u036f",Io="\\ufe20-\\ufe2f",Eo="\\u20d0-\\u20ff",Ao=ko+Io+Eo,Ro="["+Ao+"]",So=RegExp(Ro,"g");function No(n){return n=Ne(n),n&&n.replace(To,zi).replace(So,"")}var Zi=No;p();f();d();p();f();d();var Co=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Fo(n){return n.match(Co)||[]}var Gi=Fo;p();f();d();var Bo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Oo(n){return Bo.test(n)}var Hi=Oo;p();f();d();var Qi="\\ud800-\\udfff",Lo="\\u0300-\\u036f",Po="\\ufe20-\\ufe2f",jo="\\u20d0-\\u20ff",Mo=Lo+Po+jo,ea="\\u2700-\\u27bf",ta="a-z\\xdf-\\xf6\\xf8-\\xff",Uo="\\xac\\xb1\\xd7\\xf7",$o="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Do="\\u2000-\\u206f",Vo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ra="A-Z\\xc0-\\xd6\\xd8-\\xde",Wo="\\ufe0e\\ufe0f",na=Uo+$o+Do+Vo,ia="['\u2019]",Ji="["+na+"]",qo="["+Mo+"]",aa="\\d+",zo="["+ea+"]",sa="["+ta+"]",oa="[^"+Qi+na+aa+ea+ta+ra+"]",Zo="\\ud83c[\\udffb-\\udfff]",Go="(?:"+qo+"|"+Zo+")",Ho="[^"+Qi+"]",ua="(?:\\ud83c[\\udde6-\\uddff]){2}",ca="[\\ud800-\\udbff][\\udc00-\\udfff]",ct="["+ra+"]",Jo="\\u200d",Yi="(?:"+sa+"|"+oa+")",Yo="(?:"+ct+"|"+oa+")",Ki="(?:"+ia+"(?:d|ll|m|re|s|t|ve))?",Xi="(?:"+ia+"(?:D|LL|M|RE|S|T|VE))?",la=Go+"?",pa="["+Wo+"]?",Ko="(?:"+Jo+"(?:"+[Ho,ua,ca].join("|")+")"+pa+la+")*",Xo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",eu=pa+la+Ko,tu="(?:"+[zo,ua,ca].join("|")+")"+eu,ru=RegExp([ct+"?"+sa+"+"+Ki+"(?="+[Ji,ct,"$"].join("|")+")",Yo+"+"+Xi+"(?="+[Ji,ct+Yi,"$"].join("|")+")",ct+"?"+Yi+"+"+Ki,ct+"+"+Xi,Qo,Xo,aa,tu].join("|"),"g");function nu(n){return n.match(ru)||[]}var da=nu;function iu(n,e,t){return n=Ne(n),e=t?void 0:e,e===void 0?Hi(n)?da(n):Gi(n):n.match(e)||[]}var fa=iu;var au="['\u2019]",su=RegExp(au,"g");function ou(n){return function(e){return Wi(fa(Zi(e).replace(su,"")),n,"")}}var ma=ou;var uu=ma(function(n,e,t){return e=e.toLowerCase(),n+(t?Vi(e):e)}),St=uu;p();f();d();function q(n){throw new Error("Unexpected value: "+JSON.stringify(n))}p();f();d();function Nt(n){return Object.keys(n)}p();f();d();p();f();d();p();f();d();var Ct=v.env.FERN_STACK_TRACK?.toLowerCase()??"",ye=Ct!==""&&Ct!=="0"&&Ct!=="false",br=["single","multiline","box"].includes(Ct)?Ct:"single";ye&&(Error.stackTraceLimit=50);var cu=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),lu=new Set(["stacktrace"]);function er({maxFrames:n=50,skip:e=0,filterPaths:t=[],filterFunctions:r=[],stopOn:a=[],filterNode:o=!0,filterJs:u=!0,formatFilename:m=x=>x}={}){if(!ye)return[];r=[...r,...cu],t=[...t,...lu],a=[...a,"runInteractiveTask"];let x=!1;return(new Error().stack??"").split(`
1
+ "use strict";var Gt=Object.defineProperty;var ms=Object.getOwnPropertyDescriptor;var hs=Object.getOwnPropertyNames;var ys=Object.prototype.hasOwnProperty;var gs=(n,e,t)=>e in n?Gt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ot=(n,e,t)=>()=>{if(t)throw t[0];try{return n&&(e=n(n=0)),e}catch(r){throw t=[r],r}};var pe=(n,e)=>{for(var t in e)Gt(n,t,{get:e[t],enumerable:!0})},xs=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of hs(e))!ys.call(n,a)&&a!==t&&Gt(n,a,{get:()=>e[a],enumerable:!(r=ms(e,a))||r.enumerable});return n};var vs=n=>xs(Gt({},"__esModule",{value:!0}),n);var I=(n,e,t)=>gs(n,typeof e!="symbol"?e+"":e,t);var p=ot(()=>{"use strict"});var v={};pe(v,{_debugEnd:()=>On,_debugProcess:()=>Bn,_events:()=>Yn,_eventsCount:()=>Kn,_exiting:()=>mn,_fatalExceptions:()=>Sn,_getActiveHandles:()=>xn,_getActiveRequests:()=>gn,_kill:()=>bn,_linkedBinding:()=>dn,_maxListeners:()=>Jn,_preload_modules:()=>Zn,_rawDebug:()=>ln,_startProfilerIdleNotifier:()=>Ln,_stopProfilerIdleNotifier:()=>Pn,_tickCallback:()=>Fn,abort:()=>$n,addListener:()=>Xn,allowedNodeEnvironmentFlags:()=>En,arch:()=>Jr,argv:()=>Xr,argv0:()=>zn,assert:()=>An,binding:()=>nn,browser:()=>cn,chdir:()=>on,config:()=>hn,cpuUsage:()=>Yt,cwd:()=>sn,debugPort:()=>qn,default:()=>oi,dlopen:()=>yn,domain:()=>fn,emit:()=>ni,emitWarning:()=>rn,env:()=>Kr,execArgv:()=>Qr,execPath:()=>Wn,exit:()=>kn,features:()=>Rn,hasUncaughtExceptionCaptureCallback:()=>Cn,hrtime:()=>Jt,kill:()=>Tn,listeners:()=>si,memoryUsage:()=>_n,moduleLoadList:()=>pn,nextTick:()=>Zr,off:()=>ei,on:()=>we,once:()=>Qn,openStdin:()=>In,pid:()=>Dn,platform:()=>Yr,ppid:()=>Vn,prependListener:()=>ii,prependOnceListener:()=>ai,reallyExit:()=>vn,release:()=>un,removeAllListeners:()=>ri,removeListener:()=>ti,resourceUsage:()=>wn,setSourceMapsEnabled:()=>Gn,setUncaughtExceptionCaptureCallback:()=>Nn,stderr:()=>Mn,stdin:()=>Un,stdout:()=>jn,title:()=>Hr,umask:()=>an,uptime:()=>Hn,version:()=>en,versions:()=>tn});function gr(n){throw new Error("Node.js process "+n+" is not supported by JSPM core outside of Node.js")}function bs(){!ut||!Pe||(ut=!1,Pe.length?be=Pe.concat(be):Ht=-1,be.length&&zr())}function zr(){if(!ut){var n=setTimeout(bs,0);ut=!0;for(var e=be.length;e;){for(Pe=be,be=[];++Ht<e;)Pe&&Pe[Ht].run();Ht=-1,e=be.length}Pe=null,ut=!1,clearTimeout(n)}}function Zr(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];be.push(new Gr(n,e)),be.length===1&&!ut&&setTimeout(zr,0)}function Gr(n,e){this.fun=n,this.array=e}function Q(){}function dn(n){gr("_linkedBinding")}function yn(n){gr("dlopen")}function gn(){return[]}function xn(){return[]}function An(n,e){if(!n)throw new Error(e||"assertion error")}function Cn(){return!1}function Hn(){return Se.now()/1e3}function Jt(n){var e=Math.floor((Date.now()-Se.now())*.001),t=Se.now()*.001,r=Math.floor(t)+e,a=Math.floor(t%1*1e9);return n&&(r=r-n[0],a=a-n[1],a<0&&(r--,a+=yr)),[r,a]}function we(){return oi}function si(n){return[]}var be,ut,Pe,Ht,Hr,Jr,Yr,Kr,Xr,Qr,en,tn,rn,nn,an,sn,on,un,cn,ln,pn,fn,mn,hn,vn,bn,Yt,wn,_n,Tn,kn,In,En,Rn,Sn,Nn,Fn,Bn,On,Ln,Pn,jn,Mn,Un,$n,Dn,Vn,Wn,qn,zn,Zn,Gn,Se,hr,yr,Jn,Yn,Kn,Xn,Qn,ei,ti,ri,ni,ii,ai,oi,ui=ot(()=>{"use strict";p();f();d();be=[],ut=!1,Ht=-1;Gr.prototype.run=function(){this.fun.apply(null,this.array)};Hr="browser",Jr="x64",Yr="browser",Kr={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Xr=["/usr/bin/node"],Qr=[],en="v16.8.0",tn={},rn=function(n,e){console.warn((e?e+": ":"")+n)},nn=function(n){gr("binding")},an=function(n){return 0},sn=function(){return"/"},on=function(n){},un={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};cn=!0,ln=Q,pn=[];fn={},mn=!1,hn={};vn=Q,bn=Q,Yt=function(){return{}},wn=Yt,_n=Yt,Tn=Q,kn=Q,In=Q,En={};Rn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Sn=Q,Nn=Q;Fn=Q,Bn=Q,On=Q,Ln=Q,Pn=Q,jn=void 0,Mn=void 0,Un=void 0,$n=Q,Dn=2,Vn=1,Wn="/bin/usr/node",qn=9229,zn="node",Zn=[],Gn=Q,Se={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Se.now===void 0&&(hr=Date.now(),Se.timing&&Se.timing.navigationStart&&(hr=Se.timing.navigationStart),Se.now=()=>Date.now()-hr);yr=1e9;Jt.bigint=function(n){var e=Jt(n);return typeof BigInt>"u"?e[0]*yr+e[1]:BigInt(e[0]*yr)+BigInt(e[1])};Jn=10,Yn={},Kn=0;Xn=we,Qn=we,ei=we,ti=we,ri=we,ni=Q,ii=we,ai=we;oi={version:en,versions:tn,arch:Jr,platform:Yr,browser:cn,release:un,_rawDebug:ln,moduleLoadList:pn,binding:nn,_linkedBinding:dn,_events:Yn,_eventsCount:Kn,_maxListeners:Jn,on:we,addListener:Xn,once:Qn,off:ei,removeListener:ti,removeAllListeners:ri,emit:ni,prependListener:ii,prependOnceListener:ai,listeners:si,domain:fn,_exiting:mn,config:hn,dlopen:yn,uptime:Hn,_getActiveRequests:gn,_getActiveHandles:xn,reallyExit:vn,_kill:bn,cpuUsage:Yt,resourceUsage:wn,memoryUsage:_n,kill:Tn,exit:kn,openStdin:In,allowedNodeEnvironmentFlags:En,assert:An,features:Rn,_fatalExceptions:Sn,setUncaughtExceptionCaptureCallback:Nn,hasUncaughtExceptionCaptureCallback:Cn,emitWarning:rn,nextTick:Zr,_tickCallback:Fn,_debugProcess:Bn,_debugEnd:On,_startProfilerIdleNotifier:Ln,_stopProfilerIdleNotifier:Pn,stdout:jn,stdin:Un,stderr:Mn,abort:$n,umask:an,chdir:on,cwd:sn,env:Kr,title:Hr,argv:Xr,execArgv:Qr,pid:Dn,ppid:Vn,execPath:Wn,debugPort:qn,hrtime:Jt,argv0:zn,_preload_modules:Zn,setSourceMapsEnabled:Gn}});var d=ot(()=>{"use strict";ui()});function ws(){if(ci)return At;ci=!0,At.byteLength=m,At.toByteArray=k,At.fromByteArray=Y;for(var n=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=r.length;a<o;++a)n[a]=r[a],e[r.charCodeAt(a)]=a;e[45]=62,e[95]=63;function u(C){var j=C.length;if(j%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var D=C.indexOf("=");D===-1&&(D=j);var J=D===j?0:4-D%4;return[D,J]}function m(C){var j=u(C),D=j[0],J=j[1];return(D+J)*3/4-J}function x(C,j,D){return(j+D)*3/4-D}function k(C){var j,D=u(C),J=D[0],re=D[1],H=new t(x(C,J,re)),ne=0,oe=re>0?J-4:J,te;for(te=0;te<oe;te+=4)j=e[C.charCodeAt(te)]<<18|e[C.charCodeAt(te+1)]<<12|e[C.charCodeAt(te+2)]<<6|e[C.charCodeAt(te+3)],H[ne++]=j>>16&255,H[ne++]=j>>8&255,H[ne++]=j&255;return re===2&&(j=e[C.charCodeAt(te)]<<2|e[C.charCodeAt(te+1)]>>4,H[ne++]=j&255),re===1&&(j=e[C.charCodeAt(te)]<<10|e[C.charCodeAt(te+1)]<<4|e[C.charCodeAt(te+2)]>>2,H[ne++]=j>>8&255,H[ne++]=j&255),H}function R(C){return n[C>>18&63]+n[C>>12&63]+n[C>>6&63]+n[C&63]}function P(C,j,D){for(var J,re=[],H=j;H<D;H+=3)J=(C[H]<<16&16711680)+(C[H+1]<<8&65280)+(C[H+2]&255),re.push(R(J));return re.join("")}function Y(C){for(var j,D=C.length,J=D%3,re=[],H=16383,ne=0,oe=D-J;ne<oe;ne+=H)re.push(P(C,ne,ne+H>oe?oe:ne+H));return J===1?(j=C[D-1],re.push(n[j>>2]+n[j<<4&63]+"==")):J===2&&(j=(C[D-2]<<8)+C[D-1],re.push(n[j>>10]+n[j>>4&63]+n[j<<2&63]+"=")),re.join("")}return At}function _s(){if(li)return Kt;li=!0;return Kt.read=function(n,e,t,r,a){var o,u,m=a*8-r-1,x=(1<<m)-1,k=x>>1,R=-7,P=t?a-1:0,Y=t?-1:1,C=n[e+P];for(P+=Y,o=C&(1<<-R)-1,C>>=-R,R+=m;R>0;o=o*256+n[e+P],P+=Y,R-=8);for(u=o&(1<<-R)-1,o>>=-R,R+=r;R>0;u=u*256+n[e+P],P+=Y,R-=8);if(o===0)o=1-k;else{if(o===x)return u?NaN:(C?-1:1)*(1/0);u=u+Math.pow(2,r),o=o-k}return(C?-1:1)*u*Math.pow(2,o-r)},Kt.write=function(n,e,t,r,a,o){var u,m,x,k=o*8-a-1,R=(1<<k)-1,P=R>>1,Y=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=r?0:o-1,j=r?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,u=R):(u=Math.floor(Math.log(e)/Math.LN2),e*(x=Math.pow(2,-u))<1&&(u--,x*=2),u+P>=1?e+=Y/x:e+=Y*Math.pow(2,1-P),e*x>=2&&(u++,x/=2),u+P>=R?(m=0,u=R):u+P>=1?(m=(e*x-1)*Math.pow(2,a),u=u+P):(m=e*Math.pow(2,P-1)*Math.pow(2,a),u=0));a>=8;n[t+C]=m&255,C+=j,m/=256,a-=8);for(u=u<<a|m,k+=a;k>0;n[t+C]=u&255,C+=j,u/=256,k-=8);n[t+C-j]|=D*128},Kt}function di(){if(pi)return je;pi=!0;let n=ws(),e=_s(),t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;je.Buffer=u,je.SlowBuffer=re,je.INSPECT_MAX_BYTES=50;let r=2147483647;je.kMaxLength=r,u.TYPED_ARRAY_SUPPORT=a(),!u.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 a(){try{let c=new Uint8Array(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(c,i),c.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function o(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');let i=new Uint8Array(c);return Object.setPrototypeOf(i,u.prototype),i}function u(c,i,s){if(typeof c=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(c)}return m(c,i,s)}u.poolSize=8192;function m(c,i,s){if(typeof c=="string")return P(c,i);if(ArrayBuffer.isView(c))return C(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(he(c,ArrayBuffer)||c&&he(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(c,SharedArrayBuffer)||c&&he(c.buffer,SharedArrayBuffer)))return j(c,i,s);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let l=c.valueOf&&c.valueOf();if(l!=null&&l!==c)return u.from(l,i,s);let y=D(c);if(y)return y;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return u.from(c[Symbol.toPrimitive]("string"),i,s);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}u.from=function(c,i,s){return m(c,i,s)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function x(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function k(c,i,s){return x(c),c<=0?o(c):i!==void 0?typeof s=="string"?o(c).fill(i,s):o(c).fill(i):o(c)}u.alloc=function(c,i,s){return k(c,i,s)};function R(c){return x(c),o(c<0?0:J(c)|0)}u.allocUnsafe=function(c){return R(c)},u.allocUnsafeSlow=function(c){return R(c)};function P(c,i){if((typeof i!="string"||i==="")&&(i="utf8"),!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);let s=H(c,i)|0,l=o(s),y=l.write(c,i);return y!==s&&(l=l.slice(0,y)),l}function Y(c){let i=c.length<0?0:J(c.length)|0,s=o(i);for(let l=0;l<i;l+=1)s[l]=c[l]&255;return s}function C(c){if(he(c,Uint8Array)){let i=new Uint8Array(c);return j(i.buffer,i.byteOffset,i.byteLength)}return Y(c)}function j(c,i,s){if(i<0||c.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<i+(s||0))throw new RangeError('"length" is outside of buffer bounds');let l;return i===void 0&&s===void 0?l=new Uint8Array(c):s===void 0?l=new Uint8Array(c,i):l=new Uint8Array(c,i,s),Object.setPrototypeOf(l,u.prototype),l}function D(c){if(u.isBuffer(c)){let i=J(c.length)|0,s=o(i);return s.length===0||c.copy(s,0,0,i),s}if(c.length!==void 0)return typeof c.length!="number"||mr(c.length)?o(0):Y(c);if(c.type==="Buffer"&&Array.isArray(c.data))return Y(c.data)}function J(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return c|0}function re(c){return+c!=c&&(c=0),u.alloc(+c)}u.isBuffer=function(i){return i!=null&&i._isBuffer===!0&&i!==u.prototype},u.compare=function(i,s){if(he(i,Uint8Array)&&(i=u.from(i,i.offset,i.byteLength)),he(s,Uint8Array)&&(s=u.from(s,s.offset,s.byteLength)),!u.isBuffer(i)||!u.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===s)return 0;let l=i.length,y=s.length;for(let g=0,_=Math.min(l,y);g<_;++g)if(i[g]!==s[g]){l=i[g],y=s[g];break}return l<y?-1:y<l?1:0},u.isEncoding=function(i){switch(String(i).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!0;default:return!1}},u.concat=function(i,s){if(!Array.isArray(i))throw new TypeError('"list" argument must be an Array of Buffers');if(i.length===0)return u.alloc(0);let l;if(s===void 0)for(s=0,l=0;l<i.length;++l)s+=i[l].length;let y=u.allocUnsafe(s),g=0;for(l=0;l<i.length;++l){let _=i[l];if(he(_,Uint8Array))g+_.length>y.length?(u.isBuffer(_)||(_=u.from(_)),_.copy(y,g)):Uint8Array.prototype.set.call(y,_,g);else if(u.isBuffer(_))_.copy(y,g);else throw new TypeError('"list" argument must be an Array of Buffers');g+=_.length}return y};function H(c,i){if(u.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||he(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let s=c.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&s===0)return 0;let y=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return s;case"utf8":case"utf-8":return fr(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s*2;case"hex":return s>>>1;case"base64":return qr(c).length;default:if(y)return l?-1:fr(c).length;i=(""+i).toLowerCase(),y=!0}}u.byteLength=H;function ne(c,i,s){let l=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((s===void 0||s>this.length)&&(s=this.length),s<=0)||(s>>>=0,i>>>=0,s<=i))return"";for(c||(c="utf8");;)switch(c){case"hex":return as(this,i,s);case"utf8":case"utf-8":return Lr(this,i,s);case"ascii":return ns(this,i,s);case"latin1":case"binary":return is(this,i,s);case"base64":return ts(this,i,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ss(this,i,s);default:if(l)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),l=!0}}u.prototype._isBuffer=!0;function oe(c,i,s){let l=c[i];c[i]=c[s],c[s]=l}u.prototype.swap16=function(){let i=this.length;if(i%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<i;s+=2)oe(this,s,s+1);return this},u.prototype.swap32=function(){let i=this.length;if(i%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<i;s+=4)oe(this,s,s+3),oe(this,s+1,s+2);return this},u.prototype.swap64=function(){let i=this.length;if(i%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<i;s+=8)oe(this,s,s+7),oe(this,s+1,s+6),oe(this,s+2,s+5),oe(this,s+3,s+4);return this},u.prototype.toString=function(){let i=this.length;return i===0?"":arguments.length===0?Lr(this,0,i):ne.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(i){if(!u.isBuffer(i))throw new TypeError("Argument must be a Buffer");return this===i?!0:u.compare(this,i)===0},u.prototype.inspect=function(){let i="",s=je.INSPECT_MAX_BYTES;return i=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(i+=" ... "),"<Buffer "+i+">"},t&&(u.prototype[t]=u.prototype.inspect),u.prototype.compare=function(i,s,l,y,g){if(he(i,Uint8Array)&&(i=u.from(i,i.offset,i.byteLength)),!u.isBuffer(i))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(s===void 0&&(s=0),l===void 0&&(l=i?i.length:0),y===void 0&&(y=0),g===void 0&&(g=this.length),s<0||l>i.length||y<0||g>this.length)throw new RangeError("out of range index");if(y>=g&&s>=l)return 0;if(y>=g)return-1;if(s>=l)return 1;if(s>>>=0,l>>>=0,y>>>=0,g>>>=0,this===i)return 0;let _=g-y,M=l-s,Z=Math.min(_,M),z=this.slice(y,g),G=i.slice(s,l);for(let V=0;V<Z;++V)if(z[V]!==G[V]){_=z[V],M=G[V];break}return _<M?-1:M<_?1:0};function te(c,i,s,l,y){if(c.length===0)return-1;if(typeof s=="string"?(l=s,s=0):s>2147483647?s=2147483647:s<-2147483648&&(s=-2147483648),s=+s,mr(s)&&(s=y?0:c.length-1),s<0&&(s=c.length+s),s>=c.length){if(y)return-1;s=c.length-1}else if(s<0)if(y)s=0;else return-1;if(typeof i=="string"&&(i=u.from(i,l)),u.isBuffer(i))return i.length===0?-1:Or(c,i,s,l,y);if(typeof i=="number")return i=i&255,typeof Uint8Array.prototype.indexOf=="function"?y?Uint8Array.prototype.indexOf.call(c,i,s):Uint8Array.prototype.lastIndexOf.call(c,i,s):Or(c,[i],s,l,y);throw new TypeError("val must be string, number or Buffer")}function Or(c,i,s,l,y){let g=1,_=c.length,M=i.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(c.length<2||i.length<2)return-1;g=2,_/=2,M/=2,s/=2}function Z(G,V){return g===1?G[V]:G.readUInt16BE(V*g)}let z;if(y){let G=-1;for(z=s;z<_;z++)if(Z(c,z)===Z(i,G===-1?0:z-G)){if(G===-1&&(G=z),z-G+1===M)return G*g}else G!==-1&&(z-=z-G),G=-1}else for(s+M>_&&(s=_-M),z=s;z>=0;z--){let G=!0;for(let V=0;V<M;V++)if(Z(c,z+V)!==Z(i,V)){G=!1;break}if(G)return z}return-1}u.prototype.includes=function(i,s,l){return this.indexOf(i,s,l)!==-1},u.prototype.indexOf=function(i,s,l){return te(this,i,s,l,!0)},u.prototype.lastIndexOf=function(i,s,l){return te(this,i,s,l,!1)};function Ya(c,i,s,l){s=Number(s)||0;let y=c.length-s;l?(l=Number(l),l>y&&(l=y)):l=y;let g=i.length;l>g/2&&(l=g/2);let _;for(_=0;_<l;++_){let M=parseInt(i.substr(_*2,2),16);if(mr(M))return _;c[s+_]=M}return _}function Ka(c,i,s,l){return Zt(fr(i,c.length-s),c,s,l)}function Xa(c,i,s,l){return Zt(ls(i),c,s,l)}function Qa(c,i,s,l){return Zt(qr(i),c,s,l)}function es(c,i,s,l){return Zt(ps(i,c.length-s),c,s,l)}u.prototype.write=function(i,s,l,y){if(s===void 0)y="utf8",l=this.length,s=0;else if(l===void 0&&typeof s=="string")y=s,l=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(l)?(l=l>>>0,y===void 0&&(y="utf8")):(y=l,l=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let g=this.length-s;if((l===void 0||l>g)&&(l=g),i.length>0&&(l<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");y||(y="utf8");let _=!1;for(;;)switch(y){case"hex":return Ya(this,i,s,l);case"utf8":case"utf-8":return Ka(this,i,s,l);case"ascii":case"latin1":case"binary":return Xa(this,i,s,l);case"base64":return Qa(this,i,s,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return es(this,i,s,l);default:if(_)throw new TypeError("Unknown encoding: "+y);y=(""+y).toLowerCase(),_=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ts(c,i,s){return i===0&&s===c.length?n.fromByteArray(c):n.fromByteArray(c.slice(i,s))}function Lr(c,i,s){s=Math.min(c.length,s);let l=[],y=i;for(;y<s;){let g=c[y],_=null,M=g>239?4:g>223?3:g>191?2:1;if(y+M<=s){let Z,z,G,V;switch(M){case 1:g<128&&(_=g);break;case 2:Z=c[y+1],(Z&192)===128&&(V=(g&31)<<6|Z&63,V>127&&(_=V));break;case 3:Z=c[y+1],z=c[y+2],(Z&192)===128&&(z&192)===128&&(V=(g&15)<<12|(Z&63)<<6|z&63,V>2047&&(V<55296||V>57343)&&(_=V));break;case 4:Z=c[y+1],z=c[y+2],G=c[y+3],(Z&192)===128&&(z&192)===128&&(G&192)===128&&(V=(g&15)<<18|(Z&63)<<12|(z&63)<<6|G&63,V>65535&&V<1114112&&(_=V))}}_===null?(_=65533,M=1):_>65535&&(_-=65536,l.push(_>>>10&1023|55296),_=56320|_&1023),l.push(_),y+=M}return rs(l)}let Pr=4096;function rs(c){let i=c.length;if(i<=Pr)return String.fromCharCode.apply(String,c);let s="",l=0;for(;l<i;)s+=String.fromCharCode.apply(String,c.slice(l,l+=Pr));return s}function ns(c,i,s){let l="";s=Math.min(c.length,s);for(let y=i;y<s;++y)l+=String.fromCharCode(c[y]&127);return l}function is(c,i,s){let l="";s=Math.min(c.length,s);for(let y=i;y<s;++y)l+=String.fromCharCode(c[y]);return l}function as(c,i,s){let l=c.length;(!i||i<0)&&(i=0),(!s||s<0||s>l)&&(s=l);let y="";for(let g=i;g<s;++g)y+=ds[c[g]];return y}function ss(c,i,s){let l=c.slice(i,s),y="";for(let g=0;g<l.length-1;g+=2)y+=String.fromCharCode(l[g]+l[g+1]*256);return y}u.prototype.slice=function(i,s){let l=this.length;i=~~i,s=s===void 0?l:~~s,i<0?(i+=l,i<0&&(i=0)):i>l&&(i=l),s<0?(s+=l,s<0&&(s=0)):s>l&&(s=l),s<i&&(s=i);let y=this.subarray(i,s);return Object.setPrototypeOf(y,u.prototype),y};function K(c,i,s){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+i>s)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let y=this[i],g=1,_=0;for(;++_<s&&(g*=256);)y+=this[i+_]*g;return y},u.prototype.readUintBE=u.prototype.readUIntBE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let y=this[i+--s],g=1;for(;s>0&&(g*=256);)y+=this[i+--s]*g;return y},u.prototype.readUint8=u.prototype.readUInt8=function(i,s){return i=i>>>0,s||K(i,1,this.length),this[i]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(i,s){return i=i>>>0,s||K(i,2,this.length),this[i]|this[i+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(i,s){return i=i>>>0,s||K(i,2,this.length),this[i]<<8|this[i+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(i,s){return i=i>>>0,s||K(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+this[i+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(i,s){return i=i>>>0,s||K(i,4,this.length),this[i]*16777216+(this[i+1]<<16|this[i+2]<<8|this[i+3])},u.prototype.readBigUInt64LE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let y=s+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24,g=this[++i]+this[++i]*2**8+this[++i]*2**16+l*2**24;return BigInt(y)+(BigInt(g)<<BigInt(32))}),u.prototype.readBigUInt64BE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let y=s*2**24+this[++i]*2**16+this[++i]*2**8+this[++i],g=this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+l;return(BigInt(y)<<BigInt(32))+BigInt(g)}),u.prototype.readIntLE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let y=this[i],g=1,_=0;for(;++_<s&&(g*=256);)y+=this[i+_]*g;return g*=128,y>=g&&(y-=Math.pow(2,8*s)),y},u.prototype.readIntBE=function(i,s,l){i=i>>>0,s=s>>>0,l||K(i,s,this.length);let y=s,g=1,_=this[i+--y];for(;y>0&&(g*=256);)_+=this[i+--y]*g;return g*=128,_>=g&&(_-=Math.pow(2,8*s)),_},u.prototype.readInt8=function(i,s){return i=i>>>0,s||K(i,1,this.length),this[i]&128?(255-this[i]+1)*-1:this[i]},u.prototype.readInt16LE=function(i,s){i=i>>>0,s||K(i,2,this.length);let l=this[i]|this[i+1]<<8;return l&32768?l|4294901760:l},u.prototype.readInt16BE=function(i,s){i=i>>>0,s||K(i,2,this.length);let l=this[i+1]|this[i]<<8;return l&32768?l|4294901760:l},u.prototype.readInt32LE=function(i,s){return i=i>>>0,s||K(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24},u.prototype.readInt32BE=function(i,s){return i=i>>>0,s||K(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]},u.prototype.readBigInt64LE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let y=this[i+4]+this[i+5]*2**8+this[i+6]*2**16+(l<<24);return(BigInt(y)<<BigInt(32))+BigInt(s+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24)}),u.prototype.readBigInt64BE=Re(function(i){i=i>>>0,st(i,"offset");let s=this[i],l=this[i+7];(s===void 0||l===void 0)&&Et(i,this.length-8);let y=(s<<24)+this[++i]*2**16+this[++i]*2**8+this[++i];return(BigInt(y)<<BigInt(32))+BigInt(this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+l)}),u.prototype.readFloatLE=function(i,s){return i=i>>>0,s||K(i,4,this.length),e.read(this,i,!0,23,4)},u.prototype.readFloatBE=function(i,s){return i=i>>>0,s||K(i,4,this.length),e.read(this,i,!1,23,4)},u.prototype.readDoubleLE=function(i,s){return i=i>>>0,s||K(i,8,this.length),e.read(this,i,!0,52,8)},u.prototype.readDoubleBE=function(i,s){return i=i>>>0,s||K(i,8,this.length),e.read(this,i,!1,52,8)};function ie(c,i,s,l,y,g){if(!u.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>y||i<g)throw new RangeError('"value" argument is out of bounds');if(s+l>c.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(i,s,l,y){if(i=+i,s=s>>>0,l=l>>>0,!y){let M=Math.pow(2,8*l)-1;ie(this,i,s,l,M,0)}let g=1,_=0;for(this[s]=i&255;++_<l&&(g*=256);)this[s+_]=i/g&255;return s+l},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(i,s,l,y){if(i=+i,s=s>>>0,l=l>>>0,!y){let M=Math.pow(2,8*l)-1;ie(this,i,s,l,M,0)}let g=l-1,_=1;for(this[s+g]=i&255;--g>=0&&(_*=256);)this[s+g]=i/_&255;return s+l},u.prototype.writeUint8=u.prototype.writeUInt8=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,1,255,0),this[s]=i&255,s+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,65535,0),this[s]=i&255,this[s+1]=i>>>8,s+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,65535,0),this[s]=i>>>8,this[s+1]=i&255,s+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,4294967295,0),this[s+3]=i>>>24,this[s+2]=i>>>16,this[s+1]=i>>>8,this[s]=i&255,s+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,4294967295,0),this[s]=i>>>24,this[s+1]=i>>>16,this[s+2]=i>>>8,this[s+3]=i&255,s+4};function jr(c,i,s,l,y){Wr(i,l,y,c,s,7);let g=Number(i&BigInt(4294967295));c[s++]=g,g=g>>8,c[s++]=g,g=g>>8,c[s++]=g,g=g>>8,c[s++]=g;let _=Number(i>>BigInt(32)&BigInt(4294967295));return c[s++]=_,_=_>>8,c[s++]=_,_=_>>8,c[s++]=_,_=_>>8,c[s++]=_,s}function Mr(c,i,s,l,y){Wr(i,l,y,c,s,7);let g=Number(i&BigInt(4294967295));c[s+7]=g,g=g>>8,c[s+6]=g,g=g>>8,c[s+5]=g,g=g>>8,c[s+4]=g;let _=Number(i>>BigInt(32)&BigInt(4294967295));return c[s+3]=_,_=_>>8,c[s+2]=_,_=_>>8,c[s+1]=_,_=_>>8,c[s]=_,s+8}u.prototype.writeBigUInt64LE=Re(function(i,s=0){return jr(this,i,s,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Re(function(i,s=0){return Mr(this,i,s,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(i,s,l,y){if(i=+i,s=s>>>0,!y){let Z=Math.pow(2,8*l-1);ie(this,i,s,l,Z-1,-Z)}let g=0,_=1,M=0;for(this[s]=i&255;++g<l&&(_*=256);)i<0&&M===0&&this[s+g-1]!==0&&(M=1),this[s+g]=(i/_>>0)-M&255;return s+l},u.prototype.writeIntBE=function(i,s,l,y){if(i=+i,s=s>>>0,!y){let Z=Math.pow(2,8*l-1);ie(this,i,s,l,Z-1,-Z)}let g=l-1,_=1,M=0;for(this[s+g]=i&255;--g>=0&&(_*=256);)i<0&&M===0&&this[s+g+1]!==0&&(M=1),this[s+g]=(i/_>>0)-M&255;return s+l},u.prototype.writeInt8=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,1,127,-128),i<0&&(i=255+i+1),this[s]=i&255,s+1},u.prototype.writeInt16LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,32767,-32768),this[s]=i&255,this[s+1]=i>>>8,s+2},u.prototype.writeInt16BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,2,32767,-32768),this[s]=i>>>8,this[s+1]=i&255,s+2},u.prototype.writeInt32LE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,2147483647,-2147483648),this[s]=i&255,this[s+1]=i>>>8,this[s+2]=i>>>16,this[s+3]=i>>>24,s+4},u.prototype.writeInt32BE=function(i,s,l){return i=+i,s=s>>>0,l||ie(this,i,s,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),this[s]=i>>>24,this[s+1]=i>>>16,this[s+2]=i>>>8,this[s+3]=i&255,s+4},u.prototype.writeBigInt64LE=Re(function(i,s=0){return jr(this,i,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Re(function(i,s=0){return Mr(this,i,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ur(c,i,s,l,y,g){if(s+l>c.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("Index out of range")}function $r(c,i,s,l,y){return i=+i,s=s>>>0,y||Ur(c,i,s,4),e.write(c,i,s,l,23,4),s+4}u.prototype.writeFloatLE=function(i,s,l){return $r(this,i,s,!0,l)},u.prototype.writeFloatBE=function(i,s,l){return $r(this,i,s,!1,l)};function Dr(c,i,s,l,y){return i=+i,s=s>>>0,y||Ur(c,i,s,8),e.write(c,i,s,l,52,8),s+8}u.prototype.writeDoubleLE=function(i,s,l){return Dr(this,i,s,!0,l)},u.prototype.writeDoubleBE=function(i,s,l){return Dr(this,i,s,!1,l)},u.prototype.copy=function(i,s,l,y){if(!u.isBuffer(i))throw new TypeError("argument should be a Buffer");if(l||(l=0),!y&&y!==0&&(y=this.length),s>=i.length&&(s=i.length),s||(s=0),y>0&&y<l&&(y=l),y===l||i.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(l<0||l>=this.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("sourceEnd out of bounds");y>this.length&&(y=this.length),i.length-s<y-l&&(y=i.length-s+l);let g=y-l;return this===i&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,l,y):Uint8Array.prototype.set.call(i,this.subarray(l,y),s),g},u.prototype.fill=function(i,s,l,y){if(typeof i=="string"){if(typeof s=="string"?(y=s,s=0,l=this.length):typeof l=="string"&&(y=l,l=this.length),y!==void 0&&typeof y!="string")throw new TypeError("encoding must be a string");if(typeof y=="string"&&!u.isEncoding(y))throw new TypeError("Unknown encoding: "+y);if(i.length===1){let _=i.charCodeAt(0);(y==="utf8"&&_<128||y==="latin1")&&(i=_)}}else typeof i=="number"?i=i&255:typeof i=="boolean"&&(i=Number(i));if(s<0||this.length<s||this.length<l)throw new RangeError("Out of range index");if(l<=s)return this;s=s>>>0,l=l===void 0?this.length:l>>>0,i||(i=0);let g;if(typeof i=="number")for(g=s;g<l;++g)this[g]=i;else{let _=u.isBuffer(i)?i:u.from(i,y),M=_.length;if(M===0)throw new TypeError('The value "'+i+'" is invalid for argument "value"');for(g=0;g<l-s;++g)this[g+s]=_[g%M]}return this};let at={};function dr(c,i,s){at[c]=class extends s{constructor(){super(),Object.defineProperty(this,"message",{value:i.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:y,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}dr("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),dr("ERR_INVALID_ARG_TYPE",function(c,i){return`The "${c}" argument must be of type number. Received type ${typeof i}`},TypeError),dr("ERR_OUT_OF_RANGE",function(c,i,s){let l=`The value of "${c}" is out of range.`,y=s;return Number.isInteger(s)&&Math.abs(s)>2**32?y=Vr(String(s)):typeof s=="bigint"&&(y=String(s),(s>BigInt(2)**BigInt(32)||s<-(BigInt(2)**BigInt(32)))&&(y=Vr(y)),y+="n"),l+=` It must be ${i}. Received ${y}`,l},RangeError);function Vr(c){let i="",s=c.length,l=c[0]==="-"?1:0;for(;s>=l+4;s-=3)i=`_${c.slice(s-3,s)}${i}`;return`${c.slice(0,s)}${i}`}function os(c,i,s){st(i,"offset"),(c[i]===void 0||c[i+s]===void 0)&&Et(i,c.length-(s+1))}function Wr(c,i,s,l,y,g){if(c>s||c<i){let _=typeof i=="bigint"?"n":"",M;throw i===0||i===BigInt(0)?M=`>= 0${_} and < 2${_} ** ${(g+1)*8}${_}`:M=`>= -(2${_} ** ${(g+1)*8-1}${_}) and < 2 ** ${(g+1)*8-1}${_}`,new at.ERR_OUT_OF_RANGE("value",M,c)}os(l,y,g)}function st(c,i){if(typeof c!="number")throw new at.ERR_INVALID_ARG_TYPE(i,"number",c)}function Et(c,i,s){throw Math.floor(c)!==c?(st(c,s),new at.ERR_OUT_OF_RANGE("offset","an integer",c)):i<0?new at.ERR_BUFFER_OUT_OF_BOUNDS:new at.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${i}`,c)}let us=/[^+/0-9A-Za-z-_]/g;function cs(c){if(c=c.split("=")[0],c=c.trim().replace(us,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function fr(c,i){i=i||1/0;let s,l=c.length,y=null,g=[];for(let _=0;_<l;++_){if(s=c.charCodeAt(_),s>55295&&s<57344){if(!y){if(s>56319){(i-=3)>-1&&g.push(239,191,189);continue}else if(_+1===l){(i-=3)>-1&&g.push(239,191,189);continue}y=s;continue}if(s<56320){(i-=3)>-1&&g.push(239,191,189),y=s;continue}s=(y-55296<<10|s-56320)+65536}else y&&(i-=3)>-1&&g.push(239,191,189);if(y=null,s<128){if((i-=1)<0)break;g.push(s)}else if(s<2048){if((i-=2)<0)break;g.push(s>>6|192,s&63|128)}else if(s<65536){if((i-=3)<0)break;g.push(s>>12|224,s>>6&63|128,s&63|128)}else if(s<1114112){if((i-=4)<0)break;g.push(s>>18|240,s>>12&63|128,s>>6&63|128,s&63|128)}else throw new Error("Invalid code point")}return g}function ls(c){let i=[];for(let s=0;s<c.length;++s)i.push(c.charCodeAt(s)&255);return i}function ps(c,i){let s,l,y,g=[];for(let _=0;_<c.length&&!((i-=2)<0);++_)s=c.charCodeAt(_),l=s>>8,y=s%256,g.push(y),g.push(l);return g}function qr(c){return n.toByteArray(cs(c))}function Zt(c,i,s,l){let y;for(y=0;y<l&&!(y+s>=i.length||y>=c.length);++y)i[y+s]=c[y];return y}function he(c,i){return c instanceof i||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===i.name}function mr(c){return c!==c}let ds=(function(){let c="0123456789abcdef",i=new Array(256);for(let s=0;s<16;++s){let l=s*16;for(let y=0;y<16;++y)i[l+y]=c[s]+c[y]}return i})();function Re(c){return typeof BigInt>"u"?fs:c}function fs(){throw new Error("BigInt not supported")}return je}var At,ci,Kt,li,je,pi,fi=ot(()=>{"use strict";p();f();d();At={},ci=!1;Kt={},li=!1;je={},pi=!1});var Me,b,Qc,el,mi=ot(()=>{"use strict";p();f();d();fi();Me=di();Me.Buffer;Me.SlowBuffer;Me.INSPECT_MAX_BYTES;Me.kMaxLength;b=Me.Buffer,Qc=Me.INSPECT_MAX_BYTES,el=Me.kMaxLength});var f=ot(()=>{"use strict";mi()});var $c={};pe($c,{DynamicSnippetsGenerator:()=>pr});module.exports=vs($c);p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();var Ts=typeof global=="object"&&global&&global.Object===Object&&global,hi=Ts;var ks=typeof self=="object"&&self&&self.Object===Object&&self,Is=hi||ks||Function("return this")(),yi=Is;var Es=yi.Symbol,_e=Es;p();f();d();var gi=Object.prototype,As=gi.hasOwnProperty,Rs=gi.toString,Rt=_e?_e.toStringTag:void 0;function Ss(n){var e=As.call(n,Rt),t=n[Rt];try{n[Rt]=void 0;var r=!0}catch{}var a=Rs.call(n);return r&&(e?n[Rt]=t:delete n[Rt]),a}var xi=Ss;p();f();d();var Ns=Object.prototype,Cs=Ns.toString;function Fs(n){return Cs.call(n)}var vi=Fs;var Bs="[object Null]",Os="[object Undefined]",bi=_e?_e.toStringTag:void 0;function Ls(n){return n==null?n===void 0?Os:Bs:bi&&bi in Object(n)?xi(n):vi(n)}var wi=Ls;p();f();d();function Ps(n){return n!=null&&typeof n=="object"}var _i=Ps;var js="[object Symbol]";function Ms(n){return typeof n=="symbol"||_i(n)&&wi(n)==js}var Ti=Ms;p();f();d();p();f();d();function Us(n,e){for(var t=-1,r=n==null?0:n.length,a=Array(r);++t<r;)a[t]=e(n[t],t,n);return a}var ki=Us;p();f();d();var $s=Array.isArray,Ii=$s;var Ds=1/0,Ei=_e?_e.prototype:void 0,Ai=Ei?Ei.toString:void 0;function Ri(n){if(typeof n=="string")return n;if(Ii(n))return ki(n,Ri)+"";if(Ti(n))return Ai?Ai.call(n):"";var e=n+"";return e=="0"&&1/n==-Ds?"-0":e}var Si=Ri;p();f();d();function Vs(n){return n==null?"":Si(n)}var Ne=Vs;p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();function Ws(n,e,t){var r=-1,a=n.length;e<0&&(e=-e>a?0:a+e),t=t>a?a:t,t<0&&(t+=a),a=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(a);++r<a;)o[r]=n[r+e];return o}var Ni=Ws;function qs(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:Ni(n,e,t)}var Ci=qs;p();f();d();var zs="\\ud800-\\udfff",Zs="\\u0300-\\u036f",Gs="\\ufe20-\\ufe2f",Hs="\\u20d0-\\u20ff",Js=Zs+Gs+Hs,Ys="\\ufe0e\\ufe0f",Ks="\\u200d",Xs=RegExp("["+Ks+zs+Js+Ys+"]");function Qs(n){return Xs.test(n)}var Xt=Qs;p();f();d();p();f();d();function eo(n){return n.split("")}var Fi=eo;p();f();d();var Bi="\\ud800-\\udfff",to="\\u0300-\\u036f",ro="\\ufe20-\\ufe2f",no="\\u20d0-\\u20ff",io=to+ro+no,ao="\\ufe0e\\ufe0f",so="["+Bi+"]",xr="["+io+"]",vr="\\ud83c[\\udffb-\\udfff]",oo="(?:"+xr+"|"+vr+")",Oi="[^"+Bi+"]",Li="(?:\\ud83c[\\udde6-\\uddff]){2}",Pi="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="\\u200d",ji=oo+"?",Mi="["+ao+"]?",co="(?:"+uo+"(?:"+[Oi,Li,Pi].join("|")+")"+Mi+ji+")*",lo=Mi+ji+co,po="(?:"+[Oi+xr+"?",xr,Li,Pi,so].join("|")+")",fo=RegExp(vr+"(?="+vr+")|"+po+lo,"g");function mo(n){return n.match(fo)||[]}var Ui=mo;function ho(n){return Xt(n)?Ui(n):Fi(n)}var $i=ho;function yo(n){return function(e){e=Ne(e);var t=Xt(e)?$i(e):void 0,r=t?t[0]:e.charAt(0),a=t?Ci(t,1).join(""):e.slice(1);return r[n]()+a}}var Di=yo;var go=Di("toUpperCase"),Ue=go;function xo(n){return Ue(Ne(n).toLowerCase())}var Vi=xo;p();f();d();p();f();d();function vo(n,e,t,r){var a=-1,o=n==null?0:n.length;for(r&&o&&(t=n[++a]);++a<o;)t=e(t,n[a],a,n);return t}var Wi=vo;p();f();d();p();f();d();p();f();d();function bo(n){return function(e){return n?.[e]}}var qi=bo;var wo={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_o=qi(wo),zi=_o;var To=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ko="\\u0300-\\u036f",Io="\\ufe20-\\ufe2f",Eo="\\u20d0-\\u20ff",Ao=ko+Io+Eo,Ro="["+Ao+"]",So=RegExp(Ro,"g");function No(n){return n=Ne(n),n&&n.replace(To,zi).replace(So,"")}var Zi=No;p();f();d();p();f();d();var Co=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Fo(n){return n.match(Co)||[]}var Gi=Fo;p();f();d();var Bo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Oo(n){return Bo.test(n)}var Hi=Oo;p();f();d();var Qi="\\ud800-\\udfff",Lo="\\u0300-\\u036f",Po="\\ufe20-\\ufe2f",jo="\\u20d0-\\u20ff",Mo=Lo+Po+jo,ea="\\u2700-\\u27bf",ta="a-z\\xdf-\\xf6\\xf8-\\xff",Uo="\\xac\\xb1\\xd7\\xf7",$o="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Do="\\u2000-\\u206f",Vo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ra="A-Z\\xc0-\\xd6\\xd8-\\xde",Wo="\\ufe0e\\ufe0f",na=Uo+$o+Do+Vo,ia="['\u2019]",Ji="["+na+"]",qo="["+Mo+"]",aa="\\d+",zo="["+ea+"]",sa="["+ta+"]",oa="[^"+Qi+na+aa+ea+ta+ra+"]",Zo="\\ud83c[\\udffb-\\udfff]",Go="(?:"+qo+"|"+Zo+")",Ho="[^"+Qi+"]",ua="(?:\\ud83c[\\udde6-\\uddff]){2}",ca="[\\ud800-\\udbff][\\udc00-\\udfff]",ct="["+ra+"]",Jo="\\u200d",Yi="(?:"+sa+"|"+oa+")",Yo="(?:"+ct+"|"+oa+")",Ki="(?:"+ia+"(?:d|ll|m|re|s|t|ve))?",Xi="(?:"+ia+"(?:D|LL|M|RE|S|T|VE))?",la=Go+"?",pa="["+Wo+"]?",Ko="(?:"+Jo+"(?:"+[Ho,ua,ca].join("|")+")"+pa+la+")*",Xo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",eu=pa+la+Ko,tu="(?:"+[zo,ua,ca].join("|")+")"+eu,ru=RegExp([ct+"?"+sa+"+"+Ki+"(?="+[Ji,ct,"$"].join("|")+")",Yo+"+"+Xi+"(?="+[Ji,ct+Yi,"$"].join("|")+")",ct+"?"+Yi+"+"+Ki,ct+"+"+Xi,Qo,Xo,aa,tu].join("|"),"g");function nu(n){return n.match(ru)||[]}var da=nu;function iu(n,e,t){return n=Ne(n),e=t?void 0:e,e===void 0?Hi(n)?da(n):Gi(n):n.match(e)||[]}var fa=iu;var au="['\u2019]",su=RegExp(au,"g");function ou(n){return function(e){return Wi(fa(Zi(e).replace(su,"")),n,"")}}var ma=ou;var uu=ma(function(n,e,t){return e=e.toLowerCase(),n+(t?Vi(e):e)}),St=uu;p();f();d();function q(n){throw new Error("Unexpected value: "+JSON.stringify(n))}p();f();d();function Nt(n){return Object.keys(n)}p();f();d();p();f();d();p();f();d();var Ct=v.env.FERN_STACK_TRACK?.toLowerCase()??"",ye=Ct!==""&&Ct!=="0"&&Ct!=="false",br=["single","multiline","box"].includes(Ct)?Ct:"single";ye&&(Error.stackTraceLimit=50);var cu=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),lu=new Set(["stacktrace"]);function er({maxFrames:n=50,skip:e=0,filterPaths:t=[],filterFunctions:r=[],stopOn:a=[],filterNode:o=!0,filterJs:u=!0,formatFilename:m=x=>x}={}){if(!ye)return[];r=[...r,...cu],t=[...t,...lu],a=[...a,"runInteractiveTask"];let x=!1;return(new Error().stack??"").split(`
2
2
  `).map(k=>{let R=k.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(R&&R.length===5){let[,P,Y,C,j]=R;if(!P||!Y||!C||!j)return;if(x||a.some(D=>P?.includes(D))){x=!0;return}switch(P){case"Object.<anonymous>":P="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":P=`${P.substring(P.indexOf(".")+1)}()=> { ... }`;break}return{fn:P,path:m(Y),position:`${C}:${j}`}}}).filter(k=>k&&!r.some(R=>k.fn.includes(R))&&!(o&&k.path?.startsWith("node:"))&&!(u&&k.path?.endsWith(".js"))&&!t.some(R=>k.path.includes(R))).slice(e,e+n)}var Qt=class{constructor({maxFrames:e=50,skip:t=0,filterPaths:r=[],filterFunctions:a=[],stopOn:o=[],filterNode:u=!0,filterJs:m=!0,multiline:x=!1,formatFilename:k=R=>R}={}){I(this,"maxFrames");I(this,"skip");I(this,"filterPaths");I(this,"filterFunctions");I(this,"stopOn");I(this,"filterNode");I(this,"filterJs");I(this,"multiline");I(this,"formatFilename");I(this,"tracking",new WeakMap);this.maxFrames=e,this.skip=t,this.filterPaths=r,this.filterFunctions=a,this.stopOn=o,this.filterNode=u,this.filterJs=m,this.multiline=x,this.formatFilename=k}tag(e){let t=this.tracking.get(e)||new Set;er({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(r=>t.add(r)),this.tracking.set(e,t)}trace(e){if(!ye)return"";let t=this.tracking.get(e);return t?[...t].map(r=>`${this.multiline?`
3
3
  `:""}${r.fn} - ${r.path}:${r.position}`).join(""):""}frames(e){let t=this.tracking.get(e);return t?[...t]:[]}free(e){this.tracking.delete(e)}clear(){this.tracking=new WeakMap}},wr;function ha({maxFrames:n=50,skip:e=0,filterPaths:t=[],filterFunctions:r=[],stopOn:a=[],filterNode:o=!0,filterJs:u=!0,multiline:m=!1,formatFilename:x=k=>k}={}){ye&&(wr??(wr=new Qt({maxFrames:n,skip:e,filterPaths:t,filterFunctions:r,stopOn:a,filterNode:o,filterJs:u,multiline:m,formatFilename:x})))}function ya(n){wr?.tag(n)}function _r(n){return wr?.frames(n)??[]}var $e=class{constructor(){ya(this)}};p();f();d();var tr=class{formatMultiple(e){return Promise.all(e.map(t=>this.format(t)))}formatMultipleSync(e){return e.map(t=>this.formatSync(t))}dispose(){}},Ft=class extends tr{async format(e){return e}formatSync(e){return e}};p();f();d();p();f();d();p();f();d();var de=class extends $e{constructor(t){super();I(this,"value");this.value=t}write(t){typeof this.value=="string"?t.write(this.value):typeof this.value=="function"?this.value(t):this.value.write(t)}};var pu=4;ha({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var Bt=class{constructor(){I(this,"lineBuffer",[]);I(this,"indentLevel",0);I(this,"hasWrittenAnything",!1);I(this,"lastCharacterIsSemicolon",!1);I(this,"lastCharacterIsNewline",!1);I(this,"nodeStackFrames",[])}get buffer(){return ye&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
4
  `),this.lineBuffer.join(`
@@ -16,7 +16,7 @@ ${o}`);this.isAtStartOfLine()&&(u=o+u),r&&(u+=`
16
16
  ${e}`)}return e}toString(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(e)}catch(t){throw new Error(`Failed to format TypeScript file: ${t}
17
17
  ${e}`)}return e}getContent(){let e=this.stringifyImports();return e.length>0?e+`
18
18
  `+this.buffer:this.buffer}stringifyImports(){let e="";for(let[t,r]of Object.entries(this.imports)){let a=this.defaultImports[t],o="",u=r.filter(x=>x.importFrom?.type==="named"),m=this.starImportAliases[t];if(u.length>0||a!=null||m!=null){if(e+="import",a!=null&&(e+=` ${a.name}`),u.length>0){for(let k of u.slice(0,-1))o+=`${k.name}, `;let x=u[u.length-1];x!=null&&(o+=`${x.name}`),a!=null&&(e+=","),e+=` { ${o} }`}m!=null&&((a!=null||u.length>0)&&(e+=", "),e+=` * as ${m}`),e+=` from "${t}";
19
- `}}return e}};var W=class extends $e{async toStringAsync({customConfig:e,formatter:t}){let r=new Ut({customConfig:e,formatter:t});return this.write(r),await r.toStringAsync()}toString({customConfig:e,formatter:t}){let r=new Ut({customConfig:e,formatter:t});return this.write(r),r.toString()}};p();f();d();p();f();d();var y={};pe(y,{BRAND:()=>ju,DIRTY:()=>De,EMPTY_PATH:()=>hu,INVALID:()=>F,NEVER:()=>wc,OK:()=>ee,ParseStatus:()=>X,Schema:()=>L,ZodAny:()=>Be,ZodArray:()=>Ee,ZodBigInt:()=>We,ZodBoolean:()=>qe,ZodBranded:()=>Dt,ZodCatch:()=>tt,ZodDate:()=>ze,ZodDefault:()=>et,ZodDiscriminatedUnion:()=>ir,ZodEffects:()=>le,ZodEnum:()=>Xe,ZodError:()=>ae,ZodFirstPartyTypeKind:()=>B,ZodFunction:()=>sr,ZodIntersection:()=>Je,ZodIssueCode:()=>T,ZodLazy:()=>Ye,ZodLiteral:()=>Ke,ZodMap:()=>yt,ZodNaN:()=>xt,ZodNativeEnum:()=>Qe,ZodNever:()=>me,ZodNull:()=>Ge,ZodNullable:()=>ve,ZodNumber:()=>Ve,ZodObject:()=>se,ZodOptional:()=>ue,ZodParsedType:()=>S,ZodPipeline:()=>Vt,ZodPromise:()=>Oe,ZodReadonly:()=>rt,ZodRecord:()=>ar,ZodSchema:()=>L,ZodSet:()=>gt,ZodString:()=>Fe,ZodSymbol:()=>mt,ZodTransformer:()=>le,ZodTuple:()=>xe,ZodType:()=>L,ZodUndefined:()=>Ze,ZodUnion:()=>He,ZodUnknown:()=>Ie,ZodVoid:()=>ht,addIssueToContext:()=>A,any:()=>Zu,array:()=>Yu,bigint:()=>Du,boolean:()=>Aa,coerce:()=>bc,custom:()=>ka,date:()=>Vu,datetimeRegex:()=>_a,defaultErrorMap:()=>Te,discriminatedUnion:()=>ec,effect:()=>dc,enum:()=>cc,function:()=>sc,getErrorMap:()=>pt,getParsedType:()=>ge,instanceof:()=>Uu,intersection:()=>tc,isAborted:()=>rr,isAsync:()=>dt,isDirty:()=>nr,isValid:()=>Ce,late:()=>Mu,lazy:()=>oc,literal:()=>uc,makeIssue:()=>$t,map:()=>ic,nan:()=>$u,nativeEnum:()=>lc,never:()=>Hu,null:()=>zu,nullable:()=>mc,number:()=>Ea,object:()=>Ku,objectUtil:()=>Tr,oboolean:()=>vc,onumber:()=>xc,optional:()=>fc,ostring:()=>gc,pipeline:()=>yc,preprocess:()=>hc,promise:()=>pc,quotelessJson:()=>du,record:()=>nc,set:()=>ac,setErrorMap:()=>mu,strictObject:()=>Xu,string:()=>Ia,symbol:()=>Wu,transformer:()=>dc,tuple:()=>rc,undefined:()=>qu,union:()=>Qu,unknown:()=>Gu,util:()=>U,void:()=>Ju});p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();var U;(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{let o={};for(let u of a)o[u]=u;return o},n.getValidEnumValues=a=>{let o=n.objectKeys(a).filter(m=>typeof a[a[m]]!="number"),u={};for(let m of o)u[m]=a[m];return n.objectValues(u)},n.objectValues=a=>n.objectKeys(a).map(function(o){return a[o]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{let o=[];for(let u in a)Object.prototype.hasOwnProperty.call(a,u)&&o.push(u);return o},n.find=(a,o)=>{for(let u of a)if(o(u))return u},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,o=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(o)}n.joinValues=r,n.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(U||(U={}));var Tr;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(Tr||(Tr={}));var S=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ge=n=>{switch(typeof n){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(n)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":return Array.isArray(n)?S.array:n===null?S.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?S.promise:typeof Map<"u"&&n instanceof Map?S.map:typeof Set<"u"&&n instanceof Set?S.set:typeof Date<"u"&&n instanceof Date?S.date:S.object;default:return S.unknown}};var T=U.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"]),du=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:"),ae=class n extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(o){return o.message},r={_errors:[]},a=o=>{for(let u of o.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)r._errors.push(t(u));else{let m=r,x=0;for(;x<u.path.length;){let k=u.path[x];x===u.path.length-1?(m[k]=m[k]||{_errors:[]},m[k]._errors.push(t(u))):m[k]=m[k]||{_errors:[]},m=m[k],x++}}};return a(this),r}static assert(e){if(!(e instanceof n))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},r=[];for(let a of this.issues)if(a.path.length>0){let o=a.path[0];t[o]=t[o]||[],t[o].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};ae.create=n=>new ae(n);var fu=(n,e)=>{let t;switch(n.code){case T.invalid_type:n.received===S.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case T.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,U.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:t=`Unrecognized key(s) in object: ${U.joinValues(n.keys,", ")}`;break;case T.invalid_union:t="Invalid input";break;case T.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${U.joinValues(n.options)}`;break;case T.invalid_enum_value:t=`Invalid enum value. Expected ${U.joinValues(n.options)}, received '${n.received}'`;break;case T.invalid_arguments:t="Invalid function arguments";break;case T.invalid_return_type:t="Invalid function return type";break;case T.invalid_date:t="Invalid date";break;case T.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:U.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case T.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case T.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case T.custom:t="Invalid input";break;case T.invalid_intersection_types:t="Intersection results could not be merged";break;case T.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case T.not_finite:t="Number must be finite";break;default:t=e.defaultError,U.assertNever(n)}return{message:t}},Te=fu;var ga=Te;function mu(n){ga=n}function pt(){return ga}p();f();d();var $t=n=>{let{data:e,path:t,errorMaps:r,issueData:a}=n,o=[...t,...a.path||[]],u={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let m="",x=r.filter(k=>!!k).slice().reverse();for(let k of x)m=k(u,{data:e,defaultError:m}).message;return{...a,path:o,message:m}},hu=[];function A(n,e){let t=pt(),r=$t({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===Te?void 0:Te].filter(a=>!!a)});n.common.issues.push(r)}var X=class n{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let a of t){if(a.status==="aborted")return F;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let a of t){let o=await a.key,u=await a.value;r.push({key:o,value:u})}return n.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let a of t){let{key:o,value:u}=a;if(o.status==="aborted"||u.status==="aborted")return F;o.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(r[o.value]=u.value)}return{status:e.value,value:r}}},F=Object.freeze({status:"aborted"}),De=n=>({status:"dirty",value:n}),ee=n=>({status:"valid",value:n}),rr=n=>n.status==="aborted",nr=n=>n.status==="dirty",Ce=n=>n.status==="valid",dt=n=>typeof Promise<"u"&&n instanceof Promise;p();f();d();p();f();d();var N;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e?.message})(N||(N={}));var ce=class{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}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}},xa=(n,e)=>{if(Ce(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new ae(n.common.issues);return this._error=t,this._error}}};function O(n){if(!n)return{};let{errorMap:e,invalid_type_error:t,required_error:r,description:a}=n;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(u,m)=>{let{message:x}=n;return u.code==="invalid_enum_value"?{message:x??m.defaultError}:typeof m.data>"u"?{message:x??r??m.defaultError}:u.code!=="invalid_type"?{message:m.defaultError}:{message:x??t??m.defaultError}},description:a}}var L=class{get description(){return this._def.description}_getType(e){return ge(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ge(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new X,ctx:{common:e.parent.common,data:e.data,parsedType:ge(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(dt(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)},a=this._parseSync({data:e,path:r.path,parent:r});return xa(r,a)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return Ce(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>Ce(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)},a=this._parse({data:e,path:r.path,parent:r}),o=await(dt(a)?a:Promise.resolve(a));return xa(r,o)}refine(e,t){let r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,o)=>{let u=e(a),m=()=>o.addIssue({code:T.custom,...r(a)});return typeof Promise<"u"&&u instanceof Promise?u.then(x=>x?!0:(m(),!1)):u?!0:(m(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new le({schema:this,typeName:B.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ue.create(this,this._def)}nullable(){return ve.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ee.create(this)}promise(){return Oe.create(this,this._def)}or(e){return He.create([this,e],this._def)}and(e){return Je.create(this,e,this._def)}transform(e){return new le({...O(this._def),schema:this,typeName:B.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new et({...O(this._def),innerType:this,defaultValue:t,typeName:B.ZodDefault})}brand(){return new Dt({typeName:B.ZodBranded,type:this,...O(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new tt({...O(this._def),innerType:this,catchValue:t,typeName:B.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Vt.create(this,e)}readonly(){return rt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},yu=/^c[^\s-]{8,}$/i,gu=/^[0-9a-z]+$/,xu=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vu=/^[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,bu=/^[a-z0-9_-]{21}$/i,wu=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_u=/^[-+]?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)?)??$/,Tu=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ku="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",kr,Iu=/^(?:(?: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])$/,Eu=/^(?:(?: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])$/,Au=/^(([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]))$/,Ru=/^(([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])$/,Su=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nu=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ba="((\\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])))",Cu=new RegExp(`^${ba}$`);function wa(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);let t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Fu(n){return new RegExp(`^${wa(n)}$`)}function _a(n){let e=`${ba}T${wa(n)}`,t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Bu(n,e){return!!((e==="v4"||!e)&&Iu.test(n)||(e==="v6"||!e)&&Au.test(n))}function Ou(n,e){if(!wu.test(n))return!1;try{let[t]=n.split(".");if(!t)return!1;let r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Lu(n,e){return!!((e==="v4"||!e)&&Eu.test(n)||(e==="v6"||!e)&&Ru.test(n))}var Fe=class n extends L{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==S.string){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_type,expected:S.string,received:o.parsedType}),F}let r=new X,a;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){let u=e.data.length>o.value,m=e.data.length<o.value;(u||m)&&(a=this._getOrReturnCtx(e,a),u?A(a,{code:T.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):m&&A(a,{code:T.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Tu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"email",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")kr||(kr=new RegExp(ku,"u")),kr.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"emoji",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")vu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"uuid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")bu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"nanoid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")yu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"cuid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")gu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"cuid2",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")xu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"ulid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),A(a,{validation:"url",code:T.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"regex",code:T.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?_a(o).test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?Cu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Fu(o).test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?_u.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"duration",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Bu(e.data,o.version)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"ip",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?Ou(e.data,o.alg)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"jwt",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Lu(e.data,o.version)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"cidr",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?Su.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"base64",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?Nu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"base64url",code:T.invalid_string,message:o.message}),r.dirty()):U.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:T.invalid_string,...N.errToObj(r)})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...N.errToObj(e)})}url(e){return this._addCheck({kind:"url",...N.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...N.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...N.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...N.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...N.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...N.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...N.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...N.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...N.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...N.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...N.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...N.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...N.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...N.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...N.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...N.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...N.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...N.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...N.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...N.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...N.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...N.errToObj(t)})}nonempty(e){return this.min(1,N.errToObj(e))}trim(){return new n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new n({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};Fe.create=n=>new Fe({checks:[],typeName:B.ZodString,coerce:n?.coerce??!1,...O(n)});function Pu(n,e){let t=(n.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,o=Number.parseInt(n.toFixed(a).replace(".","")),u=Number.parseInt(e.toFixed(a).replace(".",""));return o%u/10**a}var Ve=class n extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==S.number){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_type,expected:S.number,received:o.parsedType}),F}let r,a=new X;for(let o of this._def.checks)o.kind==="int"?U.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),A(r,{code:T.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?Pu(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),A(r,{code:T.not_finite,message:o.message}),a.dirty()):U.assertNever(o);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,N.toString(t))}gt(e,t){return this.setLimit("min",e,!1,N.toString(t))}lte(e,t){return this.setLimit("max",e,!0,N.toString(t))}lt(e,t){return this.setLimit("max",e,!1,N.toString(t))}setLimit(e,t,r,a){return new n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:N.toString(a)}]})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:N.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:N.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:N.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:N.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:N.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&U.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}};Ve.create=n=>new Ve({checks:[],typeName:B.ZodNumber,coerce:n?.coerce||!1,...O(n)});var We=class n extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==S.bigint)return this._getInvalidInput(e);let r,a=new X;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):U.assertNever(o);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return A(t,{code:T.invalid_type,expected:S.bigint,received:t.parsedType}),F}gte(e,t){return this.setLimit("min",e,!0,N.toString(t))}gt(e,t){return this.setLimit("min",e,!1,N.toString(t))}lte(e,t){return this.setLimit("max",e,!0,N.toString(t))}lt(e,t){return this.setLimit("max",e,!1,N.toString(t))}setLimit(e,t,r,a){return new n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:N.toString(a)}]})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:N.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};We.create=n=>new We({checks:[],typeName:B.ZodBigInt,coerce:n?.coerce??!1,...O(n)});var qe=class extends L{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==S.boolean){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.boolean,received:r.parsedType}),F}return ee(e.data)}};qe.create=n=>new qe({typeName:B.ZodBoolean,coerce:n?.coerce||!1,...O(n)});var ze=class n extends L{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==S.date){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_type,expected:S.date,received:o.parsedType}),F}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_date}),F}let r=new X,a;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):U.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:N.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:N.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};ze.create=n=>new ze({checks:[],coerce:n?.coerce||!1,typeName:B.ZodDate,...O(n)});var mt=class extends L{_parse(e){if(this._getType(e)!==S.symbol){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.symbol,received:r.parsedType}),F}return ee(e.data)}};mt.create=n=>new mt({typeName:B.ZodSymbol,...O(n)});var Ze=class extends L{_parse(e){if(this._getType(e)!==S.undefined){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.undefined,received:r.parsedType}),F}return ee(e.data)}};Ze.create=n=>new Ze({typeName:B.ZodUndefined,...O(n)});var Ge=class extends L{_parse(e){if(this._getType(e)!==S.null){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.null,received:r.parsedType}),F}return ee(e.data)}};Ge.create=n=>new Ge({typeName:B.ZodNull,...O(n)});var Be=class extends L{constructor(){super(...arguments),this._any=!0}_parse(e){return ee(e.data)}};Be.create=n=>new Be({typeName:B.ZodAny,...O(n)});var Ie=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ee(e.data)}};Ie.create=n=>new Ie({typeName:B.ZodUnknown,...O(n)});var me=class extends L{_parse(e){let t=this._getOrReturnCtx(e);return A(t,{code:T.invalid_type,expected:S.never,received:t.parsedType}),F}};me.create=n=>new me({typeName:B.ZodNever,...O(n)});var ht=class extends L{_parse(e){if(this._getType(e)!==S.undefined){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.void,received:r.parsedType}),F}return ee(e.data)}};ht.create=n=>new ht({typeName:B.ZodVoid,...O(n)});var Ee=class n extends L{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==S.array)return A(t,{code:T.invalid_type,expected:S.array,received:t.parsedType}),F;if(a.exactLength!==null){let u=t.data.length>a.exactLength.value,m=t.data.length<a.exactLength.value;(u||m)&&(A(t,{code:u?T.too_big:T.too_small,minimum:m?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(A(t,{code:T.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(A(t,{code:T.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((u,m)=>a.type._parseAsync(new ce(t,u,t.path,m)))).then(u=>X.mergeArray(r,u));let o=[...t.data].map((u,m)=>a.type._parseSync(new ce(t,u,t.path,m)));return X.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new n({...this._def,minLength:{value:e,message:N.toString(t)}})}max(e,t){return new n({...this._def,maxLength:{value:e,message:N.toString(t)}})}length(e,t){return new n({...this._def,exactLength:{value:e,message:N.toString(t)}})}nonempty(e){return this.min(1,e)}};Ee.create=(n,e)=>new Ee({type:n,minLength:null,maxLength:null,exactLength:null,typeName:B.ZodArray,...O(e)});function ft(n){if(n instanceof se){let e={};for(let t in n.shape){let r=n.shape[t];e[t]=ue.create(ft(r))}return new se({...n._def,shape:()=>e})}else return n instanceof Ee?new Ee({...n._def,type:ft(n.element)}):n instanceof ue?ue.create(ft(n.unwrap())):n instanceof ve?ve.create(ft(n.unwrap())):n instanceof xe?xe.create(n.items.map(e=>ft(e))):n}var se=class n extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=U.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==S.object){let k=this._getOrReturnCtx(e);return A(k,{code:T.invalid_type,expected:S.object,received:k.parsedType}),F}let{status:r,ctx:a}=this._processInputParams(e),{shape:o,keys:u}=this._getCached(),m=[];if(!(this._def.catchall instanceof me&&this._def.unknownKeys==="strip"))for(let k in a.data)u.includes(k)||m.push(k);let x=[];for(let k of u){let R=o[k],P=a.data[k];x.push({key:{status:"valid",value:k},value:R._parse(new ce(a,P,a.path,k)),alwaysSet:k in a.data})}if(this._def.catchall instanceof me){let k=this._def.unknownKeys;if(k==="passthrough")for(let R of m)x.push({key:{status:"valid",value:R},value:{status:"valid",value:a.data[R]}});else if(k==="strict")m.length>0&&(A(a,{code:T.unrecognized_keys,keys:m}),r.dirty());else if(k!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let k=this._def.catchall;for(let R of m){let P=a.data[R];x.push({key:{status:"valid",value:R},value:k._parse(new ce(a,P,a.path,R)),alwaysSet:R in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let k=[];for(let R of x){let P=await R.key,Y=await R.value;k.push({key:P,value:Y,alwaysSet:R.alwaysSet})}return k}).then(k=>X.mergeObjectSync(r,k)):X.mergeObjectSync(r,x)}get shape(){return this._def.shape()}strict(e){return N.errToObj,new n({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let a=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:N.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new n({...this._def,unknownKeys:"strip"})}passthrough(){return new n({...this._def,unknownKeys:"passthrough"})}extend(e){return new n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new n({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:B.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new n({...this._def,catchall:e})}pick(e){let t={};for(let r of U.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new n({...this._def,shape:()=>t})}omit(e){let t={};for(let r of U.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new n({...this._def,shape:()=>t})}deepPartial(){return ft(this)}partial(e){let t={};for(let r of U.objectKeys(this.shape)){let a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new n({...this._def,shape:()=>t})}required(e){let t={};for(let r of U.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ue;)o=o._def.innerType;t[r]=o}return new n({...this._def,shape:()=>t})}keyof(){return Ta(U.objectKeys(this.shape))}};se.create=(n,e)=>new se({shape:()=>n,unknownKeys:"strip",catchall:me.create(),typeName:B.ZodObject,...O(e)});se.strictCreate=(n,e)=>new se({shape:()=>n,unknownKeys:"strict",catchall:me.create(),typeName:B.ZodObject,...O(e)});se.lazycreate=(n,e)=>new se({shape:n,unknownKeys:"strip",catchall:me.create(),typeName:B.ZodObject,...O(e)});var He=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function a(o){for(let m of o)if(m.result.status==="valid")return m.result;for(let m of o)if(m.result.status==="dirty")return t.common.issues.push(...m.ctx.common.issues),m.result;let u=o.map(m=>new ae(m.ctx.common.issues));return A(t,{code:T.invalid_union,unionErrors:u}),F}if(t.common.async)return Promise.all(r.map(async o=>{let u={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:u}),ctx:u}})).then(a);{let o,u=[];for(let x of r){let k={...t,common:{...t.common,issues:[]},parent:null},R=x._parseSync({data:t.data,path:t.path,parent:k});if(R.status==="valid")return R;R.status==="dirty"&&!o&&(o={result:R,ctx:k}),k.common.issues.length&&u.push(k.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;let m=u.map(x=>new ae(x));return A(t,{code:T.invalid_union,unionErrors:m}),F}}get options(){return this._def.options}};He.create=(n,e)=>new He({options:n,typeName:B.ZodUnion,...O(e)});var ke=n=>n instanceof Ye?ke(n.schema):n instanceof le?ke(n.innerType()):n instanceof Ke?[n.value]:n instanceof Xe?n.options:n instanceof Qe?U.objectValues(n.enum):n instanceof et?ke(n._def.innerType):n instanceof Ze?[void 0]:n instanceof Ge?[null]:n instanceof ue?[void 0,...ke(n.unwrap())]:n instanceof ve?[null,...ke(n.unwrap())]:n instanceof Dt||n instanceof rt?ke(n.unwrap()):n instanceof tt?ke(n._def.innerType):[],ir=class n extends L{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.object)return A(t,{code:T.invalid_type,expected:S.object,received:t.parsedType}),F;let r=this.discriminator,a=t.data[r],o=this.optionsMap.get(a);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(A(t,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),F)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let a=new Map;for(let o of t){let u=ke(o.shape[e]);if(!u.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let m of u){if(a.has(m))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(m)}`);a.set(m,o)}}return new n({typeName:B.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...O(r)})}};function Ir(n,e){let t=ge(n),r=ge(e);if(n===e)return{valid:!0,data:n};if(t===S.object&&r===S.object){let a=U.objectKeys(e),o=U.objectKeys(n).filter(m=>a.indexOf(m)!==-1),u={...n,...e};for(let m of o){let x=Ir(n[m],e[m]);if(!x.valid)return{valid:!1};u[m]=x.data}return{valid:!0,data:u}}else if(t===S.array&&r===S.array){if(n.length!==e.length)return{valid:!1};let a=[];for(let o=0;o<n.length;o++){let u=n[o],m=e[o],x=Ir(u,m);if(!x.valid)return{valid:!1};a.push(x.data)}return{valid:!0,data:a}}else return t===S.date&&r===S.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}var Je=class extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=(o,u)=>{if(rr(o)||rr(u))return F;let m=Ir(o.value,u.value);return m.valid?((nr(o)||nr(u))&&t.dirty(),{status:t.value,value:m.data}):(A(r,{code:T.invalid_intersection_types}),F)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,u])=>a(o,u)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Je.create=(n,e,t)=>new Je({left:n,right:e,typeName:B.ZodIntersection,...O(t)});var xe=class n extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.array)return A(r,{code:T.invalid_type,expected:S.array,received:r.parsedType}),F;if(r.data.length<this._def.items.length)return A(r,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F;!this._def.rest&&r.data.length>this._def.items.length&&(A(r,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let o=[...r.data].map((u,m)=>{let x=this._def.items[m]||this._def.rest;return x?x._parse(new ce(r,u,r.path,m)):null}).filter(u=>!!u);return r.common.async?Promise.all(o).then(u=>X.mergeArray(t,u)):X.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new n({...this._def,rest:e})}};xe.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xe({items:n,typeName:B.ZodTuple,rest:null,...O(e)})};var ar=class n extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.object)return A(r,{code:T.invalid_type,expected:S.object,received:r.parsedType}),F;let a=[],o=this._def.keyType,u=this._def.valueType;for(let m in r.data)a.push({key:o._parse(new ce(r,m,r.path,m)),value:u._parse(new ce(r,r.data[m],r.path,m)),alwaysSet:m in r.data});return r.common.async?X.mergeObjectAsync(t,a):X.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof L?new n({keyType:e,valueType:t,typeName:B.ZodRecord,...O(r)}):new n({keyType:Fe.create(),valueType:e,typeName:B.ZodRecord,...O(t)})}},yt=class extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.map)return A(r,{code:T.invalid_type,expected:S.map,received:r.parsedType}),F;let a=this._def.keyType,o=this._def.valueType,u=[...r.data.entries()].map(([m,x],k)=>({key:a._parse(new ce(r,m,r.path,[k,"key"])),value:o._parse(new ce(r,x,r.path,[k,"value"]))}));if(r.common.async){let m=new Map;return Promise.resolve().then(async()=>{for(let x of u){let k=await x.key,R=await x.value;if(k.status==="aborted"||R.status==="aborted")return F;(k.status==="dirty"||R.status==="dirty")&&t.dirty(),m.set(k.value,R.value)}return{status:t.value,value:m}})}else{let m=new Map;for(let x of u){let k=x.key,R=x.value;if(k.status==="aborted"||R.status==="aborted")return F;(k.status==="dirty"||R.status==="dirty")&&t.dirty(),m.set(k.value,R.value)}return{status:t.value,value:m}}}};yt.create=(n,e,t)=>new yt({valueType:e,keyType:n,typeName:B.ZodMap,...O(t)});var gt=class n extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.set)return A(r,{code:T.invalid_type,expected:S.set,received:r.parsedType}),F;let a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(A(r,{code:T.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(A(r,{code:T.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());let o=this._def.valueType;function u(x){let k=new Set;for(let R of x){if(R.status==="aborted")return F;R.status==="dirty"&&t.dirty(),k.add(R.value)}return{status:t.value,value:k}}let m=[...r.data.values()].map((x,k)=>o._parse(new ce(r,x,r.path,k)));return r.common.async?Promise.all(m).then(x=>u(x)):u(m)}min(e,t){return new n({...this._def,minSize:{value:e,message:N.toString(t)}})}max(e,t){return new n({...this._def,maxSize:{value:e,message:N.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};gt.create=(n,e)=>new gt({valueType:n,minSize:null,maxSize:null,typeName:B.ZodSet,...O(e)});var sr=class n extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.function)return A(t,{code:T.invalid_type,expected:S.function,received:t.parsedType}),F;function r(m,x){return $t({data:m,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,pt(),Te].filter(k=>!!k),issueData:{code:T.invalid_arguments,argumentsError:x}})}function a(m,x){return $t({data:m,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,pt(),Te].filter(k=>!!k),issueData:{code:T.invalid_return_type,returnTypeError:x}})}let o={errorMap:t.common.contextualErrorMap},u=t.data;if(this._def.returns instanceof Oe){let m=this;return ee(async function(...x){let k=new ae([]),R=await m._def.args.parseAsync(x,o).catch(C=>{throw k.addIssue(r(x,C)),k}),P=await Reflect.apply(u,this,R);return await m._def.returns._def.type.parseAsync(P,o).catch(C=>{throw k.addIssue(a(P,C)),k})})}else{let m=this;return ee(function(...x){let k=m._def.args.safeParse(x,o);if(!k.success)throw new ae([r(x,k.error)]);let R=Reflect.apply(u,this,k.data),P=m._def.returns.safeParse(R,o);if(!P.success)throw new ae([a(R,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new n({...this._def,args:xe.create(e).rest(Ie.create())})}returns(e){return new n({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new n({args:e||xe.create([]).rest(Ie.create()),returns:t||Ie.create(),typeName:B.ZodFunction,...O(r)})}},Ye=class extends L{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Ye.create=(n,e)=>new Ye({getter:n,typeName:B.ZodLazy,...O(e)});var Ke=class extends L{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return A(t,{received:t.data,code:T.invalid_literal,expected:this._def.value}),F}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ke.create=(n,e)=>new Ke({value:n,typeName:B.ZodLiteral,...O(e)});function Ta(n,e){return new Xe({values:n,typeName:B.ZodEnum,...O(e)})}var Xe=class n extends L{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return A(t,{expected:U.joinValues(r),received:t.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return A(t,{received:t.data,code:T.invalid_enum_value,options:r}),F}return ee(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return n.create(e,{...this._def,...t})}exclude(e,t=this._def){return n.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}};Xe.create=Ta;var Qe=class extends L{_parse(e){let t=U.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==S.string&&r.parsedType!==S.number){let a=U.objectValues(t);return A(r,{expected:U.joinValues(a),received:r.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(U.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let a=U.objectValues(t);return A(r,{received:r.data,code:T.invalid_enum_value,options:a}),F}return ee(e.data)}get enum(){return this._def.values}};Qe.create=(n,e)=>new Qe({values:n,typeName:B.ZodNativeEnum,...O(e)});var Oe=class extends L{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.promise&&t.common.async===!1)return A(t,{code:T.invalid_type,expected:S.promise,received:t.parsedType}),F;let r=t.parsedType===S.promise?t.data:Promise.resolve(t.data);return ee(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Oe.create=(n,e)=>new Oe({type:n,typeName:B.ZodPromise,...O(e)});var le=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===B.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,o={addIssue:u=>{A(r,u),u.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){let u=a.transform(r.data,o);if(r.common.async)return Promise.resolve(u).then(async m=>{if(t.value==="aborted")return F;let x=await this._def.schema._parseAsync({data:m,path:r.path,parent:r});return x.status==="aborted"?F:x.status==="dirty"?De(x.value):t.value==="dirty"?De(x.value):x});{if(t.value==="aborted")return F;let m=this._def.schema._parseSync({data:u,path:r.path,parent:r});return m.status==="aborted"?F:m.status==="dirty"?De(m.value):t.value==="dirty"?De(m.value):m}}if(a.type==="refinement"){let u=m=>{let x=a.refinement(m,o);if(r.common.async)return Promise.resolve(x);if(x instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return m};if(r.common.async===!1){let m=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return m.status==="aborted"?F:(m.status==="dirty"&&t.dirty(),u(m.value),{status:t.value,value:m.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(m=>m.status==="aborted"?F:(m.status==="dirty"&&t.dirty(),u(m.value).then(()=>({status:t.value,value:m.value}))))}if(a.type==="transform")if(r.common.async===!1){let u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ce(u))return F;let m=a.transform(u.value,o);if(m instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:m}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>Ce(u)?Promise.resolve(a.transform(u.value,o)).then(m=>({status:t.value,value:m})):F);U.assertNever(a)}};le.create=(n,e,t)=>new le({schema:n,typeName:B.ZodEffects,effect:e,...O(t)});le.createWithPreprocess=(n,e,t)=>new le({schema:e,effect:{type:"preprocess",transform:n},typeName:B.ZodEffects,...O(t)});var ue=class extends L{_parse(e){return this._getType(e)===S.undefined?ee(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ue.create=(n,e)=>new ue({innerType:n,typeName:B.ZodOptional,...O(e)});var ve=class extends L{_parse(e){return this._getType(e)===S.null?ee(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ve.create=(n,e)=>new ve({innerType:n,typeName:B.ZodNullable,...O(e)});var et=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===S.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};et.create=(n,e)=>new et({innerType:n,typeName:B.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});var tt=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return dt(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ae(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ae(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};tt.create=(n,e)=>new tt({innerType:n,typeName:B.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});var xt=class extends L{_parse(e){if(this._getType(e)!==S.nan){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.nan,received:r.parsedType}),F}return{status:"valid",value:e.data}}};xt.create=n=>new xt({typeName:B.ZodNaN,...O(n)});var ju=Symbol("zod_brand"),Dt=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},Vt=class n extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?F:o.status==="dirty"?(t.dirty(),De(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{let a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?F:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new n({in:e,out:t,typeName:B.ZodPipeline})}},rt=class extends L{_parse(e){let t=this._def.innerType._parse(e),r=a=>(Ce(a)&&(a.value=Object.freeze(a.value)),a);return dt(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}};rt.create=(n,e)=>new rt({innerType:n,typeName:B.ZodReadonly,...O(e)});function va(n,e){let t=typeof n=="function"?n(e):typeof n=="string"?{message:n}:n;return typeof t=="string"?{message:t}:t}function ka(n,e={},t){return n?Be.create().superRefine((r,a)=>{let o=n(r);if(o instanceof Promise)return o.then(u=>{if(!u){let m=va(e,r),x=m.fatal??t??!0;a.addIssue({code:"custom",...m,fatal:x})}});if(!o){let u=va(e,r),m=u.fatal??t??!0;a.addIssue({code:"custom",...u,fatal:m})}}):Be.create()}var Mu={object:se.lazycreate},B;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(B||(B={}));var Uu=(n,e={message:`Input not instance of ${n.name}`})=>ka(t=>t instanceof n,e),Ia=Fe.create,Ea=Ve.create,$u=xt.create,Du=We.create,Aa=qe.create,Vu=ze.create,Wu=mt.create,qu=Ze.create,zu=Ge.create,Zu=Be.create,Gu=Ie.create,Hu=me.create,Ju=ht.create,Yu=Ee.create,Ku=se.create,Xu=se.strictCreate,Qu=He.create,ec=ir.create,tc=Je.create,rc=xe.create,nc=ar.create,ic=yt.create,ac=gt.create,sc=sr.create,oc=Ye.create,uc=Ke.create,cc=Xe.create,lc=Qe.create,pc=Oe.create,dc=le.create,fc=ue.create,mc=ve.create,hc=le.createWithPreprocess,yc=Vt.create,gc=()=>Ia().optional(),xc=()=>Ea().optional(),vc=()=>Aa().optional(),bc={string:(n=>Fe.create({...n,coerce:!0})),number:(n=>Ve.create({...n,coerce:!0})),boolean:(n=>qe.create({...n,coerce:!0})),bigint:(n=>We.create({...n,coerce:!0})),date:(n=>ze.create({...n,coerce:!0}))};var wc=F;p();f();d();var Ra=y.strictObject({title:y.string(),content:y.string()});var _c=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,Sa=y.string().refine(n=>_c.test(n),{message:"Must be a valid JavaScript identifier (e.g., 'acme', 'MySDK')"}),Na=y.strictObject({namespace:y.optional(Sa),client:y.optional(y.string()),error:y.optional(y.string()),timeoutError:y.optional(y.string()),environment:y.optional(y.string()),environmentUrls:y.optional(y.string()),version:y.optional(y.string())}),Ca=y.union([Sa,Na]),Tc=y.strictObject({neverThrowErrors:y.optional(y.boolean()),outputEsm:y.optional(y.boolean()),outputSourceFiles:y.optional(y.boolean()),outputSrcOnly:y.optional(y.boolean()),includeCredentialsOnCrossOriginRequests:y.optional(y.boolean()),bundle:y.optional(y.boolean()),allowCustomFetcher:y.optional(y.boolean()),generateWebSocketClients:y.optional(y.boolean()),defaultTimeout:y.optional(y.union([y.literal("infinity"),y.number()])),skipResponseValidation:y.optional(y.boolean()),extraDependencies:y.optional(y.record(y.string())),extraDevDependencies:y.optional(y.record(y.string())),extraPeerDependencies:y.optional(y.record(y.string())),extraPeerDependenciesMeta:y.optional(y.record(y.any())),treatUnknownAsAny:y.optional(y.boolean()),noOptionalProperties:y.optional(y.boolean()),tolerateRepublish:y.optional(y.boolean()),packageJson:y.optional(y.record(y.any())),publishToJsr:y.optional(y.boolean()),omitUndefined:y.optional(y.boolean()),useLegacyExports:y.optional(y.boolean()),streamType:y.optional(y.enum(["wrapper","web"])),fileResponseType:y.optional(y.enum(["stream","binary-response"])),formDataSupport:y.optional(y.enum(["Node16","Node18"])),fetchSupport:y.optional(y.enum(["node-fetch","native"])),packagePath:y.optional(y.string()),omitFernHeaders:y.optional(y.boolean()),includePlatformHeaders:y.optional(y.boolean()),useDefaultRequestParameterValues:y.optional(y.boolean()),packageManager:y.optional(y.enum(["pnpm","yarn"])),flattenRequestParameters:y.optional(y.boolean()),exportAllRequestsAtRoot:y.optional(y.boolean()),customReadmeSections:y.optional(y.array(Ra)),testFramework:y.optional(y.enum(["jest","vitest"])),consolidateTypeFiles:y.optional(y.boolean()),generateEndpointMetadata:y.optional(y.boolean()),wireTestsFallbackToAutoGeneratedErrorExamples:y.boolean().optional(),linter:y.optional(y.enum(["biome","oxlint","none"])),formatter:y.optional(y.enum(["prettier","biome","oxfmt","none"])),enableForwardCompatibleEnums:y.optional(y.boolean()),parameterNaming:y.optional(y.enum(["originalName","wireValue","camelCase","snakeCase","default"])),generateSubpackageExports:y.optional(y.boolean()),allowExtraFields:y.optional(y.boolean()),enableInlineTypes:y.optional(y.boolean()),inlineFileProperties:y.optional(y.boolean()),inlinePathParameters:y.optional(y.boolean()),naming:y.optional(Ca),namespaceExport:y.optional(y.string()),noSerdeLayer:y.optional(y.boolean()),serdeLayer:y.optional(y.boolean()),private:y.optional(y.boolean()),requireDefaultEnvironment:y.optional(y.boolean()),retainOriginalCasing:y.optional(y.boolean()),useBigInt:y.optional(y.boolean()),useBrandedStringAliases:y.optional(y.boolean()),offsetSemantics:y.optional(y.enum(["item-index","page-index"])),customPagerName:y.optional(y.string()),resolveQueryParameterNameConflicts:y.optional(y.boolean()),alwaysSendAuth:y.optional(y.boolean()),"optional-auth":y.optional(y.boolean()),generateReactQueryHooks:y.optional(y.boolean()),includeContentHeadersOnFileDownloadResponse:y.optional(y.boolean()),includeUtilsOnUnionMembers:y.optional(y.boolean()),includeOtherInUnionTypes:y.optional(y.boolean()),writeUnitTests:y.optional(y.boolean()),generateWireTests:y.optional(y.boolean()),noScripts:y.optional(y.boolean()),skipNpmPkgFix:y.optional(y.boolean()),experimentalGenerateReadWriteOnlyTypes:y.optional(y.boolean()),defaultTimeoutInSeconds:y.optional(y.union([y.literal("infinity"),y.number()])),timeoutInSeconds:y.optional(y.union([y.literal("infinity"),y.number()])),includeApiReference:y.optional(y.boolean()),shouldGenerateWebsocketClients:y.optional(y.boolean()),_fernLicenseName:y.optional(y.string()),maxRetries:y.optional(y.number().int().min(0)),retryStatusCodes:y.optional(y.enum(["legacy","recommended"]))});function Wt(n){return n?.serdeLayer!=null?!n.serdeLayer:!!n?.noSerdeLayer}var E={};pe(E,{AstNode:()=>W,ClassInstantiation:()=>vt,CodeBlock:()=>bt,Comment:()=>Le,Function:()=>wt,FunctionInvocation:()=>_t,MethodInvocation:()=>Tt,Parameter:()=>kt,Reference:()=>it,Type:()=>nt,TypeLiteral:()=>Ae,Types:()=>nt,Variable:()=>It,Writer:()=>lt,codeblock:()=>Rc,function_:()=>Sc,instantiateClass:()=>Nc,invokeFunction:()=>Cc,invokeMethod:()=>Fc,parameter:()=>Bc,reference:()=>Oc,variable:()=>Lc});p();f();d();p();f();d();p();f();d();var vt=class extends W{constructor({class_:t,arguments_:r}){super();I(this,"class_");I(this,"arguments_");this.class_=t,this.arguments_=r}write(t){t.write("new "),t.writeNode(this.class_),t.write("("),t.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(t)}),t.write(")")}};p();f();d();var bt=class extends W{constructor(t){super();I(this,"args");this.args=t}write(t){return new de(this.args).write(t)}};p();f();d();var Le=class extends W{constructor({docs:t}={docs:void 0}){super();I(this,"docs");this.docs=t}write(t){this.docs!=null&&(t.writeLine("/**"),this.docs.split(`
19
+ `}}return e}};var W=class extends $e{async toStringAsync({customConfig:e,formatter:t}){let r=new Ut({customConfig:e,formatter:t});return this.write(r),await r.toStringAsync()}toString({customConfig:e,formatter:t}){let r=new Ut({customConfig:e,formatter:t});return this.write(r),r.toString()}};p();f();d();p();f();d();var h={};pe(h,{BRAND:()=>ju,DIRTY:()=>De,EMPTY_PATH:()=>hu,INVALID:()=>F,NEVER:()=>wc,OK:()=>ee,ParseStatus:()=>X,Schema:()=>L,ZodAny:()=>Be,ZodArray:()=>Ee,ZodBigInt:()=>We,ZodBoolean:()=>qe,ZodBranded:()=>Dt,ZodCatch:()=>tt,ZodDate:()=>ze,ZodDefault:()=>et,ZodDiscriminatedUnion:()=>ir,ZodEffects:()=>le,ZodEnum:()=>Xe,ZodError:()=>ae,ZodFirstPartyTypeKind:()=>B,ZodFunction:()=>sr,ZodIntersection:()=>Je,ZodIssueCode:()=>T,ZodLazy:()=>Ye,ZodLiteral:()=>Ke,ZodMap:()=>yt,ZodNaN:()=>xt,ZodNativeEnum:()=>Qe,ZodNever:()=>me,ZodNull:()=>Ge,ZodNullable:()=>ve,ZodNumber:()=>Ve,ZodObject:()=>se,ZodOptional:()=>ue,ZodParsedType:()=>S,ZodPipeline:()=>Vt,ZodPromise:()=>Oe,ZodReadonly:()=>rt,ZodRecord:()=>ar,ZodSchema:()=>L,ZodSet:()=>gt,ZodString:()=>Fe,ZodSymbol:()=>mt,ZodTransformer:()=>le,ZodTuple:()=>xe,ZodType:()=>L,ZodUndefined:()=>Ze,ZodUnion:()=>He,ZodUnknown:()=>Ie,ZodVoid:()=>ht,addIssueToContext:()=>A,any:()=>Zu,array:()=>Yu,bigint:()=>Du,boolean:()=>Aa,coerce:()=>bc,custom:()=>ka,date:()=>Vu,datetimeRegex:()=>_a,defaultErrorMap:()=>Te,discriminatedUnion:()=>ec,effect:()=>dc,enum:()=>cc,function:()=>sc,getErrorMap:()=>pt,getParsedType:()=>ge,instanceof:()=>Uu,intersection:()=>tc,isAborted:()=>rr,isAsync:()=>dt,isDirty:()=>nr,isValid:()=>Ce,late:()=>Mu,lazy:()=>oc,literal:()=>uc,makeIssue:()=>$t,map:()=>ic,nan:()=>$u,nativeEnum:()=>lc,never:()=>Hu,null:()=>zu,nullable:()=>mc,number:()=>Ea,object:()=>Ku,objectUtil:()=>Tr,oboolean:()=>vc,onumber:()=>xc,optional:()=>fc,ostring:()=>gc,pipeline:()=>yc,preprocess:()=>hc,promise:()=>pc,quotelessJson:()=>du,record:()=>nc,set:()=>ac,setErrorMap:()=>mu,strictObject:()=>Xu,string:()=>Ia,symbol:()=>Wu,transformer:()=>dc,tuple:()=>rc,undefined:()=>qu,union:()=>Qu,unknown:()=>Gu,util:()=>U,void:()=>Ju});p();f();d();p();f();d();p();f();d();p();f();d();p();f();d();var U;(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{let o={};for(let u of a)o[u]=u;return o},n.getValidEnumValues=a=>{let o=n.objectKeys(a).filter(m=>typeof a[a[m]]!="number"),u={};for(let m of o)u[m]=a[m];return n.objectValues(u)},n.objectValues=a=>n.objectKeys(a).map(function(o){return a[o]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{let o=[];for(let u in a)Object.prototype.hasOwnProperty.call(a,u)&&o.push(u);return o},n.find=(a,o)=>{for(let u of a)if(o(u))return u},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,o=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(o)}n.joinValues=r,n.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(U||(U={}));var Tr;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(Tr||(Tr={}));var S=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ge=n=>{switch(typeof n){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(n)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":return Array.isArray(n)?S.array:n===null?S.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?S.promise:typeof Map<"u"&&n instanceof Map?S.map:typeof Set<"u"&&n instanceof Set?S.set:typeof Date<"u"&&n instanceof Date?S.date:S.object;default:return S.unknown}};var T=U.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"]),du=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:"),ae=class n extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(o){return o.message},r={_errors:[]},a=o=>{for(let u of o.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)r._errors.push(t(u));else{let m=r,x=0;for(;x<u.path.length;){let k=u.path[x];x===u.path.length-1?(m[k]=m[k]||{_errors:[]},m[k]._errors.push(t(u))):m[k]=m[k]||{_errors:[]},m=m[k],x++}}};return a(this),r}static assert(e){if(!(e instanceof n))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},r=[];for(let a of this.issues)if(a.path.length>0){let o=a.path[0];t[o]=t[o]||[],t[o].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};ae.create=n=>new ae(n);var fu=(n,e)=>{let t;switch(n.code){case T.invalid_type:n.received===S.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case T.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,U.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:t=`Unrecognized key(s) in object: ${U.joinValues(n.keys,", ")}`;break;case T.invalid_union:t="Invalid input";break;case T.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${U.joinValues(n.options)}`;break;case T.invalid_enum_value:t=`Invalid enum value. Expected ${U.joinValues(n.options)}, received '${n.received}'`;break;case T.invalid_arguments:t="Invalid function arguments";break;case T.invalid_return_type:t="Invalid function return type";break;case T.invalid_date:t="Invalid date";break;case T.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:U.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case T.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case T.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case T.custom:t="Invalid input";break;case T.invalid_intersection_types:t="Intersection results could not be merged";break;case T.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case T.not_finite:t="Number must be finite";break;default:t=e.defaultError,U.assertNever(n)}return{message:t}},Te=fu;var ga=Te;function mu(n){ga=n}function pt(){return ga}p();f();d();var $t=n=>{let{data:e,path:t,errorMaps:r,issueData:a}=n,o=[...t,...a.path||[]],u={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let m="",x=r.filter(k=>!!k).slice().reverse();for(let k of x)m=k(u,{data:e,defaultError:m}).message;return{...a,path:o,message:m}},hu=[];function A(n,e){let t=pt(),r=$t({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===Te?void 0:Te].filter(a=>!!a)});n.common.issues.push(r)}var X=class n{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let a of t){if(a.status==="aborted")return F;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let a of t){let o=await a.key,u=await a.value;r.push({key:o,value:u})}return n.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let a of t){let{key:o,value:u}=a;if(o.status==="aborted"||u.status==="aborted")return F;o.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(r[o.value]=u.value)}return{status:e.value,value:r}}},F=Object.freeze({status:"aborted"}),De=n=>({status:"dirty",value:n}),ee=n=>({status:"valid",value:n}),rr=n=>n.status==="aborted",nr=n=>n.status==="dirty",Ce=n=>n.status==="valid",dt=n=>typeof Promise<"u"&&n instanceof Promise;p();f();d();p();f();d();var N;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e?.message})(N||(N={}));var ce=class{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}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}},xa=(n,e)=>{if(Ce(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new ae(n.common.issues);return this._error=t,this._error}}};function O(n){if(!n)return{};let{errorMap:e,invalid_type_error:t,required_error:r,description:a}=n;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(u,m)=>{let{message:x}=n;return u.code==="invalid_enum_value"?{message:x??m.defaultError}:typeof m.data>"u"?{message:x??r??m.defaultError}:u.code!=="invalid_type"?{message:m.defaultError}:{message:x??t??m.defaultError}},description:a}}var L=class{get description(){return this._def.description}_getType(e){return ge(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ge(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new X,ctx:{common:e.parent.common,data:e.data,parsedType:ge(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(dt(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)},a=this._parseSync({data:e,path:r.path,parent:r});return xa(r,a)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return Ce(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>Ce(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ge(e)},a=this._parse({data:e,path:r.path,parent:r}),o=await(dt(a)?a:Promise.resolve(a));return xa(r,o)}refine(e,t){let r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,o)=>{let u=e(a),m=()=>o.addIssue({code:T.custom,...r(a)});return typeof Promise<"u"&&u instanceof Promise?u.then(x=>x?!0:(m(),!1)):u?!0:(m(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new le({schema:this,typeName:B.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ue.create(this,this._def)}nullable(){return ve.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ee.create(this)}promise(){return Oe.create(this,this._def)}or(e){return He.create([this,e],this._def)}and(e){return Je.create(this,e,this._def)}transform(e){return new le({...O(this._def),schema:this,typeName:B.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new et({...O(this._def),innerType:this,defaultValue:t,typeName:B.ZodDefault})}brand(){return new Dt({typeName:B.ZodBranded,type:this,...O(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new tt({...O(this._def),innerType:this,catchValue:t,typeName:B.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Vt.create(this,e)}readonly(){return rt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},yu=/^c[^\s-]{8,}$/i,gu=/^[0-9a-z]+$/,xu=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vu=/^[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,bu=/^[a-z0-9_-]{21}$/i,wu=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_u=/^[-+]?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)?)??$/,Tu=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ku="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",kr,Iu=/^(?:(?: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])$/,Eu=/^(?:(?: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])$/,Au=/^(([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]))$/,Ru=/^(([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])$/,Su=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nu=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ba="((\\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])))",Cu=new RegExp(`^${ba}$`);function wa(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);let t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Fu(n){return new RegExp(`^${wa(n)}$`)}function _a(n){let e=`${ba}T${wa(n)}`,t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Bu(n,e){return!!((e==="v4"||!e)&&Iu.test(n)||(e==="v6"||!e)&&Au.test(n))}function Ou(n,e){if(!wu.test(n))return!1;try{let[t]=n.split(".");if(!t)return!1;let r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Lu(n,e){return!!((e==="v4"||!e)&&Eu.test(n)||(e==="v6"||!e)&&Ru.test(n))}var Fe=class n extends L{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==S.string){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_type,expected:S.string,received:o.parsedType}),F}let r=new X,a;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){let u=e.data.length>o.value,m=e.data.length<o.value;(u||m)&&(a=this._getOrReturnCtx(e,a),u?A(a,{code:T.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):m&&A(a,{code:T.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Tu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"email",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")kr||(kr=new RegExp(ku,"u")),kr.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"emoji",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")vu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"uuid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")bu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"nanoid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")yu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"cuid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")gu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"cuid2",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")xu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"ulid",code:T.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),A(a,{validation:"url",code:T.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"regex",code:T.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?_a(o).test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?Cu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Fu(o).test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:T.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?_u.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"duration",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Bu(e.data,o.version)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"ip",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?Ou(e.data,o.alg)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"jwt",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Lu(e.data,o.version)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"cidr",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?Su.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"base64",code:T.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?Nu.test(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{validation:"base64url",code:T.invalid_string,message:o.message}),r.dirty()):U.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:T.invalid_string,...N.errToObj(r)})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...N.errToObj(e)})}url(e){return this._addCheck({kind:"url",...N.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...N.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...N.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...N.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...N.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...N.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...N.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...N.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...N.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...N.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...N.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...N.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...N.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...N.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...N.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...N.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...N.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...N.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...N.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...N.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...N.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...N.errToObj(t)})}nonempty(e){return this.min(1,N.errToObj(e))}trim(){return new n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new n({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};Fe.create=n=>new Fe({checks:[],typeName:B.ZodString,coerce:n?.coerce??!1,...O(n)});function Pu(n,e){let t=(n.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,o=Number.parseInt(n.toFixed(a).replace(".","")),u=Number.parseInt(e.toFixed(a).replace(".",""));return o%u/10**a}var Ve=class n extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==S.number){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_type,expected:S.number,received:o.parsedType}),F}let r,a=new X;for(let o of this._def.checks)o.kind==="int"?U.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),A(r,{code:T.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?Pu(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),A(r,{code:T.not_finite,message:o.message}),a.dirty()):U.assertNever(o);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,N.toString(t))}gt(e,t){return this.setLimit("min",e,!1,N.toString(t))}lte(e,t){return this.setLimit("max",e,!0,N.toString(t))}lt(e,t){return this.setLimit("max",e,!1,N.toString(t))}setLimit(e,t,r,a){return new n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:N.toString(a)}]})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:N.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:N.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:N.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:N.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:N.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&U.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}};Ve.create=n=>new Ve({checks:[],typeName:B.ZodNumber,coerce:n?.coerce||!1,...O(n)});var We=class n extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==S.bigint)return this._getInvalidInput(e);let r,a=new X;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),A(r,{code:T.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):U.assertNever(o);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return A(t,{code:T.invalid_type,expected:S.bigint,received:t.parsedType}),F}gte(e,t){return this.setLimit("min",e,!0,N.toString(t))}gt(e,t){return this.setLimit("min",e,!1,N.toString(t))}lte(e,t){return this.setLimit("max",e,!0,N.toString(t))}lt(e,t){return this.setLimit("max",e,!1,N.toString(t))}setLimit(e,t,r,a){return new n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:N.toString(a)}]})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:N.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};We.create=n=>new We({checks:[],typeName:B.ZodBigInt,coerce:n?.coerce??!1,...O(n)});var qe=class extends L{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==S.boolean){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.boolean,received:r.parsedType}),F}return ee(e.data)}};qe.create=n=>new qe({typeName:B.ZodBoolean,coerce:n?.coerce||!1,...O(n)});var ze=class n extends L{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==S.date){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_type,expected:S.date,received:o.parsedType}),F}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return A(o,{code:T.invalid_date}),F}let r=new X,a;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(a=this._getOrReturnCtx(e,a),A(a,{code:T.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):U.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:N.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:N.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};ze.create=n=>new ze({checks:[],coerce:n?.coerce||!1,typeName:B.ZodDate,...O(n)});var mt=class extends L{_parse(e){if(this._getType(e)!==S.symbol){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.symbol,received:r.parsedType}),F}return ee(e.data)}};mt.create=n=>new mt({typeName:B.ZodSymbol,...O(n)});var Ze=class extends L{_parse(e){if(this._getType(e)!==S.undefined){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.undefined,received:r.parsedType}),F}return ee(e.data)}};Ze.create=n=>new Ze({typeName:B.ZodUndefined,...O(n)});var Ge=class extends L{_parse(e){if(this._getType(e)!==S.null){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.null,received:r.parsedType}),F}return ee(e.data)}};Ge.create=n=>new Ge({typeName:B.ZodNull,...O(n)});var Be=class extends L{constructor(){super(...arguments),this._any=!0}_parse(e){return ee(e.data)}};Be.create=n=>new Be({typeName:B.ZodAny,...O(n)});var Ie=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ee(e.data)}};Ie.create=n=>new Ie({typeName:B.ZodUnknown,...O(n)});var me=class extends L{_parse(e){let t=this._getOrReturnCtx(e);return A(t,{code:T.invalid_type,expected:S.never,received:t.parsedType}),F}};me.create=n=>new me({typeName:B.ZodNever,...O(n)});var ht=class extends L{_parse(e){if(this._getType(e)!==S.undefined){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.void,received:r.parsedType}),F}return ee(e.data)}};ht.create=n=>new ht({typeName:B.ZodVoid,...O(n)});var Ee=class n extends L{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==S.array)return A(t,{code:T.invalid_type,expected:S.array,received:t.parsedType}),F;if(a.exactLength!==null){let u=t.data.length>a.exactLength.value,m=t.data.length<a.exactLength.value;(u||m)&&(A(t,{code:u?T.too_big:T.too_small,minimum:m?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(A(t,{code:T.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(A(t,{code:T.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((u,m)=>a.type._parseAsync(new ce(t,u,t.path,m)))).then(u=>X.mergeArray(r,u));let o=[...t.data].map((u,m)=>a.type._parseSync(new ce(t,u,t.path,m)));return X.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new n({...this._def,minLength:{value:e,message:N.toString(t)}})}max(e,t){return new n({...this._def,maxLength:{value:e,message:N.toString(t)}})}length(e,t){return new n({...this._def,exactLength:{value:e,message:N.toString(t)}})}nonempty(e){return this.min(1,e)}};Ee.create=(n,e)=>new Ee({type:n,minLength:null,maxLength:null,exactLength:null,typeName:B.ZodArray,...O(e)});function ft(n){if(n instanceof se){let e={};for(let t in n.shape){let r=n.shape[t];e[t]=ue.create(ft(r))}return new se({...n._def,shape:()=>e})}else return n instanceof Ee?new Ee({...n._def,type:ft(n.element)}):n instanceof ue?ue.create(ft(n.unwrap())):n instanceof ve?ve.create(ft(n.unwrap())):n instanceof xe?xe.create(n.items.map(e=>ft(e))):n}var se=class n extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=U.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==S.object){let k=this._getOrReturnCtx(e);return A(k,{code:T.invalid_type,expected:S.object,received:k.parsedType}),F}let{status:r,ctx:a}=this._processInputParams(e),{shape:o,keys:u}=this._getCached(),m=[];if(!(this._def.catchall instanceof me&&this._def.unknownKeys==="strip"))for(let k in a.data)u.includes(k)||m.push(k);let x=[];for(let k of u){let R=o[k],P=a.data[k];x.push({key:{status:"valid",value:k},value:R._parse(new ce(a,P,a.path,k)),alwaysSet:k in a.data})}if(this._def.catchall instanceof me){let k=this._def.unknownKeys;if(k==="passthrough")for(let R of m)x.push({key:{status:"valid",value:R},value:{status:"valid",value:a.data[R]}});else if(k==="strict")m.length>0&&(A(a,{code:T.unrecognized_keys,keys:m}),r.dirty());else if(k!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let k=this._def.catchall;for(let R of m){let P=a.data[R];x.push({key:{status:"valid",value:R},value:k._parse(new ce(a,P,a.path,R)),alwaysSet:R in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let k=[];for(let R of x){let P=await R.key,Y=await R.value;k.push({key:P,value:Y,alwaysSet:R.alwaysSet})}return k}).then(k=>X.mergeObjectSync(r,k)):X.mergeObjectSync(r,x)}get shape(){return this._def.shape()}strict(e){return N.errToObj,new n({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let a=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:N.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new n({...this._def,unknownKeys:"strip"})}passthrough(){return new n({...this._def,unknownKeys:"passthrough"})}extend(e){return new n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new n({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:B.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new n({...this._def,catchall:e})}pick(e){let t={};for(let r of U.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new n({...this._def,shape:()=>t})}omit(e){let t={};for(let r of U.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new n({...this._def,shape:()=>t})}deepPartial(){return ft(this)}partial(e){let t={};for(let r of U.objectKeys(this.shape)){let a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new n({...this._def,shape:()=>t})}required(e){let t={};for(let r of U.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ue;)o=o._def.innerType;t[r]=o}return new n({...this._def,shape:()=>t})}keyof(){return Ta(U.objectKeys(this.shape))}};se.create=(n,e)=>new se({shape:()=>n,unknownKeys:"strip",catchall:me.create(),typeName:B.ZodObject,...O(e)});se.strictCreate=(n,e)=>new se({shape:()=>n,unknownKeys:"strict",catchall:me.create(),typeName:B.ZodObject,...O(e)});se.lazycreate=(n,e)=>new se({shape:n,unknownKeys:"strip",catchall:me.create(),typeName:B.ZodObject,...O(e)});var He=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function a(o){for(let m of o)if(m.result.status==="valid")return m.result;for(let m of o)if(m.result.status==="dirty")return t.common.issues.push(...m.ctx.common.issues),m.result;let u=o.map(m=>new ae(m.ctx.common.issues));return A(t,{code:T.invalid_union,unionErrors:u}),F}if(t.common.async)return Promise.all(r.map(async o=>{let u={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:u}),ctx:u}})).then(a);{let o,u=[];for(let x of r){let k={...t,common:{...t.common,issues:[]},parent:null},R=x._parseSync({data:t.data,path:t.path,parent:k});if(R.status==="valid")return R;R.status==="dirty"&&!o&&(o={result:R,ctx:k}),k.common.issues.length&&u.push(k.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;let m=u.map(x=>new ae(x));return A(t,{code:T.invalid_union,unionErrors:m}),F}}get options(){return this._def.options}};He.create=(n,e)=>new He({options:n,typeName:B.ZodUnion,...O(e)});var ke=n=>n instanceof Ye?ke(n.schema):n instanceof le?ke(n.innerType()):n instanceof Ke?[n.value]:n instanceof Xe?n.options:n instanceof Qe?U.objectValues(n.enum):n instanceof et?ke(n._def.innerType):n instanceof Ze?[void 0]:n instanceof Ge?[null]:n instanceof ue?[void 0,...ke(n.unwrap())]:n instanceof ve?[null,...ke(n.unwrap())]:n instanceof Dt||n instanceof rt?ke(n.unwrap()):n instanceof tt?ke(n._def.innerType):[],ir=class n extends L{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.object)return A(t,{code:T.invalid_type,expected:S.object,received:t.parsedType}),F;let r=this.discriminator,a=t.data[r],o=this.optionsMap.get(a);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(A(t,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),F)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let a=new Map;for(let o of t){let u=ke(o.shape[e]);if(!u.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let m of u){if(a.has(m))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(m)}`);a.set(m,o)}}return new n({typeName:B.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...O(r)})}};function Ir(n,e){let t=ge(n),r=ge(e);if(n===e)return{valid:!0,data:n};if(t===S.object&&r===S.object){let a=U.objectKeys(e),o=U.objectKeys(n).filter(m=>a.indexOf(m)!==-1),u={...n,...e};for(let m of o){let x=Ir(n[m],e[m]);if(!x.valid)return{valid:!1};u[m]=x.data}return{valid:!0,data:u}}else if(t===S.array&&r===S.array){if(n.length!==e.length)return{valid:!1};let a=[];for(let o=0;o<n.length;o++){let u=n[o],m=e[o],x=Ir(u,m);if(!x.valid)return{valid:!1};a.push(x.data)}return{valid:!0,data:a}}else return t===S.date&&r===S.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}var Je=class extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=(o,u)=>{if(rr(o)||rr(u))return F;let m=Ir(o.value,u.value);return m.valid?((nr(o)||nr(u))&&t.dirty(),{status:t.value,value:m.data}):(A(r,{code:T.invalid_intersection_types}),F)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,u])=>a(o,u)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Je.create=(n,e,t)=>new Je({left:n,right:e,typeName:B.ZodIntersection,...O(t)});var xe=class n extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.array)return A(r,{code:T.invalid_type,expected:S.array,received:r.parsedType}),F;if(r.data.length<this._def.items.length)return A(r,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F;!this._def.rest&&r.data.length>this._def.items.length&&(A(r,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let o=[...r.data].map((u,m)=>{let x=this._def.items[m]||this._def.rest;return x?x._parse(new ce(r,u,r.path,m)):null}).filter(u=>!!u);return r.common.async?Promise.all(o).then(u=>X.mergeArray(t,u)):X.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new n({...this._def,rest:e})}};xe.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xe({items:n,typeName:B.ZodTuple,rest:null,...O(e)})};var ar=class n extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.object)return A(r,{code:T.invalid_type,expected:S.object,received:r.parsedType}),F;let a=[],o=this._def.keyType,u=this._def.valueType;for(let m in r.data)a.push({key:o._parse(new ce(r,m,r.path,m)),value:u._parse(new ce(r,r.data[m],r.path,m)),alwaysSet:m in r.data});return r.common.async?X.mergeObjectAsync(t,a):X.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof L?new n({keyType:e,valueType:t,typeName:B.ZodRecord,...O(r)}):new n({keyType:Fe.create(),valueType:e,typeName:B.ZodRecord,...O(t)})}},yt=class extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.map)return A(r,{code:T.invalid_type,expected:S.map,received:r.parsedType}),F;let a=this._def.keyType,o=this._def.valueType,u=[...r.data.entries()].map(([m,x],k)=>({key:a._parse(new ce(r,m,r.path,[k,"key"])),value:o._parse(new ce(r,x,r.path,[k,"value"]))}));if(r.common.async){let m=new Map;return Promise.resolve().then(async()=>{for(let x of u){let k=await x.key,R=await x.value;if(k.status==="aborted"||R.status==="aborted")return F;(k.status==="dirty"||R.status==="dirty")&&t.dirty(),m.set(k.value,R.value)}return{status:t.value,value:m}})}else{let m=new Map;for(let x of u){let k=x.key,R=x.value;if(k.status==="aborted"||R.status==="aborted")return F;(k.status==="dirty"||R.status==="dirty")&&t.dirty(),m.set(k.value,R.value)}return{status:t.value,value:m}}}};yt.create=(n,e,t)=>new yt({valueType:e,keyType:n,typeName:B.ZodMap,...O(t)});var gt=class n extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.set)return A(r,{code:T.invalid_type,expected:S.set,received:r.parsedType}),F;let a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(A(r,{code:T.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(A(r,{code:T.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());let o=this._def.valueType;function u(x){let k=new Set;for(let R of x){if(R.status==="aborted")return F;R.status==="dirty"&&t.dirty(),k.add(R.value)}return{status:t.value,value:k}}let m=[...r.data.values()].map((x,k)=>o._parse(new ce(r,x,r.path,k)));return r.common.async?Promise.all(m).then(x=>u(x)):u(m)}min(e,t){return new n({...this._def,minSize:{value:e,message:N.toString(t)}})}max(e,t){return new n({...this._def,maxSize:{value:e,message:N.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};gt.create=(n,e)=>new gt({valueType:n,minSize:null,maxSize:null,typeName:B.ZodSet,...O(e)});var sr=class n extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.function)return A(t,{code:T.invalid_type,expected:S.function,received:t.parsedType}),F;function r(m,x){return $t({data:m,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,pt(),Te].filter(k=>!!k),issueData:{code:T.invalid_arguments,argumentsError:x}})}function a(m,x){return $t({data:m,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,pt(),Te].filter(k=>!!k),issueData:{code:T.invalid_return_type,returnTypeError:x}})}let o={errorMap:t.common.contextualErrorMap},u=t.data;if(this._def.returns instanceof Oe){let m=this;return ee(async function(...x){let k=new ae([]),R=await m._def.args.parseAsync(x,o).catch(C=>{throw k.addIssue(r(x,C)),k}),P=await Reflect.apply(u,this,R);return await m._def.returns._def.type.parseAsync(P,o).catch(C=>{throw k.addIssue(a(P,C)),k})})}else{let m=this;return ee(function(...x){let k=m._def.args.safeParse(x,o);if(!k.success)throw new ae([r(x,k.error)]);let R=Reflect.apply(u,this,k.data),P=m._def.returns.safeParse(R,o);if(!P.success)throw new ae([a(R,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new n({...this._def,args:xe.create(e).rest(Ie.create())})}returns(e){return new n({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new n({args:e||xe.create([]).rest(Ie.create()),returns:t||Ie.create(),typeName:B.ZodFunction,...O(r)})}},Ye=class extends L{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Ye.create=(n,e)=>new Ye({getter:n,typeName:B.ZodLazy,...O(e)});var Ke=class extends L{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return A(t,{received:t.data,code:T.invalid_literal,expected:this._def.value}),F}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ke.create=(n,e)=>new Ke({value:n,typeName:B.ZodLiteral,...O(e)});function Ta(n,e){return new Xe({values:n,typeName:B.ZodEnum,...O(e)})}var Xe=class n extends L{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return A(t,{expected:U.joinValues(r),received:t.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return A(t,{received:t.data,code:T.invalid_enum_value,options:r}),F}return ee(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return n.create(e,{...this._def,...t})}exclude(e,t=this._def){return n.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}};Xe.create=Ta;var Qe=class extends L{_parse(e){let t=U.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==S.string&&r.parsedType!==S.number){let a=U.objectValues(t);return A(r,{expected:U.joinValues(a),received:r.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(U.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let a=U.objectValues(t);return A(r,{received:r.data,code:T.invalid_enum_value,options:a}),F}return ee(e.data)}get enum(){return this._def.values}};Qe.create=(n,e)=>new Qe({values:n,typeName:B.ZodNativeEnum,...O(e)});var Oe=class extends L{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.promise&&t.common.async===!1)return A(t,{code:T.invalid_type,expected:S.promise,received:t.parsedType}),F;let r=t.parsedType===S.promise?t.data:Promise.resolve(t.data);return ee(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Oe.create=(n,e)=>new Oe({type:n,typeName:B.ZodPromise,...O(e)});var le=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===B.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,o={addIssue:u=>{A(r,u),u.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){let u=a.transform(r.data,o);if(r.common.async)return Promise.resolve(u).then(async m=>{if(t.value==="aborted")return F;let x=await this._def.schema._parseAsync({data:m,path:r.path,parent:r});return x.status==="aborted"?F:x.status==="dirty"?De(x.value):t.value==="dirty"?De(x.value):x});{if(t.value==="aborted")return F;let m=this._def.schema._parseSync({data:u,path:r.path,parent:r});return m.status==="aborted"?F:m.status==="dirty"?De(m.value):t.value==="dirty"?De(m.value):m}}if(a.type==="refinement"){let u=m=>{let x=a.refinement(m,o);if(r.common.async)return Promise.resolve(x);if(x instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return m};if(r.common.async===!1){let m=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return m.status==="aborted"?F:(m.status==="dirty"&&t.dirty(),u(m.value),{status:t.value,value:m.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(m=>m.status==="aborted"?F:(m.status==="dirty"&&t.dirty(),u(m.value).then(()=>({status:t.value,value:m.value}))))}if(a.type==="transform")if(r.common.async===!1){let u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ce(u))return F;let m=a.transform(u.value,o);if(m instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:m}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>Ce(u)?Promise.resolve(a.transform(u.value,o)).then(m=>({status:t.value,value:m})):F);U.assertNever(a)}};le.create=(n,e,t)=>new le({schema:n,typeName:B.ZodEffects,effect:e,...O(t)});le.createWithPreprocess=(n,e,t)=>new le({schema:e,effect:{type:"preprocess",transform:n},typeName:B.ZodEffects,...O(t)});var ue=class extends L{_parse(e){return this._getType(e)===S.undefined?ee(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ue.create=(n,e)=>new ue({innerType:n,typeName:B.ZodOptional,...O(e)});var ve=class extends L{_parse(e){return this._getType(e)===S.null?ee(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ve.create=(n,e)=>new ve({innerType:n,typeName:B.ZodNullable,...O(e)});var et=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===S.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};et.create=(n,e)=>new et({innerType:n,typeName:B.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});var tt=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return dt(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ae(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ae(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};tt.create=(n,e)=>new tt({innerType:n,typeName:B.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});var xt=class extends L{_parse(e){if(this._getType(e)!==S.nan){let r=this._getOrReturnCtx(e);return A(r,{code:T.invalid_type,expected:S.nan,received:r.parsedType}),F}return{status:"valid",value:e.data}}};xt.create=n=>new xt({typeName:B.ZodNaN,...O(n)});var ju=Symbol("zod_brand"),Dt=class extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},Vt=class n extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?F:o.status==="dirty"?(t.dirty(),De(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{let a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?F:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new n({in:e,out:t,typeName:B.ZodPipeline})}},rt=class extends L{_parse(e){let t=this._def.innerType._parse(e),r=a=>(Ce(a)&&(a.value=Object.freeze(a.value)),a);return dt(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}};rt.create=(n,e)=>new rt({innerType:n,typeName:B.ZodReadonly,...O(e)});function va(n,e){let t=typeof n=="function"?n(e):typeof n=="string"?{message:n}:n;return typeof t=="string"?{message:t}:t}function ka(n,e={},t){return n?Be.create().superRefine((r,a)=>{let o=n(r);if(o instanceof Promise)return o.then(u=>{if(!u){let m=va(e,r),x=m.fatal??t??!0;a.addIssue({code:"custom",...m,fatal:x})}});if(!o){let u=va(e,r),m=u.fatal??t??!0;a.addIssue({code:"custom",...u,fatal:m})}}):Be.create()}var Mu={object:se.lazycreate},B;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(B||(B={}));var Uu=(n,e={message:`Input not instance of ${n.name}`})=>ka(t=>t instanceof n,e),Ia=Fe.create,Ea=Ve.create,$u=xt.create,Du=We.create,Aa=qe.create,Vu=ze.create,Wu=mt.create,qu=Ze.create,zu=Ge.create,Zu=Be.create,Gu=Ie.create,Hu=me.create,Ju=ht.create,Yu=Ee.create,Ku=se.create,Xu=se.strictCreate,Qu=He.create,ec=ir.create,tc=Je.create,rc=xe.create,nc=ar.create,ic=yt.create,ac=gt.create,sc=sr.create,oc=Ye.create,uc=Ke.create,cc=Xe.create,lc=Qe.create,pc=Oe.create,dc=le.create,fc=ue.create,mc=ve.create,hc=le.createWithPreprocess,yc=Vt.create,gc=()=>Ia().optional(),xc=()=>Ea().optional(),vc=()=>Aa().optional(),bc={string:(n=>Fe.create({...n,coerce:!0})),number:(n=>Ve.create({...n,coerce:!0})),boolean:(n=>qe.create({...n,coerce:!0})),bigint:(n=>We.create({...n,coerce:!0})),date:(n=>ze.create({...n,coerce:!0}))};var wc=F;p();f();d();var Ra=h.strictObject({title:h.string(),content:h.string()});var _c=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,Sa=h.string().refine(n=>_c.test(n),{message:"Must be a valid JavaScript identifier (e.g., 'acme', 'MySDK')"}),Na=h.strictObject({namespace:h.optional(Sa),client:h.optional(h.string()),error:h.optional(h.string()),timeoutError:h.optional(h.string()),environment:h.optional(h.string()),environmentUrls:h.optional(h.string()),version:h.optional(h.string())}),Ca=h.union([Sa,Na]),Tc=h.strictObject({neverThrowErrors:h.optional(h.boolean()),outputEsm:h.optional(h.boolean()),outputSourceFiles:h.optional(h.boolean()),outputSrcOnly:h.optional(h.boolean()),includeCredentialsOnCrossOriginRequests:h.optional(h.boolean()),bundle:h.optional(h.boolean()),allowCustomFetcher:h.optional(h.boolean()),generateWebSocketClients:h.optional(h.boolean()),defaultTimeout:h.optional(h.union([h.literal("infinity"),h.number()])),skipResponseValidation:h.optional(h.boolean()),extraDependencies:h.optional(h.record(h.string())),extraDevDependencies:h.optional(h.record(h.string())),extraPeerDependencies:h.optional(h.record(h.string())),extraPeerDependenciesMeta:h.optional(h.record(h.any())),treatUnknownAsAny:h.optional(h.boolean()),noOptionalProperties:h.optional(h.boolean()),tolerateRepublish:h.optional(h.boolean()),packageJson:h.optional(h.record(h.any())),publishToJsr:h.optional(h.boolean()),omitUndefined:h.optional(h.boolean()),useLegacyExports:h.optional(h.boolean()),streamType:h.optional(h.enum(["wrapper","web"])),fileResponseType:h.optional(h.enum(["stream","binary-response"])),formDataSupport:h.optional(h.enum(["Node16","Node18"])),fetchSupport:h.optional(h.enum(["node-fetch","native"])),packagePath:h.optional(h.string()),omitFernHeaders:h.optional(h.boolean()),includePlatformHeaders:h.optional(h.boolean()),allowUserAgentAppInfo:h.optional(h.boolean()),useDefaultRequestParameterValues:h.optional(h.boolean()),packageManager:h.optional(h.enum(["pnpm","yarn"])),flattenRequestParameters:h.optional(h.boolean()),exportAllRequestsAtRoot:h.optional(h.boolean()),customReadmeSections:h.optional(h.array(Ra)),testFramework:h.optional(h.enum(["jest","vitest"])),consolidateTypeFiles:h.optional(h.boolean()),generateEndpointMetadata:h.optional(h.boolean()),wireTestsFallbackToAutoGeneratedErrorExamples:h.boolean().optional(),linter:h.optional(h.enum(["biome","oxlint","none"])),formatter:h.optional(h.enum(["prettier","biome","oxfmt","none"])),enableForwardCompatibleEnums:h.optional(h.boolean()),parameterNaming:h.optional(h.enum(["originalName","wireValue","camelCase","snakeCase","default"])),generateSubpackageExports:h.optional(h.boolean()),allowExtraFields:h.optional(h.boolean()),enableInlineTypes:h.optional(h.boolean()),inlineFileProperties:h.optional(h.boolean()),inlinePathParameters:h.optional(h.boolean()),naming:h.optional(Ca),namespaceExport:h.optional(h.string()),noSerdeLayer:h.optional(h.boolean()),serdeLayer:h.optional(h.boolean()),private:h.optional(h.boolean()),requireDefaultEnvironment:h.optional(h.boolean()),requireBaseUrl:h.optional(h.boolean()),retainOriginalCasing:h.optional(h.boolean()),useBigInt:h.optional(h.boolean()),useBrandedStringAliases:h.optional(h.boolean()),offsetSemantics:h.optional(h.enum(["item-index","page-index"])),customPagerName:h.optional(h.string()),resolveQueryParameterNameConflicts:h.optional(h.boolean()),alwaysSendAuth:h.optional(h.boolean()),"optional-auth":h.optional(h.boolean()),generateReactQueryHooks:h.optional(h.boolean()),includeContentHeadersOnFileDownloadResponse:h.optional(h.boolean()),includeUtilsOnUnionMembers:h.optional(h.boolean()),includeOtherInUnionTypes:h.optional(h.boolean()),writeUnitTests:h.optional(h.boolean()),generateWireTests:h.optional(h.boolean()),noScripts:h.optional(h.boolean()),skipNpmPkgFix:h.optional(h.boolean()),experimentalGenerateReadWriteOnlyTypes:h.optional(h.boolean()),defaultTimeoutInSeconds:h.optional(h.union([h.literal("infinity"),h.number()])),timeoutInSeconds:h.optional(h.union([h.literal("infinity"),h.number()])),includeApiReference:h.optional(h.boolean()),shouldGenerateWebsocketClients:h.optional(h.boolean()),_fernLicenseName:h.optional(h.string()),maxRetries:h.optional(h.number().int().min(0)),retryStatusCodes:h.optional(h.enum(["legacy","recommended"]))});function Wt(n){return n?.serdeLayer!=null?!n.serdeLayer:!!n?.noSerdeLayer}var E={};pe(E,{AstNode:()=>W,ClassInstantiation:()=>vt,CodeBlock:()=>bt,Comment:()=>Le,Function:()=>wt,FunctionInvocation:()=>_t,MethodInvocation:()=>Tt,Parameter:()=>kt,Reference:()=>it,Type:()=>nt,TypeLiteral:()=>Ae,Types:()=>nt,Variable:()=>It,Writer:()=>lt,codeblock:()=>Rc,function_:()=>Sc,instantiateClass:()=>Nc,invokeFunction:()=>Cc,invokeMethod:()=>Fc,parameter:()=>Bc,reference:()=>Oc,variable:()=>Lc});p();f();d();p();f();d();p();f();d();var vt=class extends W{constructor({class_:t,arguments_:r}){super();I(this,"class_");I(this,"arguments_");this.class_=t,this.arguments_=r}write(t){t.write("new "),t.writeNode(this.class_),t.write("("),t.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(t)}),t.write(")")}};p();f();d();var bt=class extends W{constructor(t){super();I(this,"args");this.args=t}write(t){return new de(this.args).write(t)}};p();f();d();var Le=class extends W{constructor({docs:t}={docs:void 0}){super();I(this,"docs");this.docs=t}write(t){this.docs!=null&&(t.writeLine("/**"),this.docs.split(`
20
20
  `).forEach(r=>{t.writeLine(` * ${r}`)}),t.writeLine("*/"))}};p();f();d();p();f();d();var nt=class extends W{constructor(t){super();I(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"string":t.write("string");break;case"number":t.write("number");break;case"bigint":t.write("bigint");break;case"boolean":t.write("boolean");break;case"array":this.internalType.valueType.write(t),t.write("[]");break;case"map":t.write("Record<"),this.internalType.keyType.write(t),t.write(", "),this.internalType.valueType.write(t),t.write(">");break;case"object":t.write("{"),t.indent();for(let[r,a]of Object.entries(this.internalType.fields))t.write(`${r}: `),a.write(t),t.writeLine(",");t.dedent(),t.write("}");break;case"enum":t.write("enum");break;case"any":t.write("any");break;case"promise":t.write("Promise<"),this.internalType.value.write(t),t.write(">");break;case"unknown":t.write("unknown");break;case"void":t.write("void");break;case"undefined":t.write("undefined");break;case"null":t.write("null");break;case"never":t.write("never");break;case"nop":break;default:q(this.internalType)}}static string(){return new this({type:"string"})}static number(){return new this({type:"number"})}static bigint(){return new this({type:"bigint"})}static boolean(){return new this({type:"boolean"})}static array(t){return new this({type:"array",valueType:t})}static object(t){return new this({type:"object",fields:t})}static enum(t){return new this({type:"enum",values:t})}static any(){return new this({type:"any"})}static promise(t){return t.internalType.type==="promise"?t:new this({type:"promise",value:t})}static unknown(){return new this({type:"unknown"})}static void(){return new this({type:"void"})}static undefined(){return new this({type:"undefined"})}static null(){return new this({type:"null"})}static never(){return new this({type:"never"})}static nop(){return new this({type:"nop"})}};var wt=class extends W{constructor({name:t,parameters:r,async:a,body:o,return_:u,docs:m}){super();I(this,"name");I(this,"parameters");I(this,"async");I(this,"body");I(this,"return_");I(this,"docs");this.name=t,this.parameters=r,this.async=a??!1,this.body=o,this.return_=u,this.docs=m}write(t){t.writeNode(new Le({docs:this.docs})),this.async&&t.write("async "),t.write("function "),t.write(`${this.name}`),this.writeParameters(t),this.return_!=null&&(t.write(": "),t.writeNode(this.async?nt.promise(this.return_):this.return_)),t.writeLine(" {"),t.indent(),this.body?.write(t),t.dedent(),t.writeNewLineIfLastLineNot(),t.writeLine("}")}writeParameters(t){if(this.parameters.length===0){t.write("()");return}t.indent(),t.writeLine("(");for(let r of this.parameters)t.writeNode(r),t.writeLine(",");t.dedent(),t.write(")")}};p();f();d();var _t=class extends W{constructor({function_:t,arguments_:r}){super();I(this,"function_");I(this,"arguments_");this.function_=t,this.arguments_=r}write(t){t.writeNode(this.function_),t.write("("),t.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(t)}),t.write(")")}};p();f();d();var Tt=class extends W{constructor({on:t,method:r,arguments_:a,async:o}){super();I(this,"on");I(this,"method");I(this,"arguments_");I(this,"async");this.on=t,this.method=r,this.arguments_=a,this.async=o}write(t){this.async&&t.write("await "),this.on.write(t),t.write("."),t.write(this.method),t.write("("),t.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(t)}),t.write(")")}};p();f();d();var kt=class extends W{constructor({name:t,type:r,docs:a}){super();I(this,"name");I(this,"type");I(this,"docs");this.name=t,this.type=r,this.docs=a}write(t){this.docs!=null&&t.writeNode(new Le({docs:this.docs})),t.write(`${this.name}: `),this.type.write(t)}};p();f();d();var it=class extends W{constructor({name:t,importFrom:r,memberName:a}){super();I(this,"name");I(this,"importFrom");I(this,"memberName");this.name=t,this.importFrom=r,this.memberName=a}write(t){this.importFrom!=null&&t.addImport(this);let r=this.importFrom?.type==="star"?`${this.importFrom.starImportAlias}.`:"",a=this.memberName!=null?`.${this.memberName}`:"";t.write(`${r}${this.name}${a}`)}};p();f();d();var Ae=class n extends W{constructor(t){super();I(this,"internalType");this.internalType=t}write(t){let r=Wt(t.customConfig),a=!!t.customConfig?.useBigInt;switch(this.internalType.type){case"array":{this.writeIterable({writer:t,iterable:this.internalType});break}case"blob":{if(r){t.writeNode(n.string(this.internalType.value));return}t.write("new Blob(["),t.writeNode(n.string(this.internalType.value)),t.write("])");break}case"boolean":{t.write(this.internalType.value.toString());break}case"bigint":{if(a){t.write(`BigInt("${this.internalType.value.toString()}")`);return}t.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(r){t.writeNode(n.string(this.internalType.value));return}t.write("new Date("),t.writeNode(n.string(this.internalType.value)),t.write(")");break}case"number":{t.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:t,object:this.internalType});break}case"record":{this.writeRecord({writer:t,record:this.internalType});break}case"reference":{t.writeNode(this.internalType.value);break}case"set":{if(r||this.isSetOfObjects()){t.writeNode(n.array({values:this.internalType.values}));return}t.write("new Set("),this.writeIterable({writer:t,iterable:this.internalType}),t.write(")");break}case"string":{this.internalType.value.includes(`
21
21
  `)?this.writeStringWithBackticks({writer:t,value:this.internalType.value}):t.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:t,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:t,value:this.internalType.value});break}case"null":{t.write("null");break}case"nop":break;default:q(this.internalType)}}isObject(){return this.internalType.type==="object"}asObjectOrThrow(){if(this.isObject())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not an object")}isSet(){return this.internalType.type==="set"}asSetOrThrow(){if(this.isSet())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a set")}isSetOfObjects(){return this.isSet()&&this.asSetOrThrow().values.every(t=>t.isObject())}writeStringWithBackticks({writer:t,value:r}){t.write("`");let a=r.split(`
22
22
  `),o=a[0]+`