import{M as j}from"./solana-BYkhKyCb.js";var x={exports:{}};(function(o){var s=Object.prototype.hasOwnProperty,a="~";function v(){}Object.create&&(v.prototype=Object.create(null),new v().__proto__||(a=!1));function U(t,n,r){this.fn=t,this.context=n,this.once=r||!1}function w(t,n,r,l,h){if(typeof r!="function")throw new TypeError("The listener must be a function");var u=new U(r,l||t,h),p=a?a+n:n;return t._events[p]?t._events[p].fn?t._events[p]=[t._events[p],u]:t._events[p].push(u):(t._events[p]=u,t._eventsCount++),t}function d(t,n){--t._eventsCount===0?t._events=new v:delete t._events[n]}function f(){this._events=new v,this._eventsCount=0}f.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)s.call(n,r)&&t.push(a?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t},f.prototype.listeners=function(t){var n=a?a+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var l=0,h=r.length,u=new Array(h);l<h;l++)u[l]=r[l].fn;return u},f.prototype.listenerCount=function(t){var n=a?a+t:t,r=this._events[n];return r?r.fn?1:r.length:0},f.prototype.emit=function(t,n,r,l,h,u){var p=a?a+t:t;if(!this._events[p])return!1;var e=this._events[p],y=arguments.length,_,c;if(e.fn){switch(e.once&&this.removeListener(t,e.fn,void 0,!0),y){case 1:return e.fn.call(e.context),!0;case 2:return e.fn.call(e.context,n),!0;case 3:return e.fn.call(e.context,n,r),!0;case 4:return e.fn.call(e.context,n,r,l),!0;case 5:return e.fn.call(e.context,n,r,l,h),!0;case 6:return e.fn.call(e.context,n,r,l,h,u),!0}for(c=1,_=new Array(y-1);c<y;c++)_[c-1]=arguments[c];e.fn.apply(e.context,_)}else{var O=e.length,m;for(c=0;c<O;c++)switch(e[c].once&&this.removeListener(t,e[c].fn,void 0,!0),y){case 1:e[c].fn.call(e[c].context);break;case 2:e[c].fn.call(e[c].context,n);break;case 3:e[c].fn.call(e[c].context,n,r);break;case 4:e[c].fn.call(e[c].context,n,r,l);break;default:if(!_)for(m=1,_=new Array(y-1);m<y;m++)_[m-1]=arguments[m];e[c].fn.apply(e[c].context,_)}}return!0},f.prototype.on=function(t,n,r){return w(this,t,n,r,!1)},f.prototype.once=function(t,n,r){return w(this,t,n,r,!0)},f.prototype.removeListener=function(t,n,r,l){var h=a?a+t:t;if(!this._events[h])return this;if(!n)return d(this,h),this;var u=this._events[h];if(u.fn)u.fn===n&&(!l||u.once)&&(!r||u.context===r)&&d(this,h);else{for(var p=0,e=[],y=u.length;p<y;p++)(u[p].fn!==n||l&&!u[p].once||r&&u[p].context!==r)&&e.push(u[p]);e.length?this._events[h]=e.length===1?e[0]:e:d(this,h)}return this},f.prototype.removeAllListeners=function(t){var n;return t?(n=a?a+t:t,this._events[n]&&d(this,n)):(this._events=new v,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=a,f.EventEmitter=f,o.exports=f})(x);var A=x.exports;const S=j(A);let g;const C=new Uint8Array(16);function D(){if(!g&&(g=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!g))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return g(C)}const i=[];for(let o=0;o<256;++o)i.push((o+256).toString(16).slice(1));function I(o,s=0){return i[o[s+0]]+i[o[s+1]]+i[o[s+2]]+i[o[s+3]]+"-"+i[o[s+4]]+i[o[s+5]]+"-"+i[o[s+6]]+i[o[s+7]]+"-"+i[o[s+8]]+i[o[s+9]]+"-"+i[o[s+10]]+i[o[s+11]]+i[o[s+12]]+i[o[s+13]]+i[o[s+14]]+i[o[s+15]]}const L=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),b={randomUUID:L};function k(o,s,a){if(b.randomUUID&&!s&&!o)return b.randomUUID();o=o||{};const v=o.random||(o.rng||D)();return v[6]=v[6]&15|64,v[8]=v[8]&63|128,I(v)}export{S as R,k as V};
