graz 0.0.44-alpha.1 → 0.0.44
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/chains/index.js.stub +30 -0
- package/chains/index.mjs.stub +20 -0
- package/cli.mjs +219 -0
- package/compiled/p-map/index.d.ts +121 -0
- package/compiled/p-map/index.mjs +1 -0
- package/compiled/p-map/index.mjs.d.ts +123 -0
- package/dist/index.d.ts +18 -502
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +12 -10
- package/dist/cli/index.mjs +0 -141
- package/stubs/chains-generated.ts.stub +0 -20
- package/stubs/chains-index.ts.stub +0 -41
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w,b as st,c as se}from"./chunk-HBC2VYPF.mjs";var gn=w((cu,fn)=>{"use strict";fn.exports=b;var M=null;try{M=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function b(t,e,n){this.low=t|0,this.high=e|0,this.unsigned=!!n}b.prototype.__isLong__;Object.defineProperty(b.prototype,"__isLong__",{value:!0});function B(t){return(t&&t.__isLong__)===!0}b.isLong=B;var sn={},on={};function ie(t,e){var n,r,s;return e?(t>>>=0,(s=0<=t&&t<256)&&(r=on[t],r)?r:(n=R(t,(t|0)<0?-1:0,!0),s&&(on[t]=n),n)):(t|=0,(s=-128<=t&&t<128)&&(r=sn[t],r)?r:(n=R(t,t<0?-1:0,!1),s&&(sn[t]=n),n))}b.fromInt=ie;function k(t,e){if(isNaN(t))return e?oe:z;if(e){if(t<0)return oe;if(t>=ln)return mn}else{if(t<=-cn)return U;if(t+1>=cn)return hn}return t<0?k(-t,e).neg():R(t%de|0,t/de|0,e)}b.fromNumber=k;function R(t,e,n){return new b(t,e,n)}b.fromBits=R;var Me=Math.pow;function it(t,e,n){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return z;if(typeof e=="number"?(n=e,e=!1):e=!!e,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return it(t.substring(1),e,n).neg();for(var s=k(Me(n,8)),o=z,i=0;i<t.length;i+=8){var c=Math.min(8,t.length-i),a=parseInt(t.substring(i,i+c),n);if(c<8){var u=k(Me(n,c));o=o.mul(u).add(k(a))}else o=o.mul(s),o=o.add(k(a))}return o.unsigned=e,o}b.fromString=it;function H(t,e){return typeof t=="number"?k(t,e):typeof t=="string"?it(t,e):R(t.low,t.high,typeof e=="boolean"?e:t.unsigned)}b.fromValue=H;var an=65536,oo=1<<24,de=an*an,ln=de*de,cn=ln/2,un=ie(oo),z=ie(0);b.ZERO=z;var oe=ie(0,!0);b.UZERO=oe;var ge=ie(1);b.ONE=ge;var pn=ie(1,!0);b.UONE=pn;var ot=ie(-1);b.NEG_ONE=ot;var hn=R(-1,2147483647,!1);b.MAX_VALUE=hn;var mn=R(-1,-1,!0);b.MAX_UNSIGNED_VALUE=mn;var U=R(0,-2147483648,!1);b.MIN_VALUE=U;var l=b.prototype;l.toInt=function(){return this.unsigned?this.low>>>0:this.low};l.toNumber=function(){return this.unsigned?(this.high>>>0)*de+(this.low>>>0):this.high*de+(this.low>>>0)};l.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(U)){var n=k(e),r=this.div(n),s=r.mul(n).sub(this);return r.toString(e)+s.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=k(Me(e,6),this.unsigned),i=this,c="";;){var a=i.div(o),u=i.sub(a.mul(o)).toInt()>>>0,p=u.toString(e);if(i=a,i.isZero())return p+c;for(;p.length<6;)p="0"+p;c=""+p+c}};l.getHighBits=function(){return this.high};l.getHighBitsUnsigned=function(){return this.high>>>0};l.getLowBits=function(){return this.low};l.getLowBitsUnsigned=function(){return this.low>>>0};l.getNumBitsAbs=function(){if(this.isNegative())return this.eq(U)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,n=31;n>0&&!(e&1<<n);n--);return this.high!=0?n+33:n+1};l.isZero=function(){return this.high===0&&this.low===0};l.eqz=l.isZero;l.isNegative=function(){return!this.unsigned&&this.high<0};l.isPositive=function(){return this.unsigned||this.high>=0};l.isOdd=function(){return(this.low&1)===1};l.isEven=function(){return(this.low&1)===0};l.equals=function(e){return B(e)||(e=H(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};l.eq=l.equals;l.notEquals=function(e){return!this.eq(e)};l.neq=l.notEquals;l.ne=l.notEquals;l.lessThan=function(e){return this.comp(e)<0};l.lt=l.lessThan;l.lessThanOrEqual=function(e){return this.comp(e)<=0};l.lte=l.lessThanOrEqual;l.le=l.lessThanOrEqual;l.greaterThan=function(e){return this.comp(e)>0};l.gt=l.greaterThan;l.greaterThanOrEqual=function(e){return this.comp(e)>=0};l.gte=l.greaterThanOrEqual;l.ge=l.greaterThanOrEqual;l.compare=function(e){if(B(e)||(e=H(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1};l.comp=l.compare;l.negate=function(){return!this.unsigned&&this.eq(U)?U:this.not().add(ge)};l.neg=l.negate;l.add=function(e){B(e)||(e=H(e));var n=this.high>>>16,r=this.high&65535,s=this.low>>>16,o=this.low&65535,i=e.high>>>16,c=e.high&65535,a=e.low>>>16,u=e.low&65535,p=0,h=0,C=0,m=0;return m+=o+u,C+=m>>>16,m&=65535,C+=s+a,h+=C>>>16,C&=65535,h+=r+c,p+=h>>>16,h&=65535,p+=n+i,p&=65535,R(C<<16|m,p<<16|h,this.unsigned)};l.subtract=function(e){return B(e)||(e=H(e)),this.add(e.neg())};l.sub=l.subtract;l.multiply=function(e){if(this.isZero())return z;if(B(e)||(e=H(e)),M){var n=M.mul(this.low,this.high,e.low,e.high);return R(n,M.get_high(),this.unsigned)}if(e.isZero())return z;if(this.eq(U))return e.isOdd()?U:z;if(e.eq(U))return this.isOdd()?U:z;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(un)&&e.lt(un))return k(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,s=this.high&65535,o=this.low>>>16,i=this.low&65535,c=e.high>>>16,a=e.high&65535,u=e.low>>>16,p=e.low&65535,h=0,C=0,m=0,F=0;return F+=i*p,m+=F>>>16,F&=65535,m+=o*p,C+=m>>>16,m&=65535,m+=i*u,C+=m>>>16,m&=65535,C+=s*p,h+=C>>>16,C&=65535,C+=o*u,h+=C>>>16,C&=65535,C+=i*a,h+=C>>>16,C&=65535,h+=r*p+s*u+o*a+i*c,h&=65535,R(m<<16|F,h<<16|C,this.unsigned)};l.mul=l.multiply;l.divide=function(e){if(B(e)||(e=H(e)),e.isZero())throw Error("division by zero");if(M){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?M.div_u:M.div_s)(this.low,this.high,e.low,e.high);return R(n,M.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?oe:z;var r,s,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return oe;if(e.gt(this.shru(1)))return pn;o=oe}else{if(this.eq(U)){if(e.eq(ge)||e.eq(ot))return U;if(e.eq(U))return ge;var i=this.shr(1);return r=i.div(e).shl(1),r.eq(z)?e.isNegative()?ge:ot:(s=this.sub(e.mul(r)),o=r.add(s.div(e)),o)}else if(e.eq(U))return this.unsigned?oe:z;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=z}for(s=this;s.gte(e);){r=Math.max(1,Math.floor(s.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(r)/Math.LN2),a=c<=48?1:Me(2,c-48),u=k(r),p=u.mul(e);p.isNegative()||p.gt(s);)r-=a,u=k(r,this.unsigned),p=u.mul(e);u.isZero()&&(u=ge),o=o.add(u),s=s.sub(p)}return o};l.div=l.divide;l.modulo=function(e){if(B(e)||(e=H(e)),M){var n=(this.unsigned?M.rem_u:M.rem_s)(this.low,this.high,e.low,e.high);return R(n,M.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};l.mod=l.modulo;l.rem=l.modulo;l.not=function(){return R(~this.low,~this.high,this.unsigned)};l.and=function(e){return B(e)||(e=H(e)),R(this.low&e.low,this.high&e.high,this.unsigned)};l.or=function(e){return B(e)||(e=H(e)),R(this.low|e.low,this.high|e.high,this.unsigned)};l.xor=function(e){return B(e)||(e=H(e)),R(this.low^e.low,this.high^e.high,this.unsigned)};l.shiftLeft=function(e){return B(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?R(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):R(0,this.low<<e-32,this.unsigned)};l.shl=l.shiftLeft;l.shiftRight=function(e){return B(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?R(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):R(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};l.shr=l.shiftRight;l.shiftRightUnsigned=function(e){if(B(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return R(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?R(n,0,this.unsigned):R(n>>>e-32,0,this.unsigned)};l.shru=l.shiftRightUnsigned;l.shr_u=l.shiftRightUnsigned;l.toSigned=function(){return this.unsigned?R(this.low,this.high,!1):this};l.toUnsigned=function(){return this.unsigned?this:R(this.low,this.high,!0)};l.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};l.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};l.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};b.fromBytes=function(e,n,r){return r?b.fromBytesLE(e,n):b.fromBytesBE(e,n)};b.fromBytesLE=function(e,n){return new b(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};b.fromBytesBE=function(e,n){return new b(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}});var be=w((Lp,er)=>{"use strict";var ni="2.0.0",ri=Number.MAX_SAFE_INTEGER||9007199254740991,si=16,oi=["major","premajor","minor","preminor","patch","prepatch","prerelease"];er.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:si,MAX_SAFE_INTEGER:ri,RELEASE_TYPES:oi,SEMVER_SPEC_VERSION:ni,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Re=w((qp,tr)=>{"use strict";var ii=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};tr.exports=ii});var Ce=w((re,nr)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:It}=be(),ai=Re();re=nr.exports={};var ci=re.re=[],f=re.src=[],g=re.t={},ui=0,x=(t,e,n)=>{let r=ui++;ai(t,r,e),g[t]=r,f[r]=e,ci[r]=new RegExp(e,n?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*");x("NUMERICIDENTIFIERLOOSE","[0-9]+");x("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");x("MAINVERSION",`(${f[g.NUMERICIDENTIFIER]})\\.(${f[g.NUMERICIDENTIFIER]})\\.(${f[g.NUMERICIDENTIFIER]})`);x("MAINVERSIONLOOSE",`(${f[g.NUMERICIDENTIFIERLOOSE]})\\.(${f[g.NUMERICIDENTIFIERLOOSE]})\\.(${f[g.NUMERICIDENTIFIERLOOSE]})`);x("PRERELEASEIDENTIFIER",`(?:${f[g.NUMERICIDENTIFIER]}|${f[g.NONNUMERICIDENTIFIER]})`);x("PRERELEASEIDENTIFIERLOOSE",`(?:${f[g.NUMERICIDENTIFIERLOOSE]}|${f[g.NONNUMERICIDENTIFIER]})`);x("PRERELEASE",`(?:-(${f[g.PRERELEASEIDENTIFIER]}(?:\\.${f[g.PRERELEASEIDENTIFIER]})*))`);x("PRERELEASELOOSE",`(?:-?(${f[g.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${f[g.PRERELEASEIDENTIFIERLOOSE]})*))`);x("BUILDIDENTIFIER","[0-9A-Za-z-]+");x("BUILD",`(?:\\+(${f[g.BUILDIDENTIFIER]}(?:\\.${f[g.BUILDIDENTIFIER]})*))`);x("FULLPLAIN",`v?${f[g.MAINVERSION]}${f[g.PRERELEASE]}?${f[g.BUILD]}?`);x("FULL",`^${f[g.FULLPLAIN]}$`);x("LOOSEPLAIN",`[v=\\s]*${f[g.MAINVERSIONLOOSE]}${f[g.PRERELEASELOOSE]}?${f[g.BUILD]}?`);x("LOOSE",`^${f[g.LOOSEPLAIN]}$`);x("GTLT","((?:<|>)?=?)");x("XRANGEIDENTIFIERLOOSE",`${f[g.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);x("XRANGEIDENTIFIER",`${f[g.NUMERICIDENTIFIER]}|x|X|\\*`);x("XRANGEPLAIN",`[v=\\s]*(${f[g.XRANGEIDENTIFIER]})(?:\\.(${f[g.XRANGEIDENTIFIER]})(?:\\.(${f[g.XRANGEIDENTIFIER]})(?:${f[g.PRERELEASE]})?${f[g.BUILD]}?)?)?`);x("XRANGEPLAINLOOSE",`[v=\\s]*(${f[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[g.XRANGEIDENTIFIERLOOSE]})(?:${f[g.PRERELEASELOOSE]})?${f[g.BUILD]}?)?)?`);x("XRANGE",`^${f[g.GTLT]}\\s*${f[g.XRANGEPLAIN]}$`);x("XRANGELOOSE",`^${f[g.GTLT]}\\s*${f[g.XRANGEPLAINLOOSE]}$`);x("COERCE",`(^|[^\\d])(\\d{1,${It}})(?:\\.(\\d{1,${It}}))?(?:\\.(\\d{1,${It}}))?(?:$|[^\\d])`);x("COERCERTL",f[g.COERCE],!0);x("LONETILDE","(?:~>?)");x("TILDETRIM",`(\\s*)${f[g.LONETILDE]}\\s+`,!0);re.tildeTrimReplace="$1~";x("TILDE",`^${f[g.LONETILDE]}${f[g.XRANGEPLAIN]}$`);x("TILDELOOSE",`^${f[g.LONETILDE]}${f[g.XRANGEPLAINLOOSE]}$`);x("LONECARET","(?:\\^)");x("CARETTRIM",`(\\s*)${f[g.LONECARET]}\\s+`,!0);re.caretTrimReplace="$1^";x("CARET",`^${f[g.LONECARET]}${f[g.XRANGEPLAIN]}$`);x("CARETLOOSE",`^${f[g.LONECARET]}${f[g.XRANGEPLAINLOOSE]}$`);x("COMPARATORLOOSE",`^${f[g.GTLT]}\\s*(${f[g.LOOSEPLAIN]})$|^$`);x("COMPARATOR",`^${f[g.GTLT]}\\s*(${f[g.FULLPLAIN]})$|^$`);x("COMPARATORTRIM",`(\\s*)${f[g.GTLT]}\\s*(${f[g.LOOSEPLAIN]}|${f[g.XRANGEPLAIN]})`,!0);re.comparatorTrimReplace="$1$2$3";x("HYPHENRANGE",`^\\s*(${f[g.XRANGEPLAIN]})\\s+-\\s+(${f[g.XRANGEPLAIN]})\\s*$`);x("HYPHENRANGELOOSE",`^\\s*(${f[g.XRANGEPLAINLOOSE]})\\s+-\\s+(${f[g.XRANGEPLAINLOOSE]})\\s*$`);x("STAR","(<|>)?=?\\s*\\*");x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ke=w((_p,rr)=>{"use strict";var li=Object.freeze({loose:!0}),pi=Object.freeze({}),hi=t=>t?typeof t!="object"?li:t:pi;rr.exports=hi});var vt=w((jp,ir)=>{"use strict";var sr=/^[0-9]+$/,or=(t,e)=>{let n=sr.test(t),r=sr.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1},mi=(t,e)=>or(e,t);ir.exports={compareIdentifiers:or,rcompareIdentifiers:mi}});var _=w(($p,lr)=>{"use strict";var Qe=Re(),{MAX_LENGTH:ar,MAX_SAFE_INTEGER:Ve}=be(),{re:cr,t:ur}=Ce(),fi=Ke(),{compareIdentifiers:Se}=vt(),Tt=class t{constructor(e,n){if(n=fi(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>ar)throw new TypeError(`version is longer than ${ar} characters`);Qe("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=e.trim().match(n.loose?cr[ur.LOOSE]:cr[ur.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Ve||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ve||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ve||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<Ve)return o}return s}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Qe("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Se(this.major,e.major)||Se(this.minor,e.minor)||Se(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],s=e.prerelease[n];if(Qe("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return Se(r,s)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let r=this.build[n],s=e.build[n];if(Qe("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return Se(r,s)}while(++n)}inc(e,n,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(r)?1:0;if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let o=[n,s];r===!1&&(o=[n]),Se(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};lr.exports=Tt});var le=w((Fp,hr)=>{"use strict";var pr=_(),gi=(t,e,n=!1)=>{if(t instanceof pr)return t;try{return new pr(t,e)}catch(r){if(!n)return null;throw r}};hr.exports=gi});var fr=w((Pp,mr)=>{"use strict";var di=le(),yi=(t,e)=>{let n=di(t,e);return n?n.version:null};mr.exports=yi});var dr=w((Gp,gr)=>{"use strict";var Ei=le(),Ci=(t,e)=>{let n=Ei(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};gr.exports=Ci});var Cr=w((Up,Er)=>{"use strict";var yr=_(),Si=(t,e,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new yr(t instanceof yr?t.version:t,n).inc(e,r,s).version}catch{return null}};Er.exports=Si});var Ar=w((Bp,wr)=>{"use strict";var Sr=le(),wi=(t,e)=>{let n=Sr(t,null,!0),r=Sr(e,null,!0),s=n.compare(r);if(s===0)return null;let o=s>0,i=o?n:r,c=o?r:n,a=!!i.prerelease.length,u=a?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":a?"prerelease":c.patch?"patch":c.minor?"minor":"major"};wr.exports=wi});var Ir=w((Wp,xr)=>{"use strict";var Ai=_(),xi=(t,e)=>new Ai(t,e).major;xr.exports=xi});var Tr=w((Mp,vr)=>{"use strict";var Ii=_(),vi=(t,e)=>new Ii(t,e).minor;vr.exports=vi});var Rr=w((kp,br)=>{"use strict";var Ti=_(),bi=(t,e)=>new Ti(t,e).patch;br.exports=bi});var Nr=w((zp,Or)=>{"use strict";var Ri=le(),Oi=(t,e)=>{let n=Ri(t,e);return n&&n.prerelease.length?n.prerelease:null};Or.exports=Oi});var K=w((Kp,Lr)=>{"use strict";var Dr=_(),Ni=(t,e,n)=>new Dr(t,n).compare(new Dr(e,n));Lr.exports=Ni});var _r=w((Qp,qr)=>{"use strict";var Di=K(),Li=(t,e,n)=>Di(e,t,n);qr.exports=Li});var $r=w((Vp,jr)=>{"use strict";var qi=K(),_i=(t,e)=>qi(t,e,!0);jr.exports=_i});var He=w((Hp,Pr)=>{"use strict";var Fr=_(),ji=(t,e,n)=>{let r=new Fr(t,n),s=new Fr(e,n);return r.compare(s)||r.compareBuild(s)};Pr.exports=ji});var Ur=w((Xp,Gr)=>{"use strict";var $i=He(),Fi=(t,e)=>t.sort((n,r)=>$i(n,r,e));Gr.exports=Fi});var Wr=w((Yp,Br)=>{"use strict";var Pi=He(),Gi=(t,e)=>t.sort((n,r)=>Pi(r,n,e));Br.exports=Gi});var Oe=w((Zp,Mr)=>{"use strict";var Ui=K(),Bi=(t,e,n)=>Ui(t,e,n)>0;Mr.exports=Bi});var Xe=w((Jp,kr)=>{"use strict";var Wi=K(),Mi=(t,e,n)=>Wi(t,e,n)<0;kr.exports=Mi});var bt=w((eh,zr)=>{"use strict";var ki=K(),zi=(t,e,n)=>ki(t,e,n)===0;zr.exports=zi});var Rt=w((th,Kr)=>{"use strict";var Ki=K(),Qi=(t,e,n)=>Ki(t,e,n)!==0;Kr.exports=Qi});var Ye=w((nh,Qr)=>{"use strict";var Vi=K(),Hi=(t,e,n)=>Vi(t,e,n)>=0;Qr.exports=Hi});var Ze=w((rh,Vr)=>{"use strict";var Xi=K(),Yi=(t,e,n)=>Xi(t,e,n)<=0;Vr.exports=Yi});var Ot=w((sh,Hr)=>{"use strict";var Zi=bt(),Ji=Rt(),ea=Oe(),ta=Ye(),na=Xe(),ra=Ze(),sa=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return Zi(t,n,r);case"!=":return Ji(t,n,r);case">":return ea(t,n,r);case">=":return ta(t,n,r);case"<":return na(t,n,r);case"<=":return ra(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Hr.exports=sa});var Yr=w((oh,Xr)=>{"use strict";var oa=_(),ia=le(),{re:Je,t:et}=Ce(),aa=(t,e)=>{if(t instanceof oa)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(Je[et.COERCE]);else{let r;for(;(r=Je[et.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||r.index+r[0].length!==n.index+n[0].length)&&(n=r),Je[et.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;Je[et.COERCERTL].lastIndex=-1}return n===null?null:ia(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,e)};Xr.exports=aa});var Jr=w((ih,Zr)=>{"use strict";Zr.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var ts=w((ah,es)=>{"use strict";es.exports=T;T.Node=pe;T.create=T;function T(t){var e=this;if(e instanceof T||(e=new T),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)e.push(arguments[n]);return e}T.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),t.list.length--,t.next=null,t.prev=null,t.list=null,e};T.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};T.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};T.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)ua(this,arguments[t]);return this.length};T.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)la(this,arguments[t]);return this.length};T.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};T.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};T.prototype.forEach=function(t,e){e=e||this;for(var n=this.head,r=0;n!==null;r++)t.call(e,n.value,r,this),n=n.next};T.prototype.forEachReverse=function(t,e){e=e||this;for(var n=this.tail,r=this.length-1;n!==null;r--)t.call(e,n.value,r,this),n=n.prev};T.prototype.get=function(t){for(var e=0,n=this.head;n!==null&&e<t;e++)n=n.next;if(e===t&&n!==null)return n.value};T.prototype.getReverse=function(t){for(var e=0,n=this.tail;n!==null&&e<t;e++)n=n.prev;if(e===t&&n!==null)return n.value};T.prototype.map=function(t,e){e=e||this;for(var n=new T,r=this.head;r!==null;)n.push(t.call(e,r.value,this)),r=r.next;return n};T.prototype.mapReverse=function(t,e){e=e||this;for(var n=new T,r=this.tail;r!==null;)n.push(t.call(e,r.value,this)),r=r.prev;return n};T.prototype.reduce=function(t,e){var n,r=this.head;if(arguments.length>1)n=e;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)n=t(n,r.value,s),r=r.next;return n};T.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)n=t(n,r.value,s),r=r.prev;return n};T.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;n!==null;e++)t[e]=n.value,n=n.next;return t};T.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;n!==null;e++)t[e]=n.value,n=n.prev;return t};T.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var n=new T;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(;s!==null&&r<e;r++,s=s.next)n.push(s.value);return n};T.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var n=new T;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)n.push(s.value);return n};T.prototype.splice=function(t,e,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(var o=[],r=0;s&&r<e;r++)o.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var r=0;r<n.length;r++)s=ca(this,s,n[r]);return o};T.prototype.reverse=function(){for(var t=this.head,e=this.tail,n=t;n!==null;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=e,this.tail=t,this};function ca(t,e,n){var r=e===t.head?new pe(n,null,e,t):new pe(n,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function ua(t,e){t.tail=new pe(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function la(t,e){t.head=new pe(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function pe(t,e,n,r){if(!(this instanceof pe))return new pe(t,e,n,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{Jr()(T)}catch{}});var is=w((ch,os)=>{"use strict";var pa=ts(),he=Symbol("max"),te=Symbol("length"),we=Symbol("lengthCalculator"),De=Symbol("allowStale"),me=Symbol("maxAge"),ee=Symbol("dispose"),ns=Symbol("noDisposeOnSet"),L=Symbol("lruList"),X=Symbol("cache"),ss=Symbol("updateAgeOnGet"),Nt=()=>1,Lt=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let n=this[he]=e.max||1/0,r=e.length||Nt;if(this[we]=typeof r!="function"?Nt:r,this[De]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[me]=e.maxAge||0,this[ee]=e.dispose,this[ns]=e.noDisposeOnSet||!1,this[ss]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[he]=e||1/0,Ne(this)}get max(){return this[he]}set allowStale(e){this[De]=!!e}get allowStale(){return this[De]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[me]=e,Ne(this)}get maxAge(){return this[me]}set lengthCalculator(e){typeof e!="function"&&(e=Nt),e!==this[we]&&(this[we]=e,this[te]=0,this[L].forEach(n=>{n.length=this[we](n.value,n.key),this[te]+=n.length})),Ne(this)}get lengthCalculator(){return this[we]}get length(){return this[te]}get itemCount(){return this[L].length}rforEach(e,n){n=n||this;for(let r=this[L].tail;r!==null;){let s=r.prev;rs(this,e,r,n),r=s}}forEach(e,n){n=n||this;for(let r=this[L].head;r!==null;){let s=r.next;rs(this,e,r,n),r=s}}keys(){return this[L].toArray().map(e=>e.key)}values(){return this[L].toArray().map(e=>e.value)}reset(){this[ee]&&this[L]&&this[L].length&&this[L].forEach(e=>this[ee](e.key,e.value)),this[X]=new Map,this[L]=new pa,this[te]=0}dump(){return this[L].map(e=>tt(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[L]}set(e,n,r){if(r=r||this[me],r&&typeof r!="number")throw new TypeError("maxAge must be a number");let s=r?Date.now():0,o=this[we](n,e);if(this[X].has(e)){if(o>this[he])return Ae(this,this[X].get(e)),!1;let a=this[X].get(e).value;return this[ee]&&(this[ns]||this[ee](e,a.value)),a.now=s,a.maxAge=r,a.value=n,this[te]+=o-a.length,a.length=o,this.get(e),Ne(this),!0}let i=new qt(e,n,o,s,r);return i.length>this[he]?(this[ee]&&this[ee](e,n),!1):(this[te]+=i.length,this[L].unshift(i),this[X].set(e,this[L].head),Ne(this),!0)}has(e){if(!this[X].has(e))return!1;let n=this[X].get(e).value;return!tt(this,n)}get(e){return Dt(this,e,!0)}peek(e){return Dt(this,e,!1)}pop(){let e=this[L].tail;return e?(Ae(this,e),e.value):null}del(e){Ae(this,this[X].get(e))}load(e){this.reset();let n=Date.now();for(let r=e.length-1;r>=0;r--){let s=e[r],o=s.e||0;if(o===0)this.set(s.k,s.v);else{let i=o-n;i>0&&this.set(s.k,s.v,i)}}}prune(){this[X].forEach((e,n)=>Dt(this,n,!1))}},Dt=(t,e,n)=>{let r=t[X].get(e);if(r){let s=r.value;if(tt(t,s)){if(Ae(t,r),!t[De])return}else n&&(t[ss]&&(r.value.now=Date.now()),t[L].unshiftNode(r));return s.value}},tt=(t,e)=>{if(!e||!e.maxAge&&!t[me])return!1;let n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[me]&&n>t[me]},Ne=t=>{if(t[te]>t[he])for(let e=t[L].tail;t[te]>t[he]&&e!==null;){let n=e.prev;Ae(t,e),e=n}},Ae=(t,e)=>{if(e){let n=e.value;t[ee]&&t[ee](n.key,n.value),t[te]-=n.length,t[X].delete(n.key),t[L].removeNode(e)}},qt=class{constructor(e,n,r,s,o){this.key=e,this.value=n,this.length=r,this.now=s,this.maxAge=o||0}},rs=(t,e,n,r)=>{let s=n.value;tt(t,s)&&(Ae(t,n),t[De]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};os.exports=Lt});var Q=w((uh,ls)=>{"use strict";var _t=class t{constructor(e,n){if(n=ma(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof jt)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e,this.set=e.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(s=>!cs(s[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Sa(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let r=((this.options.includePrerelease&&Ea)|(this.options.loose&&Ca))+":"+e,s=as.get(r);if(s)return s;let o=this.options.loose,i=o?W[j.HYPHENRANGELOOSE]:W[j.HYPHENRANGE];e=e.replace(i,Na(this.options.includePrerelease)),N("hyphen replace",e),e=e.replace(W[j.COMPARATORTRIM],ga),N("comparator trim",e),e=e.replace(W[j.TILDETRIM],da),e=e.replace(W[j.CARETTRIM],ya),e=e.split(/\s+/).join(" ");let c=e.split(" ").map(h=>wa(h,this.options)).join(" ").split(/\s+/).map(h=>Oa(h,this.options));o&&(c=c.filter(h=>(N("loose invalid filter",h,this.options),!!h.match(W[j.COMPARATORLOOSE])))),N("range list",c);let a=new Map,u=c.map(h=>new jt(h,this.options));for(let h of u){if(cs(h))return[h];a.set(h.value,h)}a.size>1&&a.has("")&&a.delete("");let p=[...a.values()];return as.set(r,p),p}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(r=>us(r,n)&&e.set.some(s=>us(s,n)&&r.every(o=>s.every(i=>o.intersects(i,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new fa(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Da(this.set[n],e,this.options))return!0;return!1}};ls.exports=_t;var ha=is(),as=new ha({max:1e3}),ma=Ke(),jt=Le(),N=Re(),fa=_(),{re:W,t:j,comparatorTrimReplace:ga,tildeTrimReplace:da,caretTrimReplace:ya}=Ce(),{FLAG_INCLUDE_PRERELEASE:Ea,FLAG_LOOSE:Ca}=be(),cs=t=>t.value==="<0.0.0-0",Sa=t=>t.value==="",us=(t,e)=>{let n=!0,r=t.slice(),s=r.pop();for(;n&&r.length;)n=r.every(o=>s.intersects(o,e)),s=r.pop();return n},wa=(t,e)=>(N("comp",t,e),t=Ia(t,e),N("caret",t),t=Aa(t,e),N("tildes",t),t=Ta(t,e),N("xrange",t),t=Ra(t,e),N("stars",t),t),$=t=>!t||t.toLowerCase()==="x"||t==="*",Aa=(t,e)=>t.trim().split(/\s+/).map(n=>xa(n,e)).join(" "),xa=(t,e)=>{let n=e.loose?W[j.TILDELOOSE]:W[j.TILDE];return t.replace(n,(r,s,o,i,c)=>{N("tilde",t,r,s,o,i,c);let a;return $(s)?a="":$(o)?a=`>=${s}.0.0 <${+s+1}.0.0-0`:$(i)?a=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:c?(N("replaceTilde pr",c),a=`>=${s}.${o}.${i}-${c} <${s}.${+o+1}.0-0`):a=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,N("tilde return",a),a})},Ia=(t,e)=>t.trim().split(/\s+/).map(n=>va(n,e)).join(" "),va=(t,e)=>{N("caret",t,e);let n=e.loose?W[j.CARETLOOSE]:W[j.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(s,o,i,c,a)=>{N("caret",t,s,o,i,c,a);let u;return $(o)?u="":$(i)?u=`>=${o}.0.0${r} <${+o+1}.0.0-0`:$(c)?o==="0"?u=`>=${o}.${i}.0${r} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${r} <${+o+1}.0.0-0`:a?(N("replaceCaret pr",a),o==="0"?i==="0"?u=`>=${o}.${i}.${c}-${a} <${o}.${i}.${+c+1}-0`:u=`>=${o}.${i}.${c}-${a} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${c}-${a} <${+o+1}.0.0-0`):(N("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${c}${r} <${o}.${i}.${+c+1}-0`:u=`>=${o}.${i}.${c}${r} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${c} <${+o+1}.0.0-0`),N("caret return",u),u})},Ta=(t,e)=>(N("replaceXRanges",t,e),t.split(/\s+/).map(n=>ba(n,e)).join(" ")),ba=(t,e)=>{t=t.trim();let n=e.loose?W[j.XRANGELOOSE]:W[j.XRANGE];return t.replace(n,(r,s,o,i,c,a)=>{N("xRange",t,r,s,o,i,c,a);let u=$(o),p=u||$(i),h=p||$(c),C=h;return s==="="&&C&&(s=""),a=e.includePrerelease?"-0":"",u?s===">"||s==="<"?r="<0.0.0-0":r="*":s&&C?(p&&(i=0),c=0,s===">"?(s=">=",p?(o=+o+1,i=0,c=0):(i=+i+1,c=0)):s==="<="&&(s="<",p?o=+o+1:i=+i+1),s==="<"&&(a="-0"),r=`${s+o}.${i}.${c}${a}`):p?r=`>=${o}.0.0${a} <${+o+1}.0.0-0`:h&&(r=`>=${o}.${i}.0${a} <${o}.${+i+1}.0-0`),N("xRange return",r),r})},Ra=(t,e)=>(N("replaceStars",t,e),t.trim().replace(W[j.STAR],"")),Oa=(t,e)=>(N("replaceGTE0",t,e),t.trim().replace(W[e.includePrerelease?j.GTE0PRE:j.GTE0],"")),Na=t=>(e,n,r,s,o,i,c,a,u,p,h,C,m)=>($(r)?n="":$(s)?n=`>=${r}.0.0${t?"-0":""}`:$(o)?n=`>=${r}.${s}.0${t?"-0":""}`:i?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,$(u)?a="":$(p)?a=`<${+u+1}.0.0-0`:$(h)?a=`<${u}.${+p+1}.0-0`:C?a=`<=${u}.${p}.${h}-${C}`:t?a=`<${u}.${p}.${+h+1}-0`:a=`<=${a}`,`${n} ${a}`.trim()),Da=(t,e,n)=>{for(let r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let r=0;r<t.length;r++)if(N(t[r].semver),t[r].semver!==jt.ANY&&t[r].semver.prerelease.length>0){let s=t[r].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var Le=w((lh,ds)=>{"use strict";var qe=Symbol("SemVer ANY"),Pt=class t{static get ANY(){return qe}constructor(e,n){if(n=ps(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}Ft("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===qe?this.value="":this.value=this.operator+this.semver.version,Ft("comp",this)}parse(e){let n=this.options.loose?hs[ms.COMPARATORLOOSE]:hs[ms.COMPARATOR],r=e.match(n);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new fs(r[2],this.options.loose):this.semver=qe}toString(){return this.value}test(e){if(Ft("Comparator.test",e,this.options.loose),this.semver===qe||e===qe)return!0;if(typeof e=="string")try{e=new fs(e,this.options)}catch{return!1}return $t(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new gs(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new gs(this.value,n).test(e.semver):(n=ps(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||$t(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||$t(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};ds.exports=Pt;var ps=Ke(),{re:hs,t:ms}=Ce(),$t=Ot(),Ft=Re(),fs=_(),gs=Q()});var _e=w((ph,ys)=>{"use strict";var La=Q(),qa=(t,e,n)=>{try{e=new La(e,n)}catch{return!1}return e.test(t)};ys.exports=qa});var Cs=w((hh,Es)=>{"use strict";var _a=Q(),ja=(t,e)=>new _a(t,e).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));Es.exports=ja});var ws=w((mh,Ss)=>{"use strict";var $a=_(),Fa=Q(),Pa=(t,e,n)=>{let r=null,s=null,o=null;try{o=new Fa(e,n)}catch{return null}return t.forEach(i=>{o.test(i)&&(!r||s.compare(i)===-1)&&(r=i,s=new $a(r,n))}),r};Ss.exports=Pa});var xs=w((fh,As)=>{"use strict";var Ga=_(),Ua=Q(),Ba=(t,e,n)=>{let r=null,s=null,o=null;try{o=new Ua(e,n)}catch{return null}return t.forEach(i=>{o.test(i)&&(!r||s.compare(i)===1)&&(r=i,s=new Ga(r,n))}),r};As.exports=Ba});var Ts=w((gh,vs)=>{"use strict";var Gt=_(),Wa=Q(),Is=Oe(),Ma=(t,e)=>{t=new Wa(t,e);let n=new Gt("0.0.0");if(t.test(n)||(n=new Gt("0.0.0-0"),t.test(n)))return n;n=null;for(let r=0;r<t.set.length;++r){let s=t.set[r],o=null;s.forEach(i=>{let c=new Gt(i.semver.version);switch(i.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||Is(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!n||Is(n,o))&&(n=o)}return n&&t.test(n)?n:null};vs.exports=Ma});var Rs=w((dh,bs)=>{"use strict";var ka=Q(),za=(t,e)=>{try{return new ka(t,e).range||"*"}catch{return null}};bs.exports=za});var nt=w((yh,Ls)=>{"use strict";var Ka=_(),Ds=Le(),{ANY:Qa}=Ds,Va=Q(),Ha=_e(),Os=Oe(),Ns=Xe(),Xa=Ze(),Ya=Ye(),Za=(t,e,n,r)=>{t=new Ka(t,r),e=new Va(e,r);let s,o,i,c,a;switch(n){case">":s=Os,o=Xa,i=Ns,c=">",a=">=";break;case"<":s=Ns,o=Ya,i=Os,c="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ha(t,e,r))return!1;for(let u=0;u<e.set.length;++u){let p=e.set[u],h=null,C=null;if(p.forEach(m=>{m.semver===Qa&&(m=new Ds(">=0.0.0")),h=h||m,C=C||m,s(m.semver,h.semver,r)?h=m:i(m.semver,C.semver,r)&&(C=m)}),h.operator===c||h.operator===a||(!C.operator||C.operator===c)&&o(t,C.semver))return!1;if(C.operator===a&&i(t,C.semver))return!1}return!0};Ls.exports=Za});var _s=w((Eh,qs)=>{"use strict";var Ja=nt(),ec=(t,e,n)=>Ja(t,e,">",n);qs.exports=ec});var $s=w((Ch,js)=>{"use strict";var tc=nt(),nc=(t,e,n)=>tc(t,e,"<",n);js.exports=nc});var Gs=w((Sh,Ps)=>{"use strict";var Fs=Q(),rc=(t,e,n)=>(t=new Fs(t,n),e=new Fs(e,n),t.intersects(e,n));Ps.exports=rc});var Bs=w((wh,Us)=>{"use strict";var sc=_e(),oc=K();Us.exports=(t,e,n)=>{let r=[],s=null,o=null,i=t.sort((p,h)=>oc(p,h,n));for(let p of i)sc(p,e,n)?(o=p,s||(s=p)):(o&&r.push([s,o]),o=null,s=null);s&&r.push([s,null]);let c=[];for(let[p,h]of r)p===h?c.push(p):!h&&p===i[0]?c.push("*"):h?p===i[0]?c.push(`<=${h}`):c.push(`${p} - ${h}`):c.push(`>=${p}`);let a=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return a.length<u.length?a:e}});var Qs=w((Ah,Ks)=>{"use strict";var Ws=Q(),Bt=Le(),{ANY:Ut}=Bt,je=_e(),Wt=K(),ic=(t,e,n={})=>{if(t===e)return!0;t=new Ws(t,n),e=new Ws(e,n);let r=!1;e:for(let s of t.set){for(let o of e.set){let i=cc(s,o,n);if(r=r||i!==null,i)continue e}if(r)return!1}return!0},ac=[new Bt(">=0.0.0-0")],Ms=[new Bt(">=0.0.0")],cc=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Ut){if(e.length===1&&e[0].semver===Ut)return!0;n.includePrerelease?t=ac:t=Ms}if(e.length===1&&e[0].semver===Ut){if(n.includePrerelease)return!0;e=Ms}let r=new Set,s,o;for(let m of t)m.operator===">"||m.operator===">="?s=ks(s,m,n):m.operator==="<"||m.operator==="<="?o=zs(o,m,n):r.add(m.semver);if(r.size>1)return null;let i;if(s&&o){if(i=Wt(s.semver,o.semver,n),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let m of r){if(s&&!je(m,String(s),n)||o&&!je(m,String(o),n))return null;for(let F of e)if(!je(m,String(F),n))return!1;return!0}let c,a,u,p,h=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,C=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&o.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let m of e){if(p=p||m.operator===">"||m.operator===">=",u=u||m.operator==="<"||m.operator==="<=",s){if(C&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===C.major&&m.semver.minor===C.minor&&m.semver.patch===C.patch&&(C=!1),m.operator===">"||m.operator===">="){if(c=ks(s,m,n),c===m&&c!==s)return!1}else if(s.operator===">="&&!je(s.semver,String(m),n))return!1}if(o){if(h&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===h.major&&m.semver.minor===h.minor&&m.semver.patch===h.patch&&(h=!1),m.operator==="<"||m.operator==="<="){if(a=zs(o,m,n),a===m&&a!==o)return!1}else if(o.operator==="<="&&!je(o.semver,String(m),n))return!1}if(!m.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&p&&!s&&i!==0||C||h)},ks=(t,e,n)=>{if(!t)return e;let r=Wt(t.semver,e.semver,n);return r>0?t:r<0||e.operator===">"&&t.operator===">="?e:t},zs=(t,e,n)=>{if(!t)return e;let r=Wt(t.semver,e.semver,n);return r<0?t:r>0||e.operator==="<"&&t.operator==="<="?e:t};Ks.exports=ic});var kt=w((xh,Xs)=>{"use strict";var Mt=Ce(),Vs=be(),uc=_(),Hs=vt(),lc=le(),pc=fr(),hc=dr(),mc=Cr(),fc=Ar(),gc=Ir(),dc=Tr(),yc=Rr(),Ec=Nr(),Cc=K(),Sc=_r(),wc=$r(),Ac=He(),xc=Ur(),Ic=Wr(),vc=Oe(),Tc=Xe(),bc=bt(),Rc=Rt(),Oc=Ye(),Nc=Ze(),Dc=Ot(),Lc=Yr(),qc=Le(),_c=Q(),jc=_e(),$c=Cs(),Fc=ws(),Pc=xs(),Gc=Ts(),Uc=Rs(),Bc=nt(),Wc=_s(),Mc=$s(),kc=Gs(),zc=Bs(),Kc=Qs();Xs.exports={parse:lc,valid:pc,clean:hc,inc:mc,diff:fc,major:gc,minor:dc,patch:yc,prerelease:Ec,compare:Cc,rcompare:Sc,compareLoose:wc,compareBuild:Ac,sort:xc,rsort:Ic,gt:vc,lt:Tc,eq:bc,neq:Rc,gte:Oc,lte:Nc,cmp:Dc,coerce:Lc,Comparator:qc,Range:_c,satisfies:jc,toComparators:$c,maxSatisfying:Fc,minSatisfying:Pc,minVersion:Gc,validRange:Uc,outside:Bc,gtr:Wc,ltr:Mc,intersects:kc,simplifyRange:zc,subset:Kc,SemVer:uc,re:Mt.re,src:Mt.src,tokens:Mt.t,SEMVER_SPEC_VERSION:Vs.SEMVER_SPEC_VERSION,RELEASE_TYPES:Vs.RELEASE_TYPES,compareIdentifiers:Hs.compareIdentifiers,rcompareIdentifiers:Hs.rcompareIdentifiers}});import{GasPrice as ho}from"@cosmjs/stargate";import{create as Xt}from"zustand";import{createJSONStorage as Js}from"zustand/middleware";import{persist as Yt,subscribeWithSelector as Zt}from"zustand/middleware";var Vt=(c=>(c.KEPLR="keplr",c.LEAP="leap",c.COSMOSTATION="cosmostation",c.WALLETCONNECT="walletconnect",c.WC_KEPLR_MOBILE="wc_keplr_mobile",c.WC_LEAP_MOBILE="wc_leap_mobile",c.WC_COSMOSTATION_MOBILE="wc_cosmostation_mobile",c))(Vt||{}),Ht=["keplr","leap","cosmostation","walletconnect","wc_keplr_mobile","wc_leap_mobile","wc_cosmostation_mobile"];var eo={recentChain:null,defaultChain:null,defaultSigningClient:"stargate",walletType:"keplr",walletConnect:{options:null,web3Modal:null},_notFoundFn:()=>null,_onReconnectFailed:()=>null,_reconnect:!1,_reconnectConnector:null},Ie={account:null,activeChain:null,balances:null,clients:null,offlineSigner:null,offlineSignerAmino:null,offlineSignerAuto:null,signingClients:null,status:"disconnected",wcSignClient:null},to={name:"graz-session",version:1,partialize:t=>({account:t.account,activeChain:t.activeChain}),storage:Js(()=>sessionStorage)},no={name:"graz-internal",partialize:t=>({recentChain:t.recentChain,_reconnect:t._reconnect,_reconnectConnector:t._reconnectConnector}),version:1},E=Xt(Zt(Yt(()=>Ie,to))),v=Xt(Zt(Yt(()=>eo,no)));import{SigningCosmWasmClient as nn}from"@cosmjs/cosmwasm-stargate";import{SigningStargateClient as rn}from"@cosmjs/stargate";import{Tendermint34Client as so}from"@cosmjs/tendermint-rpc";import{QueryClient as ro}from"@cosmjs/stargate";import{assert as Jt,isNonNullObject as en}from"@cosmjs/utils";var tn=(...t)=>{let{tendermint:e}=E.getState().clients,n=new ro(e),r=t.map(s=>s(n));for(let s of r){Jt(en(s),"Extension must be a non-null object");for(let[o,i]of Object.entries(s)){Jt(en(i),`Module must be a non-null object. Found type ${typeof i} for module "${o}".`);let c=n[o]||{};n[o]={...c,...i}}}return n};var Be=async({rpc:t,rpcHeaders:e})=>{let n={url:t,headers:{...e||{}}},[r,s,o]=await Promise.all([nn.connect(n),rn.connect(n),so.connect(t)]);return{cosmWasm:r,stargate:s,tendermint:o}},We=async t=>{let{rpc:e,rpcHeaders:n,offlineSignerAuto:r,cosmWasmSignerOptions:s={},stargateSignerOptions:o={}}=t,i={url:e,headers:{...n||{}}},[c,a]=await Promise.all([nn.connectWithSigner(i,r,s),rn.connectWithSigner(i,r,o)]);return{cosmWasm:c,stargate:a}};var En=st(gn());import{fromBech32 as io}from"@cosmjs/encoding";import{SignClient as ao}from"@walletconnect/sign-client";import{getSdkError as co}from"@walletconnect/utils";var ae=()=>typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1,dn=()=>ae()&&navigator.userAgent.toLowerCase().includes("android"),yn=()=>ae()&&(navigator.userAgent.toLowerCase().includes("iphone")||navigator.userAgent.toLowerCase().includes("ipad"));var at=(t,e,n=new Error("Promise timed out"))=>{let r=new Promise((s,o)=>{setTimeout(()=>{o(n)},e)});return Promise.race([t,r])};var ye=(t=v.getState().walletType)=>{try{return ve(t),!0}catch{return!1}},ce=()=>{window.sessionStorage.removeItem(se),E.setState(Ie)},ct=()=>{if(typeof window.keplr<"u"){let t=window.keplr;return Object.assign(t,{subscription:r=>(window.addEventListener("keplr_keystorechange",()=>{ce(),r()}),()=>{window.removeEventListener("keplr_keystorechange",()=>{ce(),r()})})})}throw v.getState()._notFoundFn(),new Error("window.keplr is not defined")},ut=()=>{if(typeof window.leap<"u"){let t=window.leap;return Object.assign(t,{subscription:r=>(window.addEventListener("leap_keystorechange",()=>{ce(),r()}),()=>{window.removeEventListener("leap_keystorechange",()=>{ce(),r()})})})}throw v.getState()._notFoundFn(),new Error("window.leap is not defined")},lt=()=>{if(typeof window.cosmostation.providers.keplr<"u"){let t=window.cosmostation.providers.keplr;return Object.assign(t,{subscription:r=>(window.cosmostation.cosmos.on("accountChanged",()=>{ce(),r()}),()=>{window.cosmostation.cosmos.off("accountChanged",()=>{ce(),r()})})})}throw v.getState()._notFoundFn(),new Error("window.cosmostation.providers.keplr is not defined")},Ee=t=>{var A,P,V;if(!((V=(P=(A=v.getState().walletConnect)==null?void 0:A.options)==null?void 0:P.projectId)!=null&&V.trim()))throw new Error("walletConnect.options.projectId is not defined");let e=(t==null?void 0:t.encoding)||"base64",n=y=>{if(!t)return;let{appUrl:d,formatNativeUrl:S}=t;if(ae()){if(dn())if(!y)window.open(d.mobile.android,"_self","noreferrer noopener");else{let I=S(d.mobile.android,y,"android");window.open(I,"_self","noreferrer noopener")}if(yn())if(!y)window.open(d.mobile.ios,"_self","noreferrer noopener");else{let I=S(d.mobile.ios,y,"ios");window.open(I,"_self","noreferrer noopener")}}},r=()=>{let{wcSignClient:y}=E.getState();if(!y)throw new Error("walletConnect.signClient is not defined");ce(),v.setState({_reconnect:!1,_reconnectConnector:null,recentChain:null})},s=async y=>{let{wcSignClient:d}=E.getState();if(!d)throw new Error("walletConnect.signClient is not defined");if(!y)throw new Error("No wallet connect session");await d.disconnect({topic:y,reason:co("USER_DISCONNECTED")}),await c(d),r()},o=y=>{var d,S;try{let{wcSignClient:I}=E.getState();if(!I)throw new Error("walletConnect.signClient is not defined");let O=I.session.getAll().at(-1);if(!O)return;let D=(S=(d=I.session.getAll().at(-1))==null?void 0:d.namespaces.cosmos)==null?void 0:S.accounts.find(q=>q.startsWith(`cosmos:${y}`));if(!(O.expiry*1e3>Date.now()+1e3))throw s(O.topic),new Error("invalid session");if(!D)try{let q=I.find({requiredNamespaces:{cosmos:{methods:["cosmos_getAccounts","cosmos_signAmino","cosmos_signDirect"],chains:[`cosmos:${y}`],events:["chainChanged","accountsChanged"]}}});if(!q.length)throw new Error("no session");return q.at(-1)}catch(q){if(!q.message.toLowerCase().includes("no matching key"))throw q}return O}catch(I){if(!I.message.toLowerCase().includes("no matching key"))throw I}},i=y=>{try{return o(y)}catch{return}},c=async y=>{try{let d=y.core.pairing.pairings.getAll({active:!1});if(!d.length)return;await Promise.all(d.map(async S=>{await y.core.pairing.pairings.delete(S.topic,{code:7001,message:"clear pairing"})}))}catch(d){if(!d.message.toLowerCase().includes("no matching key"))throw d}},a=async()=>{let{walletConnect:y}=v.getState();if(!(y!=null&&y.options))throw new Error("walletConnect.options is not defined");let{wcSignClient:d}=E.getState();if(d)return E.setState({wcSignClient:d}),d;let S=await ao.init(y.options);return E.setState({wcSignClient:S}),S},u=y=>{let{wcSignClient:d}=E.getState();if(d)return d.events.on("session_delete",S=>{r()}),d.events.on("session_expire",S=>{r()}),d.events.on("session_event",S=>{var I,O;if(S.params.event.name==="accountsChanged"&&((I=S.params.event.data)==null?void 0:I[0])!==((O=E.getState().account)==null?void 0:O.bech32Address)){let D=S.params.chainId.split(":")[1];D&&p(D)}else y()}),()=>{d.events.off("session_delete",S=>{r()}),d.events.off("session_expire",S=>{r()}),d.events.off("session_event",S=>{var I,O;if(S.params.event.name==="accountsChanged"&&((I=S.params.event.data)==null?void 0:I[0])!==((O=E.getState().account)==null?void 0:O.bech32Address)){let D=S.params.chainId.split(":")[1];D&&p(D)}else y()})}},p=async y=>{var Ge;let{wcSignClient:d}=E.getState();if(!d)throw new Error("enable walletConnect.signClient is not defined");let{walletConnect:S}=v.getState();if(!((Ge=S==null?void 0:S.options)!=null&&Ge.projectId))throw new Error("walletConnect.options.projectId is not defined");let{Web3Modal:I}=await import("@web3modal/standalone"),O=new I({projectId:S.options.projectId,walletConnectVersion:2,enableExplorer:!1,explorerRecommendedWalletIds:"NONE",...S.web3Modal}),{account:D,activeChain:Z}=E.getState(),q=i(y);if((Z==null?void 0:Z.chainId)!==y&&!q||!D){let{uri:G,approval:Ue}=await d.connect({requiredNamespaces:{cosmos:{methods:["cosmos_getAccounts","cosmos_signAmino","cosmos_signDirect"],chains:[`cosmos:${y}`],events:["chainChanged","accountsChanged"]}}});if(!G)throw new Error("No wallet connect uri");t?n(G):await O.openModal({uri:G});try{await at((async()=>{await Ue()})(),4e4,new Error("Modal approval timeout"))}catch(Qt){if(O.closeModal(),!Qt.message.toLowerCase().includes("no matching key"))return Promise.reject(Qt)}return t||O.closeModal(),Promise.resolve()}try{await at((async()=>{let G=await C(y);E.setState({account:G})})(),1e4,new Error("Connection timeout"))}catch(G){if(s(q==null?void 0:q.topic),!G.message.toLowerCase().includes("no matching key"))throw G}},h=async y=>{var O;let{wcSignClient:d}=E.getState();if(!d)throw new Error("walletConnect.signClient is not defined");let S=(O=o(y))==null?void 0:O.topic;if(!S)throw new Error("No wallet connect session");n();let I=await d.request({topic:S,chainId:`cosmos:${y}`,request:{method:"cosmos_getAccounts",params:{}}});if(!I[0])throw new Error("No wallet connect account");return{address:I[0].address,algo:I[0].algo,pubkey:new Uint8Array(Buffer.from(I[0].pubkey,e))}},C=async y=>{let{address:d,algo:S,pubkey:I}=await h(y);return{address:io(d).data,algo:S,bech32Address:d,name:"",pubKey:I,isKeystone:!1,isNanoLedger:!1}},m=async(...y)=>{var G,Ue;let[d,S,I]=y,{account:O,wcSignClient:D}=E.getState();if(!D)throw new Error("walletConnect.signClient is not defined");if(!O)throw new Error("account is not defined");let Z=(G=o(d))==null?void 0:G.topic;if(!Z)throw new Error("No wallet connect session");if(!I.bodyBytes)throw new Error("No bodyBytes");if(!I.authInfoBytes)throw new Error("No authInfoBytes");let q={topic:Z,chainId:`cosmos:${d}`,request:{method:"cosmos_signDirect",params:{signerAddress:S,signDoc:{...I,bodyBytes:Buffer.from(I.bodyBytes).toString(e),authInfoBytes:Buffer.from(I.authInfoBytes).toString(e),accountNumber:(Ue=I.accountNumber)==null?void 0:Ue.toString()}}}};return n(),await D.request(q)},F=async(...y)=>{let[d,S,I]=y,{signature:O,signed:D}=await m(d,S,I);return{signed:{chainId:D.chainId,accountNumber:En.default.fromString(D.accountNumber,!1),authInfoBytes:new Uint8Array(Buffer.from(D.authInfoBytes,e)),bodyBytes:new Uint8Array(Buffer.from(D.bodyBytes,e))},signature:O}},Fe=async(...y)=>{var G;let[d,S,I,O]=y,{wcSignClient:D}=E.getState(),{account:Z}=E.getState();if(!D)throw new Error("walletConnect.signClient is not defined");if(!Z)throw new Error("account is not defined");let q=(G=o(d))==null?void 0:G.topic;if(!q)throw new Error("No wallet connect session");return n(),await D.request({topic:q,chainId:`cosmos:${d}`,request:{method:"cosmos_signDirect",params:{signerAddress:S,signDoc:I}}})},ne=async(...y)=>{let[d,S,I,O]=y;return await Fe(d,S,I)},fe=y=>({getAccounts:async()=>[await h(y)],signDirect:(d,S)=>F(y,d,S)}),Y=y=>({getAccounts:async()=>[await h(y)],signAmino:(d,S)=>ne(y,d,S)});return{enable:p,experimentalSuggestChain:async(...y)=>{await Promise.reject(new Error("WalletConnect does not support experimentalSuggestChain"))},getKey:C,getOfflineSigner:y=>({getAccounts:async()=>[await h(y)],signDirect:(d,S)=>F(y,d,S),signAmino:(d,S)=>ne(y,d,S)}),getOfflineSignerAuto:async y=>(await C(y)).isNanoLedger?Y(y):fe(y),getOfflineSignerOnlyAmino:Y,signAmino:ne,signDirect:F,subscription:u,init:a}},uo=()=>{var e,n,r;if(!((r=(n=(e=v.getState().walletConnect)==null?void 0:e.options)==null?void 0:n.projectId)!=null&&r.trim()))throw new Error("walletConnect.options.projectId is not defined");if(!ae())throw new Error("WalletConnect Keplr mobile is only supported in mobile");let t={encoding:"base64",appUrl:{mobile:{ios:"keplrwallet://",android:"intent://"}},walletType:"wc_keplr_mobile",formatNativeUrl:(s,o,i)=>{let c=s.replaceAll("/","").replaceAll(":",""),a=encodeURIComponent(o);switch(i){case"ios":return`${c}://wcV2?${a}`;case"android":return`${c}://wcV2?${a}#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`;default:return`${c}://wc?uri=${a}`}}};return Ee(t)},lo=()=>{var e,n,r;if(!((r=(n=(e=v.getState().walletConnect)==null?void 0:e.options)==null?void 0:n.projectId)!=null&&r.trim()))throw new Error("walletConnect.options.projectId is not defined");if(!ae())throw new Error("WalletConnect Leap mobile is only supported in mobile");let t={encoding:"base64",appUrl:{mobile:{ios:"leapcosmos://",android:"intent://"}},walletType:"wc_leap_mobile",formatNativeUrl:(s,o,i)=>{let c=s.replaceAll("/","").replaceAll(":",""),a=encodeURIComponent(o);switch(i){case"ios":return`${c}://wcV2?${a}`;case"android":return`${c}://wcV2?${a}#Intent;package=io.leapwallet.cosmos;scheme=leapwallet;end;`;default:return`${c}://wc?uri=${a}`}}};return Ee(t)},po=()=>{var e,n,r;if(!((r=(n=(e=v.getState().walletConnect)==null?void 0:e.options)==null?void 0:n.projectId)!=null&&r.trim()))throw new Error("walletConnect.options.projectId is not defined");if(!ae())throw new Error("WalletConnect Leap mobile is only supported in mobile");let t={encoding:"hex",appUrl:{mobile:{ios:"cosmostation://",android:"cosmostation://"}},walletType:"wc_leap_mobile",formatNativeUrl:(s,o,i)=>`${s.replaceAll("/","").replaceAll(":","")}://wc?${o}`};return Ee(t)},ve=(t=v.getState().walletType)=>{switch(t){case"keplr":return ct();case"leap":return ut();case"cosmostation":return lt();case"walletconnect":return Ee();case"wc_keplr_mobile":return uo();case"wc_leap_mobile":return lo();case"wc_cosmostation_mobile":return po();default:throw new Error("Unknown wallet type")}},Cu=()=>Object.fromEntries(Ht.map(t=>[t,ye(t)]));var Te=async t=>{var e;try{let{defaultChain:n,recentChain:r,walletType:s}=v.getState(),o=(t==null?void 0:t.walletType)||s;if(!ye(o))throw new Error(`${o} is not available`);let c=ve(o),a=(t==null?void 0:t.chain)||r||n;if(!a)throw new Error("No last known connected chain, connect action requires chain info");E.setState(Y=>{let xe=v.getState()._reconnect||!!v.getState()._reconnectConnector||!!a;return Y.activeChain&&Y.activeChain.chainId!==a.chainId?{status:"connecting"}:xe?{status:"reconnecting"}:{status:"connecting"}});let{account:u,activeChain:p}=E.getState();if(await((e=c.init)==null?void 0:e.call(c)),!u||(p==null?void 0:p.chainId)!==a.chainId){await c.enable(a.chainId);let Y=await c.getKey(a.chainId);E.setState({account:Y})}let h=c.getOfflineSigner(a.chainId),C=c.getOfflineSignerOnlyAmino(a.chainId),m=await c.getOfflineSignerAuto(a.chainId),F=a.gas?ho.fromString(`${a.gas.price}${a.gas.denom}`):void 0,[Fe,ne]=await Promise.all([Be(a),We({...a,offlineSignerAuto:m,cosmWasmSignerOptions:{gasPrice:F,...(t==null?void 0:t.signerOpts)||{}}})]);v.setState({recentChain:a,walletType:o,_reconnect:!!(t!=null&&t.autoReconnect),_reconnectConnector:o}),E.setState({activeChain:a,clients:Fe,offlineSigner:h,offlineSignerAmino:C,offlineSignerAuto:m,signingClients:ne,status:"connected"}),typeof window<"u"&&window.sessionStorage.setItem(se,"Active");let{account:fe}=E.getState();return{account:fe,walletType:o,chain:a}}catch(n){throw console.error("connect ",n),E.getState().account===null&&E.setState({status:"disconnected"}),E.getState().account&&E.getState().activeChain&&E.setState({status:"connected"}),n}},pt=async(t=!1)=>(typeof window<"u"&&window.sessionStorage.removeItem(se),E.setState(Ie),v.setState(e=>({_reconnect:!1,_reconnectConnector:null,recentChain:t?null:e.recentChain})),Promise.resolve()),J=async t=>{var s;let{recentChain:e,_reconnectConnector:n,_reconnect:r}=v.getState();try{let o=ye(n||void 0);if(e&&o&&n)return await Te({chain:e,walletType:n,autoReconnect:r})}catch(o){(s=t==null?void 0:t.onError)==null||s.call(t,o),pt()}};var Cn=()=>{v.setState({recentChain:null})},Sn=t=>{let{activeChain:e}=E.getState();return e==null?void 0:e.currencies.find(n=>n.coinMinimalDenom===t)},Nu=()=>v.getState().recentChain,ht=async t=>(await ve().experimentalSuggestChain(t),t),wn=async({chainInfo:t,rpcHeaders:e,gas:n,path:r,...s})=>{let o=await ht(t);return{...await Te({chain:{chainId:t.chainId,currencies:t.currencies,rest:t.rest,rpc:t.rpc,rpcHeaders:e,gas:n,path:r},...s}),chain:o}};var An=(t={})=>(v.setState(e=>({defaultChain:t.defaultChain||e.defaultChain,defaultSigningClient:t.defaultSigningClient||e.defaultSigningClient,walletConnect:t.walletConnect||e.walletConnect,walletType:t.defaultWallet||e.walletType,_notFoundFn:t.onNotFound||e._notFoundFn,_onReconnectFailed:t.onReconnectFailed||e._onReconnectFailed,_reconnect:t.autoReconnect===void 0?!0:t.autoReconnect||e._reconnect})),t);var xn=async t=>{let{activeChain:e,signingClients:n}=E.getState();if(!e||!n)throw new Error("No connected account detected");let{defaultSigningClient:r}=v.getState();return await Promise.all(e.currencies.map(async o=>{let i=o.coinMinimalDenom.startsWith("cw20:");return n[r].getBalance(t,i?o.coinMinimalDenom.replace("cw20:",""):o.coinMinimalDenom)}))},In=async t=>{let{clients:e}=E.getState();if(!(e!=null&&e.stargate))throw new Error("Stargate client is not ready");return e.stargate.getBalanceStaked(t)},vn=async({senderAddress:t,recipientAddress:e,amount:n,fee:r,memo:s})=>{let{defaultSigningClient:o}=v.getState(),{signingClients:i}=E.getState();if(!i)throw new Error("No connected account detected");if(!t)throw new Error("senderAddress is not defined");return i[o].sendTokens(t,e,n,r,s)},Tn=async({senderAddress:t,recipientAddress:e,transferAmount:n,sourcePort:r,sourceChannel:s,timeoutHeight:o,timeoutTimestamp:i,fee:c,memo:a})=>{let{signingClients:u}=E.getState();if(!(u!=null&&u.stargate))throw new Error("Stargate signing client is not ready");if(!t)throw new Error("senderAddress is not defined");return u.stargate.sendIbcTokens(t,e,n,r,s,o,i,c,a)},bn=async({senderAddress:t,msg:e,fee:n,options:r,label:s,codeId:o})=>{let{signingClients:i}=E.getState();if(!(i!=null&&i.cosmWasm))throw new Error("CosmWasm signing client is not ready");return i.cosmWasm.instantiate(t,o,e,s,n,r)},Rn=async({senderAddress:t,msg:e,fee:n,contractAddress:r,funds:s,memo:o})=>{let{signingClients:i}=E.getState();if(!(i!=null&&i.cosmWasm))throw new Error("CosmWasm signing client is not ready");return i.cosmWasm.execute(t,r,e,n,o,s)},On=async(t,e)=>{let{clients:n}=E.getState();if(!(n!=null&&n.cosmWasm))throw new Error("CosmWasm client is not ready");return await n.cosmWasm.queryContractSmart(t,e)},Nn=(t,e)=>{let{clients:n}=E.getState();if(!(n!=null&&n.cosmWasm))throw new Error("CosmWasm client is not ready");let r=new TextEncoder().encode(e);return n.cosmWasm.queryContractRaw(t,r)};import{Bech32Address as mo}from"@keplr-wallet/cosmos";var Ln={coinDenom:"axl",coinMinimalDenom:"uaxl",coinDecimals:6,coinGeckoId:"axelar-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/axl.png"},fo={coinDenom:"usdc",coinMinimalDenom:"uusdc",coinDecimals:6,coinGeckoId:"usd-coin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdc.png"},go={coinDenom:"dai",coinMinimalDenom:"dai-wei",coinDecimals:18,coinGeckoId:"dai",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/dai.png"},yo={coinDenom:"usdt",coinMinimalDenom:"uusdt",coinDecimals:6,coinGeckoId:"tether",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdt.png"},Eo={coinDenom:"weth-wei",coinMinimalDenom:"weth",coinDecimals:18,coinGeckoId:"weth",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/weth.png"},Co={coinDenom:"wbtc-satoshi",coinMinimalDenom:"wbtc",coinDecimals:8,coinGeckoId:"wrapped-bitcoin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/wbtc.png"},Dn=[Ln,fo,go,yo,Eo,Co],mt={rpc:"https://rpc.axelar.strange.love",rest:"https://api.axelar.strange.love",chainId:"axelar-dojo-1",chainName:"Axelar",stakeCurrency:Ln,bip44:{coinType:118},bech32Config:mo.defaultBech32Config("axelar"),currencies:Dn,feeCurrencies:Dn};import{Bech32Address as So}from"@keplr-wallet/cosmos";var _n={coinDenom:"atom",coinMinimalDenom:"uatom",coinDecimals:6,coinGeckoId:"cosmos",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},qn=[_n],ft={rpc:"https://rpc.cosmoshub.strange.love",rest:"https://api.cosmoshub.strange.love",chainId:"cosmoshub-4",chainName:"Cosmos Hub",stakeCurrency:_n,bip44:{coinType:118},bech32Config:So.defaultBech32Config("cosmos"),currencies:qn,feeCurrencies:qn};import{Bech32Address as wo}from"@keplr-wallet/cosmos";var $n={coinDenom:"juno",coinMinimalDenom:"ujuno",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},Ao={coinDenom:"neta",coinMinimalDenom:"cw20:juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr",coinDecimals:6,coinGeckoId:"neta",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/neta.png"},xo={coinDenom:"marble",coinMinimalDenom:"cw20:juno1g2g7ucurum66d42g8k5twk34yegdq8c82858gz0tq2fc75zy7khssgnhjl",coinDecimals:3,coinGeckoId:"marble",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/marble.png"},Io={coinDenom:"hope",coinMinimalDenom:"cw20:juno1re3x67ppxap48ygndmrc7har2cnc7tcxtm9nplcas4v0gc3wnmvs3s807z",coinDecimals:6,coinGeckoId:"hope-galaxy",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hope.png"},vo={coinDenom:"rac",coinMinimalDenom:"cw20:juno1r4pzw8f9z0sypct5l9j906d47z998ulwvhvqe5xdwgy8wf84583sxwh0pa",coinDecimals:6,coinGeckoId:"racoon",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/rac.png"},To={coinDenom:"block",coinMinimalDenom:"cw20:juno1y9rf7ql6ffwkv02hsgd4yruz23pn4w97p75e2slsnkm0mnamhzysvqnxaq",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/block.png"},bo={coinDenom:"dhk",coinMinimalDenom:"cw20:juno1tdjwrqmnztn2j3sj2ln9xnyps5hs48q3ddwjrz7jpv6mskappjys5czd49",coinDecimals:0,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/dhk.png"},Ro={coinDenom:"raw",coinMinimalDenom:"cw20:juno15u3dt79t6sxxa3x3kpkhzsy56edaa5a66wvt3kxmukqjz2sx0hes5sn38g",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/raw.png",coinGeckoId:"junoswap-raw-dao"},Oo={coinDenom:"asvt",coinMinimalDenom:"cw20:juno17wzaxtfdw5em7lc94yed4ylgjme63eh73lm3lutp2rhcxttyvpwsypjm4w",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/asvt.png"},No={coinDenom:"hns",coinMinimalDenom:"cw20:juno1ur4jx0sxchdevahep7fwq28yk4tqsrhshdtylz46yka3uf6kky5qllqp4k",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hns.svg"},Do={coinDenom:"joe",coinMinimalDenom:"cw20:juno1n7n7d5088qlzlj37e9mgmkhx6dfgtvt02hqxq66lcap4dxnzdhwqfmgng3",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/joe.png"},jn=[$n,Ao,xo,Io,vo,To,bo,Ro,Oo,No,Do],gt={rpc:"https://rpc.juno.strange.love",rest:"https://api.juno.strange.love",chainId:"juno-1",chainName:"Juno",stakeCurrency:$n,bip44:{coinType:118},bech32Config:wo.defaultBech32Config("juno"),currencies:jn,feeCurrencies:jn};import{Bech32Address as Lo}from"@keplr-wallet/cosmos";var Pn={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},qo={coinDenom:"ion",coinMinimalDenom:"uion",coinDecimals:6,coinGeckoId:"ion",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png"},Fn=[Pn,qo],dt={rpc:"https://rpc.osmosis.strange.love",rest:"https://api.osmosis.strange.love",chainId:"osmosis-1",chainName:"Osmosis",stakeCurrency:Pn,bip44:{coinType:118},bech32Config:Lo.defaultBech32Config("osmo"),currencies:Fn,feeCurrencies:Fn};import{Bech32Address as _o}from"@keplr-wallet/cosmos";var Un={coinDenom:"somm",coinMinimalDenom:"usomm",coinDecimals:6,coinGeckoId:"sommelier",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png"},Gn=[Un],yt={rpc:"https://rpc.sommelier.strange.love",rest:"https://api.sommelier.strange.love",chainId:"sommelier-3",chainName:"Sommelier",stakeCurrency:Un,bip44:{coinType:118},bech32Config:_o.defaultBech32Config("somm"),currencies:Gn,feeCurrencies:Gn};import{Bech32Address as jo}from"@keplr-wallet/cosmos";var Wn={coinDenom:"CRE",coinMinimalDenom:"ucre",coinDecimals:6,coinGeckoId:"crescent",coinImageUrl:"https://raw.githubusercontent.com/crescent-network/asset/main/images/coin/CRE.png"},Bn=[Wn],Et={rpc:"https://testnet-endpoint.crescent.network/rpc/crescent",rest:"https://testnet-endpoint.crescent.network/api/crescent",chainId:"mooncat-1-1",chainName:"Crescent Testnet",bip44:{coinType:118},bech32Config:jo.defaultBech32Config("CRE"),currencies:Bn,feeCurrencies:Bn,stakeCurrency:Wn,coinType:118};import{Bech32Address as $o}from"@keplr-wallet/cosmos";var Ct={coinDenom:"junox",coinMinimalDenom:"ujunox",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},Fo=[Ct],St={rpc:"https://rpc.uni.junonetwork.io",rest:"https://api.uni.junonetwork.io",chainId:"uni-5",chainName:"Juno Testnet",stakeCurrency:Ct,bip44:{coinType:118},bech32Config:$o.defaultBech32Config("juno"),currencies:Fo,feeCurrencies:[Ct],coinType:118};import{Bech32Address as Po}from"@keplr-wallet/cosmos";var wt={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://dhj8dql1kzq2v.cloudfront.net/white/osmo.png"},Go=[wt],At={rpc:"https://testnet-rpc.osmosis.zone",rest:"https://testnet-rest.osmosis.zone",chainId:"osmo-test-4",chainName:"Osmosis Testnet",stakeCurrency:wt,bip44:{coinType:118},bech32Config:Po.defaultBech32Config("osmo"),currencies:Go,feeCurrencies:[wt],coinType:118};var Mn=t=>t,al=t=>t,cl=t=>t,ul=Mn({axelar:mt,cosmoshub:ft,juno:gt,osmosis:dt,sommelier:yt}),ll=[mt,ft,gt,dt,yt],pl=Mn({crescent:Et,juno:St,osmosis:At}),hl=[Et,St,At];import{useMutation as kn,useQuery as xt}from"@tanstack/react-query";import{useEffect as Wo}from"react";import{shallow as Mo}from"zustand/shallow";import{useQuery as Uo}from"@tanstack/react-query";import{shallow as Bo}from"zustand/shallow";var El=()=>v(t=>({walletType:t.walletType,isCosmostation:t.walletType==="cosmostation",isCosmostationMobile:t.walletType==="wc_cosmostation_mobile",isKeplr:t.walletType==="keplr",isKeplrMobile:t.walletType==="wc_keplr_mobile",isLeap:t.walletType==="leap",isLeapMobile:t.walletType==="wc_leap_mobile",isWalletConnect:t.walletType==="walletconnect"}),Bo),ke=t=>{let n=["USE_CHECK_WALLET",v(s=>t||s.walletType)];return Uo(n,({queryKey:[,s]})=>ye(s))};var ue=({onConnect:t,onDisconnect:e}={})=>{let n=E(s=>s.account),r=E(s=>s.status);return Wo(()=>E.subscribe(s=>s.status,(s,o)=>{if(s==="connected"){let{account:i,activeChain:c}=E.getState(),{walletType:a}=v.getState();t==null||t({account:i,chain:c,walletType:a,isReconnect:o==="reconnecting"})}s==="disconnected"&&(e==null||e())}),[t,e]),{data:n,isConnected:!!n,isConnecting:r==="connecting",isDisconnected:r==="disconnected",isReconnecting:r==="reconnecting",isLoading:r==="connecting"||r==="reconnecting",reconnect:J,status:r}},ko=t=>{let{data:e}=ue(),n=t||(e==null?void 0:e.bech32Address);return xt(["USE_BALANCES",n],({queryKey:[,o]})=>xn(o),{enabled:!!n,refetchOnMount:!1,refetchOnReconnect:!0,refetchOnWindowFocus:!1})},bl=(t,e)=>{let{data:n}=ko(e);return xt(["USE_BALANCE",n,t,e],({queryKey:[,o]})=>o==null?void 0:o.find(i=>i.denom===t),{enabled:!!n})},Rl=({onError:t,onLoading:e,onSuccess:n}={})=>{let s=kn(["USE_CONNECT",t,e,n],Te,{onError:(i,c)=>Promise.resolve(t==null?void 0:t(i,c)),onMutate:e,onSuccess:i=>Promise.resolve(n==null?void 0:n(i))}),{data:o}=ke();return{connect:i=>s.mutate(i),connectAsync:i=>s.mutateAsync(i),error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,isSupported:!!o,status:s.status}},Ol=({onError:t,onLoading:e,onSuccess:n}={})=>{let s=kn(["USE_DISCONNECT",t,e,n],pt,{onError:o=>Promise.resolve(t==null?void 0:t(o,void 0)),onMutate:e,onSuccess:()=>Promise.resolve(n==null?void 0:n(void 0))});return{disconnect:o=>s.mutate(o),disconnectAsync:o=>s.mutateAsync(o),error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,status:s.status}},zo=()=>E(t=>({signer:t.offlineSigner,signerAmino:t.offlineSignerAmino,signerAuto:t.offlineSignerAuto}),Mo),Nl=()=>zo(),Dl=t=>{let{data:e}=ue(),n=t||(e==null?void 0:e.bech32Address);return xt(["USE_BALANCE_STAKED",n],({queryKey:[,o]})=>In(n),{enabled:!!n})};import{useMutation as zn,useQuery as Kn}from"@tanstack/react-query";var Fl=()=>E(t=>t.activeChain),Pl=t=>Kn(["USE_ACTIVE_CHAIN_CURRENCY",t],({queryKey:[,r]})=>Sn(r)),Gl=(t,e="BOND_STATUS_BONDED")=>Kn(["USE_ACTIVE_CHAIN_VALIDATORS",t,e],({queryKey:[,s,o]})=>s.staking.validators(o),{enabled:typeof t<"u"}),Ul=()=>({data:v(e=>e.recentChain),clear:Cn}),Bl=({onError:t,onLoading:e,onSuccess:n}={})=>{let s=zn(["USE_SUGGEST_CHAIN",t,e,n],ht,{onError:(o,i)=>Promise.resolve(t==null?void 0:t(o,i)),onMutate:e,onSuccess:o=>Promise.resolve(n==null?void 0:n(o))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,suggest:s.mutate,suggestAsync:s.mutateAsync,status:s.status}},Wl=({onError:t,onLoading:e,onSuccess:n}={})=>{let s=zn(["USE_SUGGEST_CHAIN_AND_CONNECT",t,e,n],wn,{onError:(i,c)=>Promise.resolve(t==null?void 0:t(i,c)),onMutate:i=>e==null?void 0:e(i),onSuccess:i=>Promise.resolve(n==null?void 0:n(i))}),{data:o}=ke();return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,isSupported:!!o,status:s.status,suggestAndConnect:s.mutate,suggestAndConnectAsync:s.mutateAsync}};import{useQuery as Qn}from"@tanstack/react-query";var Vl=t=>{let e=E(s=>s.clients);return Qn(["USE_CLIENTS",t,e],({queryKey:[,s,o]})=>s!=null&&s.rpc?Be(s):o,{refetchOnMount:!1,refetchOnWindowFocus:!1,onSuccess:s=>{E.setState({clients:s})},initialData:e})},Hl=t=>{let e=E(s=>s.signingClients);return Qn(["USE_SIGNING_CLIENTS",t,e],({queryKey:[,s,o]})=>s!=null&&s.rpc?We(s):o,{refetchOnMount:!1,refetchOnWindowFocus:!1,onSuccess:s=>{E.setState({signingClients:s})},initialData:e})};import{useQuery as Ko}from"@tanstack/react-query";var Jl=(...t)=>{let e=["USE_QUERY_CLIENT",...t];return Ko(e,({queryKey:[,...r]})=>tn(...t),{refetchOnMount:!1,refetchOnWindowFocus:!1})};import{useMutation as ze,useQuery as Vn}from"@tanstack/react-query";var sp=({onError:t,onLoading:e,onSuccess:n}={})=>{let{data:r}=ue(),s=r==null?void 0:r.bech32Address,i=ze(["USE_SEND_TOKENS",t,e,n,s],c=>vn({senderAddress:s,...c}),{onError:(c,a)=>Promise.resolve(t==null?void 0:t(c,a)),onMutate:e,onSuccess:c=>Promise.resolve(n==null?void 0:n(c))});return{error:i.error,isLoading:i.isLoading,isSuccess:i.isSuccess,sendTokens:i.mutate,sendTokensAsync:i.mutateAsync,status:i.status}},op=({onError:t,onLoading:e,onSuccess:n}={})=>{let{data:r}=ue(),s=r==null?void 0:r.bech32Address,i=ze(["USE_SEND_IBC_TOKENS",t,e,n,s],c=>Tn({senderAddress:s,...c}),{onError:(c,a)=>Promise.resolve(t==null?void 0:t(c,a)),onMutate:e,onSuccess:c=>Promise.resolve(n==null?void 0:n(c))});return{error:i.error,isLoading:i.isLoading,isSuccess:i.isSuccess,sendIbcTokens:i.mutate,sendIbcTokensAsync:i.mutateAsync,status:i.status}},ip=({codeId:t,onError:e,onLoading:n,onSuccess:r})=>{let{data:s}=ue(),o=s==null?void 0:s.bech32Address,a=ze(["USE_INSTANTIATE_CONTRACT",e,n,r,t,o],u=>{if(!o)throw new Error("senderAddress is undefined");let p={...u,fee:u.fee??"auto",senderAddress:o,codeId:t};return bn(p)},{onError:(u,p)=>Promise.resolve(e==null?void 0:e(u,p)),onMutate:n,onSuccess:u=>Promise.resolve(r==null?void 0:r(u))});return{error:a.error,isLoading:a.isLoading,isSuccess:a.isSuccess,instantiateContract:a.mutate,instantiateContractAsync:a.mutateAsync,status:a.status}},ap=({contractAddress:t,onError:e,onLoading:n,onSuccess:r})=>{let{data:s}=ue(),o=s==null?void 0:s.bech32Address,a=ze(["USE_EXECUTE_CONTRACT",e,n,r,t,o],u=>{if(!o)throw new Error("senderAddress is undefined");let p={...u,fee:u.fee??"auto",senderAddress:o,contractAddress:t,memo:u.memo??"",funds:u.funds??[]};return Rn(p)},{onError:(u,p)=>Promise.resolve(e==null?void 0:e(u,p)),onMutate:n,onSuccess:u=>Promise.resolve(r==null?void 0:r(u))});return{error:a.error,isLoading:a.isLoading,isSuccess:a.isSuccess,executeContract:a.mutate,executeContractAsync:a.mutateAsync,status:a.status}},cp=(t,e)=>Vn(["USE_QUERY_SMART",t,e],({queryKey:[,s]})=>{if(!t||!e)throw new Error("address or queryMsg undefined");return On(t,e)},{enabled:!!t&&!!e}),up=(t,e)=>Vn(["USE_QUERY_RAW",e,t],({queryKey:[,s]})=>{if(!t||!e)throw new Error("address or key undefined");return Nn(t,e)},{enabled:!!t&&!!e});import{QueryClient as Zo,QueryClientProvider as Jo}from"@tanstack/react-query";import{ReactQueryDevtools as ei}from"@tanstack/react-query-devtools";import{useEffect as Qo,useState as Vo}from"react";import{Fragment as Ho,jsx as Xo}from"react/jsx-runtime";var Hn=({children:t})=>{let[e,n]=Vo(!1);return Qo(()=>{n(!0)},[]),Xo(Ho,{children:e?t:null})};import{useEffect as Xn}from"react";var Yo=()=>{let t=typeof window<"u"&&window.sessionStorage.getItem(se)==="Active",{_reconnect:e,_onReconnectFailed:n,_reconnectConnector:r}=v(),{activeChain:s,wcSignClient:o}=E();return Xn(()=>{r&&(t&&s?J({onError:n}):!t&&e&&J({onError:n}))},[]),Xn(()=>{var i,c,a,u,p,h,C,m;r&&(r==="cosmostation"&&((c=(i=lt()).subscription)==null||c.call(i,()=>{J({onError:n})})),r==="keplr"&&((u=(a=ct()).subscription)==null||u.call(a,()=>{J({onError:n})})),r==="leap"&&((h=(p=ut()).subscription)==null||h.call(p,()=>{J({onError:n})})),r==="walletconnect"&&o&&((m=(C=Ee()).subscription)==null||m.call(C,()=>{J({onError:n})})))},[r,o]),null},Yn=()=>(Yo(),null);import{jsx as Zn,jsxs as Jn}from"react/jsx-runtime";var ti=new Zo({}),vp=({children:t,grazOptions:e,debug:n,...r})=>(e&&An(e),Jn(Jo,{client:ti,...r,children:[Jn(Hn,{children:[Zn(Yn,{}),t]}),n?Zn(ei,{initialIsOpen:!1,position:"bottom-right"}):null]},"graz-provider"));var Rp=t=>t,Op=t=>t,Np=t=>t;var $e=st(kt());import{Bech32Address as Qc}from"@keplr-wallet/cosmos";function Ys(t,e){if(t)return;if(process.env.NODE_ENV==="production")throw new Error(zt);let n=typeof e=="function"?e():e,r=n?`${zt}: ${n}`:zt;throw new Error(r)}var zt="Invariant failed";var Zs=st(kt()),Kt=t=>{if(!(0,Zs.valid)(t))switch(t.split(".").length){case 1:return`${t}.0.0`;case 2:return`${t}.0`;case 3:default:throw new Error("invalid semver")}return t};var Oh=t=>{var ne,fe,Y,xe,Pe,rt;let{chain:e,getRestEndpoint:n=({apis:A})=>{var P,V;return((V=(P=A==null?void 0:A.rest)==null?void 0:P[0])==null?void 0:V.address)??""},getRpcEndpoint:r=({apis:A})=>{var P,V;return((V=(P=A==null?void 0:A.rpc)==null?void 0:P[0])==null?void 0:V.address)??""}}=t,s=[],o=Kt(((ne=e.codebase)==null?void 0:ne.cosmos_sdk_version)??"0.4");if((0,$e.satisfies)(o,">=0.4")&&s.push("stargate"),(0,$e.satisfies)(o,">=0.43")&&s.push("no-legacy-stdTx"),s.push("ibc-transfer"),(0,$e.satisfies)(o,">=0.45")&&s.push("ibc-go"),(fe=e.codebase)!=null&&fe.cosmwasm_enabled){s.push("cosmwasm");let A=Kt(e.codebase.cosmwasm_version??"0.24");(0,$e.satisfies)(A,">=0.24")&&s.push("wasmd_0.24+")}let i=[];"assetlists"in t&&Array.isArray(t.assetlists)&&(i=((Y=t.assetlists.find(A=>A.chain_name===e.chain_name))==null?void 0:Y.assets)||[]),"assetlist"in t&&Array.isArray(t.assetlist.assets)&&(i=t.assetlist.assets),"assets"in t&&Array.isArray(t.assets)&&(i=t.assets);let c=((xe=e.fees)==null?void 0:xe.fee_tokens.map(A=>A.denom))||[],a={};for(let A of((Pe=e.fees)==null?void 0:Pe.fee_tokens)||[])a[A.denom]={low:A.low_gas_price??.01,average:A.average_gas_price??.025,high:A.high_gas_price??.04};let u=((rt=e.staking)==null?void 0:rt.staking_tokens.map(A=>A.denom))||[],p=i.map(A=>{var V,y;let P=A.denom_units.reduce((d,S)=>S.exponent>d.exponent?S:d);return{coinDenom:A.symbol,coinMinimalDenom:A.base,coinDecimals:P.exponent,coinGeckoId:A.coingecko_id,coinImageUrl:((V=A.logo_URIs)==null?void 0:V.svg)??((y=A.logo_URIs)==null?void 0:y.png)}}),h=p[0];Ys(h,`chain '${e.chain_name}' has no assets`);let C=p.find(A=>u.includes(A.coinDenom))??h,m=p.filter(A=>c.includes(A.coinMinimalDenom)).map(A=>{if(!a.hasOwnProperty(A.coinMinimalDenom))return A;let P=a[A.coinMinimalDenom];return{...A,gasPriceStep:P}}),F=p.filter(A=>C.coinDenom===A.coinDenom).map(A=>{if(!a.hasOwnProperty(A.coinMinimalDenom))return A;let P=a[A.coinMinimalDenom];return{...A,gasPriceStep:P}});return{rpc:r(e),rest:n(e),chainId:e.chain_id,chainName:e.pretty_name||"",bip44:{coinType:e.slip44||118},bech32Config:Qc.defaultBech32Config(e.bech32_prefix),currencies:p,stakeCurrency:C,feeCurrencies:m.length!==0?m:F,features:s}};export{Yn as GrazEvents,vp as GrazProvider,Ht as WALLET_TYPES,Vt as WalletType,ye as checkWallet,Cn as clearRecentChain,An as configureGraz,Te as connect,Be as createClients,tn as createQueryClient,We as createSigningClients,Rp as defineAsset,Op as defineAssetList,al as defineChain,cl as defineChainInfo,Mn as defineChains,Np as defineRegistryChain,pt as disconnect,Rn as executeContract,Sn as getActiveChainCurrency,Cu as getAvailableWallets,In as getBalanceStaked,xn as getBalances,lt as getCosmostation,ct as getKeplr,ut as getLeap,Nn as getQueryRaw,On as getQuerySmart,Nu as getRecentChain,po as getWCCosmostation,uo as getWCKeplr,lo as getWCLeap,ve as getWallet,Ee as getWalletConnect,bn as instantiateContract,ul as mainnetChains,ll as mainnetChainsArray,J as reconnect,Oh as registryToChainInfo,Tn as sendIbcTokens,vn as sendTokens,ht as suggestChain,wn as suggestChainAndConnect,pl as testnetChains,hl as testnetChainsArray,ue as useAccount,Fl as useActiveChain,Pl as useActiveChainCurrency,Gl as useActiveChainValidators,El as useActiveWalletType,bl as useBalance,Dl as useBalanceStaked,ko as useBalances,ke as useCheckWallet,Vl as useClients,Rl as useConnect,Ol as useDisconnect,ap as useExecuteContract,Yo as useGrazEvents,ip as useInstantiateContract,zo as useOfflineSigners,Jl as useQueryClient,up as useQueryRaw,cp as useQuerySmart,Ul as useRecentChain,op as useSendIbcTokens,sp as useSendTokens,Nl as useSigners,Hl as useSigningClients,Bl as useSuggestChain,Wl as useSuggestChainAndConnect};
|
|
1
|
+
import{a as Rt,b as Ut,c as R}from"./chunk-HBC2VYPF.mjs";var Xe=Rt((oo,Ye)=>{"use strict";Ye.exports=S;var O=null;try{O=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function S(t,e,n){this.low=t|0,this.high=e|0,this.unsigned=!!n}S.prototype.__isLong__;Object.defineProperty(S.prototype,"__isLong__",{value:!0});function D(t){return(t&&t.__isLong__)===!0}S.isLong=D;var Ge={},Le={};function P(t,e){var n,r,o;return e?(t>>>=0,(o=0<=t&&t<256)&&(r=Le[t],r)?r:(n=w(t,(t|0)<0?-1:0,!0),o&&(Le[t]=n),n)):(t|=0,(o=-128<=t&&t<128)&&(r=Ge[t],r)?r:(n=w(t,t<0?-1:0,!1),o&&(Ge[t]=n),n))}S.fromInt=P;function j(t,e){if(isNaN(t))return e?U:F;if(e){if(t<0)return U;if(t>=He)return Ze}else{if(t<=-Ke)return v;if(t+1>=Ke)return $e}return t<0?j(-t,e).neg():w(t%K|0,t/K|0,e)}S.fromNumber=j;function w(t,e,n){return new S(t,e,n)}S.fromBits=w;var ne=Math.pow;function ce(t,e,n){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return F;if(typeof e=="number"?(n=e,e=!1):e=!!e,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return ce(t.substring(1),e,n).neg();for(var o=j(ne(n,8)),s=F,i=0;i<t.length;i+=8){var a=Math.min(8,t.length-i),c=parseInt(t.substring(i,i+a),n);if(a<8){var g=j(ne(n,a));s=s.mul(g).add(j(c))}else s=s.mul(o),s=s.add(j(c))}return s.unsigned=e,s}S.fromString=ce;function k(t,e){return typeof t=="number"?j(t,e):typeof t=="string"?ce(t,e):w(t.low,t.high,typeof e=="boolean"?e:t.unsigned)}S.fromValue=k;var ze=65536,Qt=1<<24,K=ze*ze,He=K*K,Ke=He/2,Qe=P(Qt),F=P(0);S.ZERO=F;var U=P(0,!0);S.UZERO=U;var z=P(1);S.ONE=z;var Ve=P(1,!0);S.UONE=Ve;var ie=P(-1);S.NEG_ONE=ie;var $e=w(-1,2147483647,!1);S.MAX_VALUE=$e;var Ze=w(-1,-1,!0);S.MAX_UNSIGNED_VALUE=Ze;var v=w(0,-2147483648,!1);S.MIN_VALUE=v;var u=S.prototype;u.toInt=function(){return this.unsigned?this.low>>>0:this.low};u.toNumber=function(){return this.unsigned?(this.high>>>0)*K+(this.low>>>0):this.high*K+(this.low>>>0)};u.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(v)){var n=j(e),r=this.div(n),o=r.mul(n).sub(this);return r.toString(e)+o.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var s=j(ne(e,6),this.unsigned),i=this,a="";;){var c=i.div(s),g=i.sub(c.mul(s)).toInt()>>>0,d=g.toString(e);if(i=c,i.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}};u.getHighBits=function(){return this.high};u.getHighBitsUnsigned=function(){return this.high>>>0};u.getLowBits=function(){return this.low};u.getLowBitsUnsigned=function(){return this.low>>>0};u.getNumBitsAbs=function(){if(this.isNegative())return this.eq(v)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,n=31;n>0&&!(e&1<<n);n--);return this.high!=0?n+33:n+1};u.isZero=function(){return this.high===0&&this.low===0};u.eqz=u.isZero;u.isNegative=function(){return!this.unsigned&&this.high<0};u.isPositive=function(){return this.unsigned||this.high>=0};u.isOdd=function(){return(this.low&1)===1};u.isEven=function(){return(this.low&1)===0};u.equals=function(e){return D(e)||(e=k(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};u.eq=u.equals;u.notEquals=function(e){return!this.eq(e)};u.neq=u.notEquals;u.ne=u.notEquals;u.lessThan=function(e){return this.comp(e)<0};u.lt=u.lessThan;u.lessThanOrEqual=function(e){return this.comp(e)<=0};u.lte=u.lessThanOrEqual;u.le=u.lessThanOrEqual;u.greaterThan=function(e){return this.comp(e)>0};u.gt=u.greaterThan;u.greaterThanOrEqual=function(e){return this.comp(e)>=0};u.gte=u.greaterThanOrEqual;u.ge=u.greaterThanOrEqual;u.compare=function(e){if(D(e)||(e=k(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1};u.comp=u.compare;u.negate=function(){return!this.unsigned&&this.eq(v)?v:this.not().add(z)};u.neg=u.negate;u.add=function(e){D(e)||(e=k(e));var n=this.high>>>16,r=this.high&65535,o=this.low>>>16,s=this.low&65535,i=e.high>>>16,a=e.high&65535,c=e.low>>>16,g=e.low&65535,d=0,x=0,C=0,E=0;return E+=s+g,C+=E>>>16,E&=65535,C+=o+c,x+=C>>>16,C&=65535,x+=r+a,d+=x>>>16,x&=65535,d+=n+i,d&=65535,w(C<<16|E,d<<16|x,this.unsigned)};u.subtract=function(e){return D(e)||(e=k(e)),this.add(e.neg())};u.sub=u.subtract;u.multiply=function(e){if(this.isZero())return F;if(D(e)||(e=k(e)),O){var n=O.mul(this.low,this.high,e.low,e.high);return w(n,O.get_high(),this.unsigned)}if(e.isZero())return F;if(this.eq(v))return e.isOdd()?v:F;if(e.eq(v))return this.isOdd()?v:F;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(Qe)&&e.lt(Qe))return j(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,o=this.high&65535,s=this.low>>>16,i=this.low&65535,a=e.high>>>16,c=e.high&65535,g=e.low>>>16,d=e.low&65535,x=0,C=0,E=0,_=0;return _+=i*d,E+=_>>>16,_&=65535,E+=s*d,C+=E>>>16,E&=65535,E+=i*g,C+=E>>>16,E&=65535,C+=o*d,x+=C>>>16,C&=65535,C+=s*g,x+=C>>>16,C&=65535,C+=i*c,x+=C>>>16,C&=65535,x+=r*d+o*g+s*c+i*a,x&=65535,w(E<<16|_,x<<16|C,this.unsigned)};u.mul=u.multiply;u.divide=function(e){if(D(e)||(e=k(e)),e.isZero())throw Error("division by zero");if(O){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?O.div_u:O.div_s)(this.low,this.high,e.low,e.high);return w(n,O.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?U:F;var r,o,s;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return U;if(e.gt(this.shru(1)))return Ve;s=U}else{if(this.eq(v)){if(e.eq(z)||e.eq(ie))return v;if(e.eq(v))return z;var i=this.shr(1);return r=i.div(e).shl(1),r.eq(F)?e.isNegative()?z:ie:(o=this.sub(e.mul(r)),s=r.add(o.div(e)),s)}else if(e.eq(v))return this.unsigned?U:F;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();s=F}for(o=this;o.gte(e);){r=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),c=a<=48?1:ne(2,a-48),g=j(r),d=g.mul(e);d.isNegative()||d.gt(o);)r-=c,g=j(r,this.unsigned),d=g.mul(e);g.isZero()&&(g=z),s=s.add(g),o=o.sub(d)}return s};u.div=u.divide;u.modulo=function(e){if(D(e)||(e=k(e)),O){var n=(this.unsigned?O.rem_u:O.rem_s)(this.low,this.high,e.low,e.high);return w(n,O.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};u.mod=u.modulo;u.rem=u.modulo;u.not=function(){return w(~this.low,~this.high,this.unsigned)};u.and=function(e){return D(e)||(e=k(e)),w(this.low&e.low,this.high&e.high,this.unsigned)};u.or=function(e){return D(e)||(e=k(e)),w(this.low|e.low,this.high|e.high,this.unsigned)};u.xor=function(e){return D(e)||(e=k(e)),w(this.low^e.low,this.high^e.high,this.unsigned)};u.shiftLeft=function(e){return D(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?w(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):w(0,this.low<<e-32,this.unsigned)};u.shl=u.shiftLeft;u.shiftRight=function(e){return D(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?w(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):w(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};u.shr=u.shiftRight;u.shiftRightUnsigned=function(e){if(D(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return w(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?w(n,0,this.unsigned):w(n>>>e-32,0,this.unsigned)};u.shru=u.shiftRightUnsigned;u.shr_u=u.shiftRightUnsigned;u.toSigned=function(){return this.unsigned?w(this.low,this.high,!1):this};u.toUnsigned=function(){return this.unsigned?this:w(this.low,this.high,!0)};u.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};u.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};u.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};S.fromBytes=function(e,n,r){return r?S.fromBytesLE(e,n):S.fromBytesBE(e,n)};S.fromBytesLE=function(e,n){return new S(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};S.fromBytesBE=function(e,n){return new S(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}});import{GasPrice as Xt}from"@cosmjs/stargate";import{create as Be}from"zustand";import{createJSONStorage as Pt}from"zustand/middleware";import{persist as Ne,subscribeWithSelector as We}from"zustand/middleware";var Fe=(c=>(c.KEPLR="keplr",c.LEAP="leap",c.VECTIS="vectis",c.COSMOSTATION="cosmostation",c.WALLETCONNECT="walletconnect",c.WC_KEPLR_MOBILE="wc_keplr_mobile",c.WC_LEAP_MOBILE="wc_leap_mobile",c.WC_COSMOSTATION_MOBILE="wc_cosmostation_mobile",c))(Fe||{}),ke=["keplr","leap","vectis","cosmostation","walletconnect","wc_keplr_mobile","wc_leap_mobile","wc_cosmostation_mobile"];var qt={recentChain:null,defaultChain:null,defaultSigningClient:"stargate",walletType:"keplr",walletConnect:{options:null,web3Modal:null},_notFoundFn:()=>null,_onReconnectFailed:()=>null,_reconnect:!1,_reconnectConnector:null},$={account:null,activeChain:null,balances:null,clients:null,offlineSigner:null,offlineSignerAmino:null,offlineSignerAuto:null,signingClients:null,status:"disconnected",wcSignClient:null},Gt={name:"graz-session",version:1,partialize:t=>({account:t.account,activeChain:t.activeChain}),storage:Pt(()=>sessionStorage)},Lt={name:"graz-internal",partialize:t=>({recentChain:t.recentChain,_reconnect:t._reconnect,_reconnectConnector:t._reconnectConnector}),version:1},m=Be(We(Ne(()=>$,Gt))),y=Be(We(Ne(()=>qt,Lt)));import{SigningCosmWasmClient as Pe}from"@cosmjs/cosmwasm-stargate";import{SigningStargateClient as qe}from"@cosmjs/stargate";import{Tendermint34Client as Kt}from"@cosmjs/tendermint-rpc";import{QueryClient as zt}from"@cosmjs/stargate";import{assert as Me,isNonNullObject as Re}from"@cosmjs/utils";var Ue=(...t)=>{let{tendermint:e}=m.getState().clients,n=new zt(e),r=t.map(o=>o(n));for(let o of r){Me(Re(o),"Extension must be a non-null object");for(let[s,i]of Object.entries(o)){Me(Re(i),`Module must be a non-null object. Found type ${typeof i} for module "${s}".`);let a=n[s]||{};n[s]={...a,...i}}}return n};var ee=async({rpc:t,rpcHeaders:e})=>{let n={url:t,headers:{...e||{}}},[r,o,s]=await Promise.all([Pe.connect(n),qe.connect(n),Kt.connect(t)]);return{cosmWasm:r,stargate:o,tendermint:s}},te=async t=>{let{rpc:e,rpcHeaders:n,offlineSignerAuto:r,cosmWasmSignerOptions:o={},stargateSignerOptions:s={}}=t,i={url:e,headers:{...n||{}}},[a,c]=await Promise.all([Pe.connectWithSigner(i,r,o),qe.connectWithSigner(i,r,s)]);return{cosmWasm:a,stargate:c}};var ue=Ut(Xe());import{fromBech32 as tt}from"@cosmjs/encoding";import{SignClient as Ht}from"@walletconnect/sign-client";import{getSdkError as Vt}from"@walletconnect/utils";var q=()=>typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1,Je=()=>q()&&navigator.userAgent.toLowerCase().includes("android"),et=()=>q()&&(navigator.userAgent.toLowerCase().includes("iphone")||navigator.userAgent.toLowerCase().includes("ipad"));var ae=(t,e,n=new Error("Promise timed out"))=>{let r=new Promise((o,s)=>{setTimeout(()=>{s(n)},e)});return Promise.race([t,r])};var Q=(t=y.getState().walletType)=>{try{return Z(t),!0}catch{return!1}},W=()=>{window.sessionStorage.removeItem(R),m.setState($)},le=()=>{if(typeof window.keplr<"u"){let t=window.keplr;return Object.assign(t,{subscription:r=>(window.addEventListener("keplr_keystorechange",()=>{W(),r()}),()=>{window.removeEventListener("keplr_keystorechange",()=>{W(),r()})})})}throw y.getState()._notFoundFn(),new Error("window.keplr is not defined")},pe=()=>{if(typeof window.leap<"u"){let t=window.leap;return Object.assign(t,{subscription:r=>(window.addEventListener("leap_keystorechange",()=>{W(),r()}),()=>{window.removeEventListener("leap_keystorechange",()=>{W(),r()})})})}throw y.getState()._notFoundFn(),new Error("window.leap is not defined")},me=()=>{if(typeof window.cosmostation.providers.keplr<"u"){let t=window.cosmostation.providers.keplr;return Object.assign(t,{subscription:r=>(window.cosmostation.cosmos.on("accountChanged",()=>{W(),r()}),()=>{window.cosmostation.cosmos.off("accountChanged",()=>{W(),r()})})})}throw y.getState()._notFoundFn(),new Error("window.cosmostation.providers.keplr is not defined")},ge=()=>{if(typeof window.vectis<"u"){let t=window.vectis.cosmos;return{enable:a=>t.enable(a),getOfflineSigner:a=>t.getOfflineSigner(a),getOfflineSignerAuto:a=>t.getOfflineSignerAuto(a),getKey:async a=>{let c=await t.getKey(a);return{address:tt(c.address).data,algo:c.algo,bech32Address:c.address,name:c.name,pubKey:c.pubKey,isKeystone:!1,isNanoLedger:c.isNanoLedger}},subscription:a=>(window.addEventListener("vectis_accountChanged",()=>{W(),a()}),()=>{window.removeEventListener("vectis_accountChanged",()=>{W(),a()})}),getOfflineSignerOnlyAmino:(...a)=>t.getOfflineSignerAmino(...a),experimentalSuggestChain:async(...a)=>{let[c]=a,g={...c,rpcUrl:c.rpc,restUrl:c.rest,prettyName:c.chainName.replace(" ",""),bech32Prefix:c.bech32Config.bech32PrefixAccAddr};return t.suggestChains([g])},signDirect:async(...a)=>{var d;let{1:c,2:g}=a;return t.signDirect(c,{bodyBytes:g.bodyBytes||Uint8Array.from([]),authInfoBytes:g.authInfoBytes||Uint8Array.from([]),accountNumber:ue.default.fromString(((d=g.accountNumber)==null?void 0:d.toString())||"",!1),chainId:g.chainId||""})},signAmino:async(...a)=>{let{1:c,2:g}=a;return t.signAmino(c,g)}}}throw y.getState()._notFoundFn(),new Error("window.vectis is not defined")},H=t=>{var De,_e,Oe;if(!((Oe=(_e=(De=y.getState().walletConnect)==null?void 0:De.options)==null?void 0:_e.projectId)!=null&&Oe.trim()))throw new Error("walletConnect.options.projectId is not defined");let e=(t==null?void 0:t.encoding)||"base64",n=p=>{if(!t)return;let{appUrl:l,formatNativeUrl:f}=t;if(q()){if(Je())if(!p)window.open(l.mobile.android,"_self","noreferrer noopener");else{let h=f(l.mobile.android,p,"android");window.open(h,"_self","noreferrer noopener")}if(et())if(!p)window.open(l.mobile.ios,"_self","noreferrer noopener");else{let h=f(l.mobile.ios,p,"ios");window.open(h,"_self","noreferrer noopener")}}},r=()=>{let{wcSignClient:p}=m.getState();if(!p)throw new Error("walletConnect.signClient is not defined");W(),y.setState({_reconnect:!1,_reconnectConnector:null,recentChain:null})},o=async p=>{let{wcSignClient:l}=m.getState();if(!l)throw new Error("walletConnect.signClient is not defined");if(!p)throw new Error("No wallet connect session");await l.disconnect({topic:p,reason:Vt("USER_DISCONNECTED")}),await a(l),r()},s=p=>{var l,f;try{let{wcSignClient:h}=m.getState();if(!h)throw new Error("walletConnect.signClient is not defined");let A=h.session.getAll().at(-1);if(!A)return;let b=(f=(l=h.session.getAll().at(-1))==null?void 0:l.namespaces.cosmos)==null?void 0:f.accounts.find(I=>I.startsWith(`cosmos:${p}`));if(!(A.expiry*1e3>Date.now()+1e3))throw o(A.topic),new Error("invalid session");if(!b)try{let I=h.find({requiredNamespaces:{cosmos:{methods:["cosmos_getAccounts","cosmos_signAmino","cosmos_signDirect"],chains:[`cosmos:${p}`],events:["chainChanged","accountsChanged"]}}});if(!I.length)throw new Error("no session");return I.at(-1)}catch(I){if(!I.message.toLowerCase().includes("no matching key"))throw I}return A}catch(h){if(!h.message.toLowerCase().includes("no matching key"))throw h}},i=p=>{try{return s(p)}catch{return}},a=async p=>{try{let l=p.core.pairing.pairings.getAll({active:!1});if(!l.length)return;await Promise.all(l.map(async f=>{await p.core.pairing.pairings.delete(f.topic,{code:7001,message:"clear pairing"})}))}catch(l){if(!l.message.toLowerCase().includes("no matching key"))throw l}},c=async()=>{let{walletConnect:p}=y.getState();if(!(p!=null&&p.options))throw new Error("walletConnect.options is not defined");let{wcSignClient:l}=m.getState();if(l)return m.setState({wcSignClient:l}),l;let f=await Ht.init(p.options);return m.setState({wcSignClient:f}),f},g=p=>{let{wcSignClient:l}=m.getState();if(l)return l.events.on("session_delete",f=>{r()}),l.events.on("session_expire",f=>{r()}),l.events.on("session_event",f=>{var h,A;if(f.params.event.name==="accountsChanged"&&((h=f.params.event.data)==null?void 0:h[0])!==((A=m.getState().account)==null?void 0:A.bech32Address)){let b=f.params.chainId.split(":")[1];b&&d(b)}else p()}),()=>{l.events.off("session_delete",f=>{r()}),l.events.off("session_expire",f=>{r()}),l.events.off("session_event",f=>{var h,A;if(f.params.event.name==="accountsChanged"&&((h=f.params.event.data)==null?void 0:h[0])!==((A=m.getState().account)==null?void 0:A.bech32Address)){let b=f.params.chainId.split(":")[1];b&&d(b)}else p()})}},d=async p=>{var X;let{wcSignClient:l}=m.getState();if(!l)throw new Error("enable walletConnect.signClient is not defined");let{walletConnect:f}=y.getState();if(!((X=f==null?void 0:f.options)!=null&&X.projectId))throw new Error("walletConnect.options.projectId is not defined");let{Web3Modal:h}=await import("@web3modal/standalone"),A=new h({projectId:f.options.projectId,walletConnectVersion:2,enableExplorer:!1,explorerRecommendedWalletIds:"NONE",...f.web3Modal}),{account:b,activeChain:N}=m.getState(),I=i(p);if((N==null?void 0:N.chainId)!==p&&!I||!b){let{uri:T,approval:J}=await l.connect({requiredNamespaces:{cosmos:{methods:["cosmos_getAccounts","cosmos_signAmino","cosmos_signDirect"],chains:[`cosmos:${p}`],events:["chainChanged","accountsChanged"]}}});if(!T)throw new Error("No wallet connect uri");t?n(T):await A.openModal({uri:T});try{await ae((async()=>{await J()})(),4e4,new Error("Modal approval timeout"))}catch(je){if(A.closeModal(),!je.message.toLowerCase().includes("no matching key"))return Promise.reject(je)}return t||A.closeModal(),Promise.resolve()}try{await ae((async()=>{let T=await C(p);m.setState({account:T})})(),1e4,new Error("Connection timeout"))}catch(T){if(o(I==null?void 0:I.topic),!T.message.toLowerCase().includes("no matching key"))throw T}},x=async p=>{var A;let{wcSignClient:l}=m.getState();if(!l)throw new Error("walletConnect.signClient is not defined");let f=(A=s(p))==null?void 0:A.topic;if(!f)throw new Error("No wallet connect session");n();let h=await l.request({topic:f,chainId:`cosmos:${p}`,request:{method:"cosmos_getAccounts",params:{}}});if(!h[0])throw new Error("No wallet connect account");return{address:h[0].address,algo:h[0].algo,pubkey:new Uint8Array(Buffer.from(h[0].pubkey,e))}},C=async p=>{let{address:l,algo:f,pubkey:h}=await x(p);return{address:tt(l).data,algo:f,bech32Address:l,name:"",pubKey:h,isKeystone:!1,isNanoLedger:!1}},E=async(...p)=>{var T,J;let[l,f,h]=p,{account:A,wcSignClient:b}=m.getState();if(!b)throw new Error("walletConnect.signClient is not defined");if(!A)throw new Error("account is not defined");let N=(T=s(l))==null?void 0:T.topic;if(!N)throw new Error("No wallet connect session");if(!h.bodyBytes)throw new Error("No bodyBytes");if(!h.authInfoBytes)throw new Error("No authInfoBytes");let I={topic:N,chainId:`cosmos:${l}`,request:{method:"cosmos_signDirect",params:{signerAddress:f,signDoc:{...h,bodyBytes:Buffer.from(h.bodyBytes).toString(e),authInfoBytes:Buffer.from(h.authInfoBytes).toString(e),accountNumber:(J=h.accountNumber)==null?void 0:J.toString()}}}};return n(),await b.request(I)},_=async(...p)=>{let[l,f,h]=p,{signature:A,signed:b}=await E(l,f,h);return{signed:{chainId:b.chainId,accountNumber:ue.default.fromString(b.accountNumber,!1),authInfoBytes:new Uint8Array(Buffer.from(b.authInfoBytes,e)),bodyBytes:new Uint8Array(Buffer.from(b.bodyBytes,e))},signature:A}},L=async(...p)=>{var T;let[l,f,h,A]=p,{wcSignClient:b}=m.getState(),{account:N}=m.getState();if(!b)throw new Error("walletConnect.signClient is not defined");if(!N)throw new Error("account is not defined");let I=(T=s(l))==null?void 0:T.topic;if(!I)throw new Error("No wallet connect session");return n(),await b.request({topic:I,chainId:`cosmos:${l}`,request:{method:"cosmos_signDirect",params:{signerAddress:f,signDoc:h}}})},V=async(...p)=>{let[l,f,h,A]=p;return await L(l,f,h)},se=p=>({getAccounts:async()=>[await x(p)],signDirect:(l,f)=>_(p,l,f)}),M=p=>({getAccounts:async()=>[await x(p)],signAmino:(l,f)=>V(p,l,f)});return{enable:d,experimentalSuggestChain:async(...p)=>{await Promise.reject(new Error("WalletConnect does not support experimentalSuggestChain"))},getKey:C,getOfflineSigner:p=>({getAccounts:async()=>[await x(p)],signDirect:(l,f)=>_(p,l,f),signAmino:(l,f)=>V(p,l,f)}),getOfflineSignerAuto:async p=>(await C(p)).isNanoLedger?M(p):se(p),getOfflineSignerOnlyAmino:M,signAmino:V,signDirect:_,subscription:g,init:c}},$t=()=>{var e,n,r;if(!((r=(n=(e=y.getState().walletConnect)==null?void 0:e.options)==null?void 0:n.projectId)!=null&&r.trim()))throw new Error("walletConnect.options.projectId is not defined");if(!q())throw new Error("WalletConnect Keplr mobile is only supported in mobile");let t={encoding:"base64",appUrl:{mobile:{ios:"keplrwallet://",android:"intent://"}},walletType:"wc_keplr_mobile",formatNativeUrl:(o,s,i)=>{let a=o.replaceAll("/","").replaceAll(":",""),c=encodeURIComponent(s);switch(i){case"ios":return`${a}://wcV2?${c}`;case"android":return`${a}://wcV2?${c}#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`;default:return`${a}://wc?uri=${c}`}}};return H(t)},Zt=()=>{var e,n,r;if(!((r=(n=(e=y.getState().walletConnect)==null?void 0:e.options)==null?void 0:n.projectId)!=null&&r.trim()))throw new Error("walletConnect.options.projectId is not defined");if(!q())throw new Error("WalletConnect Leap mobile is only supported in mobile");let t={encoding:"base64",appUrl:{mobile:{ios:"leapcosmos://",android:"intent://"}},walletType:"wc_leap_mobile",formatNativeUrl:(o,s,i)=>{let a=o.replaceAll("/","").replaceAll(":",""),c=encodeURIComponent(s);switch(i){case"ios":return`${a}://wcV2?${c}`;case"android":return`${a}://wcV2?${c}#Intent;package=io.leapwallet.cosmos;scheme=leapwallet;end;`;default:return`${a}://wc?uri=${c}`}}};return H(t)},Yt=()=>{var e,n,r;if(!((r=(n=(e=y.getState().walletConnect)==null?void 0:e.options)==null?void 0:n.projectId)!=null&&r.trim()))throw new Error("walletConnect.options.projectId is not defined");if(!q())throw new Error("WalletConnect Leap mobile is only supported in mobile");let t={encoding:"hex",appUrl:{mobile:{ios:"cosmostation://",android:"cosmostation://"}},walletType:"wc_leap_mobile",formatNativeUrl:(o,s,i)=>`${o.replaceAll("/","").replaceAll(":","")}://wc?${s}`};return H(t)},Z=(t=y.getState().walletType)=>{switch(t){case"keplr":return le();case"leap":return pe();case"cosmostation":return me();case"vectis":return ge();case"walletconnect":return H();case"wc_keplr_mobile":return $t();case"wc_leap_mobile":return Zt();case"wc_cosmostation_mobile":return Yt();default:throw new Error("Unknown wallet type")}},fo=()=>Object.fromEntries(ke.map(t=>[t,Q(t)]));var Y=async t=>{var e;try{let{defaultChain:n,recentChain:r,walletType:o}=y.getState(),s=(t==null?void 0:t.walletType)||o;if(!Q(s))throw new Error(`${s} is not available`);let a=Z(s),c=(t==null?void 0:t.chain)||r||n;if(!c)throw new Error("No last known connected chain, connect action requires chain info");m.setState(M=>{let ve=y.getState()._reconnect||!!y.getState()._reconnectConnector||!!c;return M.activeChain&&M.activeChain.chainId!==c.chainId?{status:"connecting"}:ve?{status:"reconnecting"}:{status:"connecting"}});let{account:g,activeChain:d}=m.getState();if(await((e=a.init)==null?void 0:e.call(a)),!g||(d==null?void 0:d.chainId)!==c.chainId){await a.enable(c.chainId);let M=await a.getKey(c.chainId);m.setState({account:M})}let x=a.getOfflineSigner(c.chainId),C=a.getOfflineSignerOnlyAmino(c.chainId),E=await a.getOfflineSignerAuto(c.chainId),_=c.gas?Xt.fromString(`${c.gas.price}${c.gas.denom}`):void 0,[L,V]=await Promise.all([ee(c),te({...c,offlineSignerAuto:E,cosmWasmSignerOptions:{gasPrice:_,...(t==null?void 0:t.signerOpts)||{}}})]);y.setState({recentChain:c,walletType:s,_reconnect:!!(t!=null&&t.autoReconnect),_reconnectConnector:s}),m.setState({activeChain:c,clients:L,offlineSigner:x,offlineSignerAmino:C,offlineSignerAuto:E,signingClients:V,status:"connected"}),typeof window<"u"&&window.sessionStorage.setItem(R,"Active");let{account:se}=m.getState();return{account:se,walletType:s,chain:c}}catch(n){throw console.error("connect ",n),m.getState().account===null&&m.setState({status:"disconnected"}),m.getState().account&&m.getState().activeChain&&m.setState({status:"connected"}),n}},fe=async(t=!1)=>(typeof window<"u"&&window.sessionStorage.removeItem(R),m.setState($),y.setState(e=>({_reconnect:!1,_reconnectConnector:null,recentChain:t?null:e.recentChain})),Promise.resolve()),B=async t=>{var o;let{recentChain:e,_reconnectConnector:n,_reconnect:r}=y.getState();try{let s=Q(n||void 0);if(e&&s&&n)return await Y({chain:e,walletType:n,autoReconnect:r})}catch(s){(o=t==null?void 0:t.onError)==null||o.call(t,s),fe()}};var nt=()=>{y.setState({recentChain:null})},ot=t=>{let{activeChain:e}=m.getState();return e==null?void 0:e.currencies.find(n=>n.coinMinimalDenom===t)},To=()=>y.getState().recentChain,de=async t=>(await Z().experimentalSuggestChain(t),t),rt=async({chainInfo:t,rpcHeaders:e,gas:n,path:r,...o})=>{let s=await de(t);return{...await Y({chain:{chainId:t.chainId,currencies:t.currencies,rest:t.rest,rpc:t.rpc,rpcHeaders:e,gas:n,path:r},...o}),chain:s}};var st=(t={})=>(y.setState(e=>({defaultChain:t.defaultChain||e.defaultChain,defaultSigningClient:t.defaultSigningClient||e.defaultSigningClient,walletConnect:t.walletConnect||e.walletConnect,walletType:t.defaultWallet||e.walletType,_notFoundFn:t.onNotFound||e._notFoundFn,_onReconnectFailed:t.onReconnectFailed||e._onReconnectFailed,_reconnect:t.autoReconnect===void 0?!0:t.autoReconnect||e._reconnect})),t);var it=async t=>{let{activeChain:e,signingClients:n}=m.getState();if(!e||!n)throw new Error("No connected account detected");let{defaultSigningClient:r}=y.getState();return await Promise.all(e.currencies.map(async s=>{let i=s.coinMinimalDenom.startsWith("cw20:");return n[r].getBalance(t,i?s.coinMinimalDenom.replace("cw20:",""):s.coinMinimalDenom)}))},ct=async t=>{let{clients:e}=m.getState();if(!(e!=null&&e.stargate))throw new Error("Stargate client is not ready");return e.stargate.getBalanceStaked(t)},at=async({senderAddress:t,recipientAddress:e,amount:n,fee:r,memo:o})=>{let{defaultSigningClient:s}=y.getState(),{signingClients:i}=m.getState();if(!i)throw new Error("No connected account detected");if(!t)throw new Error("senderAddress is not defined");return i[s].sendTokens(t,e,n,r,o)},ut=async({senderAddress:t,recipientAddress:e,transferAmount:n,sourcePort:r,sourceChannel:o,timeoutHeight:s,timeoutTimestamp:i,fee:a,memo:c})=>{let{signingClients:g}=m.getState();if(!(g!=null&&g.stargate))throw new Error("Stargate signing client is not ready");if(!t)throw new Error("senderAddress is not defined");return g.stargate.sendIbcTokens(t,e,n,r,o,s,i,a,c)},lt=async({senderAddress:t,msg:e,fee:n,options:r,label:o,codeId:s})=>{let{signingClients:i}=m.getState();if(!(i!=null&&i.cosmWasm))throw new Error("CosmWasm signing client is not ready");return i.cosmWasm.instantiate(t,s,e,o,n,r)},pt=async({senderAddress:t,msg:e,fee:n,contractAddress:r,funds:o,memo:s})=>{let{signingClients:i}=m.getState();if(!(i!=null&&i.cosmWasm))throw new Error("CosmWasm signing client is not ready");return i.cosmWasm.execute(t,r,e,n,s,o)},mt=async(t,e)=>{let{clients:n}=m.getState();if(!(n!=null&&n.cosmWasm))throw new Error("CosmWasm client is not ready");return await n.cosmWasm.queryContractSmart(t,e)},gt=(t,e)=>{let{clients:n}=m.getState();if(!(n!=null&&n.cosmWasm))throw new Error("CosmWasm client is not ready");let r=new TextEncoder().encode(e);return n.cosmWasm.queryContractRaw(t,r)};import{Bech32Address as Jt}from"@keplr-wallet/cosmos";var dt={coinDenom:"axl",coinMinimalDenom:"uaxl",coinDecimals:6,coinGeckoId:"axelar-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/axl.png"},en={coinDenom:"usdc",coinMinimalDenom:"uusdc",coinDecimals:6,coinGeckoId:"usd-coin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdc.png"},tn={coinDenom:"dai",coinMinimalDenom:"dai-wei",coinDecimals:18,coinGeckoId:"dai",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/dai.png"},nn={coinDenom:"usdt",coinMinimalDenom:"uusdt",coinDecimals:6,coinGeckoId:"tether",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdt.png"},on={coinDenom:"weth-wei",coinMinimalDenom:"weth",coinDecimals:18,coinGeckoId:"weth",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/weth.png"},rn={coinDenom:"wbtc-satoshi",coinMinimalDenom:"wbtc",coinDecimals:8,coinGeckoId:"wrapped-bitcoin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/wbtc.png"},ft=[dt,en,tn,nn,on,rn],he={rpc:"https://rpc.axelar.strange.love",rest:"https://api.axelar.strange.love",chainId:"axelar-dojo-1",chainName:"Axelar",stakeCurrency:dt,bip44:{coinType:118},bech32Config:Jt.defaultBech32Config("axelar"),currencies:ft,feeCurrencies:ft};import{Bech32Address as sn}from"@keplr-wallet/cosmos";var yt={coinDenom:"atom",coinMinimalDenom:"uatom",coinDecimals:6,coinGeckoId:"cosmos",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},ht=[yt],ye={rpc:"https://rpc.cosmoshub.strange.love",rest:"https://api.cosmoshub.strange.love",chainId:"cosmoshub-4",chainName:"Cosmos Hub",stakeCurrency:yt,bip44:{coinType:118},bech32Config:sn.defaultBech32Config("cosmos"),currencies:ht,feeCurrencies:ht};import{Bech32Address as cn}from"@keplr-wallet/cosmos";var St={coinDenom:"juno",coinMinimalDenom:"ujuno",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},an={coinDenom:"neta",coinMinimalDenom:"cw20:juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr",coinDecimals:6,coinGeckoId:"neta",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/neta.png"},un={coinDenom:"marble",coinMinimalDenom:"cw20:juno1g2g7ucurum66d42g8k5twk34yegdq8c82858gz0tq2fc75zy7khssgnhjl",coinDecimals:3,coinGeckoId:"marble",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/marble.png"},ln={coinDenom:"hope",coinMinimalDenom:"cw20:juno1re3x67ppxap48ygndmrc7har2cnc7tcxtm9nplcas4v0gc3wnmvs3s807z",coinDecimals:6,coinGeckoId:"hope-galaxy",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hope.png"},pn={coinDenom:"rac",coinMinimalDenom:"cw20:juno1r4pzw8f9z0sypct5l9j906d47z998ulwvhvqe5xdwgy8wf84583sxwh0pa",coinDecimals:6,coinGeckoId:"racoon",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/rac.png"},mn={coinDenom:"block",coinMinimalDenom:"cw20:juno1y9rf7ql6ffwkv02hsgd4yruz23pn4w97p75e2slsnkm0mnamhzysvqnxaq",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/block.png"},gn={coinDenom:"dhk",coinMinimalDenom:"cw20:juno1tdjwrqmnztn2j3sj2ln9xnyps5hs48q3ddwjrz7jpv6mskappjys5czd49",coinDecimals:0,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/dhk.png"},fn={coinDenom:"raw",coinMinimalDenom:"cw20:juno15u3dt79t6sxxa3x3kpkhzsy56edaa5a66wvt3kxmukqjz2sx0hes5sn38g",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/raw.png",coinGeckoId:"junoswap-raw-dao"},dn={coinDenom:"asvt",coinMinimalDenom:"cw20:juno17wzaxtfdw5em7lc94yed4ylgjme63eh73lm3lutp2rhcxttyvpwsypjm4w",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/asvt.png"},hn={coinDenom:"hns",coinMinimalDenom:"cw20:juno1ur4jx0sxchdevahep7fwq28yk4tqsrhshdtylz46yka3uf6kky5qllqp4k",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hns.svg"},yn={coinDenom:"joe",coinMinimalDenom:"cw20:juno1n7n7d5088qlzlj37e9mgmkhx6dfgtvt02hqxq66lcap4dxnzdhwqfmgng3",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/joe.png"},Ct=[St,an,un,ln,pn,mn,gn,fn,dn,hn,yn],Ce={rpc:"https://rpc.juno.strange.love",rest:"https://api.juno.strange.love",chainId:"juno-1",chainName:"Juno",stakeCurrency:St,bip44:{coinType:118},bech32Config:cn.defaultBech32Config("juno"),currencies:Ct,feeCurrencies:Ct};import{Bech32Address as Cn}from"@keplr-wallet/cosmos";var At={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},Sn={coinDenom:"ion",coinMinimalDenom:"uion",coinDecimals:6,coinGeckoId:"ion",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png"},wt=[At,Sn],Se={rpc:"https://rpc.osmosis.strange.love",rest:"https://api.osmosis.strange.love",chainId:"osmosis-1",chainName:"Osmosis",stakeCurrency:At,bip44:{coinType:118},bech32Config:Cn.defaultBech32Config("osmo"),currencies:wt,feeCurrencies:wt};import{Bech32Address as wn}from"@keplr-wallet/cosmos";var Et={coinDenom:"somm",coinMinimalDenom:"usomm",coinDecimals:6,coinGeckoId:"sommelier",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png"},xt=[Et],we={rpc:"https://rpc.sommelier.strange.love",rest:"https://api.sommelier.strange.love",chainId:"sommelier-3",chainName:"Sommelier",stakeCurrency:Et,bip44:{coinType:118},bech32Config:wn.defaultBech32Config("somm"),currencies:xt,feeCurrencies:xt};import{Bech32Address as An}from"@keplr-wallet/cosmos";var It={coinDenom:"CRE",coinMinimalDenom:"ucre",coinDecimals:6,coinGeckoId:"crescent",coinImageUrl:"https://raw.githubusercontent.com/crescent-network/asset/main/images/coin/CRE.png"},bt=[It],Ae={rpc:"https://testnet-endpoint.crescent.network/rpc/crescent",rest:"https://testnet-endpoint.crescent.network/api/crescent",chainId:"mooncat-1-1",chainName:"Crescent Testnet",bip44:{coinType:118},bech32Config:An.defaultBech32Config("CRE"),currencies:bt,feeCurrencies:bt,stakeCurrency:It,coinType:118};import{Bech32Address as xn}from"@keplr-wallet/cosmos";var xe={coinDenom:"junox",coinMinimalDenom:"ujunox",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},En=[xe],Ee={rpc:"https://rpc.uni.junonetwork.io",rest:"https://api.uni.junonetwork.io",chainId:"uni-5",chainName:"Juno Testnet",stakeCurrency:xe,bip44:{coinType:118},bech32Config:xn.defaultBech32Config("juno"),currencies:En,feeCurrencies:[xe],coinType:118};import{Bech32Address as bn}from"@keplr-wallet/cosmos";var be={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://dhj8dql1kzq2v.cloudfront.net/white/osmo.png"},In=[be],Ie={rpc:"https://testnet-rpc.osmosis.zone",rest:"https://testnet-rest.osmosis.zone",chainId:"osmo-test-4",chainName:"Osmosis Testnet",stakeCurrency:be,bip44:{coinType:118},bech32Config:bn.defaultBech32Config("osmo"),currencies:In,feeCurrencies:[be],coinType:118};var Tt=t=>t,or=t=>t,rr=t=>t,sr=Tt({axelar:he,cosmoshub:ye,juno:Ce,osmosis:Se,sommelier:we}),ir=[he,ye,Ce,Se,we],cr=Tt({crescent:Ae,juno:Ee,osmosis:Ie}),ar=[Ae,Ee,Ie];import{useMutation as vt,useQuery as Te}from"@tanstack/react-query";import{useEffect as Dn}from"react";import{shallow as _n}from"zustand/shallow";import{useQuery as Tn}from"@tanstack/react-query";import{shallow as vn}from"zustand/shallow";var fr=()=>y(t=>({walletType:t.walletType,isCosmostation:t.walletType==="cosmostation",isCosmostationMobile:t.walletType==="wc_cosmostation_mobile",isKeplr:t.walletType==="keplr",isKeplrMobile:t.walletType==="wc_keplr_mobile",isLeap:t.walletType==="leap",isLeapMobile:t.walletType==="wc_leap_mobile",isVectis:t.walletType==="vectis",isWalletConnect:t.walletType==="walletconnect"}),vn),oe=t=>{let n=["USE_CHECK_WALLET",y(o=>t||o.walletType)];return Tn(n,({queryKey:[,o]})=>Q(o))};var G=({onConnect:t,onDisconnect:e}={})=>{let n=m(o=>o.account),r=m(o=>o.status);return Dn(()=>m.subscribe(o=>o.status,(o,s)=>{if(o==="connected"){let{account:i,activeChain:a}=m.getState(),{walletType:c}=y.getState();t==null||t({account:i,chain:a,walletType:c,isReconnect:s==="reconnecting"})}o==="disconnected"&&(e==null||e())}),[t,e]),{data:n,isConnected:!!n,isConnecting:r==="connecting",isDisconnected:r==="disconnected",isReconnecting:r==="reconnecting",isLoading:r==="connecting"||r==="reconnecting",reconnect:B,status:r}},On=t=>{let{data:e}=G(),n=t||(e==null?void 0:e.bech32Address);return Te(["USE_BALANCES",n],({queryKey:[,s]})=>it(s),{enabled:!!n,refetchOnMount:!1,refetchOnReconnect:!0,refetchOnWindowFocus:!1})},Er=(t,e)=>{let{data:n}=On(e);return Te(["USE_BALANCE",n,t,e],({queryKey:[,s]})=>s==null?void 0:s.find(i=>i.denom===t),{enabled:!!n})},br=({onError:t,onLoading:e,onSuccess:n}={})=>{let o=vt(["USE_CONNECT",t,e,n],Y,{onError:(i,a)=>Promise.resolve(t==null?void 0:t(i,a)),onMutate:e,onSuccess:i=>Promise.resolve(n==null?void 0:n(i))}),{data:s}=oe();return{connect:i=>o.mutate(i),connectAsync:i=>o.mutateAsync(i),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:!!s,status:o.status}},Ir=({onError:t,onLoading:e,onSuccess:n}={})=>{let o=vt(["USE_DISCONNECT",t,e,n],fe,{onError:s=>Promise.resolve(t==null?void 0:t(s,void 0)),onMutate:e,onSuccess:()=>Promise.resolve(n==null?void 0:n(void 0))});return{disconnect:s=>o.mutate(s),disconnectAsync:s=>o.mutateAsync(s),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,status:o.status}},jn=()=>m(t=>({signer:t.offlineSigner,signerAmino:t.offlineSignerAmino,signerAuto:t.offlineSignerAuto}),_n),Tr=()=>jn(),vr=t=>{let{data:e}=G(),n=t||(e==null?void 0:e.bech32Address);return Te(["USE_BALANCE_STAKED",n],({queryKey:[,s]})=>ct(n),{enabled:!!n})};import{useMutation as Dt,useQuery as _t}from"@tanstack/react-query";var kr=()=>m(t=>t.activeChain),Br=t=>_t(["USE_ACTIVE_CHAIN_CURRENCY",t],({queryKey:[,r]})=>ot(r)),Nr=(t,e="BOND_STATUS_BONDED")=>_t(["USE_ACTIVE_CHAIN_VALIDATORS",t,e],({queryKey:[,o,s]})=>o.staking.validators(s),{enabled:typeof t<"u"}),Wr=()=>({data:y(e=>e.recentChain),clear:nt}),Mr=({onError:t,onLoading:e,onSuccess:n}={})=>{let o=Dt(["USE_SUGGEST_CHAIN",t,e,n],de,{onError:(s,i)=>Promise.resolve(t==null?void 0:t(s,i)),onMutate:e,onSuccess:s=>Promise.resolve(n==null?void 0:n(s))});return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,suggest:o.mutate,suggestAsync:o.mutateAsync,status:o.status}},Rr=({onError:t,onLoading:e,onSuccess:n}={})=>{let o=Dt(["USE_SUGGEST_CHAIN_AND_CONNECT",t,e,n],rt,{onError:(i,a)=>Promise.resolve(t==null?void 0:t(i,a)),onMutate:i=>e==null?void 0:e(i),onSuccess:i=>Promise.resolve(n==null?void 0:n(i))}),{data:s}=oe();return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:!!s,status:o.status,suggestAndConnect:o.mutate,suggestAndConnectAsync:o.mutateAsync}};import{useQuery as Ot}from"@tanstack/react-query";var zr=t=>{let e=m(o=>o.clients);return Ot(["USE_CLIENTS",t,e],({queryKey:[,o,s]})=>o!=null&&o.rpc?ee(o):s,{refetchOnMount:!1,refetchOnWindowFocus:!1,onSuccess:o=>{m.setState({clients:o})},initialData:e})},Kr=t=>{let e=m(o=>o.signingClients);return Ot(["USE_SIGNING_CLIENTS",t,e],({queryKey:[,o,s]})=>o!=null&&o.rpc?te(o):s,{refetchOnMount:!1,refetchOnWindowFocus:!1,onSuccess:o=>{m.setState({signingClients:o})},initialData:e})};import{useQuery as Fn}from"@tanstack/react-query";var $r=(...t)=>{let e=["USE_QUERY_CLIENT",...t];return Fn(e,({queryKey:[,...r]})=>Ue(...t),{refetchOnMount:!1,refetchOnWindowFocus:!1})};import{useMutation as re,useQuery as jt}from"@tanstack/react-query";var es=({onError:t,onLoading:e,onSuccess:n}={})=>{let{data:r}=G(),o=r==null?void 0:r.bech32Address,i=re(["USE_SEND_TOKENS",t,e,n,o],a=>at({senderAddress:o,...a}),{onError:(a,c)=>Promise.resolve(t==null?void 0:t(a,c)),onMutate:e,onSuccess:a=>Promise.resolve(n==null?void 0:n(a))});return{error:i.error,isLoading:i.isLoading,isSuccess:i.isSuccess,sendTokens:i.mutate,sendTokensAsync:i.mutateAsync,status:i.status}},ts=({onError:t,onLoading:e,onSuccess:n}={})=>{let{data:r}=G(),o=r==null?void 0:r.bech32Address,i=re(["USE_SEND_IBC_TOKENS",t,e,n,o],a=>ut({senderAddress:o,...a}),{onError:(a,c)=>Promise.resolve(t==null?void 0:t(a,c)),onMutate:e,onSuccess:a=>Promise.resolve(n==null?void 0:n(a))});return{error:i.error,isLoading:i.isLoading,isSuccess:i.isSuccess,sendIbcTokens:i.mutate,sendIbcTokensAsync:i.mutateAsync,status:i.status}},ns=({codeId:t,onError:e,onLoading:n,onSuccess:r})=>{let{data:o}=G(),s=o==null?void 0:o.bech32Address,c=re(["USE_INSTANTIATE_CONTRACT",e,n,r,t,s],g=>{if(!s)throw new Error("senderAddress is undefined");let d={...g,fee:g.fee??"auto",senderAddress:s,codeId:t};return lt(d)},{onError:(g,d)=>Promise.resolve(e==null?void 0:e(g,d)),onMutate:n,onSuccess:g=>Promise.resolve(r==null?void 0:r(g))});return{error:c.error,isLoading:c.isLoading,isSuccess:c.isSuccess,instantiateContract:c.mutate,instantiateContractAsync:c.mutateAsync,status:c.status}},os=({contractAddress:t,onError:e,onLoading:n,onSuccess:r})=>{let{data:o}=G(),s=o==null?void 0:o.bech32Address,c=re(["USE_EXECUTE_CONTRACT",e,n,r,t,s],g=>{if(!s)throw new Error("senderAddress is undefined");let d={...g,fee:g.fee??"auto",senderAddress:s,contractAddress:t,memo:g.memo??"",funds:g.funds??[]};return pt(d)},{onError:(g,d)=>Promise.resolve(e==null?void 0:e(g,d)),onMutate:n,onSuccess:g=>Promise.resolve(r==null?void 0:r(g))});return{error:c.error,isLoading:c.isLoading,isSuccess:c.isSuccess,executeContract:c.mutate,executeContractAsync:c.mutateAsync,status:c.status}},rs=(t,e)=>jt(["USE_QUERY_SMART",t,e],({queryKey:[,o]})=>{if(!t||!e)throw new Error("address or queryMsg undefined");return mt(t,e)},{enabled:!!t&&!!e}),ss=(t,e)=>jt(["USE_QUERY_RAW",e,t],({queryKey:[,o]})=>{if(!t||!e)throw new Error("address or key undefined");return gt(t,e)},{enabled:!!t&&!!e});import{QueryClient as Rn,QueryClientProvider as Un}from"@tanstack/react-query";import{ReactQueryDevtools as Pn}from"@tanstack/react-query-devtools";import{useEffect as kn,useState as Bn}from"react";import{Fragment as Nn,jsx as Wn}from"react/jsx-runtime";var Ft=({children:t})=>{let[e,n]=Bn(!1);return kn(()=>{n(!0)},[]),Wn(Nn,{children:e?t:null})};import{useEffect as kt}from"react";var Mn=()=>{let t=typeof window<"u"&&window.sessionStorage.getItem(R)==="Active",{_reconnect:e,_onReconnectFailed:n,_reconnectConnector:r}=y(),{activeChain:o,wcSignClient:s}=m();return kt(()=>{r&&(t&&o?B({onError:n}):!t&&e&&B({onError:n}))},[]),kt(()=>{var i,a,c,g,d,x,C,E,_,L;r&&(r==="cosmostation"&&((a=(i=me()).subscription)==null||a.call(i,()=>{B({onError:n})})),r==="keplr"&&((g=(c=le()).subscription)==null||g.call(c,()=>{B({onError:n})})),r==="leap"&&((x=(d=pe()).subscription)==null||x.call(d,()=>{B({onError:n})})),r==="vectis"&&((E=(C=ge()).subscription)==null||E.call(C,()=>{B({onError:n})})),r==="walletconnect"&&s&&((L=(_=H()).subscription)==null||L.call(_,()=>{B({onError:n})})))},[r,s]),null},Bt=()=>(Mn(),null);import{jsx as Nt,jsxs as Wt}from"react/jsx-runtime";var qn=new Rn({}),As=({children:t,grazOptions:e,debug:n,...r})=>(e&&st(e),Wt(Un,{client:qn,...r,children:[Wt(Ft,{children:[Nt(Bt,{}),t]}),n?Nt(Pn,{initialIsOpen:!1,position:"bottom-right"}):null]},"graz-provider"));export{Bt as GrazEvents,As as GrazProvider,ke as WALLET_TYPES,Fe as WalletType,Q as checkWallet,nt as clearRecentChain,st as configureGraz,Y as connect,ee as createClients,Ue as createQueryClient,te as createSigningClients,or as defineChain,rr as defineChainInfo,Tt as defineChains,fe as disconnect,pt as executeContract,ot as getActiveChainCurrency,fo as getAvailableWallets,ct as getBalanceStaked,it as getBalances,me as getCosmostation,le as getKeplr,pe as getLeap,gt as getQueryRaw,mt as getQuerySmart,To as getRecentChain,ge as getVectis,Yt as getWCCosmostation,$t as getWCKeplr,Zt as getWCLeap,Z as getWallet,H as getWalletConnect,lt as instantiateContract,sr as mainnetChains,ir as mainnetChainsArray,B as reconnect,ut as sendIbcTokens,at as sendTokens,de as suggestChain,rt as suggestChainAndConnect,cr as testnetChains,ar as testnetChainsArray,G as useAccount,kr as useActiveChain,Br as useActiveChainCurrency,Nr as useActiveChainValidators,fr as useActiveWalletType,Er as useBalance,vr as useBalanceStaked,On as useBalances,oe as useCheckWallet,zr as useClients,br as useConnect,Ir as useDisconnect,os as useExecuteContract,Mn as useGrazEvents,ns as useInstantiateContract,jn as useOfflineSigners,$r as useQueryClient,ss as useQueryRaw,rs as useQuerySmart,Wr as useRecentChain,ts as useSendIbcTokens,es as useSendTokens,Tr as useSigners,Kr as useSigningClients,Mr as useSuggestChain,Rr as useSuggestChainAndConnect};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graz",
|
|
3
3
|
"description": "React hooks for Cosmos",
|
|
4
|
-
"version": "0.0.44
|
|
4
|
+
"version": "0.0.44",
|
|
5
5
|
"author": "Griko Nibras <griko@strange.love>",
|
|
6
6
|
"repository": "https://github.com/strangelove-ventures/graz.git",
|
|
7
7
|
"homepage": "https://github.com/strangelove-ventures/graz",
|
|
@@ -10,17 +10,18 @@
|
|
|
10
10
|
"module": "./dist/index.mjs",
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"bin": {
|
|
13
|
-
"graz": "./
|
|
13
|
+
"graz": "./cli.mjs"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"dist
|
|
16
|
+
"chains/*.stub",
|
|
17
|
+
"cli.js",
|
|
18
|
+
"compiled/**",
|
|
19
|
+
"dist/*.d.ts",
|
|
20
|
+
"dist/*.js",
|
|
21
|
+
"dist/*.mjs"
|
|
20
22
|
],
|
|
21
23
|
"sideEffects": false,
|
|
22
24
|
"dependencies": {
|
|
23
|
-
"@clack/prompts": "^0.6.3",
|
|
24
25
|
"@cosmjs/cosmwasm-stargate": "^0.30.1",
|
|
25
26
|
"@cosmjs/launchpad": "^0.27.1",
|
|
26
27
|
"@cosmjs/proto-signing": "^0.30.1",
|
|
@@ -30,12 +31,13 @@
|
|
|
30
31
|
"@keplr-wallet/types": "^0.12.10",
|
|
31
32
|
"@tanstack/react-query": "^4.29.14",
|
|
32
33
|
"@tanstack/react-query-devtools": "^4.29.14",
|
|
34
|
+
"@vectis/extension-client": "^0.7.1",
|
|
33
35
|
"@walletconnect/sign-client": "^2.8.1",
|
|
34
36
|
"@walletconnect/types": "^2.8.1",
|
|
35
37
|
"@walletconnect/utils": "^2.8.1",
|
|
36
38
|
"@web3modal/standalone": "^2.4.3",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
+
"arg": "^5.0.2",
|
|
40
|
+
"cosmos-directory-client": "0.0.6",
|
|
39
41
|
"zustand": "^4.3.8"
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
"scripts": {
|
|
60
62
|
"build": "tsup",
|
|
61
63
|
"clean": "rm -rf dist/*",
|
|
62
|
-
"cli": "node
|
|
64
|
+
"cli": "node cli.mjs",
|
|
63
65
|
"dev": "tsup --watch",
|
|
64
66
|
"lint": "eslint --fix \"src/**/*.{ts,tsx}\""
|
|
65
67
|
}
|