@stakekit/widget 0.0.275 → 0.0.277
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/Codec-DJMwdgB9.js +1 -0
- package/dist/bundle/{MaybeAsync-Ckzmgrqr.js → MaybeAsync-DQF5lNPa.js} +1 -1
- package/dist/bundle/{build-BMMgmQqw.js → build-CcaOMxqz.js} +1 -1
- package/dist/bundle/{build-BNPMa-vT.js → build-Dzd_3NK0.js} +1 -1
- package/dist/bundle/{cardano-connector-DKXfujiC.js → cardano-connector-Vvgvc_SR.js} +2 -2
- package/dist/bundle/cosmos-connector-meta-Ck8JH12i.js +1 -0
- package/dist/bundle/{createConnector-BrxGIkT7.js → createConnector-pbKKdb_k.js} +2 -2
- package/dist/bundle/{images-BMN9-6Cl.js → images-qNtx67Rl.js} +1 -1
- package/dist/bundle/index.bundle.css +1 -1
- package/dist/bundle/index.bundle.js +52 -52
- package/dist/bundle/{ledger-connector-DmvRDcyN.js → ledger-connector-C4GRsXg2.js} +2 -2
- package/dist/bundle/{ledger-live-connector-meta-DDQWxYWw.js → ledger-live-connector-meta-DbuxO2yY.js} +1 -1
- package/dist/bundle/{misc-BLlpZ6ih.js → misc-BtIN6y6p.js} +1 -1
- package/dist/bundle/safe-connector-Bwgtw9lc.js +1 -0
- package/dist/bundle/solana-connector-CaIkxhTb.js +1 -0
- package/dist/bundle/{substrate-connector-BKHfZY_J.js → substrate-connector-BDRBscm1.js} +1 -1
- package/dist/bundle/{ton-connector-BRAeK9Od.js → ton-connector-CnNKzHtr.js} +2 -2
- package/dist/bundle/{transaction-ixhTmhET.js → transaction-DB7k-q8u.js} +1 -1
- package/dist/bundle/{tron-connector-Cr2j2DtV.js → tron-connector-C5KUqegL.js} +2 -2
- package/dist/bundle/tx-DygTArs0.js +1 -0
- package/dist/bundle/{wallet-manager-B2J-l9Hd.js → wallet-manager-C9fisl4Y.js} +2 -2
- package/dist/package/{Codec-Byh8iois.js → Codec-Bae2iyFH.js} +1 -1
- package/dist/package/{MaybeAsync-BZLAl2bE.js → MaybeAsync-DXWsPM9n.js} +1 -1
- package/dist/package/{build-jVm_Imk7.js → build-CYy6v80s.js} +1 -1
- package/dist/package/{build-BxgetfN5.js → build-GgZW6uL5.js} +2 -2
- package/dist/package/{cardano-connector-DPlMH8wa.js → cardano-connector-CchOT0g5.js} +3 -3
- package/dist/package/{cosmos-connector-meta-MR5we2DB.js → cosmos-connector-meta-Dtfahon-.js} +2 -2
- package/dist/package/{createConnector-c-2Ie22W.js → createConnector-D-p8-Ebj.js} +1 -10
- package/dist/package/{images-0ZMBvxwm.js → images-B0-tGuTw.js} +1 -1
- package/dist/package/index.package.css +1335 -1265
- package/dist/package/index.package.js +5253 -5246
- package/dist/package/{ledger-connector-Cf6yV8eL.js → ledger-connector-BhbNzz5z.js} +5 -5
- package/dist/package/{ledger-live-connector-meta-CIDYYFrg.js → ledger-live-connector-meta-C4-iTYoS.js} +3 -3
- package/dist/package/{misc-Erb32S3W.js → misc-DFHb1ynZ.js} +1 -1
- package/dist/package/{safe-connector-B8DuxkSp.js → safe-connector-CAgz56zm.js} +2 -2
- package/dist/package/{solana-connector-BgSU_Au0.js → solana-connector-C4-3zQ0W.js} +2 -2
- package/dist/package/{substrate-connector-CfrmkJYW.js → substrate-connector-WYvMgtq6.js} +2 -2
- package/dist/package/{ton-connector-tEtLRW28.js → ton-connector-DGVU07fk.js} +4 -4
- package/dist/package/{transaction-BaxD0vuC.js → transaction-BhfOz9qC.js} +2 -2
- package/dist/package/{tron-connector-DGBu9r65.js → tron-connector-Bx8ow-to.js} +4 -4
- package/dist/package/tx-DQaheDj7.js +3 -0
- package/dist/package/{wallet-manager-D5jYaNnr.js → wallet-manager-Bf0VaUFt.js} +10 -10
- package/dist/types/components/atoms/box/index.d.ts +3 -3
- package/dist/types/components/atoms/button/styles.css.d.ts +3 -0
- package/dist/types/components/atoms/divider/styles.css.d.ts +1 -3
- package/dist/types/components/atoms/max-button/styles.css.d.ts +2 -8
- package/dist/types/components/atoms/select-modal/styles.css.d.ts +1 -9
- package/dist/types/components/atoms/token-icon/network-icon-image/index.d.ts +2 -1
- package/dist/types/components/molecules/estimated-reward-amounts/index.d.ts +6 -0
- package/dist/types/components/molecules/summary-item/index.css.d.ts +21 -15
- package/dist/types/domain/types/yields.d.ts +1 -2
- package/dist/types/hooks/api/use-dashboard-yield-catalog.d.ts +1 -2
- package/dist/types/hooks/api/use-multi-yields.d.ts +4 -2
- package/dist/types/hooks/api/use-yield-summaries.d.ts +0 -5
- package/dist/types/pages/complete/hooks/use-complete.hook.d.ts +2 -0
- package/dist/types/pages/complete/state/index.d.ts +2 -0
- package/dist/types/pages/components/page-cta.d.ts +11 -0
- package/dist/types/pages/details/activity-page/components/activity-filters/styles.css.d.ts +1 -1
- package/dist/types/pages/details/earn-page/components/select-token-section/styles.css.d.ts +6 -2
- package/dist/types/pages/details/earn-page/components/select-yield-section/styles.css.d.ts +1 -0
- package/dist/types/pages/details/earn-page/state/types.d.ts +7 -6
- package/dist/types/pages/details/earn-page/state/use-get-init-yield.d.ts +3 -1
- package/dist/types/pages/details/earn-page/state/use-init-yield.d.ts +3 -1
- package/dist/types/pages/review/hooks/use-action-review.hook.d.ts +2 -0
- package/dist/types/pages/review/hooks/use-pending-review.hook.d.ts +2 -0
- package/dist/types/pages/review/hooks/use-stake-review.hook.d.ts +6 -0
- package/dist/types/pages/review/hooks/use-unstake-review.hook.d.ts +2 -0
- package/dist/types/pages/review/pages/common-page/common.page.d.ts +7 -1
- package/dist/types/pages/review/pages/common-page/components/review-top-section.d.ts +5 -1
- package/dist/types/pages/steps/hooks/use-steps.hook.d.ts +2 -0
- package/dist/types/pages-dashboard/common/components/styles.css.d.ts +2 -4
- package/dist/types/pages-dashboard/common/components/tabs/styles.css.d.ts +8 -7
- package/dist/types/pages-dashboard/overview/earn-details/earn-details-formatters.d.ts +2 -0
- package/dist/types/pages-dashboard/overview/earn-page/styles.css.d.ts +4 -8
- package/dist/types/pages-dashboard/overview/positions/styles.css.d.ts +3 -1
- package/dist/types/pages-dashboard/position-details/components/position-details-stake-actions.d.ts +0 -4
- package/dist/types/providers/theme-wrapper.d.ts +7 -0
- package/dist/types/styles/theme/atoms.css.d.ts +3 -3
- package/dist/types/styles/theme/contract.css.d.ts +7 -0
- package/dist/types/styles/theme/properties.d.ts +21 -0
- package/dist/types/styles/theme/themes.d.ts +14 -0
- package/dist/types/styles/tokens/colors/contract.d.ts +7 -0
- package/dist/types/translation/resources.d.ts +4 -0
- package/dist/types/utils/formatters.d.ts +1 -0
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/website/assets/Codec-C8kGgbSv.js +1 -0
- package/dist/website/assets/{basic-AvmmQyRT.js → basic-CjEpjfzf.js} +1 -1
- package/dist/website/assets/{basic-B4L21H7R.js → basic-pwmIJ5Ws.js} +1 -1
- package/dist/website/assets/{browser-CD2gtnKg.js → browser-CCqMUd7Y.js} +1 -1
- package/dist/website/assets/{build-CEL1SZmV.js → build-B7EKreOf.js} +1 -1
- package/dist/website/assets/{build-DWB27dsZ.js → build-BJXYN5Yd.js} +1 -1
- package/dist/website/assets/{cardano-connector-BNJvqm1_.js → cardano-connector-Cpx-YJd6.js} +2 -2
- package/dist/website/assets/{core-NRhVeH3P.js → core-CJ6UoY0G.js} +2 -2
- package/dist/website/assets/{createConnector-BcHSC56W.js → createConnector-mvBxgXDZ.js} +2 -2
- package/dist/website/assets/{dist-CH4nKZqs.js → dist-BTQzphBJ.js} +1 -1
- package/dist/website/assets/{dist-DRLRXyTA.js → dist-DUXhuB4w.js} +1 -1
- package/dist/website/assets/en_US-IFPOGBSL-DiQE412U.js +1 -0
- package/dist/website/assets/{esm-CX7v7VH6.js → esm-CU6m2Mgh.js} +1 -1
- package/dist/website/assets/{exports-CZja-uIB.js → exports-C-Rr_VQ2.js} +1 -1
- package/dist/website/assets/index-DOaPAEx0.css +1 -0
- package/dist/website/assets/index-STnzu3ZH.js +2044 -0
- package/dist/website/assets/{index.es-C4PtkNtC.js → index.es-DfIWVmF0.js} +2 -2
- package/dist/website/assets/{ledger-connector-CQI9gS0Q.js → ledger-connector-BL2CqkDZ.js} +2 -2
- package/dist/website/assets/{receive-D87X5CO9.js → receive-DbQB8Kb0.js} +1 -1
- package/dist/website/assets/{registry-DFrHgvrU.js → registry-DQZCfZdW.js} +1 -1
- package/dist/website/assets/safe-connector-DpMirNdU.js +1 -0
- package/dist/website/assets/{socials-DlOk7Wls.js → socials-CVEdW2YA.js} +1 -1
- package/dist/website/assets/solana-connector-D8iHz3KE.js +1 -0
- package/dist/website/assets/{substrate-connector-DfJfljNz.js → substrate-connector-DzMk8xI3.js} +1 -1
- package/dist/website/assets/{ton-connector-DA1-w57X.js → ton-connector-DkGy3-Cc.js} +2 -2
- package/dist/website/assets/{tron-connector-BTe1GdWY.js → tron-connector-CK8wKQTX.js} +3 -3
- package/dist/website/assets/tx-4iZZqojA.js +1 -0
- package/dist/website/assets/{wallet-manager-pYzGZQVw.js → wallet-manager-_pvCvRVJ.js} +4 -4
- package/dist/website/assets/{wui-qr-code-BgRoILGj.js → wui-qr-code-DvTvu_mf.js} +1 -1
- package/dist/website/index.html +4 -4
- package/package.json +1 -1
- package/dist/bundle/Codec-FOvoaP2K.js +0 -1
- package/dist/bundle/cosmos-connector-meta-DO5i3lCd.js +0 -1
- package/dist/bundle/safe-connector-BgDwaGsX.js +0 -1
- package/dist/bundle/solana-connector-h5iUra8H.js +0 -1
- package/dist/bundle/tx-C-_PyHR9.js +0 -1
- package/dist/package/tx-DpCUKNN4.js +0 -3
- package/dist/types/hooks/api/use-token-list-yields.d.ts +0 -16
- package/dist/types/pages/components/footer-outlet/context.d.ts +0 -20
- package/dist/types/pages/components/footer-outlet/index.d.ts +0 -1
- package/dist/types/pages/components/footer-outlet/styles.css.d.ts +0 -1
- package/dist/types/pages-dashboard/common/components/footer-outlet/index.d.ts +0 -1
- package/dist/website/assets/Codec-D4K5RIsS.js +0 -1
- package/dist/website/assets/en_US-IFPOGBSL-DcKUUZBp.js +0 -1
- package/dist/website/assets/index-BEIkkHR9.js +0 -2044
- package/dist/website/assets/index-BmH6Rgkr.css +0 -1
- package/dist/website/assets/safe-connector-D5A7hhAW.js +0 -1
- package/dist/website/assets/solana-connector-C1qGbaG8.js +0 -1
- package/dist/website/assets/tx-zX2fdmDi.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,r,s as i,t as a}from"./chunk-DskFaGUe.js";import{n as o,t as s}from"./dist-AaDowojq.js";import{D as c,H as l,b as u,n as d,q as f,t as p}from"./createConnector-BrxGIkT7.js";import{n as m}from"./MaybeAsync-Ckzmgrqr.js";import{n as h,t as g}from"./dist-CnrnoiXF.js";import{t as _}from"./images-BMN9-6Cl.js";import{a as v,i as y,t as b}from"./cosmos-connector-meta-DO5i3lCd.js";import{i as x,r as S,t as C}from"./dist-CI5CUy_C.js";import{t as w}from"./networks-2E-BIrmm.js";import{i as T,n as E,t as D}from"./bs58--X0peUG7.js";import{t as O}from"./bn-Cz7Vdngu.js";import{a as k,i as A,n as j,o as M,r as N,s as P,t as F}from"./elliptic-BMfcEqGp.js";import{t as I}from"./events-BV7lfFWg.js";import{c as L,i as R,l as ee,o as te,s as ne,u as re}from"./index.es-DcovaPD9.js";import{_ as ie,a as ae,d as oe,f as se,g as ce,h as le,i as ue,l as de,n as fe,o as pe,p as me,r as he,s as ge,t as _e,u as ve,v as ye}from"./browser-ponyfill-D2BIpyUO.js";import{n as z,t as be}from"./esm-BZ35Po8I.js";import{$ as xe,$t as Se,A as Ce,At as we,B as Te,Bt as Ee,C as De,Ct as Oe,D as ke,Dt as Ae,E as je,Et as Me,F as B,Ft as Ne,G as Pe,Gt as Fe,H as Ie,Ht as Le,I as Re,It as ze,J as Be,Jt as Ve,K as He,Kt as Ue,L as We,Lt as Ge,M as Ke,Mt as qe,N as Je,Nt as Ye,O as Xe,Ot as Ze,P as Qe,Pt as $e,Q as et,Qt as tt,R as nt,Rt as rt,S as it,St as at,T as ot,Tt as st,U as ct,Ut as lt,V as ut,Vt as dt,W as ft,Wt as pt,X as V,Xt as mt,Y as ht,Yt as gt,Z as _t,Zt as vt,_ as yt,_t as bt,a as xt,at as St,b as Ct,bt as wt,c as Tt,ct as Et,d as Dt,en as Ot,et as kt,f as At,ft as jt,g as Mt,gt as Nt,h as Pt,ht as Ft,i as It,it as Lt,j as Rt,jt as zt,k as Bt,kt as Vt,l as Ht,lt as Ut,m as Wt,mt as Gt,n as Kt,nt as qt,o as Jt,ot as Yt,p as Xt,pt as Zt,q as Qt,qt as $t,r as en,rt as tn,s as nn,st as rn,t as an,tn as on,tt as sn,u as cn,ut as ln,v as un,vt as dn,w as fn,wt as pn,x as mn,xt as hn,y as gn,yt as _n,z as vn,zt as yn}from"./dist-Cjt53Q6H.js";import{a as bn,o as xn,t as Sn}from"./build-Y6ipbu86.js";import{a as Cn,c as wn,d as Tn,f as En,i as Dn,l as On,n as kn,o as H,r as An,s as jn,u as Mn}from"./utils-DLhgweWO.js";import{n as Nn,t as Pn}from"./src-px2Rv6iD.js";import{n as Fn}from"./bignumber-D-4SK89W.js";import{t as In}from"./v4-BqHErK6e.js";import{n as Ln,t as Rn}from"./src-0M4fbYRT.js";import{cosmosAssets as zn,registryIdsToSKCosmosNetworks as Bn}from"./chain-registry-TwEyuA0r.js";import{t as Vn}from"./cjs-B0_K3Hmd.js";var Hn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.utf8Write=e.utf8Read=e.utf8Length=void 0;function t(e){let t=0,n=0;for(let r=0;r<e.length;++r)n=e.charCodeAt(r),n<128?t+=1:n<2048?t+=2:(n&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320?(++r,t+=4):t+=3;return t}e.utf8Length=t;function n(e,t,n){if(n-t<1)return``;let r=[],i=[],a=0,o;for(;t<n;)o=e[t++],o<128?r[a++]=o:o>191&&o<224?r[a++]=(o&31)<<6|e[t++]&63:o>239&&o<365?(o=((o&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,r[a++]=55296+(o>>10),r[a++]=56320+(o&1023)):r[a++]=(o&15)<<12|(e[t++]&63)<<6|e[t++]&63,a>8191&&((i||=[]).push(String.fromCharCode(...r)),a=0);return i?(a&&i.push(String.fromCharCode(...r.slice(0,a))),i.join(``)):String.fromCharCode(...r.slice(0,a))}e.utf8Read=n;function r(e,t,n){let r=n,i,a;for(let r=0;r<e.length;++r)i=e.charCodeAt(r),i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&((a=e.charCodeAt(r+1))&64512)==56320?(i=65536+((i&1023)<<10)+(a&1023),++r,t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128);return n-r}e.utf8Write=r})),Un=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.writeByte=e.writeFixed32=e.int64Length=e.writeVarint64=e.writeVarint32=e.readInt32=e.readUInt32=e.zzDecode=e.zzEncode=e.varint32read=e.varint32write=e.uInt64ToString=e.int64ToString=e.int64FromString=e.varint64write=e.varint64read=void 0;function t(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,!(n&128))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}throw Error(`invalid varint`)}e.varint64read=t;function n(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(!(i>>>7)&&t==0),o=(a?i|128:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=!!(r>>>7),a=(i?r|128:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}e.varint64write=n;var r=4294967296;function i(e){let t=e[0]===`-`;t&&(e=e.slice(1));let n=1e6,i=0,a=0;function o(t,o){let s=Number(e.slice(t,o));a*=n,i=i*n+s,i>=r&&(a+=i/r|0,i%=r)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),t?l(i,a):c(i,a)}e.int64FromString=i;function a(e,t){let n=c(e,t),r=n.hi&2147483648;r&&(n=l(n.lo,n.hi));let i=o(n.lo,n.hi);return r?`-`+i:i}e.int64ToString=a;function o(e,t){if({lo:e,hi:t}=s(e,t),t<=2097151)return String(r*t+e);let n=e&16777215,i=(e>>>24|t<<8)&16777215,a=t>>16&65535,o=n+i*6777216+a*6710656,c=i+a*8147497,l=a*2,d=1e7;return o>=d&&(c+=Math.floor(o/d),o%=d),c>=d&&(l+=Math.floor(c/d),c%=d),l.toString()+u(c)+u(o)}e.uInt64ToString=o;function s(e,t){return{lo:e>>>0,hi:t>>>0}}function c(e,t){return{lo:e|0,hi:t|0}}function l(e,t){return t=~t,e?e=~e+1:t+=1,c(e,t)}var u=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function d(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e>>=7;t.push(1)}}e.varint32write=d;function f(){let e=this.buf[this.pos++],t=e&127;if(!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}e.varint32read=f;function p(e,t){let n=t>>31;return t=((t<<1|e>>>31)^n)>>>0,e=(e<<1^n)>>>0,[e,t]}e.zzEncode=p;function m(e,t){let n=-(e&1);return e=((e>>>1|t<<31)^n)>>>0,t=(t>>>1^n)>>>0,[e,t]}e.zzDecode=m;function h(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216}e.readUInt32=h;function g(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}e.readInt32=g;function _(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}e.writeVarint32=_;function v(e,t,n){for(;e.hi;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo>>>=7;t[n++]=e.lo}e.writeVarint64=v;function y(e,t){let n=e,r=(e>>>28|t<<4)>>>0,i=t>>>24;return i===0?r===0?n<16384?n<128?1:2:n<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:i<128?9:10}e.int64Length=y;function b(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}e.writeFixed32=b;function x(e,t,n){t[n]=e&255}e.writeByte=x})),Wn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BinaryWriter=e.BinaryReader=e.WireType=void 0;var t=Hn(),n=Un(),r;(function(e){e[e.Varint=0]=`Varint`,e[e.Fixed64=1]=`Fixed64`,e[e.Bytes=2]=`Bytes`,e[e.Fixed32=5]=`Fixed32`})(r||(e.WireType=r={})),e.BinaryReader=class{assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}constructor(e){this.buf=e?new Uint8Array(e):new Uint8Array,this.pos=0,this.type=0,this.len=this.buf.length}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw Error(`illegal tag: field no `+t+` wire type `+n);return[t,n,e]}skip(e){if(typeof e==`number`){if(this.pos+e>this.len)throw c(this,e);this.pos+=e}else do if(this.pos>=this.len)throw c(this);while(this.buf[this.pos++]&128);return this}skipType(e){switch(e){case r.Varint:this.skip();break;case r.Fixed64:this.skip(8);break;case r.Bytes:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!=4;)this.skipType(e);break;case r.Fixed32:this.skip(4);break;default:throw Error(`invalid wire type `+e+` at offset `+this.pos)}return this}uint32(){return n.varint32read.bind(this)()}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e%2==1?(e+1)/-2:e/2}fixed32(){let e=(0,n.readUInt32)(this.buf,this.pos);return this.pos+=4,e}sfixed32(){let e=(0,n.readInt32)(this.buf,this.pos);return this.pos+=4,e}int64(){let[e,t]=n.varint64read.bind(this)();return BigInt((0,n.int64ToString)(e,t))}uint64(){let[e,t]=n.varint64read.bind(this)();return BigInt((0,n.uInt64ToString)(e,t))}sint64(){let[e,t]=n.varint64read.bind(this)();return[e,t]=(0,n.zzDecode)(e,t),BigInt((0,n.int64ToString)(e,t))}fixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,n.uInt64ToString)(e,t))}sfixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,n.int64ToString)(e,t))}float(){throw Error(`float not supported`)}double(){throw Error(`double not supported`)}bool(){let[e,t]=n.varint64read.bind(this)();return e!==0||t!==0}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){let e=this.bytes();return(0,t.utf8Read)(e,0,e.length)}};var i=class{constructor(e,t,n){this.fn=e,this.len=t,this.val=n}proceed(e,t){this.fn&&this.fn(this.val,e,t)}},a=class{constructor(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}};e.BinaryWriter=class e{constructor(){this.len=0,this.uint64=e.prototype.int64,this.sfixed64=e.prototype.fixed64,this.sfixed32=e.prototype.fixed32,this.head=new i(null,0,0),this.tail=this.head,this.states=null}static create(){return new e}static alloc(e){return typeof Uint8Array<`u`?s(e=>new Uint8Array(e),Uint8Array.prototype.subarray)(e):Array(e)}_push(e,t,n){return this.tail=this.tail.next=new i(e,t,n),this.len+=t,this}finish(){let t=this.head.next,n=0,r=e.alloc(this.len);for(;t;)t.proceed(r,n),n+=t.len,t=t.next;return r}fork(){return this.states=new a(this),this.head=this.tail=new i(null,0,0),this.len=0,this}reset(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new i(null,0,0),this.len=0),this}ldelim(){let e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this}tag(e,t){return this.uint32((e<<3|t)>>>0)}uint32(e){return this.len+=(this.tail=this.tail.next=new i(n.writeVarint32,(e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this}int32(e){return e<0?this._push(n.writeVarint64,10,(0,n.int64FromString)(e.toString())):this.uint32(e)}sint32(e){return this.uint32((e<<1^e>>31)>>>0)}int64(e){let{lo:t,hi:r}=(0,n.int64FromString)(e.toString());return this._push(n.writeVarint64,(0,n.int64Length)(t,r),{lo:t,hi:r})}sint64(e){let{lo:t,hi:r}=(0,n.int64FromString)(e.toString());return[t,r]=(0,n.zzEncode)(t,r),this._push(n.writeVarint64,(0,n.int64Length)(t,r),{lo:t,hi:r})}fixed64(e){let{lo:t,hi:r}=(0,n.int64FromString)(e.toString());return this._push(n.writeFixed32,4,t)._push(n.writeFixed32,4,r)}bool(e){return this._push(n.writeByte,1,+!!e)}fixed32(e){return this._push(n.writeFixed32,4,e>>>0)}float(e){throw Error(`float not supported`+e)}double(e){throw Error(`double not supported`+e)}bytes(e){let t=e.length>>>0;return t?this.uint32(t)._push(o,t,e):this._push(n.writeByte,1,0)}string(e){let r=(0,t.utf8Length)(e);return r?this.uint32(r)._push(t.utf8Write,r,e):this._push(n.writeByte,1,0)}};function o(e,t,n){if(typeof Uint8Array<`u`)t.set(e,n);else for(let r=0;r<e.length;++r)t[n+r]=e[r]}function s(e,t,n){let r=n||8192,i=r>>>1,a=null,o=r;return function(n){if(n<1||n>i)return e(n);o+n>r&&(a=e(r),o=0);let s=t.call(a,o,o+=n);return o&7&&(o=(o|7)+1),s}}function c(e,t){return RangeError(`index out of range: `+e.pos+` + `+(t||1)+` > `+e.len)}})),Gn=a((e=>{x(),h(),Object.defineProperty(e,`__esModule`,{value:!0}),e.fromJsonTimestamp=e.fromTimestamp=e.toTimestamp=e.isRpc=e.setPaginationParams=e.isObject=e.isSet=e.fromDuration=e.toDuration=e.omitDefault=e.base64FromBytes=e.bytesFromBase64=void 0;var t=(()=>{if(t!==void 0)return t;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),n=t.atob||(e=>t.Buffer.from(e,`base64`).toString(`binary`));function r(e){let t=n(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}e.bytesFromBase64=r;var i=t.btoa||(e=>t.Buffer.from(e,`binary`).toString(`base64`));function a(e){let t=[];return e.forEach(e=>{t.push(String.fromCharCode(e))}),i(t.join(``))}e.base64FromBytes=a;function o(e){if(typeof e==`string`)return e===``?void 0:e;if(typeof e==`number`)return e===0?void 0:e;if(typeof e==`boolean`)return e===!1?void 0:e;if(typeof e==`bigint`)return e===BigInt(0)?void 0:e;throw Error(`Got unsupported type ${typeof e}`)}e.omitDefault=o;function s(e){return{seconds:BigInt(Math.floor(parseInt(e)/1e9)),nanos:parseInt(e)%1e9}}e.toDuration=s;function c(e){return(parseInt(e.seconds.toString())*1e9+e.nanos).toString()}e.fromDuration=c;function l(e){return e!=null}e.isSet=l;function u(e){return typeof e==`object`&&!!e}e.isObject=u,e.setPaginationParams=(e,t)=>t?(t?.countTotal!==void 0&&(e.params[`pagination.count_total`]=t.countTotal),t?.key!==void 0&&(e.params[`pagination.key`]=C.from(t.key).toString(`base64`)),t?.limit!==void 0&&(e.params[`pagination.limit`]=t.limit.toString()),t?.offset!==void 0&&(e.params[`pagination.offset`]=t.offset.toString()),t?.reverse!==void 0&&(e.params[`pagination.reverse`]=t.reverse),e):e;function d(e){return e!=null&&typeof e.request==`function`}e.isRpc=d;function f(e){return{seconds:v(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6}}e.toTimestamp=f;function p(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}e.fromTimestamp=p;var m=e=>({seconds:l(e.seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:l(e.nanos)?Number(e.nanos):0});function _(e){return e instanceof Date?f(e):typeof e==`string`?f(new Date(e)):m(e)}e.fromJsonTimestamp=_;function v(e){return BigInt(Math.trunc(e))}})),Kn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Any=e.protobufPackage=void 0;var t=Wn(),n=Gn();e.protobufPackage=`google.protobuf`;function r(){return{typeUrl:``,value:new Uint8Array}}e.Any={typeUrl:`/google.protobuf.Any`,encode(e,n=t.BinaryWriter.create()){return e.typeUrl!==``&&n.uint32(10).string(e.typeUrl),e.value.length!==0&&n.uint32(18).bytes(e.value),n},decode(e,n){let i=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?i.len:i.pos+n,o=r();for(;i.pos<a;){let e=i.uint32();switch(e>>>3){case 1:o.typeUrl=i.string();break;case 2:o.value=i.bytes();break;default:i.skipType(e&7);break}}return o},fromJSON(e){let t=r();return(0,n.isSet)(e.typeUrl)&&(t.typeUrl=String(e.typeUrl)),(0,n.isSet)(e.value)&&(t.value=(0,n.bytesFromBase64)(e.value)),t},toJSON(e){let t={};return e.typeUrl!==void 0&&(t.typeUrl=e.typeUrl),e.value!==void 0&&(t.value=(0,n.base64FromBytes)(e.value===void 0?new Uint8Array:e.value)),t},fromPartial(e){let t=r();return t.typeUrl=e.typeUrl??``,t.value=e.value??new Uint8Array,t}}})),qn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CompactBitArray=e.MultiSignature=e.protobufPackage=void 0;var t=Wn(),n=Gn();e.protobufPackage=`cosmos.crypto.multisig.v1beta1`;function r(){return{signatures:[]}}e.MultiSignature={typeUrl:`/cosmos.crypto.multisig.v1beta1.MultiSignature`,encode(e,n=t.BinaryWriter.create()){for(let t of e.signatures)n.uint32(10).bytes(t);return n},decode(e,n){let i=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?i.len:i.pos+n,o=r();for(;i.pos<a;){let e=i.uint32();switch(e>>>3){case 1:o.signatures.push(i.bytes());break;default:i.skipType(e&7);break}}return o},fromJSON(e){let t=r();return Array.isArray(e?.signatures)&&(t.signatures=e.signatures.map(e=>(0,n.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>(0,n.base64FromBytes)(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=r();return t.signatures=e.signatures?.map(e=>e)||[],t}};function i(){return{extraBitsStored:0,elems:new Uint8Array}}e.CompactBitArray={typeUrl:`/cosmos.crypto.multisig.v1beta1.CompactBitArray`,encode(e,n=t.BinaryWriter.create()){return e.extraBitsStored!==0&&n.uint32(8).uint32(e.extraBitsStored),e.elems.length!==0&&n.uint32(18).bytes(e.elems),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?r.len:r.pos+n,o=i();for(;r.pos<a;){let e=r.uint32();switch(e>>>3){case 1:o.extraBitsStored=r.uint32();break;case 2:o.elems=r.bytes();break;default:r.skipType(e&7);break}}return o},fromJSON(e){let t=i();return(0,n.isSet)(e.extraBitsStored)&&(t.extraBitsStored=Number(e.extraBitsStored)),(0,n.isSet)(e.elems)&&(t.elems=(0,n.bytesFromBase64)(e.elems)),t},toJSON(e){let t={};return e.extraBitsStored!==void 0&&(t.extraBitsStored=Math.round(e.extraBitsStored)),e.elems!==void 0&&(t.elems=(0,n.base64FromBytes)(e.elems===void 0?new Uint8Array:e.elems)),t},fromPartial(e){let t=i();return t.extraBitsStored=e.extraBitsStored??0,t.elems=e.elems??new Uint8Array,t}}})),Jn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SignatureDescriptor_Data_Multi=e.SignatureDescriptor_Data_Single=e.SignatureDescriptor_Data=e.SignatureDescriptor=e.SignatureDescriptors=e.signModeToJSON=e.signModeFromJSON=e.SignMode=e.protobufPackage=void 0;var t=qn(),n=Kn(),r=Wn(),i=Gn();e.protobufPackage=`cosmos.tx.signing.v1beta1`;var a;(function(e){e[e.SIGN_MODE_UNSPECIFIED=0]=`SIGN_MODE_UNSPECIFIED`,e[e.SIGN_MODE_DIRECT=1]=`SIGN_MODE_DIRECT`,e[e.SIGN_MODE_TEXTUAL=2]=`SIGN_MODE_TEXTUAL`,e[e.SIGN_MODE_DIRECT_AUX=3]=`SIGN_MODE_DIRECT_AUX`,e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]=`SIGN_MODE_LEGACY_AMINO_JSON`,e[e.SIGN_MODE_EIP_191=191]=`SIGN_MODE_EIP_191`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(a||(e.SignMode=a={}));function o(e){switch(e){case 0:case`SIGN_MODE_UNSPECIFIED`:return a.SIGN_MODE_UNSPECIFIED;case 1:case`SIGN_MODE_DIRECT`:return a.SIGN_MODE_DIRECT;case 2:case`SIGN_MODE_TEXTUAL`:return a.SIGN_MODE_TEXTUAL;case 3:case`SIGN_MODE_DIRECT_AUX`:return a.SIGN_MODE_DIRECT_AUX;case 127:case`SIGN_MODE_LEGACY_AMINO_JSON`:return a.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case`SIGN_MODE_EIP_191`:return a.SIGN_MODE_EIP_191;default:return a.UNRECOGNIZED}}e.signModeFromJSON=o;function s(e){switch(e){case a.SIGN_MODE_UNSPECIFIED:return`SIGN_MODE_UNSPECIFIED`;case a.SIGN_MODE_DIRECT:return`SIGN_MODE_DIRECT`;case a.SIGN_MODE_TEXTUAL:return`SIGN_MODE_TEXTUAL`;case a.SIGN_MODE_DIRECT_AUX:return`SIGN_MODE_DIRECT_AUX`;case a.SIGN_MODE_LEGACY_AMINO_JSON:return`SIGN_MODE_LEGACY_AMINO_JSON`;case a.SIGN_MODE_EIP_191:return`SIGN_MODE_EIP_191`;case a.UNRECOGNIZED:default:return`UNRECOGNIZED`}}e.signModeToJSON=s;function c(){return{signatures:[]}}e.SignatureDescriptors={typeUrl:`/cosmos.tx.signing.v1beta1.SignatureDescriptors`,encode(t,n=r.BinaryWriter.create()){for(let r of t.signatures)e.SignatureDescriptor.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.BinaryReader?t:new r.BinaryReader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signatures.push(e.SignatureDescriptor.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){let n=c();return Array.isArray(t?.signatures)&&(n.signatures=t.signatures.map(t=>e.SignatureDescriptor.fromJSON(t))),n},toJSON(t){let n={};return t.signatures?n.signatures=t.signatures.map(t=>t?e.SignatureDescriptor.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=c();return n.signatures=t.signatures?.map(t=>e.SignatureDescriptor.fromPartial(t))||[],n}};function l(){return{publicKey:void 0,data:void 0,sequence:BigInt(0)}}e.SignatureDescriptor={typeUrl:`/cosmos.tx.signing.v1beta1.SignatureDescriptor`,encode(t,i=r.BinaryWriter.create()){return t.publicKey!==void 0&&n.Any.encode(t.publicKey,i.uint32(10).fork()).ldelim(),t.data!==void 0&&e.SignatureDescriptor_Data.encode(t.data,i.uint32(18).fork()).ldelim(),t.sequence!==BigInt(0)&&i.uint32(24).uint64(t.sequence),i},decode(t,i){let a=t instanceof r.BinaryReader?t:new r.BinaryReader(t),o=i===void 0?a.len:a.pos+i,s=l();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.publicKey=n.Any.decode(a,a.uint32());break;case 2:s.data=e.SignatureDescriptor_Data.decode(a,a.uint32());break;case 3:s.sequence=a.uint64();break;default:a.skipType(t&7);break}}return s},fromJSON(t){let r=l();return(0,i.isSet)(t.publicKey)&&(r.publicKey=n.Any.fromJSON(t.publicKey)),(0,i.isSet)(t.data)&&(r.data=e.SignatureDescriptor_Data.fromJSON(t.data)),(0,i.isSet)(t.sequence)&&(r.sequence=BigInt(t.sequence.toString())),r},toJSON(t){let r={};return t.publicKey!==void 0&&(r.publicKey=t.publicKey?n.Any.toJSON(t.publicKey):void 0),t.data!==void 0&&(r.data=t.data?e.SignatureDescriptor_Data.toJSON(t.data):void 0),t.sequence!==void 0&&(r.sequence=(t.sequence||BigInt(0)).toString()),r},fromPartial(t){let r=l();return t.publicKey!==void 0&&t.publicKey!==null&&(r.publicKey=n.Any.fromPartial(t.publicKey)),t.data!==void 0&&t.data!==null&&(r.data=e.SignatureDescriptor_Data.fromPartial(t.data)),t.sequence!==void 0&&t.sequence!==null&&(r.sequence=BigInt(t.sequence.toString())),r}};function u(){return{single:void 0,multi:void 0}}e.SignatureDescriptor_Data={typeUrl:`/cosmos.tx.signing.v1beta1.Data`,encode(t,n=r.BinaryWriter.create()){return t.single!==void 0&&e.SignatureDescriptor_Data_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.SignatureDescriptor_Data_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.BinaryReader?t:new r.BinaryReader(t),a=n===void 0?i.len:i.pos+n,o=u();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.single=e.SignatureDescriptor_Data_Single.decode(i,i.uint32());break;case 2:o.multi=e.SignatureDescriptor_Data_Multi.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){let n=u();return(0,i.isSet)(t.single)&&(n.single=e.SignatureDescriptor_Data_Single.fromJSON(t.single)),(0,i.isSet)(t.multi)&&(n.multi=e.SignatureDescriptor_Data_Multi.fromJSON(t.multi)),n},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.SignatureDescriptor_Data_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.SignatureDescriptor_Data_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=u();return t.single!==void 0&&t.single!==null&&(n.single=e.SignatureDescriptor_Data_Single.fromPartial(t.single)),t.multi!==void 0&&t.multi!==null&&(n.multi=e.SignatureDescriptor_Data_Multi.fromPartial(t.multi)),n}};function d(){return{mode:0,signature:new Uint8Array}}e.SignatureDescriptor_Data_Single={typeUrl:`/cosmos.tx.signing.v1beta1.Single`,encode(e,t=r.BinaryWriter.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),e.signature.length!==0&&t.uint32(18).bytes(e.signature),t},decode(e,t){let n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.mode=n.int32();break;case 2:a.signature=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){let t=d();return(0,i.isSet)(e.mode)&&(t.mode=o(e.mode)),(0,i.isSet)(e.signature)&&(t.signature=(0,i.bytesFromBase64)(e.signature)),t},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=s(e.mode)),e.signature!==void 0&&(t.signature=(0,i.base64FromBytes)(e.signature===void 0?new Uint8Array:e.signature)),t},fromPartial(e){let t=d();return t.mode=e.mode??0,t.signature=e.signature??new Uint8Array,t}};function f(){return{bitarray:void 0,signatures:[]}}e.SignatureDescriptor_Data_Multi={typeUrl:`/cosmos.tx.signing.v1beta1.Multi`,encode(n,i=r.BinaryWriter.create()){n.bitarray!==void 0&&t.CompactBitArray.encode(n.bitarray,i.uint32(10).fork()).ldelim();for(let t of n.signatures)e.SignatureDescriptor_Data.encode(t,i.uint32(18).fork()).ldelim();return i},decode(n,i){let a=n instanceof r.BinaryReader?n:new r.BinaryReader(n),o=i===void 0?a.len:a.pos+i,s=f();for(;a.pos<o;){let n=a.uint32();switch(n>>>3){case 1:s.bitarray=t.CompactBitArray.decode(a,a.uint32());break;case 2:s.signatures.push(e.SignatureDescriptor_Data.decode(a,a.uint32()));break;default:a.skipType(n&7);break}}return s},fromJSON(n){let r=f();return(0,i.isSet)(n.bitarray)&&(r.bitarray=t.CompactBitArray.fromJSON(n.bitarray)),Array.isArray(n?.signatures)&&(r.signatures=n.signatures.map(t=>e.SignatureDescriptor_Data.fromJSON(t))),r},toJSON(n){let r={};return n.bitarray!==void 0&&(r.bitarray=n.bitarray?t.CompactBitArray.toJSON(n.bitarray):void 0),n.signatures?r.signatures=n.signatures.map(t=>t?e.SignatureDescriptor_Data.toJSON(t):void 0):r.signatures=[],r},fromPartial(n){let r=f();return n.bitarray!==void 0&&n.bitarray!==null&&(r.bitarray=t.CompactBitArray.fromPartial(n.bitarray)),r.signatures=n.signatures?.map(t=>e.SignatureDescriptor_Data.fromPartial(t))||[],r}}})),Yn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DecProto=e.IntProto=e.DecCoin=e.Coin=e.protobufPackage=void 0;var t=Wn(),n=Gn();e.protobufPackage=`cosmos.base.v1beta1`;function r(){return{denom:``,amount:``}}e.Coin={typeUrl:`/cosmos.base.v1beta1.Coin`,encode(e,n=t.BinaryWriter.create()){return e.denom!==``&&n.uint32(10).string(e.denom),e.amount!==``&&n.uint32(18).string(e.amount),n},decode(e,n){let i=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?i.len:i.pos+n,o=r();for(;i.pos<a;){let e=i.uint32();switch(e>>>3){case 1:o.denom=i.string();break;case 2:o.amount=i.string();break;default:i.skipType(e&7);break}}return o},fromJSON(e){let t=r();return(0,n.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,n.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=r();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function i(){return{denom:``,amount:``}}e.DecCoin={typeUrl:`/cosmos.base.v1beta1.DecCoin`,encode(e,n=t.BinaryWriter.create()){return e.denom!==``&&n.uint32(10).string(e.denom),e.amount!==``&&n.uint32(18).string(e.amount),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?r.len:r.pos+n,o=i();for(;r.pos<a;){let e=r.uint32();switch(e>>>3){case 1:o.denom=r.string();break;case 2:o.amount=r.string();break;default:r.skipType(e&7);break}}return o},fromJSON(e){let t=i();return(0,n.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,n.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=i();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function a(){return{int:``}}e.IntProto={typeUrl:`/cosmos.base.v1beta1.IntProto`,encode(e,n=t.BinaryWriter.create()){return e.int!==``&&n.uint32(10).string(e.int),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),i=n===void 0?r.len:r.pos+n,o=a();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:o.int=r.string();break;default:r.skipType(e&7);break}}return o},fromJSON(e){let t=a();return(0,n.isSet)(e.int)&&(t.int=String(e.int)),t},toJSON(e){let t={};return e.int!==void 0&&(t.int=e.int),t},fromPartial(e){let t=a();return t.int=e.int??``,t}};function o(){return{dec:``}}e.DecProto={typeUrl:`/cosmos.base.v1beta1.DecProto`,encode(e,n=t.BinaryWriter.create()){return e.dec!==``&&n.uint32(10).string(e.dec),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),i=n===void 0?r.len:r.pos+n,a=o();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:a.dec=r.string();break;default:r.skipType(e&7);break}}return a},fromJSON(e){let t=o();return(0,n.isSet)(e.dec)&&(t.dec=String(e.dec)),t},toJSON(e){let t={};return e.dec!==void 0&&(t.dec=e.dec),t},fromPartial(e){let t=o();return t.dec=e.dec??``,t}}})),Xn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AuxSignerData=e.Tip=e.Fee=e.ModeInfo_Multi=e.ModeInfo_Single=e.ModeInfo=e.SignerInfo=e.AuthInfo=e.TxBody=e.SignDocDirectAux=e.SignDoc=e.TxRaw=e.Tx=e.protobufPackage=void 0;var t=Kn(),n=Jn(),r=qn(),i=Yn(),a=Wn(),o=Gn();e.protobufPackage=`cosmos.tx.v1beta1`;function s(){return{body:void 0,authInfo:void 0,signatures:[]}}e.Tx={typeUrl:`/cosmos.tx.v1beta1.Tx`,encode(t,n=a.BinaryWriter.create()){t.body!==void 0&&e.TxBody.encode(t.body,n.uint32(10).fork()).ldelim(),t.authInfo!==void 0&&e.AuthInfo.encode(t.authInfo,n.uint32(18).fork()).ldelim();for(let e of t.signatures)n.uint32(26).bytes(e);return n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=s();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.body=e.TxBody.decode(r,r.uint32());break;case 2:o.authInfo=e.AuthInfo.decode(r,r.uint32());break;case 3:o.signatures.push(r.bytes());break;default:r.skipType(t&7);break}}return o},fromJSON(t){let n=s();return(0,o.isSet)(t.body)&&(n.body=e.TxBody.fromJSON(t.body)),(0,o.isSet)(t.authInfo)&&(n.authInfo=e.AuthInfo.fromJSON(t.authInfo)),Array.isArray(t?.signatures)&&(n.signatures=t.signatures.map(e=>(0,o.bytesFromBase64)(e))),n},toJSON(t){let n={};return t.body!==void 0&&(n.body=t.body?e.TxBody.toJSON(t.body):void 0),t.authInfo!==void 0&&(n.authInfo=t.authInfo?e.AuthInfo.toJSON(t.authInfo):void 0),t.signatures?n.signatures=t.signatures.map(e=>(0,o.base64FromBytes)(e===void 0?new Uint8Array:e)):n.signatures=[],n},fromPartial(t){let n=s();return t.body!==void 0&&t.body!==null&&(n.body=e.TxBody.fromPartial(t.body)),t.authInfo!==void 0&&t.authInfo!==null&&(n.authInfo=e.AuthInfo.fromPartial(t.authInfo)),n.signatures=t.signatures?.map(e=>e)||[],n}};function c(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}e.TxRaw={typeUrl:`/cosmos.tx.v1beta1.TxRaw`,encode(e,t=a.BinaryWriter.create()){e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes);for(let n of e.signatures)t.uint32(26).bytes(n);return t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,i=c();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.signatures.push(n.bytes());break;default:n.skipType(e&7);break}}return i},fromJSON(e){let t=c();return(0,o.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,o.bytesFromBase64)(e.bodyBytes)),(0,o.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,o.bytesFromBase64)(e.authInfoBytes)),Array.isArray(e?.signatures)&&(t.signatures=e.signatures.map(e=>(0,o.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=(0,o.base64FromBytes)(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=(0,o.base64FromBytes)(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.signatures?t.signatures=e.signatures.map(e=>(0,o.base64FromBytes)(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=c();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.signatures=e.signatures?.map(e=>e)||[],t}};function l(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:``,accountNumber:BigInt(0)}}e.SignDoc={typeUrl:`/cosmos.tx.v1beta1.SignDoc`,encode(e,t=a.BinaryWriter.create()){return e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes),e.chainId!==``&&t.uint32(26).string(e.chainId),e.accountNumber!==BigInt(0)&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,i=l();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.chainId=n.string();break;case 4:i.accountNumber=n.uint64();break;default:n.skipType(e&7);break}}return i},fromJSON(e){let t=l();return(0,o.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,o.bytesFromBase64)(e.bodyBytes)),(0,o.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,o.bytesFromBase64)(e.authInfoBytes)),(0,o.isSet)(e.chainId)&&(t.chainId=String(e.chainId)),(0,o.isSet)(e.accountNumber)&&(t.accountNumber=BigInt(e.accountNumber.toString())),t},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=(0,o.base64FromBytes)(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=(0,o.base64FromBytes)(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.chainId!==void 0&&(t.chainId=e.chainId),e.accountNumber!==void 0&&(t.accountNumber=(e.accountNumber||BigInt(0)).toString()),t},fromPartial(e){let t=l();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.chainId=e.chainId??``,e.accountNumber!==void 0&&e.accountNumber!==null&&(t.accountNumber=BigInt(e.accountNumber.toString())),t}};function u(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:``,accountNumber:BigInt(0),sequence:BigInt(0),tip:void 0}}e.SignDocDirectAux={typeUrl:`/cosmos.tx.v1beta1.SignDocDirectAux`,encode(n,r=a.BinaryWriter.create()){return n.bodyBytes.length!==0&&r.uint32(10).bytes(n.bodyBytes),n.publicKey!==void 0&&t.Any.encode(n.publicKey,r.uint32(18).fork()).ldelim(),n.chainId!==``&&r.uint32(26).string(n.chainId),n.accountNumber!==BigInt(0)&&r.uint32(32).uint64(n.accountNumber),n.sequence!==BigInt(0)&&r.uint32(40).uint64(n.sequence),n.tip!==void 0&&e.Tip.encode(n.tip,r.uint32(50).fork()).ldelim(),r},decode(n,r){let i=n instanceof a.BinaryReader?n:new a.BinaryReader(n),o=r===void 0?i.len:i.pos+r,s=u();for(;i.pos<o;){let n=i.uint32();switch(n>>>3){case 1:s.bodyBytes=i.bytes();break;case 2:s.publicKey=t.Any.decode(i,i.uint32());break;case 3:s.chainId=i.string();break;case 4:s.accountNumber=i.uint64();break;case 5:s.sequence=i.uint64();break;case 6:s.tip=e.Tip.decode(i,i.uint32());break;default:i.skipType(n&7);break}}return s},fromJSON(n){let r=u();return(0,o.isSet)(n.bodyBytes)&&(r.bodyBytes=(0,o.bytesFromBase64)(n.bodyBytes)),(0,o.isSet)(n.publicKey)&&(r.publicKey=t.Any.fromJSON(n.publicKey)),(0,o.isSet)(n.chainId)&&(r.chainId=String(n.chainId)),(0,o.isSet)(n.accountNumber)&&(r.accountNumber=BigInt(n.accountNumber.toString())),(0,o.isSet)(n.sequence)&&(r.sequence=BigInt(n.sequence.toString())),(0,o.isSet)(n.tip)&&(r.tip=e.Tip.fromJSON(n.tip)),r},toJSON(n){let r={};return n.bodyBytes!==void 0&&(r.bodyBytes=(0,o.base64FromBytes)(n.bodyBytes===void 0?new Uint8Array:n.bodyBytes)),n.publicKey!==void 0&&(r.publicKey=n.publicKey?t.Any.toJSON(n.publicKey):void 0),n.chainId!==void 0&&(r.chainId=n.chainId),n.accountNumber!==void 0&&(r.accountNumber=(n.accountNumber||BigInt(0)).toString()),n.sequence!==void 0&&(r.sequence=(n.sequence||BigInt(0)).toString()),n.tip!==void 0&&(r.tip=n.tip?e.Tip.toJSON(n.tip):void 0),r},fromPartial(n){let r=u();return r.bodyBytes=n.bodyBytes??new Uint8Array,n.publicKey!==void 0&&n.publicKey!==null&&(r.publicKey=t.Any.fromPartial(n.publicKey)),r.chainId=n.chainId??``,n.accountNumber!==void 0&&n.accountNumber!==null&&(r.accountNumber=BigInt(n.accountNumber.toString())),n.sequence!==void 0&&n.sequence!==null&&(r.sequence=BigInt(n.sequence.toString())),n.tip!==void 0&&n.tip!==null&&(r.tip=e.Tip.fromPartial(n.tip)),r}};function d(){return{messages:[],memo:``,timeoutHeight:BigInt(0),extensionOptions:[],nonCriticalExtensionOptions:[]}}e.TxBody={typeUrl:`/cosmos.tx.v1beta1.TxBody`,encode(e,n=a.BinaryWriter.create()){for(let r of e.messages)t.Any.encode(r,n.uint32(10).fork()).ldelim();e.memo!==``&&n.uint32(18).string(e.memo),e.timeoutHeight!==BigInt(0)&&n.uint32(24).uint64(e.timeoutHeight);for(let r of e.extensionOptions)t.Any.encode(r,n.uint32(8186).fork()).ldelim();for(let r of e.nonCriticalExtensionOptions)t.Any.encode(r,n.uint32(16378).fork()).ldelim();return n},decode(e,n){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=n===void 0?r.len:r.pos+n,o=d();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:o.messages.push(t.Any.decode(r,r.uint32()));break;case 2:o.memo=r.string();break;case 3:o.timeoutHeight=r.uint64();break;case 1023:o.extensionOptions.push(t.Any.decode(r,r.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(t.Any.decode(r,r.uint32()));break;default:r.skipType(e&7);break}}return o},fromJSON(e){let n=d();return Array.isArray(e?.messages)&&(n.messages=e.messages.map(e=>t.Any.fromJSON(e))),(0,o.isSet)(e.memo)&&(n.memo=String(e.memo)),(0,o.isSet)(e.timeoutHeight)&&(n.timeoutHeight=BigInt(e.timeoutHeight.toString())),Array.isArray(e?.extensionOptions)&&(n.extensionOptions=e.extensionOptions.map(e=>t.Any.fromJSON(e))),Array.isArray(e?.nonCriticalExtensionOptions)&&(n.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>t.Any.fromJSON(e))),n},toJSON(e){let n={};return e.messages?n.messages=e.messages.map(e=>e?t.Any.toJSON(e):void 0):n.messages=[],e.memo!==void 0&&(n.memo=e.memo),e.timeoutHeight!==void 0&&(n.timeoutHeight=(e.timeoutHeight||BigInt(0)).toString()),e.extensionOptions?n.extensionOptions=e.extensionOptions.map(e=>e?t.Any.toJSON(e):void 0):n.extensionOptions=[],e.nonCriticalExtensionOptions?n.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?t.Any.toJSON(e):void 0):n.nonCriticalExtensionOptions=[],n},fromPartial(e){let n=d();return n.messages=e.messages?.map(e=>t.Any.fromPartial(e))||[],n.memo=e.memo??``,e.timeoutHeight!==void 0&&e.timeoutHeight!==null&&(n.timeoutHeight=BigInt(e.timeoutHeight.toString())),n.extensionOptions=e.extensionOptions?.map(e=>t.Any.fromPartial(e))||[],n.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions?.map(e=>t.Any.fromPartial(e))||[],n}};function f(){return{signerInfos:[],fee:void 0,tip:void 0}}e.AuthInfo={typeUrl:`/cosmos.tx.v1beta1.AuthInfo`,encode(t,n=a.BinaryWriter.create()){for(let r of t.signerInfos)e.SignerInfo.encode(r,n.uint32(10).fork()).ldelim();return t.fee!==void 0&&e.Fee.encode(t.fee,n.uint32(18).fork()).ldelim(),t.tip!==void 0&&e.Tip.encode(t.tip,n.uint32(26).fork()).ldelim(),n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=f();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.signerInfos.push(e.SignerInfo.decode(r,r.uint32()));break;case 2:o.fee=e.Fee.decode(r,r.uint32());break;case 3:o.tip=e.Tip.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return o},fromJSON(t){let n=f();return Array.isArray(t?.signerInfos)&&(n.signerInfos=t.signerInfos.map(t=>e.SignerInfo.fromJSON(t))),(0,o.isSet)(t.fee)&&(n.fee=e.Fee.fromJSON(t.fee)),(0,o.isSet)(t.tip)&&(n.tip=e.Tip.fromJSON(t.tip)),n},toJSON(t){let n={};return t.signerInfos?n.signerInfos=t.signerInfos.map(t=>t?e.SignerInfo.toJSON(t):void 0):n.signerInfos=[],t.fee!==void 0&&(n.fee=t.fee?e.Fee.toJSON(t.fee):void 0),t.tip!==void 0&&(n.tip=t.tip?e.Tip.toJSON(t.tip):void 0),n},fromPartial(t){let n=f();return n.signerInfos=t.signerInfos?.map(t=>e.SignerInfo.fromPartial(t))||[],t.fee!==void 0&&t.fee!==null&&(n.fee=e.Fee.fromPartial(t.fee)),t.tip!==void 0&&t.tip!==null&&(n.tip=e.Tip.fromPartial(t.tip)),n}};function p(){return{publicKey:void 0,modeInfo:void 0,sequence:BigInt(0)}}e.SignerInfo={typeUrl:`/cosmos.tx.v1beta1.SignerInfo`,encode(n,r=a.BinaryWriter.create()){return n.publicKey!==void 0&&t.Any.encode(n.publicKey,r.uint32(10).fork()).ldelim(),n.modeInfo!==void 0&&e.ModeInfo.encode(n.modeInfo,r.uint32(18).fork()).ldelim(),n.sequence!==BigInt(0)&&r.uint32(24).uint64(n.sequence),r},decode(n,r){let i=n instanceof a.BinaryReader?n:new a.BinaryReader(n),o=r===void 0?i.len:i.pos+r,s=p();for(;i.pos<o;){let n=i.uint32();switch(n>>>3){case 1:s.publicKey=t.Any.decode(i,i.uint32());break;case 2:s.modeInfo=e.ModeInfo.decode(i,i.uint32());break;case 3:s.sequence=i.uint64();break;default:i.skipType(n&7);break}}return s},fromJSON(n){let r=p();return(0,o.isSet)(n.publicKey)&&(r.publicKey=t.Any.fromJSON(n.publicKey)),(0,o.isSet)(n.modeInfo)&&(r.modeInfo=e.ModeInfo.fromJSON(n.modeInfo)),(0,o.isSet)(n.sequence)&&(r.sequence=BigInt(n.sequence.toString())),r},toJSON(n){let r={};return n.publicKey!==void 0&&(r.publicKey=n.publicKey?t.Any.toJSON(n.publicKey):void 0),n.modeInfo!==void 0&&(r.modeInfo=n.modeInfo?e.ModeInfo.toJSON(n.modeInfo):void 0),n.sequence!==void 0&&(r.sequence=(n.sequence||BigInt(0)).toString()),r},fromPartial(n){let r=p();return n.publicKey!==void 0&&n.publicKey!==null&&(r.publicKey=t.Any.fromPartial(n.publicKey)),n.modeInfo!==void 0&&n.modeInfo!==null&&(r.modeInfo=e.ModeInfo.fromPartial(n.modeInfo)),n.sequence!==void 0&&n.sequence!==null&&(r.sequence=BigInt(n.sequence.toString())),r}};function m(){return{single:void 0,multi:void 0}}e.ModeInfo={typeUrl:`/cosmos.tx.v1beta1.ModeInfo`,encode(t,n=a.BinaryWriter.create()){return t.single!==void 0&&e.ModeInfo_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.ModeInfo_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=m();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.single=e.ModeInfo_Single.decode(r,r.uint32());break;case 2:o.multi=e.ModeInfo_Multi.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return o},fromJSON(t){let n=m();return(0,o.isSet)(t.single)&&(n.single=e.ModeInfo_Single.fromJSON(t.single)),(0,o.isSet)(t.multi)&&(n.multi=e.ModeInfo_Multi.fromJSON(t.multi)),n},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.ModeInfo_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.ModeInfo_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=m();return t.single!==void 0&&t.single!==null&&(n.single=e.ModeInfo_Single.fromPartial(t.single)),t.multi!==void 0&&t.multi!==null&&(n.multi=e.ModeInfo_Multi.fromPartial(t.multi)),n}};function h(){return{mode:0}}e.ModeInfo_Single={typeUrl:`/cosmos.tx.v1beta1.Single`,encode(e,t=a.BinaryWriter.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,i=h();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:i.mode=n.int32();break;default:n.skipType(e&7);break}}return i},fromJSON(e){let t=h();return(0,o.isSet)(e.mode)&&(t.mode=(0,n.signModeFromJSON)(e.mode)),t},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=(0,n.signModeToJSON)(e.mode)),t},fromPartial(e){let t=h();return t.mode=e.mode??0,t}};function g(){return{bitarray:void 0,modeInfos:[]}}e.ModeInfo_Multi={typeUrl:`/cosmos.tx.v1beta1.Multi`,encode(t,n=a.BinaryWriter.create()){t.bitarray!==void 0&&r.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(let r of t.modeInfos)e.ModeInfo.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof a.BinaryReader?t:new a.BinaryReader(t),o=n===void 0?i.len:i.pos+n,s=g();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.bitarray=r.CompactBitArray.decode(i,i.uint32());break;case 2:s.modeInfos.push(e.ModeInfo.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){let n=g();return(0,o.isSet)(t.bitarray)&&(n.bitarray=r.CompactBitArray.fromJSON(t.bitarray)),Array.isArray(t?.modeInfos)&&(n.modeInfos=t.modeInfos.map(t=>e.ModeInfo.fromJSON(t))),n},toJSON(t){let n={};return t.bitarray!==void 0&&(n.bitarray=t.bitarray?r.CompactBitArray.toJSON(t.bitarray):void 0),t.modeInfos?n.modeInfos=t.modeInfos.map(t=>t?e.ModeInfo.toJSON(t):void 0):n.modeInfos=[],n},fromPartial(t){let n=g();return t.bitarray!==void 0&&t.bitarray!==null&&(n.bitarray=r.CompactBitArray.fromPartial(t.bitarray)),n.modeInfos=t.modeInfos?.map(t=>e.ModeInfo.fromPartial(t))||[],n}};function _(){return{amount:[],gasLimit:BigInt(0),payer:``,granter:``}}e.Fee={typeUrl:`/cosmos.tx.v1beta1.Fee`,encode(e,t=a.BinaryWriter.create()){for(let n of e.amount)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.gasLimit!==BigInt(0)&&t.uint32(16).uint64(e.gasLimit),e.payer!==``&&t.uint32(26).string(e.payer),e.granter!==``&&t.uint32(34).string(e.granter),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,o=_();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:o.amount.push(i.Coin.decode(n,n.uint32()));break;case 2:o.gasLimit=n.uint64();break;case 3:o.payer=n.string();break;case 4:o.granter=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){let t=_();return Array.isArray(e?.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),(0,o.isSet)(e.gasLimit)&&(t.gasLimit=BigInt(e.gasLimit.toString())),(0,o.isSet)(e.payer)&&(t.payer=String(e.payer)),(0,o.isSet)(e.granter)&&(t.granter=String(e.granter)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],e.gasLimit!==void 0&&(t.gasLimit=(e.gasLimit||BigInt(0)).toString()),e.payer!==void 0&&(t.payer=e.payer),e.granter!==void 0&&(t.granter=e.granter),t},fromPartial(e){let t=_();return t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],e.gasLimit!==void 0&&e.gasLimit!==null&&(t.gasLimit=BigInt(e.gasLimit.toString())),t.payer=e.payer??``,t.granter=e.granter??``,t}};function v(){return{amount:[],tipper:``}}e.Tip={typeUrl:`/cosmos.tx.v1beta1.Tip`,encode(e,t=a.BinaryWriter.create()){for(let n of e.amount)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.tipper!==``&&t.uint32(18).string(e.tipper),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,o=v();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:o.amount.push(i.Coin.decode(n,n.uint32()));break;case 2:o.tipper=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){let t=v();return Array.isArray(e?.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),(0,o.isSet)(e.tipper)&&(t.tipper=String(e.tipper)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],e.tipper!==void 0&&(t.tipper=e.tipper),t},fromPartial(e){let t=v();return t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],t.tipper=e.tipper??``,t}};function y(){return{address:``,signDoc:void 0,mode:0,sig:new Uint8Array}}e.AuxSignerData={typeUrl:`/cosmos.tx.v1beta1.AuxSignerData`,encode(t,n=a.BinaryWriter.create()){return t.address!==``&&n.uint32(10).string(t.address),t.signDoc!==void 0&&e.SignDocDirectAux.encode(t.signDoc,n.uint32(18).fork()).ldelim(),t.mode!==0&&n.uint32(24).int32(t.mode),t.sig.length!==0&&n.uint32(34).bytes(t.sig),n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=y();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.address=r.string();break;case 2:o.signDoc=e.SignDocDirectAux.decode(r,r.uint32());break;case 3:o.mode=r.int32();break;case 4:o.sig=r.bytes();break;default:r.skipType(t&7);break}}return o},fromJSON(t){let r=y();return(0,o.isSet)(t.address)&&(r.address=String(t.address)),(0,o.isSet)(t.signDoc)&&(r.signDoc=e.SignDocDirectAux.fromJSON(t.signDoc)),(0,o.isSet)(t.mode)&&(r.mode=(0,n.signModeFromJSON)(t.mode)),(0,o.isSet)(t.sig)&&(r.sig=(0,o.bytesFromBase64)(t.sig)),r},toJSON(t){let r={};return t.address!==void 0&&(r.address=t.address),t.signDoc!==void 0&&(r.signDoc=t.signDoc?e.SignDocDirectAux.toJSON(t.signDoc):void 0),t.mode!==void 0&&(r.mode=(0,n.signModeToJSON)(t.mode)),t.sig!==void 0&&(r.sig=(0,o.base64FromBytes)(t.sig===void 0?new Uint8Array:t.sig)),r},fromPartial(t){let n=y();return n.address=t.address??``,t.signDoc!==void 0&&t.signDoc!==null&&(n.signDoc=e.SignDocDirectAux.fromPartial(t.signDoc)),n.mode=t.mode??0,n.sig=t.sig??new Uint8Array,n}}})),Zn=a(((e,t)=>{var n=D(),r=P().Buffer;t.exports=function(e){function t(t){var i=e(t);return n.encode(r.concat([t,i],t.length+4))}function i(t){var n=t.slice(0,-4),r=t.slice(-4),i=e(n);if(!(r[0]^i[0]|r[1]^i[1]|r[2]^i[2]|r[3]^i[3]))return n}function a(e){var t=n.decodeUnsafe(e);if(t)return i(t)}function o(t){var r=i(n.decode(t),e);if(!r)throw Error(`Invalid checksum`);return r}return{encode:t,decode:o,decodeUnsafe:a}}})),Qn=a(((e,t)=>{var n=A(),r=Zn();function i(e){var t=n(`sha256`).update(e).digest();return n(`sha256`).update(t).digest()}t.exports=r(i)})),U=a(((t,n)=>{h(),(function(e,r){typeof t==`object`?n.exports=t=r():typeof define==`function`&&define.amd?define([],r):e.CryptoJS=r()})(t,function(){var t=t||function(t,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&g!==void 0&&g.crypto&&(r=g.crypto),!r&&typeof e==`function`)try{r=j()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],t==n?this.sigBytes=e.length*4:this.sigBytes=t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=e?t.ceil(s):t.max((s|0)-this._minBufferSize,0);var c=s*o,u=t.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return t})})),$n=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.Base,a=r.WordArray,o=n.x64={};o.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),o.WordArray=i.extend({init:function(e,n){e=this.words=e||[],n==t?this.sigBytes=e.length*8:this.sigBytes=n},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}})})(),e})})),er=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){if(typeof ArrayBuffer==`function`){var t=e.lib.WordArray,n=t.init,r=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||typeof Uint8ClampedArray<`u`&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,r=[],i=0;i<t;i++)r[i>>>2]|=e[i]<<24-i%4*8;n.call(this,r,t)}else n.apply(this,arguments)};r.prototype=t}})(),e.lib.WordArray})})),tr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.enc;r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var a=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return n.create(r,t*2)}},r.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a+=2){var o=i(t[a>>>2]>>>16-a%4*8&65535);r.push(String.fromCharCode(o))}return r.join(``)},parse:function(e){for(var t=e.length,r=[],a=0;a<t;a++)r[a>>>1]|=i(e.charCodeAt(a)<<16-a%2*16);return n.create(r,t*2)}};function i(e){return e<<8&4278255360|e>>>8&16711935}})(),e.enc.Utf16})})),nr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.enc;r.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],a=0;a<n;a+=3)for(var o=t[a>>>2]>>>24-a%4*8&255,s=t[a+1>>>2]>>>24-(a+1)%4*8&255,c=t[a+2>>>2]>>>24-(a+2)%4*8&255,l=o<<16|s<<8|c,u=0;u<4&&a+u*.75<n;u++)i.push(r.charAt(l>>>6*(3-u)&63));var d=r.charAt(64);if(d)for(;i.length%4;)i.push(d);return i.join(``)},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a<n.length;a++)r[n.charCodeAt(a)]=a}var o=n.charAt(64);if(o){var s=e.indexOf(o);s!==-1&&(t=s)}return i(e,t,r)},_map:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`};function i(e,t,r){for(var i=[],a=0,o=0;o<t;o++)if(o%4){var s=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2;i[a>>>2]|=s<<24-a%4*8,a++}return n.create(i,a)}})(),e.enc.Base64})})),rr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.enc;r.Base64url={stringify:function(e,t){t===void 0&&(t=!0);var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o<r;o+=3)for(var s=n[o>>>2]>>>24-o%4*8&255,c=n[o+1>>>2]>>>24-(o+1)%4*8&255,l=n[o+2>>>2]>>>24-(o+2)%4*8&255,u=s<<16|c<<8|l,d=0;d<4&&o+d*.75<r;d++)a.push(i.charAt(u>>>6*(3-d)&63));var f=i.charAt(64);if(f)for(;a.length%4;)a.push(f);return a.join(``)},parse:function(e,t){t===void 0&&(t=!0);var n=e.length,r=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<r.length;o++)a[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var c=e.indexOf(s);c!==-1&&(n=c)}return i(e,n,a)},_map:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,_safe_map:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`};function i(e,t,r){for(var i=[],a=0,o=0;o<t;o++)if(o%4){var s=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2;i[a>>>2]|=s<<24-a%4*8,a++}return n.create(i,a)}})(),e.enc.Base64url})})),ir=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[];(function(){for(var e=0;e<64;e++)s[e]=t.abs(t.sin(e+1))*4294967296|0})();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],m=e[t+3],h=e[t+4],g=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],b=e[t+9],x=e[t+10],S=e[t+11],C=e[t+12],w=e[t+13],T=e[t+14],E=e[t+15],D=a[0],O=a[1],k=a[2],A=a[3];D=l(D,O,k,A,o,7,s[0]),A=l(A,D,O,k,c,12,s[1]),k=l(k,A,D,O,p,17,s[2]),O=l(O,k,A,D,m,22,s[3]),D=l(D,O,k,A,h,7,s[4]),A=l(A,D,O,k,g,12,s[5]),k=l(k,A,D,O,_,17,s[6]),O=l(O,k,A,D,v,22,s[7]),D=l(D,O,k,A,y,7,s[8]),A=l(A,D,O,k,b,12,s[9]),k=l(k,A,D,O,x,17,s[10]),O=l(O,k,A,D,S,22,s[11]),D=l(D,O,k,A,C,7,s[12]),A=l(A,D,O,k,w,12,s[13]),k=l(k,A,D,O,T,17,s[14]),O=l(O,k,A,D,E,22,s[15]),D=u(D,O,k,A,c,5,s[16]),A=u(A,D,O,k,_,9,s[17]),k=u(k,A,D,O,S,14,s[18]),O=u(O,k,A,D,o,20,s[19]),D=u(D,O,k,A,g,5,s[20]),A=u(A,D,O,k,x,9,s[21]),k=u(k,A,D,O,E,14,s[22]),O=u(O,k,A,D,h,20,s[23]),D=u(D,O,k,A,b,5,s[24]),A=u(A,D,O,k,T,9,s[25]),k=u(k,A,D,O,m,14,s[26]),O=u(O,k,A,D,y,20,s[27]),D=u(D,O,k,A,w,5,s[28]),A=u(A,D,O,k,p,9,s[29]),k=u(k,A,D,O,v,14,s[30]),O=u(O,k,A,D,C,20,s[31]),D=d(D,O,k,A,g,4,s[32]),A=d(A,D,O,k,y,11,s[33]),k=d(k,A,D,O,S,16,s[34]),O=d(O,k,A,D,T,23,s[35]),D=d(D,O,k,A,c,4,s[36]),A=d(A,D,O,k,h,11,s[37]),k=d(k,A,D,O,v,16,s[38]),O=d(O,k,A,D,x,23,s[39]),D=d(D,O,k,A,w,4,s[40]),A=d(A,D,O,k,o,11,s[41]),k=d(k,A,D,O,m,16,s[42]),O=d(O,k,A,D,_,23,s[43]),D=d(D,O,k,A,b,4,s[44]),A=d(A,D,O,k,C,11,s[45]),k=d(k,A,D,O,E,16,s[46]),O=d(O,k,A,D,p,23,s[47]),D=f(D,O,k,A,o,6,s[48]),A=f(A,D,O,k,v,10,s[49]),k=f(k,A,D,O,T,15,s[50]),O=f(O,k,A,D,g,21,s[51]),D=f(D,O,k,A,C,6,s[52]),A=f(A,D,O,k,m,10,s[53]),k=f(k,A,D,O,x,15,s[54]),O=f(O,k,A,D,c,21,s[55]),D=f(D,O,k,A,y,6,s[56]),A=f(A,D,O,k,E,10,s[57]),k=f(k,A,D,O,_,15,s[58]),O=f(O,k,A,D,w,21,s[59]),D=f(D,O,k,A,h,6,s[60]),A=f(A,D,O,k,S,10,s[61]),k=f(k,A,D,O,p,15,s[62]),O=f(O,k,A,D,b,21,s[63]),a[0]=a[0]+D|0,a[1]=a[1]+O|0,a[2]=a[2]+k|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}n.MD5=a._createHelper(c),n.HmacMD5=a._createHmacHelper(c)})(Math),e.MD5})})),ar=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.WordArray,i=n.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],s=n[3],c=n[4],l=0;l<80;l++){if(l<16)o[l]=e[t+l]|0;else{var u=o[l-3]^o[l-8]^o[l-14]^o[l-16];o[l]=u<<1|u>>>31}var d=(r<<5|r>>>27)+c+o[l];l<20?d+=(i&a|~i&s)+1518500249:l<40?d+=(i^a^s)+1859775393:l<60?d+=(i&a|i&s|a&s)-1894007588:d+=(i^a^s)-899497514,c=s,s=a,a=i<<30|i>>>2,i=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(r+64>>>9<<4)+15]=n,e.sigBytes=t.length*4,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)})(),e.SHA1})})),or=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[],c=[];(function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return(e-(e|0))*4294967296|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,1/2))),c[i]=n(t.pow(r,1/3)),i++),r++})();var l=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=0;p<64;p++){if(p<16)l[p]=e[t+p]|0;else{var m=l[p-15],h=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=l[p-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[p]=h+l[p-7]+_+l[p-16]}var v=s&u^~s&d,y=r&i^r&a^i&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),S=f+x+v+c[p]+l[p],C=b+y;f=d,d=u,u=s,s=o+S|0,o=a,a=i,i=r,r=S+C|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=n.length*4,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=a._createHelper(u),n.HmacSHA256=a._createHmacHelper(u)})(Math),e.SHA256})})),sr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),or()):typeof define==`function`&&define.amd?define([`./core`,`./sha256`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.algo,i=r.SHA256,a=r.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=i._createHelper(a),t.HmacSHA224=i._createHmacHelper(a)})(),e.SHA224})})),cr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n()):typeof define==`function`&&define.amd?define([`./core`,`./x64-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.Hasher,r=t.x64,i=r.Word,a=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];(function(){for(var e=0;e<80;e++)l[e]=s()})();var u=o.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=r.high,m=r.low,h=i.high,g=i.low,_=a.high,v=a.low,y=o.high,b=o.low,x=s.high,S=s.low,C=u.high,w=u.low,T=d.high,E=d.low,D=f.high,O=f.low,k=p,A=m,j=h,M=g,N=_,P=v,F=y,I=b,L=x,R=S,ee=C,te=w,ne=T,re=E,ie=D,ae=O,oe=0;oe<80;oe++){var se,ce,le=l[oe];if(oe<16)ce=le.high=e[t+oe*2]|0,se=le.low=e[t+oe*2+1]|0;else{var ue=l[oe-15],de=ue.high,fe=ue.low,pe=(de>>>1|fe<<31)^(de>>>8|fe<<24)^de>>>7,me=(fe>>>1|de<<31)^(fe>>>8|de<<24)^(fe>>>7|de<<25),he=l[oe-2],ge=he.high,_e=he.low,ve=(ge>>>19|_e<<13)^(ge<<3|_e>>>29)^ge>>>6,ye=(_e>>>19|ge<<13)^(_e<<3|ge>>>29)^(_e>>>6|ge<<26),z=l[oe-7],be=z.high,xe=z.low,Se=l[oe-16],Ce=Se.high,we=Se.low;se=me+xe,ce=pe+be+ +(se>>>0<me>>>0),se+=ye,ce=ce+ve+ +(se>>>0<ye>>>0),se+=we,ce=ce+Ce+ +(se>>>0<we>>>0),le.high=ce,le.low=se}var Te=L&ee^~L&ne,Ee=R&te^~R&re,De=k&j^k&N^j&N,Oe=A&M^A&P^M&P,ke=(k>>>28|A<<4)^(k<<30|A>>>2)^(k<<25|A>>>7),Ae=(A>>>28|k<<4)^(A<<30|k>>>2)^(A<<25|k>>>7),je=(L>>>14|R<<18)^(L>>>18|R<<14)^(L<<23|R>>>9),Me=(R>>>14|L<<18)^(R>>>18|L<<14)^(R<<23|L>>>9),B=c[oe],Ne=B.high,Pe=B.low,Fe=ae+Me,Ie=ie+je+ +(Fe>>>0<ae>>>0),Fe=Fe+Ee,Ie=Ie+Te+ +(Fe>>>0<Ee>>>0),Fe=Fe+Pe,Ie=Ie+Ne+ +(Fe>>>0<Pe>>>0),Fe=Fe+se,Ie=Ie+ce+ +(Fe>>>0<se>>>0),Le=Ae+Oe,Re=ke+De+ +(Le>>>0<Ae>>>0);ie=ne,ae=re,ne=ee,re=te,ee=L,te=R,R=I+Fe|0,L=F+Ie+ +(R>>>0<I>>>0)|0,F=N,I=P,N=j,P=M,j=k,M=A,A=Fe+Le|0,k=Ie+Re+ +(A>>>0<Fe>>>0)|0}m=r.low=m+A,r.high=p+k+ +(m>>>0<A>>>0),g=i.low=g+M,i.high=h+j+ +(g>>>0<M>>>0),v=a.low=v+P,a.high=_+N+ +(v>>>0<P>>>0),b=o.low=b+I,o.high=y+F+ +(b>>>0<I>>>0),S=s.low=S+R,s.high=x+L+ +(S>>>0<R>>>0),w=u.low=w+te,u.high=C+ee+ +(w>>>0<te>>>0),E=d.low=E+re,d.high=T+ne+ +(E>>>0<re>>>0),O=f.low=O+ae,f.high=D+ie+ +(O>>>0<ae>>>0)},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),t[(r+128>>>10<<5)+31]=n,e.sigBytes=t.length*4,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:1024/32});t.SHA512=n._createHelper(u),t.HmacSHA512=n._createHmacHelper(u)})(),e.SHA512})})),lr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n(),cr()):typeof define==`function`&&define.amd?define([`./core`,`./x64-core`,`./sha512`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.x64,r=n.Word,i=n.WordArray,a=t.algo,o=a.SHA512,s=a.SHA384=o.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=16,e}});t.SHA384=o._createHelper(s),t.HmacSHA384=o._createHmacHelper(s)})(),e.SHA384})})),ur=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n()):typeof define==`function`&&define.amd?define([`./core`,`./x64-core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.x64.Word,s=n.algo,c=[],l=[],u=[];(function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var r=t%5,i=(2*e+3*t)%5;e=r,t=i}for(var e=0;e<5;e++)for(var t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var a=1,s=0;s<24;s++){for(var d=0,f=0,p=0;p<7;p++){if(a&1){var m=(1<<p)-1;m<32?f^=1<<m:d^=1<<m-32}a&128?a=a<<1^113:a<<=1}u[s]=o.create(d,f)}})();var d=[];(function(){for(var e=0;e<25;e++)d[e]=o.create()})();var f=s.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var a=e[t+2*i],o=e[t+2*i+1];a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,o=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;var s=n[i];s.high^=o,s.low^=a}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,h=0,g=0;g<5;g++){var s=n[p+5*g];m^=s.high,h^=s.low}var _=d[p];_.high=m,_.low=h}for(var p=0;p<5;p++)for(var v=d[(p+4)%5],y=d[(p+1)%5],b=y.high,x=y.low,m=v.high^(b<<1|x>>>31),h=v.low^(x<<1|b>>>31),g=0;g<5;g++){var s=n[p+5*g];s.high^=m,s.low^=h}for(var S=1;S<25;S++){var m,h,s=n[S],C=s.high,w=s.low,T=c[S];T<32?(m=C<<T|w>>>32-T,h=w<<T|C>>>32-T):(m=w<<T-32|C>>>64-T,h=C<<T-32|w>>>64-T);var E=d[l[S]];E.high=m,E.low=h}var D=d[0],O=n[0];D.high=O.high,D.low=O.low;for(var p=0;p<5;p++)for(var g=0;g<5;g++){var S=p+5*g,s=n[S],k=d[S],A=d[(p+1)%5+5*g],j=d[(p+2)%5+5*g];s.high=k.high^~A.high&j.high,s.low=k.low^~A.low&j.low}var s=n[0],M=u[f];s.high^=M.high,s.low^=M.low}},_doFinalize:function(){var e=this._data,n=e.words;this._nDataBytes*8;var r=e.sigBytes*8,a=this.blockSize*32;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/a)*a>>>5)-1]|=128,e.sigBytes=n.length*4,this._process();for(var o=this._state,s=this.cfg.outputLength/8,c=s/8,l=[],u=0;u<c;u++){var d=o[u],f=d.high,p=d.low;f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,p=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,l.push(p),l.push(f)}return new i.init(l,s)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});n.SHA3=a._createHelper(f),n.HmacSHA3=a._createHmacHelper(f)})(Math),e.SHA3})})),dr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}for(var a=this._hash.words,o=d.words,p=f.words,b=s.words,x=c.words,S=l.words,C=u.words,w,T,E,D,O,k=w=a[0],A=T=a[1],j=E=a[2],M=D=a[3],N=O=a[4],P,n=0;n<80;n+=1)P=w+e[t+b[n]]|0,n<16?P+=m(T,E,D)+o[0]:n<32?P+=h(T,E,D)+o[1]:n<48?P+=g(T,E,D)+o[2]:n<64?P+=_(T,E,D)+o[3]:P+=v(T,E,D)+o[4],P|=0,P=y(P,S[n]),P=P+O|0,w=O,O=D,D=y(E,10),E=T,T=P,P=k+e[t+x[n]]|0,n<16?P+=v(A,j,M)+p[0]:n<32?P+=_(A,j,M)+p[1]:n<48?P+=g(A,j,M)+p[2]:n<64?P+=h(A,j,M)+p[3]:P+=m(A,j,M)+p[4],P|=0,P=y(P,C[n]),P=P+N|0,k=N,N=M,M=y(j,10),j=A,A=P;P=a[1]+E+M|0,a[1]=a[2]+D+N|0,a[2]=a[3]+O+k|0,a[3]=a[4]+w+A|0,a[4]=a[0]+T+j|0,a[0]=P},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,e.sigBytes=(t.length+1)*4,this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function m(e,t,n){return e^t^n}function h(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function _(e,t,n){return e&n|t&~n}function v(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}n.RIPEMD160=a._createHelper(p),n.HmacRIPEMD160=a._createHmacHelper(p)})(Math),e.RIPEMD160})})),fr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){(function(){var t=e,n=t.lib.Base,r=t.enc.Utf8,i=t.algo;i.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,typeof t==`string`&&(t=r.parse(t));var n=e.blockSize,i=n*4;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,c=o.words,l=0;l<n;l++)s[l]^=1549556828,c[l]^=909522486;a.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})})()})})),pr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),or(),fr()):typeof define==`function`&&define.amd?define([`./core`,`./sha256`,`./hmac`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,a=t.algo,o=a.SHA256,s=a.HMAC,c=a.PBKDF2=r.extend({cfg:r.extend({keySize:128/32,hasher:o,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=s.create(n.hasher,e),a=i.create(),o=i.create([1]),c=a.words,l=o.words,u=n.keySize,d=n.iterations;c.length<u;){var f=r.update(t).finalize(o);r.reset();for(var p=f.words,m=p.length,h=f,g=1;g<d;g++){h=r.finalize(h),r.reset();for(var _=h.words,v=0;v<m;v++)p[v]^=_[v]}a.concat(f),l[0]++}return a.sigBytes=u*4,a}});t.PBKDF2=function(e,t,n){return c.create(n).compute(e,t)}})(),e.PBKDF2})})),mr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),ar(),fr()):typeof define==`function`&&define.amd?define([`./core`,`./sha1`,`./hmac`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,a=t.algo,o=a.MD5,s=a.EvpKDF=r.extend({cfg:r.extend({keySize:128/32,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,a=r.hasher.create(),o=i.create(),s=o.words,c=r.keySize,l=r.iterations;s.length<c;){n&&a.update(n),n=a.update(e).finalize(t),a.reset();for(var u=1;u<l;u++)n=a.finalize(n),a.reset();o.concat(n)}return o.sigBytes=c*4,o}});t.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)}})(),e.EvpKDF})})),hr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),mr()):typeof define==`function`&&define.amd?define([`./core`,`./evpkdf`],r):r(n.CryptoJS)})(e,function(e){e.lib.Cipher||function(t){var n=e,r=n.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=n.enc;s.Utf8;var c=s.Base64,l=n.algo.EvpKDF,u=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return typeof e==`string`?S:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var d=n.mode={},f=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=d.CBC=function(){var e=f.extend();e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,a=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=a}});function n(e,n,r){var i,a=this._iv;a?(i=a,this._iv=t):i=this._prevBlock;for(var o=0;o<r;o++)e[n+o]^=i[o]}return e}(),m=n.pad={},h=m.Pkcs7={pad:function(e,t){for(var n=t*4,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],s=0;s<r;s+=4)o.push(i);var c=a.create(o,r);e.concat(c)},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:h}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:128/32});var g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),_=n.format={},v=_.OpenSSL={stringify:function(e){var t,n=e.ciphertext,r=e.salt;return t=r?a.create([1398893684,1701076831]).concat(r).concat(n):n,t.toString(c)},parse:function(e){var t,n=c.parse(e),r=n.words;return r[0]==1398893684&&r[1]==1701076831&&(t=a.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},y=r.SerializableCipher=i.extend({cfg:i.extend({format:v}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),a=i.finalize(t),o=i.cfg;return g.create({ciphertext:a,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return typeof e==`string`?t.parse(e,this):e}}),b=n.kdf={},x=b.OpenSSL={execute:function(e,t,n,r,i){if(r||=a.random(64/8),i)var o=l.create({keySize:t+n,hasher:i}).compute(e,r);else var o=l.create({keySize:t+n}).compute(e,r);var s=a.create(o.words.slice(t),n*4);return o.sigBytes=t*4,g.create({key:o,iv:s,salt:r})}},S=r.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:x}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=r.kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var a=y.encrypt.call(this,e,t,i.key,r);return a.mixIn(i),a},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()})})),gr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i,r),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,a=e.slice(t,t+i);n.call(this,e,t,i,r),this._prevBlock=a}});function n(e,t,n,r){var i,a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var o=0;o<n;o++)e[t+o]^=i[o]}return t}(),e.mode.CFB})})),_r=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend();return t.Decryptor=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0);var o=a.slice(0);n.encryptBlock(o,0),a[r-1]=a[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=o[s]}}),t}(),e.mode.CTR})})),vr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function n(e){if((e>>24&255)==255){var t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}function r(e){return(e[0]=n(e[0]))===0&&(e[1]=n(e[1])),e}return t.Decryptor=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),r(o);var s=o.slice(0);n.encryptBlock(s,0);for(var c=0;c<i;c++)e[t+c]^=s[c]}}),t}(),e.mode.CTRGladman})})),yr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend();return t.Decryptor=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._keystream;i&&(a=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(a,0);for(var o=0;o<r;o++)e[t+o]^=a[o]}}),t}(),e.mode.OFB})})),br=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t}(),e.mode.ECB})})),xr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=t*4,i=r-n%r,a=n+i-1;e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},e.pad.Ansix923})})),Sr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.Iso10126={pad:function(t,n){var r=n*4,i=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},e.pad.Iso10126})})),Cr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})})),wr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.ZeroPadding={pad:function(e,t){var n=t*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){for(var t=e.words,n=e.sigBytes-1,n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding})})),Tr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})})),Er=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib.CipherParams,i=n.enc.Hex,a=n.format;a.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return r.create({ciphertext:t})}}})(),e.format.Hex})})),Dr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[];(function(){for(var e=[],t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var n=0,r=0,t=0;t<256;t++){var m=r^r<<1^r<<2^r<<3^r<<4;m=m>>>8^m&255^99,i[n]=m,a[m]=n;var h=e[n],g=e[h],_=e[g],v=e[m]*257^m*16843008;o[n]=v<<24|v>>>8,s[n]=v<<16|v>>>16,c[n]=v<<8|v>>>24,l[n]=v;var v=_*16843009^g*65537^h*257^n*16843008;u[m]=v<<24|v>>>8,d[m]=v<<16|v>>>16,f[m]=v<<8|v>>>24,p[m]=v,n?(n=h^e[e[e[_^h]]],r^=e[e[r]]):n=r=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],h=r.AES=n.extend({_doReset:function(){var e;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var t=this._keyPriorReset=this._key,n=t.words,r=t.sigBytes/4,a=((this._nRounds=r+6)+1)*4,o=this._keySchedule=[],s=0;s<a;s++)s<r?o[s]=n[s]:(e=o[s-1],s%r?r>6&&s%r==4&&(e=i[e>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[e&255]):(e=e<<8|e>>>24,e=i[e>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[e&255],e^=m[s/r|0]<<24),o[s]=o[s-r]^e);for(var c=this._invKeySchedule=[],l=0;l<a;l++){var s=a-l;if(l%4)var e=o[s];else var e=o[s-4];l<4||s<=4?c[l]=e:c[l]=u[i[e>>>24]]^d[i[e>>>16&255]]^f[i[e>>>8&255]]^p[i[e&255]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,c,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,p,a);var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,a,o,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],f=e[t+3]^n[3],p=4,m=1;m<c;m++){var h=r[l>>>24]^i[u>>>16&255]^a[d>>>8&255]^o[f&255]^n[p++],g=r[u>>>24]^i[d>>>16&255]^a[f>>>8&255]^o[l&255]^n[p++],_=r[d>>>24]^i[f>>>16&255]^a[l>>>8&255]^o[u&255]^n[p++],v=r[f>>>24]^i[l>>>16&255]^a[u>>>8&255]^o[d&255]^n[p++];l=h,u=g,d=_,f=v}var h=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[f&255])^n[p++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[l&255])^n[p++],_=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[u&255])^n[p++],v=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[d&255])^n[p++];e[t]=h,e[t+1]=g,e[t+2]=_,e[t+3]=v},keySize:256/32});t.AES=n._createHelper(h)})(),e.AES})})),Or=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.WordArray,i=n.BlockCipher,a=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=o[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){for(var l=i[a]=[],u=c[a],n=0;n<24;n++)l[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;l[0]=l[0]<<1|l[0]>>>31;for(var n=1;n<7;n++)l[n]=l[n]>>>(n-1)*4+3;l[7]=l[7]<<5|l[7]>>>27}for(var d=this._invSubKeys=[],n=0;n<16;n++)d[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],f.call(this,4,252645135),f.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],a=this._lBlock,o=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((o^i[c])&u[c])>>>0];this._lBlock=o,this._rBlock=a^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,f.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function p(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}t.DES=i._createHelper(d);var m=a.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(e.length!==2&&e.length!==4&&e.length<6)throw Error(`Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.`);var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(r.create(t)),this._des2=d.createEncryptor(r.create(n)),this._des3=d.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=i._createHelper(m)})(),e.TripleDES})})),kr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=r.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;for(var i=0,a=0;i<256;i++){var o=i%n,s=t[o>>>2]>>>24-o%4*8&255;a=(a+r[i]+s)%256;var c=r[i];r[i]=r[a],r[a]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:256/32,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){t=(t+1)%256,n=(n+e[t])%256;var a=e[t];e[t]=e[n],e[n]=a,r|=e[(e[t]+e[n])%256]<<24-i*8}return this._i=t,this._j=n,r}t.RC4=n._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});t.RC4Drop=n._createHelper(o)})(),e.RC4})})),Ar=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],a=[],o=[],s=r.Rabbit=n.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=(e[n]<<8|e[n]>>>24)&16711935|(e[n]<<24|e[n]>>>8)&4278255360;var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var n=0;n<4;n++)c.call(this);for(var n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,u=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,d=l>>>16|u&4294901760,f=u<<16|l&65535;i[0]^=l,i[1]^=d,i[2]^=u,i[3]^=f,i[4]^=l,i[5]^=d,i[6]^=u,i[7]^=f;for(var n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=(i[r]<<8|i[r]>>>24)&16711935|(i[r]<<24|i[r]>>>8)&4278255360,e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+ +(t[0]>>>0<a[0]>>>0)|0,t[2]=t[2]+886263092+ +(t[1]>>>0<a[1]>>>0)|0,t[3]=t[3]+1295307597+ +(t[2]>>>0<a[2]>>>0)|0,t[4]=t[4]+3545052371+ +(t[3]>>>0<a[3]>>>0)|0,t[5]=t[5]+886263092+ +(t[4]>>>0<a[4]>>>0)|0,t[6]=t[6]+1295307597+ +(t[5]>>>0<a[5]>>>0)|0,t[7]=t[7]+3545052371+ +(t[6]>>>0<a[6]>>>0)|0,this._b=+(t[7]>>>0<a[7]>>>0);for(var n=0;n<8;n++){var r=e[n]+t[n],i=r&65535,s=r>>>16;o[n]=((i*i>>>17)+i*s>>>15)+s*s^((r&4294901760)*r|0)+((r&65535)*r|0)}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=n._createHelper(s)})(),e.Rabbit})})),jr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],a=[],o=[],s=r.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var i=0;i<4;i++)c.call(this);for(var i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,u=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,d=l>>>16|u&4294901760,f=u<<16|l&65535;r[0]^=l,r[1]^=d,r[2]^=u,r[3]^=f,r[4]^=l,r[5]^=d,r[6]^=u,r[7]^=f;for(var i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=(i[r]<<8|i[r]>>>24)&16711935|(i[r]<<24|i[r]>>>8)&4278255360,e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+ +(t[0]>>>0<a[0]>>>0)|0,t[2]=t[2]+886263092+ +(t[1]>>>0<a[1]>>>0)|0,t[3]=t[3]+1295307597+ +(t[2]>>>0<a[2]>>>0)|0,t[4]=t[4]+3545052371+ +(t[3]>>>0<a[3]>>>0)|0,t[5]=t[5]+886263092+ +(t[4]>>>0<a[4]>>>0)|0,t[6]=t[6]+1295307597+ +(t[5]>>>0<a[5]>>>0)|0,t[7]=t[7]+3545052371+ +(t[6]>>>0<a[6]>>>0)|0,this._b=+(t[7]>>>0<a[7]>>>0);for(var n=0;n<8;n++){var r=e[n]+t[n],i=r&65535,s=r>>>16;o[n]=((i*i>>>17)+i*s>>>15)+s*s^((r&4294901760)*r|0)+((r&65535)*r|0)}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=n._createHelper(s)})(),e.RabbitLegacy})})),Mr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.BlockCipher,r=t.algo;let i=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var o={pbox:[],sbox:[]};function s(e,t){let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=t&255,o=e.sbox[0][n]+e.sbox[1][r];return o^=e.sbox[2][i],o+=e.sbox[3][a],o}function c(e,t,n){let r=t,i=n,a;for(let t=0;t<16;++t)r^=e.pbox[t],i=s(e,r)^i,a=r,r=i,i=a;return a=r,r=i,i=a,i^=e.pbox[16],r^=e.pbox[17],{left:r,right:i}}function l(e,t,n){let r=t,i=n,a;for(let t=17;t>1;--t)r^=e.pbox[t],i=s(e,r)^i,a=r,r=i,i=a;return a=r,r=i,i=a,i^=e.pbox[1],r^=e.pbox[0],{left:r,right:i}}function u(e,t,n){for(let t=0;t<4;t++){e.sbox[t]=[];for(let n=0;n<256;n++)e.sbox[t][n]=a[t][n]}let r=0;for(let a=0;a<18;a++)e.pbox[a]=i[a]^t[r],r++,r>=n&&(r=0);let o=0,s=0,l=0;for(let t=0;t<18;t+=2)l=c(e,o,s),o=l.left,s=l.right,e.pbox[t]=o,e.pbox[t+1]=s;for(let t=0;t<4;t++)for(let n=0;n<256;n+=2)l=c(e,o,s),o=l.left,s=l.right,e.sbox[t][n]=o,e.sbox[t][n+1]=s;return!0}var d=r.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words;u(o,t,e.sigBytes/4)}},encryptBlock:function(e,t){var n=c(o,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=l(o,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(d)})(),e.Blowfish})})),Nr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n(),er(),tr(),nr(),rr(),ir(),ar(),or(),sr(),cr(),lr(),ur(),dr(),fr(),pr(),mr(),hr(),gr(),_r(),vr(),yr(),br(),xr(),Sr(),Cr(),wr(),Tr(),Er(),Dr(),Or(),kr(),Ar(),jr(),Mr()):typeof define==`function`&&define.amd?define(`./core,./x64-core,./lib-typedarrays,./enc-utf16,./enc-base64,./enc-base64url,./md5,./sha1,./sha256,./sha224,./sha512,./sha384,./sha3,./ripemd160,./hmac,./pbkdf2,./evpkdf,./cipher-core,./mode-cfb,./mode-ctr,./mode-ctr-gladman,./mode-ofb,./mode-ecb,./pad-ansix923,./pad-iso10126,./pad-iso97971,./pad-zeropadding,./pad-nopadding,./format-hex,./aes,./tripledes,./rc4,./rabbit,./rabbit-legacy,./blowfish`.split(`,`),r):n.CryptoJS=r(n.CryptoJS)})(e,function(e){return e})})),Pr=a(((e,t)=>{t.exports=n;function n(e,t){for(var n=Array(arguments.length-1),r=0,i=2,a=!0;i<arguments.length;)n[r++]=arguments[i++];return new Promise(function(i,o){n[r]=function(e){if(a)if(a=!1,e)o(e);else{for(var t=Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];i.apply(null,t)}};try{e.apply(t||null,n)}catch(e){a&&(a=!1,o(e))}})}})),Fr=a((e=>{var t=e;t.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&e.charAt(t)===`=`;)++n;return Math.ceil(e.length*3)/4-n};for(var n=Array(64),r=Array(123),i=0;i<64;)r[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;t.encode=function(e,t,r){for(var i=null,a=[],o=0,s=0,c;t<r;){var l=e[t++];switch(s){case 0:a[o++]=n[l>>2],c=(l&3)<<4,s=1;break;case 1:a[o++]=n[c|l>>4],c=(l&15)<<2,s=2;break;case 2:a[o++]=n[c|l>>6],a[o++]=n[l&63],s=0;break}o>8191&&((i||=[]).push(String.fromCharCode.apply(String,a)),o=0)}return s&&(a[o++]=n[c],a[o++]=61,s===1&&(a[o++]=61)),i?(o&&i.push(String.fromCharCode.apply(String,a.slice(0,o))),i.join(``)):String.fromCharCode.apply(String,a.slice(0,o))};var a=`invalid encoding`;t.decode=function(e,t,n){for(var i=n,o=0,s,c=0;c<e.length;){var l=e.charCodeAt(c++);if(l===61&&o>1)break;if((l=r[l])===void 0)throw Error(a);switch(o){case 0:s=l,o=1;break;case 1:t[n++]=s<<2|(l&48)>>4,s=l,o=2;break;case 2:t[n++]=(s&15)<<4|(l&60)>>2,s=l,o=3;break;case 3:t[n++]=(s&3)<<6|l,o=0;break}}if(o===1)throw Error(a);return n-i},t.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}})),Ir=a(((e,t)=>{t.exports=n;function n(){this._listeners={}}n.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},n.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}})),Lr=a(((e,t)=>{t.exports=n(n);function n(e){return typeof Float32Array<`u`?(function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=n[3]===128;function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3]}function a(e,r,i){t[0]=e,r[i]=n[3],r[i+1]=n[2],r[i+2]=n[1],r[i+3]=n[0]}e.writeFloatLE=r?i:a,e.writeFloatBE=r?a:i;function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.readFloatLE=r?o:s,e.readFloatBE=r?s:o})():(function(){function t(e,t,n,r){var i=+(t<0);if(i&&(t=-t),t===0)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var a=Math.floor(Math.log(t)/Math.LN2),o=Math.round(t*2**-a*8388608)&8388607;e((i<<31|a+127<<23|o)>>>0,n,r)}}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,i);function n(e,t,n){var r=e(t,n),i=(r>>31)*2+1,a=r>>>23&255,o=r&8388607;return a===255?o?NaN:i*(1/0):a===0?i*1401298464324817e-60*o:i*2**(a-150)*(o+8388608)}e.readFloatLE=n.bind(null,a),e.readFloatBE=n.bind(null,o)})(),typeof Float64Array<`u`?(function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=n[7]===128;function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3],r[i+4]=n[4],r[i+5]=n[5],r[i+6]=n[6],r[i+7]=n[7]}function a(e,r,i){t[0]=e,r[i]=n[7],r[i+1]=n[6],r[i+2]=n[5],r[i+3]=n[4],r[i+4]=n[3],r[i+5]=n[2],r[i+6]=n[1],r[i+7]=n[0]}e.writeDoubleLE=r?i:a,e.writeDoubleBE=r?a:i;function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.readDoubleLE=r?o:s,e.readDoubleBE=r?s:o})():(function(){function t(e,t,n,r,i,a){var o=+(r<0);if(o&&(r=-r),r===0)e(0,i,a+t),e(1/r>0?0:2147483648,i,a+n);else if(isNaN(r))e(0,i,a+t),e(2146959360,i,a+n);else if(r>17976931348623157e292)e(0,i,a+t),e((o<<31|2146435072)>>>0,i,a+n);else{var s;if(r<22250738585072014e-324)s=r/5e-324,e(s>>>0,i,a+t),e((o<<31|s/4294967296)>>>0,i,a+n);else{var c=Math.floor(Math.log(r)/Math.LN2);c===1024&&(c=1023),s=r*2**-c,e(s*4503599627370496>>>0,i,a+t),e((o<<31|c+1023<<20|s*1048576&1048575)>>>0,i,a+n)}}}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,i,4,0);function n(e,t,n,r,i){var a=e(r,i+t),o=e(r,i+n),s=(o>>31)*2+1,c=o>>>20&2047,l=4294967296*(o&1048575)+a;return c===2047?l?NaN:s*(1/0):c===0?s*5e-324*l:s*2**(c-1075)*(l+4503599627370496)}e.readDoubleLE=n.bind(null,a,0,4),e.readDoubleBE=n.bind(null,o,4,0)})(),e}function r(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function i(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=e&255}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}})),Rr=a(((t,n)=>{n.exports=r;function r(t){try{if(typeof e!=`function`)return null;var n=e(t);return n&&(n.length||Object.keys(n).length)?n:null}catch{return null}}})),zr=a((e=>{var t=e,n=`�`;t.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)n=e.charCodeAt(r),n<128?t+=1:n<2048?t+=2:(n&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320?(++r,t+=4):t+=3;return t},t.read=function(e,t,r){if(r-t<1)return``;for(var i=``,a=t;a<r;){var o=e[a++];if(o<=127)i+=String.fromCharCode(o);else if(o>=192&&o<224){var s=(o&31)<<6|e[a++]&63;i+=s>=128?String.fromCharCode(s):n}else if(o>=224&&o<240){var c=(o&15)<<12|(e[a++]&63)<<6|e[a++]&63;i+=c>=2048?String.fromCharCode(c):n}else if(o>=240){var l=(o&7)<<18|(e[a++]&63)<<12|(e[a++]&63)<<6|e[a++]&63;l<65536||l>1114111?i+=n:(l-=65536,i+=String.fromCharCode(55296+(l>>10)),i+=String.fromCharCode(56320+(l&1023)))}}return i},t.write=function(e,t,n){for(var r=n,i,a,o=0;o<e.length;++o)i=e.charCodeAt(o),i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&((a=e.charCodeAt(o+1))&64512)==56320?(i=65536+((i&1023)<<10)+(a&1023),++o,t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128);return n-r}})),Br=a(((e,t)=>{t.exports=n;function n(e,t,n){var r=n||8192,i=r>>>1,a=null,o=r;return function(n){if(n<1||n>i)return e(n);o+n>r&&(a=e(r),o=0);var s=t.call(a,o,o+=n);return o&7&&(o=(o|7)+1),s}}})),Vr=`cosmiframe`,Hr=`cosmiframe_keystorechange`,Ur=class{_mutable;actions;_env;logger;constructor(){this._mutable={state:H.Init}}get env(){return this._env}setEnv(e){this._env=e}setActions=e=>{this.actions=e};get isMobile(){return this.env?.device===`mobile`}get mutable(){return this._mutable}get state(){return this.mutable.state}get isInit(){return this.state===`Init`}get isDone(){return this.state===`Done`}get isError(){return this.state===`Error`}get isPending(){return this.state===`Pending`}get data(){return this.mutable.data}get message(){return this.mutable.message}setState(e){this.logger?.debug(`[State Change] ${this.state} (${this.walletStatus}) -> ${e} (${this.chainName}/${this.walletName})`),this._mutable.state=e,this.actions?.state?.(e)}setData(e){this._mutable.data=e,this.actions?.data?.(e)}setMessage(e){this.logger?.debug(`[Message Set] ${e} (${this.chainName}/${this.walletName})`),this._mutable.message=e,this.actions?.message?.(e)}reset(){this.setData(void 0),this.setMessage(void 0),this.setState(H.Init)}get walletStatus(){return Dn(this.state,this.message)}get isWalletOnceConnect(){return this.isWalletConnected||this.isWalletError}get isWalletConnecting(){return this.walletStatus===`Connecting`}get isWalletConnected(){return this.walletStatus===`Connected`}get isWalletDisconnected(){return this.walletStatus===`Disconnected`}get isWalletRejected(){return this.walletStatus===`Rejected`}get isWalletNotExist(){return this.walletStatus===`NotExist`}get isWalletError(){return this.walletStatus===`Error`}},Wr=class extends Ur{clientMutable={state:H.Init};emitter;_walletInfo;callbacks;session;walletConnectOptions;isActive=!1;throwErrors=!1;constructor(e){super(),this._walletInfo=e}get appUrl(){return this.client?.appUrl}get qrUrl(){return this.client?.qrUrl}activate(){this.isActive=!0}inactivate(){this.isActive=!1}get client(){return this.clientMutable?.data}initingClient(){this.clientMutable.state=H.Pending,this.clientMutable.message=void 0,this.clientMutable.data=void 0}initClientDone(e){this.clientMutable.data=e,this.clientMutable.state=H.Done,this.clientMutable.message=void 0}initClientError(e){this.logger?.error(`${this.walletPrettyName} initClientError: ${e?.message}`),this.clientMutable.message=e?.message,this.clientMutable.state=H.Error,this.isModeExtension?this.setClientNotExist():this.setError(`InitClientError: ${e.message}`)}get walletInfo(){return this._walletInfo}get isModeExtension(){return this.walletInfo.mode===`extension`}get isModeWalletConnect(){return this.walletInfo.mode===`wallet-connect`}get downloadInfo(){let e=this.walletInfo.downloads||[];return e=e.filter(e=>e.device===this.env?.device||!e.device),e.length===1||(e=e.filter(e=>e.os===this.env?.os||!e.os),e.length===1)||(e=e.filter(e=>e.browser===this.env?.browser||!e.browser)),e[0]}get walletName(){return this.walletInfo.name}get walletPrettyName(){return this.walletInfo.prettyName}get rejectMessageSource(){return typeof this.walletInfo.rejectMessage==`string`?this.walletInfo.rejectMessage:this.walletInfo.rejectMessage?.source}get rejectMessageTarget(){if(typeof this.walletInfo.rejectMessage!=`string`)return this.walletInfo.rejectMessage?.target}get rejectCode(){return this.walletInfo.rejectCode}rejectMatched(e){return this.rejectMessageSource&&e.message===this.rejectMessageSource||this.rejectCode&&e.code===this.rejectCode}updateCallbacks(e){this.callbacks={...this.callbacks,...e}}_disconnect=async(e,t)=>{await this.callbacks?.beforeDisconnect?.(),await this.client?.disconnect?.(t),this.clientMutable.state!==H.Error&&this.reset(),this.walletName!==`cosmiframe`&&window.localStorage.removeItem(`cosmos-kit@2:core//current-wallet`),e&&(this.emitter?.emit(`sync_disconnect`,this.chainName),this.logger?.debug("[WALLET EVENT] Emit `sync_disconnect`")),await this.callbacks?.afterDisconnect?.()};disconnect=async(e,t)=>{await this._disconnect(e,t)};setClientNotExist(e){let t=e===void 0?Error():e;t.message=jn.message,this.setError(t)}setRejected(e){let t=e===void 0?Error():e;t.message=Mn.message,this.setError(t)}setError(e){let t=typeof e==`string`||e===void 0?Error(e):e;if(this.setState(H.Error),this.setMessage(t.message),this.throwErrors===!0||this.throwErrors===`connect_only`&&t.name===`ConnectError`)throw t}connect=async e=>{await this.callbacks?.beforeConnect?.();let t=typeof this.walletInfo.mobileDisabled==`boolean`?this.walletInfo.mobileDisabled:this.walletInfo.mobileDisabled();if(this.isMobile&&t){this.setError(new wn(`This wallet is not supported on mobile, please use desktop browsers.`));return}e&&(this.emitter?.emit(`sync_connect`,this.chainName),this.logger?.debug(`[Event Emit] \`sync_connect\` (${this.chainName}/${this.walletName})`));try{if(!this.client&&(this.setState(H.Pending),this.setMessage(`InitClient`),await this.initClient(this.walletInfo.mode===`wallet-connect`?this.walletConnectOptions:void 0),this.emitter?.emit(`broadcast_client`,this.client),this.logger?.debug("[WALLET EVENT] Emit `broadcast_client`"),!this.client)){this.setClientNotExist(new wn);return}await this.update()}catch(e){this.setError(new wn(e.message))}await this.callbacks?.afterConnect?.()}},Gr=class extends Wr{mainWallet;chainRecord;_rpcEndpoint;_restEndpoint;connectChains;offlineSigner;namespace=`cosmos`;preferredSignType;constructor(e,t){super(e),this.chainRecord=t,this.preferredSignType=t.clientOptions?.preferredSignType||`amino`}get chain(){return this.chainRecord.chain}get assetList(){return this.chainRecord.assetList}get isTestNet(){return this.chainName.includes(`testnet`)}get preferredEndpoints(){return this.chainRecord.preferredEndpoints}get rpcEndpoints(){return this.preferredEndpoints?.rpc||[]}get restEndpoints(){return this.preferredEndpoints?.rest||[]}get isLazy(){return this.preferredEndpoints.isLazy}addEndpoints(e){this.chainRecord.preferredEndpoints={isLazy:e?.isLazy??this.preferredEndpoints?.isLazy,rpc:[...e?.rpc||[],...this.preferredEndpoints?.rpc||[]],rest:[...e?.rest||[],...this.preferredEndpoints?.rest||[]]}}get chainName(){return this.chainRecord.name}get chainLogoUrl(){return this.assetList?.assets[0]?.logo_URIs?.svg||this.assetList?.assets[0]?.logo_URIs?.png||void 0}get stargateOptions(){return this.chainRecord.clientOptions?.stargate}get signingStargateOptions(){return this.chainRecord.clientOptions?.signingStargate||this.chainRecord.clientOptions?.stargate}get signingCosmwasmOptions(){return this.chainRecord.clientOptions?.signingCosmwasm}get assets(){return this.assetList?.assets}get chainId(){return this.chain?.chain_id}get cosmwasmEnabled(){return this.chain?.codebase?.cosmwasm_enabled}get username(){return this.data?.username}get address(){return this.data?.address}setData(e){this.logger?.debug(`[Data Change] ${JSON.stringify(this.data)} -> ${JSON.stringify(e)} (${this.chainName}/${this.walletName})`),this._mutable.data=e,this.actions?.data?.(e);let t=window.localStorage.getItem(`cosmos-kit@2:core//accounts`),n=t?JSON.parse(t):[];e===void 0?n=n.filter(e=>e.chainId!==this.chainId||e.namespace!==this.namespace):(n=n.filter(e=>e.chainId!==this.chainId||e.namespace!==this.namespace),n.push(e)),window?.localStorage.setItem(`cosmos-kit@2:core//accounts`,JSON.stringify(n)),this.session?.update()}initClient(e){throw Error(`initClient not implemented`)}async update(e={connect:!0}){this.setState(H.Pending),this.setMessage(void 0);try{e.connect&&(this.connectChains?await this.connectChains():await this?.client?.connect?.(this.chainId));let t;try{this.logger?.debug(`Fetching ${this.walletName} ${this.chainId} account.`),t=await this?.client?.getSimpleAccount(this.chainId)}catch(e){if(this.rejectMatched(e)){this.logger?.debug(`Fetching rejected.`),this.setRejected(new wn);return}if(this.client&&this?.client?.addChain)this.logger?.debug(`Going to add chain ${this.chainId}`),await this.client.addChain(this.chainRecord),t=await this.client.getSimpleAccount(this.chainId);else throw e}this.setData(t),this.setState(H.Done),this.setMessage(void 0)}catch(e){e&&this.rejectMatched(e)?this.setRejected(new wn):this.setError(new wn(e.message))}!this.isWalletRejected&&this.walletName!==`cosmiframe`&&window?.localStorage.setItem(`cosmos-kit@2:core//current-wallet`,this.walletName)}getRpcEndpoint=async e=>{let{getIsLazy:t}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=t(void 0,this.isLazy,this._rpcEndpoint?.isLazy,e,this.logger);if(n)return this._rpcEndpoint||this.rpcEndpoints[0]||Promise.reject(`No endpoint available.`);let{isValidEndpoint:r}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);if(this._rpcEndpoint&&await r(this._rpcEndpoint,`rpc`,n,this.logger))return this._rpcEndpoint;let{getFastestEndpoint:i}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);return this._rpcEndpoint=await i(this.rpcEndpoints,`rpc`,this.logger),this._rpcEndpoint};getRestEndpoint=async e=>{let{getIsLazy:t}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=t(void 0,this.isLazy,this._restEndpoint?.isLazy,e,this.logger);if(n)return this._restEndpoint||this.restEndpoints[0]||Promise.reject(`No endpoint available.`);let r=`rest`,{isValidEndpoint:i}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);if(this._restEndpoint&&await i(this._restEndpoint,r,n,this.logger))return this._restEndpoint;let{getFastestEndpoint:a}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);return this._restEndpoint=await a(this.restEndpoints,r,this.logger),this._restEndpoint};getStargateClient=async()=>{let e=await this.getRpcEndpoint(),{StargateClient:t}=await import(`./build-BMMgmQqw.js`).then(e=>i(e.t()));return t.connect(e,this.stargateOptions)};getCosmWasmClient=async()=>{let e=await this.getRpcEndpoint(),{CosmWasmClient:t}=await import(`./build-BNPMa-vT.js`).then(e=>i(e.default));return t.connect(e)};getNameService=async()=>{let e=await this.getCosmWasmClient(),{getNameServiceRegistryFromChainName:t}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=t(this.chainName),{NameService:r}=await import(`./name-service-DjQ9v_M-.js`).then(e=>e.t);return new r(e,n)};async initOfflineSigner(e){if(this.client===void 0)throw Error(`WalletClient is not initialized`);e&&(this.preferredSignType=e),this.offlineSigner=await this.client.getOfflineSigner(this.chainId,this.preferredSignType)}getSigningStargateClient=async()=>{let e=await this.getRpcEndpoint();this.offlineSigner||await this.initOfflineSigner();let{SigningStargateClient:t}=await import(`./build-BMMgmQqw.js`).then(e=>i(e.t()));return t.connectWithSigner(e,this.offlineSigner,this.signingStargateOptions)};getSigningCosmWasmClient=async()=>{let e=await this.getRpcEndpoint();this.offlineSigner||await this.initOfflineSigner();let{SigningCosmWasmClient:t}=await import(`./build-BNPMa-vT.js`).then(e=>i(e.default));return t.connectWithSigner(e,this.offlineSigner,this.signingCosmwasmOptions)};getSigningClient=async e=>{switch(e){case`stargate`:return await this.getSigningStargateClient();case`cosmwasm`:return await this.getSigningCosmWasmClient();default:return this.getSigningStargateClient()}};estimateFee=async(e,t,n,r)=>{if(!this.address)throw Error(`Address is required to estimate fee. Try connect to fetch address.`);let a;switch(t){case`stargate`:a=this.signingStargateOptions?.gasPrice;break;case`cosmwasm`:a=this.signingCosmwasmOptions?.gasPrice;break;default:a=this.signingStargateOptions?.gasPrice;break}if(!a)throw Error(`Gas price must be set in the client options when auto gas is used.`);let o=await(await this.getSigningClient(t)).simulate(this.address,e,n),{calculateFee:s}=await import(`./build-BMMgmQqw.js`).then(e=>i(e.t()));return s(Math.round(o*(r||1.4)),a)};sign=async(e,t,n,r)=>{if(!this.address)throw Error(`Address is required to estimate fee. Try connect to fetch address.`);let i=await this.getSigningClient(r),a;return a=t===void 0||typeof t==`number`?await this.estimateFee(e,r,n,t):t,await i.sign(this.address,e,a,n||``)};broadcast=async(e,t)=>{let n=await this.getSigningClient(t),{TxRaw:r}=await import(`./tx-C-_PyHR9.js`).then(e=>i(e.default)),a=r.encode(e).finish(),o,s;switch(t){case`stargate`:o=this.signingStargateOptions?.broadcastTimeoutMs,s=this.signingStargateOptions?.broadcastPollIntervalMs;break;case`cosmwasm`:o=this.signingCosmwasmOptions?.broadcastTimeoutMs,s=this.signingCosmwasmOptions?.broadcastPollIntervalMs;break;default:o=this.signingStargateOptions?.broadcastTimeoutMs,s=this.signingStargateOptions?.broadcastPollIntervalMs;break}return n.broadcastTx(a,o,s)};signAndBroadcast=async(e,t,n,r)=>{let i=await this.sign(e,t,n,r);return this.broadcast(i,r)}},Kr=i(I()),qr=class extends Wr{_chainWalletMap;preferredEndpoints;ChainWallet;constructor(e,t){super(e),this.ChainWallet=t,this.emitter=new Kr.default,this.emitter.on(`broadcast_client`,e=>{this.logger?.debug(`[Event Fired] \`broadcast_client\` (${this.walletName})`),this.chainWalletMap?.forEach(t=>{t.initClientDone(e)})}),this.emitter.on(`broadcast_env`,e=>{this.logger?.debug(`[Event Fired] \`broadcast_env\` (${this.walletName})`),this.chainWalletMap?.forEach(t=>{t.setEnv(e)})}),this.emitter.on(`sync_connect`,async e=>{this.logger?.debug(`[Event Fired] \`sync_connect\` (${this.walletName})`),await this.connectAll(!0,e),this.update()}),this.emitter.on(`sync_disconnect`,async e=>{this.logger?.debug(`[Event Fired] \`sync_disconnect\` (${this.walletName})`),await this.disconnectAll(!0,e),this.reset()}),this.emitter.on(`reset`,e=>{this.logger?.debug(`[Event Fired] \`reset\` (${this.walletName})`),e.forEach(e=>Array.from(this.chainWalletMap.values()).find(t=>t.chainId===e)?.reset())})}initingClient(){this.clientMutable.state=H.Pending,this.clientMutable.message=void 0,this.clientMutable.data=void 0,this.actions?.clientState?.(H.Pending),this.actions?.clientMessage?.(void 0),this.chainWalletMap?.forEach(e=>{e.initingClient()})}initClientDone(e){this.clientMutable.data=e,this.clientMutable.state=H.Done,this.clientMutable.message=void 0,this.actions?.clientState?.(H.Done),this.actions?.clientMessage?.(void 0),this.chainWalletMap?.forEach(t=>{t.initClientDone(e)})}initClientError(e){if(this.clientMutable.message=e?.message,this.clientMutable.state=H.Error,this.actions?.clientState?.(H.Error),this.actions?.clientMessage?.(e?.message),this.chainWalletMap?.forEach(t=>{t.initClientError(e)}),this.throwErrors===!0)throw Error(this.clientMutable.message)}onSetChainsDone(){}makeFinalEndpoints(e){let t=e.name.includes(`testnet`);return{isLazy:e.preferredEndpoints?.isLazy,rpc:[...e.preferredEndpoints?.rpc||[],...this.preferredEndpoints?.[e.name]?.rpc||[],...e.chain?.apis?.rpc?.map(e=>e.address)||[],t?`https://rpc.testcosmos.directory/${e.name}`:`https://rpc.cosmos.directory/${e.name}`],rest:[...e.preferredEndpoints?.rest||[],...this.preferredEndpoints?.[e.name]?.rest||[],...e.chain?.apis?.rest?.map(e=>e.address)||[],t?`https://rest.testcosmos.directory/${e.name}`:`https://rest.cosmos.directory/${e.name}`]}}addEnpoints(e){this.getChainWalletList(!1).forEach(t=>{t.addEndpoints(e[t.chainName])})}setChains(e,t=!0){(t||!this._chainWalletMap)&&(this._chainWalletMap=new Map),e.forEach(e=>{let t=new this.ChainWallet(this.walletInfo,{...e,preferredEndpoints:this.makeFinalEndpoints(e)});t.mainWallet=this,t.emitter=this.emitter,t.logger=this.logger,t.throwErrors=this.throwErrors,t.session=this.session,t.walletConnectOptions=this.walletConnectOptions,t.initClient=this.initClient,this._chainWalletMap.set(e.name,t)}),this.onSetChainsDone()}get chainWalletMap(){return this._chainWalletMap}getChainWallet=e=>this.chainWalletMap?.get(e);getChainWalletList=(e=!0)=>{let t=Array.from(this.chainWalletMap.values());return e?t.filter(e=>e.isActive):t};getGlobalStatusAndMessage=(e=!0)=>{let t=this.getChainWalletList(e),n=t.find(e=>e.isWalletNotExist);return n?[n.walletStatus,n.message]:(n=t.find(e=>e.isWalletConnecting),n?[Cn.Connecting,void 0]:(n=t.find(e=>e.isWalletDisconnected),n?[Cn.Disconnected,`Exist disconnected wallets`]:(n=t.find(e=>e.isError||e.isWalletRejected),n?[n.walletStatus,n.message]:[Cn.Connected,void 0])))};async update(){if(this.walletStatus===`NotExist`)return window.localStorage.removeItem(`cosmos-kit@2:core//current-wallet`);this.setData(void 0),this.setMessage(void 0),this.setState(H.Done),this.activate(),this.walletName!==`cosmiframe`&&window?.localStorage.setItem(`cosmos-kit@2:core//current-wallet`,this.walletName)}reset(){this.setData(void 0),this.setMessage(void 0),this.setState(H.Init),this.inactivate()}async connectAll(e=!0,t){let n=this.getChainWalletList(e);if(!(n.length>0&&n.every(e=>e.isModeWalletConnect&&e.connectChains)))for(let e of n)e.chainName!==t&&await e.connect()}async disconnectAll(e=!0,t,n){let r=this.getChainWalletList(e);for(let e of r)e.chainName!==t&&await e.disconnect(!1,n)}},Jr=class extends Gr{constructor(e,t){super(e,t)}},Yr=class{cosmiframe;constructor(e){this.cosmiframe=e}async getSimpleAccount(...e){return await this.cosmiframe.p.getSimpleAccount(...e)}async connect(...e){return await this.cosmiframe.p.connect(...e)}async enable(...e){await this.cosmiframe.p.enable(...e)}async suggestToken(...e){await this.cosmiframe.p.suggestToken(...e)}async addChain(...e){let t=e[0];t&&`clientOptions`in t&&(t={...t,clientOptions:{}},e[0]=t),await this.cosmiframe.p.addChain(...e)}async getAccount(...e){return await this.cosmiframe.p.getAccount(...e)}getOfflineSigner(e,t){return t===`direct`?this.getOfflineSignerDirect(e):this.getOfflineSignerAmino(e)}getOfflineSignerAmino(e){return this.cosmiframe.getOfflineSignerAmino(e)}getOfflineSignerDirect(e){return this.cosmiframe.getOfflineSignerDirect(e)}async sign(...e){return await this.cosmiframe.p.sign(...e)}async signAmino(...e){return await this.cosmiframe.p.signAmino(...e)}async signDirect(...e){return await this.cosmiframe.p.signDirect(...e)}async signArbitrary(...e){return await this.cosmiframe.p.signArbitrary(...e)}async getEnigmaPubKey(...e){return await this.cosmiframe.p.getEnigmaPubKey(...e)}async getEnigmaTxEncryptionKey(...e){return await this.cosmiframe.p.getEnigmaTxEncryptionKey(...e)}async enigmaEncrypt(...e){return await this.cosmiframe.p.enigmaEncrypt(...e)}async enigmaDecrypt(...e){return await this.cosmiframe.p.enigmaDecrypt(...e)}async sendTx(...e){return await this.cosmiframe.p.sendTx(...e)}},Xr=Object.defineProperty,Zr=(e,t,n)=>t in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qr=(e,t)=>Xr(e,`name`,{value:t,configurable:!0}),$r=(e,t,n)=>(Zr(e,typeof t==`symbol`?t:t+``,n),n),ei=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},ti=(e,t,n)=>(ei(e,t,`read from private field`),n?n.call(e):t.get(e)),ni=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},ri=(e,t,n,r)=>(ei(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ii=class extends Error{constructor(e){super(e),this.name=`CosmiframeTimeoutError`}};Qr(ii,`CosmiframeTimeoutError`);var ai=ii,oi=Qr((e,t,n)=>new Promise((r,i)=>{let a=null,o=In(),s=Qr(({origin:e,source:n,data:c})=>{!li(t,e)||n!==window.parent||c.id!==o||(window.removeEventListener(`message`,s),a!==null&&clearTimeout(a),c.type===`success`?r({result:c.response,origin:e}):i(Error(c.error)))},`listener`);window.addEventListener(`message`,s);try{let t={...e,id:o};window.parent.postMessage(t,`*`)}catch(e){window.removeEventListener(`message`,s),i(e)}n&&(a=setTimeout(()=>{window.removeEventListener(`message`,s),i(new ai(`Timed out after ${n}ms waiting for parent to respond.`))},n))}),`callParentMethod`),si=Qr(e=>{if(!e||e.type===`error`)return{type:`error`,error:e&&e.type===`error`&&e.error||`Handled by outer wallet.`};if(e.type===`success`)return{type:`success`,response:e.value}},`processOverrideHandler`),ci=Qr(()=>typeof window<`u`&&window.self!==window.parent,`isInIframe`),li=Qr((e,t)=>e.some(e=>e===`*`||typeof e==`string`&&t===e||e instanceof RegExp&&e.test(t)),`isOriginAllowed`),ui,di=class{constructor(e,t){$r(this,`chainId`),ni(this,ui,void 0),this.chainId=e,ri(this,ui,t)}async getAccounts(){return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`direct`},ti(this,ui))).result}async signDirect(e,t){return(await oi({method:`signDirect`,params:[e,t],chainId:this.chainId,signerType:`direct`},ti(this,ui))).result}};ui=new WeakMap,Qr(di,`CosmiframeDirectSigner`);var fi=di,pi,mi=class{constructor(e,t){$r(this,`chainId`),ni(this,pi,void 0),this.chainId=e,ri(this,pi,t)}async getAccounts(){return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`amino`},ti(this,pi))).result}async signAmino(e,t){return(await oi({method:`signAmino`,params:[e,t],chainId:this.chainId,signerType:`amino`},ti(this,pi))).result}};pi=new WeakMap,Qr(mi,`CosmiframeAminoSigner`);var hi=mi,gi,_i=class{constructor(e,t){$r(this,`chainId`),ni(this,gi,void 0),this.chainId=e,ri(this,gi,t)}async getAccounts(){try{return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`amino`},ti(this,gi))).result}catch{return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`direct`},ti(this,gi))).result}}async signDirect(e,t){return(await oi({method:`signDirect`,params:[e,t],chainId:this.chainId,signerType:`direct`},ti(this,gi))).result}async signAmino(e,t){return(await oi({method:`signAmino`,params:[e,t],chainId:this.chainId,signerType:`amino`},ti(this,gi))).result}};gi=new WeakMap,Qr(_i,`CosmiframeEitherSigner`);var vi=_i,yi;(function(e){e.IsCosmiframe=`isCosmiframe`,e.GetMetadata=`getMetadata`})(yi||={});var bi,xi=class{constructor(e){if(ni(this,bi,void 0),$r(this,`p`),!e.length)throw Error(`You must explicitly allow parent origins.`);if(e.includes(`*`))throw Error("It is very unsafe to allow all origins because a controlling app has the power to manipulate messages before they are signed. If you really want to do this, pass in `UNSAFE_ALLOW_ANY_ORIGIN`.");ri(this,bi,e.includes(`UNSAFE_ALLOW_ANY_ORIGIN`)?[`*`]:[...e]),this.p=new Proxy({getEnigmaUtils:e=>({getPubkey:()=>this.p.getEnigmaPubKey(e),decrypt:(...t)=>this.p.enigmaDecrypt(e,...t),encrypt:(...t)=>this.p.enigmaEncrypt(e,...t),getTxEncryptionKey:(...t)=>this.p.getEnigmaTxEncryptionKey(e,...t)})},{get:(e,t)=>t in e&&typeof e[t]!=`function`?e[t]:(...n)=>t in e&&typeof e[t]==`function`?e[t](...n):this.callParentMethod({method:t.toString(),params:n}).then(({result:e})=>e)})}callParentMethod(e,t){return oi(e,ti(this,bi),t)}async isReady(){if(!ci())return!1;try{let{origin:e,result:t}=await this.callParentMethod({internal:!0,method:yi.IsCosmiframe,params:[]},500);return e||t}catch(e){if(e instanceof ai)return!1;throw e}}async getMetadata(){return(await this.callParentMethod({internal:!0,method:yi.GetMetadata,params:[]},500)).result}getKeplrClient(){let e=new Proxy({version:`cosmiframe`,mode:`extension`,defaultOptions:{},getOfflineSigner:this.getOfflineSigner.bind(this),getOfflineSignerOnlyAmino:this.getOfflineSignerAmino.bind(this),getOfflineSignerAuto:e=>Promise.resolve(this.getOfflineSigner(e)),getEnigmaUtils:t=>({getPubkey:()=>e.getEnigmaPubKey(t),decrypt:(...n)=>e.enigmaDecrypt(t,...n),encrypt:(...n)=>e.enigmaEncrypt(t,...n),getTxEncryptionKey:(...n)=>e.getEnigmaTxEncryptionKey(t,...n)})},{get:(e,t)=>t in e&&typeof e[t]!=`function`?e[t]:(...n)=>t in e&&typeof e[t]==`function`?e[t](...n):this.callParentMethod({method:t.toString(),params:n}).then(({result:e})=>e)});return e}getOfflineSigner(e){return new vi(e,ti(this,bi))}getOfflineSignerAmino(e){return new hi(e,ti(this,bi))}getOfflineSignerDirect(e){return new fi(e,ti(this,bi))}static listen(e){let{iframe:t,target:n,getOfflineSignerDirect:r,getOfflineSignerAmino:i,nonSignerOverrides:a,signerOverrides:o,origins:s,metadata:c}=e,l=s?.length?s:[`*`],u={[yi.IsCosmiframe]:()=>!0,[yi.GetMetadata]:()=>c||null},d=Qr(async({source:e,origin:s,data:c})=>{if(!t.contentWindow)throw Error(`Iframe contentWindow does not exist.`);if(e!==t.contentWindow||!li(l,s)||!c||typeof c!=`object`||!(`id`in c)||!(`method`in c)||!(`params`in c))return;let{id:d,params:f,chainId:p,signType:m,internal:h}=c,{method:g,signerType:_}=c;_||=m,g=g.replace(/^signer:/,``);let v;try{if(h){if(typeof u[g]!=`function`)throw Error(`Unknown internal method: ${g}`);v={type:`success`,response:await u[g](...f)}}else if(_){if(!p)throw Error(`Missing chainId in signer message request`);let e=typeof o==`function`?await o(p):o;if(e&&g in e){let t=si(await e[g](...f));t&&(v=t)}if(!v){let e=_===`direct`?await r(p):await i(p);if(!(g in e)||typeof e[g]!=`function`)throw Error(`No ${_} signer method '${g}' for chain ID '${p}'.`);v={type:`success`,response:await e[g](...f)}}}else{let e=typeof a==`function`?await a():a;if(e&&g in e){let t=si(await e[g](...f));t&&(v=t)}if(!v){if(!(g in n)||typeof n[g]!=`function`)throw Error(`No method '${g}' on target.`);v={type:`success`,response:await n[g](...f)}}}}catch(e){v={type:`error`,error:e instanceof Error?e.message:`${e}`}}t.contentWindow?.postMessage({...v,id:d},s)},`listener`);return window.addEventListener(`message`,d),()=>window.removeEventListener(`message`,d)}};bi=new WeakMap,Qr(xi,`Cosmiframe`);var Si=xi,Ci=class extends qr{constructor(e){super(e,Jr)}get walletInfo(){return this._walletInfo}async initClient(){this.initingClient();let e=new Si(this.walletInfo.allowedParentOrigins);if(!await e.isReady()){this.initClientError(Error(`Failed to detect Cosmiframe parent of allowed origin wrapping this app in an iframe.`));return}let t=await e.getMetadata();t?.name&&typeof t.name==`string`&&(this.walletInfo.prettyName=t.name),t?.imageUrl&&typeof t.imageUrl==`string`&&(this.walletInfo.logo=t.imageUrl),this.initClientDone(new Yr(e))}},wi={name:Vr,prettyName:`Cosmiframe`,logo:`data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGgKICAgIGZpbGw9IiM5MzkzOTMiCiAgICBkPSJNOC4xNCAxMC45NmMtLjA5LjMzLS4xNC42OC0uMTQgMS4wNCAwIDEuMS40NSAyLjEgMS4xNyAyLjgzbC0xLjQyIDEuNDJDNi42NyAxNS4xNiA2IDEzLjY2IDYgMTJjMC0uOTMuMjEtMS44LjU4LTIuNTlMNS4xMSA3Ljk0QzQuNCA5LjEzIDQgMTAuNTIgNCAxMmMwIDIuMjEuOSA0LjIxIDIuMzUgNS42NWwtMS40MiAxLjQyQzMuMTIgMTcuMjYgMiAxNC43NiAyIDEyYzAtMi4wNC42MS0zLjkzIDEuNjYtNS41MUwxLjM5IDQuMjIgMi44IDIuODFsMTguMzggMTguMzgtMS40MSAxLjQxTDguMTQgMTAuOTZ6bTkuMjggMy42M2MuMzctLjc5LjU4LTEuNjYuNTgtMi41OSAwLTEuNjYtLjY3LTMuMTYtMS43Ni00LjI0bC0xLjQyIDEuNDJDMTUuNTUgOS45IDE2IDEwLjkgMTYgMTJjMCAuMzYtLjA1LjcxLS4xNCAxLjA0bDEuNTYgMS41NXpNMjAgMTJjMCAxLjQ4LS40IDIuODctMS4xMSA0LjA2bDEuNDUgMS40NUMyMS4zOSAxNS45MyAyMiAxNC4wNCAyMiAxMmMwLTIuNzYtMS4xMi01LjI2LTIuOTMtNy4wN2wtMS40MiAxLjQyQzE5LjEgNy43OSAyMCA5Ljc5IDIwIDEyeiI+PC9wYXRoPgo8L3N2Zz4=`,mode:`extension`,mobileDisabled:!1,rejectMessage:{source:`Request rejected`},connectEventNamesOnWindow:[Hr],allowedParentOrigins:[]},Ti=e=>new Ci({...wi,allowedParentOrigins:e}),Ei=i(a(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.bowser=r():n.bowser=r()})(e,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,`default`,{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18);t.default=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||``},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||``},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case`NT`:return`NT`;case`XP`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.1`:return`XP`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}},e.getMacOSVersionName=function(e){var t=e.split(`.`).splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),t[0]===10)switch(t[1]){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}},e.getAndroidVersionName=function(e){var t=e.split(`.`).splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0},e.getVersionPrecision=function(e){return e.split(`.`).length},e.compareVersions=function(t,n,r){r===void 0&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),(function(e){return Array(20-e.length).join(`0`)+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,a=Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var s=function(){var e=a[t];typeof e==`object`&&e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=a.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||``},e}(),e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":`amazon_silk`,"Android Browser":`android`,Bada:`bada`,BlackBerry:`blackberry`,Chrome:`chrome`,Chromium:`chromium`,Electron:`electron`,Epiphany:`epiphany`,Firefox:`firefox`,Focus:`focus`,Generic:`generic`,"Google Search":`google_search`,Googlebot:`googlebot`,"Internet Explorer":`ie`,"K-Meleon":`k_meleon`,Maxthon:`maxthon`,"Microsoft Edge":`edge`,"MZ Browser":`mz`,"NAVER Whale Browser":`naver`,Opera:`opera`,"Opera Coast":`opera_coast`,PhantomJS:`phantomjs`,Puffin:`puffin`,QupZilla:`qupzilla`,QQ:`qq`,QQLite:`qqlite`,Safari:`safari`,Sailfish:`sailfish`,"Samsung Internet for Android":`samsung_internet`,SeaMonkey:`seamonkey`,Sleipnir:`sleipnir`,Swing:`swing`,Tizen:`tizen`,"UC Browser":`uc`,Vivaldi:`vivaldi`,"WebOS Browser":`webos`,WeChat:`wechat`,"Yandex Browser":`yandex`,Roku:`roku`},t.BROWSER_MAP={amazon_silk:`Amazon Silk`,android:`Android Browser`,bada:`Bada`,blackberry:`BlackBerry`,chrome:`Chrome`,chromium:`Chromium`,electron:`Electron`,epiphany:`Epiphany`,firefox:`Firefox`,focus:`Focus`,generic:`Generic`,googlebot:`Googlebot`,google_search:`Google Search`,ie:`Internet Explorer`,k_meleon:`K-Meleon`,maxthon:`Maxthon`,edge:`Microsoft Edge`,mz:`MZ Browser`,naver:`NAVER Whale Browser`,opera:`Opera`,opera_coast:`Opera Coast`,phantomjs:`PhantomJS`,puffin:`Puffin`,qupzilla:`QupZilla`,qq:`QQ Browser`,qqlite:`QQ Browser Lite`,safari:`Safari`,sailfish:`Sailfish`,samsung_internet:`Samsung Internet for Android`,seamonkey:`SeaMonkey`,sleipnir:`Sleipnir`,swing:`Swing`,tizen:`Tizen`,uc:`UC Browser`,vivaldi:`Vivaldi`,webos:`WebOS Browser`,wechat:`WeChat`,yandex:`Yandex Browser`},t.PLATFORMS_MAP={tablet:`tablet`,mobile:`mobile`,desktop:`desktop`,tv:`tv`},t.OS_MAP={WindowsPhone:`Windows Phone`,Windows:`Windows`,MacOS:`macOS`,iOS:`iOS`,Android:`Android`,WebOS:`WebOS`,BlackBerry:`BlackBerry`,Bada:`Bada`,Tizen:`Tizen`,Linux:`Linux`,ChromeOS:`Chrome OS`,PlayStation4:`PlayStation 4`,Roku:`Roku`},t.ENGINE_MAP={EdgeHTML:`EdgeHTML`,Blink:`Blink`,Trident:`Trident`,Presto:`Presto`,Gecko:`Gecko`,WebKit:`WebKit`}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},a=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.default=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(t===void 0&&(t=!1),typeof e!=`string`)throw Error(`UserAgent should be a string`);return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:`BROWSER_MAP`,get:function(){return a.BROWSER_MAP}},{key:`ENGINE_MAP`,get:function(){return a.ENGINE_MAP}},{key:`OS_MAP`,get:function(){return a.OS_MAP}},{key:`PLATFORMS_MAP`,get:function(){return a.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}(),e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),a=c(n(94)),o=c(n(95)),s=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(){function e(e,t){if(t===void 0&&(t=!1),e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||``:t||``},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){e===void 0&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||``:t||``},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(a.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},a=0;if(Object.keys(e).forEach((function(t){var o=e[t];typeof o==`string`?(i[t]=o,a+=1):typeof o==`object`&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=s.default.find(o,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(n[c]);if(l!==void 0)return l}var u=s.default.find(o,(function(e){return t.isPlatform(e)}));if(u){var d=this.satisfies(n[u]);if(d!==void 0)return d}}if(a>0){var f=Object.keys(i),p=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(p!==void 0)return this.compareVersion(i[p])}},t.isBrowser=function(e,t){t===void 0&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return t===void 0&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return e===void 0&&(e=[]),e.some((function(e){return t.is(e)}))},e}(),e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i;t.default=[{test:[/googlebot/i],describe:function(e){var t={name:`Googlebot`},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:`Opera`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:`Opera`},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:`Samsung Internet for Android`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:`NAVER Whale Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:`MZ Browser`},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:`Focus`},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:`Swing`},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:`Opera Coast`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:`Opera Touch`},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:`Yandex Browser`},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:`UC Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:`Maxthon`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:`Epiphany`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:`Puffin`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:`Sleipnir`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:`K-Meleon`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:`WeChat`},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:`Internet Explorer`},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:`Microsoft Edge`},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:`Microsoft Edge`},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:`Vivaldi`},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:`SeaMonkey`},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:`Sailfish`},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:`Amazon Silk`},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:`PhantomJS`},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:`SlimerJS`},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:`BlackBerry`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:`WebOS Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:`Bada`},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:`Tizen`},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:`QupZilla`},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:`Firefox`},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:`Electron`},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:`Miui`},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:`Chromium`},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:`Chrome`},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:`Google Search`},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:`Android Browser`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:`PlayStation 4`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:`Safari`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}],e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}],e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:[/googlebot/i],describe:function(){return{type:`bot`,vendor:`Google`}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:a.PLATFORMS_MAP.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Nexus`}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Apple`,model:`iPad`}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Apple`,model:`iPad`}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Amazon`}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`Nexus`}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getBrowserName(!0)===`blackberry`},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`BlackBerry`}}},{test:function(e){return e.getBrowserName(!0)===`bada`},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getBrowserName()===`windows phone`},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`Microsoft`}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return e.getOSName(!0)===`android`},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getOSName(!0)===`macos`},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:`Apple`}}},{test:function(e){return e.getOSName(!0)===`windows`},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return e.getOSName(!0)===`linux`},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return e.getOSName(!0)===`playstation 4`},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return e.getOSName(!0)===`roku`},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}],e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:function(e){return e.getBrowserName(!0)===`microsoft edge`},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],e.exports=t.default}})}))}))());x();var Di=k(),Oi=(e,t)=>{let n=[];for(let t of e)n.push(`${t.port_id}/${t.channel_id}`);let r=`${n.join(`/`)}/${t}`;return`ibc/`+C.from(new Uint8Array(new Di.sha256().update(C.from(r)).digest())).toString(`hex`).toUpperCase()},ki=(e,t,n)=>e.find(e=>e.chain_1.chain_name===n&&e.chain_2.chain_name===t),Ai=(e,t,n)=>ki(e,t,n)||ki(e,n,t),ji=e=>e.channels.find(e=>e.chain_1.port_id===`transfer`&&e.chain_2.port_id===`transfer`),Mi=e=>e.channels.find(e=>e.chain_1.port_id.startsWith(`wasm.`)&&e.chain_2.port_id===`transfer`||e.chain_1.port_id===`transfer`&&e.chain_2.port_id.startsWith(`wasm`)),Ni=(e,t,n,r,i)=>{let a=Ai(e,t,n);if(!a)return[];let o=i.startsWith(`cw20:`)?Mi(a):ji(a);if(!o)return[];let s;s=a.chain_1.chain_name===t?o.chain_1:o.chain_2;let c=[s],l=r.find(({chain_name:e})=>e===n);if(!l)return c;let u=l.assets.find(e=>e.base===i);if(!u)return c;let d=u.traces?.filter?.(e=>e.type===`ibc`||e.type===`ibc-cw20`)??[];if(!d.length)return c;d.length;let[f]=d;return[...c,...Ni(e,n,f.counterparty.chain_name,r,f.counterparty.base_denom)]},Pi=(e,t,n,r,i)=>{let a=Ai(e,t,n);if(a){if(!(i.startsWith(`cw20:`)?Mi(a):ji(a)))return;let o=Ni(e,t,n,r,i),s=r.find(({chain_name:e})=>e===n);if(!s)return Oi(o,i);let c=s.assets.find(e=>e.base===i);return c?Oi(o,(c.traces?.find?.(e=>e.type===`ibc`))?.counterparty?.base_denom??c.base):Oi(o,i)}},Fi=(e,t,n)=>{let r=t.filter(t=>t.chain_1.chain_name===e||t.chain_2.chain_name===e).map(r=>{let i=r.chain_1.chain_name===e?`chain_2`:`chain_1`,a=r.chain_1.chain_name===e?`chain_1`:`chain_2`,o=r[i].chain_name,s=r[i],c=r[a],l=n.find(e=>e.chain_name===o);if(!l)return;let u={...l,assets:l.assets.filter(e=>!(l.chain_name===`carbon`&&e.base.startsWith(`ibc/`)))}.assets.filter(e=>!e.base.startsWith(`cw20:`)).map(r=>{let i=Pi(t,e,o,n,r.base),a={...r};return a.base=i,a.denom_units=a.denom_units.map(e=>{if(e.denom===r.base){let t={...e};return t.denom=i,t.aliases=[e.denom],t}return e}),a}),d=ji(r);if(d)return{chain:{...c,...d[a]},counterparty:{...s,...d[i]},assets:u}}).filter(Boolean).reduce((e,t)=>{e[t.chain.chain_name]=e[t.chain.chain_name]||[];let n=t.assets.map(e=>{try{return{...e,traces:[{type:`ibc`,counterparty:{channel_id:t.counterparty.channel_id,base_denom:e.denom_units[0]?.aliases?.[0]??e.denom_units[0].denom,chain_name:t.counterparty.chain_name},chain:{channel_id:t.chain.channel_id}}]}}catch{}}).filter(Boolean),r={...t,assets:n};return e[t.chain.chain_name].push(r),e},{});return Object.keys(r).map(e=>({chain_name:e,assets:r[e].reduce((e,t)=>[...e,...t.assets],[])}))},Ii=(e,t,n)=>{let r=t.filter(t=>t.chain_1.chain_name===e||t.chain_2.chain_name===e).map(r=>{let i=r.chain_1.chain_name===e?`chain_2`:`chain_1`,a=r.chain_1.chain_name===e?`chain_1`:`chain_2`,o=r[i].chain_name,s=r[i],c=r[a],l=n.find(e=>e.chain_name===o);if(!l)return;let u=l.assets.filter(e=>e.base.startsWith(`cw20:`)).map(r=>{let i=Pi(t,e,o,n,r.base),a={...r};return a.base=i,a.denom_units=a.denom_units.map(e=>{if(e.denom===r.base){let t={...e};return t.denom=i,t.aliases=[e.denom],t}return e}),a});if(!u.length)return;let d=Mi(r);if(d)return{chain:{...c,...d[a]},counterparty:{...s,...d[i]},assets:u}}).filter(Boolean).reduce((e,t)=>{let n=t;e[n.chain.chain_name]=e[n.chain.chain_name]||[];let r=n.assets.map(e=>{try{return{...e,traces:[{type:`ibc-cw20`,counterparty:{port:t.counterparty.port_id,channel_id:t.counterparty.channel_id,base_denom:e.denom_units[0]?.aliases?.[0]??e.denom_units[0].denom,chain_name:t.counterparty.chain_name},chain:{port:t.chain.port_id,channel_id:t.chain.channel_id}}]}}catch{}}).filter(Boolean),i={...t,assets:r};return e[t.chain.chain_name].push(i),e},{});return Object.keys(r).map(e=>({chain_name:e,assets:r[e].reduce((e,t)=>[...e,...t.assets],[])}))},Li=(e,t,n)=>{let r=Fi(e,t,n),i=Ii(e,t,n);return r.reduce((e,t)=>{let n=t.chain_name,r=[...t.assets],a=i.find(e=>e.chain_name===n);return a&&[].push.apply(r,a.assets),[{chain_name:n,assets:r},...e]},[])},Ri=class{chainName;fetcher;_chain;_assetList;_assetLists;_ibcData=[];constructor(e){this.chainName=e.chainName,this.fetcher=e.fetcher,this.refresh()}refresh(){this._assetList=this.fetcher.getChainAssetList(this.chainName),this._ibcData=this.fetcher.getChainIbcData(this.chainName),this._chain=this.fetcher.getChain(this.chainName);let e=this._ibcData.reduce((e,t)=>(e.includes(t.chain_1.chain_name)||e.push(t.chain_1.chain_name),e.includes(t.chain_2.chain_name)||e.push(t.chain_2.chain_name),e),[]);this._assetLists=this.fetcher.assetLists.filter(t=>e.includes(t.chain_name))}get chain(){return this._chain}get nativeAssetList(){return this._assetList}get assetLists(){return Li(this.chainName,this._ibcData,this._assetLists)}};s();function zi(e){e===``&&(e=`.`);var t=e.charAt(0)===`/`;e=Hi(e);for(var n=e.split(`/`),r=[],i=0;i<n.length;i++){var a=n[i];a!==`.`&&(a===`..`&&(t||!t&&r.length>0&&r[0]!==`..`)?r.pop():r.push(a))}if(!t&&r.length<2)switch(r.length){case 1:r[0]===``&&r.unshift(`.`);break;default:r.push(`.`)}return e=r.join(`/`),t&&e.charAt(0)!==`/`&&(e=`/`+e),e}function Bi(e,t=``){if(e===``)return e;e=zi(e);var n=e.split(`/`),r=n[n.length-1];return r===``&&n.length>1?n[n.length-2]:t.length>0&&r.substr(r.length-t.length)===t?r.substr(0,r.length-t.length):r}var Vi=RegExp(`//+`,`g`);function Hi(e){return e=e.replace(Vi,`/`),e}var Ui=i(_e()),Wi=e=>(0,Ui.default)(e).then(e=>{if(e.status>=400)throw Error(`Bad response`);return e.json()}),Gi=class{urls=[];_assetLists=[];_chains=[];_ibcData=[];chainInfoList=[];constructor(e={}){e.chains&&(this._chains=e.chains),e.assetLists&&(this._assetLists=e.assetLists),e.ibcData&&(this._ibcData=e.ibcData),e.urls&&(this.urls=e.urls)}get chains(){return this._chains}get assetLists(){return this._assetLists}get ibcData(){return this._ibcData}getChain(e){return this._chains.find(t=>t.chain_name===e)}getChainAssetList(e){return this._assetLists.find(t=>t.chain_name===e)}getGeneratedAssetLists(e){return Li(e,this._ibcData,this._assetLists)}getChainIbcData(e){return this._ibcData.filter(t=>t.chain_1.chain_name===e||t.chain_2.chain_name===e)}getChainInfo(e){let t=this.chainInfoList.find(t=>t.chainName===e);return t||(t=new Ri({chainName:e,fetcher:this}),this.chainInfoList.push(t)),t}upsertChain(e){if(!this._chains.find(t=>t.chain_name===e.chain_name&&t.network_type===e.network_type)){this._chains.push(e);return}this._chains=this._chains.map(t=>t.chain_name===e.chain_name&&t.network_type===e.network_type?e:t)}updateAssetList(e){if(!this._assetLists.find(t=>t.chain_name===e.chain_name)){this._assetLists.push(e);return}this._assetLists=this._assetLists.map(t=>t.chain_name===e.chain_name?e:t)}upsertIbcData(e){if(!this._ibcData.find(t=>t.chain_1.chain_name===e.chain_1.chain_name&&t.chain_2.chain_name===e.chain_2.chain_name)){this._ibcData.push(e);return}this._ibcData=this._ibcData.map(t=>t.chain_1.chain_name===e.chain_1.chain_name&&t.chain_2.chain_name===e.chain_2.chain_name?e:t)}update(e){if(!e.$schema)throw Error(`not a registered JSON schema type`);switch(Bi(e.$schema,`.schema.json`)){case`chain`:this.upsertChain(e);break;case`assetlist`:this.updateAssetList(e);break;case`ibc_data`:this.upsertIbcData(e);break;default:throw Error(`unknown schema type`)}this.chainInfoList.forEach(e=>{e.refresh()})}async fetch(e){let t=await Wi(e);this.update(t)}async fetchUrls(){return Promise.all(this.urls.map(e=>this.fetch(e)))}},Ki=class extends Ur{isActive=!1;chainRecord;_wallets;namespace=`cosmos`;session;repelWallet=!0;callbackOptions;fetchInfo=!1;constructor(e,t=[]){if(super(),this.chainRecord=e,this._wallets=t,this.repelWallet&&this.wallets.forEach(e=>{e.updateCallbacks({...e.callbacks,beforeConnect:async()=>{this.wallets.forEach(async t=>{!t.isWalletDisconnected&&t!==e&&await t.disconnect(!1,this.callbackOptions?.beforeConnect?.disconnect)})}})}),!this.chainRecord.chain){this.fetchInfo=!0;let t=new Gi({urls:[`https://raw.githubusercontent.com/cosmos/chain-registry/master/${e.name}/chain.json`]});t.fetchUrls().then(()=>{this.chainRecord.chain=t.getChain(e.name),this.actions?.render?.(e=>e+1)}).catch(t=>{this.chainRecord.chain=null,this.logger?.warn(`Failed to fetch chain info for chain ${e.name}: [${t.name}] ${t.message}`)})}if(!this.chainRecord.assetList){this.fetchInfo=!0;let t=new Gi({urls:[`https://raw.githubusercontent.com/cosmos/chain-registry/master/${e.name}/assetlist.json`]});t.fetchUrls().then(()=>{this.chainRecord.assetList=t.getChainAssetList(e.name)}).catch(t=>{this.chainRecord.assetList=null,this.logger?.warn(`Failed to fetch assetList info for chain ${e.name}: [${t.name}] ${t.message}`)})}this.fetchInfo&&this._wallets.forEach(e=>e.chainRecord=this.chainRecord)}setCallbackOptions(e){this.callbackOptions=e}setEnv(e){this._env=e,this.wallets.forEach(t=>t.setEnv(e))}activate(){this.isActive=!0,this.wallets.forEach(e=>e.activate())}get chainName(){return this.chainRecord.name}get chainLogo(){return this.chainRecord.assetList?.assets[0]?.logo_URIs?.svg||this.chainRecord.assetList?.assets[0]?.logo_URIs?.png||void 0}get wallets(){return this._wallets}get platformEnabledWallets(){return this.isMobile?this._wallets.filter(e=>typeof e.walletInfo.mobileDisabled==`boolean`?!e.walletInfo.mobileDisabled:!e.walletInfo.mobileDisabled()):this._wallets}get isSingleWallet(){return this.wallets.length===1}get current(){if(!this.repelWallet){this.logger.warn("when `repelWallet` is set false, `current` is always undefined.");return}return this.wallets.find(e=>!e.isWalletNotExist&&!e.isWalletDisconnected)}getWallet=e=>this.wallets.find(t=>t.walletName===e);openView=()=>{this.actions?.viewWalletRepo?.(this),this.actions?.viewOpen?.(!0)};closeView=()=>{this.actions?.viewOpen?.(!1)};connect=async(e,t=!0)=>{e?await this.getWallet(e)?.connect(t):this.openView()};disconnect=async(e,t=!0,n)=>{e?await this.getWallet(e)?.disconnect(t,n):await this.current.disconnect(t,n)};getRpcEndpoint=async e=>{for(let t of this.wallets)try{return await t.getRpcEndpoint(e)}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`No valid RPC endpoint for chain ${this.chainName}!`)};getRestEndpoint=async e=>{for(let t of this.wallets)try{return await t.getRestEndpoint(e)}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`No valid REST endpoint for chain ${this.chainName}!`)};getStargateClient=async()=>{for(let e of this.wallets)try{return await e.getStargateClient()}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`Something wrong! Probably no valid RPC endpoint for chain ${this.chainName}.`)};getCosmWasmClient=async()=>{for(let e of this.wallets)try{return await e.getCosmWasmClient()}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`Something wrong! Probably no valid RPC endpoint for chain ${this.chainName}.`)};getNameService=async()=>{for(let e of this.wallets)try{return await e.getNameService()}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`Something wrong! Probably no valid RPC endpoint or name service is not registered for chain ${this.chainName}.`)}},qi=class extends Ur{chainRecords=[];walletRepos=[];defaultNameService=`icns`;mainWallets=[];coreEmitter;walletConnectOptions;session;repelWallet=!0;isLazy;throwErrors;subscribeConnectEvents;cosmiframeEnabled;_reconnectMap={};constructor(e,t,n,r,i=!0,a=[/^https?:\/\/localhost(:\d+)?/,/^https:\/\/(.+\.)?osmosis\.zone/,/^https:\/\/(.+\.)?daodao\.zone/,/^https:\/\/.+-da0da0\.vercel\.app/,/^https:\/\/(.+\.)?abstract\.money/],o,s,c,l,u,d){super(),this.throwErrors=r,this.subscribeConnectEvents=i,this.coreEmitter=new Kr.default,this.logger=n,s&&(this.defaultNameService=s),this.session=new kn({duration:18e5,callback:()=>{this.mainWallets.forEach(e=>e.disconnectAll(!1)),window?.localStorage.removeItem(`cosmos-kit@2:core//accounts`),window?.localStorage.removeItem(`cosmos-kit@2:core//current-wallet`)},...d}),this.walletConnectOptions=c,this.cosmiframeEnabled=ci()&&!!a?.length,t=[...this.cosmiframeEnabled?[Ti(a)]:[],...t],t.forEach(({walletName:e})=>this._reconnectMap[e]=()=>this._reconnect(e,!0)),this.init(e,o,t,c,l,u)}init(e,t,n,r,i,a){this.logger.info(`${e.length} chains and ${n.length} wallets are provided!`),this.isLazy=a?.isLazy,this.chainRecords=e.map(e=>{let n=typeof e==`string`?e:e.chain_name;return En(e,t,i,a?.endpoints?.[n],this.isLazy,this.logger)}),this.mainWallets=n.map(e=>(e.logger=this.logger,e.throwErrors=this.throwErrors,e.session=this.session,e.walletConnectOptions=this.walletConnectOptions,e?.setChains(this.chainRecords),e)),this.chainRecords.forEach((e,t)=>{let r=new Ki(e,n.map(({getChainWallet:t})=>t(e.name)));r.logger=this.logger,r.repelWallet=this.repelWallet,r.session=this.session,this.walletRepos.push(r),r.fetchInfo&&(this.chainRecords[t]=r.chainRecord)}),this.checkEndpoints(a?.endpoints)}checkEndpoints(e){Object.keys(e||{}).map(e=>{this.chainRecords.findIndex(t=>t.name===e)===-1&&this.logger?.warn(`You are providing endpointOptions with unrecognized chain NAME ${e} (NOT found such chain in ChainProvider property "chains")`)})}setWalletRepel(e){this.repelWallet=e,this.walletRepos.forEach(t=>t.repelWallet=e),window?.localStorage.setItem(`cosmos-kit@2:core//repel-wallet`,e.toString())}addEndpoints=e=>{this.mainWallets.forEach(t=>{t.addEnpoints(e)})};addChains=(e,t,n,r)=>{let i=e.map(e=>{let i=typeof e==`string`?e:e.chain_name;return En(e,t,n,r?.[i],this.isLazy,this.logger)});i.forEach(e=>{let t=this.chainRecords.findIndex(t=>t.name===e.name);t==-1?this.chainRecords.push(e):this.chainRecords[t]=e}),this.checkEndpoints(r),this.mainWallets.forEach(e=>{e.setChains(i,!1)}),i.forEach((e,t)=>{let n=new Ki(e,this.mainWallets.map(({getChainWallet:t})=>t(e.name)));n.setActions({viewOpen:this.actions?.viewOpen,viewWalletRepo:this.actions?.viewWalletRepo}),n.wallets.forEach(e=>{e.setActions({data:this.actions?.data,state:this.actions?.state,message:this.actions?.message})}),n.logger=this.logger,n.repelWallet=this.repelWallet,n.session=this.session,n.fetchInfo&&(this.chainRecords[t]=n.chainRecord);let r=this.walletRepos.findIndex(e=>e.chainName===n.chainName);r==-1?this.walletRepos.push(n):this.walletRepos[r]=n})};on=(e,t)=>{this.coreEmitter.on(e,t)};off=(e,t)=>{this.coreEmitter.off(e,t)};get activeRepos(){return this.walletRepos.filter(e=>e.isActive===!0)}getMainWallet=e=>{let t=this.mainWallets.find(t=>t.walletName===e);if(!t)throw new Tn(e);return t};getWalletRepo=e=>{let t=this.walletRepos.find(t=>t.chainName===e);if(!t)throw Error(`Chain ${e} is not provided.`);return t};getChainWallet=(e,t)=>{let n=this.getMainWallet(t).getChainWallet(e);if(!n)throw Error(`${e} is not provided!`);return n};getChainRecord=e=>{let t=this.chainRecords.find(t=>t.name===e);if(!t)throw Error(`${e} is not provided!`);return t};getChainLogo=e=>{let t=this.getChainRecord(e);return t?.assetList?.assets[0]?.logo_URIs?.svg||t?.assetList?.assets[0]?.logo_URIs?.png||void 0};getNameService=async e=>{let t;if(e)t=e;else{if(!this.defaultNameService)throw Error(`defaultNameService is undefined`);let{getNameServiceRegistryFromName:e}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=e(this.defaultNameService);if(!n)throw Error(`Unknown defaultNameService `+this.defaultNameService);t=n.chainName}return await this.getWalletRepo(t).getNameService()};_reconnect=async(e,t=!1,n)=>{t&&this.getMainWallet(e)?.isWalletDisconnected||(this.logger?.debug("[Event Emit] `refresh_connection` (manager)"),this.coreEmitter.emit(`refresh_connection`),await this.getMainWallet(e).connect(),await Promise.all(this.getMainWallet(e).getChainWalletList(!0).map((e,t)=>n?n.includes(e.chainName)?e.connect(!1):void 0:t===0?e.connect(!0):void 0)))};_restoreAccounts=async()=>{let e=this.cosmiframeEnabled?Vr:window.localStorage.getItem(`cosmos-kit@2:core//current-wallet`);if(e)try{let t=this.getMainWallet(e);t.activate();let n;if(t.clientMutable.state===H.Done){let e=window.localStorage.getItem(`cosmos-kit@2:core//accounts`);if(e&&e!==`[]`){let r=JSON.parse(e).flatMap(e=>{let n=t.getChainWalletList(!1).find(t=>t.chainRecord.chain?.chain_id===e.chainId&&t.namespace===e.namespace);return n?.activate(),t.walletInfo.mode===`wallet-connect`&&(n?.setData(e),n?.setState(H.Done)),n||[]});t.setState(H.Done);let i=r.flatMap(e=>{try{let t=this.getWalletRepo(e.chainName);return t.activate(),t.chainRecord}catch{return[]}}),a=async()=>{try{return await t.client?.enable?.(i.map(e=>e.chain.chain_id)),!0}catch(e){if(e instanceof Error&&t.rejectMatched(e))return this.logger?.error(`Failed to connect to stored chains: ${e.message}`),!1;throw e}};try{if(!await a())return}catch{for(let e of i)await t.client?.addChain?.(e);if(!await a())return}n=i.map(e=>e.name)}}t.walletInfo.mode!==`wallet-connect`&&await this._reconnect(e,void 0,n)}catch(e){if(e instanceof Tn)this.logger?.warn(e.message);else throw e}};_handleCosmiframeKeystoreChangeEvent=e=>{typeof e.data==`object`&&`event`in e.data&&e.data.event===`cosmiframe_keystorechange`&&(window.dispatchEvent(new Event(Hr)),this._reconnect(Vr))};onMounted=async()=>{if(typeof window>`u`)return;this.cosmiframeEnabled&&window.addEventListener(`message`,this._handleCosmiframeKeystoreChangeEvent);let e=Ei.default.getParser(window.navigator.userAgent),t={browser:e.getBrowserName(!0),device:e.getPlatform().type||`desktop`,os:e.getOSName(!0)};this.setEnv(t),this.walletRepos.forEach(e=>e.setEnv(t)),await Promise.all(this.mainWallets.map(async e=>{e.setEnv(t),e.emitter?.emit(`broadcast_env`,t),this.subscribeConnectEvents&&(e.walletInfo.connectEventNamesOnWindow?.forEach(t=>{window.addEventListener(t,this._reconnectMap[e.walletName]),this.logger?.debug(`Add "${t}" event listener to window`)}),e.walletInfo.connectEventNamesOnClient?.forEach(async t=>{e.client?.on?.(t,this._reconnectMap[e.walletName]),this.logger?.debug(`Add "${t}" event listener to wallet client ${e.walletPrettyName}`)})),e.walletInfo.mode===`wallet-connect`?await e.initClient(this.walletConnectOptions):await e.initClient()})),await this._restoreAccounts()};onUnmounted=()=>{typeof window>`u`||(this.cosmiframeEnabled&&window.removeEventListener(`message`,this._handleCosmiframeKeystoreChangeEvent),this.mainWallets.forEach(e=>{e.walletInfo.connectEventNamesOnWindow?.forEach(t=>{window.removeEventListener(t,this._reconnectMap[e.walletName])}),e.walletInfo.connectEventNamesOnClient?.forEach(async t=>{e.client?.off?.(t,this._reconnectMap[e.walletName])})}))}},Ji={osmosis:{rpc:[`https://rpc-osmosis.keplr.app/`],rest:[`https://lcd-osmosis.keplr.app/`]},osmosistestnet:{rpc:[`https://rpc-test.osmosis.zone/`],rest:[`https://lcd-test.osmosis.zone/`]},cosmoshub:{rpc:[`https://rpc-cosmoshub.keplr.app`],rest:[`https://lcd-cosmoshub.keplr.app`]},terra:{rpc:[`https://rpc-columbus.keplr.app`],rest:[`https://lcd-columbus.keplr.app`]},secretnetwork:{rpc:[`https://rpc-secret.keplr.app`],rest:[`https://lcd-secret.keplr.app`]},akash:{rpc:[`https://rpc-akash.keplr.app`],rest:[`https://lcd-akash.keplr.app`]},regen:{rpc:[`https://rpc-regen.keplr.app`],rest:[`https://lcd-regen.keplr.app`]},sentinel:{rpc:[`https://rpc-sentinel.keplr.app`],rest:[`https://lcd-sentinel.keplr.app`]},persistence:{rpc:[`https://rpc-persistence.keplr.app`],rest:[`https://lcd-persistence.keplr.app`]},irisnet:{rpc:[`https://rpc-iris.keplr.app`],rest:[`https://lcd-iris.keplr.app`]},cryptoorgchain:{rpc:[`https://rpc-crypto-org.keplr.app/`],rest:[`https://lcd-crypto-org.keplr.app/`]},starname:{rpc:[`https://rpc-iov.keplr.app`],rest:[`https://lcd-iov.keplr.app`]},emoney:{rpc:[`https://rpc-emoney.keplr.app`],rest:[`https://lcd-emoney.keplr.app`]},juno:{rpc:[`https://rpc-juno.itastakers.com`],rest:[`https://lcd-juno.itastakers.com`]},microtick:{rpc:[`https://rpc-microtick.keplr.app`],rest:[`https://lcd-microtick.keplr.app`]},likecoin:{rpc:[`https://mainnet-node.like.co/rpc`],rest:[`https://mainnet-node.like.co`]},impacthub:{rpc:[`https://rpc-impacthub.keplr.app`],rest:[`https://lcd-impacthub.keplr.app`]},bitcanna:{rpc:[`https://rpc.bitcanna.io`],rest:[`https://lcd.bitcanna.io`]},bitsong:{rpc:[`https://rpc.explorebitsong.com`],rest:[`https://lcd.explorebitsong.com`]},kichain:{rpc:[`https://rpc-mainnet.blockchain.ki`],rest:[`https://api-mainnet.blockchain.ki`]},panacea:{rpc:[`https://rpc.gopanacea.org`],rest:[`https://api.gopanacea.org`]},bostrom:{rpc:[`https://rpc.bostrom.cybernode.ai`],rest:[`https://lcd.bostrom.cybernode.ai`]},comdex:{rpc:[`https://rpc.comdex.one`],rest:[`https://rest.comdex.one`]},cheqd:{rpc:[`https://rpc.cheqd.net`],rest:[`https://api.cheqd.net`]},stargaze:{rpc:[`https://rpc.stargaze-apis.com`],rest:[`https://rest.stargaze-apis.com`]},chihuahua:{rpc:[`https://rpc.chihuahua.wtf`],rest:[`https://api.chihuahua.wtf`]},lumnetwork:{rpc:[`https://node0.mainnet.lum.network/rpc`],rest:[`https://node0.mainnet.lum.network/rest`]},vidulum:{rpc:[`https://mainnet-rpc.vidulum.app`],rest:[`https://mainnet-lcd.vidulum.app`]},desmos:{rpc:[`https://rpc.mainnet.desmos.network`],rest:[`https://api.mainnet.desmos.network`]},dig:{rpc:[`https://rpc-1-dig.notional.ventures`],rest:[`https://api-1-dig.notional.ventures`]},sommelier:{rpc:[`https://rpc-sommelier.keplr.app`],rest:[`https://lcd-sommelier.keplr.app`]},sifchain:{rpc:[`https://rpc.sifchain.finance`],rest:[`https://api-int.sifchain.finance`]},bandchain:{rpc:[`https://rpc.laozi3.bandchain.org`],rest:[`https://laozi1.bandchain.org/api`]},konstellation:{rpc:[`https://node1.konstellation.tech:26657`],rest:[`https://node1.konstellation.tech:1318`]},umee:{rpc:[`https://rpc.aphrodite.main.network.umee.cc`],rest:[`https://api.aphrodite.main.network.umee.cc`]},gravitybridge:{rpc:[`https://gravitychain.io:26657`],rest:[`https://gravitychain.io:1317`]},decentr:{rpc:[`https://poseidon.mainnet.decentr.xyz`],rest:[`https://rest.mainnet.decentr.xyz`]},shentu:{rpc:[`https://shenturpc.certikpowered.info`],rest:[`https://azuredragon.noopsbycertik.com`]},carbon:{rpc:[`https://tm-api.carbon.network`],rest:[`https://api.carbon.network`]},injective:{rpc:[`https://public.api.injective.network`],rest:[`https://public.lcd.injective.network`]},cerberus:{rpc:[`https://rpc.cerberus.zone:26657`],rest:[`https://api.cerberus.zone:1317`]},fetchhub:{rpc:[`https://rpc-fetchhub.fetch.ai:443`],rest:[`https://rest-fetchhub.fetch.ai`]},assetmantle:{rpc:[`https://rpc.assetmantle.one/`],rest:[`https://rest.assetmantle.one/`]},provenance:{rpc:[`https://rpc.provenance.io/`],rest:[`https://api.provenance.io`]},galaxy:{rpc:[`https://rpc.galaxychain.zone`],rest:[`https://rest.galaxychain.zone`]},meme:{rpc:[`https://rpc-meme-1.meme.sx:443`],rest:[`https://api-meme-1.meme.sx:443`]},evmos:{rpc:[`https://rpc-evmos.keplr.app/`],rest:[`https://lcd-evmos.keplr.app/`]},terra2:{rpc:[`https://rpc.terrav2.ccvalidators.com/`],rest:[`https://phoenix-lcd.terra.dev/`]},rizon:{rpc:[`https://rpcapi.rizon.world/`],rest:[`https://restapi.rizon.world/`]},kava:{rpc:[`https://rpc-kava.keplr.app`],rest:[`https://lcd-kava.keplr.app`]},genesisl1:{rpc:[`https://26657.genesisl1.org`],rest:[`https://api.genesisl1.org`]}},Yi=class extends Gr{constructor(e,t){super(e,t)}},Xi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Zi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Qi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),$i=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ea=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ta=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EIP6963EventNames=void 0,(function(e){e.Announce=`eip6963:announceProvider`,e.Request=`eip6963:requestProvider`})(e.EIP6963EventNames||={})})),na=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ra=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ia=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CHAIN_TYPE_TO_GENESIS_HASH=e.GENESIS_HASH_TO_CHAIN_TYPE=e.NETWORK_TO_GENESIS_HASH=e.GENESIS_HASH_TO_NETWORK=e.ChainType=e.Network=e.GenesisHash=e.BitcoinSignMessageType=void 0,(function(e){e.ECDSA=`ecdsa`,e.BIP322_SIMPLE=`bip322-simple`})(e.BitcoinSignMessageType||={});var t;(function(e){e.MAINNET=`000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f`,e.TESTNET=`000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943`,e.SIGNET=`00000008819873e925422c1ff0f99f7cc9bbb232af63a077a480a3633bee1ef6`})(t=e.GenesisHash||={});var n;(function(e){e.MAINNET=`mainnet`,e.LIVENET=`livenet`,e.TESTNET=`testnet`,e.SIGNET=`signet`})(n=e.Network||={});var r;(function(e){e.BITCOIN_MAINNET=`BITCOIN_MAINNET`,e.BITCOIN_TESTNET=`BITCOIN_TESTNET`,e.BITCOIN_SIGNET=`BITCOIN_SIGNET`})(r=e.ChainType||={}),e.GENESIS_HASH_TO_NETWORK={[t.MAINNET]:n.MAINNET,[t.TESTNET]:n.TESTNET,[t.SIGNET]:n.SIGNET},e.NETWORK_TO_GENESIS_HASH={[n.MAINNET]:t.MAINNET,[n.LIVENET]:t.MAINNET,[n.TESTNET]:t.TESTNET,[n.SIGNET]:t.SIGNET},e.GENESIS_HASH_TO_CHAIN_TYPE={[t.MAINNET]:r.BITCOIN_MAINNET,[t.TESTNET]:r.BITCOIN_TESTNET,[t.SIGNET]:r.BITCOIN_SIGNET},e.CHAIN_TYPE_TO_GENESIS_HASH={[r.BITCOIN_MAINNET]:t.MAINNET,[r.BITCOIN_TESTNET]:t.TESTNET,[r.BITCOIN_SIGNET]:t.SIGNET}})),aa=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(ea(),e),n(ta(),e),n(na(),e),n(ra(),e),n(ia(),e)})),oa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),sa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EthTxStatus=e.EthSignType=void 0,(function(e){e.MESSAGE=`message`,e.TRANSACTION=`transaction`,e.EIP712=`eip-712`})(e.EthSignType||={}),(function(e){e.Success=`0x1`,e.Failure=`0x0`})(e.EthTxStatus||={})})),ca=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),la=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ua=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),da=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),fa=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Xi(),e),n(Zi(),e),n(Qi(),e),n($i(),e),n(aa(),e),n(oa(),e),n(sa(),e),n(ca(),e),n(la(),e),n(ua(),e),n(da(),e)})),pa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.fromHex=e.toHex=void 0;function t(e){let t=``;for(let n of e)t+=(`0`+n.toString(16)).slice(-2);return t}e.toHex=t;function n(e){if(e.length%2!=0)throw Error(`hex string length must be a multiple of 2`);let t=[];for(let n=0;n<e.length;n+=2){let r=e.substr(n,2);if(!r.match(/[0-9a-f]{2}/i))throw Error(`hex string contains invalid characters`);t.push(parseInt(r,16))}return new Uint8Array(t)}e.fromHex=n})),ma=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.JSONUint8Array=void 0;var t=pa();e.JSONUint8Array=class e{static parse(e){return JSON.parse(e,(e,n)=>{if(e===`__proto__`)throw Error(`__proto__ is disallowed`);return n&&typeof n==`string`&&n.startsWith(`__uint8array__`)?(0,t.fromHex)(n.replace(`__uint8array__`,``)):typeof BigInt<`u`&&n&&typeof n==`string`&&n.startsWith(`__bigint__`)?BigInt(n.replace(`__bigint__`,``)):n})}static stringify(e){return JSON.stringify(e,(e,n)=>{if(e===`__proto__`)throw Error(`__proto__ is disallowed`);if(n&&(n instanceof Uint8Array||typeof n==`object`&&`type`in n&&`data`in n&&n.type===`Buffer`&&Array.isArray(n.data))){let e=n instanceof Uint8Array?n:new Uint8Array(n.data);return`__uint8array__${(0,t.toHex)(e)}`}return typeof n==`bigint`?`__bigint__${n.toString()}`:n})}static wrap(t){if(t!==void 0)return JSON.parse(e.stringify(t))}static unwrap(t){if(t!==void 0)return e.parse(e.stringify(t))}}})),W=a(((e,t)=>{t.exports=r;var n=null;try{n=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 r(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}r.prototype.__isLong__,Object.defineProperty(r.prototype,`__isLong__`,{value:!0});function i(e){return(e&&e.__isLong__)===!0}r.isLong=i;var a={},o={};function s(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=l(e,(e|0)<0?-1:0,!0),i&&(o[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=a[e],r)?r:(n=l(e,e<0?-1:0,!1),i&&(a[e]=n),n))}r.fromInt=s;function c(e,t){if(isNaN(e))return t?b:y;if(t){if(e<0)return b;if(e>=g)return T}else{if(e<=-_)return E;if(e+1>=_)return w}return e<0?c(-e,t).neg():l(e%h|0,e/h|0,t)}r.fromNumber=c;function l(e,t,n){return new r(e,t,n)}r.fromBits=l;var u=Math.pow;function d(e,t,n){if(e.length===0)throw Error(`empty string`);if(e===`NaN`||e===`Infinity`||e===`+Infinity`||e===`-Infinity`)return y;if(typeof t==`number`?(n=t,t=!1):t=!!t,n||=10,n<2||36<n)throw RangeError(`radix`);var r;if((r=e.indexOf(`-`))>0)throw Error(`interior hyphen`);if(r===0)return d(e.substring(1),t,n).neg();for(var i=c(u(n,8)),a=y,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),l=parseInt(e.substring(o,o+s),n);if(s<8){var f=c(u(n,s));a=a.mul(f).add(c(l))}else a=a.mul(i),a=a.add(c(l))}return a.unsigned=t,a}r.fromString=d;function f(e,t){return typeof e==`number`?c(e,t):typeof e==`string`?d(e,t):l(e.low,e.high,typeof t==`boolean`?t:e.unsigned)}r.fromValue=f;var p=65536,m=1<<24,h=p*p,g=h*h,_=g/2,v=s(m),y=s(0);r.ZERO=y;var b=s(0,!0);r.UZERO=b;var x=s(1);r.ONE=x;var S=s(1,!0);r.UONE=S;var C=s(-1);r.NEG_ONE=C;var w=l(-1,2147483647,!1);r.MAX_VALUE=w;var T=l(-1,-1,!0);r.MAX_UNSIGNED_VALUE=T;var E=l(0,-2147483648,!1);r.MIN_VALUE=E;var D=r.prototype;D.toInt=function(){return this.unsigned?this.low>>>0:this.low},D.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},D.toString=function(e){if(e||=10,e<2||36<e)throw RangeError(`radix`);if(this.isZero())return`0`;if(this.isNegative())if(this.eq(E)){var t=c(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}else return`-`+this.neg().toString(e);for(var i=c(u(e,6),this.unsigned),a=this,o=``;;){var s=a.div(i),l=(a.sub(s.mul(i)).toInt()>>>0).toString(e);if(a=s,a.isZero())return l+o;for(;l.length<6;)l=`0`+l;o=``+l+o}},D.getHighBits=function(){return this.high},D.getHighBitsUnsigned=function(){return this.high>>>0},D.getLowBits=function(){return this.low},D.getLowBitsUnsigned=function(){return this.low>>>0},D.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=this.high==0?this.low:this.high,t=31;t>0&&!(e&1<<t);t--);return this.high==0?t+1:t+33},D.isZero=function(){return this.high===0&&this.low===0},D.eqz=D.isZero,D.isNegative=function(){return!this.unsigned&&this.high<0},D.isPositive=function(){return this.unsigned||this.high>=0},D.isOdd=function(){return(this.low&1)==1},D.isEven=function(){return(this.low&1)==0},D.equals=function(e){return i(e)||(e=f(e)),this.unsigned!==e.unsigned&&this.high>>>31==1&&e.high>>>31==1?!1:this.high===e.high&&this.low===e.low},D.eq=D.equals,D.notEquals=function(e){return!this.eq(e)},D.neq=D.notEquals,D.ne=D.notEquals,D.lessThan=function(e){return this.comp(e)<0},D.lt=D.lessThan,D.lessThanOrEqual=function(e){return this.comp(e)<=0},D.lte=D.lessThanOrEqual,D.le=D.lessThanOrEqual,D.greaterThan=function(e){return this.comp(e)>0},D.gt=D.greaterThan,D.greaterThanOrEqual=function(e){return this.comp(e)>=0},D.gte=D.greaterThanOrEqual,D.ge=D.greaterThanOrEqual,D.compare=function(e){if(i(e)||(e=f(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?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},D.comp=D.compare,D.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(x)},D.neg=D.negate,D.add=function(e){i(e)||(e=f(e));var t=this.high>>>16,n=this.high&65535,r=this.low>>>16,a=this.low&65535,o=e.high>>>16,s=e.high&65535,c=e.low>>>16,u=e.low&65535,d=0,p=0,m=0,h=0;return h+=a+u,m+=h>>>16,h&=65535,m+=r+c,p+=m>>>16,m&=65535,p+=n+s,d+=p>>>16,p&=65535,d+=t+o,d&=65535,l(m<<16|h,d<<16|p,this.unsigned)},D.subtract=function(e){return i(e)||(e=f(e)),this.add(e.neg())},D.sub=D.subtract,D.multiply=function(e){if(this.isZero())return y;if(i(e)||(e=f(e)),n)return l(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return y;if(this.eq(E))return e.isOdd()?E:y;if(e.eq(E))return this.isOdd()?E:y;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(v)&&e.lt(v))return c(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=this.high&65535,a=this.low>>>16,o=this.low&65535,s=e.high>>>16,u=e.high&65535,d=e.low>>>16,p=e.low&65535,m=0,h=0,g=0,_=0;return _+=o*p,g+=_>>>16,_&=65535,g+=a*p,h+=g>>>16,g&=65535,g+=o*d,h+=g>>>16,g&=65535,h+=r*p,m+=h>>>16,h&=65535,h+=a*d,m+=h>>>16,h&=65535,h+=o*u,m+=h>>>16,h&=65535,m+=t*p+r*d+a*u+o*s,m&=65535,l(g<<16|_,m<<16|h,this.unsigned)},D.mul=D.multiply,D.divide=function(e){if(i(e)||(e=f(e)),e.isZero())throw Error(`division by zero`);if(n)return!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1?this:l((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(this.isZero())return this.unsigned?b:y;var t,r,a;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return b;if(e.gt(this.shru(1)))return S;a=b}else{if(this.eq(E))return e.eq(x)||e.eq(C)?E:e.eq(E)?x:(t=this.shr(1).div(e).shl(1),t.eq(y)?e.isNegative()?x:C:(r=this.sub(e.mul(t)),a=t.add(r.div(e)),a));if(e.eq(E))return this.unsigned?b:y;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();a=y}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),s=o<=48?1:u(2,o-48),d=c(t),p=d.mul(e);p.isNegative()||p.gt(r);)t-=s,d=c(t,this.unsigned),p=d.mul(e);d.isZero()&&(d=x),a=a.add(d),r=r.sub(p)}return a},D.div=D.divide,D.modulo=function(e){return i(e)||(e=f(e)),n?l((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},D.mod=D.modulo,D.rem=D.modulo,D.not=function(){return l(~this.low,~this.high,this.unsigned)},D.and=function(e){return i(e)||(e=f(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},D.or=function(e){return i(e)||(e=f(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},D.xor=function(e){return i(e)||(e=f(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},D.shiftLeft=function(e){return i(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):l(0,this.low<<e-32,this.unsigned)},D.shl=D.shiftLeft,D.shiftRight=function(e){return i(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},D.shr=D.shiftRight,D.shiftRightUnsigned=function(e){if(i(e)&&(e=e.toInt()),e&=63,e===0)return this;var t=this.high;if(e<32){var n=this.low;return l(n>>>e|t<<32-e,t>>>e,this.unsigned)}else if(e===32)return l(t,0,this.unsigned);else return l(t>>>e-32,0,this.unsigned)},D.shru=D.shiftRightUnsigned,D.shr_u=D.shiftRightUnsigned,D.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},D.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},D.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},D.toBytesLE=function(){var e=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},D.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}})),ha=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.CosmJSOfflineSigner=e.CosmJSOfflineSignerOnlyAmino=void 0;var n=class{constructor(e,t,n){this.chainId=e,this.keplr=t,this.signOptions=n}getAccounts(){return t(this,void 0,void 0,function*(){let e=yield this.keplr.getKey(this.chainId);return[{address:e.bech32Address,algo:`secp256k1`,pubkey:e.pubKey}]})}signAmino(e,n){return t(this,void 0,void 0,function*(){if(this.chainId!==n.chain_id)throw Error(`Unmatched chain id with the offline signer`);if((yield this.keplr.getKey(n.chain_id)).bech32Address!==e)throw Error(`Unknown signer address`);return yield this.keplr.signAmino(this.chainId,e,n,this.signOptions)})}sign(e,n){return t(this,void 0,void 0,function*(){return yield this.signAmino(e,n)})}};e.CosmJSOfflineSignerOnlyAmino=n,e.CosmJSOfflineSigner=class extends n{constructor(e,t,n){super(e,t,n)}signDirect(e,n){return t(this,void 0,void 0,function*(){if(this.chainId!==n.chainId)throw Error(`Unmatched chain id with the offline signer`);if((yield this.keplr.getKey(n.chainId)).bech32Address!==e)throw Error(`Unknown signer address`);return yield this.keplr.signDirect(this.chainId,e,n,this.signOptions)})}}})),ga=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.KeplrEnigmaUtils=void 0,e.KeplrEnigmaUtils=class{constructor(e,t){this.chainId=e,this.keplr=t}getPubkey(){return t(this,void 0,void 0,function*(){return yield this.keplr.getEnigmaPubKey(this.chainId)})}getTxEncryptionKey(e){return t(this,void 0,void 0,function*(){return yield this.keplr.getEnigmaTxEncryptionKey(this.chainId,e)})}encrypt(e,n){return t(this,void 0,void 0,function*(){return yield this.keplr.enigmaEncrypt(this.chainId,e,n)})}decrypt(e,n){return t(this,void 0,void 0,function*(){return yield this.keplr.enigmaDecrypt(this.chainId,e,n)})}}})),_a=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BUILD_VERSION=void 0,e.BUILD_VERSION=`0.12.313`})),va=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.metaId=e.KeplrLogoBase64=void 0,e.KeplrLogoBase64=`iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACPfSURBVHgBzV0L0B9VdT9nvy/vB6nVOg4GEx/VER3A1iqo9aMzFgWtoOhgsYaHYNV2lNEqxAdfmKHTakuDTge1FJK2tqOtGqoWFWti8TFSxGDriFSbIK+qgB95h+Tb09397+49r3t3/99/LT0zm//e9917fud3zr27SRB+EbKd1gAcOhFg/kSYmjoBiJ4JhMsB6LHFJetS+wfoAowOQOKnumGVUfSX+23Ba0uRfFaGsh6pNKDqP2PzQN5TbNxqjAeqi2CuWLuvAuU74eT1O+AXIAhDSaX0g+fBFL6ymHShfFhT5RvdknNLzsTIb+cChmzb2OJqJY8aQG9gaAUXaXLbOH0gL4mXmXHC/HYUv1thEWyDk9bPwQAyOQC2H1wHGb29uNtQdLcmFJBv2AsFAPVQJDQPlFBYFACpso7+kFm17g/9sUgr3QFWNI3VtQWO0KaCGXbDBLJwAFSKz2cLjtvglhNFGmr6NomgxEQdT1kYK8N0uzBwH3bosHJo3EKkD1ZG0X6ctAFEW6cAAiwYCAsDwM2HL4e8tHpa45a7NN2UUaxBmFAPmpdt+rGDq0zdrpP2I6yRig06ANHNHuAwjxlzFp67fhOMKeMBoLT6Kby+GHMGmklySVosJAO+ajK9LX6Uxl51eyqZp/tYvVcPbRklynQ7au913aaeBwLRz+6CDU4dhw2yvhVh++EzIcPvBOXXc+SXJz3LMVYeEblOYxKZMx/kF4V70aZPv+q+7ceUmaivHTu0hDSWqzwRWa4rAsTtcOuuM6Gn9APAzYfeVszsM8UAazoVCgDj1DELneqrBgrq/ilyKUFwFE2R8cX8UABD1OmaOx87pkw137gxoP9ssq91xfUZ+Pddl0MP6QbAVwt/Pw+boY+MCQzsquNY6VhCHUoGNeY4fUKjVLR9JdIC8IkxkTrqkerVPsNsHxCk17RUPtFstJw6tE2RfNAPl35Cs7XrSHcGhWPHADBWIJj25XJ8ipbJcUmlZR01Fs+bh0vg+eujBhwHQOnzoaD9pFAi25ZhD2XzPKmHNAAQyC/zHbCelFNGicBPpxP8jZFA0El37xyaHA8oqm8uBGfB89Zv84p8AJTRPuD24m4dpKSLAdhPPGKv8wx4+1l8dO/vtVWL1PvQKMIIxOtFo3VKKy9y4JNmkboflef2N5K5gglO8nYHfgxAhfJHwQQkL9EmXgfHqNcnLkBSwWAPEUFfrG3Xs6k8b+dg66N6RpS7DNMvAp+vwTXrB2Lt7dqugWm4HhyxANhe+P2U5fcBQy0mYh+nntOmL0BcoMREK8vNr8uiCgnKkAEixIO5Zo41IOKKrgPNWFvw1liuVDWHvNi+f/NHs6BErmdJ/Tnugt5Clhl5mVPdUnCkLnMhfVwC8hUz5c69qifm4vYBLrWT285Jq7aUdAOM4ut02ycAkLECilgGb1+1naNcugLJAPPF1iFlid7FxmjH6VO3R99d2zdOwa2k+gNpNVGGcObc5vPRExZvKFwxjahLil1olGf7qd0DgWIXjM+5Hbusg2syxMvVU9RSWv/R/tbvWyUflMZoQ9YwE6vfhxHK1ensy3HC6FlypG56ixZnBDJ1bf/2OwPeU8Qyeh6n5kDrGxZoGSA7CrMiqPEubjFdF5tTnzbGkrkoy+L5HgslGSbyPG4QR85YTp7PABi10sbqTTBIym8T2jnpvsV8EEwQ6EhG8Ha+ZtXHHHjk8M+hr1D7R1TQK1ftumIAtI1Nuo+Vpw+GAHod8rR5qXSqX5mOWzixcpanrIM8RhL9yP6UzM0fLljg1PVzIwY4cujMTovuQBVQD2tnc+zy2ynG6NoGdjJBbO5QWxdoa4aoj9fHwl46jIMBX6Tqt8+j/DwEixcswNsTJNYSwxVkzaIlcF55UwEAc9wwFgA8ZUQnYOt2AcN1b4mybvCh7IN6UH8zLx2ggVcnnY66BqpnxdcILDCaZ3Dn3/RK/nNJAGN7EUy9slkTwBsPeXZhJE3JuoicNn47jJhllwvoVe5RuaJ5Mz7avgCHTZutnBqzy0U0eXblKGIlRuaOHMnXT8ONB2d6Bo+9JeaeTJ2By9pyXslbQ8RRAUU6oI68sdOlpkikkSQIRxoPL4dadmgUSqHzURH5ukaOiqQS1kxPw4nTWfkFL/WDTEr6xR5xBY6v9NGqoFeJEu08BdcrHoDLFr7KQ9np2Glv/EKRSAYoCJQED0GDX2Q5wOYKajAuoW55N5UXAKA8m1mI+jvbUL+6CwGEKFdKQlHDmYRrNWBAgYMzAbZWG5IIZIASGpGTZ+eFdXEPGsf6yZs1wEUnTBeJYzrbmZyOwWgMBRZy7YlL4A1rp2Eh8m8PzsNp39yfrOMqE5i76FK0l1d0+tHjV8Hrj10KQ8h39x2Bk2/5WRisZCQ2HrXKU7GCmKDM6SpCmC9cQA7rus25n3TFEgMNY8U8mErEXIK2UOZvEdK0vvEpKwZT/l2H5uGc2x8S7KDHQzFPaDOC21LlvDCqF1xTmt06sX1JAMk0h8nqDAaICOOgp2BWiB20GZvfZU9bARufuhyGkFL5p9/6INx9KHdezTb7EwfhdQxAKV9LXqaQddOdf3Uu0ndKMIEet58eYIsKBeuIWT7P8sow0UazxGW/unw45R8slP/tB+HHxW87mAoMUbOBmZ4T/Y4h0ykAjSPj+Pxx23aOrQOvUmKgAMdVeaxXBwicJc5duwQ2Pm0Y5T98lODlheXfUyi/sXxyqF9s/2KULgJhgLRPlDKNOSxIJqJ/VGUTMIDxgaQsGsaZq7Q03u7Zx0zDNSesgiGkVP4ZtxSWfyAHHnsYP68WBhNl4NQEVZMzc3M3PZSv71O3nYAecxIXULdHM5Zfry1DVpHS8z5u+RR8/uTOzVJvOffbP4fv7Tka37K2WU5+m9Of+jFxNz3pKeBCqX9S2hd9eXSfGqu1NpTbKrS3xy2fhs+dshqOWTTMjN/63T3w9QcfsSwIvrI9RWOPOn3FBoEdgj0QM57SaTIwELjbz9Y1CDfgLzKKotFN2efaFVPwuResLkDQ/2/QpWTj9/bCP9x9UG4x7UwgrsT+9E88Va0DgbfJmx4jXpAt3WETZThem7HEYYCkwgnc7TLPO2YxwudeOJzy//TO/fDRXQeqIcLcmoHNDE0ZueWx9s7alm8BHYabyAXELDpeFmk3qRsa0wWkqLdRzmdfdMxgyv/AD/bDBwsA8LDDzmYhjFDXEeBN1FUgL2V6nMVfqL+vymI0HWPDvlK6gJx3qG4JBPLdOSj5y+euLKL+KRhCKuXfsb+eQ+phVZlQFgoqT0vsYcnNMjFAWslxIupL8UNbP+/DuoDE+CY+GMm7j18Gr3vSYhhCPvajg/Bn39+/YIvXRI9Obuvr2fOknILGz1guIAkOitdDb2ToZpQ+gqxrFJEPq2OsyVJ++QDvKpT/rmcugyHkE3cdgvfdvq+w/BBUsgFHWzyMW7ws8IHbMoMoGy+oFgzQ2/r1AkdamMlBhDUmdQEx9xJJe2UXP31pBYAh5BsPHIG33bqX+fwI9VcgAIguQKVQC4aktH0mK7V3CwsCo0EXQ2sPl4A0iebNsGYMce9F/rWc8+QlcOVJwxzxfm9uHs7/+sMOKBNb0Ja71cKaJrVyqWMr1rms4el7BoHUL6p3wJqyxDZvoF2ATuvAS4OgzH72L0/Blc8ZxvLv3p/Dq3fMwd4jsfUKGvLjIzU5cpuCH9WS2vz3k+4gMNKZmx1jBow9sGy3YMnB3eM2/jIGwrUrM9j6opWweoBTvlL5Z29/GPYeptbvV2M5oAuTJVtu6tQZ3ikOF17f61MUBul2AWQjUlccJccUjBEqXpDUMYAOsqIgqBf3uJUIn3nJquK0b/K9fqn813zlYbh3/zx7nsaeO/bwVRWKzlvWg3jMYILM2GgouhrvbWDKr8diRHTyqudldDEBA3Dl60+/YiA4rrD8T79k5WDKf+2/KuXrSL2OzsEtr6HClIuReiEvZjYUtf5Yi44YgEwSI/Vic9KBHjpbtElZoF1bh/Kb8Zo6q4sj3utnVlT0P6nsKXz9a7/8MNyzb/RaF1Nb3fYolsRcRb0u6mfZsnM1mhc7RCTxMigR+EWsWhUn66EpmEB4n6RcDFusMvtDL1wOz3rM5Kd8lfJvKix/b171G+iVfV6uwc7+hORxjZ/y2k26hNYFJIIC36ezQxVj3Y5FMCsQljuBYP1dBbbjgutTr3j+MnjpcYtgCLlo+174/oPz7nd8Md9vlOvRvicC1F3BHiWTuotpo8y+lBz17baOuCWHIYaIATzLZ+l3PGcpXHT8EhhC3vn1/fCt+4+MLF8xdgAitidzdcpnBU37VP+BDnNG1lNm9tAea1MwQI/V96iM2j9kFTYzTET/VXpCy9f9mMOeOv8dv7a0AsAQcsUtB+BT/3UYmtM9d0wBCt/3G8OJWQ7PoQ7r9PrukM6DID53t8wJUPSzSLTKv7SZ6r+XlG35OQDJeV307MUVAIaQq79zELb85yFBx9jhkxF4XT5pv36b79I7hngnsRGId2wXeox3AayOg2jZ3qe9NOoXLsiBxeZ52vpFsOmUYU75rr7tYAWACtA84FV/d6/ZiiaftfmXP7hleOuRUmaXtWtdu9ba4xzAt/IIgiMTEqDRwdoA4sUAzyqOeDfPDKf8D912cOTzXcrn/5SL3RLz8wkNDLHArnVTXNkOQHoDopZ+L4NUoOi5q0AK4UmNFXj5zQNOIDoGWLsqg2tftgJWL5mcYq7/j8Pw4VsPyrknAk7sEfwhv0kCo+4PIK3sCbbWvT8KxWYkPQEFDr5Ioh6SzUfmRhYq5ZB5mFep/E+eWZzyrZpc+Z/6wSNw5TcOmICPK5UrQdO8LjfH5R7tq/VzrR57Wjp248EFAEZHBp+2sQuNZA5kmroY67OntBZZXE88plD+WYXyV0+u/HKPf+lX9tf/hg60IBBKM0qH5FYU2bt6Ga+Q7ENXaOqxcUU+RMSNA6TEXYBAIEVHCdbAKK8pY/my7uhmcjXV/RYgXr0U4dozVgym/Ndv2xuOqVvF1kzAx3Zjgjgz+FtVBxie23DcgJOMZzq69oNAdFpRpLhRpqH80BxVQ5zAZxmprf+q314Gxz9u8vP98mj39z69F/YVr3UzV3HsX/5Cct2BOYl0QCHSAO62D2MKj+QDqDFNphX/HIBsD+gkRgMpCxeKl44sgITES5pJdwOXzyyF054y+RHvvXtq5R+i4JoSikT2Sdc4ls/7AkgDw+tL5IsOrIi+HVExgKVx25NUZJXWflDeKP9PJg8mAMDJa6eqa1Iplf+GT+2F+/bkYlGxy7qhiQ9AKCpm+e5a6TYAFgiNLaWAwCcVEV083ee7PI9SxL+pKw291a4J/PjHJej3+2hIpfx/rJWP2u+Dq1hUAPHKYuWectHz95ohmnyAxOt3nQFJSW4DvUFa6zZ5jdhPoMVJnWEFGuxAaCGyp/D1Gz7JLF9t9bjiW4tnrBVYQIqXj2OUJ9Ns/FT9UC+OgvRBkLZstRuwL3sUMJyI37iDR1v5nyiUP1e/0/don8Ac77b1HIYw7Vm5Trf16zw3Jqg7cllAVJaCrJ5fOJL4OUCkN49iWlZwJsb/QUSJ9kS88X8k77nxAPzgJ/PGvyOApG6eX2Y0ZcyHx2IFnQaQykHzKhj6uwMAP45ICgpg9NoGJg9/qP3D+RKHVD0Ir0b5xB8FFii/3r3jf45WZwiefxfWD5D09a2ylQFYJkD/lbhj+bFX596HIcbae4Oh/MeiSwCoC+ehOl4dXaq83raN8qm6qkWkum19VS9F2nqhHa/flj8KAFhVvCfY8rpVcOzqrJpDVs8nq+fE58fvm3q6LMtZ+ypd/8PMObtYm0zUleNnTV7RJiN5NX1lug/TNugCKX6FD0I0XLR/Nwl1IoaqTPh6aJnC97OPAgIKObY4Ov7wq1bCBX8/2vsLyua/nrU7ZdzCOXUbt8AeV7AF4Ni7gSrfNXXGEInlzaqOaut1Lb2x3PaqmYFknbYNYw3OAMgYAdu6MGIEePTk6Y+fgut+d1X15jBlKfwKLIDqitfNTFsYWXRj2YRifQwLGUu2rICCLSRDGJZoruiDardQKT0ovqH7AJYRMCTdw0jBRKG+6P/R3QI2UoLg2nNXVZ+Me/Ru6D8HV+GZqhdLY94oXbqczOmrAUqj6Ky9wKX+Biyesl2AejGAVToJpQsrdhTfx+pFjPD/BARXnb0y6ddDmVQAt9A4CLiF2jqZUlxbt7LuiDUbhTuxQtclqZ7EFVN6UHRQPHDFp6zeAwUsXO64fx6+f/88DCG//qRpmH3FingQSMFydVnMelv3kPt1Mt13zkDCrTfX1uwFh77VZ6kL60geGmW2SrRKh1ZxdX2+EMzqgS2Asfq2HiubgAH2FMHbH358P9z78xyGkFecsBhmf2eFQ//oAEJZsirLcnQZRLKDVbi2+Ma6W4t2ACKAwi8OQkIDnGgMwJXeBnQ0UiJnAREcEsn8PFg9VzaqsknjgPsemofzrt07GAheXoDg8lesgNjauL7U/MYBwxnFA4Z2N0gWSJnDKC1QuILreIFfgrmiMYB4QMkQyJQIudoViLYUKJ9NPjBFzQiTSN3vfQ/lcP6AIDjjxMXwxt9c5isuB0PPoUzuCDKKW73IF+5EKY8snTcMk+UIOr7IHHCaqwEEKL/fXto1kKN4kooP9yRcBOigESQoJpEqfqjHvv/BHC74WHG2PxAI3jizFN744hoE4ARtpC8UytTKDb4bbKDYKLTD/4vtn1Kmr/AI9bcuIMEAMuADq/hcKr5hA7sbgPb8AEw+THwQxK3y/oIJLhwQBBcWILhwZpmlaQDDbD6FB+WiVm4uleqCh7T/t0wQ+mt2DfJswmOFpAuoJj8PMuBzjoa14jkbiLgh4iJaMMEE4ix6yQSX/M0+2Nvvf8PrlAsKEJRXbHdQLS4gWKrnQZhVbuMyLBMEV4COq8hUfCAOkhQr6CNhuwtw6B+aq6Z/swVkwDCgYFRv3EDbnkLw1/Q7gQj3U4995z1H4eKP7B0MBOefurS6hPVQ3OJH1tVY97juAMUOQlpveMfgsgCrZ+g+V+8mmnMA7xI+us3jAJFlwbrDwZBemPZUkEAywaQAaINNuRO5896j8KZr9gwGgvMKAJw3sxQs7aNRBDr5zfsDz2K5xWdkAWb8PmmLtkfBaOo4l97zy32+WlhB7aBiAgpRPXGrp+BCCMwZwKT/VFz7QiaXTNMo6M575+GqGw7AULLht5bC2ScvERQe/LwCgYkDwFV8AIV1IXrHIGMIeXCURRSOFGeF6DeB3jvm8L6awLwbbxO1IpDi79Rrv88/rVqwKOtqxuFf4Hz+lsNV3vvPWQFDyFtOXwb7DxLcdNsjclwIz1jFBM380CsPec1bRPkmEsX3EqFMfQdQj1Gl1bcCqdiqKRt9ENIRhYlPt7gy63RYeFIgYACpG9h8GMAFKCWwqxnjXwoQlD75vQOB4I9evbwa98u3HbEgYArwlOoqGqSSuUq08k1Z8wdZVXaotvx7ARRVgPtRaGPFlYRTPPcLWoKAFNbOWsGEboDCLyI4ChldJRM84ZcyuPC0Yf7W8DvPXl6A6iB8+duP+B+PAgchGoYSytfMIfItSMI9CmPUdUDUtyVj/YcRozIydc1XsvyvSCtAhIVijDCJ/gmES0GS8x39/f2Qvu4Lo7/pe8FAIHjTy5fCrvvmYdf981bxag58vaq/VAJ6DR2GwKBgzRyhTp0v1hE7rb8sN+8C+Nl+CN5U9C+2exBe9DSBIIA5OWy2Z+L7AD7egoVE0Kd3MPyVdpN3/Y0H4fovHoQhZMVShD+5eAU85QlTIZKv14ef3aMO3kgHfF4gh87BUNgpiLMBE+SpMckPDjPgR778DEAp0L4QIrGft9E/2F0EA5moN4FUFuPswVGN1cydg2DLF4YDwR9ftAKe3IIAROQtlQRW+Y1CnQMgpLB70DsFAYhcbTnNhe6VgTr4QXbxMv5CSCyuOCCSdTWrCOXzwyeYQJwxtNXJvADaLQUItt44EAiWIVx5cQCBVnQzPn9LGBSrLdwHiGYC8W0Ce2bzIanaRsqTQHVUKA6EnPyWEbhbiB3wcErWboIrblIhClSfx6xf543qlwD44i2PwBBSguDSDcvgV4pAs6F1CQKb1m8BAzBip4XOsS8HRf1hiKdwvRajgyClcO9wJ5z1M0bglt+Ape2HjJsQ4NBtJwSBfDAC8ckZgXNULK8P/N0++NJAICiVf8XvL69+o0xAMYrW1oxuHXtSKNmAuxOPETgzRF4Hg/kuwGUEQanE3AUYyvfoH5irmESQHMYhAP1No11gaOf7wb/dBzd9azgQbHrzcni8AAE6vtuCI+4KGDu0v5HXx8S/J9Ag0i6gUaa6+CLqKF+k2Y7A+9QLybbnjDGY8sm3LB6feGXBHQB85J/2w3/fM8z3hY8rlH/5m2NM4LgCBxwyKPR3ArZfZweQg/92MHd2AeaNoFIoGAVDS/tim9fSv1YEmLyJ4wBHuT4o1GtrVbb/AMG7rt4zHAgeg/D+N6fdgWUCT9mJdC4BYdmAMYL7QQhJWnQ/BqnuLUBQvDACNx7gfr/px7y9m1AaBRrQUowVKFJGcKAAwaWbhwXBe9/CQeBTsssE0AUGSCievx2044W3gWLhyFI8W9SUu/B//X5MX0NI2SfUDwksluFj1L8tG2hg1HXKFz1Xfmwv/OShHIaQEgTveesyWLlMWXvzbsADI3QEgDCqk0HcDRhXQDYYzbQC2rNzT8kqyPKULH99cBhWmEQobukcCLbMAUEe8n76QA7v+Ys98NMHhwHBYwsQXFaAoDw0atY46grAugV7VuDFDd5BkWQY831g6xdzbalkYwLQ0T65jBC7tCsRY00g2DGmPgrWtN+CEzgQAH5WgOC9m4cDwXHHZnDpHywdgUAoawSKkVVbKpdWa1nD21FkAhTy7IAbo38OIBTmpzllBn9PCTYg8W2gYJIJpH351GHt0IJPPhN/Bg2KBgTvK5jgZwOC4N0tCOxcpc9mbAGS8vl2L27pum/rCvxPwtj+3rNYewIYgjmP8mOAGWQXQBHaB3DB5oOEDGB4+oECBO+/au9gIFhbgOCcVy1ulZUBRIErlaqVz+YLUMcUGJgEAngyVSfUjVI+WMv3joUTlwSBBdEg7wIgNhc+jlIsOCAweSSA8ECh/A9cs6/aJQwhp/zGFJx/7hJB+RiNA/wj5fBMXf4fAWPvBLQFxZSoF9ZjBzfqhyYPJO3za0JxT/rEAkllgqNgrvSYm7jr7nnYVDDBUCA4+XlTsOHcxc6cOX2jejaUVk/xj0hjShduwQv8YoEaZwYc81fcK2VMJFx5RBBnJRJj6zwNertLGN2XILjiz/fCUFKC4DWvXhQUCRbEbkxAUvkcIPotoa3DyooH3u1ZPTp5niLdxQa58CiYILKrmFTacSnQOTgWLhSsqB+00lUf9f2PCxB8dMtwXxqfOjMNp58+zeicWzFjBYi4AbIuhFt9iAVQX7vLfyZubqTRkbDP/UIe+xYJeT7VeaoMdV/8vv58zC1boAhKbC8KH03Vcxt9ikWj7/NI1eV56PTJ84o/bv7GI1X64vOH+V/HGwB88fPzzazDuoJe28AEIVXfI69X35G/xsVT7y6Cw/nbMWL1bcPmXm8RAaJM4ZWjYgnk/S9YSLKO+vXdQqQNYxFxD4xB2P3XChB8/JPDfFBSyssKELz0jGlh8dbaI+cCAGaL6AWGgiHy/OGseKW406VwABsQ6bRSZnpRWT1w6i5QAm0z5bDf0RheGdk0gOMinGdjc/7STYdh22cPw1Dy0tOnAgj0BZHL1LUHQ55rAMId0zngzoyU1slShvnyl6Vj4rkCYBNvZM/+HO776Xy0fUr27a8nQe0foAiwnjuNbuqfoHRFp8hA1bqFhIso/rjhnw9V9y84ZbEaPS6YSD/1aRncRPVXxsjmRz71hzz2J/rz4HmLpvKduG5m15psesmuIr3Gq9Tmad+CctHMwOoX0VlkZGlWnqGth6pepTjeDmsKFG0w5LM8Xcek2X1m8oMSwj3KOl66XYtYHQBQ9SUArLLl3yaSoOe/tsZINl2TYbZ7x/q5Auw7Y9G/jgOi9B6heoz1BX7fyPLRqR/GIvC3dqB2IHo8SrsCfWYAcm7YsQayL5AuVdM58XroUH1sO4c9KV+eBag2O8o5jf5PJMpvcM8DYLSlEucAwO75r8oX5wcQ+gvbNCetFRgBA0/LQyevPjlgIqU4smNqcLC2QnnqXgNDKpqxB0HEv7vKkuWij0h9J1+u7fzWFgB5fmRLkTmnAxyMKMSz+CgLEFtQ3Z/pvwnmNIiYYsAfpwGDzzAeOLwzgcAC4OQZxUMcCEbJntJArrWsLykf1TomlQ8g3IB3wdKpbdAAYOQG8q3tbBxlcaoW9M7y3bYAUQWio0itqFGaAiM5fcrfUE8zhQUPBwaFcfXYoMbQz9z2EQGCkzdqg37dpr+YwgEiSsZ2HVNXcQC0ZXYzzpV12/9mK4fpzRA5yxcW2Ty5dgcgT/hSCtMg8KzaWnejFP4iSS2+AA654IjRLweB159v5WT6cEHi5MVo35ajVTQHQ9sO3efyrnmETc10WgDs3vGE3QUMtoIW9RDIHyhxL3wmB4UBiV3wuHWrcYAilg2tQtH0TfLZmOW3z8jrseqBtkkCBdSCewpI5ZEcW5eDUqqpp0ACrL1mkuJ4ecvsR3B380ziP9qbh/lZ5LEAG7BdDAUE9PIBXEsWymFWaRgF4sxh5iP6CGNxANq5BK0KyoUwL48BWrCQbMfn4wJB5RlWaMvQdRVCycz6gXwlx/sAODIVrL8UAYAiFthdLObVYmYeGNRDg14MDwzk1ImAJSjOWSmlKM/ivb5QK1gwB5m6fLymHJ3n5n256+PVB3BZIZRhWDOSoNd169rmAgDDMDnRJm79AMqgGnnqi+/eXjSYMf9tCWvRDtKkEUUdrMsWknYPfrC2glRdVi+L5MfSmXfAg/WHGTwPMHIwNHrDljoQAq8viNeXOwFO8+weffp39LZ7419l61URuP/X6jQePb/4Ea6glZYOQ3r0GywWDa3ruvIXY1Zt6vboUyccJmiExwg8NhCflEFiTvwZmoS2fgLr35Xlo1fGWFNavQoKHRfguITdeARPBUdcANxRuALK6Hyehx4Q2H0zIVB5DTVDT1Dwh5V9gPXtjrjBHuhFjIHYWg9XgrwnoTTpEqxitSEZZXvP0tZBoVT3eVQ7nl/M9JLLtkjqbyT6vy3/aMdx24jwEr3OGEO/p8iExQswgO3Tt2w2XlUWwKTHG6XJmQdZVmjmq8qE8kDuNjQQBUCbbK1wXYc/k2KF6DMDuFs/DyB15U0b/xq3QUSS/932D29+4uZiDTeBY/3Jew8kGkg8EWMHSPQtWIHMYsu+nc7IB2mUaUi2bccin/lilg9OHjplmkUA4pauJew0aNNl107NQkI6/7/1H35t7SyWINCKid0n8jymAFL5dabew7t9eQN6IHRcDjptkfz+uFW7lqyUjo5yXZ9f5aFsCw6LJIwHI78EdMll16WVX0onAEq5swBBcUpwVtHtbnM6qBYee1ovn2y8rnr6SD+h3BschOLCHC3di04pbX1cXJB6Fh5bm4iSfdqHliF0//XvHOV41sbrpjZDD+kFgFLuvHn9tmxq/tQRCEA+gHgKiitIC7N+jNVXykqCBqQ7kP6QlKJ5G9uXl5e8F2mPUfw2xuJTcwMHyBwQ5SveHE/auCXu87v67yXPeOFds8XG+fK2E2STQp7HPoRo6tS/sX08r8t/Rx9moO3D1BmN2/ccoK0H3pkAqnbe3r9Jh7Lmr3G19I7+fj9jtXg5APoflMTv54qA9+rLtnRTvpbeDMDljq89qQDA/PoCclurjJTlQsQ3R9jBixMMPZtxpBWhx0LuL7kW6QpnmQgbua5Al3fWw7Y8ZZ2BBXDLI4QnLUT5vJ8FyzNmdq3DPJstrOaVxZzX8M/DpNWjYgeInvjpOpmyWvAYAsPiZq61g3P6J63bsoG1/Axi+d5p3uhhsohFC+aA0IanQbSDJrf8imvrPGSbZyP7+74yMQAaKb8tXA5TZxYdbiiumapzAQAIx8WuYiDqBlpqb8vRAoClFwYApSg256BYHwCZUOSkAJC/DAAFzcPO4u6Go5BtKRQ/BwPIYADQ8qyZXTMZZCcW+4UXF6OsyZDWFQ+8DqKKWTgAMhcI4wHAKLatE+wuCoC6LK5cDwCoACbKdxd9FgrGncUrnNtHv9M7h1I6l/8FAVO2ym5DPSIAAAAASUVORK5CYII=`,e.metaId=`d_2hxd99brRo`})),ya=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=`ffffffff-ffff-ffff-ffff-ffffffffffff`})),ba=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=`00000000-0000-0000-0000-000000000000`})),xa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i})),Sa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=xa();function n(e){return typeof e==`string`&&t.default.test(e)}e.default=n})),Ca=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Sa();function n(e){if(!(0,t.default)(e))throw TypeError(`Invalid UUID`);let n;return Uint8Array.of((n=parseInt(e.slice(0,8),16))>>>24,n>>>16&255,n>>>8&255,n&255,(n=parseInt(e.slice(9,13),16))>>>8,n&255,(n=parseInt(e.slice(14,18),16))>>>8,n&255,(n=parseInt(e.slice(19,23),16))>>>8,n&255,(n=parseInt(e.slice(24,36),16))/1099511627776&255,n/4294967296&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255)}e.default=n})),wa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unsafeStringify=void 0;var t=Sa(),n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));function r(e,t=0){return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+`-`+n[e[t+4]]+n[e[t+5]]+`-`+n[e[t+6]]+n[e[t+7]]+`-`+n[e[t+8]]+n[e[t+9]]+`-`+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}e.unsafeStringify=r;function i(e,n=0){let i=r(e,n);if(!(0,t.default)(i))throw TypeError(`Stringified UUID is invalid`);return i}e.default=i})),Ta=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t,n=new Uint8Array(16);function r(){if(!t){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);t=crypto.getRandomValues.bind(crypto)}return t(n)}e.default=r})),Ea=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.updateV1State=void 0;var t=Ta(),n=wa(),r={};function i(e,i,s){let c,l=e?._v6??!1;if(e){let t=Object.keys(e);t.length===1&&t[0]===`_v6`&&(e=void 0)}if(e)c=o(e.random??e.rng?.()??(0,t.default)(),e.msecs,e.nsecs,e.clockseq,e.node,i,s);else{let e=Date.now(),n=(0,t.default)();a(r,e,n),c=o(n,r.msecs,r.nsecs,l?void 0:r.clockseq,l?void 0:r.node,i,s)}return i??(0,n.unsafeStringify)(c)}function a(e,t,n){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=n.slice(10,16),e.node[0]|=1,e.clockseq=(n[8]<<8|n[9])&16383),e.msecs=t,e}e.updateV1State=a;function o(e,t,n,r,i,a,o=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!a)a=new Uint8Array(16),o=0;else if(o<0||o+16>a.length)throw RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);t??=Date.now(),n??=0,r??=(e[8]<<8|e[9])&16383,i??=e.slice(10,16),t+=0xb1d069b5400;let s=((t&268435455)*1e4+n)%4294967296;a[o++]=s>>>24&255,a[o++]=s>>>16&255,a[o++]=s>>>8&255,a[o++]=s&255;let c=t/4294967296*1e4&268435455;a[o++]=c>>>8&255,a[o++]=c&255,a[o++]=c>>>24&15|16,a[o++]=c>>>16&255,a[o++]=r>>>8|128,a[o++]=r&255;for(let e=0;e<6;++e)a[o++]=i[e];return a}e.default=i})),Da=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ca(),n=wa();function r(e){let r=i(typeof e==`string`?(0,t.default)(e):e);return typeof e==`string`?(0,n.unsafeStringify)(r):r}e.default=r;function i(e){return Uint8Array.of((e[6]&15)<<4|e[7]>>4&15,(e[7]&15)<<4|(e[4]&240)>>4,(e[4]&15)<<4|(e[5]&240)>>4,(e[5]&15)<<4|(e[0]&240)>>4,(e[0]&15)<<4|(e[1]&240)>>4,(e[1]&15)<<4|(e[2]&240)>>4,96|e[2]&15,e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}})),Oa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){return n(i(a(e),e.length*8))}function n(e){let t=new Uint8Array(e.length*4);for(let n=0;n<e.length*4;n++)t[n]=e[n>>2]>>>n%4*8&255;return t}function r(e){return(e+64>>>9<<4)+14+1}function i(e,t){let n=new Uint32Array(r(t)).fill(0);n.set(e),n[t>>5]|=128<<t%32,n[n.length-1]=t,e=n;let i=1732584193,a=-271733879,s=-1732584194,c=271733878;for(let t=0;t<e.length;t+=16){let n=i,r=a,p=s,m=c;i=l(i,a,s,c,e[t],7,-680876936),c=l(c,i,a,s,e[t+1],12,-389564586),s=l(s,c,i,a,e[t+2],17,606105819),a=l(a,s,c,i,e[t+3],22,-1044525330),i=l(i,a,s,c,e[t+4],7,-176418897),c=l(c,i,a,s,e[t+5],12,1200080426),s=l(s,c,i,a,e[t+6],17,-1473231341),a=l(a,s,c,i,e[t+7],22,-45705983),i=l(i,a,s,c,e[t+8],7,1770035416),c=l(c,i,a,s,e[t+9],12,-1958414417),s=l(s,c,i,a,e[t+10],17,-42063),a=l(a,s,c,i,e[t+11],22,-1990404162),i=l(i,a,s,c,e[t+12],7,1804603682),c=l(c,i,a,s,e[t+13],12,-40341101),s=l(s,c,i,a,e[t+14],17,-1502002290),a=l(a,s,c,i,e[t+15],22,1236535329),i=u(i,a,s,c,e[t+1],5,-165796510),c=u(c,i,a,s,e[t+6],9,-1069501632),s=u(s,c,i,a,e[t+11],14,643717713),a=u(a,s,c,i,e[t],20,-373897302),i=u(i,a,s,c,e[t+5],5,-701558691),c=u(c,i,a,s,e[t+10],9,38016083),s=u(s,c,i,a,e[t+15],14,-660478335),a=u(a,s,c,i,e[t+4],20,-405537848),i=u(i,a,s,c,e[t+9],5,568446438),c=u(c,i,a,s,e[t+14],9,-1019803690),s=u(s,c,i,a,e[t+3],14,-187363961),a=u(a,s,c,i,e[t+8],20,1163531501),i=u(i,a,s,c,e[t+13],5,-1444681467),c=u(c,i,a,s,e[t+2],9,-51403784),s=u(s,c,i,a,e[t+7],14,1735328473),a=u(a,s,c,i,e[t+12],20,-1926607734),i=d(i,a,s,c,e[t+5],4,-378558),c=d(c,i,a,s,e[t+8],11,-2022574463),s=d(s,c,i,a,e[t+11],16,1839030562),a=d(a,s,c,i,e[t+14],23,-35309556),i=d(i,a,s,c,e[t+1],4,-1530992060),c=d(c,i,a,s,e[t+4],11,1272893353),s=d(s,c,i,a,e[t+7],16,-155497632),a=d(a,s,c,i,e[t+10],23,-1094730640),i=d(i,a,s,c,e[t+13],4,681279174),c=d(c,i,a,s,e[t],11,-358537222),s=d(s,c,i,a,e[t+3],16,-722521979),a=d(a,s,c,i,e[t+6],23,76029189),i=d(i,a,s,c,e[t+9],4,-640364487),c=d(c,i,a,s,e[t+12],11,-421815835),s=d(s,c,i,a,e[t+15],16,530742520),a=d(a,s,c,i,e[t+2],23,-995338651),i=f(i,a,s,c,e[t],6,-198630844),c=f(c,i,a,s,e[t+7],10,1126891415),s=f(s,c,i,a,e[t+14],15,-1416354905),a=f(a,s,c,i,e[t+5],21,-57434055),i=f(i,a,s,c,e[t+12],6,1700485571),c=f(c,i,a,s,e[t+3],10,-1894986606),s=f(s,c,i,a,e[t+10],15,-1051523),a=f(a,s,c,i,e[t+1],21,-2054922799),i=f(i,a,s,c,e[t+8],6,1873313359),c=f(c,i,a,s,e[t+15],10,-30611744),s=f(s,c,i,a,e[t+6],15,-1560198380),a=f(a,s,c,i,e[t+13],21,1309151649),i=f(i,a,s,c,e[t+4],6,-145523070),c=f(c,i,a,s,e[t+11],10,-1120210379),s=f(s,c,i,a,e[t+2],15,718787259),a=f(a,s,c,i,e[t+9],21,-343485551),i=o(i,n),a=o(a,r),s=o(s,p),c=o(c,m)}return Uint32Array.of(i,a,s,c)}function a(e){if(e.length===0)return new Uint32Array;let t=new Uint32Array(r(e.length*8)).fill(0);for(let n=0;n<e.length;n++)t[n>>2]|=(e[n]&255)<<n%4*8;return t}function o(e,t){let n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function s(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,i,a){return o(s(o(o(t,e),o(r,a)),i),n)}function l(e,t,n,r,i,a,o){return c(t&n|~t&r,e,t,i,a,o)}function u(e,t,n,r,i,a,o){return c(t&r|n&~r,e,t,i,a,o)}function d(e,t,n,r,i,a,o){return c(t^n^r,e,t,i,a,o)}function f(e,t,n,r,i,a,o){return c(n^(t|~r),e,t,i,a,o)}e.default=t})),ka=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.URL=e.DNS=e.stringToBytes=void 0;var t=Ca(),n=wa();function r(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}e.stringToBytes=r,e.DNS=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,e.URL=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function i(e,i,a,o,s,c){let l=typeof a==`string`?r(a):a,u=typeof o==`string`?(0,t.default)(o):o;if(typeof o==`string`&&(o=(0,t.default)(o)),o?.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);let d=new Uint8Array(16+l.length);if(d.set(u),d.set(l,u.length),d=i(d),d[6]=d[6]&15|e,d[8]=d[8]&63|128,s){if(c||=0,c<0||c+16>s.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let e=0;e<16;++e)s[c+e]=d[e];return s}return(0,n.unsafeStringify)(d)}e.default=i})),Aa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.URL=e.DNS=void 0;var t=Oa(),n=ka(),r=ka();Object.defineProperty(e,`DNS`,{enumerable:!0,get:function(){return r.DNS}}),Object.defineProperty(e,`URL`,{enumerable:!0,get:function(){return r.URL}});function i(e,r,i,a){return(0,n.default)(48,t.default,e,r,i,a)}i.DNS=n.DNS,i.URL=n.URL,e.default=i})),ja=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}})),Ma=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ja(),n=Ta(),r=wa();function i(e,i,a){if(t.default.randomUUID&&!i&&!e)return t.default.randomUUID();e||={};let o=e.random??e.rng?.()??(0,n.default)();if(o.length<16)throw Error(`Random bytes length must be >= 16`);if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,i){if(a||=0,a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)i[a+e]=o[e];return i}return(0,r.unsafeStringify)(o)}e.default=i})),Na=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function n(e,t){return e<<t|e>>>32-t}function r(e){let r=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520],a=new Uint8Array(e.length+1);a.set(e),a[e.length]=128,e=a;let o=e.length/4+2,s=Math.ceil(o/16),c=Array(s);for(let t=0;t<s;++t){let n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[t*64+r*4]<<24|e[t*64+r*4+1]<<16|e[t*64+r*4+2]<<8|e[t*64+r*4+3];c[t]=n}c[s-1][14]=(e.length-1)*8/2**32,c[s-1][14]=Math.floor(c[s-1][14]),c[s-1][15]=(e.length-1)*8&4294967295;for(let e=0;e<s;++e){let a=new Uint32Array(80);for(let t=0;t<16;++t)a[t]=c[e][t];for(let e=16;e<80;++e)a[e]=n(a[e-3]^a[e-8]^a[e-14]^a[e-16],1);let o=i[0],s=i[1],l=i[2],u=i[3],d=i[4];for(let e=0;e<80;++e){let i=Math.floor(e/20),c=n(o,5)+t(i,s,l,u)+d+r[i]+a[e]>>>0;d=u,u=l,l=n(s,30)>>>0,s=o,o=c}i[0]=i[0]+o>>>0,i[1]=i[1]+s>>>0,i[2]=i[2]+l>>>0,i[3]=i[3]+u>>>0,i[4]=i[4]+d>>>0}return Uint8Array.of(i[0]>>24,i[0]>>16,i[0]>>8,i[0],i[1]>>24,i[1]>>16,i[1]>>8,i[1],i[2]>>24,i[2]>>16,i[2]>>8,i[2],i[3]>>24,i[3]>>16,i[3]>>8,i[3],i[4]>>24,i[4]>>16,i[4]>>8,i[4])}e.default=r})),Pa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.URL=e.DNS=void 0;var t=Na(),n=ka(),r=ka();Object.defineProperty(e,`DNS`,{enumerable:!0,get:function(){return r.DNS}}),Object.defineProperty(e,`URL`,{enumerable:!0,get:function(){return r.URL}});function i(e,r,i,a){return(0,n.default)(80,t.default,e,r,i,a)}i.DNS=n.DNS,i.URL=n.URL,e.default=i})),Fa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=wa(),n=Ea(),r=Da();function i(e,i,a){e??={},a??=0;let o=(0,n.default)({...e,_v6:!0},new Uint8Array(16));if(o=(0,r.default)(o),i){if(a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;e++)i[a+e]=o[e];return i}return(0,t.unsafeStringify)(o)}e.default=i})),Ia=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ca(),n=wa();function r(e){let r=i(typeof e==`string`?(0,t.default)(e):e);return typeof e==`string`?(0,n.unsafeStringify)(r):r}e.default=r;function i(e){return Uint8Array.of((e[3]&15)<<4|e[4]>>4&15,(e[4]&15)<<4|(e[5]&240)>>4,(e[5]&15)<<4|e[6]&15,e[7],(e[1]&15)<<4|(e[2]&240)>>4,(e[2]&15)<<4|(e[3]&240)>>4,16|(e[0]&240)>>4,(e[0]&15)<<4|(e[1]&240)>>4,e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}})),La=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.updateV7State=void 0;var t=Ta(),n=wa(),r={};function i(e,i,s){let c;if(e)c=o(e.random??e.rng?.()??(0,t.default)(),e.msecs,e.seq,i,s);else{let e=Date.now(),n=(0,t.default)();a(r,e,n),c=o(n,r.msecs,r.seq,i,s)}return i??(0,n.unsafeStringify)(c)}function a(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}e.updateV7State=a;function o(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}e.default=i})),Ra=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Sa();function n(e){if(!(0,t.default)(e))throw TypeError(`Invalid UUID`);return parseInt(e.slice(14,15),16)}e.default=n})),za=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.version=e.validate=e.v7=e.v6ToV1=e.v6=e.v5=e.v4=e.v3=e.v1ToV6=e.v1=e.stringify=e.parse=e.NIL=e.MAX=void 0;var t=ya();Object.defineProperty(e,`MAX`,{enumerable:!0,get:function(){return t.default}});var n=ba();Object.defineProperty(e,`NIL`,{enumerable:!0,get:function(){return n.default}});var r=Ca();Object.defineProperty(e,`parse`,{enumerable:!0,get:function(){return r.default}});var i=wa();Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return i.default}});var a=Ea();Object.defineProperty(e,`v1`,{enumerable:!0,get:function(){return a.default}});var o=Da();Object.defineProperty(e,`v1ToV6`,{enumerable:!0,get:function(){return o.default}});var s=Aa();Object.defineProperty(e,`v3`,{enumerable:!0,get:function(){return s.default}});var c=Ma();Object.defineProperty(e,`v4`,{enumerable:!0,get:function(){return c.default}});var l=Pa();Object.defineProperty(e,`v5`,{enumerable:!0,get:function(){return l.default}});var u=Fa();Object.defineProperty(e,`v6`,{enumerable:!0,get:function(){return u.default}});var d=Ia();Object.defineProperty(e,`v6ToV1`,{enumerable:!0,get:function(){return d.default}});var f=La();Object.defineProperty(e,`v7`,{enumerable:!0,get:function(){return f.default}});var p=Sa();Object.defineProperty(e,`validate`,{enumerable:!0,get:function(){return p.default}});var m=Ra();Object.defineProperty(e,`version`,{enumerable:!0,get:function(){return m.default}})})),Ba=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.BitcoinProvider=e.Keplr=e.EthereumProviderRpcError=void 0;var r=fa(),i=ma(),a=n(Vn()),o=n(W()),s=ha(),c=ga(),l=_a(),u=n(I()),d=va(),f=za(),p=class e extends Error{constructor(t,n,r){super(n),this.code=t,this.data=r,Object.setPrototypeOf(this,e.prototype)}};e.EthereumProviderRpcError=p,e.Keplr=class e{constructor(){this.enigmaUtils=new Map,this.version=l.BUILD_VERSION,this.mode=`extension`,this.defaultOptions={},this.ethereum=new h(this),this.starknet=void 0,this.bitcoin=new g(this)}static staticRequestMethod(e,t){let n=`ReactNativeWebView`in window,r=n?e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e))}:e=>{window.postMessage(e,window.location.origin)},a=n?e=>{if(e&&typeof e==`string`)try{return JSON.parse(e)}catch{}return e}:e=>e,o=new Uint8Array(8),s=Array.from(crypto.getRandomValues(o)).map(e=>e.toString(16)).join(``),c={type:window.keplrRequestMetaIdSupport?`proxy-request${d.metaId?`-${d.metaId}`:``}`:`proxy-request`,id:s,method:e,args:i.JSONUint8Array.wrap(t)};return new Promise((e,t)=>{let n=r=>{let o=a(r.data);if(!o||o.type!==`proxy-request-response`||o.id!==s)return;window.removeEventListener(`message`,n);let c=i.JSONUint8Array.unwrap(o.result);if(!c){t(Error(`Result is null`));return}if(c.error){t(Error(c.error));return}e(c.return)};window.addEventListener(`message`,n),r(c)})}requestMethod(t,n){return e.staticRequestMethod(t,n)}static getKeplr(n=1500){return t(this,void 0,void 0,function*(){yield m();let t=`ReactNativeWebView`in window,r=typeof navigator<`u`&&`userAgent`in navigator?navigator.userAgent.includes(`Firefox`):!1;if(!(!t&&!r&&window.keplrRequestMetaIdSupport==null))return new Promise((t,r)=>{let i=setTimeout(()=>{t(void 0)},n);e.staticRequestMethod(`ping`,[]).then(()=>{clearTimeout(i),t(new e)}).catch(n=>{(n?.message)?.includes(`Invalid method: ping`)?(clearTimeout(i),t(new e)):r(n)})})})}ping(){return t(this,void 0,void 0,function*(){yield this.requestMethod(`ping`,[])})}enable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`enable`,[e])})}disable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`disable`,[e])})}experimentalSuggestChain(e){return t(this,void 0,void 0,function*(){if(e.hideInUI)throw Error(`hideInUI is not allowed`);e.features?.includes(`stargate`)||e.features?.includes(`no-legacy-stdTx`),yield this.requestMethod(`experimentalSuggestChain`,[e])})}getKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKey`,[e])})}getKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKeysSettled`,[e])})}sendTx(e,n,r){return t(this,void 0,void 0,function*(){return`length`in n,yield this.requestMethod(`sendTx`,[e,n,r])})}signAmino(e,n,r,i={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signAmino`,[e,n,r,(0,a.default)(this.defaultOptions.sign??{},i)])})}signDirect(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirect`,[e,n,{bodyBytes:r.bodyBytes,authInfoBytes:r.authInfoBytes,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null},(0,a.default)(this.defaultOptions.sign??{},i)]),s=t.signed;return{signed:{bodyBytes:s.bodyBytes,authInfoBytes:s.authInfoBytes,chainId:s.chainId,accountNumber:o.default.fromString(s.accountNumber)},signature:t.signature}})}signDirectAux(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirectAux`,[e,n,{bodyBytes:r.bodyBytes,publicKey:r.publicKey,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null,sequence:r.sequence?r.sequence.toString():null},(0,a.default)({preferNoSetMemo:this.defaultOptions.sign?.preferNoSetMemo},i)]),s=t.signed;return{signed:{bodyBytes:s.bodyBytes,publicKey:s.publicKey||void 0,chainId:s.chainId,accountNumber:o.default.fromString(s.accountNumber),sequence:o.default.fromString(s.sequence)},signature:t.signature}})}signArbitrary(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signArbitrary`,[e,n,r])})}signICNSAdr36(e,t,n,r,i){return this.requestMethod(`signICNSAdr36`,[e,t,n,r,i])}verifyArbitrary(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`verifyArbitrary`,[e,n,r,i])})}signEthereum(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signEthereum`,[e,n,r,i])})}getOfflineSigner(e,t){return new s.CosmJSOfflineSigner(e,this,t)}getOfflineSignerOnlyAmino(e,t){return new s.CosmJSOfflineSignerOnlyAmino(e,this,t)}getOfflineSignerAuto(e,n){return t(this,void 0,void 0,function*(){return(yield this.getKey(e)).isNanoLedger?new s.CosmJSOfflineSignerOnlyAmino(e,this,n):new s.CosmJSOfflineSigner(e,this,n)})}suggestToken(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestToken`,[e,n,r])})}getSecret20ViewingKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getSecret20ViewingKey`,[e,n])})}getEnigmaPubKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaPubKey`,[e])})}getEnigmaTxEncryptionKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaTxEncryptionKey`,[e,n])})}enigmaEncrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaEncrypt`,[e,n,r])})}enigmaDecrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaDecrypt`,[e,n,r])})}getEnigmaUtils(e){if(this.enigmaUtils.has(e))return this.enigmaUtils.get(e);let t=new c.KeplrEnigmaUtils(e,this);return this.enigmaUtils.set(e,t),t}experimentalSignEIP712CosmosTx_v0(e,n,r,i,o={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`experimentalSignEIP712CosmosTx_v0`,[e,n,r,i,(0,a.default)(this.defaultOptions.sign??{},o)])})}getChainInfosWithoutEndpoints(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfosWithoutEndpoints`,[])})}changeKeyRingName({defaultName:e,editable:n=!0}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`changeKeyRingName`,[{defaultName:e,editable:n}])})}sendEthereumTx(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`sendEthereumTx`,[e,n])})}suggestERC20(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestERC20`,[e,n])})}getChainInfoWithoutEndpoints(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfoWithoutEndpoints`,[e])})}getStarknetKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKey`,[e])})}getStarknetKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKeysSettled`,[e])})}signStarknetTx(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetTx`,[e,n,r])})}signStarknetDeployAccountTransaction(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetDeployAccountTransaction`,[e,n])})}getBitcoinKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKey`,[e])})}getBitcoinKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKeysSettled`,[e])})}signPsbt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbt`,[e,n,r])})}signPsbts(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbts`,[e,n,r])})}__core__getAnalyticsId(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__getAnalyticsId`,[])})}__core__privilageSignAminoWithdrawRewards(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoWithdrawRewards`,[e,n,r])})}__core__privilageSignAminoDelegate(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoDelegate`,[e,n,r])})}__core__privilageSignAminoExecuteCosmWasm(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoExecuteCosmWasm`,[e,n,r])})}__core__webpageClosed(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__webpageClosed`,[])})}};var m=()=>document.readyState===`complete`?Promise.resolve():new Promise(e=>{let t=n=>{n.target&&n.target.readyState===`complete`&&(e(),document.removeEventListener(`readystatechange`,t))};document.addEventListener(`readystatechange`,t)}),h=class e extends u.default{constructor(n){if(super(),this.keplr=n,this.eip6963ProviderInfo={uuid:(0,f.v4)(),name:`Keplr`,rdns:`app.keplr`,icon:`data:image/png;base64,${d.KeplrLogoBase64}`},this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.isKeplr=!0,this.isMetaMask=!0,this._isConnected=!1,this._currentChainId=null,this._initProviderState=()=>t(this,void 0,void 0,function*(){let t=yield e.requestMethod(`request`,{method:`keplr_initProviderState`});if(t){let{currentEvmChainId:e,currentChainId:n,selectedAddress:r}=t;n!=null&&e!=null&&r!=null&&(this._handleConnect(e),this._handleChainChanged(e),this._currentChainId=n,this._handleAccountsChanged(r))}}),this._initProviderState(),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){if(this._currentChainId&&(yield n.getChainInfoWithoutEndpoints(this._currentChainId))){let e=null;try{e=(yield n.getKey(this._currentChainId)).ethereumHexAddress}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}})),window.addEventListener(`keplr_chainChanged`,e=>{if(e.detail.origin===window.location.origin){let t=e.detail.evmChainId;this._handleChainChanged(t)}}),window.addEventListener(`keplr_ethSubscription`,e=>{let t=e.detail.origin,n=e.detail.providerId;if(t===window.location.origin&&n===this.eip6963ProviderInfo?.uuid){let t=e.detail.data;this.emit(`message`,{type:`eth_subscription`,data:t})}}),this.eip6963ProviderInfo){let e=new CustomEvent(r.EIP6963EventNames.Announce,{detail:Object.freeze({info:this.eip6963ProviderInfo,provider:this})});window.addEventListener(r.EIP6963EventNames.Request,()=>window.dispatchEvent(e)),window.dispatchEvent(e)}}static requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=`ReactNativeWebView`in window,r=t?e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e))}:e=>{window.postMessage(e,window.location.origin)},a=t?e=>{if(e&&typeof e==`string`)try{return JSON.parse(e)}catch{}return e}:e=>e,o=new Uint8Array(8),s=Array.from(crypto.getRandomValues(o)).map(e=>e.toString(16)).join(``),c={type:window.keplrRequestMetaIdSupport?`proxy-request${d.metaId?`-${d.metaId}`:``}`:`proxy-request`,id:s,method:`ethereum`,args:i.JSONUint8Array.wrap(n),ethereumProviderMethod:e};return new Promise((e,t)=>{let n=r=>{let o=a(r.data);if(!o||o.type!==`proxy-request-response`||o.id!==s)return;window.removeEventListener(`message`,n);let c=i.JSONUint8Array.unwrap(o.result);if(!c){t(Error(`Result is null`));return}if(c.error){let e=c.error;t(e.code&&!e.module?new p(e.code,e.message,e.data):Error(e));return}e(c.return)};window.addEventListener(`message`,n),r(c)})})}_handleConnect(e){return t(this,void 0,void 0,function*(){if(!this._isConnected){this._isConnected=!0;let t=`0x${e.toString(16)}`;this.emit(`connect`,{chainId:t})}})}_handleDisconnect(){return t(this,void 0,void 0,function*(){this._isConnected&&(yield e.requestMethod(`request`,{method:`keplr_disconnect`}),this._isConnected=!1,this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.emit(`disconnect`))})}_handleChainChanged(e){return t(this,void 0,void 0,function*(){let t=`0x${e.toString(16)}`;t!==this.chainId&&(this.chainId=t,this.networkVersion=e.toString(10),this.emit(`chainChanged`,t))})}_handleAccountsChanged(e){return t(this,void 0,void 0,function*(){this.selectedAddress!==e&&(this.selectedAddress=e,e?this.emit(`accountsChanged`,[e]):this.emit(`accountsChanged`,[]))})}isConnected(){return this._isConnected}request({method:n,params:r,chainId:i}){return t(this,void 0,void 0,function*(){if(typeof n!=`string`)throw Error("Invalid paramater: `method` must be a string");return this._isConnected||(yield this._initProviderState()),yield e.requestMethod(`request`,{method:n,params:r,providerId:this.eip6963ProviderInfo?.uuid,chainId:i})})}enable(){return t(this,void 0,void 0,function*(){return yield e.requestMethod(`request`,{method:`eth_requestAccounts`})})}net_version(){return t(this,void 0,void 0,function*(){return yield e.requestMethod(`request`,{method:`net_version`})})}},g=class e extends u.default{constructor(e){super(),this.keplr=e,this._handleNetworkChanged=e=>t(this,void 0,void 0,function*(){this.emit(`networkChanged`,e)}),this._handleAccountsChanged=e=>t(this,void 0,void 0,function*(){e&&e.length>0?(this.emit(`accountChanged`,e),this.emit(`accountsChanged`,e)):(this.emit(`accountChanged`,[``]),this.emit(`accountsChanged`,[``]))}),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)})),window.addEventListener(`keplr_bitcoinChainChanged`,e=>t(this,void 0,void 0,function*(){if(e.detail.origin===window.location.origin){let t=e.detail.network,n=null;try{n=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleNetworkChanged(t),this._handleAccountsChanged(n)}})),window.addEventListener(`keplr_bitcoinAccountsChanged`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}))}static _requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=`ReactNativeWebView`in window,r=t?e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e))}:e=>{window.postMessage(e,window.location.origin)},a=t?e=>{if(e&&typeof e==`string`)try{return JSON.parse(e)}catch{}return e}:e=>e,o=new Uint8Array(8),s=Array.from(crypto.getRandomValues(o)).map(e=>e.toString(16)).join(``),c={type:window.keplrRequestMetaIdSupport?`proxy-request${d.metaId?`-${d.metaId}`:``}`:`proxy-request`,id:s,method:`bitcoin`,args:i.JSONUint8Array.wrap(n),bitcoinProviderMethod:e};return new Promise((e,t)=>{let n=r=>{let o=a(r.data);if(!o||o.type!==`proxy-request-response`||o.id!==s)return;window.removeEventListener(`message`,n);let c=i.JSONUint8Array.unwrap(o.result);if(!c){t(Error(`Result is null`));return}if(c.error){t(Error(c.error));return}e(c.return)};window.addEventListener(`message`,n),r(c)})})}getAccounts(){return e._requestMethod(`getAccounts`,[])}requestAccounts(){return t(this,void 0,void 0,function*(){return e._requestMethod(`requestAccounts`,[])})}disconnect(){return t(this,void 0,void 0,function*(){return e._requestMethod(`disconnect`,[])})}getNetwork(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getNetwork`,[])})}switchNetwork(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`switchNetwork`,[n])})}getChain(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getChain`,[])})}switchChain(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`switchChain`,[n])})}getPublicKey(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getPublicKey`,[])})}getBalance(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getBalance`,[])})}getInscriptions(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`getInscriptions`,[n,r])})}signMessage(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`signMessage`,[n,r])})}sendBitcoin(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`sendBitcoin`,[n,r])})}pushTx(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`pushTx`,[n])})}pushPsbt(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`pushPsbt`,[n])})}signPsbt(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`signPsbt`,[n,r])})}signPsbts(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`signPsbts`,[n,r])})}getAddress(){return t(this,void 0,void 0,function*(){return(yield this.getAccounts())[0]})}connectWallet(){return t(this,void 0,void 0,function*(){return this.requestAccounts()})}};e.BitcoinProvider=g})),Va=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.KeplrFallback=void 0;var n=Ba();e.KeplrFallback=class extends n.Keplr{constructor(e){super(),this.onKeplrNotDetected=e,this.isKeplrDetected=null,this.onKeplrNotDetected&&n.Keplr.getKeplr(500).then(e=>{var t;e||(t=this.onKeplrNotDetected)==null||t.call(this)})}requestMethod(e,r){return t(this,void 0,void 0,function*(){if(this.isKeplrDetected??((yield n.Keplr.getKeplr(500))?this.isKeplrDetected=!0:this.isKeplrDetected=!1),this.isKeplrDetected)return n.Keplr.staticRequestMethod(e,r);{let t=window.keplr;if(t)return t[e](...r);throw Error(`Can't detect keplr fallback`)}})}}})),Ha=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Ba(),e),n(Va(),e)})),Ua=a(((e,t)=>{var n=(function(e){var t=1e7,r=7,i=9007199254740992,a=p(i),o=`0123456789abcdefghijklmnopqrstuvwxyz`,s=typeof BigInt==`function`;function c(e,t,n,r){return e===void 0?c[0]:t===void 0||+t==10&&!n?z(e):pe(e,t,n,r)}function l(e,t){this.value=e,this.sign=t,this.isSmall=!1}l.prototype=Object.create(c.prototype);function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}u.prototype=Object.create(c.prototype);function d(e){this.value=e}d.prototype=Object.create(c.prototype);function f(e){return-i<e&&e<i}function p(e){return e<1e7?[e]:e<0x5af3107a4000?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/0x5af3107a4000)]}function m(e){h(e);var n=e.length;if(n<4&&F(e,a)<0)switch(n){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function h(e){for(var t=e.length;e[--t]===0;);e.length=t+1}function g(e){for(var t=Array(e),n=-1;++n<e;)t[n]=0;return t}function _(e){return e>0?Math.floor(e):Math.ceil(e)}function v(e,n){var r=e.length,i=n.length,a=Array(r),o=0,s=t,c,l;for(l=0;l<i;l++)c=e[l]+n[l]+o,o=+(c>=s),a[l]=c-o*s;for(;l<r;)c=e[l]+o,o=+(c===s),a[l++]=c-o*s;return o>0&&a.push(o),a}function y(e,t){return e.length>=t.length?v(e,t):v(t,e)}function b(e,n){var r=e.length,i=Array(r),a=t,o,s;for(s=0;s<r;s++)o=e[s]-a+n,n=Math.floor(o/a),i[s]=o-n*a,n+=1;for(;n>0;)i[s++]=n%a,n=Math.floor(n/a);return i}l.prototype.add=function(e){var t=z(e);if(this.sign!==t.sign)return this.subtract(t.negate());var n=this.value,r=t.value;return t.isSmall?new l(b(n,Math.abs(r)),this.sign):new l(y(n,r),this.sign)},l.prototype.plus=l.prototype.add,u.prototype.add=function(e){var t=z(e),n=this.value;if(n<0!==t.sign)return this.subtract(t.negate());var r=t.value;if(t.isSmall){if(f(n+r))return new u(n+r);r=p(Math.abs(r))}return new l(b(r,Math.abs(n)),n<0)},u.prototype.plus=u.prototype.add,d.prototype.add=function(e){return new d(this.value+z(e).value)},d.prototype.plus=d.prototype.add;function x(e,n){var r=e.length,i=n.length,a=Array(r),o=0,s=t,c,l;for(c=0;c<i;c++)l=e[c]-o-n[c],l<0?(l+=s,o=1):o=0,a[c]=l;for(c=i;c<r;c++){if(l=e[c]-o,l<0)l+=s;else{a[c++]=l;break}a[c]=l}for(;c<r;c++)a[c]=e[c];return h(a),a}function S(e,t,n){var r;return F(e,t)>=0?r=x(e,t):(r=x(t,e),n=!n),r=m(r),typeof r==`number`?(n&&(r=-r),new u(r)):new l(r,n)}function C(e,n,r){var i=e.length,a=Array(i),o=-n,s=t,c,d;for(c=0;c<i;c++)d=e[c]+o,o=Math.floor(d/s),d%=s,a[c]=d<0?d+s:d;return a=m(a),typeof a==`number`?(r&&(a=-a),new u(a)):new l(a,r)}l.prototype.subtract=function(e){var t=z(e);if(this.sign!==t.sign)return this.add(t.negate());var n=this.value,r=t.value;return t.isSmall?C(n,Math.abs(r),this.sign):S(n,r,this.sign)},l.prototype.minus=l.prototype.subtract,u.prototype.subtract=function(e){var t=z(e),n=this.value;if(n<0!==t.sign)return this.add(t.negate());var r=t.value;return t.isSmall?new u(n-r):C(r,Math.abs(n),n>=0)},u.prototype.minus=u.prototype.subtract,d.prototype.subtract=function(e){return new d(this.value-z(e).value)},d.prototype.minus=d.prototype.subtract,l.prototype.negate=function(){return new l(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},d.prototype.negate=function(){return new d(-this.value)},l.prototype.abs=function(){return new l(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},d.prototype.abs=function(){return new d(this.value>=0?this.value:-this.value)};function w(e,n){var r=e.length,i=n.length,a=g(r+i),o=t,s,c,l,u,d;for(l=0;l<r;++l){u=e[l];for(var f=0;f<i;++f)d=n[f],s=u*d+a[l+f],c=Math.floor(s/o),a[l+f]=s-c*o,a[l+f+1]+=c}return h(a),a}function T(e,n){var r=e.length,i=Array(r),a=t,o=0,s,c;for(c=0;c<r;c++)s=e[c]*n+o,o=Math.floor(s/a),i[c]=s-o*a;for(;o>0;)i[c++]=o%a,o=Math.floor(o/a);return i}function E(e,t){for(var n=[];t-- >0;)n.push(0);return n.concat(e)}function D(e,t){var n=Math.max(e.length,t.length);if(n<=30)return w(e,t);n=Math.ceil(n/2);var r=e.slice(n),i=e.slice(0,n),a=t.slice(n),o=t.slice(0,n),s=D(i,o),c=D(r,a),l=y(y(s,E(x(x(D(y(i,r),y(o,a)),s),c),n)),E(c,2*n));return h(l),l}function O(e,t){return-.012*e-.012*t+15e-6*e*t>0}l.prototype.multiply=function(e){var n=z(e),r=this.value,i=n.value,a=this.sign!==n.sign,o;if(n.isSmall){if(i===0)return c[0];if(i===1)return this;if(i===-1)return this.negate();if(o=Math.abs(i),o<t)return new l(T(r,o),a);i=p(o)}return O(r.length,i.length)?new l(D(r,i),a):new l(w(r,i),a)},l.prototype.times=l.prototype.multiply;function k(e,n,r){return e<t?new l(T(n,e),r):new l(w(n,p(e)),r)}u.prototype._multiplyBySmall=function(e){return f(e.value*this.value)?new u(e.value*this.value):k(Math.abs(e.value),p(Math.abs(this.value)),this.sign!==e.sign)},l.prototype._multiplyBySmall=function(e){return e.value===0?c[0]:e.value===1?this:e.value===-1?this.negate():k(Math.abs(e.value),this.value,this.sign!==e.sign)},u.prototype.multiply=function(e){return z(e)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,d.prototype.multiply=function(e){return new d(this.value*z(e).value)},d.prototype.times=d.prototype.multiply;function A(e){var n=e.length,r=g(n+n),i=t,a,o,s,c,l;for(s=0;s<n;s++){c=e[s],o=0-c*c;for(var u=s;u<n;u++)l=e[u],a=c*l*2+r[s+u]+o,o=Math.floor(a/i),r[s+u]=a-o*i;r[s+n]=o}return h(r),r}l.prototype.square=function(){return new l(A(this.value),!1)},u.prototype.square=function(){var e=this.value*this.value;return f(e)?new u(e):new l(A(p(Math.abs(this.value))),!1)},d.prototype.square=function(e){return new d(this.value*this.value)};function j(e,n){var r=e.length,i=n.length,a=t,o=g(n.length),s=n[i-1],c=Math.ceil(a/(2*s)),l=T(e,c),u=T(n,c),d,f,p,h,_,v,y;for(l.length<=r&&l.push(0),u.push(0),s=u[i-1],f=r-i;f>=0;f--){for(d=a-1,l[f+i]!==s&&(d=Math.floor((l[f+i]*a+l[f+i-1])/s)),p=0,h=0,v=u.length,_=0;_<v;_++)p+=d*u[_],y=Math.floor(p/a),h+=l[f+_]-(p-y*a),p=y,h<0?(l[f+_]=h+a,h=-1):(l[f+_]=h,h=0);for(;h!==0;){for(--d,p=0,_=0;_<v;_++)p+=l[f+_]-a+u[_],p<0?(l[f+_]=p+a,p=0):(l[f+_]=p,p=1);h+=p}o[f]=d}return l=N(l,c)[0],[m(o),m(l)]}function M(e,n){for(var r=e.length,i=n.length,a=[],o=[],s=t,c,l,u,d,f;r;){if(o.unshift(e[--r]),h(o),F(o,n)<0){a.push(0);continue}l=o.length,u=o[l-1]*s+o[l-2],d=n[i-1]*s+n[i-2],l>i&&(u=(u+1)*s),c=Math.ceil(u/d);do{if(f=T(n,c),F(f,o)<=0)break;c--}while(c);a.push(c),o=x(o,f)}return a.reverse(),[m(a),m(o)]}function N(e,n){var r=e.length,i=g(r),a=t,o,s,c=0,l;for(o=r-1;o>=0;--o)l=c*a+e[o],s=_(l/n),c=l-s*n,i[o]=s|0;return[i,c|0]}function P(e,n){var r,i=z(n);if(s)return[new d(e.value/i.value),new d(e.value%i.value)];var a=e.value,o=i.value,f;if(o===0)throw Error(`Cannot divide by zero`);if(e.isSmall)return i.isSmall?[new u(_(a/o)),new u(a%o)]:[c[0],e];if(i.isSmall){if(o===1)return[e,c[0]];if(o==-1)return[e.negate(),c[0]];var h=Math.abs(o);if(h<t){r=N(a,h),f=m(r[0]);var g=r[1];return e.sign&&(g=-g),typeof f==`number`?(e.sign!==i.sign&&(f=-f),[new u(f),new u(g)]):[new l(f,e.sign!==i.sign),new u(g)]}o=p(h)}var v=F(a,o);if(v===-1)return[c[0],e];if(v===0)return[c[e.sign===i.sign?1:-1],c[0]];r=a.length+o.length<=200?j(a,o):M(a,o),f=r[0];var y=e.sign!==i.sign,b=r[1],x=e.sign;return typeof f==`number`?(y&&(f=-f),f=new u(f)):f=new l(f,y),typeof b==`number`?(x&&(b=-b),b=new u(b)):b=new l(b,x),[f,b]}l.prototype.divmod=function(e){var t=P(this,e);return{quotient:t[0],remainder:t[1]}},d.prototype.divmod=u.prototype.divmod=l.prototype.divmod,l.prototype.divide=function(e){return P(this,e)[0]},d.prototype.over=d.prototype.divide=function(e){return new d(this.value/z(e).value)},u.prototype.over=u.prototype.divide=l.prototype.over=l.prototype.divide,l.prototype.mod=function(e){return P(this,e)[1]},d.prototype.mod=d.prototype.remainder=function(e){return new d(this.value%z(e).value)},u.prototype.remainder=u.prototype.mod=l.prototype.remainder=l.prototype.mod,l.prototype.pow=function(e){var t=z(e),n=this.value,r=t.value,i,a,o;if(r===0)return c[1];if(n===0)return c[0];if(n===1)return c[1];if(n===-1)return t.isEven()?c[1]:c[-1];if(t.sign)return c[0];if(!t.isSmall)throw Error(`The exponent `+t.toString()+` is too large.`);if(this.isSmall&&f(i=n**+r))return new u(_(i));for(a=this,o=c[1];r&!0&&(o=o.times(a),--r),r!==0;)r/=2,a=a.square();return o},u.prototype.pow=l.prototype.pow,d.prototype.pow=function(e){var t=z(e),n=this.value,r=t.value,i=BigInt(0),a=BigInt(1),o=BigInt(2);if(r===i)return c[1];if(n===i)return c[0];if(n===a)return c[1];if(n===BigInt(-1))return t.isEven()?c[1]:c[-1];if(t.isNegative())return new d(i);for(var s=this,l=c[1];(r&a)===a&&(l=l.times(s),--r),r!==i;)r/=o,s=s.square();return l},l.prototype.modPow=function(e,t){if(e=z(e),t=z(t),t.isZero())throw Error(`Cannot take modPow with modulus 0`);var n=c[1],r=this.mod(t);for(e.isNegative()&&(e=e.multiply(c[-1]),r=r.modInv(t));e.isPositive();){if(r.isZero())return c[0];e.isOdd()&&(n=n.multiply(r).mod(t)),e=e.divide(2),r=r.square().mod(t)}return n},d.prototype.modPow=u.prototype.modPow=l.prototype.modPow;function F(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var n=e.length-1;n>=0;n--)if(e[n]!==t[n])return e[n]>t[n]?1:-1;return 0}l.prototype.compareAbs=function(e){var t=z(e),n=this.value,r=t.value;return t.isSmall?1:F(n,r)},u.prototype.compareAbs=function(e){var t=z(e),n=Math.abs(this.value),r=t.value;return t.isSmall?(r=Math.abs(r),n===r?0:n>r?1:-1):-1},d.prototype.compareAbs=function(e){var t=this.value,n=z(e).value;return t=t>=0?t:-t,n=n>=0?n:-n,t===n?0:t>n?1:-1},l.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=z(e),n=this.value,r=t.value;return this.sign===t.sign?t.isSmall?this.sign?-1:1:F(n,r)*(this.sign?-1:1):t.sign?1:-1},l.prototype.compareTo=l.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=z(e),n=this.value,r=t.value;return t.isSmall?n==r?0:n>r?1:-1:n<0===t.sign?n<0?1:-1:n<0?-1:1},u.prototype.compareTo=u.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,n=z(e).value;return t===n?0:t>n?1:-1},d.prototype.compareTo=d.prototype.compare,l.prototype.equals=function(e){return this.compare(e)===0},d.prototype.eq=d.prototype.equals=u.prototype.eq=u.prototype.equals=l.prototype.eq=l.prototype.equals,l.prototype.notEquals=function(e){return this.compare(e)!==0},d.prototype.neq=d.prototype.notEquals=u.prototype.neq=u.prototype.notEquals=l.prototype.neq=l.prototype.notEquals,l.prototype.greater=function(e){return this.compare(e)>0},d.prototype.gt=d.prototype.greater=u.prototype.gt=u.prototype.greater=l.prototype.gt=l.prototype.greater,l.prototype.lesser=function(e){return this.compare(e)<0},d.prototype.lt=d.prototype.lesser=u.prototype.lt=u.prototype.lesser=l.prototype.lt=l.prototype.lesser,l.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},d.prototype.geq=d.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals,l.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},d.prototype.leq=d.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals,l.prototype.isEven=function(){return(this.value[0]&1)==0},u.prototype.isEven=function(){return(this.value&1)==0},d.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},l.prototype.isOdd=function(){return(this.value[0]&1)==1},u.prototype.isOdd=function(){return(this.value&1)==1},d.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},l.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},d.prototype.isPositive=u.prototype.isPositive,l.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},d.prototype.isNegative=u.prototype.isNegative,l.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return Math.abs(this.value)===1},d.prototype.isUnit=function(){return this.abs().value===BigInt(1)},l.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return this.value===0},d.prototype.isZero=function(){return this.value===BigInt(0)},l.prototype.isDivisibleBy=function(e){var t=z(e);return t.isZero()?!1:t.isUnit()?!0:t.compareAbs(2)===0?this.isEven():this.mod(t).isZero()},d.prototype.isDivisibleBy=u.prototype.isDivisibleBy=l.prototype.isDivisibleBy;function I(e){var t=e.abs();if(t.isUnit())return!1;if(t.equals(2)||t.equals(3)||t.equals(5))return!0;if(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))return!1;if(t.lesser(49))return!0}function L(e,t){for(var r=e.prev(),i=r,a=0,o,s,c;i.isEven();)i=i.divide(2),a++;next:for(s=0;s<t.length;s++)if(!e.lesser(t[s])&&(c=n(t[s]).modPow(i,e),!(c.isUnit()||c.equals(r)))){for(o=a-1;o!=0;o--){if(c=c.square().mod(e),c.isUnit())return!1;if(c.equals(r))continue next}return!1}return!0}l.prototype.isPrime=function(t){var r=I(this);if(r!==e)return r;var i=this.abs(),a=i.bitLength();if(a<=64)return L(i,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var o=Math.log(2)*a.toJSNumber(),s=Math.ceil(t===!0?2*o**2:o),c=[],l=0;l<s;l++)c.push(n(l+2));return L(i,c)},d.prototype.isPrime=u.prototype.isPrime=l.prototype.isPrime,l.prototype.isProbablePrime=function(t,r){var i=I(this);if(i!==e)return i;for(var a=this.abs(),o=t===e?5:t,s=[],c=0;c<o;c++)s.push(n.randBetween(2,a.minus(2),r));return L(a,s)},d.prototype.isProbablePrime=u.prototype.isProbablePrime=l.prototype.isProbablePrime,l.prototype.modInv=function(e){for(var t=n.zero,r=n.one,i=z(e),a=this.abs(),o,s,c;!a.isZero();)o=i.divide(a),s=t,c=i,t=r,i=a,r=s.subtract(o.multiply(r)),a=c.subtract(o.multiply(a));if(!i.isUnit())throw Error(this.toString()+` and `+e.toString()+` are not co-prime`);return t.compare(0)===-1&&(t=t.add(e)),this.isNegative()?t.negate():t},d.prototype.modInv=u.prototype.modInv=l.prototype.modInv,l.prototype.next=function(){var e=this.value;return this.sign?C(e,1,this.sign):new l(b(e,1),this.sign)},u.prototype.next=function(){var e=this.value;return e+1<i?new u(e+1):new l(a,!1)},d.prototype.next=function(){return new d(this.value+BigInt(1))},l.prototype.prev=function(){var e=this.value;return this.sign?new l(b(e,1),!0):C(e,1,this.sign)},u.prototype.prev=function(){var e=this.value;return e-1>-i?new u(e-1):new l(a,!0)},d.prototype.prev=function(){return new d(this.value-BigInt(1))};for(var R=[1];2*R[R.length-1]<=t;)R.push(2*R[R.length-1]);var ee=R.length,te=R[ee-1];function ne(e){return Math.abs(e)<=t}l.prototype.shiftLeft=function(e){var t=z(e).toJSNumber();if(!ne(t))throw Error(String(t)+` is too large for shifting.`);if(t<0)return this.shiftRight(-t);var n=this;if(n.isZero())return n;for(;t>=ee;)n=n.multiply(te),t-=ee-1;return n.multiply(R[t])},d.prototype.shiftLeft=u.prototype.shiftLeft=l.prototype.shiftLeft,l.prototype.shiftRight=function(e){var t,n=z(e).toJSNumber();if(!ne(n))throw Error(String(n)+` is too large for shifting.`);if(n<0)return this.shiftLeft(-n);for(var r=this;n>=ee;){if(r.isZero()||r.isNegative()&&r.isUnit())return r;t=P(r,te),r=t[1].isNegative()?t[0].prev():t[0],n-=ee-1}return t=P(r,R[n]),t[1].isNegative()?t[0].prev():t[0]},d.prototype.shiftRight=u.prototype.shiftRight=l.prototype.shiftRight;function re(e,t,r){t=z(t);for(var i=e.isNegative(),a=t.isNegative(),o=i?e.not():e,s=a?t.not():t,c=0,l=0,u=null,d=null,f=[];!o.isZero()||!s.isZero();)u=P(o,te),c=u[1].toJSNumber(),i&&(c=te-1-c),d=P(s,te),l=d[1].toJSNumber(),a&&(l=te-1-l),o=u[0],s=d[0],f.push(r(c,l));for(var p=r(+!!i,+!!a)===0?n(0):n(-1),m=f.length-1;m>=0;--m)p=p.multiply(te).add(n(f[m]));return p}l.prototype.not=function(){return this.negate().prev()},d.prototype.not=u.prototype.not=l.prototype.not,l.prototype.and=function(e){return re(this,e,function(e,t){return e&t})},d.prototype.and=u.prototype.and=l.prototype.and,l.prototype.or=function(e){return re(this,e,function(e,t){return e|t})},d.prototype.or=u.prototype.or=l.prototype.or,l.prototype.xor=function(e){return re(this,e,function(e,t){return e^t})},d.prototype.xor=u.prototype.xor=l.prototype.xor;var ie=1<<30,ae=(t&-t)*(t&-t)|ie;function oe(e){var n=e.value,r=typeof n==`number`?n|ie:typeof n==`bigint`?n|BigInt(ie):n[0]+n[1]*t|ae;return r&-r}function se(e,t){if(t.compareTo(e)<=0){var r=se(e,t.square(t)),i=r.p,a=r.e,o=i.multiply(t);return o.compareTo(e)<=0?{p:o,e:a*2+1}:{p:i,e:a*2}}return{p:n(1),e:0}}l.prototype.bitLength=function(){var e=this;return e.compareTo(n(0))<0&&(e=e.negate().subtract(n(1))),e.compareTo(n(0))===0?n(0):n(se(e,n(2)).e).add(n(1))},d.prototype.bitLength=u.prototype.bitLength=l.prototype.bitLength;function ce(e,t){return e=z(e),t=z(t),e.greater(t)?e:t}function le(e,t){return e=z(e),t=z(t),e.lesser(t)?e:t}function ue(e,t){if(e=z(e).abs(),t=z(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var n=c[1],r,i;e.isEven()&&t.isEven();)r=le(oe(e),oe(t)),e=e.divide(r),t=t.divide(r),n=n.multiply(r);for(;e.isEven();)e=e.divide(oe(e));do{for(;t.isEven();)t=t.divide(oe(t));e.greater(t)&&(i=t,t=e,e=i),t=t.subtract(e)}while(!t.isZero());return n.isUnit()?e:e.multiply(n)}function de(e,t){return e=z(e).abs(),t=z(t).abs(),e.divide(ue(e,t)).multiply(t)}function fe(e,n,r){e=z(e),n=z(n);var i=r||Math.random,a=le(e,n),o=ce(e,n).subtract(a).add(1);if(o.isSmall)return a.add(Math.floor(i()*o));for(var s=ge(o,t).value,l=[],u=!0,d=0;d<s.length;d++){var f=u?s[d]+(d+1<s.length?s[d+1]/t:0):t,p=_(i()*f);l.push(p),p<s[d]&&(u=!1)}return a.add(c.fromArray(l,t,!1))}var pe=function(e,t,n,r){n||=o,e=String(e),r||(e=e.toLowerCase(),n=n.toLowerCase());var i=e.length,a,s=Math.abs(t),c={};for(a=0;a<n.length;a++)c[n[a]]=a;for(a=0;a<i;a++){var l=e[a];if(l!==`-`&&l in c&&c[l]>=s){if(l===`1`&&s===1)continue;throw Error(l+` is not a valid digit in base `+t+`.`)}}t=z(t);var u=[],d=e[0]===`-`;for(a=+!!d;a<e.length;a++){var l=e[a];if(l in c)u.push(z(c[l]));else if(l===`<`){var f=a;do a++;while(e[a]!==`>`&&a<e.length);u.push(z(e.slice(f+1,a)))}else throw Error(l+` is not a valid character`)}return me(u,t,d)};function me(e,t,n){var r=c[0],i=c[1],a;for(a=e.length-1;a>=0;a--)r=r.add(e[a].times(i)),i=i.times(t);return n?r.negate():r}function he(e,t){return t||=o,e<t.length?t[e]:`<`+e+`>`}function ge(e,t){if(t=n(t),t.isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw Error(`Cannot convert nonzero numbers to base 0.`)}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var i=!1;if(e.isNegative()&&t.isPositive()&&(i=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:i};for(var a=[],o=e,s;o.isNegative()||o.compareAbs(t)>=0;){s=o.divmod(t),o=s.quotient;var c=s.remainder;c.isNegative()&&(c=t.minus(c).abs(),o=o.next()),a.push(c.toJSNumber())}return a.push(o.toJSNumber()),{value:a.reverse(),isNegative:i}}function _e(e,t,n){var r=ge(e,t);return(r.isNegative?`-`:``)+r.value.map(function(e){return he(e,n)}).join(``)}l.prototype.toArray=function(e){return ge(this,e)},u.prototype.toArray=function(e){return ge(this,e)},d.prototype.toArray=function(e){return ge(this,e)},l.prototype.toString=function(t,n){if(t===e&&(t=10),t!==10||n)return _e(this,t,n);for(var r=this.value,i=r.length,a=String(r[--i]),o=`0000000`,s;--i>=0;)s=String(r[i]),a+=o.slice(s.length)+s;return(this.sign?`-`:``)+a},u.prototype.toString=function(t,n){return t===e&&(t=10),t!=10||n?_e(this,t,n):String(this.value)},d.prototype.toString=u.prototype.toString,d.prototype.toJSON=l.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},l.prototype.valueOf=function(){return parseInt(this.toString(),10)},l.prototype.toJSNumber=l.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf,d.prototype.valueOf=d.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function ve(e){if(f(+e)){var t=+e;if(t===_(t))return s?new d(BigInt(t)):new u(t);throw Error(`Invalid integer: `+e)}var n=e[0]===`-`;n&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw Error(`Invalid integer: `+i.join(`e`));if(i.length===2){var a=i[1];if(a[0]===`+`&&(a=a.slice(1)),a=+a,a!==_(a)||!f(a))throw Error(`Invalid integer: `+a+` is not a valid exponent.`);var o=i[0],c=o.indexOf(`.`);if(c>=0&&(a-=o.length-c-1,o=o.slice(0,c)+o.slice(c+1)),a<0)throw Error(`Cannot include negative exponent part for integers`);o+=Array(a+1).join(`0`),e=o}if(!/^([0-9][0-9]*)$/.test(e))throw Error(`Invalid integer: `+e);if(s)return new d(BigInt(n?`-`+e:e));for(var p=[],m=e.length,g=r,v=m-g;m>0;)p.push(+e.slice(v,m)),v-=g,v<0&&(v=0),m-=g;return h(p),new l(p,n)}function ye(e){if(s)return new d(BigInt(e));if(f(e)){if(e!==_(e))throw Error(e+` is not an integer.`);return new u(e)}return ve(e.toString())}function z(e){return typeof e==`number`?ye(e):typeof e==`string`?ve(e):typeof e==`bigint`?new d(e):e}for(var be=0;be<1e3;be++)c[be]=z(be),be>0&&(c[-be]=z(-be));return c.one=c[1],c.zero=c[0],c.minusOne=c[-1],c.max=ce,c.min=le,c.gcd=ue,c.lcm=de,c.isInstance=function(e){return e instanceof l||e instanceof u||e instanceof d},c.randBetween=fe,c.fromArray=function(e,t,n){return me(e.map(z),z(t||10),n)},c})();t!==void 0&&t.hasOwnProperty(`exports`)&&(t.exports=n),typeof define==`function`&&define.amd&&define(function(){return n})})),Wa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.exponentDecStringToDecString=e.isExponentDecString=e.isValidDecimalString=e.isValidIntegerString=void 0;var t=/^-?\d+$/,n=/^-?\d+.?\d*$/,r=/^(-?)([\d.]+)e([-+])([\d]+)$/;function i(e){return t.test(e)}e.isValidIntegerString=i;function a(e){return n.test(e)}e.isValidDecimalString=a;function o(e){return r.test(e)}e.isExponentDecString=o;function s(e){let t=``;for(let n=0;n<e;n++)t+=`0`;return t}function c(e){for(;e.length>0&&e[0]===`0`;)e=e.slice(1);return e.length===0||e[0]===`.`?`0`+e:e}function l(e){let t=e.split(r);if(t.length!==6)return e;let n=t[1]===`-`,i=t[2],a=i.indexOf(`.`),o=t[4],l=parseInt(o)*(t[3]===`-`?-1:1);if(a>=0){let e=i.length-a-1;l-=e,i=c(i.replace(`.`,``))}let u=n?`-`:``;if(l<0){if(i.length>-l){let e=i.length+l;return u+(i.slice(0,e)+`.`+i.slice(e))}return u+`0.`+s(-(i.length+l))+i}else return u+i+s(l)}e.exponentDecStringToDecString=l})),Ga=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Uint=e.Int=void 0;var n=t(Ua()),r=Wa(),i=class e{constructor(e){if(typeof e==`number`&&(e=e.toString()),typeof e==`string`){if(!(0,r.isValidIntegerString)(e))if((0,r.isExponentDecString)(e))e=(0,r.exponentDecStringToDecString)(e);else throw Error(`invalid integer: ${e}`);this.int=(0,n.default)(e)}else this.int=(0,n.default)(e);this.checkBitLen()}checkBitLen(){if(this.int.abs().gt(e.maxInt))throw Error(`Integer out of range ${this.int.toString()}`)}toString(){return this.int.toString(10)}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}isZero(){return this.int.eq((0,n.default)(0))}equals(e){return this.int.equals(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.greaterOrEquals(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.lesserOrEquals(e.int)}abs(){return new e(this.int.abs())}absUInt(){return new a(this.int.abs())}add(t){return new e(this.int.add(t.int))}sub(t){return new e(this.int.subtract(t.int))}mul(t){return new e(this.int.multiply(t.int))}div(t){return new e(this.int.divide(t.int))}mod(t){return new e(this.int.mod(t.int))}neg(){return new e(this.int.negate())}pow(t){return new e(this.int.pow(t.toBigNumber()))}toBigNumber(){return this.int}};e.Int=i,i.maxInt=(0,n.default)(`115792089237316195423570985008687907853269984665640564039457584007913129639935`);var a=class e{constructor(e){if(typeof e==`number`&&(e=e.toString()),typeof e==`string`){if(!(0,r.isValidIntegerString)(e))if((0,r.isExponentDecString)(e))e=(0,r.exponentDecStringToDecString)(e);else throw Error(`invalid integer: ${e}`);this.uint=(0,n.default)(e)}else this.uint=(0,n.default)(e);if(this.uint.isNegative())throw TypeError(`Uint should not be negative`);this.checkBitLen()}checkBitLen(){if(this.uint.abs().bitLength().gt(256))throw Error(`Integer out of range ${this.uint.toString()}`)}toString(){return this.uint.toString(10)}isZero(){return this.uint.eq((0,n.default)(0))}equals(e){return this.uint.equals(e.uint)}gt(e){return this.uint.gt(e.uint)}gte(e){return this.uint.greaterOrEquals(e.uint)}lt(e){return this.uint.lt(e.uint)}lte(e){return this.uint.lesserOrEquals(e.uint)}add(t){return new e(this.uint.add(t.uint))}sub(t){return new e(this.uint.subtract(t.uint))}mul(t){return new e(this.uint.multiply(t.uint))}div(t){return new e(this.uint.divide(t.uint))}mod(t){return new e(this.uint.mod(t.uint))}pow(t){return new e(this.uint.pow(t.toBigNumber()))}toBigNumber(){return this.uint}};e.Uint=a})),Ka=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.integerStringToUSLocaleString=void 0;function t(e){if(e.indexOf(`.`)>=0)throw Error(`${e} is not integer`);if(typeof BigInt<`u`)return BigInt(e).toLocaleString(`en-US`);let t=e,n=[];for(let e=t.length;e>0;e-=3)n.push(t.slice(Math.max(0,e-3),e));return n.reverse().join(`,`)}e.integerStringToUSLocaleString=t})),qa=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Dec=void 0;var n=t(Ua()),r=Ga(),i=Wa(),a=Ka(),o=class e{static calcPrecisionMultiplier(t){if(t<0)throw Error(`Invalid prec`);if(t>e.precision)throw Error(`Too much precision`);let r=t.toString(),i=e.precisionMultipliers.get(r);if(i)return i;let a=e.precision-t,o=(0,n.default)(10).pow(a);return e.precisionMultipliers.set(r,o),o}static reduceDecimalsFromString(t){let n=t.indexOf(`.`);if(n<0)return{res:t,isDownToZero:!1};let r=t.length-1-n-e.precision;if(r<=0)return{res:t,isDownToZero:!1};let i=t.slice(0,t.length-r);return{res:i,isDownToZero:/^[0.]*$/.test(i)}}constructor(t,a=0){if(typeof t==`number`&&(t=t.toString()),typeof t==`string`){if(t.length===0)throw Error(`empty string`);if(!(0,i.isValidDecimalString)(t))if((0,i.isExponentDecString)(t))t=(0,i.exponentDecStringToDecString)(t);else throw Error(`invalid decimal: ${t}`);let r=e.reduceDecimalsFromString(t);r.isDownToZero,t=r.res,t.indexOf(`.`)>=0&&(a=t.length-t.indexOf(`.`)-1,t=t.replace(`.`,``)),this.int=(0,n.default)(t)}else t instanceof r.Int||t instanceof r.Uint?this.int=(0,n.default)(t.toString()):this.int=(0,n.default)(t);this.int=this.int.multiply(e.calcPrecisionMultiplier(a)),this.checkBitLen()}checkBitLen(){if(this.int.abs().gt(e.maxDec))throw Error(`Integer out of range ${this.int.toString()}`)}isZero(){return this.int.eq((0,n.default)(0))}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}equals(e){return this.int.eq(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.geq(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.leq(e.int)}neg(){return new e(this.int.negate(),e.precision)}abs(){return new e(this.int.abs(),e.precision)}add(t){return new e(this.int.add(t.int),e.precision)}sub(t){return new e(this.int.subtract(t.int),e.precision)}pow(t){if(t.isZero())return new e(1);if(t.isNegative())return new e(1).quo(this.pow(t.abs()));let n=new e(this.int,e.precision),i=new e(1);for(let e=t;e.gt(new r.Int(1));e=e.div(new r.Int(2)))e.mod(new r.Int(2)).isZero()||(i=i.mul(n)),n=n.mul(n);return n.mul(i)}approxSqrt(){return this.approxRoot(2)}approxRoot(t,n=300){if(this.isNegative())return this.neg().approxRoot(t).neg();if(t===1||this.isZero()||this.equals(e.one))return this;if(t===0)return e.one;let[i,a]=[e.one,e.one];for(let o=0;a.abs().gt(e.smallestDec)&&o<n;o++){let n=i.pow(new r.Int(t-1));n.isZero()&&(n=e.smallestDec),a=this.quo(n),a=a.sub(i),a=a.quoTruncate(new e(t)),i=i.add(a)}return i}mul(t){return new e(this.mulRaw(t).chopPrecisionAndRound(),e.precision)}mulTruncate(t){return new e(this.mulRaw(t).chopPrecisionAndTruncate(),e.precision)}mulRoundUp(t){return new e(this.mulRaw(t).chopPrecisionAndRoundUp(),e.precision)}mulRaw(t){return new e(this.int.multiply(t.int),e.precision)}quo(t){return new e(this.quoRaw(t).chopPrecisionAndRound(),e.precision)}quoTruncate(t){return new e(this.quoRaw(t).chopPrecisionAndTruncate(),e.precision)}quoRoundUp(t){return new e(this.quoRaw(t).chopPrecisionAndRoundUp(),e.precision)}quoRaw(t){let n=e.calcPrecisionMultiplier(0);return new e(this.int.multiply(n).multiply(n).divide(t.int),e.precision)}isInteger(){let t=e.calcPrecisionMultiplier(0);return this.int.remainder(t).equals((0,n.default)(0))}chopPrecisionAndRound(){if(this.isNegative())return this.abs().chopPrecisionAndRound().negate();let t=e.calcPrecisionMultiplier(0),r=t.divide((0,n.default)(2)),{quotient:i,remainder:a}=this.int.divmod(t);return a.equals((0,n.default)(0))||a.lt(r)?i:a.gt(r)?i.add((0,n.default)(1)):i.divide((0,n.default)(2)).equals((0,n.default)(0))?i:i.add((0,n.default)(1))}chopPrecisionAndRoundUp(){if(this.isNegative())return this.abs().chopPrecisionAndTruncate().negate();let t=e.calcPrecisionMultiplier(0),{quotient:r,remainder:i}=this.int.divmod(t);return i.equals((0,n.default)(0))?r:r.add((0,n.default)(1))}chopPrecisionAndTruncate(){let t=e.calcPrecisionMultiplier(0);return this.int.divide(t)}toString(t=e.precision,r=!1){let i=e.calcPrecisionMultiplier(0),{quotient:o,remainder:s}=this.int.abs().divmod(i),c=s.toString(10);for(let t=0,n=c.length;t<e.precision-n;t++)c=`0`+c;c=c.substring(0,t);let l=this.isNegative()&&!(o.eq((0,n.default)(0))&&c.length===0),u=r?(0,a.integerStringToUSLocaleString)(o.toString()):o.toString();return`${l?`-`:``}${u}${c.length>0?`.`+c:``}`}round(){return new r.Int(this.chopPrecisionAndRound())}roundUp(){return new r.Int(this.chopPrecisionAndRoundUp())}truncate(){return new r.Int(this.chopPrecisionAndTruncate())}roundDec(){return new e(this.chopPrecisionAndRound(),0)}roundUpDec(){return new e(this.chopPrecisionAndRoundUp(),0)}truncateDec(){return new e(this.chopPrecisionAndTruncate(),0)}};e.Dec=o,o.precision=18,o.decimalPrecisionBits=60,o.maxDec=(0,n.default)(`133499189745056880149688856635597007162669032647290798121690100488888732861290034376435130433535`),o.precisionMultipliers=new Map,o.zero=new o(0),o.smallestDec=new o(`1`,o.precision),o.one=new o(1),r.Int.prototype.toDec=function(){return new o(this)},r.Uint.prototype.toDec=function(){return new o(this)}})),Ja=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DecUtils=void 0;var t=qa(),n=Ga(),r=class e{static trim(e){let t=typeof e==`string`?e:e.toString();if(t.indexOf(`.`)<0)return t;for(let e=t.length-1;e>=0&&t[e]===`0`;e--)t=t.slice(0,e);return t.length>0&&t[t.length-1]===`.`&&(t=t.slice(0,t.length-1)),t}static getTenExponentN(r){if(r<-t.Dec.precision)throw Error(`Too little precision`);if(e.tenExponentNs[r.toString()])return e.tenExponentNs[r.toString()];let i=new t.Dec(10).pow(new n.Int(r));return e.tenExponentNs[r.toString()]=i,i}static getTenExponentNInPrecisionRange(n){if(n>t.Dec.precision)throw Error(`Too much precision`);return e.getTenExponentN(n)}static getPrecisionDec(t){return e.getTenExponentNInPrecisionRange(t)}};e.DecUtils=r,r.tenExponentNs={}})),Ya=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Coin=void 0;var t=Ga();e.Coin=class e{static parse(t){let n=RegExp(`([0-9]+)[ ]*([a-zA-Z]+)$`).exec(t);if(!n||n.length!==3)throw Error(`Invalid coin str`);let r=n[2],i=n[1];return new e(r,i)}constructor(e,n){this.denom=e,this.amount=n instanceof t.Int?n:new t.Int(n)}toString(){return`${this.amount.toString()}${this.denom}`}}})),Xa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CoinUtils=void 0;var t=Ya(),n=Ga(),r=qa(),i=Ja(),a=Ka(),o=class e{static createCoinsFromPrimitives(e){return e.map(e=>new t.Coin(e.denom,e.amount))}static amountOf(e,t){let r=e.find(e=>e.denom===t);return r?r.amount:new n.Int(0)}static exclude(e,t){return e.filter(e=>t.indexOf(e.denom)===0)}static concat(...e){return e.length===0?[]:e.slice().reduce((e,n)=>{let r=e.find(e=>e.denom===n.denom);if(r){let i=new t.Coin(r.denom,r.amount.add(n.amount));e.push(i)}else{let r=new t.Coin(n.denom,n.amount);e.push(r)}return e},[])}static getCoinFromDecimals(e,n,i){let a=e.find(e=>e.coinDenom===i);if(!a)throw Error(`Invalid currency`);let o=new r.Dec(1);for(let e=0;e<a.coinDecimals;e++)o=o.mul(new r.Dec(10));let s=new r.Dec(n);if(s=s.mul(o),!new r.Dec(s.truncate()).equals(s))throw Error(`Can't divide anymore`);return new t.Coin(a.coinMinimalDenom,s.truncate())}static parseDecAndDenomFromCoin(e,t){let n=e.find(e=>e.coinMinimalDenom===t.denom);n||={coinDecimals:0,coinDenom:t.denom,coinMinimalDenom:t.denom};let i=new r.Dec(1);for(let e=0;e<n.coinDecimals;e++)i=i.mul(new r.Dec(10));return{amount:new r.Dec(t.amount).quoTruncate(i).toString(n.coinDecimals),denom:n.coinDenom}}static shrinkDecimals(t,n,i,a=!1){if(t.equals(new r.Dec(0)))return`0`;let o=t.isNegative(),s=t.abs().truncate(),c=t.abs().sub(new r.Dec(s)),l=Math.max(i-s.toString().length+1,n),u=l===0?``:c.toString(l).replace(`0.`,``),d=a?e.integerStringToUSLocaleString(s.toString()):s.toString();return(o?`-`:``)+d+(u.length>0?`.`:``)+u}static coinToTrimmedString(e,t,n=` `){let a=new r.Dec(e.amount).quoTruncate(i.DecUtils.getPrecisionDec(t.coinDecimals));return`${i.DecUtils.trim(a)}${n}${t.coinDenom}`}};e.CoinUtils=o,o.integerStringToUSLocaleString=a.integerStringToUSLocaleString})),Za=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.IntPretty=void 0;var t=Ga(),n=qa(),r=Ja(),i=Xa();e.IntPretty=class e{constructor(e){if(this.floatingDecimalPointRight=0,this._options={maxDecimals:0,trim:!1,shrink:!1,ready:!0,locale:!0,inequalitySymbol:!1,inequalitySymbolSeparator:` `},typeof e==`object`&&`toDec`in e?e=e.toDec():e instanceof n.Dec||(e=new n.Dec(e)),e.isZero()){this.dec=e;return}let r=e,i=0;for(let e=0;e<18&&!(!r.truncate().equals(new t.Int(0))&&r.equals(new n.Dec(r.truncate())));e++)r=r.mul(new n.Dec(10)),i++;this.dec=e,this._options.maxDecimals=i}get options(){return this._options}moveDecimalPointLeft(e){let t=this.clone();return t.floatingDecimalPointRight+=-e,t}moveDecimalPointRight(e){let t=this.clone();return t.floatingDecimalPointRight+=e,t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t._options.maxDecimals=e,t}inequalitySymbol(e){let t=this.clone();return t._options.inequalitySymbol=e,t}inequalitySymbolSeparator(e){let t=this.clone();return t._options.inequalitySymbolSeparator=e,t}trim(e){let t=this.clone();return t._options.trim=e,t}shrink(e){let t=this.clone();return t._options.shrink=e,t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t._options.ready=e,t}get isReady(){return this._options.ready}add(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().add(t));return r._options=Object.assign({},this._options),r}sub(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().sub(t));return r._options=Object.assign({},this._options),r}mul(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().mul(t));return r._options=Object.assign({},this._options),r}quo(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().quo(t));return r._options=Object.assign({},this._options),r}toDec(){if(this.floatingDecimalPointRight===0)return this.dec;if(this.floatingDecimalPointRight>0)return this.dec.mulTruncate(r.DecUtils.getTenExponentN(this.floatingDecimalPointRight));{let e=-this.floatingDecimalPointRight,t=this.dec;for(;e>0;)if(e>=n.Dec.precision)t=t.mulTruncate(r.DecUtils.getTenExponentN(-n.Dec.precision)),e-=n.Dec.precision;else{t=t.mulTruncate(r.DecUtils.getTenExponentN(-(e%n.Dec.precision)));break}return t}}toString(){return this.toStringWithSymbols(``,``)}toStringWithSymbols(e,t){let n=this.toDec();if(this._options.inequalitySymbol&&!n.isZero()&&n.abs().lt(r.DecUtils.getTenExponentN(-this._options.maxDecimals))){let i=n.isNegative();return`${i?`>`:`<`}${this._options.inequalitySymbolSeparator}${i?`-`:``}${e}${r.DecUtils.getTenExponentN(-this._options.maxDecimals).toString(this._options.maxDecimals,this._options.locale)}${t}`}let a;a=this._options.shrink?i.CoinUtils.shrinkDecimals(n,0,this._options.maxDecimals,this._options.locale):n.toString(this._options.maxDecimals,this._options.locale),this._options.trim&&(a=r.DecUtils.trim(a));let o=a.charAt(0)===`-`;return o&&(a=a.slice(1)),`${o?`-`:``}${e}${a}${t}`}clone(){let t=new e(this.dec);return t.dec=this.dec,t.floatingDecimalPointRight=this.floatingDecimalPointRight,t._options=Object.assign({},this._options),t}}})),Qa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CoinPretty=void 0;var t=Za(),n=qa(),r=Ja();e.CoinPretty=class e{constructor(e,i){this._currency=e,this._options={separator:` `,upperCase:!1,lowerCase:!1,hideDenom:!1,hideIBCMetadata:!1},typeof i==`object`&&`toDec`in i?i=i.toDec():i instanceof n.Dec||(i=new n.Dec(i)),this.intPretty=new t.IntPretty(i.quoTruncate(r.DecUtils.getTenExponentNInPrecisionRange(e.coinDecimals))).maxDecimals(e.coinDecimals)}get options(){return Object.assign(Object.assign({},this._options),this.intPretty.options)}get denom(){return this.currency.coinDenom}get currency(){return this._currency}setCurrency(e){let t=this.clone();return t.intPretty=this.intPretty.moveDecimalPointRight(this._currency.coinDecimals-e.coinDecimals),t._currency=e,t}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}hideDenom(e){let t=this.clone();return t._options.hideDenom=e,t}hideIBCMetadata(e){let t=this.clone();return t._options.hideIBCMetadata=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(t){let n=t instanceof e;if(n&&`currency`in t&&this.currency.coinMinimalDenom!==t.currency.coinMinimalDenom)return this.clone();`toDec`in t&&(t=t.toDec());let i=this.clone();return i.intPretty=i.intPretty.add(n?t:t.mul(r.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),i}sub(t){let n=t instanceof e;if(n&&`currency`in t&&this.currency.coinMinimalDenom!==t.currency.coinMinimalDenom)return this.clone();`toDec`in t&&(t=t.toDec());let i=this.clone();return i.intPretty=i.intPretty.sub(n?t:t.mul(r.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),i}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toCoin(){let e=this.toDec().mulTruncate(r.DecUtils.getTenExponentNInPrecisionRange(this.currency.coinDecimals)).truncate();return{denom:this.currency.coinMinimalDenom,amount:e.toString()}}toString(){let e=this.denom;this._options.hideIBCMetadata&&`originCurrency`in this.currency&&this.currency.originCurrency&&(e=this.currency.originCurrency.coinDenom),this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this._options.separator;return this._options.hideDenom&&(e=``,t=``),this.intPretty.toStringWithSymbols(``,`${t}${e}`)}clone(){let t=new e(this._currency,0);return t._options=Object.assign({},this._options),t.intPretty=this.intPretty.clone(),t}}})),$a=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PricePretty=void 0;var t=Za(),n=Ja();e.PricePretty=class e{constructor(e,n){this._fiatCurrency=e,this._options={separator:``,upperCase:!1,lowerCase:!1,locale:`en-US`},this.intPretty=new t.IntPretty(n).maxDecimals(e.maxDecimals).shrink(!0).trim(!0).locale(!1).inequalitySymbol(!0),this._options.locale=e.locale}get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}get symbol(){return this._fiatCurrency.symbol}get fiatCurrency(){return this._fiatCurrency}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){let e=this.symbol;this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this.toDec(),r=this.options;if(r.inequalitySymbol&&!t.isZero()&&t.abs().lt(n.DecUtils.getTenExponentN(-r.maxDecimals)))return this.intPretty.toStringWithSymbols(`${e}${this._options.separator}`,``);let i=parseFloat(this.intPretty.toString()).toLocaleString(r.locale,{maximumFractionDigits:r.maxDecimals}),a=i.charAt(0)===`-`;return a&&(i=i.slice(1)),`${a?`-`:``}${e}${this._options.separator}${i}`}clone(){let t=new e(this._fiatCurrency,0);return t._options=Object.assign({},this._options),t.intPretty=this.intPretty.clone(),t}}})),eo=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RatePretty=void 0;var t=Za();e.RatePretty=class e{constructor(e){this._options={separator:``,symbol:`%`},this.intPretty=new t.IntPretty(e),this.intPretty=this.intPretty.maxDecimals(3).shrink(!1).trim(!0).locale(!0).inequalitySymbol(!0)}get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}separator(e){let t=this.clone();return t._options.separator=e,t}symbol(e){let t=this.clone();return t._options.symbol=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){return this.intPretty.moveDecimalPointRight(2).toStringWithSymbols(``,`${this._options.separator}${this._options.symbol}`)}clone(){let t=new e(0);return t._options=Object.assign({},this._options),t.intPretty=this.intPretty.clone(),t}}})),to=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Za(),e),n(Qa(),e),n(Ya(),e),n(Ga(),e),n(qa(),e),n(Xa(),e),n(Ja(),e),n($a(),e),n(eo(),e)})),no=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isSimpleFetchError=e.SimpleFetchError=void 0;var t=class e extends Error{constructor(t,n,r){super(`Failed to get response from ${new URL(n,t).toString()}`),this.baseURL=t,this.url=n,this.response=r,Object.setPrototypeOf(this,e.prototype)}};e.SimpleFetchError=t;function n(e){return e instanceof t}e.isSimpleFetchError=n})),ro=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(e,`__esModule`,{value:!0}),e.simpleFetch=e.makeURL=void 0;var r=no();function i(e,t){let n=new URL(e);return e=o(n.origin),t=o(n.pathname)+`/`+a(t),o(e+`/`+a(t))}e.makeURL=i;function a(e){return e.length>0&&e[0]===`/`?e.slice(1):e}function o(e){return e.length>0&&e[e.length-1]===`/`?e.slice(0,e.length-1):e}function s(e,a,o){return t(this,void 0,void 0,function*(){typeof a!=`string`&&(a&&(o=a),a=``),a===`/`&&(a=``);let t=i(e,a),s=o||{},{headers:l}=s,u=n(s,[`headers`]),d=yield fetch(t,Object.assign({headers:Object.assign({accept:`application/json, text/plain, */*`},l)},u)),f;if((d.headers.get(`content-type`)||``).startsWith(`application/json`))f=yield d.json();else{let e=yield d.text(),t=e.trim();f=t.startsWith(`{`)&&t.endsWith(`}`)?JSON.parse(t):e}let p={url:t,data:f,headers:d.headers,status:d.status,statusText:d.statusText};if(!(o?.validateStatus||c)(d.status))throw new r.SimpleFetchError(e,a,p);return p})}e.simpleFetch=s;function c(e){return e===200}})),io=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ao=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(ro(),e),n(no(),e),n(io(),e)})),oo=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.BaseAccount=void 0;var n=to(),r=ao();e.BaseAccount=class e{static fetchFromRest(n,i,a=!1){return t(this,void 0,void 0,function*(){let t=yield(0,r.simpleFetch)(n,`/cosmos/auth/v1beta1/accounts/${i}`,{validateStatus:function(e){return e>=200&&e<300||e===404}});return e.fromProtoJSON(t.data,a?i:``)})}static fromProtoJSON(t,r=``){if(!t.account){if(!r)throw Error(`Account's address is unknown: ${JSON.stringify(t)}`);return new e(``,r,new n.Int(0),new n.Int(0))}let i=t.account,a=i[`@type`]||``,o=i.BaseAccount||i.baseAccount||i.base_account;o&&(i=o);let s=i.account;s&&(i=s);let c=i.BaseVestingAccount||i.baseVestingAccount||i.base_vesting_account;if(c){i=c;let e=i.BaseAccount||i.baseAccount||i.base_account;e&&(i=e)}let l=i.address;if(!l){if(!r)throw Error(`Account's address is unknown: ${JSON.stringify(t)}`);l=r}let u=i.account_number,d=i.sequence;return new e(a,l,new n.Int(u||`0`),new n.Int(d||`0`))}constructor(e,t,n,r){this.type=e,this.address=t,this.accountNumber=n,this.sequence=r}getType(){return this.type}getAddress(){return this.address}getAccountNumber(){return this.accountNumber}getSequence(){return this.sequence}}})),so,co=t((()=>{so=`logger/5.8.0`}));function lo(){try{let e=[];if([`NFD`,`NFC`,`NFKD`,`NFKC`].forEach(t=>{try{if(`test`.normalize(t)!==`test`)throw Error(`bad normalize`)}catch{e.push(t)}}),e.length)throw Error(`missing `+e.join(`, `));if(`é`.normalize(`NFD`)!==`é`)throw Error(`broken implementation`)}catch(e){return e.message}return null}var uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo=t((()=>{co(),uo=!1,fo=!1,po={debug:1,default:2,info:2,warning:3,error:4,off:5},mo=po.default,ho=null,go=lo(),(function(e){e.DEBUG=`DEBUG`,e.INFO=`INFO`,e.WARNING=`WARNING`,e.ERROR=`ERROR`,e.OFF=`OFF`})(_o||={}),(function(e){e.UNKNOWN_ERROR=`UNKNOWN_ERROR`,e.NOT_IMPLEMENTED=`NOT_IMPLEMENTED`,e.UNSUPPORTED_OPERATION=`UNSUPPORTED_OPERATION`,e.NETWORK_ERROR=`NETWORK_ERROR`,e.SERVER_ERROR=`SERVER_ERROR`,e.TIMEOUT=`TIMEOUT`,e.BUFFER_OVERRUN=`BUFFER_OVERRUN`,e.NUMERIC_FAULT=`NUMERIC_FAULT`,e.MISSING_NEW=`MISSING_NEW`,e.INVALID_ARGUMENT=`INVALID_ARGUMENT`,e.MISSING_ARGUMENT=`MISSING_ARGUMENT`,e.UNEXPECTED_ARGUMENT=`UNEXPECTED_ARGUMENT`,e.CALL_EXCEPTION=`CALL_EXCEPTION`,e.INSUFFICIENT_FUNDS=`INSUFFICIENT_FUNDS`,e.NONCE_EXPIRED=`NONCE_EXPIRED`,e.REPLACEMENT_UNDERPRICED=`REPLACEMENT_UNDERPRICED`,e.UNPREDICTABLE_GAS_LIMIT=`UNPREDICTABLE_GAS_LIMIT`,e.TRANSACTION_REPLACED=`TRANSACTION_REPLACED`,e.ACTION_REJECTED=`ACTION_REJECTED`})(vo||={}),yo=`0123456789abcdef`,bo=class e{constructor(e){Object.defineProperty(this,`version`,{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();po[n]??this.throwArgumentError(`invalid log level name`,`logLevel`,e),!(mo>po[n])&&console.log.apply(console,t)}debug(...t){this._log(e.levels.DEBUG,t)}info(...t){this._log(e.levels.INFO,t)}warn(...t){this._log(e.levels.WARNING,t)}makeError(t,n,r){if(fo)return this.makeError(`censored error`,n,{});n||=e.errors.UNKNOWN_ERROR,r||={};let i=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let n=``;for(let e=0;e<t.length;e++)n+=yo[t[e]>>4],n+=yo[t[e]&15];i.push(e+`=Uint8Array(0x`+n+`)`)}else i.push(e+`=`+JSON.stringify(t))}catch{i.push(e+`=`+JSON.stringify(r[e].toString()))}}),i.push(`code=${n}`),i.push(`version=${this.version}`);let a=t,o=``;switch(n){case vo.NUMERIC_FAULT:{o=`NUMERIC_FAULT`;let e=t;switch(e){case`overflow`:case`underflow`:case`division-by-zero`:o+=`-`+e;break;case`negative-power`:case`negative-width`:o+=`-unsupported`;break;case`unbound-bitwise-result`:o+=`-unbound-result`;break}break}case vo.CALL_EXCEPTION:case vo.INSUFFICIENT_FUNDS:case vo.MISSING_NEW:case vo.NONCE_EXPIRED:case vo.REPLACEMENT_UNDERPRICED:case vo.TRANSACTION_REPLACED:case vo.UNPREDICTABLE_GAS_LIMIT:o=n;break}o&&(t+=` [ See: https://links.ethers.org/v5-errors-`+o+` ]`),i.length&&(t+=` (`+i.join(`, `)+`)`);let s=Error(t);return s.reason=a,s.code=n,Object.keys(r).forEach(function(e){s[e]=r[e]}),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(t,n,r){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:n,value:r})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(t){t??=`platform missing String.prototype.normalize`,go&&this.throwError(`platform missing String.prototype.normalize`,e.errors.UNSUPPORTED_OPERATION,{operation:`String.prototype.normalize`,form:go})}checkSafeUint53(t,n){typeof t==`number`&&(n??=`value not safe`,(t<0||t>=9007199254740991)&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:`checkSafeInteger`,fault:`out-of-safe-range`,value:t}),t%1&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:`checkSafeInteger`,fault:`non-integer`,value:t}))}checkArgumentCount(t,n,r){r=r?`: `+r:``,t<n&&this.throwError(`missing argument`+r,e.errors.MISSING_ARGUMENT,{count:t,expectedCount:n}),t>n&&this.throwError(`too many arguments`+r,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}checkNew(t,n){(t===Object||t==null)&&this.throwError(`missing new`,e.errors.MISSING_NEW,{name:n.name})}checkAbstract(t,n){t===n?this.throwError(`cannot instantiate abstract class `+JSON.stringify(n.name)+` directly; use a sub-class`,e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:`new`}):(t===Object||t==null)&&this.throwError(`missing new`,e.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return ho||=new e(so),ho}static setCensorship(t,n){if(!t&&n&&this.globalLogger().throwError(`cannot permanently disable censorship`,e.errors.UNSUPPORTED_OPERATION,{operation:`setCensorship`}),uo){if(!t)return;this.globalLogger().throwError(`error censorship permanent`,e.errors.UNSUPPORTED_OPERATION,{operation:`setCensorship`})}fo=!!t,uo=!!n}static setLogLevel(t){let n=po[t.toLowerCase()];if(n==null){e.globalLogger().warn(`invalid log level - `+t);return}mo=n}static from(t){return new e(t)}},bo.errors=vo,bo.levels=_o})),So,Co=t((()=>{So=`bytes/5.8.0`}));function wo(e){return!!e.toHexString}function To(e){return e.slice||=function(){let t=Array.prototype.slice.call(arguments);return To(new Uint8Array(Array.prototype.slice.apply(e,t)))},e}function Eo(e){return Mo(e)&&!(e.length%2)||Oo(e)}function Do(e){return typeof e==`number`&&e==e&&e%1==0}function Oo(e){if(e==null)return!1;if(e.constructor===Uint8Array)return!0;if(typeof e==`string`||!Do(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let n=e[t];if(!Do(n)||n<0||n>=256)return!1}return!0}function ko(e,t){if(t||={},typeof e==`number`){Io.checkSafeUint53(e,`invalid arrayify value`);let t=[];for(;e;)t.unshift(e&255),e=parseInt(String(e/256));return t.length===0&&t.push(0),To(new Uint8Array(t))}if(t.allowMissingPrefix&&typeof e==`string`&&e.substring(0,2)!==`0x`&&(e=`0x`+e),wo(e)&&(e=e.toHexString()),Mo(e)){let n=e.substring(2);n.length%2&&(t.hexPad===`left`?n=`0`+n:t.hexPad===`right`?n+=`0`:Io.throwArgumentError(`hex data is odd-length`,`value`,e));let r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(n.substring(e,e+2),16));return To(new Uint8Array(r))}return Oo(e)?To(new Uint8Array(e)):Io.throwArgumentError(`invalid arrayify value`,`value`,e)}function Ao(e){let t=e.map(e=>ko(e)),n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);return t.reduce((e,t)=>(r.set(t,e),e+t.length),0),To(r)}function jo(e){let t=ko(e);if(t.length===0)return t;let n=0;for(;n<t.length&&t[n]===0;)n++;return n&&(t=t.slice(n)),t}function Mo(e,t){return!(typeof e!=`string`||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function No(e,t){if(t||={},typeof e==`number`){Io.checkSafeUint53(e,`invalid hexlify value`);let t=``;for(;e;)t=Lo[e&15]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t=`0`+t),`0x`+t):`0x00`}if(typeof e==`bigint`)return e=e.toString(16),e.length%2?`0x0`+e:`0x`+e;if(t.allowMissingPrefix&&typeof e==`string`&&e.substring(0,2)!==`0x`&&(e=`0x`+e),wo(e))return e.toHexString();if(Mo(e))return e.length%2&&(t.hexPad===`left`?e=`0x0`+e.substring(2):t.hexPad===`right`?e+=`0`:Io.throwArgumentError(`hex data is odd-length`,`value`,e)),e.toLowerCase();if(Oo(e)){let t=`0x`;for(let n=0;n<e.length;n++){let r=e[n];t+=Lo[(r&240)>>4]+Lo[r&15]}return t}return Io.throwArgumentError(`invalid hexlify value`,`value`,e)}function Po(e){if(typeof e!=`string`)e=No(e);else if(!Mo(e)||e.length%2)return null;return(e.length-2)/2}function Fo(e,t,n){return typeof e==`string`?(!Mo(e)||e.length%2)&&Io.throwArgumentError(`invalid hexData`,`value`,e):e=No(e),t=2+2*t,n==null?`0x`+e.substring(t):`0x`+e.substring(t,2+2*n)}var Io,Lo,Ro=t((()=>{xo(),Co(),Io=new bo(So),Lo=`0123456789abcdef`})),zo,Bo=t((()=>{zo=`bignumber/5.8.0`}));function Vo(e){if(typeof e!=`string`)return Vo(e.toString(16));if(e[0]===`-`)return e=e.substring(1),e[0]===`-`&&Jo.throwArgumentError(`invalid hex`,`value`,e),e=Vo(e),e===`0x00`?e:`-`+e;if(e.substring(0,2)!==`0x`&&(e=`0x`+e),e===`0x`)return`0x00`;for(e.length%2&&(e=`0x0`+e.substring(2));e.length>4&&e.substring(0,4)===`0x00`;)e=`0x`+e.substring(4);return e}function Ho(e){return Qo.from(Vo(e))}function G(e){let t=Qo.from(e).toHexString();return t[0]===`-`?new qo(`-`+t.substring(3),16):new qo(t.substring(2),16)}function Uo(e,t,n){let r={fault:e,operation:t};return n!=null&&(r.value=n),Jo.throwError(e,bo.errors.NUMERIC_FAULT,r)}function Wo(e){return new qo(e,36).toString(16)}function Go(e){return new qo(e,16).toString(36)}var Ko,qo,Jo,Yo,Xo,Zo,Qo,$o=t((()=>{Ko=i(O()),Ro(),xo(),Bo(),qo=Ko.default.BN,Jo=new bo(zo),Yo={},Xo=9007199254740991,Zo=!1,Qo=class e{constructor(e,t){e!==Yo&&Jo.throwError(`cannot call constructor directly; use BigNumber.from`,bo.errors.UNSUPPORTED_OPERATION,{operation:`new (BigNumber)`}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Ho(G(this).fromTwos(e))}toTwos(e){return Ho(G(this).toTwos(e))}abs(){return this._hex[0]===`-`?e.from(this._hex.substring(1)):this}add(e){return Ho(G(this).add(G(e)))}sub(e){return Ho(G(this).sub(G(e)))}div(t){return e.from(t).isZero()&&Uo(`division-by-zero`,`div`),Ho(G(this).div(G(t)))}mul(e){return Ho(G(this).mul(G(e)))}mod(e){let t=G(e);return t.isNeg()&&Uo(`division-by-zero`,`mod`),Ho(G(this).umod(t))}pow(e){let t=G(e);return t.isNeg()&&Uo(`negative-power`,`pow`),Ho(G(this).pow(t))}and(e){let t=G(e);return(this.isNegative()||t.isNeg())&&Uo(`unbound-bitwise-result`,`and`),Ho(G(this).and(t))}or(e){let t=G(e);return(this.isNegative()||t.isNeg())&&Uo(`unbound-bitwise-result`,`or`),Ho(G(this).or(t))}xor(e){let t=G(e);return(this.isNegative()||t.isNeg())&&Uo(`unbound-bitwise-result`,`xor`),Ho(G(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&Uo(`negative-width`,`mask`),Ho(G(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Uo(`negative-width`,`shl`),Ho(G(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Uo(`negative-width`,`shr`),Ho(G(this).shrn(e))}eq(e){return G(this).eq(G(e))}lt(e){return G(this).lt(G(e))}lte(e){return G(this).lte(G(e))}gt(e){return G(this).gt(G(e))}gte(e){return G(this).gte(G(e))}isNegative(){return this._hex[0]===`-`}isZero(){return G(this).isZero()}toNumber(){try{return G(this).toNumber()}catch{Uo(`overflow`,`toNumber`,this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Jo.throwError(`this platform does not support BigInt`,bo.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Zo||(Zo=!0,Jo.warn(`BigNumber.toString does not accept any parameters; base-10 is assumed`)):arguments[0]===16?Jo.throwError(`BigNumber.toString does not accept any parameters; use bigNumber.toHexString()`,bo.errors.UNEXPECTED_ARGUMENT,{}):Jo.throwError(`BigNumber.toString does not accept parameters`,bo.errors.UNEXPECTED_ARGUMENT,{})),G(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:`BigNumber`,hex:this.toHexString()}}static from(t){if(t instanceof e)return t;if(typeof t==`string`)return t.match(/^-?0x[0-9a-f]+$/i)?new e(Yo,Vo(t)):t.match(/^-?[0-9]+$/)?new e(Yo,Vo(new qo(t))):Jo.throwArgumentError(`invalid BigNumber string`,`value`,t);if(typeof t==`number`)return t%1&&Uo(`underflow`,`BigNumber.from`,t),(t>=Xo||t<=-Xo)&&Uo(`overflow`,`BigNumber.from`,t),e.from(String(t));let n=t;if(typeof n==`bigint`)return e.from(n.toString());if(Oo(n))return e.from(No(n));if(n)if(n.toHexString){let t=n.toHexString();if(typeof t==`string`)return e.from(t)}else{let t=n._hex;if(t==null&&n.type===`BigNumber`&&(t=n.hex),typeof t==`string`&&(Mo(t)||t[0]===`-`&&Mo(t.substring(1))))return e.from(t)}return Jo.throwArgumentError(`invalid BigNumber value`,`value`,t)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}})),es=t((()=>{$o(),Ro(),xo(),Bo()})),ts=a(((e,t)=>{h(),s(),(function(){var e=`input is invalid type`,n=`finalize already called`,r=typeof window==`object`,i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var a=!r&&typeof self==`object`;!i.JS_SHA3_NO_NODE_JS&&typeof o==`object`&&o.versions&&o.versions.node?i=g:a&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&typeof t==`object`&&t.exports,c=typeof define==`function`&&define.amd,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,u=`0123456789abcdef`.split(``),d=[31,7936,2031616,520093696],f=[4,1024,262144,67108864],p=[1,256,65536,16777216],m=[6,1536,393216,100663296],h=[0,8,16,24],_=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],y=[128,256],b=[`hex`,`buffer`,`arrayBuffer`,`array`,`digest`],x={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)===`[object Array]`}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var S=function(e,t,n){return function(r){return new L(e,t,e).update(r)[n]()}},C=function(e,t,n){return function(r,i){return new L(e,t,i).update(r)[n]()}},w=function(e,t,n){return function(t,r,i,a){return k[`cshake`+e].update(t,r,i,a)[n]()}},T=function(e,t,n){return function(t,r,i,a){return k[`kmac`+e].update(t,r,i,a)[n]()}},E=function(e,t,n,r){for(var i=0;i<b.length;++i){var a=b[i];e[a]=t(n,r,a)}return e},D=function(e,t){var n=S(e,t,`hex`);return n.create=function(){return new L(e,t,e)},n.update=function(e){return n.create().update(e)},E(n,S,e,t)},O=[{name:`keccak`,padding:p,bits:v,createMethod:D},{name:`sha3`,padding:m,bits:v,createMethod:D},{name:`shake`,padding:d,bits:y,createMethod:function(e,t){var n=C(e,t,`hex`);return n.create=function(n){return new L(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},E(n,C,e,t)}},{name:`cshake`,padding:f,bits:y,createMethod:function(e,t){var n=x[e],r=w(e,t,`hex`);return r.create=function(r,i,a){return!i&&!a?k[`shake`+e].create(r):new L(e,t,r).bytepad([i,a],n)},r.update=function(e,t,n,i){return r.create(t,n,i).update(e)},E(r,w,e,t)}},{name:`kmac`,padding:f,bits:y,createMethod:function(e,t){var n=x[e],r=T(e,t,`hex`);return r.create=function(r,i,a){return new R(e,t,i).bytepad([`KMAC`,a],n).bytepad([r],n)},r.update=function(e,t,n,i){return r.create(e,n,i).update(t)},E(r,T,e,t)}}],k={},A=[],j=0;j<O.length;++j)for(var M=O[j],N=M.bits,P=0;P<N.length;++P){var F=M.name+`_`+N[P];if(A.push(F),k[F]=M.createMethod(N[P],M.padding),M.name!==`sha3`){var I=M.name+N[P];A.push(I),k[I]=k[F]}}function L(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(n&31)>>3;for(var r=0;r<50;++r)this.s[r]=0}L.prototype.update=function(t){if(this.finalized)throw Error(n);var r,i=typeof t;if(i!==`string`){if(i===`object`){if(t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);r=!0}for(var a=this.blocks,o=this.byteCount,s=t.length,c=this.blockCount,u=0,d=this.s,f,p;u<s;){if(this.reset)for(this.reset=!1,a[0]=this.block,f=1;f<c+1;++f)a[f]=0;if(r)for(f=this.start;u<s&&f<o;++u)a[f>>2]|=t[u]<<h[f++&3];else for(f=this.start;u<s&&f<o;++u)p=t.charCodeAt(u),p<128?a[f>>2]|=p<<h[f++&3]:p<2048?(a[f>>2]|=(192|p>>6)<<h[f++&3],a[f>>2]|=(128|p&63)<<h[f++&3]):p<55296||p>=57344?(a[f>>2]|=(224|p>>12)<<h[f++&3],a[f>>2]|=(128|p>>6&63)<<h[f++&3],a[f>>2]|=(128|p&63)<<h[f++&3]):(p=65536+((p&1023)<<10|t.charCodeAt(++u)&1023),a[f>>2]|=(240|p>>18)<<h[f++&3],a[f>>2]|=(128|p>>12&63)<<h[f++&3],a[f>>2]|=(128|p>>6&63)<<h[f++&3],a[f>>2]|=(128|p&63)<<h[f++&3]);if(this.lastByteIndex=f,f>=o){for(this.start=f-o,this.block=a[c],f=0;f<c;++f)d[f]^=a[f];ee(d),this.reset=!0}else this.start=f}return this},L.prototype.encode=function(e,t){var n=e&255,r=1,i=[n];for(e>>=8,n=e&255;n>0;)i.unshift(n),e>>=8,n=e&255,++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},L.prototype.encodeString=function(t){var n,r=typeof t;if(r!==`string`){if(r===`object`){if(t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);n=!0}var i=0,a=t.length;if(n)i=a;else for(var o=0;o<t.length;++o){var s=t.charCodeAt(o);s<128?i+=1:s<2048?i+=2:s<55296||s>=57344?i+=3:(s=65536+((s&1023)<<10|t.charCodeAt(++o)&1023),i+=4)}return i+=this.encode(i*8),this.update(t),i},L.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var i=t-n%t,a=[];return a.length=i,this.update(a),this},L.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[t&3],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];ee(r)}},L.prototype.toString=L.prototype.hex=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,a=0,o=``,s;a<n;){for(i=0;i<e&&a<n;++i,++a)s=t[i],o+=u[s>>4&15]+u[s&15]+u[s>>12&15]+u[s>>8&15]+u[s>>20&15]+u[s>>16&15]+u[s>>28&15]+u[s>>24&15];a%e===0&&(ee(t),i=0)}return r&&(s=t[i],o+=u[s>>4&15]+u[s&15],r>1&&(o+=u[s>>12&15]+u[s>>8&15]),r>2&&(o+=u[s>>20&15]+u[s>>16&15])),o},L.prototype.arrayBuffer=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,a=0,o=this.outputBits>>3,s=r?new ArrayBuffer(n+1<<2):new ArrayBuffer(o),c=new Uint32Array(s);a<n;){for(i=0;i<e&&a<n;++i,++a)c[a]=t[i];a%e===0&&ee(t)}return r&&(c[i]=t[i],s=s.slice(0,o)),s},L.prototype.buffer=L.prototype.arrayBuffer,L.prototype.digest=L.prototype.array=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,a=0,o=[],s,c;a<n;){for(i=0;i<e&&a<n;++i,++a)s=a<<2,c=t[i],o[s]=c&255,o[s+1]=c>>8&255,o[s+2]=c>>16&255,o[s+3]=c>>24&255;a%e===0&&ee(t)}return r&&(s=a<<2,c=t[i],o[s]=c&255,r>1&&(o[s+1]=c>>8&255),r>2&&(o[s+2]=c>>16&255)),o};function R(e,t,n){L.call(this,e,t,n)}R.prototype=new L,R.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)};var ee=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,z,be,xe,Se,Ce,we;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],p=e[9]^e[19]^e[29]^e[39]^e[49],t=f^(o<<1|s>>>31),n=p^(s<<1|o>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(c<<1|l>>>31),n=a^(l<<1|c>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=o^(u<<1|d>>>31),n=s^(d<<1|u>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=c^(f<<1|p>>>31),n=l^(p<<1|f>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=u^(i<<1|a>>>31),n=d^(a<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,m=e[0],h=e[1],ce=e[11]<<4|e[10]>>>28,le=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,A=e[21]<<3|e[20]>>>29,xe=e[31]<<9|e[30]>>>23,Se=e[30]<<9|e[31]>>>23,ie=e[40]<<18|e[41]>>>14,ae=e[41]<<18|e[40]>>>14,F=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,ue=e[22]<<10|e[23]>>>22,de=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,Ce=e[42]<<2|e[43]>>>30,we=e[43]<<2|e[42]>>>30,ge=e[5]<<30|e[4]>>>2,_e=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,R=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,b=e[24]<<11|e[25]>>>21,fe=e[34]<<15|e[35]>>>17,pe=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,ve=e[17]<<23|e[16]>>>9,ye=e[16]<<23|e[17]>>>9,ee=e[26]<<25|e[27]>>>7,te=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,me=e[47]<<24|e[46]>>>8,he=e[46]<<24|e[47]>>>8,oe=e[8]<<27|e[9]>>>5,se=e[9]<<27|e[8]>>>5,D=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,z=e[29]<<7|e[28]>>>25,be=e[28]<<7|e[29]>>>25,ne=e[38]<<8|e[39]>>>24,re=e[39]<<8|e[38]>>>24,C=e[48]<<14|e[49]>>>18,w=e[49]<<14|e[48]>>>18,e[0]=m^~g&y,e[1]=h^~v&b,e[10]=T^~D&k,e[11]=E^~O&A,e[20]=F^~L&ee,e[21]=I^~R&te,e[30]=oe^~ce&ue,e[31]=se^~le&de,e[40]=ge^~ve&z,e[41]=_e^~ye&be,e[2]=g^~y&x,e[3]=v^~b&S,e[12]=D^~k&j,e[13]=O^~A&M,e[22]=L^~ee&ne,e[23]=R^~te&re,e[32]=ce^~ue&fe,e[33]=le^~de&pe,e[42]=ve^~z&xe,e[43]=ye^~be&Se,e[4]=y^~x&C,e[5]=b^~S&w,e[14]=k^~j&N,e[15]=A^~M&P,e[24]=ee^~ne&ie,e[25]=te^~re&ae,e[34]=ue^~fe&me,e[35]=de^~pe&he,e[44]=z^~xe&Ce,e[45]=be^~Se&we,e[6]=x^~C&m,e[7]=S^~w&h,e[16]=j^~N&T,e[17]=M^~P&E,e[26]=ne^~ie&F,e[27]=re^~ae&I,e[36]=fe^~me&oe,e[37]=pe^~he&se,e[46]=xe^~Ce&ge,e[47]=Se^~we&_e,e[8]=C^~m&g,e[9]=w^~h&v,e[18]=N^~T&D,e[19]=P^~E&O,e[28]=ie^~F&L,e[29]=ae^~I&R,e[38]=me^~oe&ce,e[39]=he^~se&le,e[48]=Ce^~ge&ve,e[49]=we^~_e&ye,e[0]^=_[r],e[1]^=_[r+1]};if(s)t.exports=k;else{for(j=0;j<A.length;++j)i[A[j]]=k[A[j]];c&&define(function(){return k})}})()})),ns=r({keccak256:()=>rs});function rs(e){return`0x`+is.default.keccak_256(ko(e))}var is,as=t((()=>{is=i(ts()),Ro()})),os,ss=t((()=>{os=`rlp/5.8.0`}));function cs(e){let t=[];for(;e;)t.unshift(e&255),e>>=8;return t}function ls(e){if(Array.isArray(e)){let t=[];if(e.forEach(function(e){t=t.concat(ls(e))}),t.length<=55)return t.unshift(192+t.length),t;let n=cs(t.length);return n.unshift(247+n.length),n.concat(t)}Eo(e)||ds.throwArgumentError(`RLP object must be BytesLike`,`object`,e);let t=Array.prototype.slice.call(ko(e));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;let n=cs(t.length);return n.unshift(183+n.length),n.concat(t)}function us(e){return No(ls(e))}var ds,fs=t((()=>{Ro(),xo(),ss(),ds=new bo(os)})),ps,ms=t((()=>{ps=`address/5.8.0`})),hs=r({getAddress:()=>ys,getContractAddress:()=>Ss,getCreate2Address:()=>Cs,getIcapAddress:()=>xs,isAddress:()=>bs});function gs(e){Mo(e,20)||ws.throwArgumentError(`invalid address`,`address`,e),e=e.toLowerCase();let t=e.substring(2).split(``),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);let r=ko(rs(n));for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(r[e>>1]&15)>=8&&(t[e+1]=t[e+1].toUpperCase());return`0x`+t.join(``)}function _s(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}function vs(e){e=e.toUpperCase(),e=e.substring(4)+e.substring(0,2)+`00`;let t=e.split(``).map(e=>Es[e]).join(``);for(;t.length>=Ds;){let e=t.substring(0,Ds);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n=`0`+n;return n}function ys(e){let t=null;if(typeof e!=`string`&&ws.throwArgumentError(`invalid address`,`address`,e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))e.substring(0,2)!==`0x`&&(e=`0x`+e),t=gs(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&ws.throwArgumentError(`bad address checksum`,`address`,e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==vs(e)&&ws.throwArgumentError(`bad icap checksum`,`address`,e),t=Wo(e.substring(4));t.length<40;)t=`0`+t;t=gs(`0x`+t)}else ws.throwArgumentError(`invalid address`,`address`,e);return t}function bs(e){try{return ys(e),!0}catch{}return!1}function xs(e){let t=Go(ys(e).substring(2)).toUpperCase();for(;t.length<30;)t=`0`+t;return`XE`+vs(`XE00`+t)+t}function Ss(e){let t=null;try{t=ys(e.from)}catch{ws.throwArgumentError(`missing from address`,`transaction`,e)}let n=jo(ko(Qo.from(e.nonce).toHexString()));return ys(Fo(rs(us([t,n])),12))}function Cs(e,t,n){return Po(t)!==32&&ws.throwArgumentError(`salt must be 32 bytes`,`salt`,t),Po(n)!==32&&ws.throwArgumentError(`initCodeHash must be 32 bytes`,`initCodeHash`,n),ys(Fo(rs(Ao([`0xff`,ys(e),t,n])),12))}var ws,Ts,Es,Ds,Os=t((()=>{Ro(),es(),as(),fs(),xo(),ms(),ws=new bo(ps),Ts=9007199254740991,Es={};for(let e=0;e<10;e++)Es[String(e)]=String(e);for(let e=0;e<26;e++)Es[String.fromCharCode(65+e)]=String(10+e);Ds=Math.floor(_s(Ts))})),ks=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,`__esModule`,{value:!0}),e.Bech32Address=void 0;var a=i(xn()),o=(x(),n(S)),s=(Os(),n(hs));e.Bech32Address=class e{static shortenAddress(e,t){if(t>=e.length)return e;let n=e.indexOf(`1`),r=e.slice(0,n),i=e.slice(n+1);if(t-=r.length,t-=3,--t,t<=0)return``;let a=Math.floor(i.length/2),o=i.slice(0,a),s=i.slice(a);for(;t<o.length+s.length;)(o.length+s.length)%2==1&&o.length>0?o=o.slice(0,o.length-1):s=s.slice(1);return r+`1`+o+`...`+s}static fromBech32(t,n){let r=a.default.decode(t);if(n&&r.prefix!==n)throw Error(`Unmatched prefix`);return new e(new Uint8Array((0,a.fromWords)(r.words)))}static validate(e,t){let{prefix:n}=a.default.decode(e);if(t&&t!==n)throw Error(`Unexpected prefix (expected: ${t}, actual: ${n})`)}static defaultBech32Config(e,t=`val`,n=`cons`,r=`pub`,i=`oper`){return{bech32PrefixAccAddr:e,bech32PrefixAccPub:e+r,bech32PrefixValAddr:e+t+i,bech32PrefixValPub:e+t+i+r,bech32PrefixConsAddr:e+t+n,bech32PrefixConsPub:e+t+n+r}}constructor(e){this.address=e}toBech32(e){let t=a.default.toWords(this.address);return a.default.encode(e,t)}toHex(e=!0){let t=o.Buffer.from(this.address).toString(`hex`);if(t.length===0)throw Error(`Empty address`);return e?(0,s.getAddress)(`0x`+t):`0x`+t}}})),As=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ChainIdHelper=void 0;var t=class e{static parse(t){if(t===`injective-777`||t===`injective-888`)return{identifier:t,version:0};let n=t.split(e.VersionFormatRegExp).filter(Boolean);return n.length===2?{identifier:n[0],version:parseInt(n[1])}:{identifier:t,version:0}}static hasChainVersion(t){return e.parse(t).identifier!==t}};e.ChainIdHelper=t,t.VersionFormatRegExp=/(.+)-([\d]+)/})),js=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EthermintChainIdHelper=void 0;var t=As();e.EthermintChainIdHelper=class{static parse(e){let n=t.ChainIdHelper.parse(e);if(e.startsWith(`injective`))return[`injective-777`,`injective-888`].includes(e)?Object.assign({ethChainId:5},n):Object.assign({ethChainId:1},n);let r=e.match(`^([a-z]{1,})_{1}([1-9][0-9]*)-{1}([1-9][0-9]*)$`);if(!r||r.length!==4||r[1]===``||Number.isNaN(parseFloat(r[2]))||!Number.isInteger(parseFloat(r[2])))throw Error(`Invalid chainId for ethermint: ${e}`);return Object.assign(Object.assign({},n),{ethChainId:parseFloat(r[2])})}}})),Ms=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(As(),e),n(js(),e)})),Ns=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WsReadyState=void 0,(function(e){e[e.CONNECTING=0]=`CONNECTING`,e[e.OPEN=1]=`OPEN`,e[e.CLOSING=2]=`CLOSING`,e[e.CLOSED=3]=`CLOSED`,e[e.NONE=4]=`NONE`})(e.WsReadyState||={})})),Ps=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TendermintTxTracer=void 0;var t=Ns(),r=(x(),n(S));e.TendermintTxTracer=class{constructor(e,t,n={}){this.url=e,this.wsEndpoint=t,this.options=n,this.newBlockSubscribes=[],this.txSubscribes=new Map,this.pendingQueries=new Map,this.listeners={},this.onOpen=e=>{this.newBlockSubscribes.length>0&&this.sendSubscribeBlockRpc();for(let[e,t]of this.txSubscribes)this.sendSubscribeTxRpc(e,t.params);for(let[e,t]of this.pendingQueries)this.sendQueryRpc(e,t.method,t.params);for(let t of this.listeners.open??[])t(e)},this.onMessage=e=>{for(let t of this.listeners.message??[])t(e);if(e.data)try{let t=JSON.parse(e.data);if(t?.id&&this.pendingQueries.has(t.id)&&(t.error?this.pendingQueries.get(t.id).rejector(Error(t.error.data||t.error.message)):t.result?.tx_result?this.pendingQueries.get(t.id).resolver(t.result.tx_result):this.pendingQueries.get(t.id).resolver(t.result),this.pendingQueries.delete(t.id)),t?.result?.data?.type===`tendermint/event/NewBlock`)for(let e of this.newBlockSubscribes)e.handler(t.result.data.value);t?.result?.data?.type===`tendermint/event/Tx`&&t?.id&&this.txSubscribes.has(t.id)&&(t.error?this.txSubscribes.get(t.id).rejector(Error(t.error.data||t.error.message)):this.txSubscribes.get(t.id).resolver(t.result.data.value.TxResult.result),this.txSubscribes.delete(t.id))}catch{}},this.onClose=e=>{for(let t of this.listeners.close??[])t(e)},this.ws=this.options.wsObject?new this.options.wsObject(this.getWsEndpoint()):new WebSocket(this.getWsEndpoint()),this.ws.onopen=this.onOpen,this.ws.onmessage=this.onMessage,this.ws.onclose=this.onClose}getWsEndpoint(){let e=this.url;if(e.startsWith(`http`)&&(e=e.replace(`http`,`ws`)),!e.endsWith(this.wsEndpoint)){let t=this.wsEndpoint.startsWith(`/`)?this.wsEndpoint:`/`+this.wsEndpoint;e=e.endsWith(`/`)?e+t.slice(1):e+t}return e}close(){this.ws.close()}get readyState(){switch(this.ws.readyState){case 0:return t.WsReadyState.CONNECTING;case 1:return t.WsReadyState.OPEN;case 2:return t.WsReadyState.CLOSING;case 3:return t.WsReadyState.CLOSED;default:return t.WsReadyState.NONE}}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}subscribeBlock(e){return this.newBlockSubscribes.push({handler:e}),this.newBlockSubscribes.length===1&&this.sendSubscribeBlockRpc(),()=>{this.newBlockSubscribes=this.newBlockSubscribes.filter(t=>t.handler!==e)}}sendSubscribeBlockRpc(){this.readyState===t.WsReadyState.OPEN&&this.ws.send(JSON.stringify({jsonrpc:`2.0`,method:`subscribe`,params:[`tm.event='NewBlock'`],id:1}))}traceTx(e){return new Promise(t=>{this.queryTx(e).then(n=>{if(e instanceof Uint8Array){t(n);return}if(n?.total_count!==`0`){t(n);return}}).catch(()=>{}),this.subscribeTx(e).then(t)}).then(e=>new Promise(t=>{setTimeout(()=>t(e),100)}))}subscribeTx(e){if(e instanceof Uint8Array){let t=this.createRandomId(),n={query:`tm.event='Tx' AND tx.hash='${r.Buffer.from(e).toString(`hex`).toUpperCase()}'`};return new Promise((e,r)=>{this.txSubscribes.set(t,{params:n,resolver:e,rejector:r}),this.sendSubscribeTxRpc(t,n)})}else{let t=this.createRandomId(),n={query:`tm.event='Tx' and `+Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>`${e.key}=${typeof e.value==`string`?`'${e.value}'`:e.value}`).join(` and `),page:`1`,per_page:`1`,order_by:`desc`};return new Promise((e,r)=>{this.txSubscribes.set(t,{params:n,resolver:e,rejector:r}),this.sendSubscribeTxRpc(t,n)})}}sendSubscribeTxRpc(e,n){this.readyState===t.WsReadyState.OPEN&&this.ws.send(JSON.stringify({jsonrpc:`2.0`,method:`subscribe`,params:n,id:e}))}queryTx(e){if(e instanceof Uint8Array)return this.query(`tx`,{hash:r.Buffer.from(e).toString(`base64`),prove:!1});{let t={query:Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>`${e.key}=${typeof e.value==`string`?`'${e.value}'`:e.value}`).join(` and `),page:`1`,per_page:`1`,order_by:`desc`};return this.query(`tx_search`,t)}}query(e,t){let n=this.createRandomId();return new Promise((r,i)=>{this.pendingQueries.set(n,{method:e,params:t,resolver:r,rejector:i}),this.sendQueryRpc(n,e,t)})}sendQueryRpc(e,n,r){this.readyState===t.WsReadyState.OPEN&&this.ws.send(JSON.stringify({jsonrpc:`2.0`,method:n,params:r,id:e}))}createRandomId(){return parseInt(Array.from({length:6}).map(()=>Math.floor(Math.random()*100)).join(``))}}})),Fs=a(((e,t)=>{t.exports=r;var n=Is();function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=r.zero=new r(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=r.zeroHash=`\0\0\0\0\0\0\0\0`;r.fromNumber=function(e){if(e===0)return i;var t=e<0;t&&(e=-e);var n=e>>>0,a=(e-n)/4294967296>>>0;return t&&(a=~a>>>0,n=~n>>>0,++n>4294967295&&(n=0,++a>4294967295&&(a=0))),new r(n,a)},r.from=function(e){if(typeof e==`number`)return r.fromNumber(e);if(n.isString(e))if(n.Long)e=n.Long.fromString(e);else return r.fromNumber(parseInt(e,10));return e.low||e.high?new r(e.low>>>0,e.high>>>0):i},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+n*4294967296)}return this.lo+this.hi*4294967296},r.prototype.toLong=function(e){return n.Long?new n.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var o=String.prototype.charCodeAt;r.fromHash=function(e){return e===a?i:new r((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}})),Is=a((e=>{h();var t=e;t.asPromise=Pr(),t.base64=Fr(),t.EventEmitter=Ir(),t.float=Lr(),t.inquire=Rr(),t.utf8=zr(),t.pool=Br(),t.LongBits=Fs(),t.isNode=!!(g!==void 0&&g&&g.process&&g.process.versions&&g.process.versions.node),t.global=t.isNode&&g||typeof window<`u`&&window||typeof self<`u`&&self||e,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return typeof e==`string`||e instanceof String},t.isObject=function(e){return e&&typeof e==`object`},t.isset=t.isSet=function(e,t){var n=e[t];return n!=null&&e.hasOwnProperty(t)?typeof n!=`object`||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1},t.Buffer=(function(){try{var e=t.inquire(`buffer`).Buffer;return e.prototype.utf8Write?e:null}catch{return null}})(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return typeof e==`number`?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):typeof Uint8Array>`u`?e:new Uint8Array(e)},t.Array=typeof Uint8Array<`u`?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire(`long`),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,n){var r=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(r.lo,r.hi,n):r.toNumber(!!n)};function n(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;++i)(e[r[i]]===void 0||!n)&&(e[r[i]]=t[r[i]]);return e}t.merge=n,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function r(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,`message`,{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,`stack`,{value:Error().stack||``}),r&&n(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,`name`,{get:function(){return e}}),t.prototype.toString=function(){return this.name+`: `+this.message},t}t.newError=r,t.ProtocolError=r(`ProtocolError`),t.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(t[e[n]]===1&&this[e[n]]!==void 0&&this[e[n]]!==null)return e[n]}},t.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;if(!e){t._Buffer_from=t._Buffer_allocUnsafe=null;return}t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}}})),Ls=a(((e,t)=>{t.exports=u;var n=Is(),r,i=n.LongBits,a=n.base64,o=n.utf8;function s(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function u(){this.len=0,this.head=new s(c,0,0),this.tail=this.head,this.states=null}var d=function(){return n.Buffer?function(){return(u.create=function(){return new r})()}:function(){return new u}};u.create=d(),u.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype._push=function(e,t,n){return this.tail=this.tail.next=new s(e,t,n),this.len+=t,this};function f(e,t,n){t[n]=e&255}function p(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}function m(e,t){this.len=e,this.next=void 0,this.val=t}m.prototype=Object.create(s.prototype),m.prototype.fn=p,u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new m((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(h,10,i.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function h(e,t,n){for(;e.hi;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo>>>=7;t[n++]=e.lo}u.prototype.uint64=function(e){var t=i.from(e);return this._push(h,t.length(),t)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(h,t.length(),t)},u.prototype.bool=function(e){return this._push(f,1,+!!e)};function g(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}u.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=i.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},u.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var _=n.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};u.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(n.isString(e)){var r=u.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(_,t,e)},u.prototype.string=function(e){var t=o.length(e);return t?this.uint32(t)._push(o.write,t,e):this._push(f,1,0)},u.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new s(c,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(c,0,0),this.len=0),this},u.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},u.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},u._configure=function(e){r=e,u.create=d(),r._configure()}})),Rs=a(((e,t)=>{t.exports=i;var n=Ls();(i.prototype=Object.create(n.prototype)).constructor=i;var r=Is();function i(){n.call(this)}i._configure=function(){i.alloc=r._Buffer_allocUnsafe,i.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&r.Buffer.prototype.set.name===`set`?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},i.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,`base64`));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this};function a(e,t,n){e.length<40?r.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i.prototype.string=function(e){var t=r.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()})),zs=a(((e,t)=>{t.exports=s;var n=Is(),r,i=n.LongBits,a=n.utf8;function o(e,t){return RangeError(`index out of range: `+e.pos+` + `+(t||1)+` > `+e.len)}function s(e){this.buf=e,this.pos=0,this.len=e.length}var c=typeof Uint8Array<`u`?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new s(e);throw Error(`illegal buffer`)}:function(e){if(Array.isArray(e))return new s(e);throw Error(`illegal buffer`)},l=function(){return n.Buffer?function(e){return(s.create=function(e){return n.Buffer.isBuffer(e)?new r(e):c(e)})(e)}:c};s.create=l(),s.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,s.prototype.uint32=(function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return e}})(),s.prototype.int32=function(){return this.uint32()|0},s.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function u(){var e=new i(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw o(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw o(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error(`invalid varint encoding`)}s.prototype.bool=function(){return this.uint32()!==0};function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}s.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return d(this.buf,this.pos+=4)},s.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return d(this.buf,this.pos+=4)|0};function f(){if(this.pos+8>this.len)throw o(this,8);return new i(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}s.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},s.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},s.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw o(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},s.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},s.prototype.skip=function(e){if(typeof e==`number`){if(this.pos+e>this.len)throw o(this,e);this.pos+=e}else do if(this.pos>=this.len)throw o(this);while(this.buf[this.pos++]&128);return this},s.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!=4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error(`invalid wire type `+e+` at offset `+this.pos)}return this},s._configure=function(e){r=e,s.create=l(),r._configure();var t=n.Long?`toLong`:`toNumber`;n.merge(s.prototype,{int64:function(){return u.call(this)[t](!1)},uint64:function(){return u.call(this)[t](!0)},sint64:function(){return u.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}})),Bs=a(((e,t)=>{t.exports=i;var n=zs();(i.prototype=Object.create(n.prototype)).constructor=i;var r=Is();function i(e){n.call(this,e)}i._configure=function(){r.Buffer&&(i.prototype._slice=r.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString(`utf-8`,this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()})),Vs=a(((e,t)=>{t.exports=r;var n=Is();(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r;function r(e,t,r){if(typeof e!=`function`)throw TypeError(`rpcImpl must be a function`);n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}r.prototype.rpcCall=function e(t,r,i,a,o){if(!a)throw TypeError(`request must be specified`);var s=this;if(!o)return n.asPromise(e,s,t,r,i,a);if(!s.rpcImpl){setTimeout(function(){o(Error(`already ended`))},0);return}try{return s.rpcImpl(t,r[s.requestDelimited?`encodeDelimited`:`encode`](a).finish(),function(e,n){if(e)return s.emit(`error`,e,t),o(e);if(n===null){s.end(!0);return}if(!(n instanceof i))try{n=i[s.responseDelimited?`decodeDelimited`:`decode`](n)}catch(e){return s.emit(`error`,e,t),o(e)}return s.emit(`data`,n,t),o(null,n)})}catch(e){s.emit(`error`,e,t),setTimeout(function(){o(e)},0);return}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit(`end`).off()),this}})),Hs=a((e=>{var t=e;t.Service=Vs()})),Us=a(((e,t)=>{t.exports={}})),Ws=a((e=>{var t=e;t.build=`minimal`,t.Writer=Ls(),t.BufferWriter=Rs(),t.Reader=zs(),t.BufferReader=Bs(),t.util=Is(),t.rpc=Hs(),t.roots=Us(),t.configure=n;function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}n()})),K=a(((e,t)=>{t.exports=Ws()})),Gs=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgInstallBundleResponse=e.MsgInstallBundle=e.MsgProvisionResponse=e.MsgProvision=e.MsgWalletSpendActionResponse=e.MsgWalletSpendAction=e.MsgWalletActionResponse=e.MsgWalletAction=e.MsgDeliverInboundResponse=e.MsgDeliverInbound=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`agoric.swingset`;function i(){return{messages:[],nums:[],ack:`0`,submitter:new Uint8Array}}e.MsgDeliverInbound={encode(e,t=r.default.Writer.create()){for(let n of e.messages)t.uint32(10).string(n);t.uint32(18).fork();for(let n of e.nums)t.uint64(n);return t.ldelim(),e.ack!==`0`&&t.uint32(24).uint64(e.ack),e.submitter.length!==0&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.messages.push(n.string());break;case 2:if((e&7)==2){let e=n.uint32()+n.pos;for(;n.pos<e;)o.nums.push(x(n.uint64()))}else o.nums.push(x(n.uint64()));break;case 3:o.ack=x(n.uint64());break;case 4:o.submitter=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{messages:Array.isArray(e?.messages)?e.messages.map(e=>String(e)):[],nums:Array.isArray(e?.nums)?e.nums.map(e=>String(e)):[],ack:S(e.ack)?String(e.ack):`0`,submitter:S(e.submitter)?v(e.submitter):new Uint8Array}},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e):t.messages=[],e.nums?t.nums=e.nums.map(e=>e):t.nums=[],e.ack!==void 0&&(t.ack=e.ack),e.submitter!==void 0&&(t.submitter=b(e.submitter===void 0?new Uint8Array:e.submitter)),t},fromPartial(e){let t=i();return t.messages=e.messages?.map(e=>e)||[],t.nums=e.nums?.map(e=>e)||[],t.ack=e.ack??`0`,t.submitter=e.submitter??new Uint8Array,t}};function a(){return{}}e.MsgDeliverInboundResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return o},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return a()}};function o(){return{owner:new Uint8Array,action:``}}e.MsgWalletAction={encode(e,t=r.default.Writer.create()){return e.owner.length!==0&&t.uint32(10).bytes(e.owner),e.action!==``&&t.uint32(18).string(e.action),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.owner=n.bytes();break;case 2:a.action=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{owner:S(e.owner)?v(e.owner):new Uint8Array,action:S(e.action)?String(e.action):``}},toJSON(e){let t={};return e.owner!==void 0&&(t.owner=b(e.owner===void 0?new Uint8Array:e.owner)),e.action!==void 0&&(t.action=e.action),t},fromPartial(e){let t=o();return t.owner=e.owner??new Uint8Array,t.action=e.action??``,t}};function s(){return{}}e.MsgWalletActionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return s()}};function c(){return{owner:new Uint8Array,spendAction:``}}e.MsgWalletSpendAction={encode(e,t=r.default.Writer.create()){return e.owner.length!==0&&t.uint32(10).bytes(e.owner),e.spendAction!==``&&t.uint32(18).string(e.spendAction),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.owner=n.bytes();break;case 2:a.spendAction=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{owner:S(e.owner)?v(e.owner):new Uint8Array,spendAction:S(e.spendAction)?String(e.spendAction):``}},toJSON(e){let t={};return e.owner!==void 0&&(t.owner=b(e.owner===void 0?new Uint8Array:e.owner)),e.spendAction!==void 0&&(t.spendAction=e.spendAction),t},fromPartial(e){let t=c();return t.owner=e.owner??new Uint8Array,t.spendAction=e.spendAction??``,t}};function l(){return{}}e.MsgWalletSpendActionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}};function u(){return{nickname:``,address:new Uint8Array,powerFlags:[],submitter:new Uint8Array}}e.MsgProvision={encode(e,t=r.default.Writer.create()){e.nickname!==``&&t.uint32(10).string(e.nickname),e.address.length!==0&&t.uint32(18).bytes(e.address);for(let n of e.powerFlags)t.uint32(26).string(n);return e.submitter.length!==0&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.nickname=n.string();break;case 2:a.address=n.bytes();break;case 3:a.powerFlags.push(n.string());break;case 4:a.submitter=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{nickname:S(e.nickname)?String(e.nickname):``,address:S(e.address)?v(e.address):new Uint8Array,powerFlags:Array.isArray(e?.powerFlags)?e.powerFlags.map(e=>String(e)):[],submitter:S(e.submitter)?v(e.submitter):new Uint8Array}},toJSON(e){let t={};return e.nickname!==void 0&&(t.nickname=e.nickname),e.address!==void 0&&(t.address=b(e.address===void 0?new Uint8Array:e.address)),e.powerFlags?t.powerFlags=e.powerFlags.map(e=>e):t.powerFlags=[],e.submitter!==void 0&&(t.submitter=b(e.submitter===void 0?new Uint8Array:e.submitter)),t},fromPartial(e){let t=u();return t.nickname=e.nickname??``,t.address=e.address??new Uint8Array,t.powerFlags=e.powerFlags?.map(e=>e)||[],t.submitter=e.submitter??new Uint8Array,t}};function d(){return{}}e.MsgProvisionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return d()}};function f(){return{bundle:``,submitter:new Uint8Array,compressedBundle:new Uint8Array,uncompressedSize:`0`}}e.MsgInstallBundle={encode(e,t=r.default.Writer.create()){return e.bundle!==``&&t.uint32(10).string(e.bundle),e.submitter.length!==0&&t.uint32(18).bytes(e.submitter),e.compressedBundle.length!==0&&t.uint32(26).bytes(e.compressedBundle),e.uncompressedSize!==`0`&&t.uint32(32).int64(e.uncompressedSize),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.bundle=n.string();break;case 2:a.submitter=n.bytes();break;case 3:a.compressedBundle=n.bytes();break;case 4:a.uncompressedSize=x(n.int64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{bundle:S(e.bundle)?String(e.bundle):``,submitter:S(e.submitter)?v(e.submitter):new Uint8Array,compressedBundle:S(e.compressedBundle)?v(e.compressedBundle):new Uint8Array,uncompressedSize:S(e.uncompressedSize)?String(e.uncompressedSize):`0`}},toJSON(e){let t={};return e.bundle!==void 0&&(t.bundle=e.bundle),e.submitter!==void 0&&(t.submitter=b(e.submitter===void 0?new Uint8Array:e.submitter)),e.compressedBundle!==void 0&&(t.compressedBundle=b(e.compressedBundle===void 0?new Uint8Array:e.compressedBundle)),e.uncompressedSize!==void 0&&(t.uncompressedSize=e.uncompressedSize),t},fromPartial(e){let t=f();return t.bundle=e.bundle??``,t.submitter=e.submitter??new Uint8Array,t.compressedBundle=e.compressedBundle??new Uint8Array,t.uncompressedSize=e.uncompressedSize??`0`,t}};function p(){return{}}e.MsgInstallBundleResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return p()}};var m=(()=>{if(m!==void 0)return m;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),_=m.atob||(e=>m.Buffer.from(e,`base64`).toString(`binary`));function v(e){let t=_(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var y=m.btoa||(e=>m.Buffer.from(e,`binary`).toString(`base64`));function b(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return y(t.join(``))}function x(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function S(e){return e!=null}})),Ks=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.DecProto=e.IntProto=e.DecCoin=e.Coin=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`cosmos.base.v1beta1`;function i(){return{denom:``,amount:``}}e.Coin={encode(e,t=r.default.Writer.create()){return e.denom!==``&&t.uint32(10).string(e.denom),e.amount!==``&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{denom:c(e.denom)?String(e.denom):``,amount:c(e.amount)?String(e.amount):``}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=i();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function a(){return{denom:``,amount:``}}e.DecCoin={encode(e,t=r.default.Writer.create()){return e.denom!==``&&t.uint32(10).string(e.denom),e.amount!==``&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{denom:c(e.denom)?String(e.denom):``,amount:c(e.amount)?String(e.amount):``}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=a();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function o(){return{int:``}}e.IntProto={encode(e,t=r.default.Writer.create()){return e.int!==``&&t.uint32(10).string(e.int),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.int=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{int:c(e.int)?String(e.int):``}},toJSON(e){let t={};return e.int!==void 0&&(t.int=e.int),t},fromPartial(e){let t=o();return t.int=e.int??``,t}};function s(){return{dec:``}}e.DecProto={encode(e,t=r.default.Writer.create()){return e.dec!==``&&t.uint32(10).string(e.dec),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.dec=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{dec:c(e.dec)?String(e.dec):``}},toJSON(e){let t={};return e.dec!==void 0&&(t.dec=e.dec),t},fromPartial(e){let t=s();return t.dec=e.dec??``,t}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function c(e){return e!=null}})),qs=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Metadata=e.DenomUnit=e.Supply=e.Output=e.Input=e.SendEnabled=e.Params=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.bank.v1beta1`;function a(){return{sendEnabled:[],defaultSendEnabled:!1}}e.Params={encode(t,n=r.default.Writer.create()){for(let r of t.sendEnabled)e.SendEnabled.encode(r,n.uint32(10).fork()).ldelim();return t.defaultSendEnabled===!0&&n.uint32(16).bool(t.defaultSendEnabled),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=a();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.sendEnabled.push(e.SendEnabled.decode(i,i.uint32()));break;case 2:s.defaultSendEnabled=i.bool();break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{sendEnabled:Array.isArray(t?.sendEnabled)?t.sendEnabled.map(t=>e.SendEnabled.fromJSON(t)):[],defaultSendEnabled:f(t.defaultSendEnabled)?!!t.defaultSendEnabled:!1}},toJSON(t){let n={};return t.sendEnabled?n.sendEnabled=t.sendEnabled.map(t=>t?e.SendEnabled.toJSON(t):void 0):n.sendEnabled=[],t.defaultSendEnabled!==void 0&&(n.defaultSendEnabled=t.defaultSendEnabled),n},fromPartial(t){let n=a();return n.sendEnabled=t.sendEnabled?.map(t=>e.SendEnabled.fromPartial(t))||[],n.defaultSendEnabled=t.defaultSendEnabled??!1,n}};function o(){return{denom:``,enabled:!1}}e.SendEnabled={encode(e,t=r.default.Writer.create()){return e.denom!==``&&t.uint32(10).string(e.denom),e.enabled===!0&&t.uint32(16).bool(e.enabled),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.denom=n.string();break;case 2:a.enabled=n.bool();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{denom:f(e.denom)?String(e.denom):``,enabled:f(e.enabled)?!!e.enabled:!1}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.enabled!==void 0&&(t.enabled=e.enabled),t},fromPartial(e){let t=o();return t.denom=e.denom??``,t.enabled=e.enabled??!1,t}};function s(){return{address:``,coins:[]}}e.Input={encode(e,t=r.default.Writer.create()){e.address!==``&&t.uint32(10).string(e.address);for(let n of e.coins)i.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=s();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.address=n.string();break;case 2:o.coins.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{address:f(e.address)?String(e.address):``,coins:Array.isArray(e?.coins)?e.coins.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?i.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){let t=s();return t.address=e.address??``,t.coins=e.coins?.map(e=>i.Coin.fromPartial(e))||[],t}};function c(){return{address:``,coins:[]}}e.Output={encode(e,t=r.default.Writer.create()){e.address!==``&&t.uint32(10).string(e.address);for(let n of e.coins)i.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.address=n.string();break;case 2:o.coins.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{address:f(e.address)?String(e.address):``,coins:Array.isArray(e?.coins)?e.coins.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?i.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){let t=c();return t.address=e.address??``,t.coins=e.coins?.map(e=>i.Coin.fromPartial(e))||[],t}};function l(){return{total:[]}}e.Supply={encode(e,t=r.default.Writer.create()){for(let n of e.total)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=l();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.total.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{total:Array.isArray(e?.total)?e.total.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.total?t.total=e.total.map(e=>e?i.Coin.toJSON(e):void 0):t.total=[],t},fromPartial(e){let t=l();return t.total=e.total?.map(e=>i.Coin.fromPartial(e))||[],t}};function u(){return{denom:``,exponent:0,aliases:[]}}e.DenomUnit={encode(e,t=r.default.Writer.create()){e.denom!==``&&t.uint32(10).string(e.denom),e.exponent!==0&&t.uint32(16).uint32(e.exponent);for(let n of e.aliases)t.uint32(26).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.denom=n.string();break;case 2:a.exponent=n.uint32();break;case 3:a.aliases.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{denom:f(e.denom)?String(e.denom):``,exponent:f(e.exponent)?Number(e.exponent):0,aliases:Array.isArray(e?.aliases)?e.aliases.map(e=>String(e)):[]}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.exponent!==void 0&&(t.exponent=Math.round(e.exponent)),e.aliases?t.aliases=e.aliases.map(e=>e):t.aliases=[],t},fromPartial(e){let t=u();return t.denom=e.denom??``,t.exponent=e.exponent??0,t.aliases=e.aliases?.map(e=>e)||[],t}};function d(){return{description:``,denomUnits:[],base:``,display:``,name:``,symbol:``}}e.Metadata={encode(t,n=r.default.Writer.create()){t.description!==``&&n.uint32(10).string(t.description);for(let r of t.denomUnits)e.DenomUnit.encode(r,n.uint32(18).fork()).ldelim();return t.base!==``&&n.uint32(26).string(t.base),t.display!==``&&n.uint32(34).string(t.display),t.name!==``&&n.uint32(42).string(t.name),t.symbol!==``&&n.uint32(50).string(t.symbol),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=d();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.description=i.string();break;case 2:o.denomUnits.push(e.DenomUnit.decode(i,i.uint32()));break;case 3:o.base=i.string();break;case 4:o.display=i.string();break;case 5:o.name=i.string();break;case 6:o.symbol=i.string();break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{description:f(t.description)?String(t.description):``,denomUnits:Array.isArray(t?.denomUnits)?t.denomUnits.map(t=>e.DenomUnit.fromJSON(t)):[],base:f(t.base)?String(t.base):``,display:f(t.display)?String(t.display):``,name:f(t.name)?String(t.name):``,symbol:f(t.symbol)?String(t.symbol):``}},toJSON(t){let n={};return t.description!==void 0&&(n.description=t.description),t.denomUnits?n.denomUnits=t.denomUnits.map(t=>t?e.DenomUnit.toJSON(t):void 0):n.denomUnits=[],t.base!==void 0&&(n.base=t.base),t.display!==void 0&&(n.display=t.display),t.name!==void 0&&(n.name=t.name),t.symbol!==void 0&&(n.symbol=t.symbol),n},fromPartial(t){let n=d();return n.description=t.description??``,n.denomUnits=t.denomUnits?.map(t=>e.DenomUnit.fromPartial(t))||[],n.base=t.base??``,n.display=t.display??``,n.name=t.name??``,n.symbol=t.symbol??``,n}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function f(e){return e!=null}})),Js=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgMultiSendResponse=e.MsgMultiSend=e.MsgSendResponse=e.MsgSend=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks(),a=qs();e.protobufPackage=`cosmos.bank.v1beta1`;function o(){return{fromAddress:``,toAddress:``,amount:[]}}e.MsgSend={encode(e,t=r.default.Writer.create()){e.fromAddress!==``&&t.uint32(10).string(e.fromAddress),e.toAddress!==``&&t.uint32(18).string(e.toAddress);for(let n of e.amount)i.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.fromAddress=n.string();break;case 2:s.toAddress=n.string();break;case 3:s.amount.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{fromAddress:u(e.fromAddress)?String(e.fromAddress):``,toAddress:u(e.toAddress)?String(e.toAddress):``,amount:Array.isArray(e?.amount)?e.amount.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.fromAddress!==void 0&&(t.fromAddress=e.fromAddress),e.toAddress!==void 0&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){let t=o();return t.fromAddress=e.fromAddress??``,t.toAddress=e.toAddress??``,t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],t}};function s(){return{}}e.MsgSendResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return s()}};function c(){return{inputs:[],outputs:[]}}e.MsgMultiSend={encode(e,t=r.default.Writer.create()){for(let n of e.inputs)a.Input.encode(n,t.uint32(10).fork()).ldelim();for(let n of e.outputs)a.Output.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.inputs.push(a.Input.decode(n,n.uint32()));break;case 2:o.outputs.push(a.Output.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{inputs:Array.isArray(e?.inputs)?e.inputs.map(e=>a.Input.fromJSON(e)):[],outputs:Array.isArray(e?.outputs)?e.outputs.map(e=>a.Output.fromJSON(e)):[]}},toJSON(e){let t={};return e.inputs?t.inputs=e.inputs.map(e=>e?a.Input.toJSON(e):void 0):t.inputs=[],e.outputs?t.outputs=e.outputs.map(e=>e?a.Output.toJSON(e):void 0):t.outputs=[],t},fromPartial(e){let t=c();return t.inputs=e.inputs?.map(e=>a.Input.fromPartial(e))||[],t.outputs=e.outputs?.map(e=>a.Output.fromPartial(e))||[],t}};function l(){return{}}e.MsgMultiSendResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),Ys=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Timestamp=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`google.protobuf`;function i(){return{seconds:`0`,nanos:0}}e.Timestamp={encode(e,t=r.default.Writer.create()){return e.seconds!==`0`&&t.uint32(8).int64(e.seconds),e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=i();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.seconds=a(n.int64());break;case 2:s.nanos=n.int32();break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{seconds:o(e.seconds)?String(e.seconds):`0`,nanos:o(e.nanos)?Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==void 0&&(t.seconds=e.seconds),e.nanos!==void 0&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){let t=i();return t.seconds=e.seconds??`0`,t.nanos=e.nanos??0,t}};function a(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function o(e){return e!=null}})),Xs=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.ProofOps=e.ProofOp=e.DominoOp=e.ValueOp=e.Proof=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`tendermint.crypto`;function i(){return{total:`0`,index:`0`,leafHash:new Uint8Array,aunts:[]}}e.Proof={encode(e,t=r.default.Writer.create()){e.total!==`0`&&t.uint32(8).int64(e.total),e.index!==`0`&&t.uint32(16).int64(e.index),e.leafHash.length!==0&&t.uint32(26).bytes(e.leafHash);for(let n of e.aunts)t.uint32(34).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.total=m(n.int64());break;case 2:o.index=m(n.int64());break;case 3:o.leafHash=n.bytes();break;case 4:o.aunts.push(n.bytes());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{total:_(e.total)?String(e.total):`0`,index:_(e.index)?String(e.index):`0`,leafHash:_(e.leafHash)?d(e.leafHash):new Uint8Array,aunts:Array.isArray(e?.aunts)?e.aunts.map(e=>d(e)):[]}},toJSON(e){let t={};return e.total!==void 0&&(t.total=e.total),e.index!==void 0&&(t.index=e.index),e.leafHash!==void 0&&(t.leafHash=p(e.leafHash===void 0?new Uint8Array:e.leafHash)),e.aunts?t.aunts=e.aunts.map(e=>p(e===void 0?new Uint8Array:e)):t.aunts=[],t},fromPartial(e){let t=i();return t.total=e.total??`0`,t.index=e.index??`0`,t.leafHash=e.leafHash??new Uint8Array,t.aunts=e.aunts?.map(e=>e)||[],t}};function a(){return{key:new Uint8Array,proof:void 0}}e.ValueOp={encode(t,n=r.default.Writer.create()){return t.key.length!==0&&n.uint32(10).bytes(t.key),t.proof!==void 0&&e.Proof.encode(t.proof,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=a();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.key=i.bytes();break;case 2:s.proof=e.Proof.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{key:_(t.key)?d(t.key):new Uint8Array,proof:_(t.proof)?e.Proof.fromJSON(t.proof):void 0}},toJSON(t){let n={};return t.key!==void 0&&(n.key=p(t.key===void 0?new Uint8Array:t.key)),t.proof!==void 0&&(n.proof=t.proof?e.Proof.toJSON(t.proof):void 0),n},fromPartial(t){let n=a();return n.key=t.key??new Uint8Array,n.proof=t.proof!==void 0&&t.proof!==null?e.Proof.fromPartial(t.proof):void 0,n}};function o(){return{key:``,input:``,output:``}}e.DominoOp={encode(e,t=r.default.Writer.create()){return e.key!==``&&t.uint32(10).string(e.key),e.input!==``&&t.uint32(18).string(e.input),e.output!==``&&t.uint32(26).string(e.output),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.key=n.string();break;case 2:a.input=n.string();break;case 3:a.output=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{key:_(e.key)?String(e.key):``,input:_(e.input)?String(e.input):``,output:_(e.output)?String(e.output):``}},toJSON(e){let t={};return e.key!==void 0&&(t.key=e.key),e.input!==void 0&&(t.input=e.input),e.output!==void 0&&(t.output=e.output),t},fromPartial(e){let t=o();return t.key=e.key??``,t.input=e.input??``,t.output=e.output??``,t}};function s(){return{type:``,key:new Uint8Array,data:new Uint8Array}}e.ProofOp={encode(e,t=r.default.Writer.create()){return e.type!==``&&t.uint32(10).string(e.type),e.key.length!==0&&t.uint32(18).bytes(e.key),e.data.length!==0&&t.uint32(26).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.type=n.string();break;case 2:a.key=n.bytes();break;case 3:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{type:_(e.type)?String(e.type):``,key:_(e.key)?d(e.key):new Uint8Array,data:_(e.data)?d(e.data):new Uint8Array}},toJSON(e){let t={};return e.type!==void 0&&(t.type=e.type),e.key!==void 0&&(t.key=p(e.key===void 0?new Uint8Array:e.key)),e.data!==void 0&&(t.data=p(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=s();return t.type=e.type??``,t.key=e.key??new Uint8Array,t.data=e.data??new Uint8Array,t}};function c(){return{ops:[]}}e.ProofOps={encode(t,n=r.default.Writer.create()){for(let r of t.ops)e.ProofOp.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.ops.push(e.ProofOp.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{ops:Array.isArray(t?.ops)?t.ops.map(t=>e.ProofOp.fromJSON(t)):[]}},toJSON(t){let n={};return t.ops?n.ops=t.ops.map(t=>t?e.ProofOp.toJSON(t):void 0):n.ops=[],n},fromPartial(t){let n=c();return n.ops=t.ops?.map(t=>e.ProofOp.fromPartial(t))||[],n}};var l=(()=>{if(l!==void 0)return l;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),u=l.atob||(e=>l.Buffer.from(e,`base64`).toString(`binary`));function d(e){let t=u(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var f=l.btoa||(e=>l.Buffer.from(e,`binary`).toString(`base64`));function p(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return f(t.join(``))}function m(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function _(e){return e!=null}})),Zs=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Consensus=e.App=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`tendermint.version`;function i(){return{protocol:`0`,software:``}}e.App={encode(e,t=r.default.Writer.create()){return e.protocol!==`0`&&t.uint32(8).uint64(e.protocol),e.software!==``&&t.uint32(18).string(e.software),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.protocol=o(n.uint64());break;case 2:s.software=n.string();break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{protocol:s(e.protocol)?String(e.protocol):`0`,software:s(e.software)?String(e.software):``}},toJSON(e){let t={};return e.protocol!==void 0&&(t.protocol=e.protocol),e.software!==void 0&&(t.software=e.software),t},fromPartial(e){let t=i();return t.protocol=e.protocol??`0`,t.software=e.software??``,t}};function a(){return{block:`0`,app:`0`}}e.Consensus={encode(e,t=r.default.Writer.create()){return e.block!==`0`&&t.uint32(8).uint64(e.block),e.app!==`0`&&t.uint32(16).uint64(e.app),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,s=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:s.block=o(n.uint64());break;case 2:s.app=o(n.uint64());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{block:s(e.block)?String(e.block):`0`,app:s(e.app)?String(e.app):`0`}},toJSON(e){let t={};return e.block!==void 0&&(t.block=e.block),e.app!==void 0&&(t.app=e.app),t},fromPartial(e){let t=a();return t.block=e.block??`0`,t.app=e.app??`0`,t}};function o(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function s(e){return e!=null}})),Qs=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.PublicKey=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`tendermint.crypto`;function i(){return{ed25519:void 0,secp256k1:void 0}}e.PublicKey={encode(e,t=r.default.Writer.create()){return e.ed25519!==void 0&&t.uint32(10).bytes(e.ed25519),e.secp256k1!==void 0&&t.uint32(18).bytes(e.secp256k1),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.ed25519=n.bytes();break;case 2:o.secp256k1=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{ed25519:u(e.ed25519)?s(e.ed25519):void 0,secp256k1:u(e.secp256k1)?s(e.secp256k1):void 0}},toJSON(e){let t={};return e.ed25519!==void 0&&(t.ed25519=e.ed25519===void 0?void 0:l(e.ed25519)),e.secp256k1!==void 0&&(t.secp256k1=e.secp256k1===void 0?void 0:l(e.secp256k1)),t},fromPartial(e){let t=i();return t.ed25519=e.ed25519??void 0,t.secp256k1=e.secp256k1??void 0,t}};var a=(()=>{if(a!==void 0)return a;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),o=a.atob||(e=>a.Buffer.from(e,`base64`).toString(`binary`));function s(e){let t=o(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var c=a.btoa||(e=>a.Buffer.from(e,`binary`).toString(`base64`));function l(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return c(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),$s=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.SimpleValidator=e.Validator=e.ValidatorSet=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Qs();e.protobufPackage=`tendermint.types`;function a(){return{validators:[],proposer:void 0,totalVotingPower:`0`}}e.ValidatorSet={encode(t,n=r.default.Writer.create()){for(let r of t.validators)e.Validator.encode(r,n.uint32(10).fork()).ldelim();return t.proposer!==void 0&&e.Validator.encode(t.proposer,n.uint32(18).fork()).ldelim(),t.totalVotingPower!==`0`&&n.uint32(24).int64(t.totalVotingPower),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=a();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.validators.push(e.Validator.decode(i,i.uint32()));break;case 2:s.proposer=e.Validator.decode(i,i.uint32());break;case 3:s.totalVotingPower=p(i.int64());break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{validators:Array.isArray(t?.validators)?t.validators.map(t=>e.Validator.fromJSON(t)):[],proposer:m(t.proposer)?e.Validator.fromJSON(t.proposer):void 0,totalVotingPower:m(t.totalVotingPower)?String(t.totalVotingPower):`0`}},toJSON(t){let n={};return t.validators?n.validators=t.validators.map(t=>t?e.Validator.toJSON(t):void 0):n.validators=[],t.proposer!==void 0&&(n.proposer=t.proposer?e.Validator.toJSON(t.proposer):void 0),t.totalVotingPower!==void 0&&(n.totalVotingPower=t.totalVotingPower),n},fromPartial(t){let n=a();return n.validators=t.validators?.map(t=>e.Validator.fromPartial(t))||[],n.proposer=t.proposer!==void 0&&t.proposer!==null?e.Validator.fromPartial(t.proposer):void 0,n.totalVotingPower=t.totalVotingPower??`0`,n}};function o(){return{address:new Uint8Array,pubKey:void 0,votingPower:`0`,proposerPriority:`0`}}e.Validator={encode(e,t=r.default.Writer.create()){return e.address.length!==0&&t.uint32(10).bytes(e.address),e.pubKey!==void 0&&i.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower!==`0`&&t.uint32(24).int64(e.votingPower),e.proposerPriority!==`0`&&t.uint32(32).int64(e.proposerPriority),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.address=n.bytes();break;case 2:s.pubKey=i.PublicKey.decode(n,n.uint32());break;case 3:s.votingPower=p(n.int64());break;case 4:s.proposerPriority=p(n.int64());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{address:m(e.address)?u(e.address):new Uint8Array,pubKey:m(e.pubKey)?i.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):`0`,proposerPriority:m(e.proposerPriority)?String(e.proposerPriority):`0`}},toJSON(e){let t={};return e.address!==void 0&&(t.address=f(e.address===void 0?new Uint8Array:e.address)),e.pubKey!==void 0&&(t.pubKey=e.pubKey?i.PublicKey.toJSON(e.pubKey):void 0),e.votingPower!==void 0&&(t.votingPower=e.votingPower),e.proposerPriority!==void 0&&(t.proposerPriority=e.proposerPriority),t},fromPartial(e){let t=o();return t.address=e.address??new Uint8Array,t.pubKey=e.pubKey!==void 0&&e.pubKey!==null?i.PublicKey.fromPartial(e.pubKey):void 0,t.votingPower=e.votingPower??`0`,t.proposerPriority=e.proposerPriority??`0`,t}};function s(){return{pubKey:void 0,votingPower:`0`}}e.SimpleValidator={encode(e,t=r.default.Writer.create()){return e.pubKey!==void 0&&i.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower!==`0`&&t.uint32(16).int64(e.votingPower),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=s();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.pubKey=i.PublicKey.decode(n,n.uint32());break;case 2:o.votingPower=p(n.int64());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{pubKey:m(e.pubKey)?i.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):`0`}},toJSON(e){let t={};return e.pubKey!==void 0&&(t.pubKey=e.pubKey?i.PublicKey.toJSON(e.pubKey):void 0),e.votingPower!==void 0&&(t.votingPower=e.votingPower),t},fromPartial(e){let t=s();return t.pubKey=e.pubKey!==void 0&&e.pubKey!==null?i.PublicKey.fromPartial(e.pubKey):void 0,t.votingPower=e.votingPower??`0`,t}};var c=(()=>{if(c!==void 0)return c;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),l=c.atob||(e=>c.Buffer.from(e,`base64`).toString(`binary`));function u(e){let t=l(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var d=c.btoa||(e=>c.Buffer.from(e,`binary`).toString(`base64`));function f(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return d(t.join(``))}function p(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function m(e){return e!=null}})),ec=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.TxProof=e.BlockMeta=e.LightBlock=e.SignedHeader=e.Proposal=e.CommitSig=e.Commit=e.Vote=e.Data=e.Header=e.BlockID=e.Part=e.PartSetHeader=e.signedMsgTypeToJSON=e.signedMsgTypeFromJSON=e.SignedMsgType=e.blockIDFlagToJSON=e.blockIDFlagFromJSON=e.BlockIDFlag=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=Xs(),o=Zs(),s=$s();e.protobufPackage=`tendermint.types`;var c;(function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]=`BLOCK_ID_FLAG_UNKNOWN`,e[e.BLOCK_ID_FLAG_ABSENT=1]=`BLOCK_ID_FLAG_ABSENT`,e[e.BLOCK_ID_FLAG_COMMIT=2]=`BLOCK_ID_FLAG_COMMIT`,e[e.BLOCK_ID_FLAG_NIL=3]=`BLOCK_ID_FLAG_NIL`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(c=e.BlockIDFlag||={});function l(e){switch(e){case 0:case`BLOCK_ID_FLAG_UNKNOWN`:return c.BLOCK_ID_FLAG_UNKNOWN;case 1:case`BLOCK_ID_FLAG_ABSENT`:return c.BLOCK_ID_FLAG_ABSENT;case 2:case`BLOCK_ID_FLAG_COMMIT`:return c.BLOCK_ID_FLAG_COMMIT;case 3:case`BLOCK_ID_FLAG_NIL`:return c.BLOCK_ID_FLAG_NIL;default:return c.UNRECOGNIZED}}e.blockIDFlagFromJSON=l;function u(e){switch(e){case c.BLOCK_ID_FLAG_UNKNOWN:return`BLOCK_ID_FLAG_UNKNOWN`;case c.BLOCK_ID_FLAG_ABSENT:return`BLOCK_ID_FLAG_ABSENT`;case c.BLOCK_ID_FLAG_COMMIT:return`BLOCK_ID_FLAG_COMMIT`;case c.BLOCK_ID_FLAG_NIL:return`BLOCK_ID_FLAG_NIL`;default:return`UNKNOWN`}}e.blockIDFlagToJSON=u;var d;(function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]=`SIGNED_MSG_TYPE_UNKNOWN`,e[e.SIGNED_MSG_TYPE_PREVOTE=1]=`SIGNED_MSG_TYPE_PREVOTE`,e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]=`SIGNED_MSG_TYPE_PRECOMMIT`,e[e.SIGNED_MSG_TYPE_PROPOSAL=32]=`SIGNED_MSG_TYPE_PROPOSAL`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(d=e.SignedMsgType||={});function f(e){switch(e){case 0:case`SIGNED_MSG_TYPE_UNKNOWN`:return d.SIGNED_MSG_TYPE_UNKNOWN;case 1:case`SIGNED_MSG_TYPE_PREVOTE`:return d.SIGNED_MSG_TYPE_PREVOTE;case 2:case`SIGNED_MSG_TYPE_PRECOMMIT`:return d.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case`SIGNED_MSG_TYPE_PROPOSAL`:return d.SIGNED_MSG_TYPE_PROPOSAL;default:return d.UNRECOGNIZED}}e.signedMsgTypeFromJSON=f;function p(e){switch(e){case d.SIGNED_MSG_TYPE_UNKNOWN:return`SIGNED_MSG_TYPE_UNKNOWN`;case d.SIGNED_MSG_TYPE_PREVOTE:return`SIGNED_MSG_TYPE_PREVOTE`;case d.SIGNED_MSG_TYPE_PRECOMMIT:return`SIGNED_MSG_TYPE_PRECOMMIT`;case d.SIGNED_MSG_TYPE_PROPOSAL:return`SIGNED_MSG_TYPE_PROPOSAL`;default:return`UNKNOWN`}}e.signedMsgTypeToJSON=p;function m(){return{total:0,hash:new Uint8Array}}e.PartSetHeader={encode(e,t=r.default.Writer.create()){return e.total!==0&&t.uint32(8).uint32(e.total),e.hash.length!==0&&t.uint32(18).bytes(e.hash),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.total=n.uint32();break;case 2:a.hash=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{total:R(e.total)?Number(e.total):0,hash:R(e.hash)?j(e.hash):new Uint8Array}},toJSON(e){let t={};return e.total!==void 0&&(t.total=Math.round(e.total)),e.hash!==void 0&&(t.hash=N(e.hash===void 0?new Uint8Array:e.hash)),t},fromPartial(e){let t=m();return t.total=e.total??0,t.hash=e.hash??new Uint8Array,t}};function _(){return{index:0,bytes:new Uint8Array,proof:void 0}}e.Part={encode(e,t=r.default.Writer.create()){return e.index!==0&&t.uint32(8).uint32(e.index),e.bytes.length!==0&&t.uint32(18).bytes(e.bytes),e.proof!==void 0&&a.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.index=n.uint32();break;case 2:o.bytes=n.bytes();break;case 3:o.proof=a.Proof.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{index:R(e.index)?Number(e.index):0,bytes:R(e.bytes)?j(e.bytes):new Uint8Array,proof:R(e.proof)?a.Proof.fromJSON(e.proof):void 0}},toJSON(e){let t={};return e.index!==void 0&&(t.index=Math.round(e.index)),e.bytes!==void 0&&(t.bytes=N(e.bytes===void 0?new Uint8Array:e.bytes)),e.proof!==void 0&&(t.proof=e.proof?a.Proof.toJSON(e.proof):void 0),t},fromPartial(e){let t=_();return t.index=e.index??0,t.bytes=e.bytes??new Uint8Array,t.proof=e.proof!==void 0&&e.proof!==null?a.Proof.fromPartial(e.proof):void 0,t}};function v(){return{hash:new Uint8Array,partSetHeader:void 0}}e.BlockID={encode(t,n=r.default.Writer.create()){return t.hash.length!==0&&n.uint32(10).bytes(t.hash),t.partSetHeader!==void 0&&e.PartSetHeader.encode(t.partSetHeader,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=v();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.hash=i.bytes();break;case 2:o.partSetHeader=e.PartSetHeader.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{hash:R(t.hash)?j(t.hash):new Uint8Array,partSetHeader:R(t.partSetHeader)?e.PartSetHeader.fromJSON(t.partSetHeader):void 0}},toJSON(t){let n={};return t.hash!==void 0&&(n.hash=N(t.hash===void 0?new Uint8Array:t.hash)),t.partSetHeader!==void 0&&(n.partSetHeader=t.partSetHeader?e.PartSetHeader.toJSON(t.partSetHeader):void 0),n},fromPartial(t){let n=v();return n.hash=t.hash??new Uint8Array,n.partSetHeader=t.partSetHeader!==void 0&&t.partSetHeader!==null?e.PartSetHeader.fromPartial(t.partSetHeader):void 0,n}};function y(){return{version:void 0,chainId:``,height:`0`,time:void 0,lastBlockId:void 0,lastCommitHash:new Uint8Array,dataHash:new Uint8Array,validatorsHash:new Uint8Array,nextValidatorsHash:new Uint8Array,consensusHash:new Uint8Array,appHash:new Uint8Array,lastResultsHash:new Uint8Array,evidenceHash:new Uint8Array,proposerAddress:new Uint8Array}}e.Header={encode(t,n=r.default.Writer.create()){return t.version!==void 0&&o.Consensus.encode(t.version,n.uint32(10).fork()).ldelim(),t.chainId!==``&&n.uint32(18).string(t.chainId),t.height!==`0`&&n.uint32(24).int64(t.height),t.time!==void 0&&i.Timestamp.encode(P(t.time),n.uint32(34).fork()).ldelim(),t.lastBlockId!==void 0&&e.BlockID.encode(t.lastBlockId,n.uint32(42).fork()).ldelim(),t.lastCommitHash.length!==0&&n.uint32(50).bytes(t.lastCommitHash),t.dataHash.length!==0&&n.uint32(58).bytes(t.dataHash),t.validatorsHash.length!==0&&n.uint32(66).bytes(t.validatorsHash),t.nextValidatorsHash.length!==0&&n.uint32(74).bytes(t.nextValidatorsHash),t.consensusHash.length!==0&&n.uint32(82).bytes(t.consensusHash),t.appHash.length!==0&&n.uint32(90).bytes(t.appHash),t.lastResultsHash.length!==0&&n.uint32(98).bytes(t.lastResultsHash),t.evidenceHash.length!==0&&n.uint32(106).bytes(t.evidenceHash),t.proposerAddress.length!==0&&n.uint32(114).bytes(t.proposerAddress),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),s=n===void 0?a.len:a.pos+n,c=y();for(;a.pos<s;){let t=a.uint32();switch(t>>>3){case 1:c.version=o.Consensus.decode(a,a.uint32());break;case 2:c.chainId=a.string();break;case 3:c.height=L(a.int64());break;case 4:c.time=F(i.Timestamp.decode(a,a.uint32()));break;case 5:c.lastBlockId=e.BlockID.decode(a,a.uint32());break;case 6:c.lastCommitHash=a.bytes();break;case 7:c.dataHash=a.bytes();break;case 8:c.validatorsHash=a.bytes();break;case 9:c.nextValidatorsHash=a.bytes();break;case 10:c.consensusHash=a.bytes();break;case 11:c.appHash=a.bytes();break;case 12:c.lastResultsHash=a.bytes();break;case 13:c.evidenceHash=a.bytes();break;case 14:c.proposerAddress=a.bytes();break;default:a.skipType(t&7);break}}return c},fromJSON(t){return{version:R(t.version)?o.Consensus.fromJSON(t.version):void 0,chainId:R(t.chainId)?String(t.chainId):``,height:R(t.height)?String(t.height):`0`,time:R(t.time)?I(t.time):void 0,lastBlockId:R(t.lastBlockId)?e.BlockID.fromJSON(t.lastBlockId):void 0,lastCommitHash:R(t.lastCommitHash)?j(t.lastCommitHash):new Uint8Array,dataHash:R(t.dataHash)?j(t.dataHash):new Uint8Array,validatorsHash:R(t.validatorsHash)?j(t.validatorsHash):new Uint8Array,nextValidatorsHash:R(t.nextValidatorsHash)?j(t.nextValidatorsHash):new Uint8Array,consensusHash:R(t.consensusHash)?j(t.consensusHash):new Uint8Array,appHash:R(t.appHash)?j(t.appHash):new Uint8Array,lastResultsHash:R(t.lastResultsHash)?j(t.lastResultsHash):new Uint8Array,evidenceHash:R(t.evidenceHash)?j(t.evidenceHash):new Uint8Array,proposerAddress:R(t.proposerAddress)?j(t.proposerAddress):new Uint8Array}},toJSON(t){let n={};return t.version!==void 0&&(n.version=t.version?o.Consensus.toJSON(t.version):void 0),t.chainId!==void 0&&(n.chainId=t.chainId),t.height!==void 0&&(n.height=t.height),t.time!==void 0&&(n.time=t.time.toISOString()),t.lastBlockId!==void 0&&(n.lastBlockId=t.lastBlockId?e.BlockID.toJSON(t.lastBlockId):void 0),t.lastCommitHash!==void 0&&(n.lastCommitHash=N(t.lastCommitHash===void 0?new Uint8Array:t.lastCommitHash)),t.dataHash!==void 0&&(n.dataHash=N(t.dataHash===void 0?new Uint8Array:t.dataHash)),t.validatorsHash!==void 0&&(n.validatorsHash=N(t.validatorsHash===void 0?new Uint8Array:t.validatorsHash)),t.nextValidatorsHash!==void 0&&(n.nextValidatorsHash=N(t.nextValidatorsHash===void 0?new Uint8Array:t.nextValidatorsHash)),t.consensusHash!==void 0&&(n.consensusHash=N(t.consensusHash===void 0?new Uint8Array:t.consensusHash)),t.appHash!==void 0&&(n.appHash=N(t.appHash===void 0?new Uint8Array:t.appHash)),t.lastResultsHash!==void 0&&(n.lastResultsHash=N(t.lastResultsHash===void 0?new Uint8Array:t.lastResultsHash)),t.evidenceHash!==void 0&&(n.evidenceHash=N(t.evidenceHash===void 0?new Uint8Array:t.evidenceHash)),t.proposerAddress!==void 0&&(n.proposerAddress=N(t.proposerAddress===void 0?new Uint8Array:t.proposerAddress)),n},fromPartial(t){let n=y();return n.version=t.version!==void 0&&t.version!==null?o.Consensus.fromPartial(t.version):void 0,n.chainId=t.chainId??``,n.height=t.height??`0`,n.time=t.time??void 0,n.lastBlockId=t.lastBlockId!==void 0&&t.lastBlockId!==null?e.BlockID.fromPartial(t.lastBlockId):void 0,n.lastCommitHash=t.lastCommitHash??new Uint8Array,n.dataHash=t.dataHash??new Uint8Array,n.validatorsHash=t.validatorsHash??new Uint8Array,n.nextValidatorsHash=t.nextValidatorsHash??new Uint8Array,n.consensusHash=t.consensusHash??new Uint8Array,n.appHash=t.appHash??new Uint8Array,n.lastResultsHash=t.lastResultsHash??new Uint8Array,n.evidenceHash=t.evidenceHash??new Uint8Array,n.proposerAddress=t.proposerAddress??new Uint8Array,n}};function b(){return{txs:[]}}e.Data={encode(e,t=r.default.Writer.create()){for(let n of e.txs)t.uint32(10).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.txs.push(n.bytes());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{txs:Array.isArray(e?.txs)?e.txs.map(e=>j(e)):[]}},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>N(e===void 0?new Uint8Array:e)):t.txs=[],t},fromPartial(e){let t=b();return t.txs=e.txs?.map(e=>e)||[],t}};function x(){return{type:0,height:`0`,round:0,blockId:void 0,timestamp:void 0,validatorAddress:new Uint8Array,validatorIndex:0,signature:new Uint8Array}}e.Vote={encode(t,n=r.default.Writer.create()){return t.type!==0&&n.uint32(8).int32(t.type),t.height!==`0`&&n.uint32(16).int64(t.height),t.round!==0&&n.uint32(24).int32(t.round),t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(34).fork()).ldelim(),t.timestamp!==void 0&&i.Timestamp.encode(P(t.timestamp),n.uint32(42).fork()).ldelim(),t.validatorAddress.length!==0&&n.uint32(50).bytes(t.validatorAddress),t.validatorIndex!==0&&n.uint32(56).int32(t.validatorIndex),t.signature.length!==0&&n.uint32(66).bytes(t.signature),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=x();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.type=a.int32();break;case 2:s.height=L(a.int64());break;case 3:s.round=a.int32();break;case 4:s.blockId=e.BlockID.decode(a,a.uint32());break;case 5:s.timestamp=F(i.Timestamp.decode(a,a.uint32()));break;case 6:s.validatorAddress=a.bytes();break;case 7:s.validatorIndex=a.int32();break;case 8:s.signature=a.bytes();break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{type:R(t.type)?f(t.type):0,height:R(t.height)?String(t.height):`0`,round:R(t.round)?Number(t.round):0,blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,timestamp:R(t.timestamp)?I(t.timestamp):void 0,validatorAddress:R(t.validatorAddress)?j(t.validatorAddress):new Uint8Array,validatorIndex:R(t.validatorIndex)?Number(t.validatorIndex):0,signature:R(t.signature)?j(t.signature):new Uint8Array}},toJSON(t){let n={};return t.type!==void 0&&(n.type=p(t.type)),t.height!==void 0&&(n.height=t.height),t.round!==void 0&&(n.round=Math.round(t.round)),t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.timestamp!==void 0&&(n.timestamp=t.timestamp.toISOString()),t.validatorAddress!==void 0&&(n.validatorAddress=N(t.validatorAddress===void 0?new Uint8Array:t.validatorAddress)),t.validatorIndex!==void 0&&(n.validatorIndex=Math.round(t.validatorIndex)),t.signature!==void 0&&(n.signature=N(t.signature===void 0?new Uint8Array:t.signature)),n},fromPartial(t){let n=x();return n.type=t.type??0,n.height=t.height??`0`,n.round=t.round??0,n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.timestamp=t.timestamp??void 0,n.validatorAddress=t.validatorAddress??new Uint8Array,n.validatorIndex=t.validatorIndex??0,n.signature=t.signature??new Uint8Array,n}};function S(){return{height:`0`,round:0,blockId:void 0,signatures:[]}}e.Commit={encode(t,n=r.default.Writer.create()){t.height!==`0`&&n.uint32(8).int64(t.height),t.round!==0&&n.uint32(16).int32(t.round),t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(26).fork()).ldelim();for(let r of t.signatures)e.CommitSig.encode(r,n.uint32(34).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=S();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.height=L(i.int64());break;case 2:o.round=i.int32();break;case 3:o.blockId=e.BlockID.decode(i,i.uint32());break;case 4:o.signatures.push(e.CommitSig.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{height:R(t.height)?String(t.height):`0`,round:R(t.round)?Number(t.round):0,blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,signatures:Array.isArray(t?.signatures)?t.signatures.map(t=>e.CommitSig.fromJSON(t)):[]}},toJSON(t){let n={};return t.height!==void 0&&(n.height=t.height),t.round!==void 0&&(n.round=Math.round(t.round)),t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.signatures?n.signatures=t.signatures.map(t=>t?e.CommitSig.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=S();return n.height=t.height??`0`,n.round=t.round??0,n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.signatures=t.signatures?.map(t=>e.CommitSig.fromPartial(t))||[],n}};function C(){return{blockIdFlag:0,validatorAddress:new Uint8Array,timestamp:void 0,signature:new Uint8Array}}e.CommitSig={encode(e,t=r.default.Writer.create()){return e.blockIdFlag!==0&&t.uint32(8).int32(e.blockIdFlag),e.validatorAddress.length!==0&&t.uint32(18).bytes(e.validatorAddress),e.timestamp!==void 0&&i.Timestamp.encode(P(e.timestamp),t.uint32(26).fork()).ldelim(),e.signature.length!==0&&t.uint32(34).bytes(e.signature),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=C();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.blockIdFlag=n.int32();break;case 2:o.validatorAddress=n.bytes();break;case 3:o.timestamp=F(i.Timestamp.decode(n,n.uint32()));break;case 4:o.signature=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{blockIdFlag:R(e.blockIdFlag)?l(e.blockIdFlag):0,validatorAddress:R(e.validatorAddress)?j(e.validatorAddress):new Uint8Array,timestamp:R(e.timestamp)?I(e.timestamp):void 0,signature:R(e.signature)?j(e.signature):new Uint8Array}},toJSON(e){let t={};return e.blockIdFlag!==void 0&&(t.blockIdFlag=u(e.blockIdFlag)),e.validatorAddress!==void 0&&(t.validatorAddress=N(e.validatorAddress===void 0?new Uint8Array:e.validatorAddress)),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.signature!==void 0&&(t.signature=N(e.signature===void 0?new Uint8Array:e.signature)),t},fromPartial(e){let t=C();return t.blockIdFlag=e.blockIdFlag??0,t.validatorAddress=e.validatorAddress??new Uint8Array,t.timestamp=e.timestamp??void 0,t.signature=e.signature??new Uint8Array,t}};function w(){return{type:0,height:`0`,round:0,polRound:0,blockId:void 0,timestamp:void 0,signature:new Uint8Array}}e.Proposal={encode(t,n=r.default.Writer.create()){return t.type!==0&&n.uint32(8).int32(t.type),t.height!==`0`&&n.uint32(16).int64(t.height),t.round!==0&&n.uint32(24).int32(t.round),t.polRound!==0&&n.uint32(32).int32(t.polRound),t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(42).fork()).ldelim(),t.timestamp!==void 0&&i.Timestamp.encode(P(t.timestamp),n.uint32(50).fork()).ldelim(),t.signature.length!==0&&n.uint32(58).bytes(t.signature),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=w();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.type=a.int32();break;case 2:s.height=L(a.int64());break;case 3:s.round=a.int32();break;case 4:s.polRound=a.int32();break;case 5:s.blockId=e.BlockID.decode(a,a.uint32());break;case 6:s.timestamp=F(i.Timestamp.decode(a,a.uint32()));break;case 7:s.signature=a.bytes();break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{type:R(t.type)?f(t.type):0,height:R(t.height)?String(t.height):`0`,round:R(t.round)?Number(t.round):0,polRound:R(t.polRound)?Number(t.polRound):0,blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,timestamp:R(t.timestamp)?I(t.timestamp):void 0,signature:R(t.signature)?j(t.signature):new Uint8Array}},toJSON(t){let n={};return t.type!==void 0&&(n.type=p(t.type)),t.height!==void 0&&(n.height=t.height),t.round!==void 0&&(n.round=Math.round(t.round)),t.polRound!==void 0&&(n.polRound=Math.round(t.polRound)),t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.timestamp!==void 0&&(n.timestamp=t.timestamp.toISOString()),t.signature!==void 0&&(n.signature=N(t.signature===void 0?new Uint8Array:t.signature)),n},fromPartial(t){let n=w();return n.type=t.type??0,n.height=t.height??`0`,n.round=t.round??0,n.polRound=t.polRound??0,n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.timestamp=t.timestamp??void 0,n.signature=t.signature??new Uint8Array,n}};function T(){return{header:void 0,commit:void 0}}e.SignedHeader={encode(t,n=r.default.Writer.create()){return t.header!==void 0&&e.Header.encode(t.header,n.uint32(10).fork()).ldelim(),t.commit!==void 0&&e.Commit.encode(t.commit,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=T();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.header=e.Header.decode(i,i.uint32());break;case 2:o.commit=e.Commit.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{header:R(t.header)?e.Header.fromJSON(t.header):void 0,commit:R(t.commit)?e.Commit.fromJSON(t.commit):void 0}},toJSON(t){let n={};return t.header!==void 0&&(n.header=t.header?e.Header.toJSON(t.header):void 0),t.commit!==void 0&&(n.commit=t.commit?e.Commit.toJSON(t.commit):void 0),n},fromPartial(t){let n=T();return n.header=t.header!==void 0&&t.header!==null?e.Header.fromPartial(t.header):void 0,n.commit=t.commit!==void 0&&t.commit!==null?e.Commit.fromPartial(t.commit):void 0,n}};function E(){return{signedHeader:void 0,validatorSet:void 0}}e.LightBlock={encode(t,n=r.default.Writer.create()){return t.signedHeader!==void 0&&e.SignedHeader.encode(t.signedHeader,n.uint32(10).fork()).ldelim(),t.validatorSet!==void 0&&s.ValidatorSet.encode(t.validatorSet,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=E();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signedHeader=e.SignedHeader.decode(i,i.uint32());break;case 2:o.validatorSet=s.ValidatorSet.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{signedHeader:R(t.signedHeader)?e.SignedHeader.fromJSON(t.signedHeader):void 0,validatorSet:R(t.validatorSet)?s.ValidatorSet.fromJSON(t.validatorSet):void 0}},toJSON(t){let n={};return t.signedHeader!==void 0&&(n.signedHeader=t.signedHeader?e.SignedHeader.toJSON(t.signedHeader):void 0),t.validatorSet!==void 0&&(n.validatorSet=t.validatorSet?s.ValidatorSet.toJSON(t.validatorSet):void 0),n},fromPartial(t){let n=E();return n.signedHeader=t.signedHeader!==void 0&&t.signedHeader!==null?e.SignedHeader.fromPartial(t.signedHeader):void 0,n.validatorSet=t.validatorSet!==void 0&&t.validatorSet!==null?s.ValidatorSet.fromPartial(t.validatorSet):void 0,n}};function D(){return{blockId:void 0,blockSize:`0`,header:void 0,numTxs:`0`}}e.BlockMeta={encode(t,n=r.default.Writer.create()){return t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(10).fork()).ldelim(),t.blockSize!==`0`&&n.uint32(16).int64(t.blockSize),t.header!==void 0&&e.Header.encode(t.header,n.uint32(26).fork()).ldelim(),t.numTxs!==`0`&&n.uint32(32).int64(t.numTxs),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=D();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.blockId=e.BlockID.decode(i,i.uint32());break;case 2:o.blockSize=L(i.int64());break;case 3:o.header=e.Header.decode(i,i.uint32());break;case 4:o.numTxs=L(i.int64());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,blockSize:R(t.blockSize)?String(t.blockSize):`0`,header:R(t.header)?e.Header.fromJSON(t.header):void 0,numTxs:R(t.numTxs)?String(t.numTxs):`0`}},toJSON(t){let n={};return t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.blockSize!==void 0&&(n.blockSize=t.blockSize),t.header!==void 0&&(n.header=t.header?e.Header.toJSON(t.header):void 0),t.numTxs!==void 0&&(n.numTxs=t.numTxs),n},fromPartial(t){let n=D();return n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.blockSize=t.blockSize??`0`,n.header=t.header!==void 0&&t.header!==null?e.Header.fromPartial(t.header):void 0,n.numTxs=t.numTxs??`0`,n}};function O(){return{rootHash:new Uint8Array,data:new Uint8Array,proof:void 0}}e.TxProof={encode(e,t=r.default.Writer.create()){return e.rootHash.length!==0&&t.uint32(10).bytes(e.rootHash),e.data.length!==0&&t.uint32(18).bytes(e.data),e.proof!==void 0&&a.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=O();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.rootHash=n.bytes();break;case 2:o.data=n.bytes();break;case 3:o.proof=a.Proof.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{rootHash:R(e.rootHash)?j(e.rootHash):new Uint8Array,data:R(e.data)?j(e.data):new Uint8Array,proof:R(e.proof)?a.Proof.fromJSON(e.proof):void 0}},toJSON(e){let t={};return e.rootHash!==void 0&&(t.rootHash=N(e.rootHash===void 0?new Uint8Array:e.rootHash)),e.data!==void 0&&(t.data=N(e.data===void 0?new Uint8Array:e.data)),e.proof!==void 0&&(t.proof=e.proof?a.Proof.toJSON(e.proof):void 0),t},fromPartial(e){let t=O();return t.rootHash=e.rootHash??new Uint8Array,t.data=e.data??new Uint8Array,t.proof=e.proof!==void 0&&e.proof!==null?a.Proof.fromPartial(e.proof):void 0,t}};var k=(()=>{if(k!==void 0)return k;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),A=k.atob||(e=>k.Buffer.from(e,`base64`).toString(`binary`));function j(e){let t=A(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var M=k.btoa||(e=>k.Buffer.from(e,`binary`).toString(`base64`));function N(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return M(t.join(``))}function P(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function F(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function I(e){return e instanceof Date?e:typeof e==`string`?new Date(e):F(i.Timestamp.fromJSON(e))}function L(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function R(e){return e!=null}})),tc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Any=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`google.protobuf`;function i(){return{typeUrl:``,value:new Uint8Array}}e.Any={encode(e,t=r.default.Writer.create()){return e.typeUrl!==``&&t.uint32(10).string(e.typeUrl),e.value.length!==0&&t.uint32(18).bytes(e.value),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.typeUrl=n.string();break;case 2:o.value=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{typeUrl:u(e.typeUrl)?String(e.typeUrl):``,value:u(e.value)?s(e.value):new Uint8Array}},toJSON(e){let t={};return e.typeUrl!==void 0&&(t.typeUrl=e.typeUrl),e.value!==void 0&&(t.value=l(e.value===void 0?new Uint8Array:e.value)),t},fromPartial(e){let t=i();return t.typeUrl=e.typeUrl??``,t.value=e.value??new Uint8Array,t}};var a=(()=>{if(a!==void 0)return a;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),o=a.atob||(e=>a.Buffer.from(e,`base64`).toString(`binary`));function s(e){let t=o(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var c=a.btoa||(e=>a.Buffer.from(e,`binary`).toString(`base64`));function l(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return c(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),nc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Duration=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`google.protobuf`;function i(){return{seconds:`0`,nanos:0}}e.Duration={encode(e,t=r.default.Writer.create()){return e.seconds!==`0`&&t.uint32(8).int64(e.seconds),e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=i();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.seconds=a(n.int64());break;case 2:s.nanos=n.int32();break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{seconds:o(e.seconds)?String(e.seconds):`0`,nanos:o(e.nanos)?Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==void 0&&(t.seconds=e.seconds),e.nanos!==void 0&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){let t=i();return t.seconds=e.seconds??`0`,t.nanos=e.nanos??0,t}};function a(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function o(e){return e!=null}})),rc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Pool=e.RedelegationResponse=e.RedelegationEntryResponse=e.DelegationResponse=e.Params=e.Redelegation=e.RedelegationEntry=e.UnbondingDelegationEntry=e.UnbondingDelegation=e.Delegation=e.DVVTriplets=e.DVVTriplet=e.DVPairs=e.DVPair=e.ValAddresses=e.Validator=e.Description=e.Commission=e.CommissionRates=e.HistoricalInfo=e.bondStatusToJSON=e.bondStatusFromJSON=e.BondStatus=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=ec(),o=tc(),s=nc(),c=Ks();e.protobufPackage=`cosmos.staking.v1beta1`;var l;(function(e){e[e.BOND_STATUS_UNSPECIFIED=0]=`BOND_STATUS_UNSPECIFIED`,e[e.BOND_STATUS_UNBONDED=1]=`BOND_STATUS_UNBONDED`,e[e.BOND_STATUS_UNBONDING=2]=`BOND_STATUS_UNBONDING`,e[e.BOND_STATUS_BONDED=3]=`BOND_STATUS_BONDED`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(l=e.BondStatus||={});function u(e){switch(e){case 0:case`BOND_STATUS_UNSPECIFIED`:return l.BOND_STATUS_UNSPECIFIED;case 1:case`BOND_STATUS_UNBONDED`:return l.BOND_STATUS_UNBONDED;case 2:case`BOND_STATUS_UNBONDING`:return l.BOND_STATUS_UNBONDING;case 3:case`BOND_STATUS_BONDED`:return l.BOND_STATUS_BONDED;default:return l.UNRECOGNIZED}}e.bondStatusFromJSON=u;function d(e){switch(e){case l.BOND_STATUS_UNSPECIFIED:return`BOND_STATUS_UNSPECIFIED`;case l.BOND_STATUS_UNBONDED:return`BOND_STATUS_UNBONDED`;case l.BOND_STATUS_UNBONDING:return`BOND_STATUS_UNBONDING`;case l.BOND_STATUS_BONDED:return`BOND_STATUS_BONDED`;default:return`UNKNOWN`}}e.bondStatusToJSON=d;function f(){return{header:void 0,valset:[]}}e.HistoricalInfo={encode(t,n=r.default.Writer.create()){t.header!==void 0&&a.Header.encode(t.header,n.uint32(10).fork()).ldelim();for(let r of t.valset)e.Validator.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=f();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.header=a.Header.decode(i,i.uint32());break;case 2:s.valset.push(e.Validator.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{header:I(t.header)?a.Header.fromJSON(t.header):void 0,valset:Array.isArray(t?.valset)?t.valset.map(t=>e.Validator.fromJSON(t)):[]}},toJSON(t){let n={};return t.header!==void 0&&(n.header=t.header?a.Header.toJSON(t.header):void 0),t.valset?n.valset=t.valset.map(t=>t?e.Validator.toJSON(t):void 0):n.valset=[],n},fromPartial(t){let n=f();return n.header=t.header!==void 0&&t.header!==null?a.Header.fromPartial(t.header):void 0,n.valset=t.valset?.map(t=>e.Validator.fromPartial(t))||[],n}};function p(){return{rate:``,maxRate:``,maxChangeRate:``}}e.CommissionRates={encode(e,t=r.default.Writer.create()){return e.rate!==``&&t.uint32(10).string(e.rate),e.maxRate!==``&&t.uint32(18).string(e.maxRate),e.maxChangeRate!==``&&t.uint32(26).string(e.maxChangeRate),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.rate=n.string();break;case 2:a.maxRate=n.string();break;case 3:a.maxChangeRate=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{rate:I(e.rate)?String(e.rate):``,maxRate:I(e.maxRate)?String(e.maxRate):``,maxChangeRate:I(e.maxChangeRate)?String(e.maxChangeRate):``}},toJSON(e){let t={};return e.rate!==void 0&&(t.rate=e.rate),e.maxRate!==void 0&&(t.maxRate=e.maxRate),e.maxChangeRate!==void 0&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){let t=p();return t.rate=e.rate??``,t.maxRate=e.maxRate??``,t.maxChangeRate=e.maxChangeRate??``,t}};function m(){return{commissionRates:void 0,updateTime:void 0}}e.Commission={encode(t,n=r.default.Writer.create()){return t.commissionRates!==void 0&&e.CommissionRates.encode(t.commissionRates,n.uint32(10).fork()).ldelim(),t.updateTime!==void 0&&i.Timestamp.encode(M(t.updateTime),n.uint32(18).fork()).ldelim(),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=m();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.commissionRates=e.CommissionRates.decode(a,a.uint32());break;case 2:s.updateTime=N(i.Timestamp.decode(a,a.uint32()));break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{commissionRates:I(t.commissionRates)?e.CommissionRates.fromJSON(t.commissionRates):void 0,updateTime:I(t.updateTime)?P(t.updateTime):void 0}},toJSON(t){let n={};return t.commissionRates!==void 0&&(n.commissionRates=t.commissionRates?e.CommissionRates.toJSON(t.commissionRates):void 0),t.updateTime!==void 0&&(n.updateTime=t.updateTime.toISOString()),n},fromPartial(t){let n=m();return n.commissionRates=t.commissionRates!==void 0&&t.commissionRates!==null?e.CommissionRates.fromPartial(t.commissionRates):void 0,n.updateTime=t.updateTime??void 0,n}};function h(){return{moniker:``,identity:``,website:``,securityContact:``,details:``}}e.Description={encode(e,t=r.default.Writer.create()){return e.moniker!==``&&t.uint32(10).string(e.moniker),e.identity!==``&&t.uint32(18).string(e.identity),e.website!==``&&t.uint32(26).string(e.website),e.securityContact!==``&&t.uint32(34).string(e.securityContact),e.details!==``&&t.uint32(42).string(e.details),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=h();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.moniker=n.string();break;case 2:a.identity=n.string();break;case 3:a.website=n.string();break;case 4:a.securityContact=n.string();break;case 5:a.details=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{moniker:I(e.moniker)?String(e.moniker):``,identity:I(e.identity)?String(e.identity):``,website:I(e.website)?String(e.website):``,securityContact:I(e.securityContact)?String(e.securityContact):``,details:I(e.details)?String(e.details):``}},toJSON(e){let t={};return e.moniker!==void 0&&(t.moniker=e.moniker),e.identity!==void 0&&(t.identity=e.identity),e.website!==void 0&&(t.website=e.website),e.securityContact!==void 0&&(t.securityContact=e.securityContact),e.details!==void 0&&(t.details=e.details),t},fromPartial(e){let t=h();return t.moniker=e.moniker??``,t.identity=e.identity??``,t.website=e.website??``,t.securityContact=e.securityContact??``,t.details=e.details??``,t}};function g(){return{operatorAddress:``,consensusPubkey:void 0,jailed:!1,status:0,tokens:``,delegatorShares:``,description:void 0,unbondingHeight:`0`,unbondingTime:void 0,commission:void 0,minSelfDelegation:``}}e.Validator={encode(t,n=r.default.Writer.create()){return t.operatorAddress!==``&&n.uint32(10).string(t.operatorAddress),t.consensusPubkey!==void 0&&o.Any.encode(t.consensusPubkey,n.uint32(18).fork()).ldelim(),t.jailed===!0&&n.uint32(24).bool(t.jailed),t.status!==0&&n.uint32(32).int32(t.status),t.tokens!==``&&n.uint32(42).string(t.tokens),t.delegatorShares!==``&&n.uint32(50).string(t.delegatorShares),t.description!==void 0&&e.Description.encode(t.description,n.uint32(58).fork()).ldelim(),t.unbondingHeight!==`0`&&n.uint32(64).int64(t.unbondingHeight),t.unbondingTime!==void 0&&i.Timestamp.encode(M(t.unbondingTime),n.uint32(74).fork()).ldelim(),t.commission!==void 0&&e.Commission.encode(t.commission,n.uint32(82).fork()).ldelim(),t.minSelfDelegation!==``&&n.uint32(90).string(t.minSelfDelegation),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),s=n===void 0?a.len:a.pos+n,c=g();for(;a.pos<s;){let t=a.uint32();switch(t>>>3){case 1:c.operatorAddress=a.string();break;case 2:c.consensusPubkey=o.Any.decode(a,a.uint32());break;case 3:c.jailed=a.bool();break;case 4:c.status=a.int32();break;case 5:c.tokens=a.string();break;case 6:c.delegatorShares=a.string();break;case 7:c.description=e.Description.decode(a,a.uint32());break;case 8:c.unbondingHeight=F(a.int64());break;case 9:c.unbondingTime=N(i.Timestamp.decode(a,a.uint32()));break;case 10:c.commission=e.Commission.decode(a,a.uint32());break;case 11:c.minSelfDelegation=a.string();break;default:a.skipType(t&7);break}}return c},fromJSON(t){return{operatorAddress:I(t.operatorAddress)?String(t.operatorAddress):``,consensusPubkey:I(t.consensusPubkey)?o.Any.fromJSON(t.consensusPubkey):void 0,jailed:I(t.jailed)?!!t.jailed:!1,status:I(t.status)?u(t.status):0,tokens:I(t.tokens)?String(t.tokens):``,delegatorShares:I(t.delegatorShares)?String(t.delegatorShares):``,description:I(t.description)?e.Description.fromJSON(t.description):void 0,unbondingHeight:I(t.unbondingHeight)?String(t.unbondingHeight):`0`,unbondingTime:I(t.unbondingTime)?P(t.unbondingTime):void 0,commission:I(t.commission)?e.Commission.fromJSON(t.commission):void 0,minSelfDelegation:I(t.minSelfDelegation)?String(t.minSelfDelegation):``}},toJSON(t){let n={};return t.operatorAddress!==void 0&&(n.operatorAddress=t.operatorAddress),t.consensusPubkey!==void 0&&(n.consensusPubkey=t.consensusPubkey?o.Any.toJSON(t.consensusPubkey):void 0),t.jailed!==void 0&&(n.jailed=t.jailed),t.status!==void 0&&(n.status=d(t.status)),t.tokens!==void 0&&(n.tokens=t.tokens),t.delegatorShares!==void 0&&(n.delegatorShares=t.delegatorShares),t.description!==void 0&&(n.description=t.description?e.Description.toJSON(t.description):void 0),t.unbondingHeight!==void 0&&(n.unbondingHeight=t.unbondingHeight),t.unbondingTime!==void 0&&(n.unbondingTime=t.unbondingTime.toISOString()),t.commission!==void 0&&(n.commission=t.commission?e.Commission.toJSON(t.commission):void 0),t.minSelfDelegation!==void 0&&(n.minSelfDelegation=t.minSelfDelegation),n},fromPartial(t){let n=g();return n.operatorAddress=t.operatorAddress??``,n.consensusPubkey=t.consensusPubkey!==void 0&&t.consensusPubkey!==null?o.Any.fromPartial(t.consensusPubkey):void 0,n.jailed=t.jailed??!1,n.status=t.status??0,n.tokens=t.tokens??``,n.delegatorShares=t.delegatorShares??``,n.description=t.description!==void 0&&t.description!==null?e.Description.fromPartial(t.description):void 0,n.unbondingHeight=t.unbondingHeight??`0`,n.unbondingTime=t.unbondingTime??void 0,n.commission=t.commission!==void 0&&t.commission!==null?e.Commission.fromPartial(t.commission):void 0,n.minSelfDelegation=t.minSelfDelegation??``,n}};function _(){return{addresses:[]}}e.ValAddresses={encode(e,t=r.default.Writer.create()){for(let n of e.addresses)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.addresses.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{addresses:Array.isArray(e?.addresses)?e.addresses.map(e=>String(e)):[]}},toJSON(e){let t={};return e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){let t=_();return t.addresses=e.addresses?.map(e=>e)||[],t}};function v(){return{delegatorAddress:``,validatorAddress:``}}e.DVPair={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=v();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:I(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:I(e.validatorAddress)?String(e.validatorAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){let t=v();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t}};function y(){return{pairs:[]}}e.DVPairs={encode(t,n=r.default.Writer.create()){for(let r of t.pairs)e.DVPair.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=y();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.pairs.push(e.DVPair.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{pairs:Array.isArray(t?.pairs)?t.pairs.map(t=>e.DVPair.fromJSON(t)):[]}},toJSON(t){let n={};return t.pairs?n.pairs=t.pairs.map(t=>t?e.DVPair.toJSON(t):void 0):n.pairs=[],n},fromPartial(t){let n=y();return n.pairs=t.pairs?.map(t=>e.DVPair.fromPartial(t))||[],n}};function b(){return{delegatorAddress:``,validatorSrcAddress:``,validatorDstAddress:``}}e.DVVTriplet={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorSrcAddress!==``&&t.uint32(18).string(e.validatorSrcAddress),e.validatorDstAddress!==``&&t.uint32(26).string(e.validatorDstAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorSrcAddress=n.string();break;case 3:a.validatorDstAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:I(e.delegatorAddress)?String(e.delegatorAddress):``,validatorSrcAddress:I(e.validatorSrcAddress)?String(e.validatorSrcAddress):``,validatorDstAddress:I(e.validatorDstAddress)?String(e.validatorDstAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorSrcAddress!==void 0&&(t.validatorSrcAddress=e.validatorSrcAddress),e.validatorDstAddress!==void 0&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){let t=b();return t.delegatorAddress=e.delegatorAddress??``,t.validatorSrcAddress=e.validatorSrcAddress??``,t.validatorDstAddress=e.validatorDstAddress??``,t}};function x(){return{triplets:[]}}e.DVVTriplets={encode(t,n=r.default.Writer.create()){for(let r of t.triplets)e.DVVTriplet.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=x();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.triplets.push(e.DVVTriplet.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{triplets:Array.isArray(t?.triplets)?t.triplets.map(t=>e.DVVTriplet.fromJSON(t)):[]}},toJSON(t){let n={};return t.triplets?n.triplets=t.triplets.map(t=>t?e.DVVTriplet.toJSON(t):void 0):n.triplets=[],n},fromPartial(t){let n=x();return n.triplets=t.triplets?.map(t=>e.DVVTriplet.fromPartial(t))||[],n}};function S(){return{delegatorAddress:``,validatorAddress:``,shares:``}}e.Delegation={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.shares!==``&&t.uint32(26).string(e.shares),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=S();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;case 3:a.shares=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:I(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:I(e.validatorAddress)?String(e.validatorAddress):``,shares:I(e.shares)?String(e.shares):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.shares!==void 0&&(t.shares=e.shares),t},fromPartial(e){let t=S();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.shares=e.shares??``,t}};function C(){return{delegatorAddress:``,validatorAddress:``,entries:[]}}e.UnbondingDelegation={encode(t,n=r.default.Writer.create()){t.delegatorAddress!==``&&n.uint32(10).string(t.delegatorAddress),t.validatorAddress!==``&&n.uint32(18).string(t.validatorAddress);for(let r of t.entries)e.UnbondingDelegationEntry.encode(r,n.uint32(26).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=C();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.delegatorAddress=i.string();break;case 2:o.validatorAddress=i.string();break;case 3:o.entries.push(e.UnbondingDelegationEntry.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{delegatorAddress:I(t.delegatorAddress)?String(t.delegatorAddress):``,validatorAddress:I(t.validatorAddress)?String(t.validatorAddress):``,entries:Array.isArray(t?.entries)?t.entries.map(t=>e.UnbondingDelegationEntry.fromJSON(t)):[]}},toJSON(t){let n={};return t.delegatorAddress!==void 0&&(n.delegatorAddress=t.delegatorAddress),t.validatorAddress!==void 0&&(n.validatorAddress=t.validatorAddress),t.entries?n.entries=t.entries.map(t=>t?e.UnbondingDelegationEntry.toJSON(t):void 0):n.entries=[],n},fromPartial(t){let n=C();return n.delegatorAddress=t.delegatorAddress??``,n.validatorAddress=t.validatorAddress??``,n.entries=t.entries?.map(t=>e.UnbondingDelegationEntry.fromPartial(t))||[],n}};function w(){return{creationHeight:`0`,completionTime:void 0,initialBalance:``,balance:``}}e.UnbondingDelegationEntry={encode(e,t=r.default.Writer.create()){return e.creationHeight!==`0`&&t.uint32(8).int64(e.creationHeight),e.completionTime!==void 0&&i.Timestamp.encode(M(e.completionTime),t.uint32(18).fork()).ldelim(),e.initialBalance!==``&&t.uint32(26).string(e.initialBalance),e.balance!==``&&t.uint32(34).string(e.balance),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=w();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.creationHeight=F(n.int64());break;case 2:o.completionTime=N(i.Timestamp.decode(n,n.uint32()));break;case 3:o.initialBalance=n.string();break;case 4:o.balance=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{creationHeight:I(e.creationHeight)?String(e.creationHeight):`0`,completionTime:I(e.completionTime)?P(e.completionTime):void 0,initialBalance:I(e.initialBalance)?String(e.initialBalance):``,balance:I(e.balance)?String(e.balance):``}},toJSON(e){let t={};return e.creationHeight!==void 0&&(t.creationHeight=e.creationHeight),e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),e.initialBalance!==void 0&&(t.initialBalance=e.initialBalance),e.balance!==void 0&&(t.balance=e.balance),t},fromPartial(e){let t=w();return t.creationHeight=e.creationHeight??`0`,t.completionTime=e.completionTime??void 0,t.initialBalance=e.initialBalance??``,t.balance=e.balance??``,t}};function T(){return{creationHeight:`0`,completionTime:void 0,initialBalance:``,sharesDst:``}}e.RedelegationEntry={encode(e,t=r.default.Writer.create()){return e.creationHeight!==`0`&&t.uint32(8).int64(e.creationHeight),e.completionTime!==void 0&&i.Timestamp.encode(M(e.completionTime),t.uint32(18).fork()).ldelim(),e.initialBalance!==``&&t.uint32(26).string(e.initialBalance),e.sharesDst!==``&&t.uint32(34).string(e.sharesDst),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=T();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.creationHeight=F(n.int64());break;case 2:o.completionTime=N(i.Timestamp.decode(n,n.uint32()));break;case 3:o.initialBalance=n.string();break;case 4:o.sharesDst=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{creationHeight:I(e.creationHeight)?String(e.creationHeight):`0`,completionTime:I(e.completionTime)?P(e.completionTime):void 0,initialBalance:I(e.initialBalance)?String(e.initialBalance):``,sharesDst:I(e.sharesDst)?String(e.sharesDst):``}},toJSON(e){let t={};return e.creationHeight!==void 0&&(t.creationHeight=e.creationHeight),e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),e.initialBalance!==void 0&&(t.initialBalance=e.initialBalance),e.sharesDst!==void 0&&(t.sharesDst=e.sharesDst),t},fromPartial(e){let t=T();return t.creationHeight=e.creationHeight??`0`,t.completionTime=e.completionTime??void 0,t.initialBalance=e.initialBalance??``,t.sharesDst=e.sharesDst??``,t}};function E(){return{delegatorAddress:``,validatorSrcAddress:``,validatorDstAddress:``,entries:[]}}e.Redelegation={encode(t,n=r.default.Writer.create()){t.delegatorAddress!==``&&n.uint32(10).string(t.delegatorAddress),t.validatorSrcAddress!==``&&n.uint32(18).string(t.validatorSrcAddress),t.validatorDstAddress!==``&&n.uint32(26).string(t.validatorDstAddress);for(let r of t.entries)e.RedelegationEntry.encode(r,n.uint32(34).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=E();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.delegatorAddress=i.string();break;case 2:o.validatorSrcAddress=i.string();break;case 3:o.validatorDstAddress=i.string();break;case 4:o.entries.push(e.RedelegationEntry.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{delegatorAddress:I(t.delegatorAddress)?String(t.delegatorAddress):``,validatorSrcAddress:I(t.validatorSrcAddress)?String(t.validatorSrcAddress):``,validatorDstAddress:I(t.validatorDstAddress)?String(t.validatorDstAddress):``,entries:Array.isArray(t?.entries)?t.entries.map(t=>e.RedelegationEntry.fromJSON(t)):[]}},toJSON(t){let n={};return t.delegatorAddress!==void 0&&(n.delegatorAddress=t.delegatorAddress),t.validatorSrcAddress!==void 0&&(n.validatorSrcAddress=t.validatorSrcAddress),t.validatorDstAddress!==void 0&&(n.validatorDstAddress=t.validatorDstAddress),t.entries?n.entries=t.entries.map(t=>t?e.RedelegationEntry.toJSON(t):void 0):n.entries=[],n},fromPartial(t){let n=E();return n.delegatorAddress=t.delegatorAddress??``,n.validatorSrcAddress=t.validatorSrcAddress??``,n.validatorDstAddress=t.validatorDstAddress??``,n.entries=t.entries?.map(t=>e.RedelegationEntry.fromPartial(t))||[],n}};function D(){return{unbondingTime:void 0,maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:``}}e.Params={encode(e,t=r.default.Writer.create()){return e.unbondingTime!==void 0&&s.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),e.maxValidators!==0&&t.uint32(16).uint32(e.maxValidators),e.maxEntries!==0&&t.uint32(24).uint32(e.maxEntries),e.historicalEntries!==0&&t.uint32(32).uint32(e.historicalEntries),e.bondDenom!==``&&t.uint32(42).string(e.bondDenom),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=D();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.unbondingTime=s.Duration.decode(n,n.uint32());break;case 2:a.maxValidators=n.uint32();break;case 3:a.maxEntries=n.uint32();break;case 4:a.historicalEntries=n.uint32();break;case 5:a.bondDenom=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{unbondingTime:I(e.unbondingTime)?s.Duration.fromJSON(e.unbondingTime):void 0,maxValidators:I(e.maxValidators)?Number(e.maxValidators):0,maxEntries:I(e.maxEntries)?Number(e.maxEntries):0,historicalEntries:I(e.historicalEntries)?Number(e.historicalEntries):0,bondDenom:I(e.bondDenom)?String(e.bondDenom):``}},toJSON(e){let t={};return e.unbondingTime!==void 0&&(t.unbondingTime=e.unbondingTime?s.Duration.toJSON(e.unbondingTime):void 0),e.maxValidators!==void 0&&(t.maxValidators=Math.round(e.maxValidators)),e.maxEntries!==void 0&&(t.maxEntries=Math.round(e.maxEntries)),e.historicalEntries!==void 0&&(t.historicalEntries=Math.round(e.historicalEntries)),e.bondDenom!==void 0&&(t.bondDenom=e.bondDenom),t},fromPartial(e){let t=D();return t.unbondingTime=e.unbondingTime!==void 0&&e.unbondingTime!==null?s.Duration.fromPartial(e.unbondingTime):void 0,t.maxValidators=e.maxValidators??0,t.maxEntries=e.maxEntries??0,t.historicalEntries=e.historicalEntries??0,t.bondDenom=e.bondDenom??``,t}};function O(){return{delegation:void 0,balance:void 0}}e.DelegationResponse={encode(t,n=r.default.Writer.create()){return t.delegation!==void 0&&e.Delegation.encode(t.delegation,n.uint32(10).fork()).ldelim(),t.balance!==void 0&&c.Coin.encode(t.balance,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=O();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.delegation=e.Delegation.decode(i,i.uint32());break;case 2:o.balance=c.Coin.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{delegation:I(t.delegation)?e.Delegation.fromJSON(t.delegation):void 0,balance:I(t.balance)?c.Coin.fromJSON(t.balance):void 0}},toJSON(t){let n={};return t.delegation!==void 0&&(n.delegation=t.delegation?e.Delegation.toJSON(t.delegation):void 0),t.balance!==void 0&&(n.balance=t.balance?c.Coin.toJSON(t.balance):void 0),n},fromPartial(t){let n=O();return n.delegation=t.delegation!==void 0&&t.delegation!==null?e.Delegation.fromPartial(t.delegation):void 0,n.balance=t.balance!==void 0&&t.balance!==null?c.Coin.fromPartial(t.balance):void 0,n}};function k(){return{redelegationEntry:void 0,balance:``}}e.RedelegationEntryResponse={encode(t,n=r.default.Writer.create()){return t.redelegationEntry!==void 0&&e.RedelegationEntry.encode(t.redelegationEntry,n.uint32(10).fork()).ldelim(),t.balance!==``&&n.uint32(34).string(t.balance),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=k();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.redelegationEntry=e.RedelegationEntry.decode(i,i.uint32());break;case 4:o.balance=i.string();break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{redelegationEntry:I(t.redelegationEntry)?e.RedelegationEntry.fromJSON(t.redelegationEntry):void 0,balance:I(t.balance)?String(t.balance):``}},toJSON(t){let n={};return t.redelegationEntry!==void 0&&(n.redelegationEntry=t.redelegationEntry?e.RedelegationEntry.toJSON(t.redelegationEntry):void 0),t.balance!==void 0&&(n.balance=t.balance),n},fromPartial(t){let n=k();return n.redelegationEntry=t.redelegationEntry!==void 0&&t.redelegationEntry!==null?e.RedelegationEntry.fromPartial(t.redelegationEntry):void 0,n.balance=t.balance??``,n}};function A(){return{redelegation:void 0,entries:[]}}e.RedelegationResponse={encode(t,n=r.default.Writer.create()){t.redelegation!==void 0&&e.Redelegation.encode(t.redelegation,n.uint32(10).fork()).ldelim();for(let r of t.entries)e.RedelegationEntryResponse.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=A();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.redelegation=e.Redelegation.decode(i,i.uint32());break;case 2:o.entries.push(e.RedelegationEntryResponse.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{redelegation:I(t.redelegation)?e.Redelegation.fromJSON(t.redelegation):void 0,entries:Array.isArray(t?.entries)?t.entries.map(t=>e.RedelegationEntryResponse.fromJSON(t)):[]}},toJSON(t){let n={};return t.redelegation!==void 0&&(n.redelegation=t.redelegation?e.Redelegation.toJSON(t.redelegation):void 0),t.entries?n.entries=t.entries.map(t=>t?e.RedelegationEntryResponse.toJSON(t):void 0):n.entries=[],n},fromPartial(t){let n=A();return n.redelegation=t.redelegation!==void 0&&t.redelegation!==null?e.Redelegation.fromPartial(t.redelegation):void 0,n.entries=t.entries?.map(t=>e.RedelegationEntryResponse.fromPartial(t))||[],n}};function j(){return{notBondedTokens:``,bondedTokens:``}}e.Pool={encode(e,t=r.default.Writer.create()){return e.notBondedTokens!==``&&t.uint32(10).string(e.notBondedTokens),e.bondedTokens!==``&&t.uint32(18).string(e.bondedTokens),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=j();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.notBondedTokens=n.string();break;case 2:a.bondedTokens=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{notBondedTokens:I(e.notBondedTokens)?String(e.notBondedTokens):``,bondedTokens:I(e.bondedTokens)?String(e.bondedTokens):``}},toJSON(e){let t={};return e.notBondedTokens!==void 0&&(t.notBondedTokens=e.notBondedTokens),e.bondedTokens!==void 0&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){let t=j();return t.notBondedTokens=e.notBondedTokens??``,t.bondedTokens=e.bondedTokens??``,t}};function M(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function N(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function P(e){return e instanceof Date?e:typeof e==`string`?new Date(e):N(i.Timestamp.fromJSON(e))}function F(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function I(e){return e!=null}})),ic=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgUndelegateResponse=e.MsgUndelegate=e.MsgBeginRedelegateResponse=e.MsgBeginRedelegate=e.MsgDelegateResponse=e.MsgDelegate=e.MsgEditValidatorResponse=e.MsgEditValidator=e.MsgCreateValidatorResponse=e.MsgCreateValidator=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=rc(),o=tc(),s=Ks();e.protobufPackage=`cosmos.staking.v1beta1`;function c(){return{description:void 0,commission:void 0,minSelfDelegation:``,delegatorAddress:``,validatorAddress:``,pubkey:void 0,value:void 0}}e.MsgCreateValidator={encode(e,t=r.default.Writer.create()){return e.description!==void 0&&a.Description.encode(e.description,t.uint32(10).fork()).ldelim(),e.commission!==void 0&&a.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),e.minSelfDelegation!==``&&t.uint32(26).string(e.minSelfDelegation),e.delegatorAddress!==``&&t.uint32(34).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(42).string(e.validatorAddress),e.pubkey!==void 0&&o.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),e.value!==void 0&&s.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,l=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:l.description=a.Description.decode(n,n.uint32());break;case 2:l.commission=a.CommissionRates.decode(n,n.uint32());break;case 3:l.minSelfDelegation=n.string();break;case 4:l.delegatorAddress=n.string();break;case 5:l.validatorAddress=n.string();break;case 6:l.pubkey=o.Any.decode(n,n.uint32());break;case 7:l.value=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return l},fromJSON(e){return{description:x(e.description)?a.Description.fromJSON(e.description):void 0,commission:x(e.commission)?a.CommissionRates.fromJSON(e.commission):void 0,minSelfDelegation:x(e.minSelfDelegation)?String(e.minSelfDelegation):``,delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,pubkey:x(e.pubkey)?o.Any.fromJSON(e.pubkey):void 0,value:x(e.value)?s.Coin.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.description!==void 0&&(t.description=e.description?a.Description.toJSON(e.description):void 0),e.commission!==void 0&&(t.commission=e.commission?a.CommissionRates.toJSON(e.commission):void 0),e.minSelfDelegation!==void 0&&(t.minSelfDelegation=e.minSelfDelegation),e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.pubkey!==void 0&&(t.pubkey=e.pubkey?o.Any.toJSON(e.pubkey):void 0),e.value!==void 0&&(t.value=e.value?s.Coin.toJSON(e.value):void 0),t},fromPartial(e){let t=c();return t.description=e.description!==void 0&&e.description!==null?a.Description.fromPartial(e.description):void 0,t.commission=e.commission!==void 0&&e.commission!==null?a.CommissionRates.fromPartial(e.commission):void 0,t.minSelfDelegation=e.minSelfDelegation??``,t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.pubkey=e.pubkey!==void 0&&e.pubkey!==null?o.Any.fromPartial(e.pubkey):void 0,t.value=e.value!==void 0&&e.value!==null?s.Coin.fromPartial(e.value):void 0,t}};function l(){return{}}e.MsgCreateValidatorResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}};function u(){return{description:void 0,validatorAddress:``,commissionRate:``,minSelfDelegation:``}}e.MsgEditValidator={encode(e,t=r.default.Writer.create()){return e.description!==void 0&&a.Description.encode(e.description,t.uint32(10).fork()).ldelim(),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.commissionRate!==``&&t.uint32(26).string(e.commissionRate),e.minSelfDelegation!==``&&t.uint32(34).string(e.minSelfDelegation),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.description=a.Description.decode(n,n.uint32());break;case 2:o.validatorAddress=n.string();break;case 3:o.commissionRate=n.string();break;case 4:o.minSelfDelegation=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{description:x(e.description)?a.Description.fromJSON(e.description):void 0,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,commissionRate:x(e.commissionRate)?String(e.commissionRate):``,minSelfDelegation:x(e.minSelfDelegation)?String(e.minSelfDelegation):``}},toJSON(e){let t={};return e.description!==void 0&&(t.description=e.description?a.Description.toJSON(e.description):void 0),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.commissionRate!==void 0&&(t.commissionRate=e.commissionRate),e.minSelfDelegation!==void 0&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){let t=u();return t.description=e.description!==void 0&&e.description!==null?a.Description.fromPartial(e.description):void 0,t.validatorAddress=e.validatorAddress??``,t.commissionRate=e.commissionRate??``,t.minSelfDelegation=e.minSelfDelegation??``,t}};function d(){return{}}e.MsgEditValidatorResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return d()}};function f(){return{delegatorAddress:``,validatorAddress:``,amount:void 0}}e.MsgDelegate={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.amount!==void 0&&s.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;case 3:a.amount=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,amount:x(e.amount)?s.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.amount!==void 0&&(t.amount=e.amount?s.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=f();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.amount=e.amount!==void 0&&e.amount!==null?s.Coin.fromPartial(e.amount):void 0,t}};function p(){return{}}e.MsgDelegateResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return p()}};function m(){return{delegatorAddress:``,validatorSrcAddress:``,validatorDstAddress:``,amount:void 0}}e.MsgBeginRedelegate={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorSrcAddress!==``&&t.uint32(18).string(e.validatorSrcAddress),e.validatorDstAddress!==``&&t.uint32(26).string(e.validatorDstAddress),e.amount!==void 0&&s.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorSrcAddress=n.string();break;case 3:a.validatorDstAddress=n.string();break;case 4:a.amount=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorSrcAddress:x(e.validatorSrcAddress)?String(e.validatorSrcAddress):``,validatorDstAddress:x(e.validatorDstAddress)?String(e.validatorDstAddress):``,amount:x(e.amount)?s.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorSrcAddress!==void 0&&(t.validatorSrcAddress=e.validatorSrcAddress),e.validatorDstAddress!==void 0&&(t.validatorDstAddress=e.validatorDstAddress),e.amount!==void 0&&(t.amount=e.amount?s.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=m();return t.delegatorAddress=e.delegatorAddress??``,t.validatorSrcAddress=e.validatorSrcAddress??``,t.validatorDstAddress=e.validatorDstAddress??``,t.amount=e.amount!==void 0&&e.amount!==null?s.Coin.fromPartial(e.amount):void 0,t}};function h(){return{completionTime:void 0}}e.MsgBeginRedelegateResponse={encode(e,t=r.default.Writer.create()){return e.completionTime!==void 0&&i.Timestamp.encode(v(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=h();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.completionTime=y(i.Timestamp.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{completionTime:x(e.completionTime)?b(e.completionTime):void 0}},toJSON(e){let t={};return e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){let t=h();return t.completionTime=e.completionTime??void 0,t}};function g(){return{delegatorAddress:``,validatorAddress:``,amount:void 0}}e.MsgUndelegate={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.amount!==void 0&&s.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=g();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;case 3:a.amount=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,amount:x(e.amount)?s.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.amount!==void 0&&(t.amount=e.amount?s.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=g();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.amount=e.amount!==void 0&&e.amount!==null?s.Coin.fromPartial(e.amount):void 0,t}};function _(){return{completionTime:void 0}}e.MsgUndelegateResponse={encode(e,t=r.default.Writer.create()){return e.completionTime!==void 0&&i.Timestamp.encode(v(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=_();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.completionTime=y(i.Timestamp.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{completionTime:x(e.completionTime)?b(e.completionTime):void 0}},toJSON(e){let t={};return e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){let t=_();return t.completionTime=e.completionTime??void 0,t}};function v(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function y(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function b(e){return e instanceof Date?e:typeof e==`string`?new Date(e):y(i.Timestamp.fromJSON(e))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function x(e){return e!=null}})),ac=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Grant=e.GenericAuthorization=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=tc();e.protobufPackage=`cosmos.authz.v1beta1`;function o(){return{msg:``}}e.GenericAuthorization={encode(e,t=r.default.Writer.create()){return e.msg!==``&&t.uint32(10).string(e.msg),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.msg=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{msg:d(e.msg)?String(e.msg):``}},toJSON(e){let t={};return e.msg!==void 0&&(t.msg=e.msg),t},fromPartial(e){let t=o();return t.msg=e.msg??``,t}};function s(){return{authorization:void 0,expiration:void 0}}e.Grant={encode(e,t=r.default.Writer.create()){return e.authorization!==void 0&&a.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),e.expiration!==void 0&&i.Timestamp.encode(c(e.expiration),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,c=s();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:c.authorization=a.Any.decode(n,n.uint32());break;case 2:c.expiration=l(i.Timestamp.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return c},fromJSON(e){return{authorization:d(e.authorization)?a.Any.fromJSON(e.authorization):void 0,expiration:d(e.expiration)?u(e.expiration):void 0}},toJSON(e){let t={};return e.authorization!==void 0&&(t.authorization=e.authorization?a.Any.toJSON(e.authorization):void 0),e.expiration!==void 0&&(t.expiration=e.expiration.toISOString()),t},fromPartial(e){let t=s();return t.authorization=e.authorization!==void 0&&e.authorization!==null?a.Any.fromPartial(e.authorization):void 0,t.expiration=e.expiration??void 0,t}};function c(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function l(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function u(e){return e instanceof Date?e:typeof e==`string`?new Date(e):l(i.Timestamp.fromJSON(e))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function d(e){return e!=null}})),oc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgRevokeResponse=e.MsgRevoke=e.MsgGrantResponse=e.MsgExec=e.MsgExecResponse=e.MsgGrant=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=ac(),a=tc();e.protobufPackage=`cosmos.authz.v1beta1`;function o(){return{granter:``,grantee:``,grant:void 0}}e.MsgGrant={encode(e,t=r.default.Writer.create()){return e.granter!==``&&t.uint32(10).string(e.granter),e.grantee!==``&&t.uint32(18).string(e.grantee),e.grant!==void 0&&i.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.granter=n.string();break;case 2:s.grantee=n.string();break;case 3:s.grant=i.Grant.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{granter:y(e.granter)?String(e.granter):``,grantee:y(e.grantee)?String(e.grantee):``,grant:y(e.grant)?i.Grant.fromJSON(e.grant):void 0}},toJSON(e){let t={};return e.granter!==void 0&&(t.granter=e.granter),e.grantee!==void 0&&(t.grantee=e.grantee),e.grant!==void 0&&(t.grant=e.grant?i.Grant.toJSON(e.grant):void 0),t},fromPartial(e){let t=o();return t.granter=e.granter??``,t.grantee=e.grantee??``,t.grant=e.grant!==void 0&&e.grant!==null?i.Grant.fromPartial(e.grant):void 0,t}};function s(){return{results:[]}}e.MsgExecResponse={encode(e,t=r.default.Writer.create()){for(let n of e.results)t.uint32(10).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.results.push(n.bytes());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{results:Array.isArray(e?.results)?e.results.map(e=>m(e)):[]}},toJSON(e){let t={};return e.results?t.results=e.results.map(e=>v(e===void 0?new Uint8Array:e)):t.results=[],t},fromPartial(e){let t=s();return t.results=e.results?.map(e=>e)||[],t}};function c(){return{grantee:``,msgs:[]}}e.MsgExec={encode(e,t=r.default.Writer.create()){e.grantee!==``&&t.uint32(10).string(e.grantee);for(let n of e.msgs)a.Any.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.grantee=n.string();break;case 2:o.msgs.push(a.Any.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{grantee:y(e.grantee)?String(e.grantee):``,msgs:Array.isArray(e?.msgs)?e.msgs.map(e=>a.Any.fromJSON(e)):[]}},toJSON(e){let t={};return e.grantee!==void 0&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map(e=>e?a.Any.toJSON(e):void 0):t.msgs=[],t},fromPartial(e){let t=c();return t.grantee=e.grantee??``,t.msgs=e.msgs?.map(e=>a.Any.fromPartial(e))||[],t}};function l(){return{}}e.MsgGrantResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}};function u(){return{granter:``,grantee:``,msgTypeUrl:``}}e.MsgRevoke={encode(e,t=r.default.Writer.create()){return e.granter!==``&&t.uint32(10).string(e.granter),e.grantee!==``&&t.uint32(18).string(e.grantee),e.msgTypeUrl!==``&&t.uint32(26).string(e.msgTypeUrl),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.granter=n.string();break;case 2:a.grantee=n.string();break;case 3:a.msgTypeUrl=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{granter:y(e.granter)?String(e.granter):``,grantee:y(e.grantee)?String(e.grantee):``,msgTypeUrl:y(e.msgTypeUrl)?String(e.msgTypeUrl):``}},toJSON(e){let t={};return e.granter!==void 0&&(t.granter=e.granter),e.grantee!==void 0&&(t.grantee=e.grantee),e.msgTypeUrl!==void 0&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial(e){let t=u();return t.granter=e.granter??``,t.grantee=e.grantee??``,t.msgTypeUrl=e.msgTypeUrl??``,t}};function d(){return{}}e.MsgRevokeResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return d()}};var f=(()=>{if(f!==void 0)return f;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),p=f.atob||(e=>f.Buffer.from(e,`base64`).toString(`binary`));function m(e){let t=p(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var _=f.btoa||(e=>f.Buffer.from(e,`binary`).toString(`base64`));function v(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return _(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function y(e){return e!=null}})),sc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.TallyParams=e.VotingParams=e.DepositParams=e.Vote=e.TallyResult=e.Proposal=e.Deposit=e.TextProposal=e.WeightedVoteOption=e.proposalStatusToJSON=e.proposalStatusFromJSON=e.ProposalStatus=e.voteOptionToJSON=e.voteOptionFromJSON=e.VoteOption=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=Ks(),o=tc(),s=nc();e.protobufPackage=`cosmos.gov.v1beta1`;var c;(function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]=`VOTE_OPTION_UNSPECIFIED`,e[e.VOTE_OPTION_YES=1]=`VOTE_OPTION_YES`,e[e.VOTE_OPTION_ABSTAIN=2]=`VOTE_OPTION_ABSTAIN`,e[e.VOTE_OPTION_NO=3]=`VOTE_OPTION_NO`,e[e.VOTE_OPTION_NO_WITH_VETO=4]=`VOTE_OPTION_NO_WITH_VETO`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(c=e.VoteOption||={});function l(e){switch(e){case 0:case`VOTE_OPTION_UNSPECIFIED`:return c.VOTE_OPTION_UNSPECIFIED;case 1:case`VOTE_OPTION_YES`:return c.VOTE_OPTION_YES;case 2:case`VOTE_OPTION_ABSTAIN`:return c.VOTE_OPTION_ABSTAIN;case 3:case`VOTE_OPTION_NO`:return c.VOTE_OPTION_NO;case 4:case`VOTE_OPTION_NO_WITH_VETO`:return c.VOTE_OPTION_NO_WITH_VETO;default:return c.UNRECOGNIZED}}e.voteOptionFromJSON=l;function u(e){switch(e){case c.VOTE_OPTION_UNSPECIFIED:return`VOTE_OPTION_UNSPECIFIED`;case c.VOTE_OPTION_YES:return`VOTE_OPTION_YES`;case c.VOTE_OPTION_ABSTAIN:return`VOTE_OPTION_ABSTAIN`;case c.VOTE_OPTION_NO:return`VOTE_OPTION_NO`;case c.VOTE_OPTION_NO_WITH_VETO:return`VOTE_OPTION_NO_WITH_VETO`;default:return`UNKNOWN`}}e.voteOptionToJSON=u;var d;(function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]=`PROPOSAL_STATUS_UNSPECIFIED`,e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]=`PROPOSAL_STATUS_DEPOSIT_PERIOD`,e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]=`PROPOSAL_STATUS_VOTING_PERIOD`,e[e.PROPOSAL_STATUS_PASSED=3]=`PROPOSAL_STATUS_PASSED`,e[e.PROPOSAL_STATUS_REJECTED=4]=`PROPOSAL_STATUS_REJECTED`,e[e.PROPOSAL_STATUS_FAILED=5]=`PROPOSAL_STATUS_FAILED`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(d=e.ProposalStatus||={});function f(e){switch(e){case 0:case`PROPOSAL_STATUS_UNSPECIFIED`:return d.PROPOSAL_STATUS_UNSPECIFIED;case 1:case`PROPOSAL_STATUS_DEPOSIT_PERIOD`:return d.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case`PROPOSAL_STATUS_VOTING_PERIOD`:return d.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case`PROPOSAL_STATUS_PASSED`:return d.PROPOSAL_STATUS_PASSED;case 4:case`PROPOSAL_STATUS_REJECTED`:return d.PROPOSAL_STATUS_REJECTED;case 5:case`PROPOSAL_STATUS_FAILED`:return d.PROPOSAL_STATUS_FAILED;default:return d.UNRECOGNIZED}}e.proposalStatusFromJSON=f;function p(e){switch(e){case d.PROPOSAL_STATUS_UNSPECIFIED:return`PROPOSAL_STATUS_UNSPECIFIED`;case d.PROPOSAL_STATUS_DEPOSIT_PERIOD:return`PROPOSAL_STATUS_DEPOSIT_PERIOD`;case d.PROPOSAL_STATUS_VOTING_PERIOD:return`PROPOSAL_STATUS_VOTING_PERIOD`;case d.PROPOSAL_STATUS_PASSED:return`PROPOSAL_STATUS_PASSED`;case d.PROPOSAL_STATUS_REJECTED:return`PROPOSAL_STATUS_REJECTED`;case d.PROPOSAL_STATUS_FAILED:return`PROPOSAL_STATUS_FAILED`;default:return`UNKNOWN`}}e.proposalStatusToJSON=p;function m(){return{option:0,weight:``}}e.WeightedVoteOption={encode(e,t=r.default.Writer.create()){return e.option!==0&&t.uint32(8).int32(e.option),e.weight!==``&&t.uint32(18).string(e.weight),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.option=n.int32();break;case 2:a.weight=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{option:P(e.option)?l(e.option):0,weight:P(e.weight)?String(e.weight):``}},toJSON(e){let t={};return e.option!==void 0&&(t.option=u(e.option)),e.weight!==void 0&&(t.weight=e.weight),t},fromPartial(e){let t=m();return t.option=e.option??0,t.weight=e.weight??``,t}};function _(){return{title:``,description:``}}e.TextProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{title:P(e.title)?String(e.title):``,description:P(e.description)?String(e.description):``}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),t},fromPartial(e){let t=_();return t.title=e.title??``,t.description=e.description??``,t}};function v(){return{proposalId:`0`,depositor:``,amount:[]}}e.Deposit={encode(e,t=r.default.Writer.create()){e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.depositor!==``&&t.uint32(18).string(e.depositor);for(let n of e.amount)a.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=v();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.proposalId=N(n.uint64());break;case 2:o.depositor=n.string();break;case 3:o.amount.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{proposalId:P(e.proposalId)?String(e.proposalId):`0`,depositor:P(e.depositor)?String(e.depositor):``,amount:Array.isArray(e?.amount)?e.amount.map(e=>a.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.depositor!==void 0&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){let t=v();return t.proposalId=e.proposalId??`0`,t.depositor=e.depositor??``,t.amount=e.amount?.map(e=>a.Coin.fromPartial(e))||[],t}};function y(){return{proposalId:`0`,content:void 0,status:0,finalTallyResult:void 0,submitTime:void 0,depositEndTime:void 0,totalDeposit:[],votingStartTime:void 0,votingEndTime:void 0}}e.Proposal={encode(t,n=r.default.Writer.create()){t.proposalId!==`0`&&n.uint32(8).uint64(t.proposalId),t.content!==void 0&&o.Any.encode(t.content,n.uint32(18).fork()).ldelim(),t.status!==0&&n.uint32(24).int32(t.status),t.finalTallyResult!==void 0&&e.TallyResult.encode(t.finalTallyResult,n.uint32(34).fork()).ldelim(),t.submitTime!==void 0&&i.Timestamp.encode(A(t.submitTime),n.uint32(42).fork()).ldelim(),t.depositEndTime!==void 0&&i.Timestamp.encode(A(t.depositEndTime),n.uint32(50).fork()).ldelim();for(let e of t.totalDeposit)a.Coin.encode(e,n.uint32(58).fork()).ldelim();return t.votingStartTime!==void 0&&i.Timestamp.encode(A(t.votingStartTime),n.uint32(66).fork()).ldelim(),t.votingEndTime!==void 0&&i.Timestamp.encode(A(t.votingEndTime),n.uint32(74).fork()).ldelim(),n},decode(t,n){let s=t instanceof r.default.Reader?t:new r.default.Reader(t),c=n===void 0?s.len:s.pos+n,l=y();for(;s.pos<c;){let t=s.uint32();switch(t>>>3){case 1:l.proposalId=N(s.uint64());break;case 2:l.content=o.Any.decode(s,s.uint32());break;case 3:l.status=s.int32();break;case 4:l.finalTallyResult=e.TallyResult.decode(s,s.uint32());break;case 5:l.submitTime=j(i.Timestamp.decode(s,s.uint32()));break;case 6:l.depositEndTime=j(i.Timestamp.decode(s,s.uint32()));break;case 7:l.totalDeposit.push(a.Coin.decode(s,s.uint32()));break;case 8:l.votingStartTime=j(i.Timestamp.decode(s,s.uint32()));break;case 9:l.votingEndTime=j(i.Timestamp.decode(s,s.uint32()));break;default:s.skipType(t&7);break}}return l},fromJSON(t){return{proposalId:P(t.proposalId)?String(t.proposalId):`0`,content:P(t.content)?o.Any.fromJSON(t.content):void 0,status:P(t.status)?f(t.status):0,finalTallyResult:P(t.finalTallyResult)?e.TallyResult.fromJSON(t.finalTallyResult):void 0,submitTime:P(t.submitTime)?M(t.submitTime):void 0,depositEndTime:P(t.depositEndTime)?M(t.depositEndTime):void 0,totalDeposit:Array.isArray(t?.totalDeposit)?t.totalDeposit.map(e=>a.Coin.fromJSON(e)):[],votingStartTime:P(t.votingStartTime)?M(t.votingStartTime):void 0,votingEndTime:P(t.votingEndTime)?M(t.votingEndTime):void 0}},toJSON(t){let n={};return t.proposalId!==void 0&&(n.proposalId=t.proposalId),t.content!==void 0&&(n.content=t.content?o.Any.toJSON(t.content):void 0),t.status!==void 0&&(n.status=p(t.status)),t.finalTallyResult!==void 0&&(n.finalTallyResult=t.finalTallyResult?e.TallyResult.toJSON(t.finalTallyResult):void 0),t.submitTime!==void 0&&(n.submitTime=t.submitTime.toISOString()),t.depositEndTime!==void 0&&(n.depositEndTime=t.depositEndTime.toISOString()),t.totalDeposit?n.totalDeposit=t.totalDeposit.map(e=>e?a.Coin.toJSON(e):void 0):n.totalDeposit=[],t.votingStartTime!==void 0&&(n.votingStartTime=t.votingStartTime.toISOString()),t.votingEndTime!==void 0&&(n.votingEndTime=t.votingEndTime.toISOString()),n},fromPartial(t){let n=y();return n.proposalId=t.proposalId??`0`,n.content=t.content!==void 0&&t.content!==null?o.Any.fromPartial(t.content):void 0,n.status=t.status??0,n.finalTallyResult=t.finalTallyResult!==void 0&&t.finalTallyResult!==null?e.TallyResult.fromPartial(t.finalTallyResult):void 0,n.submitTime=t.submitTime??void 0,n.depositEndTime=t.depositEndTime??void 0,n.totalDeposit=t.totalDeposit?.map(e=>a.Coin.fromPartial(e))||[],n.votingStartTime=t.votingStartTime??void 0,n.votingEndTime=t.votingEndTime??void 0,n}};function b(){return{yes:``,abstain:``,no:``,noWithVeto:``}}e.TallyResult={encode(e,t=r.default.Writer.create()){return e.yes!==``&&t.uint32(10).string(e.yes),e.abstain!==``&&t.uint32(18).string(e.abstain),e.no!==``&&t.uint32(26).string(e.no),e.noWithVeto!==``&&t.uint32(34).string(e.noWithVeto),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.yes=n.string();break;case 2:a.abstain=n.string();break;case 3:a.no=n.string();break;case 4:a.noWithVeto=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{yes:P(e.yes)?String(e.yes):``,abstain:P(e.abstain)?String(e.abstain):``,no:P(e.no)?String(e.no):``,noWithVeto:P(e.noWithVeto)?String(e.noWithVeto):``}},toJSON(e){let t={};return e.yes!==void 0&&(t.yes=e.yes),e.abstain!==void 0&&(t.abstain=e.abstain),e.no!==void 0&&(t.no=e.no),e.noWithVeto!==void 0&&(t.noWithVeto=e.noWithVeto),t},fromPartial(e){let t=b();return t.yes=e.yes??``,t.abstain=e.abstain??``,t.no=e.no??``,t.noWithVeto=e.noWithVeto??``,t}};function x(){return{proposalId:`0`,voter:``,option:0,options:[]}}e.Vote={encode(t,n=r.default.Writer.create()){t.proposalId!==`0`&&n.uint32(8).uint64(t.proposalId),t.voter!==``&&n.uint32(18).string(t.voter),t.option!==0&&n.uint32(24).int32(t.option);for(let r of t.options)e.WeightedVoteOption.encode(r,n.uint32(34).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=x();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.proposalId=N(i.uint64());break;case 2:o.voter=i.string();break;case 3:o.option=i.int32();break;case 4:o.options.push(e.WeightedVoteOption.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{proposalId:P(t.proposalId)?String(t.proposalId):`0`,voter:P(t.voter)?String(t.voter):``,option:P(t.option)?l(t.option):0,options:Array.isArray(t?.options)?t.options.map(t=>e.WeightedVoteOption.fromJSON(t)):[]}},toJSON(t){let n={};return t.proposalId!==void 0&&(n.proposalId=t.proposalId),t.voter!==void 0&&(n.voter=t.voter),t.option!==void 0&&(n.option=u(t.option)),t.options?n.options=t.options.map(t=>t?e.WeightedVoteOption.toJSON(t):void 0):n.options=[],n},fromPartial(t){let n=x();return n.proposalId=t.proposalId??`0`,n.voter=t.voter??``,n.option=t.option??0,n.options=t.options?.map(t=>e.WeightedVoteOption.fromPartial(t))||[],n}};function S(){return{minDeposit:[],maxDepositPeriod:void 0}}e.DepositParams={encode(e,t=r.default.Writer.create()){for(let n of e.minDeposit)a.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.maxDepositPeriod!==void 0&&s.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=S();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.minDeposit.push(a.Coin.decode(n,n.uint32()));break;case 2:o.maxDepositPeriod=s.Duration.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{minDeposit:Array.isArray(e?.minDeposit)?e.minDeposit.map(e=>a.Coin.fromJSON(e)):[],maxDepositPeriod:P(e.maxDepositPeriod)?s.Duration.fromJSON(e.maxDepositPeriod):void 0}},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?a.Coin.toJSON(e):void 0):t.minDeposit=[],e.maxDepositPeriod!==void 0&&(t.maxDepositPeriod=e.maxDepositPeriod?s.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){let t=S();return t.minDeposit=e.minDeposit?.map(e=>a.Coin.fromPartial(e))||[],t.maxDepositPeriod=e.maxDepositPeriod!==void 0&&e.maxDepositPeriod!==null?s.Duration.fromPartial(e.maxDepositPeriod):void 0,t}};function C(){return{votingPeriod:void 0}}e.VotingParams={encode(e,t=r.default.Writer.create()){return e.votingPeriod!==void 0&&s.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=C();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.votingPeriod=s.Duration.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{votingPeriod:P(e.votingPeriod)?s.Duration.fromJSON(e.votingPeriod):void 0}},toJSON(e){let t={};return e.votingPeriod!==void 0&&(t.votingPeriod=e.votingPeriod?s.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=C();return t.votingPeriod=e.votingPeriod!==void 0&&e.votingPeriod!==null?s.Duration.fromPartial(e.votingPeriod):void 0,t}};function w(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}e.TallyParams={encode(e,t=r.default.Writer.create()){return e.quorum.length!==0&&t.uint32(10).bytes(e.quorum),e.threshold.length!==0&&t.uint32(18).bytes(e.threshold),e.vetoThreshold.length!==0&&t.uint32(26).bytes(e.vetoThreshold),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=w();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.quorum=n.bytes();break;case 2:a.threshold=n.bytes();break;case 3:a.vetoThreshold=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{quorum:P(e.quorum)?D(e.quorum):new Uint8Array,threshold:P(e.threshold)?D(e.threshold):new Uint8Array,vetoThreshold:P(e.vetoThreshold)?D(e.vetoThreshold):new Uint8Array}},toJSON(e){let t={};return e.quorum!==void 0&&(t.quorum=k(e.quorum===void 0?new Uint8Array:e.quorum)),e.threshold!==void 0&&(t.threshold=k(e.threshold===void 0?new Uint8Array:e.threshold)),e.vetoThreshold!==void 0&&(t.vetoThreshold=k(e.vetoThreshold===void 0?new Uint8Array:e.vetoThreshold)),t},fromPartial(e){let t=w();return t.quorum=e.quorum??new Uint8Array,t.threshold=e.threshold??new Uint8Array,t.vetoThreshold=e.vetoThreshold??new Uint8Array,t}};var T=(()=>{if(T!==void 0)return T;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),E=T.atob||(e=>T.Buffer.from(e,`base64`).toString(`binary`));function D(e){let t=E(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var O=T.btoa||(e=>T.Buffer.from(e,`binary`).toString(`base64`));function k(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return O(t.join(``))}function A(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function j(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function M(e){return e instanceof Date?e:typeof e==`string`?new Date(e):j(i.Timestamp.fromJSON(e))}function N(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function P(e){return e!=null}})),cc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgDepositResponse=e.MsgDeposit=e.MsgVoteWeightedResponse=e.MsgVoteWeighted=e.MsgVoteResponse=e.MsgVote=e.MsgSubmitProposalResponse=e.MsgSubmitProposal=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=sc(),a=tc(),o=Ks();e.protobufPackage=`cosmos.gov.v1beta1`;function s(){return{content:void 0,initialDeposit:[],proposer:``}}e.MsgSubmitProposal={encode(e,t=r.default.Writer.create()){e.content!==void 0&&a.Any.encode(e.content,t.uint32(10).fork()).ldelim();for(let n of e.initialDeposit)o.Coin.encode(n,t.uint32(18).fork()).ldelim();return e.proposer!==``&&t.uint32(26).string(e.proposer),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,c=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:c.content=a.Any.decode(n,n.uint32());break;case 2:c.initialDeposit.push(o.Coin.decode(n,n.uint32()));break;case 3:c.proposer=n.string();break;default:n.skipType(e&7);break}}return c},fromJSON(e){return{content:g(e.content)?a.Any.fromJSON(e.content):void 0,initialDeposit:Array.isArray(e?.initialDeposit)?e.initialDeposit.map(e=>o.Coin.fromJSON(e)):[],proposer:g(e.proposer)?String(e.proposer):``}},toJSON(e){let t={};return e.content!==void 0&&(t.content=e.content?a.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.initialDeposit=[],e.proposer!==void 0&&(t.proposer=e.proposer),t},fromPartial(e){let t=s();return t.content=e.content!==void 0&&e.content!==null?a.Any.fromPartial(e.content):void 0,t.initialDeposit=e.initialDeposit?.map(e=>o.Coin.fromPartial(e))||[],t.proposer=e.proposer??``,t}};function c(){return{proposalId:`0`}}e.MsgSubmitProposalResponse={encode(e,t=r.default.Writer.create()){return e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.proposalId=h(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),t},fromPartial(e){let t=c();return t.proposalId=e.proposalId??`0`,t}};function l(){return{proposalId:`0`,voter:``,option:0}}e.MsgVote={encode(e,t=r.default.Writer.create()){return e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.voter!==``&&t.uint32(18).string(e.voter),e.option!==0&&t.uint32(24).int32(e.option),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.proposalId=h(n.uint64());break;case 2:a.voter=n.string();break;case 3:a.option=n.int32();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`,voter:g(e.voter)?String(e.voter):``,option:g(e.option)?(0,i.voteOptionFromJSON)(e.option):0}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.voter!==void 0&&(t.voter=e.voter),e.option!==void 0&&(t.option=(0,i.voteOptionToJSON)(e.option)),t},fromPartial(e){let t=l();return t.proposalId=e.proposalId??`0`,t.voter=e.voter??``,t.option=e.option??0,t}};function u(){return{}}e.MsgVoteResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return u()}};function d(){return{proposalId:`0`,voter:``,options:[]}}e.MsgVoteWeighted={encode(e,t=r.default.Writer.create()){e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.voter!==``&&t.uint32(18).string(e.voter);for(let n of e.options)i.WeightedVoteOption.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=d();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.proposalId=h(n.uint64());break;case 2:o.voter=n.string();break;case 3:o.options.push(i.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`,voter:g(e.voter)?String(e.voter):``,options:Array.isArray(e?.options)?e.options.map(e=>i.WeightedVoteOption.fromJSON(e)):[]}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.voter!==void 0&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?i.WeightedVoteOption.toJSON(e):void 0):t.options=[],t},fromPartial(e){let t=d();return t.proposalId=e.proposalId??`0`,t.voter=e.voter??``,t.options=e.options?.map(e=>i.WeightedVoteOption.fromPartial(e))||[],t}};function f(){return{}}e.MsgVoteWeightedResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return f()}};function p(){return{proposalId:`0`,depositor:``,amount:[]}}e.MsgDeposit={encode(e,t=r.default.Writer.create()){e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.depositor!==``&&t.uint32(18).string(e.depositor);for(let n of e.amount)o.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.proposalId=h(n.uint64());break;case 2:a.depositor=n.string();break;case 3:a.amount.push(o.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`,depositor:g(e.depositor)?String(e.depositor):``,amount:Array.isArray(e?.amount)?e.amount.map(e=>o.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.depositor!==void 0&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?o.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){let t=p();return t.proposalId=e.proposalId??`0`,t.depositor=e.depositor??``,t.amount=e.amount?.map(e=>o.Coin.fromPartial(e))||[],t}};function m(){return{}}e.MsgDepositResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return m()}};function h(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function g(e){return e!=null}})),lc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgFundCommunityPoolResponse=e.MsgFundCommunityPool=e.MsgWithdrawValidatorCommissionResponse=e.MsgWithdrawValidatorCommission=e.MsgWithdrawDelegatorRewardResponse=e.MsgWithdrawDelegatorReward=e.MsgSetWithdrawAddressResponse=e.MsgSetWithdrawAddress=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.distribution.v1beta1`;function a(){return{delegatorAddress:``,withdrawAddress:``}}e.MsgSetWithdrawAddress={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.withdrawAddress!==``&&t.uint32(18).string(e.withdrawAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.withdrawAddress=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{delegatorAddress:p(e.delegatorAddress)?String(e.delegatorAddress):``,withdrawAddress:p(e.withdrawAddress)?String(e.withdrawAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.withdrawAddress!==void 0&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){let t=a();return t.delegatorAddress=e.delegatorAddress??``,t.withdrawAddress=e.withdrawAddress??``,t}};function o(){return{}}e.MsgSetWithdrawAddressResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return o()}};function s(){return{delegatorAddress:``,validatorAddress:``}}e.MsgWithdrawDelegatorReward={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:p(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:p(e.validatorAddress)?String(e.validatorAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){let t=s();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t}};function c(){return{}}e.MsgWithdrawDelegatorRewardResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return c()}};function l(){return{validatorAddress:``}}e.MsgWithdrawValidatorCommission={encode(e,t=r.default.Writer.create()){return e.validatorAddress!==``&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.validatorAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{validatorAddress:p(e.validatorAddress)?String(e.validatorAddress):``}},toJSON(e){let t={};return e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){let t=l();return t.validatorAddress=e.validatorAddress??``,t}};function u(){return{}}e.MsgWithdrawValidatorCommissionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return u()}};function d(){return{amount:[],depositor:``}}e.MsgFundCommunityPool={encode(e,t=r.default.Writer.create()){for(let n of e.amount)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.depositor!==``&&t.uint32(18).string(e.depositor),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=d();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.amount.push(i.Coin.decode(n,n.uint32()));break;case 2:o.depositor=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{amount:Array.isArray(e?.amount)?e.amount.map(e=>i.Coin.fromJSON(e)):[],depositor:p(e.depositor)?String(e.depositor):``}},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],e.depositor!==void 0&&(t.depositor=e.depositor),t},fromPartial(e){let t=d();return t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],t.depositor=e.depositor??``,t}};function f(){return{}}e.MsgFundCommunityPoolResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return f()}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function p(e){return e!=null}})),uc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Model=e.AbsoluteTxPosition=e.ContractCodeHistoryEntry=e.ContractInfo=e.CodeInfo=e.Params=e.AccessConfig=e.AccessTypeParam=e.contractCodeHistoryOperationTypeToJSON=e.contractCodeHistoryOperationTypeFromJSON=e.ContractCodeHistoryOperationType=e.accessTypeToJSON=e.accessTypeFromJSON=e.AccessType=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=tc();e.protobufPackage=`cosmwasm.wasm.v1`;var a;(function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]=`ACCESS_TYPE_UNSPECIFIED`,e[e.ACCESS_TYPE_NOBODY=1]=`ACCESS_TYPE_NOBODY`,e[e.ACCESS_TYPE_ONLY_ADDRESS=2]=`ACCESS_TYPE_ONLY_ADDRESS`,e[e.ACCESS_TYPE_EVERYBODY=3]=`ACCESS_TYPE_EVERYBODY`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(a=e.AccessType||={});function o(e){switch(e){case 0:case`ACCESS_TYPE_UNSPECIFIED`:return a.ACCESS_TYPE_UNSPECIFIED;case 1:case`ACCESS_TYPE_NOBODY`:return a.ACCESS_TYPE_NOBODY;case 2:case`ACCESS_TYPE_ONLY_ADDRESS`:return a.ACCESS_TYPE_ONLY_ADDRESS;case 3:case`ACCESS_TYPE_EVERYBODY`:return a.ACCESS_TYPE_EVERYBODY;default:return a.UNRECOGNIZED}}e.accessTypeFromJSON=o;function s(e){switch(e){case a.ACCESS_TYPE_UNSPECIFIED:return`ACCESS_TYPE_UNSPECIFIED`;case a.ACCESS_TYPE_NOBODY:return`ACCESS_TYPE_NOBODY`;case a.ACCESS_TYPE_ONLY_ADDRESS:return`ACCESS_TYPE_ONLY_ADDRESS`;case a.ACCESS_TYPE_EVERYBODY:return`ACCESS_TYPE_EVERYBODY`;default:return`UNKNOWN`}}e.accessTypeToJSON=s;var c;(function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED`,e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT`,e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE`,e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(c=e.ContractCodeHistoryOperationType||={});function l(e){switch(e){case 0:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;default:return c.UNRECOGNIZED}}e.contractCodeHistoryOperationTypeFromJSON=l;function u(e){switch(e){case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED`;case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT`;case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE`;case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS`;default:return`UNKNOWN`}}e.contractCodeHistoryOperationTypeToJSON=u;function d(){return{value:0}}e.AccessTypeParam={encode(e,t=r.default.Writer.create()){return e.value!==0&&t.uint32(8).int32(e.value),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.value=n.int32();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{value:D(e.value)?o(e.value):0}},toJSON(e){let t={};return e.value!==void 0&&(t.value=s(e.value)),t},fromPartial(e){let t=d();return t.value=e.value??0,t}};function f(){return{permission:0,address:``}}e.AccessConfig={encode(e,t=r.default.Writer.create()){return e.permission!==0&&t.uint32(8).int32(e.permission),e.address!==``&&t.uint32(18).string(e.address),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.permission=n.int32();break;case 2:a.address=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{permission:D(e.permission)?o(e.permission):0,address:D(e.address)?String(e.address):``}},toJSON(e){let t={};return e.permission!==void 0&&(t.permission=s(e.permission)),e.address!==void 0&&(t.address=e.address),t},fromPartial(e){let t=f();return t.permission=e.permission??0,t.address=e.address??``,t}};function p(){return{codeUploadAccess:void 0,instantiateDefaultPermission:0,maxWasmCodeSize:`0`}}e.Params={encode(t,n=r.default.Writer.create()){return t.codeUploadAccess!==void 0&&e.AccessConfig.encode(t.codeUploadAccess,n.uint32(10).fork()).ldelim(),t.instantiateDefaultPermission!==0&&n.uint32(16).int32(t.instantiateDefaultPermission),t.maxWasmCodeSize!==`0`&&n.uint32(24).uint64(t.maxWasmCodeSize),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=p();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.codeUploadAccess=e.AccessConfig.decode(i,i.uint32());break;case 2:o.instantiateDefaultPermission=i.int32();break;case 3:o.maxWasmCodeSize=E(i.uint64());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{codeUploadAccess:D(t.codeUploadAccess)?e.AccessConfig.fromJSON(t.codeUploadAccess):void 0,instantiateDefaultPermission:D(t.instantiateDefaultPermission)?o(t.instantiateDefaultPermission):0,maxWasmCodeSize:D(t.maxWasmCodeSize)?String(t.maxWasmCodeSize):`0`}},toJSON(t){let n={};return t.codeUploadAccess!==void 0&&(n.codeUploadAccess=t.codeUploadAccess?e.AccessConfig.toJSON(t.codeUploadAccess):void 0),t.instantiateDefaultPermission!==void 0&&(n.instantiateDefaultPermission=s(t.instantiateDefaultPermission)),t.maxWasmCodeSize!==void 0&&(n.maxWasmCodeSize=t.maxWasmCodeSize),n},fromPartial(t){let n=p();return n.codeUploadAccess=t.codeUploadAccess!==void 0&&t.codeUploadAccess!==null?e.AccessConfig.fromPartial(t.codeUploadAccess):void 0,n.instantiateDefaultPermission=t.instantiateDefaultPermission??0,n.maxWasmCodeSize=t.maxWasmCodeSize??`0`,n}};function m(){return{codeHash:new Uint8Array,creator:``,instantiateConfig:void 0}}e.CodeInfo={encode(t,n=r.default.Writer.create()){return t.codeHash.length!==0&&n.uint32(10).bytes(t.codeHash),t.creator!==``&&n.uint32(18).string(t.creator),t.instantiateConfig!==void 0&&e.AccessConfig.encode(t.instantiateConfig,n.uint32(42).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=m();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.codeHash=i.bytes();break;case 2:o.creator=i.string();break;case 5:o.instantiateConfig=e.AccessConfig.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{codeHash:D(t.codeHash)?C(t.codeHash):new Uint8Array,creator:D(t.creator)?String(t.creator):``,instantiateConfig:D(t.instantiateConfig)?e.AccessConfig.fromJSON(t.instantiateConfig):void 0}},toJSON(t){let n={};return t.codeHash!==void 0&&(n.codeHash=T(t.codeHash===void 0?new Uint8Array:t.codeHash)),t.creator!==void 0&&(n.creator=t.creator),t.instantiateConfig!==void 0&&(n.instantiateConfig=t.instantiateConfig?e.AccessConfig.toJSON(t.instantiateConfig):void 0),n},fromPartial(t){let n=m();return n.codeHash=t.codeHash??new Uint8Array,n.creator=t.creator??``,n.instantiateConfig=t.instantiateConfig!==void 0&&t.instantiateConfig!==null?e.AccessConfig.fromPartial(t.instantiateConfig):void 0,n}};function _(){return{codeId:`0`,creator:``,admin:``,label:``,created:void 0,ibcPortId:``,extension:void 0}}e.ContractInfo={encode(t,n=r.default.Writer.create()){return t.codeId!==`0`&&n.uint32(8).uint64(t.codeId),t.creator!==``&&n.uint32(18).string(t.creator),t.admin!==``&&n.uint32(26).string(t.admin),t.label!==``&&n.uint32(34).string(t.label),t.created!==void 0&&e.AbsoluteTxPosition.encode(t.created,n.uint32(42).fork()).ldelim(),t.ibcPortId!==``&&n.uint32(50).string(t.ibcPortId),t.extension!==void 0&&i.Any.encode(t.extension,n.uint32(58).fork()).ldelim(),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=_();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.codeId=E(a.uint64());break;case 2:s.creator=a.string();break;case 3:s.admin=a.string();break;case 4:s.label=a.string();break;case 5:s.created=e.AbsoluteTxPosition.decode(a,a.uint32());break;case 6:s.ibcPortId=a.string();break;case 7:s.extension=i.Any.decode(a,a.uint32());break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{codeId:D(t.codeId)?String(t.codeId):`0`,creator:D(t.creator)?String(t.creator):``,admin:D(t.admin)?String(t.admin):``,label:D(t.label)?String(t.label):``,created:D(t.created)?e.AbsoluteTxPosition.fromJSON(t.created):void 0,ibcPortId:D(t.ibcPortId)?String(t.ibcPortId):``,extension:D(t.extension)?i.Any.fromJSON(t.extension):void 0}},toJSON(t){let n={};return t.codeId!==void 0&&(n.codeId=t.codeId),t.creator!==void 0&&(n.creator=t.creator),t.admin!==void 0&&(n.admin=t.admin),t.label!==void 0&&(n.label=t.label),t.created!==void 0&&(n.created=t.created?e.AbsoluteTxPosition.toJSON(t.created):void 0),t.ibcPortId!==void 0&&(n.ibcPortId=t.ibcPortId),t.extension!==void 0&&(n.extension=t.extension?i.Any.toJSON(t.extension):void 0),n},fromPartial(t){let n=_();return n.codeId=t.codeId??`0`,n.creator=t.creator??``,n.admin=t.admin??``,n.label=t.label??``,n.created=t.created!==void 0&&t.created!==null?e.AbsoluteTxPosition.fromPartial(t.created):void 0,n.ibcPortId=t.ibcPortId??``,n.extension=t.extension!==void 0&&t.extension!==null?i.Any.fromPartial(t.extension):void 0,n}};function v(){return{operation:0,codeId:`0`,updated:void 0,msg:new Uint8Array}}e.ContractCodeHistoryEntry={encode(t,n=r.default.Writer.create()){return t.operation!==0&&n.uint32(8).int32(t.operation),t.codeId!==`0`&&n.uint32(16).uint64(t.codeId),t.updated!==void 0&&e.AbsoluteTxPosition.encode(t.updated,n.uint32(26).fork()).ldelim(),t.msg.length!==0&&n.uint32(34).bytes(t.msg),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=v();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.operation=i.int32();break;case 2:o.codeId=E(i.uint64());break;case 3:o.updated=e.AbsoluteTxPosition.decode(i,i.uint32());break;case 4:o.msg=i.bytes();break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{operation:D(t.operation)?l(t.operation):0,codeId:D(t.codeId)?String(t.codeId):`0`,updated:D(t.updated)?e.AbsoluteTxPosition.fromJSON(t.updated):void 0,msg:D(t.msg)?C(t.msg):new Uint8Array}},toJSON(t){let n={};return t.operation!==void 0&&(n.operation=u(t.operation)),t.codeId!==void 0&&(n.codeId=t.codeId),t.updated!==void 0&&(n.updated=t.updated?e.AbsoluteTxPosition.toJSON(t.updated):void 0),t.msg!==void 0&&(n.msg=T(t.msg===void 0?new Uint8Array:t.msg)),n},fromPartial(t){let n=v();return n.operation=t.operation??0,n.codeId=t.codeId??`0`,n.updated=t.updated!==void 0&&t.updated!==null?e.AbsoluteTxPosition.fromPartial(t.updated):void 0,n.msg=t.msg??new Uint8Array,n}};function y(){return{blockHeight:`0`,txIndex:`0`}}e.AbsoluteTxPosition={encode(e,t=r.default.Writer.create()){return e.blockHeight!==`0`&&t.uint32(8).uint64(e.blockHeight),e.txIndex!==`0`&&t.uint32(16).uint64(e.txIndex),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=y();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.blockHeight=E(n.uint64());break;case 2:a.txIndex=E(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{blockHeight:D(e.blockHeight)?String(e.blockHeight):`0`,txIndex:D(e.txIndex)?String(e.txIndex):`0`}},toJSON(e){let t={};return e.blockHeight!==void 0&&(t.blockHeight=e.blockHeight),e.txIndex!==void 0&&(t.txIndex=e.txIndex),t},fromPartial(e){let t=y();return t.blockHeight=e.blockHeight??`0`,t.txIndex=e.txIndex??`0`,t}};function b(){return{key:new Uint8Array,value:new Uint8Array}}e.Model={encode(e,t=r.default.Writer.create()){return e.key.length!==0&&t.uint32(10).bytes(e.key),e.value.length!==0&&t.uint32(18).bytes(e.value),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.key=n.bytes();break;case 2:a.value=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{key:D(e.key)?C(e.key):new Uint8Array,value:D(e.value)?C(e.value):new Uint8Array}},toJSON(e){let t={};return e.key!==void 0&&(t.key=T(e.key===void 0?new Uint8Array:e.key)),e.value!==void 0&&(t.value=T(e.value===void 0?new Uint8Array:e.value)),t},fromPartial(e){let t=b();return t.key=e.key??new Uint8Array,t.value=e.value??new Uint8Array,t}};var x=(()=>{if(x!==void 0)return x;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),S=x.atob||(e=>x.Buffer.from(e,`base64`).toString(`binary`));function C(e){let t=S(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var w=x.btoa||(e=>x.Buffer.from(e,`binary`).toString(`base64`));function T(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return w(t.join(``))}function E(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function D(e){return e!=null}})),dc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgClearAdminResponse=e.MsgClearAdmin=e.MsgUpdateAdminResponse=e.MsgUpdateAdmin=e.MsgMigrateContractResponse=e.MsgMigrateContract=e.MsgExecuteContractResponse=e.MsgExecuteContract=e.MsgInstantiateContractResponse=e.MsgInstantiateContract=e.MsgStoreCodeResponse=e.MsgStoreCode=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=uc(),a=Ks();e.protobufPackage=`cosmwasm.wasm.v1`;function o(){return{sender:``,wasmByteCode:new Uint8Array,instantiatePermission:void 0}}e.MsgStoreCode={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.wasmByteCode.length!==0&&t.uint32(18).bytes(e.wasmByteCode),e.instantiatePermission!==void 0&&i.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.sender=n.string();break;case 2:s.wasmByteCode=n.bytes();break;case 5:s.instantiatePermission=i.AccessConfig.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,wasmByteCode:E(e.wasmByteCode)?S(e.wasmByteCode):new Uint8Array,instantiatePermission:E(e.instantiatePermission)?i.AccessConfig.fromJSON(e.instantiatePermission):void 0}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.wasmByteCode!==void 0&&(t.wasmByteCode=w(e.wasmByteCode===void 0?new Uint8Array:e.wasmByteCode)),e.instantiatePermission!==void 0&&(t.instantiatePermission=e.instantiatePermission?i.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){let t=o();return t.sender=e.sender??``,t.wasmByteCode=e.wasmByteCode??new Uint8Array,t.instantiatePermission=e.instantiatePermission!==void 0&&e.instantiatePermission!==null?i.AccessConfig.fromPartial(e.instantiatePermission):void 0,t}};function s(){return{codeId:`0`}}e.MsgStoreCodeResponse={encode(e,t=r.default.Writer.create()){return e.codeId!==`0`&&t.uint32(8).uint64(e.codeId),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.codeId=T(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{codeId:E(e.codeId)?String(e.codeId):`0`}},toJSON(e){let t={};return e.codeId!==void 0&&(t.codeId=e.codeId),t},fromPartial(e){let t=s();return t.codeId=e.codeId??`0`,t}};function c(){return{sender:``,admin:``,codeId:`0`,label:``,msg:new Uint8Array,funds:[]}}e.MsgInstantiateContract={encode(e,t=r.default.Writer.create()){e.sender!==``&&t.uint32(10).string(e.sender),e.admin!==``&&t.uint32(18).string(e.admin),e.codeId!==`0`&&t.uint32(24).uint64(e.codeId),e.label!==``&&t.uint32(34).string(e.label),e.msg.length!==0&&t.uint32(42).bytes(e.msg);for(let n of e.funds)a.Coin.encode(n,t.uint32(50).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.sender=n.string();break;case 2:o.admin=n.string();break;case 3:o.codeId=T(n.uint64());break;case 4:o.label=n.string();break;case 5:o.msg=n.bytes();break;case 6:o.funds.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,admin:E(e.admin)?String(e.admin):``,codeId:E(e.codeId)?String(e.codeId):`0`,label:E(e.label)?String(e.label):``,msg:E(e.msg)?S(e.msg):new Uint8Array,funds:Array.isArray(e?.funds)?e.funds.map(e=>a.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.admin!==void 0&&(t.admin=e.admin),e.codeId!==void 0&&(t.codeId=e.codeId),e.label!==void 0&&(t.label=e.label),e.msg!==void 0&&(t.msg=w(e.msg===void 0?new Uint8Array:e.msg)),e.funds?t.funds=e.funds.map(e=>e?a.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){let t=c();return t.sender=e.sender??``,t.admin=e.admin??``,t.codeId=e.codeId??`0`,t.label=e.label??``,t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(e=>a.Coin.fromPartial(e))||[],t}};function l(){return{address:``,data:new Uint8Array}}e.MsgInstantiateContractResponse={encode(e,t=r.default.Writer.create()){return e.address!==``&&t.uint32(10).string(e.address),e.data.length!==0&&t.uint32(18).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.address=n.string();break;case 2:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{address:E(e.address)?String(e.address):``,data:E(e.data)?S(e.data):new Uint8Array}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.data!==void 0&&(t.data=w(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=l();return t.address=e.address??``,t.data=e.data??new Uint8Array,t}};function u(){return{sender:``,contract:``,msg:new Uint8Array,funds:[]}}e.MsgExecuteContract={encode(e,t=r.default.Writer.create()){e.sender!==``&&t.uint32(10).string(e.sender),e.contract!==``&&t.uint32(18).string(e.contract),e.msg.length!==0&&t.uint32(26).bytes(e.msg);for(let n of e.funds)a.Coin.encode(n,t.uint32(42).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.msg=n.bytes();break;case 5:o.funds.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,contract:E(e.contract)?String(e.contract):``,msg:E(e.msg)?S(e.msg):new Uint8Array,funds:Array.isArray(e?.funds)?e.funds.map(e=>a.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.contract!==void 0&&(t.contract=e.contract),e.msg!==void 0&&(t.msg=w(e.msg===void 0?new Uint8Array:e.msg)),e.funds?t.funds=e.funds.map(e=>e?a.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){let t=u();return t.sender=e.sender??``,t.contract=e.contract??``,t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(e=>a.Coin.fromPartial(e))||[],t}};function d(){return{data:new Uint8Array}}e.MsgExecuteContractResponse={encode(e,t=r.default.Writer.create()){return e.data.length!==0&&t.uint32(10).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{data:E(e.data)?S(e.data):new Uint8Array}},toJSON(e){let t={};return e.data!==void 0&&(t.data=w(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=d();return t.data=e.data??new Uint8Array,t}};function f(){return{sender:``,contract:``,codeId:`0`,msg:new Uint8Array}}e.MsgMigrateContract={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.contract!==``&&t.uint32(18).string(e.contract),e.codeId!==`0`&&t.uint32(24).uint64(e.codeId),e.msg.length!==0&&t.uint32(34).bytes(e.msg),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.sender=n.string();break;case 2:a.contract=n.string();break;case 3:a.codeId=T(n.uint64());break;case 4:a.msg=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,contract:E(e.contract)?String(e.contract):``,codeId:E(e.codeId)?String(e.codeId):`0`,msg:E(e.msg)?S(e.msg):new Uint8Array}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.contract!==void 0&&(t.contract=e.contract),e.codeId!==void 0&&(t.codeId=e.codeId),e.msg!==void 0&&(t.msg=w(e.msg===void 0?new Uint8Array:e.msg)),t},fromPartial(e){let t=f();return t.sender=e.sender??``,t.contract=e.contract??``,t.codeId=e.codeId??`0`,t.msg=e.msg??new Uint8Array,t}};function p(){return{data:new Uint8Array}}e.MsgMigrateContractResponse={encode(e,t=r.default.Writer.create()){return e.data.length!==0&&t.uint32(10).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{data:E(e.data)?S(e.data):new Uint8Array}},toJSON(e){let t={};return e.data!==void 0&&(t.data=w(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=p();return t.data=e.data??new Uint8Array,t}};function m(){return{sender:``,newAdmin:``,contract:``}}e.MsgUpdateAdmin={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.newAdmin!==``&&t.uint32(18).string(e.newAdmin),e.contract!==``&&t.uint32(26).string(e.contract),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.sender=n.string();break;case 2:a.newAdmin=n.string();break;case 3:a.contract=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,newAdmin:E(e.newAdmin)?String(e.newAdmin):``,contract:E(e.contract)?String(e.contract):``}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.newAdmin!==void 0&&(t.newAdmin=e.newAdmin),e.contract!==void 0&&(t.contract=e.contract),t},fromPartial(e){let t=m();return t.sender=e.sender??``,t.newAdmin=e.newAdmin??``,t.contract=e.contract??``,t}};function _(){return{}}e.MsgUpdateAdminResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return _()}};function v(){return{sender:``,contract:``}}e.MsgClearAdmin={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.contract!==``&&t.uint32(26).string(e.contract),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=v();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.sender=n.string();break;case 3:a.contract=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,contract:E(e.contract)?String(e.contract):``}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.contract!==void 0&&(t.contract=e.contract),t},fromPartial(e){let t=v();return t.sender=e.sender??``,t.contract=e.contract??``,t}};function y(){return{}}e.MsgClearAdminResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=y();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return y()}};var b=(()=>{if(b!==void 0)return b;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),x=b.atob||(e=>b.Buffer.from(e,`base64`).toString(`binary`));function S(e){let t=x(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var C=b.btoa||(e=>b.Buffer.from(e,`binary`).toString(`base64`));function w(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return C(t.join(``))}function T(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function E(e){return e!=null}})),fc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.ModuleVersion=e.CancelSoftwareUpgradeProposal=e.SoftwareUpgradeProposal=e.Plan=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=tc();e.protobufPackage=`cosmos.upgrade.v1beta1`;function o(){return{name:``,time:void 0,height:`0`,info:``,upgradedClientState:void 0}}e.Plan={encode(e,t=r.default.Writer.create()){return e.name!==``&&t.uint32(10).string(e.name),e.time!==void 0&&i.Timestamp.encode(u(e.time),t.uint32(18).fork()).ldelim(),e.height!==`0`&&t.uint32(24).int64(e.height),e.info!==``&&t.uint32(34).string(e.info),e.upgradedClientState!==void 0&&a.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),s=t===void 0?n.len:n.pos+t,c=o();for(;n.pos<s;){let e=n.uint32();switch(e>>>3){case 1:c.name=n.string();break;case 2:c.time=d(i.Timestamp.decode(n,n.uint32()));break;case 3:c.height=p(n.int64());break;case 4:c.info=n.string();break;case 5:c.upgradedClientState=a.Any.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return c},fromJSON(e){return{name:m(e.name)?String(e.name):``,time:m(e.time)?f(e.time):void 0,height:m(e.height)?String(e.height):`0`,info:m(e.info)?String(e.info):``,upgradedClientState:m(e.upgradedClientState)?a.Any.fromJSON(e.upgradedClientState):void 0}},toJSON(e){let t={};return e.name!==void 0&&(t.name=e.name),e.time!==void 0&&(t.time=e.time.toISOString()),e.height!==void 0&&(t.height=e.height),e.info!==void 0&&(t.info=e.info),e.upgradedClientState!==void 0&&(t.upgradedClientState=e.upgradedClientState?a.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){let t=o();return t.name=e.name??``,t.time=e.time??void 0,t.height=e.height??`0`,t.info=e.info??``,t.upgradedClientState=e.upgradedClientState!==void 0&&e.upgradedClientState!==null?a.Any.fromPartial(e.upgradedClientState):void 0,t}};function s(){return{title:``,description:``,plan:void 0}}e.SoftwareUpgradeProposal={encode(t,n=r.default.Writer.create()){return t.title!==``&&n.uint32(10).string(t.title),t.description!==``&&n.uint32(18).string(t.description),t.plan!==void 0&&e.Plan.encode(t.plan,n.uint32(26).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=s();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.title=i.string();break;case 2:o.description=i.string();break;case 3:o.plan=e.Plan.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{title:m(t.title)?String(t.title):``,description:m(t.description)?String(t.description):``,plan:m(t.plan)?e.Plan.fromJSON(t.plan):void 0}},toJSON(t){let n={};return t.title!==void 0&&(n.title=t.title),t.description!==void 0&&(n.description=t.description),t.plan!==void 0&&(n.plan=t.plan?e.Plan.toJSON(t.plan):void 0),n},fromPartial(t){let n=s();return n.title=t.title??``,n.description=t.description??``,n.plan=t.plan!==void 0&&t.plan!==null?e.Plan.fromPartial(t.plan):void 0,n}};function c(){return{title:``,description:``}}e.CancelSoftwareUpgradeProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{title:m(e.title)?String(e.title):``,description:m(e.description)?String(e.description):``}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),t},fromPartial(e){let t=c();return t.title=e.title??``,t.description=e.description??``,t}};function l(){return{name:``,version:`0`}}e.ModuleVersion={encode(e,t=r.default.Writer.create()){return e.name!==``&&t.uint32(10).string(e.name),e.version!==`0`&&t.uint32(16).uint64(e.version),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.name=n.string();break;case 2:a.version=p(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{name:m(e.name)?String(e.name):``,version:m(e.version)?String(e.version):`0`}},toJSON(e){let t={};return e.name!==void 0&&(t.name=e.name),e.version!==void 0&&(t.version=e.version),t},fromPartial(e){let t=l();return t.name=e.name??``,t.version=e.version??`0`,t}};function u(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function d(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function f(e){return e instanceof Date?e:typeof e==`string`?new Date(e):d(i.Timestamp.fromJSON(e))}function p(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function m(e){return e!=null}})),pc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Params=e.Height=e.UpgradeProposal=e.ClientUpdateProposal=e.ClientConsensusStates=e.ConsensusStateWithHeight=e.IdentifiedClientState=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=tc(),a=fc();e.protobufPackage=`ibc.core.client.v1`;function o(){return{clientId:``,clientState:void 0}}e.IdentifiedClientState={encode(e,t=r.default.Writer.create()){return e.clientId!==``&&t.uint32(10).string(e.clientId),e.clientState!==void 0&&i.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.clientId=n.string();break;case 2:s.clientState=i.Any.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{clientId:m(e.clientId)?String(e.clientId):``,clientState:m(e.clientState)?i.Any.fromJSON(e.clientState):void 0}},toJSON(e){let t={};return e.clientId!==void 0&&(t.clientId=e.clientId),e.clientState!==void 0&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),t},fromPartial(e){let t=o();return t.clientId=e.clientId??``,t.clientState=e.clientState!==void 0&&e.clientState!==null?i.Any.fromPartial(e.clientState):void 0,t}};function s(){return{height:void 0,consensusState:void 0}}e.ConsensusStateWithHeight={encode(t,n=r.default.Writer.create()){return t.height!==void 0&&e.Height.encode(t.height,n.uint32(10).fork()).ldelim(),t.consensusState!==void 0&&i.Any.encode(t.consensusState,n.uint32(18).fork()).ldelim(),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,c=s();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:c.height=e.Height.decode(a,a.uint32());break;case 2:c.consensusState=i.Any.decode(a,a.uint32());break;default:a.skipType(t&7);break}}return c},fromJSON(t){return{height:m(t.height)?e.Height.fromJSON(t.height):void 0,consensusState:m(t.consensusState)?i.Any.fromJSON(t.consensusState):void 0}},toJSON(t){let n={};return t.height!==void 0&&(n.height=t.height?e.Height.toJSON(t.height):void 0),t.consensusState!==void 0&&(n.consensusState=t.consensusState?i.Any.toJSON(t.consensusState):void 0),n},fromPartial(t){let n=s();return n.height=t.height!==void 0&&t.height!==null?e.Height.fromPartial(t.height):void 0,n.consensusState=t.consensusState!==void 0&&t.consensusState!==null?i.Any.fromPartial(t.consensusState):void 0,n}};function c(){return{clientId:``,consensusStates:[]}}e.ClientConsensusStates={encode(t,n=r.default.Writer.create()){t.clientId!==``&&n.uint32(10).string(t.clientId);for(let r of t.consensusStates)e.ConsensusStateWithHeight.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.clientId=i.string();break;case 2:o.consensusStates.push(e.ConsensusStateWithHeight.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{clientId:m(t.clientId)?String(t.clientId):``,consensusStates:Array.isArray(t?.consensusStates)?t.consensusStates.map(t=>e.ConsensusStateWithHeight.fromJSON(t)):[]}},toJSON(t){let n={};return t.clientId!==void 0&&(n.clientId=t.clientId),t.consensusStates?n.consensusStates=t.consensusStates.map(t=>t?e.ConsensusStateWithHeight.toJSON(t):void 0):n.consensusStates=[],n},fromPartial(t){let n=c();return n.clientId=t.clientId??``,n.consensusStates=t.consensusStates?.map(t=>e.ConsensusStateWithHeight.fromPartial(t))||[],n}};function l(){return{title:``,description:``,subjectClientId:``,substituteClientId:``}}e.ClientUpdateProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),e.subjectClientId!==``&&t.uint32(26).string(e.subjectClientId),e.substituteClientId!==``&&t.uint32(34).string(e.substituteClientId),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;case 3:a.subjectClientId=n.string();break;case 4:a.substituteClientId=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{title:m(e.title)?String(e.title):``,description:m(e.description)?String(e.description):``,subjectClientId:m(e.subjectClientId)?String(e.subjectClientId):``,substituteClientId:m(e.substituteClientId)?String(e.substituteClientId):``}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),e.subjectClientId!==void 0&&(t.subjectClientId=e.subjectClientId),e.substituteClientId!==void 0&&(t.substituteClientId=e.substituteClientId),t},fromPartial(e){let t=l();return t.title=e.title??``,t.description=e.description??``,t.subjectClientId=e.subjectClientId??``,t.substituteClientId=e.substituteClientId??``,t}};function u(){return{title:``,description:``,plan:void 0,upgradedClientState:void 0}}e.UpgradeProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),e.plan!==void 0&&a.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),e.upgradedClientState!==void 0&&i.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=u();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.title=n.string();break;case 2:s.description=n.string();break;case 3:s.plan=a.Plan.decode(n,n.uint32());break;case 4:s.upgradedClientState=i.Any.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{title:m(e.title)?String(e.title):``,description:m(e.description)?String(e.description):``,plan:m(e.plan)?a.Plan.fromJSON(e.plan):void 0,upgradedClientState:m(e.upgradedClientState)?i.Any.fromJSON(e.upgradedClientState):void 0}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),e.plan!==void 0&&(t.plan=e.plan?a.Plan.toJSON(e.plan):void 0),e.upgradedClientState!==void 0&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){let t=u();return t.title=e.title??``,t.description=e.description??``,t.plan=e.plan!==void 0&&e.plan!==null?a.Plan.fromPartial(e.plan):void 0,t.upgradedClientState=e.upgradedClientState!==void 0&&e.upgradedClientState!==null?i.Any.fromPartial(e.upgradedClientState):void 0,t}};function d(){return{revisionNumber:`0`,revisionHeight:`0`}}e.Height={encode(e,t=r.default.Writer.create()){return e.revisionNumber!==`0`&&t.uint32(8).uint64(e.revisionNumber),e.revisionHeight!==`0`&&t.uint32(16).uint64(e.revisionHeight),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.revisionNumber=p(n.uint64());break;case 2:a.revisionHeight=p(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{revisionNumber:m(e.revisionNumber)?String(e.revisionNumber):`0`,revisionHeight:m(e.revisionHeight)?String(e.revisionHeight):`0`}},toJSON(e){let t={};return e.revisionNumber!==void 0&&(t.revisionNumber=e.revisionNumber),e.revisionHeight!==void 0&&(t.revisionHeight=e.revisionHeight),t},fromPartial(e){let t=d();return t.revisionNumber=e.revisionNumber??`0`,t.revisionHeight=e.revisionHeight??`0`,t}};function f(){return{allowedClients:[]}}e.Params={encode(e,t=r.default.Writer.create()){for(let n of e.allowedClients)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.allowedClients.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{allowedClients:Array.isArray(e?.allowedClients)?e.allowedClients.map(e=>String(e)):[]}},toJSON(e){let t={};return e.allowedClients?t.allowedClients=e.allowedClients.map(e=>e):t.allowedClients=[],t},fromPartial(e){let t=f();return t.allowedClients=e.allowedClients?.map(e=>e)||[],t}};function p(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function m(e){return e!=null}})),mc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgTransferResponse=e.MsgTransfer=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks(),a=pc();e.protobufPackage=`ibc.applications.transfer.v1`;function o(){return{sourcePort:``,sourceChannel:``,token:void 0,sender:``,receiver:``,timeoutHeight:void 0,timeoutTimestamp:`0`,memo:``}}e.MsgTransfer={encode(e,t=r.default.Writer.create()){return e.sourcePort!==``&&t.uint32(10).string(e.sourcePort),e.sourceChannel!==``&&t.uint32(18).string(e.sourceChannel),e.token!==void 0&&i.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),e.sender!==``&&t.uint32(34).string(e.sender),e.receiver!==``&&t.uint32(42).string(e.receiver),e.timeoutHeight!==void 0&&a.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp!==`0`&&t.uint32(56).uint64(e.timeoutTimestamp),e.memo!==``&&t.uint32(66).string(e.memo),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),s=t===void 0?n.len:n.pos+t,l=o();for(;n.pos<s;){let e=n.uint32();switch(e>>>3){case 1:l.sourcePort=n.string();break;case 2:l.sourceChannel=n.string();break;case 3:l.token=i.Coin.decode(n,n.uint32());break;case 4:l.sender=n.string();break;case 5:l.receiver=n.string();break;case 6:l.timeoutHeight=a.Height.decode(n,n.uint32());break;case 7:l.timeoutTimestamp=c(n.uint64());break;case 8:l.memo=n.string();break;default:n.skipType(e&7);break}}return l},fromJSON(e){return{sourcePort:l(e.sourcePort)?String(e.sourcePort):``,sourceChannel:l(e.sourceChannel)?String(e.sourceChannel):``,token:l(e.token)?i.Coin.fromJSON(e.token):void 0,sender:l(e.sender)?String(e.sender):``,receiver:l(e.receiver)?String(e.receiver):``,timeoutHeight:l(e.timeoutHeight)?a.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:l(e.timeoutTimestamp)?String(e.timeoutTimestamp):`0`,memo:l(e.memo)?String(e.memo):``}},toJSON(e){let t={};return e.sourcePort!==void 0&&(t.sourcePort=e.sourcePort),e.sourceChannel!==void 0&&(t.sourceChannel=e.sourceChannel),e.token!==void 0&&(t.token=e.token?i.Coin.toJSON(e.token):void 0),e.sender!==void 0&&(t.sender=e.sender),e.receiver!==void 0&&(t.receiver=e.receiver),e.timeoutHeight!==void 0&&(t.timeoutHeight=e.timeoutHeight?a.Height.toJSON(e.timeoutHeight):void 0),e.timeoutTimestamp!==void 0&&(t.timeoutTimestamp=e.timeoutTimestamp),e.memo!==void 0&&(t.memo=e.memo),t},fromPartial(e){let t=o();return t.sourcePort=e.sourcePort??``,t.sourceChannel=e.sourceChannel??``,t.token=e.token!==void 0&&e.token!==null?i.Coin.fromPartial(e.token):void 0,t.sender=e.sender??``,t.receiver=e.receiver??``,t.timeoutHeight=e.timeoutHeight!==void 0&&e.timeoutHeight!==null?a.Height.fromPartial(e.timeoutHeight):void 0,t.timeoutTimestamp=e.timeoutTimestamp??`0`,t.memo=e.memo??``,t}};function s(){return{}}e.MsgTransferResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return s()}};function c(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function l(e){return e!=null}})),hc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UnknownMessage=void 0;var t=(x(),n(S));e.UnknownMessage=class{constructor(e,t){this._typeUrl=e,this._value=t}get typeUrl(){return this._typeUrl}get value(){return this._value}toJSON(){return{typeUrl:this._typeUrl,value:t.Buffer.from(this._value).toString(`base64`)}}}})),gc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.StakeAuthorization_Validators=e.StakeAuthorization=e.authorizationTypeToJSON=e.authorizationTypeFromJSON=e.AuthorizationType=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.staking.v1beta1`;var a;(function(e){e[e.AUTHORIZATION_TYPE_UNSPECIFIED=0]=`AUTHORIZATION_TYPE_UNSPECIFIED`,e[e.AUTHORIZATION_TYPE_DELEGATE=1]=`AUTHORIZATION_TYPE_DELEGATE`,e[e.AUTHORIZATION_TYPE_UNDELEGATE=2]=`AUTHORIZATION_TYPE_UNDELEGATE`,e[e.AUTHORIZATION_TYPE_REDELEGATE=3]=`AUTHORIZATION_TYPE_REDELEGATE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(a=e.AuthorizationType||={});function o(e){switch(e){case 0:case`AUTHORIZATION_TYPE_UNSPECIFIED`:return a.AUTHORIZATION_TYPE_UNSPECIFIED;case 1:case`AUTHORIZATION_TYPE_DELEGATE`:return a.AUTHORIZATION_TYPE_DELEGATE;case 2:case`AUTHORIZATION_TYPE_UNDELEGATE`:return a.AUTHORIZATION_TYPE_UNDELEGATE;case 3:case`AUTHORIZATION_TYPE_REDELEGATE`:return a.AUTHORIZATION_TYPE_REDELEGATE;default:return a.UNRECOGNIZED}}e.authorizationTypeFromJSON=o;function s(e){switch(e){case a.AUTHORIZATION_TYPE_UNSPECIFIED:return`AUTHORIZATION_TYPE_UNSPECIFIED`;case a.AUTHORIZATION_TYPE_DELEGATE:return`AUTHORIZATION_TYPE_DELEGATE`;case a.AUTHORIZATION_TYPE_UNDELEGATE:return`AUTHORIZATION_TYPE_UNDELEGATE`;case a.AUTHORIZATION_TYPE_REDELEGATE:return`AUTHORIZATION_TYPE_REDELEGATE`;default:return`UNKNOWN`}}e.authorizationTypeToJSON=s;function c(){return{maxTokens:void 0,allowList:void 0,denyList:void 0,authorizationType:0}}e.StakeAuthorization={encode(t,n=r.default.Writer.create()){return t.maxTokens!==void 0&&i.Coin.encode(t.maxTokens,n.uint32(10).fork()).ldelim(),t.allowList!==void 0&&e.StakeAuthorization_Validators.encode(t.allowList,n.uint32(18).fork()).ldelim(),t.denyList!==void 0&&e.StakeAuthorization_Validators.encode(t.denyList,n.uint32(26).fork()).ldelim(),t.authorizationType!==0&&n.uint32(32).int32(t.authorizationType),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=c();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.maxTokens=i.Coin.decode(a,a.uint32());break;case 2:s.allowList=e.StakeAuthorization_Validators.decode(a,a.uint32());break;case 3:s.denyList=e.StakeAuthorization_Validators.decode(a,a.uint32());break;case 4:s.authorizationType=a.int32();break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{maxTokens:u(t.maxTokens)?i.Coin.fromJSON(t.maxTokens):void 0,allowList:u(t.allowList)?e.StakeAuthorization_Validators.fromJSON(t.allowList):void 0,denyList:u(t.denyList)?e.StakeAuthorization_Validators.fromJSON(t.denyList):void 0,authorizationType:u(t.authorizationType)?o(t.authorizationType):0}},toJSON(t){let n={};return t.maxTokens!==void 0&&(n.maxTokens=t.maxTokens?i.Coin.toJSON(t.maxTokens):void 0),t.allowList!==void 0&&(n.allowList=t.allowList?e.StakeAuthorization_Validators.toJSON(t.allowList):void 0),t.denyList!==void 0&&(n.denyList=t.denyList?e.StakeAuthorization_Validators.toJSON(t.denyList):void 0),t.authorizationType!==void 0&&(n.authorizationType=s(t.authorizationType)),n},fromPartial(t){let n=c();return n.maxTokens=t.maxTokens!==void 0&&t.maxTokens!==null?i.Coin.fromPartial(t.maxTokens):void 0,n.allowList=t.allowList!==void 0&&t.allowList!==null?e.StakeAuthorization_Validators.fromPartial(t.allowList):void 0,n.denyList=t.denyList!==void 0&&t.denyList!==null?e.StakeAuthorization_Validators.fromPartial(t.denyList):void 0,n.authorizationType=t.authorizationType??0,n}};function l(){return{address:[]}}e.StakeAuthorization_Validators={encode(e,t=r.default.Writer.create()){for(let n of e.address)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.address.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{address:Array.isArray(e?.address)?e.address.map(e=>String(e)):[]}},toJSON(e){let t={};return e.address?t.address=e.address.map(e=>e):t.address=[],t},fromPartial(e){let t=l();return t.address=e.address?.map(e=>e)||[],t}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),_c=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.SendAuthorization=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.bank.v1beta1`;function a(){return{spendLimit:[]}}e.SendAuthorization={encode(e,t=r.default.Writer.create()){for(let n of e.spendLimit)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=a();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.spendLimit.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{spendLimit:Array.isArray(e?.spendLimit)?e.spendLimit.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.spendLimit?t.spendLimit=e.spendLimit.map(e=>e?i.Coin.toJSON(e):void 0):t.spendLimit=[],t},fromPartial(e){let t=a();return t.spendLimit=e.spendLimit?.map(e=>i.Coin.fromPartial(e))||[],t}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure())})),vc=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultProtoCodec=e.ProtoCodec=void 0;var i=Gs(),a=Js(),o=ic(),s=oc(),c=cc(),l=lc(),u=dc(),d=mc(),f=hc(),p=ac(),m=gc(),h=_c(),g=(x(),n(S));r(hc(),e);var _=class{constructor(){this.typeUrlMap=new Map}unpackAnyFactory(e){if(this.typeUrlMap.has(e))return this.typeUrlMap.get(e)}unpackAny(e){let t=this.unpackAnyFactory(e.typeUrl);if(!t)return new f.UnknownMessage(e.typeUrl,e.value);let n=t.decode(e.value);return Object.assign(Object.assign({},e),{unpacked:n})}unpackedAnyToJSONRecursive(e){if(e instanceof f.UnknownMessage)return e.toJSON();let t=this.unpackAnyFactory(e.typeUrl);if(t&&`unpacked`in e&&e.unpacked){let n=e=>{let t=typeof e==`object`&&!(e instanceof f.UnknownMessage)&&`typeUrl`in e&&e.typeUrl&&typeof e.typeUrl==`string`&&`value`in e&&e.value&&typeof e.value==`string`;if(t)try{g.Buffer.from(e.value,`base64`)}catch{return!1}return t},r=e=>{let t=this.unpackAnyFactory(e.typeUrl),n=g.Buffer.from(e.value,`base64`);if(!t)return new f.UnknownMessage(e.typeUrl,n).toJSON();let r=t.decode(n);return{typeUrl:e.typeUrl,value:t.toJSON(r)}},i=e=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){let a=e[t];n(a)?e[t]=r(a):typeof a==`object`&&(e[t]=i(a))}else for(let t in e){let a=e[t];n(a)?e[t]=r(a):typeof a==`object`&&(e[t]=i(a))}return e},a=t.toJSON(e.unpacked);if(a&&typeof a==`object`)return a=i(a),{typeUrl:e.typeUrl,value:a}}return new f.UnknownMessage(e.typeUrl,e.value).toJSON()}registerAny(e,t){this.typeUrlMap.set(e,t)}};e.ProtoCodec=_,e.defaultProtoCodec=new _,e.defaultProtoCodec.registerAny(`/agoric.swingset.MsgWalletSpendAction`,i.MsgWalletSpendAction),e.defaultProtoCodec.registerAny(`/agoric.swingset.MsgProvision`,i.MsgProvision),e.defaultProtoCodec.registerAny(`/cosmos.bank.v1beta1.MsgSend`,a.MsgSend),e.defaultProtoCodec.registerAny(`/cosmos.bank.v1beta1.MsgMultiSend`,a.MsgMultiSend),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.MsgDelegate`,o.MsgDelegate),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.MsgUndelegate`,o.MsgUndelegate),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.MsgBeginRedelegate`,o.MsgBeginRedelegate),e.defaultProtoCodec.registerAny(`/cosmwasm.wasm.v1.MsgExecuteContract`,u.MsgExecuteContract),e.defaultProtoCodec.registerAny(`/cosmwasm.wasm.v1.MsgInstantiateContract`,u.MsgInstantiateContract),e.defaultProtoCodec.registerAny(`/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward`,l.MsgWithdrawDelegatorReward),e.defaultProtoCodec.registerAny(`/cosmos.distribution.v1beta1.MsgSetWithdrawAddress`,l.MsgSetWithdrawAddress),e.defaultProtoCodec.registerAny(`/ibc.applications.transfer.v1.MsgTransfer`,d.MsgTransfer),e.defaultProtoCodec.registerAny(`/cosmos.gov.v1beta1.MsgVote`,c.MsgVote),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.MsgGrant`,s.MsgGrant),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.GenericAuthorization`,p.GenericAuthorization),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.StakeAuthorization`,m.StakeAuthorization),e.defaultProtoCodec.registerAny(`/cosmos.bank.v1beta1.SendAuthorization`,h.SendAuthorization),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.MsgRevoke`,s.MsgRevoke),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.MsgExec`,s.MsgExec)})),yc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.CompactBitArray=e.MultiSignature=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`cosmos.crypto.multisig.v1beta1`;function i(){return{signatures:[]}}e.MultiSignature={encode(e,t=r.default.Writer.create()){for(let n of e.signatures)t.uint32(10).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.signatures.push(n.bytes());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{signatures:Array.isArray(e?.signatures)?e.signatures.map(e=>c(e)):[]}},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>u(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=i();return t.signatures=e.signatures?.map(e=>e)||[],t}};function a(){return{extraBitsStored:0,elems:new Uint8Array}}e.CompactBitArray={encode(e,t=r.default.Writer.create()){return e.extraBitsStored!==0&&t.uint32(8).uint32(e.extraBitsStored),e.elems.length!==0&&t.uint32(18).bytes(e.elems),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.extraBitsStored=n.uint32();break;case 2:o.elems=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{extraBitsStored:d(e.extraBitsStored)?Number(e.extraBitsStored):0,elems:d(e.elems)?c(e.elems):new Uint8Array}},toJSON(e){let t={};return e.extraBitsStored!==void 0&&(t.extraBitsStored=Math.round(e.extraBitsStored)),e.elems!==void 0&&(t.elems=u(e.elems===void 0?new Uint8Array:e.elems)),t},fromPartial(e){let t=a();return t.extraBitsStored=e.extraBitsStored??0,t.elems=e.elems??new Uint8Array,t}};var o=(()=>{if(o!==void 0)return o;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),s=o.atob||(e=>o.Buffer.from(e,`base64`).toString(`binary`));function c(e){let t=s(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var l=o.btoa||(e=>o.Buffer.from(e,`binary`).toString(`base64`));function u(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return l(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function d(e){return e!=null}})),bc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.SignatureDescriptor_Data_Multi=e.SignatureDescriptor_Data_Single=e.SignatureDescriptor_Data=e.SignatureDescriptor=e.SignatureDescriptors=e.signModeToJSON=e.signModeFromJSON=e.SignMode=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=tc(),a=yc();e.protobufPackage=`cosmos.tx.signing.v1beta1`;var o;(function(e){e[e.SIGN_MODE_UNSPECIFIED=0]=`SIGN_MODE_UNSPECIFIED`,e[e.SIGN_MODE_DIRECT=1]=`SIGN_MODE_DIRECT`,e[e.SIGN_MODE_TEXTUAL=2]=`SIGN_MODE_TEXTUAL`,e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]=`SIGN_MODE_LEGACY_AMINO_JSON`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(o=e.SignMode||={});function s(e){switch(e){case 0:case`SIGN_MODE_UNSPECIFIED`:return o.SIGN_MODE_UNSPECIFIED;case 1:case`SIGN_MODE_DIRECT`:return o.SIGN_MODE_DIRECT;case 2:case`SIGN_MODE_TEXTUAL`:return o.SIGN_MODE_TEXTUAL;case 127:case`SIGN_MODE_LEGACY_AMINO_JSON`:return o.SIGN_MODE_LEGACY_AMINO_JSON;default:return o.UNRECOGNIZED}}e.signModeFromJSON=s;function c(e){switch(e){case o.SIGN_MODE_UNSPECIFIED:return`SIGN_MODE_UNSPECIFIED`;case o.SIGN_MODE_DIRECT:return`SIGN_MODE_DIRECT`;case o.SIGN_MODE_TEXTUAL:return`SIGN_MODE_TEXTUAL`;case o.SIGN_MODE_LEGACY_AMINO_JSON:return`SIGN_MODE_LEGACY_AMINO_JSON`;default:return`UNKNOWN`}}e.signModeToJSON=c;function l(){return{signatures:[]}}e.SignatureDescriptors={encode(t,n=r.default.Writer.create()){for(let r of t.signatures)e.SignatureDescriptor.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=l();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signatures.push(e.SignatureDescriptor.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{signatures:Array.isArray(t?.signatures)?t.signatures.map(t=>e.SignatureDescriptor.fromJSON(t)):[]}},toJSON(t){let n={};return t.signatures?n.signatures=t.signatures.map(t=>t?e.SignatureDescriptor.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=l();return n.signatures=t.signatures?.map(t=>e.SignatureDescriptor.fromPartial(t))||[],n}};function u(){return{publicKey:void 0,data:void 0,sequence:`0`}}e.SignatureDescriptor={encode(t,n=r.default.Writer.create()){return t.publicKey!==void 0&&i.Any.encode(t.publicKey,n.uint32(10).fork()).ldelim(),t.data!==void 0&&e.SignatureDescriptor_Data.encode(t.data,n.uint32(18).fork()).ldelim(),t.sequence!==`0`&&n.uint32(24).uint64(t.sequence),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=u();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.publicKey=i.Any.decode(a,a.uint32());break;case 2:s.data=e.SignatureDescriptor_Data.decode(a,a.uint32());break;case 3:s.sequence=x(a.uint64());break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{publicKey:S(t.publicKey)?i.Any.fromJSON(t.publicKey):void 0,data:S(t.data)?e.SignatureDescriptor_Data.fromJSON(t.data):void 0,sequence:S(t.sequence)?String(t.sequence):`0`}},toJSON(t){let n={};return t.publicKey!==void 0&&(n.publicKey=t.publicKey?i.Any.toJSON(t.publicKey):void 0),t.data!==void 0&&(n.data=t.data?e.SignatureDescriptor_Data.toJSON(t.data):void 0),t.sequence!==void 0&&(n.sequence=t.sequence),n},fromPartial(t){let n=u();return n.publicKey=t.publicKey!==void 0&&t.publicKey!==null?i.Any.fromPartial(t.publicKey):void 0,n.data=t.data!==void 0&&t.data!==null?e.SignatureDescriptor_Data.fromPartial(t.data):void 0,n.sequence=t.sequence??`0`,n}};function d(){return{single:void 0,multi:void 0}}e.SignatureDescriptor_Data={encode(t,n=r.default.Writer.create()){return t.single!==void 0&&e.SignatureDescriptor_Data_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.SignatureDescriptor_Data_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=d();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.single=e.SignatureDescriptor_Data_Single.decode(i,i.uint32());break;case 2:o.multi=e.SignatureDescriptor_Data_Multi.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{single:S(t.single)?e.SignatureDescriptor_Data_Single.fromJSON(t.single):void 0,multi:S(t.multi)?e.SignatureDescriptor_Data_Multi.fromJSON(t.multi):void 0}},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.SignatureDescriptor_Data_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.SignatureDescriptor_Data_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=d();return n.single=t.single!==void 0&&t.single!==null?e.SignatureDescriptor_Data_Single.fromPartial(t.single):void 0,n.multi=t.multi!==void 0&&t.multi!==null?e.SignatureDescriptor_Data_Multi.fromPartial(t.multi):void 0,n}};function f(){return{mode:0,signature:new Uint8Array}}e.SignatureDescriptor_Data_Single={encode(e,t=r.default.Writer.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),e.signature.length!==0&&t.uint32(18).bytes(e.signature),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.mode=n.int32();break;case 2:a.signature=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{mode:S(e.mode)?s(e.mode):0,signature:S(e.signature)?v(e.signature):new Uint8Array}},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=c(e.mode)),e.signature!==void 0&&(t.signature=b(e.signature===void 0?new Uint8Array:e.signature)),t},fromPartial(e){let t=f();return t.mode=e.mode??0,t.signature=e.signature??new Uint8Array,t}};function p(){return{bitarray:void 0,signatures:[]}}e.SignatureDescriptor_Data_Multi={encode(t,n=r.default.Writer.create()){t.bitarray!==void 0&&a.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(let r of t.signatures)e.SignatureDescriptor_Data.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=p();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.bitarray=a.CompactBitArray.decode(i,i.uint32());break;case 2:s.signatures.push(e.SignatureDescriptor_Data.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{bitarray:S(t.bitarray)?a.CompactBitArray.fromJSON(t.bitarray):void 0,signatures:Array.isArray(t?.signatures)?t.signatures.map(t=>e.SignatureDescriptor_Data.fromJSON(t)):[]}},toJSON(t){let n={};return t.bitarray!==void 0&&(n.bitarray=t.bitarray?a.CompactBitArray.toJSON(t.bitarray):void 0),t.signatures?n.signatures=t.signatures.map(t=>t?e.SignatureDescriptor_Data.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=p();return n.bitarray=t.bitarray!==void 0&&t.bitarray!==null?a.CompactBitArray.fromPartial(t.bitarray):void 0,n.signatures=t.signatures?.map(t=>e.SignatureDescriptor_Data.fromPartial(t))||[],n}};var m=(()=>{if(m!==void 0)return m;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),_=m.atob||(e=>m.Buffer.from(e,`base64`).toString(`binary`));function v(e){let t=_(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var y=m.btoa||(e=>m.Buffer.from(e,`binary`).toString(`base64`));function b(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return y(t.join(``))}function x(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function S(e){return e!=null}})),xc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Fee=e.ModeInfo_Multi=e.ModeInfo_Single=e.ModeInfo=e.SignerInfo=e.AuthInfo=e.TxBody=e.SignDoc=e.TxRaw=e.Tx=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=bc(),a=tc(),o=yc(),s=Ks();e.protobufPackage=`cosmos.tx.v1beta1`;function c(){return{body:void 0,authInfo:void 0,signatures:[]}}e.Tx={encode(t,n=r.default.Writer.create()){t.body!==void 0&&e.TxBody.encode(t.body,n.uint32(10).fork()).ldelim(),t.authInfo!==void 0&&e.AuthInfo.encode(t.authInfo,n.uint32(18).fork()).ldelim();for(let e of t.signatures)n.uint32(26).bytes(e);return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.body=e.TxBody.decode(i,i.uint32());break;case 2:o.authInfo=e.AuthInfo.decode(i,i.uint32());break;case 3:o.signatures.push(i.bytes());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{body:E(t.body)?e.TxBody.fromJSON(t.body):void 0,authInfo:E(t.authInfo)?e.AuthInfo.fromJSON(t.authInfo):void 0,signatures:Array.isArray(t?.signatures)?t.signatures.map(e=>S(e)):[]}},toJSON(t){let n={};return t.body!==void 0&&(n.body=t.body?e.TxBody.toJSON(t.body):void 0),t.authInfo!==void 0&&(n.authInfo=t.authInfo?e.AuthInfo.toJSON(t.authInfo):void 0),t.signatures?n.signatures=t.signatures.map(e=>w(e===void 0?new Uint8Array:e)):n.signatures=[],n},fromPartial(t){let n=c();return n.body=t.body!==void 0&&t.body!==null?e.TxBody.fromPartial(t.body):void 0,n.authInfo=t.authInfo!==void 0&&t.authInfo!==null?e.AuthInfo.fromPartial(t.authInfo):void 0,n.signatures=t.signatures?.map(e=>e)||[],n}};function l(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}e.TxRaw={encode(e,t=r.default.Writer.create()){e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes);for(let n of e.signatures)t.uint32(26).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.bodyBytes=n.bytes();break;case 2:a.authInfoBytes=n.bytes();break;case 3:a.signatures.push(n.bytes());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{bodyBytes:E(e.bodyBytes)?S(e.bodyBytes):new Uint8Array,authInfoBytes:E(e.authInfoBytes)?S(e.authInfoBytes):new Uint8Array,signatures:Array.isArray(e?.signatures)?e.signatures.map(e=>S(e)):[]}},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=w(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=w(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.signatures?t.signatures=e.signatures.map(e=>w(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=l();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.signatures=e.signatures?.map(e=>e)||[],t}};function u(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:``,accountNumber:`0`}}e.SignDoc={encode(e,t=r.default.Writer.create()){return e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes),e.chainId!==``&&t.uint32(26).string(e.chainId),e.accountNumber!==`0`&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.bodyBytes=n.bytes();break;case 2:a.authInfoBytes=n.bytes();break;case 3:a.chainId=n.string();break;case 4:a.accountNumber=T(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{bodyBytes:E(e.bodyBytes)?S(e.bodyBytes):new Uint8Array,authInfoBytes:E(e.authInfoBytes)?S(e.authInfoBytes):new Uint8Array,chainId:E(e.chainId)?String(e.chainId):``,accountNumber:E(e.accountNumber)?String(e.accountNumber):`0`}},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=w(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=w(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.chainId!==void 0&&(t.chainId=e.chainId),e.accountNumber!==void 0&&(t.accountNumber=e.accountNumber),t},fromPartial(e){let t=u();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.chainId=e.chainId??``,t.accountNumber=e.accountNumber??`0`,t}};function d(){return{messages:[],memo:``,timeoutHeight:`0`,extensionOptions:[],nonCriticalExtensionOptions:[]}}e.TxBody={encode(e,t=r.default.Writer.create()){for(let n of e.messages)a.Any.encode(n,t.uint32(10).fork()).ldelim();e.memo!==``&&t.uint32(18).string(e.memo),e.timeoutHeight!==`0`&&t.uint32(24).uint64(e.timeoutHeight);for(let n of e.extensionOptions)a.Any.encode(n,t.uint32(8186).fork()).ldelim();for(let n of e.nonCriticalExtensionOptions)a.Any.encode(n,t.uint32(16378).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.messages.push(a.Any.decode(n,n.uint32()));break;case 2:o.memo=n.string();break;case 3:o.timeoutHeight=T(n.uint64());break;case 1023:o.extensionOptions.push(a.Any.decode(n,n.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(a.Any.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{messages:Array.isArray(e?.messages)?e.messages.map(e=>a.Any.fromJSON(e)):[],memo:E(e.memo)?String(e.memo):``,timeoutHeight:E(e.timeoutHeight)?String(e.timeoutHeight):`0`,extensionOptions:Array.isArray(e?.extensionOptions)?e.extensionOptions.map(e=>a.Any.fromJSON(e)):[],nonCriticalExtensionOptions:Array.isArray(e?.nonCriticalExtensionOptions)?e.nonCriticalExtensionOptions.map(e=>a.Any.fromJSON(e)):[]}},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?a.Any.toJSON(e):void 0):t.messages=[],e.memo!==void 0&&(t.memo=e.memo),e.timeoutHeight!==void 0&&(t.timeoutHeight=e.timeoutHeight),e.extensionOptions?t.extensionOptions=e.extensionOptions.map(e=>e?a.Any.toJSON(e):void 0):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?a.Any.toJSON(e):void 0):t.nonCriticalExtensionOptions=[],t},fromPartial(e){let t=d();return t.messages=e.messages?.map(e=>a.Any.fromPartial(e))||[],t.memo=e.memo??``,t.timeoutHeight=e.timeoutHeight??`0`,t.extensionOptions=e.extensionOptions?.map(e=>a.Any.fromPartial(e))||[],t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions?.map(e=>a.Any.fromPartial(e))||[],t}};function f(){return{signerInfos:[],fee:void 0}}e.AuthInfo={encode(t,n=r.default.Writer.create()){for(let r of t.signerInfos)e.SignerInfo.encode(r,n.uint32(10).fork()).ldelim();return t.fee!==void 0&&e.Fee.encode(t.fee,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=f();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signerInfos.push(e.SignerInfo.decode(i,i.uint32()));break;case 2:o.fee=e.Fee.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{signerInfos:Array.isArray(t?.signerInfos)?t.signerInfos.map(t=>e.SignerInfo.fromJSON(t)):[],fee:E(t.fee)?e.Fee.fromJSON(t.fee):void 0}},toJSON(t){let n={};return t.signerInfos?n.signerInfos=t.signerInfos.map(t=>t?e.SignerInfo.toJSON(t):void 0):n.signerInfos=[],t.fee!==void 0&&(n.fee=t.fee?e.Fee.toJSON(t.fee):void 0),n},fromPartial(t){let n=f();return n.signerInfos=t.signerInfos?.map(t=>e.SignerInfo.fromPartial(t))||[],n.fee=t.fee!==void 0&&t.fee!==null?e.Fee.fromPartial(t.fee):void 0,n}};function p(){return{publicKey:void 0,modeInfo:void 0,sequence:`0`}}e.SignerInfo={encode(t,n=r.default.Writer.create()){return t.publicKey!==void 0&&a.Any.encode(t.publicKey,n.uint32(10).fork()).ldelim(),t.modeInfo!==void 0&&e.ModeInfo.encode(t.modeInfo,n.uint32(18).fork()).ldelim(),t.sequence!==`0`&&n.uint32(24).uint64(t.sequence),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=p();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.publicKey=a.Any.decode(i,i.uint32());break;case 2:s.modeInfo=e.ModeInfo.decode(i,i.uint32());break;case 3:s.sequence=T(i.uint64());break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{publicKey:E(t.publicKey)?a.Any.fromJSON(t.publicKey):void 0,modeInfo:E(t.modeInfo)?e.ModeInfo.fromJSON(t.modeInfo):void 0,sequence:E(t.sequence)?String(t.sequence):`0`}},toJSON(t){let n={};return t.publicKey!==void 0&&(n.publicKey=t.publicKey?a.Any.toJSON(t.publicKey):void 0),t.modeInfo!==void 0&&(n.modeInfo=t.modeInfo?e.ModeInfo.toJSON(t.modeInfo):void 0),t.sequence!==void 0&&(n.sequence=t.sequence),n},fromPartial(t){let n=p();return n.publicKey=t.publicKey!==void 0&&t.publicKey!==null?a.Any.fromPartial(t.publicKey):void 0,n.modeInfo=t.modeInfo!==void 0&&t.modeInfo!==null?e.ModeInfo.fromPartial(t.modeInfo):void 0,n.sequence=t.sequence??`0`,n}};function m(){return{single:void 0,multi:void 0}}e.ModeInfo={encode(t,n=r.default.Writer.create()){return t.single!==void 0&&e.ModeInfo_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.ModeInfo_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=m();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.single=e.ModeInfo_Single.decode(i,i.uint32());break;case 2:o.multi=e.ModeInfo_Multi.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{single:E(t.single)?e.ModeInfo_Single.fromJSON(t.single):void 0,multi:E(t.multi)?e.ModeInfo_Multi.fromJSON(t.multi):void 0}},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.ModeInfo_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.ModeInfo_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=m();return n.single=t.single!==void 0&&t.single!==null?e.ModeInfo_Single.fromPartial(t.single):void 0,n.multi=t.multi!==void 0&&t.multi!==null?e.ModeInfo_Multi.fromPartial(t.multi):void 0,n}};function _(){return{mode:0}}e.ModeInfo_Single={encode(e,t=r.default.Writer.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.mode=n.int32();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{mode:E(e.mode)?(0,i.signModeFromJSON)(e.mode):0}},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=(0,i.signModeToJSON)(e.mode)),t},fromPartial(e){let t=_();return t.mode=e.mode??0,t}};function v(){return{bitarray:void 0,modeInfos:[]}}e.ModeInfo_Multi={encode(t,n=r.default.Writer.create()){t.bitarray!==void 0&&o.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(let r of t.modeInfos)e.ModeInfo.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,s=v();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:s.bitarray=o.CompactBitArray.decode(i,i.uint32());break;case 2:s.modeInfos.push(e.ModeInfo.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{bitarray:E(t.bitarray)?o.CompactBitArray.fromJSON(t.bitarray):void 0,modeInfos:Array.isArray(t?.modeInfos)?t.modeInfos.map(t=>e.ModeInfo.fromJSON(t)):[]}},toJSON(t){let n={};return t.bitarray!==void 0&&(n.bitarray=t.bitarray?o.CompactBitArray.toJSON(t.bitarray):void 0),t.modeInfos?n.modeInfos=t.modeInfos.map(t=>t?e.ModeInfo.toJSON(t):void 0):n.modeInfos=[],n},fromPartial(t){let n=v();return n.bitarray=t.bitarray!==void 0&&t.bitarray!==null?o.CompactBitArray.fromPartial(t.bitarray):void 0,n.modeInfos=t.modeInfos?.map(t=>e.ModeInfo.fromPartial(t))||[],n}};function y(){return{amount:[],gasLimit:`0`,payer:``,granter:``}}e.Fee={encode(e,t=r.default.Writer.create()){for(let n of e.amount)s.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.gasLimit!==`0`&&t.uint32(16).uint64(e.gasLimit),e.payer!==``&&t.uint32(26).string(e.payer),e.granter!==``&&t.uint32(34).string(e.granter),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=y();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.amount.push(s.Coin.decode(n,n.uint32()));break;case 2:a.gasLimit=T(n.uint64());break;case 3:a.payer=n.string();break;case 4:a.granter=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{amount:Array.isArray(e?.amount)?e.amount.map(e=>s.Coin.fromJSON(e)):[],gasLimit:E(e.gasLimit)?String(e.gasLimit):`0`,payer:E(e.payer)?String(e.payer):``,granter:E(e.granter)?String(e.granter):``}},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?s.Coin.toJSON(e):void 0):t.amount=[],e.gasLimit!==void 0&&(t.gasLimit=e.gasLimit),e.payer!==void 0&&(t.payer=e.payer),e.granter!==void 0&&(t.granter=e.granter),t},fromPartial(e){let t=y();return t.amount=e.amount?.map(e=>s.Coin.fromPartial(e))||[],t.gasLimit=e.gasLimit??`0`,t.payer=e.payer??``,t.granter=e.granter??``,t}};var b=(()=>{if(b!==void 0)return b;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),x=b.atob||(e=>b.Buffer.from(e,`base64`).toString(`binary`));function S(e){let t=x(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var C=b.btoa||(e=>b.Buffer.from(e,`binary`).toString(`base64`));function w(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return C(t.join(``))}function T(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function E(e){return e!=null}})),Sc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProtoSignDocDecoder=void 0;var t=xc(),n=vc();e.ProtoSignDocDecoder=class e{static decode(n){return new e(t.SignDoc.decode(n))}constructor(e,t=n.defaultProtoCodec){this.signDoc=e,this.protoCodec=t}get txBody(){return this._txBody||=t.TxBody.decode(this.signDoc.bodyBytes),this._txBody}get txMsgs(){let e=[];for(let t of this.txBody.messages)e.push(this.protoCodec.unpackAny(t));return e}get authInfo(){return this._authInfo||=t.AuthInfo.decode(this.signDoc.authInfoBytes),this._authInfo}get chainId(){return this.signDoc.chainId}get accountNumber(){return this.signDoc.accountNumber.toString()}toBytes(){return t.SignDoc.encode(this.signDoc).finish()}toJSON(){return{txBody:Object.assign(Object.assign({},t.TxBody.toJSON(this.txBody)),{messages:this.txMsgs.map(e=>this.protoCodec.unpackedAnyToJSONRecursive(e))}),authInfo:t.AuthInfo.toJSON(this.authInfo),chainId:this.chainId,accountNumber:this.accountNumber}}}})),Cc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),wc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.BaseKVStore=void 0,e.BaseKVStore=class{constructor(e,t){this.provider=e,this._prefix=t}get(e){return t(this,void 0,void 0,function*(){let t=this.prefix()+`/`+e;return(yield this.provider.get())[t]})}set(e,t){let n=this.prefix()+`/`+e;return this.provider.set({[n]:t})}prefix(){return this._prefix}}})),Tc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.ExtensionKVStore=void 0;var n=wc();e.ExtensionKVStore=class e extends n.BaseKVStore{constructor(t){if(e.KVStoreProvider||typeof browser>`u`||!browser.storage||!browser.storage.local||(e.KVStoreProvider={get:browser.storage.local.get,set:browser.storage.local.set,multiGet:browser.storage.local.get}),!e.KVStoreProvider)throw Error(`Can't initialize kv store for browser extension`);super(e.KVStoreProvider,t)}multiGet(n){return t(this,void 0,void 0,function*(){n=Array.from(new Set(n));let t=(yield e.KVStoreProvider.multiGet(n.map(e=>this.prefix()+`/`+e)))??{},r=Object.keys(t);for(let e of r){let n=e.slice(this.prefix().length+1);t[n]=t[e],delete t[e]}return t})}}})),Ec=a((e=>{s(),Object.defineProperty(e,`__esModule`,{value:!0}),e.MemoryKVStore=void 0;var t=wc(),n=class{constructor(){this.store={}}get(){return Promise.resolve(this.store)}set(e){return o!==void 0&&(o.env.NODE_ENV===`test`||o.env.NODE_ENV===`development`)&&this.checkNotPrimitiveField(e),this.store=Object.assign(Object.assign({},this.store),e),Promise.resolve()}checkNotPrimitiveField(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n==`object`&&n){if(n.constructor!==Object&&n.constructor!==Array)throw Error(`${t} may not be serializable: ${n.constructor.name}`);this.checkNotPrimitiveField(n)}})}};e.MemoryKVStore=class extends t.BaseKVStore{constructor(e){super(new n,e)}}})),Dc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LocalKVStore=void 0,e.LocalKVStore=class{constructor(e){this._prefix=e}get(e){let t=this.prefix()+`/`+e,n=localStorage.getItem(t);return n===null?Promise.resolve(void 0):Promise.resolve(JSON.parse(n))}set(e,t){let n=this.prefix()+`/`+e;return t===null?Promise.resolve(localStorage.removeItem(n)):Promise.resolve(localStorage.setItem(n,JSON.stringify(t)))}prefix(){return this._prefix}}})),Oc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.IndexedDBKVStore=void 0,e.IndexedDBKVStore=class{constructor(e){this._prefix=e}get(e){return t(this,void 0,void 0,function*(){let t=(yield this.getDB()).transaction([this.prefix()],`readonly`).objectStore(this.prefix());return new Promise((n,r)=>{let i=t.get(e);i.onerror=e=>{e.stopPropagation(),r(e.target)},i.onsuccess=()=>{i.result?n(i.result.data):n(void 0)}})})}set(e,n){return t(this,void 0,void 0,function*(){if(n===null){let t=(yield this.getDB()).transaction([this.prefix()],`readwrite`).objectStore(this.prefix());return new Promise((n,r)=>{let i=t.delete(e);i.onerror=e=>{e.stopPropagation(),r(e.target)},i.onsuccess=()=>{n()}})}else{let t=(yield this.getDB()).transaction([this.prefix()],`readwrite`).objectStore(this.prefix());return new Promise((r,i)=>{let a=t.put({key:e,data:n});a.onerror=e=>{e.stopPropagation(),i(e.target)},a.onsuccess=()=>{r()}})}})}prefix(){return this._prefix}getDB(){return t(this,void 0,void 0,function*(){return this.cachedDB?this.cachedDB:new Promise((e,t)=>{let n=window.indexedDB.open(this.prefix());n.onerror=e=>{e.stopPropagation(),t(e.target)},n.onupgradeneeded=e=>{e.target.result.createObjectStore(this.prefix(),{keyPath:`key`})},n.onsuccess=()=>{this.cachedDB=n.result,e(n.result)}})})}}})),kc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.PrefixKVStore=void 0,e.PrefixKVStore=class{constructor(e,t){this.kvStore=e,this._prefix=t}prefix(){return this._prefix}get(e){return t(this,void 0,void 0,function*(){let t=this.prefix()+`/`+e;return yield this.kvStore.get(t)})}set(e,n){return t(this,void 0,void 0,function*(){let t=this.prefix()+`/`+e;return yield this.kvStore.set(t,n)})}}})),Ac=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.WrapMultiGetKVStore=void 0,e.WrapMultiGetKVStore=class{constructor(e){this.kvStore=e}multiGet(e){return t(this,void 0,void 0,function*(){e=Array.from(new Set(e));let n={},r=[];for(let i of e)r.push(t(this,void 0,void 0,function*(){n[i]=yield this.kvStore.get(i)}));return yield Promise.all(r),n})}}})),jc=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Cc(),e),n(Tc(),e),n(wc(),e),n(Ec(),e),n(Dc(),e),n(Oc(),e),n(kc(),e),n(Ac(),e)})),Mc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=A(),n=N();function r(e){let n=t(`sha256`).update(e).digest();try{return t(`rmd160`).update(n).digest()}catch{return t(`ripemd160`).update(n).digest()}}e.hash160=r;function i(e,t){return n(`sha512`,e).update(t).digest()}e.hmacSHA512=i})),Nc=a(((e,t)=>{x();var n=N(),r=C.alloc(1,1),i=C.alloc(1,0);function a(e,t,a,o,s){let c=C.alloc(32,0),l=C.alloc(32,1);c=n(`sha256`,c).update(l).update(i).update(t).update(e).update(s||``).digest(),l=n(`sha256`,c).update(l).digest(),c=n(`sha256`,c).update(l).update(r).update(t).update(e).update(s||``).digest(),l=n(`sha256`,c).update(l).digest(),l=n(`sha256`,c).update(l).digest();let u=l;for(;!o(u)||!a(u);)c=n(`sha256`,c).update(l).update(i).digest(),l=n(`sha256`,c).update(l).digest(),l=n(`sha256`,c).update(l).digest(),u=l;return u}t.exports=a})),Pc=a(((e,t)=>{x();var n=M(),r=F().ec,i=new r(`secp256k1`),a=Nc(),o=C.alloc(32,0),s=C.from(`fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141`,`hex`),c=C.from(`fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f`,`hex`),l=i.curve.n,u=l.shrn(1),d=i.curve.g,f=`Expected Private`,p=`Expected Point`,m=`Expected Tweak`,h=`Expected Hash`,g=`Expected Signature`,_=`Expected Extra Data (32 bytes)`;function v(e){return e instanceof Uint8Array&&e.length===32}function y(e){return v(e)?s.compare(e)>0:!1}function b(e){if(!(e instanceof Uint8Array)||e.length<33)return!1;let t=e[0],n=e.subarray(1,33);if(o.compare(n)===0||c.compare(n)<=0)return!1;if((t===2||t===3)&&e.length===33){try{A(e)}catch{return!1}return!0}let r=e.subarray(33);return o.compare(r)===0||c.compare(r)<=0?!1:t===4&&e.length===65}function S(e){return e[0]!==4}function w(e){return b(e)?S(e):!1}function T(e){return v(e)?o.compare(e)<0&&s.compare(e)>0:!1}function E(e){let t=e.subarray(0,32),n=e.subarray(32,64);return e instanceof Uint8Array&&e.length===64&&s.compare(t)>0&&s.compare(n)>0}function D(e,t){return e===void 0&&t!==void 0?S(t):e===void 0?!0:e}function O(e){return new n(e)}function k(e){return e.toArrayLike(C,`be`,32)}function A(e){return i.curve.decodePoint(e)}function j(e,t){return C.from(e._encode(t))}function N(e,t,n){if(!b(e)||!b(t))throw TypeError(p);let r=A(e),i=A(t),a=r.add(i);return a.isInfinity()?null:j(a,D(n,e))}function P(e,t,n){if(!b(e))throw TypeError(p);if(!y(t))throw TypeError(m);let r=D(n,e),i=A(e);if(o.compare(t)===0)return j(i,r);let a=O(t),s=d.mul(a),c=i.add(s);return c.isInfinity()?null:j(c,r)}function I(e,t){if(!b(e))throw TypeError(p);let n=A(e);if(n.isInfinity())throw TypeError(p);return j(n,D(t,e))}function L(e,t){if(!T(e))throw TypeError(f);let n=O(e),r=d.mul(n);return r.isInfinity()?null:j(r,D(t))}function R(e,t,n){if(!b(e))throw TypeError(p);if(!y(t))throw TypeError(m);let r=D(n,e),i=A(e),a=O(t),o=i.mul(a);return o.isInfinity()?null:j(o,r)}function ee(e,t){if(!T(e))throw TypeError(f);if(!y(t))throw TypeError(m);let n=O(e),r=O(t),i=k(n.add(r).umod(l));return T(i)?i:null}function te(e,t){if(!T(e))throw TypeError(f);if(!y(t))throw TypeError(m);let n=O(e),r=O(t),i=k(n.sub(r).umod(l));return T(i)?i:null}function ne(e,t){return ie(e,t)}function re(e,t,n){return ie(e,t,n)}function ie(e,t,n){if(!v(e))throw TypeError(h);if(!T(t))throw TypeError(f);if(n!==void 0&&!v(n))throw TypeError(_);let r=O(t),i=O(e),o,s;a(e,t,function(e){let t=O(e),n=d.mul(t);return!(n.isInfinity()||(o=n.x.umod(l),o.isZero()===0)||(s=t.invm(l).mul(i.add(r.mul(o))).umod(l),s.isZero()===0))},T,n),s.cmp(u)>0&&(s=l.sub(s));let c=C.allocUnsafe(64);return k(o).copy(c,0),k(s).copy(c,32),c}function ae(e,t,n,r){if(!v(e))throw TypeError(h);if(!b(t))throw TypeError(p);if(!E(n))throw TypeError(g);let i=A(t),a=O(n.subarray(0,32)),o=O(n.subarray(32,64));if(r&&o.cmp(u)>0||a.gtn(0)<=0||o.gtn(0)<=0)return!1;let s=O(e),c=o.invm(l),f=s.mul(c).umod(l),m=a.mul(c).umod(l),_=d.mulAdd(f,i,m);return _.isInfinity()?!1:_.x.umod(l).eq(a)}t.exports={isPoint:b,isPointCompressed:w,isPrivate:T,pointAdd:N,pointAddScalar:P,pointCompress:I,pointFromScalar:L,pointMultiply:R,privateAdd:ee,privateSub:te,sign:ne,signWithEntropy:re,verify:ae}})),Fc=a(((e,t)=>{var n={Array:function(e){return e!=null&&e.constructor===Array},Boolean:function(e){return typeof e==`boolean`},Function:function(e){return typeof e==`function`},Nil:function(e){return e==null},Number:function(e){return typeof e==`number`},Object:function(e){return typeof e==`object`},String:function(e){return typeof e==`string`},"":function(){return!0}};for(var r in n.Null=n.Nil,n)n[r].toJSON=function(e){return e}.bind(null,r);t.exports=n})),Ic=a(((e,t)=>{var n=Fc();function r(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function i(e){return n.Nil(e)?``:r(e.constructor)}function a(e){return n.Function(e)?``:n.String(e)?JSON.stringify(e):e&&n.Object(e)?``:e}function o(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function s(e){return n.Function(e)?e.toJSON?e.toJSON():r(e):n.Array(e)?`Array`:e&&n.Object(e)?`Object`:e===void 0?``:e}function c(e,t,n){var r=a(t);return`Expected `+s(e)+`, got`+(n===``?``:` `+n)+(r===``?``:` `+r)}function l(e,t,n){n||=i(t),this.message=c(e,t,n),o(this,l),this.__type=e,this.__value=t,this.__valueTypeName=n}l.prototype=Object.create(Error.prototype),l.prototype.constructor=l;function u(e,t,n,r,i){var a=`" of type `;return t===`key`&&(a=`" with key type `),c(`property "`+s(n)+a+s(e),r,i)}function d(e,t,n,r,a){e?(a||=i(r),this.message=u(e,n,t,r,a)):this.message=`Unexpected property "`+t+`"`,o(this,l),this.__label=n,this.__property=t,this.__type=e,this.__value=r,this.__valueTypeName=a}d.prototype=Object.create(Error.prototype),d.prototype.constructor=l;function f(e,t){return new l(e,{},t)}function p(e,t,n){return e instanceof d?(t=t+`.`+e.__property,e=new d(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof l&&(e=new d(e.__type,t,n,e.__value,e.__valueTypeName)),o(e),e}t.exports={TfTypeError:l,TfPropertyTypeError:d,tfCustomError:f,tfSubError:p,tfJSON:s,getValueTypeName:i}})),Lc=a(((e,t)=>{x();var n=Fc(),r=Ic();function i(e){return C.isBuffer(e)}function a(e){return typeof e==`string`&&/^([0-9a-f]{2})+$/i.test(e)}function o(e,t){var n=e.toJSON();function i(i){if(!e(i))return!1;if(i.length===t)return!0;throw r.tfCustomError(n+`(Length: `+t+`)`,n+`(Length: `+i.length+`)`)}return i.toJSON=function(){return n},i}var s=o.bind(null,n.Array),c=o.bind(null,i),l=o.bind(null,a),u=o.bind(null,n.String);function d(e,t,r){r||=n.Number;function i(n,i){return r(n,i)&&n>e&&n<t}return i.toJSON=function(){return`${r.toJSON()} between [${e}, ${t}]`},i}var f=2**53-1;function p(e){return typeof e==`number`&&isFinite(e)}function m(e){return e<<24>>24===e}function h(e){return e<<16>>16===e}function g(e){return(e|0)===e}function _(e){return typeof e==`number`&&e>=-f&&e<=f&&Math.floor(e)===e}function v(e){return(e&255)===e}function y(e){return(e&65535)===e}function b(e){return e>>>0===e}function S(e){return typeof e==`number`&&e>=0&&e<=f&&Math.floor(e)===e}var w={ArrayN:s,Buffer:i,BufferN:c,Finite:p,Hex:a,HexN:l,Int8:m,Int16:h,Int32:g,Int53:_,Range:d,StringN:u,UInt8:v,UInt16:y,UInt32:b,UInt53:S};for(var T in w)w[T].toJSON=function(e){return e}.bind(null,T);t.exports=w})),Rc=a(((e,t)=>{var n=Ic(),r=Fc(),i=n.tfJSON,a=n.TfTypeError,o=n.TfPropertyTypeError,s=n.tfSubError,c=n.getValueTypeName,l={arrayOf:function(e,t){e=u(e),t||={};function n(n,i){return!r.Array(n)||r.Nil(n)||t.minLength!==void 0&&n.length<t.minLength||t.maxLength!==void 0&&n.length>t.maxLength||t.length!==void 0&&n.length!==t.length?!1:n.every(function(t,n){try{return d(e,t,i)}catch(e){throw s(e,n)}})}return n.toJSON=function(){var n=`[`+i(e)+`]`;return t.length===void 0?(t.minLength!==void 0||t.maxLength!==void 0)&&(n+=`{`+(t.minLength===void 0?0:t.minLength)+`,`+(t.maxLength===void 0?1/0:t.maxLength)+`}`):n+=`{`+t.length+`}`,n},n},maybe:function e(t){t=u(t);function n(n,i){return r.Nil(n)||t(n,i,e)}return n.toJSON=function(){return`?`+i(t)},n},map:function(e,t){e=u(e),t&&=u(t);function n(n,i){if(!r.Object(n)||r.Nil(n))return!1;for(var a in n){try{t&&d(t,a,i)}catch(e){throw s(e,a,`key`)}try{var o=n[a];d(e,o,i)}catch(e){throw s(e,a)}}return!0}return t?n.toJSON=function(){return`{`+i(t)+`: `+i(e)+`}`}:n.toJSON=function(){return`{`+i(e)+`}`},n},object:function(e){var t={};for(var n in e)t[n]=u(e[n]);function a(e,n){if(!r.Object(e)||r.Nil(e))return!1;var i;try{for(i in t){var a=t[i],c=e[i];d(a,c,n)}}catch(e){throw s(e,i)}if(n){for(i in e)if(!t[i])throw new o(void 0,i)}return!0}return a.toJSON=function(){return i(t)},a},anyOf:function(){var e=[].slice.call(arguments).map(u);function t(t,n){return e.some(function(e){try{return d(e,t,n)}catch{return!1}})}return t.toJSON=function(){return e.map(i).join(`|`)},t},allOf:function(){var e=[].slice.call(arguments).map(u);function t(t,n){return e.every(function(e){try{return d(e,t,n)}catch{return!1}})}return t.toJSON=function(){return e.map(i).join(` & `)},t},quacksLike:function(e){function t(t){return e===c(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(u);function t(t,n){return r.Nil(t)||r.Nil(t.length)||n&&t.length!==e.length?!1:e.every(function(e,r){try{return d(e,t[r],n)}catch(e){throw s(e,r)}})}return t.toJSON=function(){return`(`+e.map(i).join(`, `)+`)`},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};l.oneOf=l.anyOf;function u(e){if(r.String(e))return e[0]===`?`?l.maybe(e.slice(1)):r[e]||l.quacksLike(e);if(e&&r.Object(e)){if(r.Array(e)){if(e.length!==1)throw TypeError(`Expected compile() parameter of type Array of length 1`);return l.arrayOf(e[0])}return l.object(e)}else if(r.Function(e))return e;return l.value(e)}function d(e,t,n,i){if(r.Function(e)){if(e(t,n))return!0;throw new a(i||e,t)}return d(u(e),t,n)}for(var f in r)d[f]=r[f];for(f in l)d[f]=l[f];var p=Lc();for(f in p)d[f]=p[f];d.compile=u,d.TfTypeError=a,d.TfPropertyTypeError=o,t.exports=d})),zc=a(((e,t)=>{x();var n=Qn();function r(e,t){if(t!==void 0&&e[0]!==t)throw Error(`Invalid network version`);if(e.length===33)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(e.length!==34)throw Error(`Invalid WIF length`);if(e[33]!==1)throw Error(`Invalid compression flag`);return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function i(e,t,n){var r=new C(n?34:33);return r.writeUInt8(e,0),t.copy(r,1),n&&(r[33]=1),r}function a(e,t){return r(n.decode(e),t)}function o(e,t,r){return typeof e==`number`?n.encode(i(e,t,r)):n.encode(i(e.version,e.privateKey,e.compressed))}t.exports={decode:a,decodeRaw:r,encode:o,encodeRaw:i}})),Bc=a((e=>{x(),Object.defineProperty(e,`__esModule`,{value:!0});var t=Mc(),n=Qn(),r=Pc(),i=Rc(),a=zc(),o=i.BufferN(32),s=i.compile({wif:i.UInt8,bip32:{public:i.UInt32,private:i.UInt32}}),c={messagePrefix:`Bitcoin Signed Message:
|
|
1
|
+
import{a as e,n as t,o as n,r,s as i,t as a}from"./chunk-DskFaGUe.js";import{n as o,t as s}from"./dist-AaDowojq.js";import{E as c,K as l,V as u,n as d,t as f,y as p}from"./createConnector-pbKKdb_k.js";import{n as m}from"./MaybeAsync-DQF5lNPa.js";import{n as h,t as g}from"./dist-CnrnoiXF.js";import{t as _}from"./images-qNtx67Rl.js";import{a as v,i as y,t as b}from"./cosmos-connector-meta-Ck8JH12i.js";import{i as x,r as S,t as C}from"./dist-CI5CUy_C.js";import{t as w}from"./networks-2E-BIrmm.js";import{i as T,n as E,t as D}from"./bs58--X0peUG7.js";import{t as O}from"./bn-Cz7Vdngu.js";import{a as k,i as A,n as j,o as M,r as N,s as P,t as F}from"./elliptic-BMfcEqGp.js";import{t as I}from"./events-BV7lfFWg.js";import{c as L,i as R,l as ee,o as te,s as ne,u as re}from"./index.es-DcovaPD9.js";import{_ as ie,a as ae,d as oe,f as se,g as ce,h as le,i as ue,l as de,n as fe,o as pe,p as me,r as he,s as ge,t as _e,u as ve,v as ye}from"./browser-ponyfill-D2BIpyUO.js";import{n as z,t as be}from"./esm-BZ35Po8I.js";import{$ as xe,$t as Se,A as Ce,At as we,B as Te,Bt as Ee,C as De,Ct as Oe,D as ke,Dt as Ae,E as je,Et as Me,F as B,Ft as Ne,G as Pe,Gt as Fe,H as Ie,Ht as Le,I as Re,It as ze,J as Be,Jt as Ve,K as He,Kt as Ue,L as We,Lt as Ge,M as Ke,Mt as qe,N as Je,Nt as Ye,O as Xe,Ot as Ze,P as Qe,Pt as $e,Q as et,Qt as tt,R as nt,Rt as rt,S as it,St as at,T as ot,Tt as st,U as ct,Ut as lt,V as ut,Vt as dt,W as ft,Wt as pt,X as V,Xt as mt,Y as ht,Yt as gt,Z as _t,Zt as vt,_ as yt,_t as bt,a as xt,at as St,b as Ct,bt as wt,c as Tt,ct as Et,d as Dt,en as Ot,et as kt,f as At,ft as jt,g as Mt,gt as Nt,h as Pt,ht as Ft,i as It,it as Lt,j as Rt,jt as zt,k as Bt,kt as Vt,l as Ht,lt as Ut,m as Wt,mt as Gt,n as Kt,nt as qt,o as Jt,ot as Yt,p as Xt,pt as Zt,q as Qt,qt as $t,r as en,rt as tn,s as nn,st as rn,t as an,tn as on,tt as sn,u as cn,ut as ln,v as un,vt as dn,w as fn,wt as pn,x as mn,xt as hn,y as gn,yt as _n,z as vn,zt as yn}from"./dist-Cjt53Q6H.js";import{a as bn,o as xn,t as Sn}from"./build-Y6ipbu86.js";import{a as Cn,c as wn,d as Tn,f as En,i as Dn,l as On,n as kn,o as H,r as An,s as jn,u as Mn}from"./utils-DLhgweWO.js";import{n as Nn,t as Pn}from"./src-px2Rv6iD.js";import{n as Fn}from"./bignumber-D-4SK89W.js";import{t as In}from"./v4-BqHErK6e.js";import{n as Ln,t as Rn}from"./src-0M4fbYRT.js";import{cosmosAssets as zn,registryIdsToSKCosmosNetworks as Bn}from"./chain-registry-TwEyuA0r.js";import{t as Vn}from"./cjs-B0_K3Hmd.js";var Hn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.utf8Write=e.utf8Read=e.utf8Length=void 0;function t(e){let t=0,n=0;for(let r=0;r<e.length;++r)n=e.charCodeAt(r),n<128?t+=1:n<2048?t+=2:(n&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320?(++r,t+=4):t+=3;return t}e.utf8Length=t;function n(e,t,n){if(n-t<1)return``;let r=[],i=[],a=0,o;for(;t<n;)o=e[t++],o<128?r[a++]=o:o>191&&o<224?r[a++]=(o&31)<<6|e[t++]&63:o>239&&o<365?(o=((o&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,r[a++]=55296+(o>>10),r[a++]=56320+(o&1023)):r[a++]=(o&15)<<12|(e[t++]&63)<<6|e[t++]&63,a>8191&&((i||=[]).push(String.fromCharCode(...r)),a=0);return i?(a&&i.push(String.fromCharCode(...r.slice(0,a))),i.join(``)):String.fromCharCode(...r.slice(0,a))}e.utf8Read=n;function r(e,t,n){let r=n,i,a;for(let r=0;r<e.length;++r)i=e.charCodeAt(r),i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&((a=e.charCodeAt(r+1))&64512)==56320?(i=65536+((i&1023)<<10)+(a&1023),++r,t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128);return n-r}e.utf8Write=r})),Un=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.writeByte=e.writeFixed32=e.int64Length=e.writeVarint64=e.writeVarint32=e.readInt32=e.readUInt32=e.zzDecode=e.zzEncode=e.varint32read=e.varint32write=e.uInt64ToString=e.int64ToString=e.int64FromString=e.varint64write=e.varint64read=void 0;function t(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,!(n&128))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}throw Error(`invalid varint`)}e.varint64read=t;function n(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(!(i>>>7)&&t==0),o=(a?i|128:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=!!(r>>>7),a=(i?r|128:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}e.varint64write=n;var r=4294967296;function i(e){let t=e[0]===`-`;t&&(e=e.slice(1));let n=1e6,i=0,a=0;function o(t,o){let s=Number(e.slice(t,o));a*=n,i=i*n+s,i>=r&&(a+=i/r|0,i%=r)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),t?l(i,a):c(i,a)}e.int64FromString=i;function a(e,t){let n=c(e,t),r=n.hi&2147483648;r&&(n=l(n.lo,n.hi));let i=o(n.lo,n.hi);return r?`-`+i:i}e.int64ToString=a;function o(e,t){if({lo:e,hi:t}=s(e,t),t<=2097151)return String(r*t+e);let n=e&16777215,i=(e>>>24|t<<8)&16777215,a=t>>16&65535,o=n+i*6777216+a*6710656,c=i+a*8147497,l=a*2,d=1e7;return o>=d&&(c+=Math.floor(o/d),o%=d),c>=d&&(l+=Math.floor(c/d),c%=d),l.toString()+u(c)+u(o)}e.uInt64ToString=o;function s(e,t){return{lo:e>>>0,hi:t>>>0}}function c(e,t){return{lo:e|0,hi:t|0}}function l(e,t){return t=~t,e?e=~e+1:t+=1,c(e,t)}var u=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function d(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e>>=7;t.push(1)}}e.varint32write=d;function f(){let e=this.buf[this.pos++],t=e&127;if(!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}e.varint32read=f;function p(e,t){let n=t>>31;return t=((t<<1|e>>>31)^n)>>>0,e=(e<<1^n)>>>0,[e,t]}e.zzEncode=p;function m(e,t){let n=-(e&1);return e=((e>>>1|t<<31)^n)>>>0,t=(t>>>1^n)>>>0,[e,t]}e.zzDecode=m;function h(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216}e.readUInt32=h;function g(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}e.readInt32=g;function _(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}e.writeVarint32=_;function v(e,t,n){for(;e.hi;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo>>>=7;t[n++]=e.lo}e.writeVarint64=v;function y(e,t){let n=e,r=(e>>>28|t<<4)>>>0,i=t>>>24;return i===0?r===0?n<16384?n<128?1:2:n<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:i<128?9:10}e.int64Length=y;function b(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}e.writeFixed32=b;function x(e,t,n){t[n]=e&255}e.writeByte=x})),Wn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BinaryWriter=e.BinaryReader=e.WireType=void 0;var t=Hn(),n=Un(),r;(function(e){e[e.Varint=0]=`Varint`,e[e.Fixed64=1]=`Fixed64`,e[e.Bytes=2]=`Bytes`,e[e.Fixed32=5]=`Fixed32`})(r||(e.WireType=r={})),e.BinaryReader=class{assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}constructor(e){this.buf=e?new Uint8Array(e):new Uint8Array,this.pos=0,this.type=0,this.len=this.buf.length}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw Error(`illegal tag: field no `+t+` wire type `+n);return[t,n,e]}skip(e){if(typeof e==`number`){if(this.pos+e>this.len)throw c(this,e);this.pos+=e}else do if(this.pos>=this.len)throw c(this);while(this.buf[this.pos++]&128);return this}skipType(e){switch(e){case r.Varint:this.skip();break;case r.Fixed64:this.skip(8);break;case r.Bytes:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!=4;)this.skipType(e);break;case r.Fixed32:this.skip(4);break;default:throw Error(`invalid wire type `+e+` at offset `+this.pos)}return this}uint32(){return n.varint32read.bind(this)()}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e%2==1?(e+1)/-2:e/2}fixed32(){let e=(0,n.readUInt32)(this.buf,this.pos);return this.pos+=4,e}sfixed32(){let e=(0,n.readInt32)(this.buf,this.pos);return this.pos+=4,e}int64(){let[e,t]=n.varint64read.bind(this)();return BigInt((0,n.int64ToString)(e,t))}uint64(){let[e,t]=n.varint64read.bind(this)();return BigInt((0,n.uInt64ToString)(e,t))}sint64(){let[e,t]=n.varint64read.bind(this)();return[e,t]=(0,n.zzDecode)(e,t),BigInt((0,n.int64ToString)(e,t))}fixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,n.uInt64ToString)(e,t))}sfixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,n.int64ToString)(e,t))}float(){throw Error(`float not supported`)}double(){throw Error(`double not supported`)}bool(){let[e,t]=n.varint64read.bind(this)();return e!==0||t!==0}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){let e=this.bytes();return(0,t.utf8Read)(e,0,e.length)}};var i=class{constructor(e,t,n){this.fn=e,this.len=t,this.val=n}proceed(e,t){this.fn&&this.fn(this.val,e,t)}},a=class{constructor(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}};e.BinaryWriter=class e{constructor(){this.len=0,this.uint64=e.prototype.int64,this.sfixed64=e.prototype.fixed64,this.sfixed32=e.prototype.fixed32,this.head=new i(null,0,0),this.tail=this.head,this.states=null}static create(){return new e}static alloc(e){return typeof Uint8Array<`u`?s(e=>new Uint8Array(e),Uint8Array.prototype.subarray)(e):Array(e)}_push(e,t,n){return this.tail=this.tail.next=new i(e,t,n),this.len+=t,this}finish(){let t=this.head.next,n=0,r=e.alloc(this.len);for(;t;)t.proceed(r,n),n+=t.len,t=t.next;return r}fork(){return this.states=new a(this),this.head=this.tail=new i(null,0,0),this.len=0,this}reset(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new i(null,0,0),this.len=0),this}ldelim(){let e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this}tag(e,t){return this.uint32((e<<3|t)>>>0)}uint32(e){return this.len+=(this.tail=this.tail.next=new i(n.writeVarint32,(e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this}int32(e){return e<0?this._push(n.writeVarint64,10,(0,n.int64FromString)(e.toString())):this.uint32(e)}sint32(e){return this.uint32((e<<1^e>>31)>>>0)}int64(e){let{lo:t,hi:r}=(0,n.int64FromString)(e.toString());return this._push(n.writeVarint64,(0,n.int64Length)(t,r),{lo:t,hi:r})}sint64(e){let{lo:t,hi:r}=(0,n.int64FromString)(e.toString());return[t,r]=(0,n.zzEncode)(t,r),this._push(n.writeVarint64,(0,n.int64Length)(t,r),{lo:t,hi:r})}fixed64(e){let{lo:t,hi:r}=(0,n.int64FromString)(e.toString());return this._push(n.writeFixed32,4,t)._push(n.writeFixed32,4,r)}bool(e){return this._push(n.writeByte,1,+!!e)}fixed32(e){return this._push(n.writeFixed32,4,e>>>0)}float(e){throw Error(`float not supported`+e)}double(e){throw Error(`double not supported`+e)}bytes(e){let t=e.length>>>0;return t?this.uint32(t)._push(o,t,e):this._push(n.writeByte,1,0)}string(e){let r=(0,t.utf8Length)(e);return r?this.uint32(r)._push(t.utf8Write,r,e):this._push(n.writeByte,1,0)}};function o(e,t,n){if(typeof Uint8Array<`u`)t.set(e,n);else for(let r=0;r<e.length;++r)t[n+r]=e[r]}function s(e,t,n){let r=n||8192,i=r>>>1,a=null,o=r;return function(n){if(n<1||n>i)return e(n);o+n>r&&(a=e(r),o=0);let s=t.call(a,o,o+=n);return o&7&&(o=(o|7)+1),s}}function c(e,t){return RangeError(`index out of range: `+e.pos+` + `+(t||1)+` > `+e.len)}})),Gn=a((e=>{x(),h(),Object.defineProperty(e,`__esModule`,{value:!0}),e.fromJsonTimestamp=e.fromTimestamp=e.toTimestamp=e.isRpc=e.setPaginationParams=e.isObject=e.isSet=e.fromDuration=e.toDuration=e.omitDefault=e.base64FromBytes=e.bytesFromBase64=void 0;var t=(()=>{if(t!==void 0)return t;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),n=t.atob||(e=>t.Buffer.from(e,`base64`).toString(`binary`));function r(e){let t=n(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}e.bytesFromBase64=r;var i=t.btoa||(e=>t.Buffer.from(e,`binary`).toString(`base64`));function a(e){let t=[];return e.forEach(e=>{t.push(String.fromCharCode(e))}),i(t.join(``))}e.base64FromBytes=a;function o(e){if(typeof e==`string`)return e===``?void 0:e;if(typeof e==`number`)return e===0?void 0:e;if(typeof e==`boolean`)return e===!1?void 0:e;if(typeof e==`bigint`)return e===BigInt(0)?void 0:e;throw Error(`Got unsupported type ${typeof e}`)}e.omitDefault=o;function s(e){return{seconds:BigInt(Math.floor(parseInt(e)/1e9)),nanos:parseInt(e)%1e9}}e.toDuration=s;function c(e){return(parseInt(e.seconds.toString())*1e9+e.nanos).toString()}e.fromDuration=c;function l(e){return e!=null}e.isSet=l;function u(e){return typeof e==`object`&&!!e}e.isObject=u,e.setPaginationParams=(e,t)=>t?(t?.countTotal!==void 0&&(e.params[`pagination.count_total`]=t.countTotal),t?.key!==void 0&&(e.params[`pagination.key`]=C.from(t.key).toString(`base64`)),t?.limit!==void 0&&(e.params[`pagination.limit`]=t.limit.toString()),t?.offset!==void 0&&(e.params[`pagination.offset`]=t.offset.toString()),t?.reverse!==void 0&&(e.params[`pagination.reverse`]=t.reverse),e):e;function d(e){return e!=null&&typeof e.request==`function`}e.isRpc=d;function f(e){return{seconds:v(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6}}e.toTimestamp=f;function p(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}e.fromTimestamp=p;var m=e=>({seconds:l(e.seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:l(e.nanos)?Number(e.nanos):0});function _(e){return e instanceof Date?f(e):typeof e==`string`?f(new Date(e)):m(e)}e.fromJsonTimestamp=_;function v(e){return BigInt(Math.trunc(e))}})),Kn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Any=e.protobufPackage=void 0;var t=Wn(),n=Gn();e.protobufPackage=`google.protobuf`;function r(){return{typeUrl:``,value:new Uint8Array}}e.Any={typeUrl:`/google.protobuf.Any`,encode(e,n=t.BinaryWriter.create()){return e.typeUrl!==``&&n.uint32(10).string(e.typeUrl),e.value.length!==0&&n.uint32(18).bytes(e.value),n},decode(e,n){let i=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?i.len:i.pos+n,o=r();for(;i.pos<a;){let e=i.uint32();switch(e>>>3){case 1:o.typeUrl=i.string();break;case 2:o.value=i.bytes();break;default:i.skipType(e&7);break}}return o},fromJSON(e){let t=r();return(0,n.isSet)(e.typeUrl)&&(t.typeUrl=String(e.typeUrl)),(0,n.isSet)(e.value)&&(t.value=(0,n.bytesFromBase64)(e.value)),t},toJSON(e){let t={};return e.typeUrl!==void 0&&(t.typeUrl=e.typeUrl),e.value!==void 0&&(t.value=(0,n.base64FromBytes)(e.value===void 0?new Uint8Array:e.value)),t},fromPartial(e){let t=r();return t.typeUrl=e.typeUrl??``,t.value=e.value??new Uint8Array,t}}})),qn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CompactBitArray=e.MultiSignature=e.protobufPackage=void 0;var t=Wn(),n=Gn();e.protobufPackage=`cosmos.crypto.multisig.v1beta1`;function r(){return{signatures:[]}}e.MultiSignature={typeUrl:`/cosmos.crypto.multisig.v1beta1.MultiSignature`,encode(e,n=t.BinaryWriter.create()){for(let t of e.signatures)n.uint32(10).bytes(t);return n},decode(e,n){let i=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?i.len:i.pos+n,o=r();for(;i.pos<a;){let e=i.uint32();switch(e>>>3){case 1:o.signatures.push(i.bytes());break;default:i.skipType(e&7);break}}return o},fromJSON(e){let t=r();return Array.isArray(e?.signatures)&&(t.signatures=e.signatures.map(e=>(0,n.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>(0,n.base64FromBytes)(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=r();return t.signatures=e.signatures?.map(e=>e)||[],t}};function i(){return{extraBitsStored:0,elems:new Uint8Array}}e.CompactBitArray={typeUrl:`/cosmos.crypto.multisig.v1beta1.CompactBitArray`,encode(e,n=t.BinaryWriter.create()){return e.extraBitsStored!==0&&n.uint32(8).uint32(e.extraBitsStored),e.elems.length!==0&&n.uint32(18).bytes(e.elems),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?r.len:r.pos+n,o=i();for(;r.pos<a;){let e=r.uint32();switch(e>>>3){case 1:o.extraBitsStored=r.uint32();break;case 2:o.elems=r.bytes();break;default:r.skipType(e&7);break}}return o},fromJSON(e){let t=i();return(0,n.isSet)(e.extraBitsStored)&&(t.extraBitsStored=Number(e.extraBitsStored)),(0,n.isSet)(e.elems)&&(t.elems=(0,n.bytesFromBase64)(e.elems)),t},toJSON(e){let t={};return e.extraBitsStored!==void 0&&(t.extraBitsStored=Math.round(e.extraBitsStored)),e.elems!==void 0&&(t.elems=(0,n.base64FromBytes)(e.elems===void 0?new Uint8Array:e.elems)),t},fromPartial(e){let t=i();return t.extraBitsStored=e.extraBitsStored??0,t.elems=e.elems??new Uint8Array,t}}})),Jn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SignatureDescriptor_Data_Multi=e.SignatureDescriptor_Data_Single=e.SignatureDescriptor_Data=e.SignatureDescriptor=e.SignatureDescriptors=e.signModeToJSON=e.signModeFromJSON=e.SignMode=e.protobufPackage=void 0;var t=qn(),n=Kn(),r=Wn(),i=Gn();e.protobufPackage=`cosmos.tx.signing.v1beta1`;var a;(function(e){e[e.SIGN_MODE_UNSPECIFIED=0]=`SIGN_MODE_UNSPECIFIED`,e[e.SIGN_MODE_DIRECT=1]=`SIGN_MODE_DIRECT`,e[e.SIGN_MODE_TEXTUAL=2]=`SIGN_MODE_TEXTUAL`,e[e.SIGN_MODE_DIRECT_AUX=3]=`SIGN_MODE_DIRECT_AUX`,e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]=`SIGN_MODE_LEGACY_AMINO_JSON`,e[e.SIGN_MODE_EIP_191=191]=`SIGN_MODE_EIP_191`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(a||(e.SignMode=a={}));function o(e){switch(e){case 0:case`SIGN_MODE_UNSPECIFIED`:return a.SIGN_MODE_UNSPECIFIED;case 1:case`SIGN_MODE_DIRECT`:return a.SIGN_MODE_DIRECT;case 2:case`SIGN_MODE_TEXTUAL`:return a.SIGN_MODE_TEXTUAL;case 3:case`SIGN_MODE_DIRECT_AUX`:return a.SIGN_MODE_DIRECT_AUX;case 127:case`SIGN_MODE_LEGACY_AMINO_JSON`:return a.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case`SIGN_MODE_EIP_191`:return a.SIGN_MODE_EIP_191;default:return a.UNRECOGNIZED}}e.signModeFromJSON=o;function s(e){switch(e){case a.SIGN_MODE_UNSPECIFIED:return`SIGN_MODE_UNSPECIFIED`;case a.SIGN_MODE_DIRECT:return`SIGN_MODE_DIRECT`;case a.SIGN_MODE_TEXTUAL:return`SIGN_MODE_TEXTUAL`;case a.SIGN_MODE_DIRECT_AUX:return`SIGN_MODE_DIRECT_AUX`;case a.SIGN_MODE_LEGACY_AMINO_JSON:return`SIGN_MODE_LEGACY_AMINO_JSON`;case a.SIGN_MODE_EIP_191:return`SIGN_MODE_EIP_191`;case a.UNRECOGNIZED:default:return`UNRECOGNIZED`}}e.signModeToJSON=s;function c(){return{signatures:[]}}e.SignatureDescriptors={typeUrl:`/cosmos.tx.signing.v1beta1.SignatureDescriptors`,encode(t,n=r.BinaryWriter.create()){for(let r of t.signatures)e.SignatureDescriptor.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.BinaryReader?t:new r.BinaryReader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signatures.push(e.SignatureDescriptor.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){let n=c();return Array.isArray(t?.signatures)&&(n.signatures=t.signatures.map(t=>e.SignatureDescriptor.fromJSON(t))),n},toJSON(t){let n={};return t.signatures?n.signatures=t.signatures.map(t=>t?e.SignatureDescriptor.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=c();return n.signatures=t.signatures?.map(t=>e.SignatureDescriptor.fromPartial(t))||[],n}};function l(){return{publicKey:void 0,data:void 0,sequence:BigInt(0)}}e.SignatureDescriptor={typeUrl:`/cosmos.tx.signing.v1beta1.SignatureDescriptor`,encode(t,i=r.BinaryWriter.create()){return t.publicKey!==void 0&&n.Any.encode(t.publicKey,i.uint32(10).fork()).ldelim(),t.data!==void 0&&e.SignatureDescriptor_Data.encode(t.data,i.uint32(18).fork()).ldelim(),t.sequence!==BigInt(0)&&i.uint32(24).uint64(t.sequence),i},decode(t,i){let a=t instanceof r.BinaryReader?t:new r.BinaryReader(t),o=i===void 0?a.len:a.pos+i,s=l();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.publicKey=n.Any.decode(a,a.uint32());break;case 2:s.data=e.SignatureDescriptor_Data.decode(a,a.uint32());break;case 3:s.sequence=a.uint64();break;default:a.skipType(t&7);break}}return s},fromJSON(t){let r=l();return(0,i.isSet)(t.publicKey)&&(r.publicKey=n.Any.fromJSON(t.publicKey)),(0,i.isSet)(t.data)&&(r.data=e.SignatureDescriptor_Data.fromJSON(t.data)),(0,i.isSet)(t.sequence)&&(r.sequence=BigInt(t.sequence.toString())),r},toJSON(t){let r={};return t.publicKey!==void 0&&(r.publicKey=t.publicKey?n.Any.toJSON(t.publicKey):void 0),t.data!==void 0&&(r.data=t.data?e.SignatureDescriptor_Data.toJSON(t.data):void 0),t.sequence!==void 0&&(r.sequence=(t.sequence||BigInt(0)).toString()),r},fromPartial(t){let r=l();return t.publicKey!==void 0&&t.publicKey!==null&&(r.publicKey=n.Any.fromPartial(t.publicKey)),t.data!==void 0&&t.data!==null&&(r.data=e.SignatureDescriptor_Data.fromPartial(t.data)),t.sequence!==void 0&&t.sequence!==null&&(r.sequence=BigInt(t.sequence.toString())),r}};function u(){return{single:void 0,multi:void 0}}e.SignatureDescriptor_Data={typeUrl:`/cosmos.tx.signing.v1beta1.Data`,encode(t,n=r.BinaryWriter.create()){return t.single!==void 0&&e.SignatureDescriptor_Data_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.SignatureDescriptor_Data_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.BinaryReader?t:new r.BinaryReader(t),a=n===void 0?i.len:i.pos+n,o=u();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.single=e.SignatureDescriptor_Data_Single.decode(i,i.uint32());break;case 2:o.multi=e.SignatureDescriptor_Data_Multi.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){let n=u();return(0,i.isSet)(t.single)&&(n.single=e.SignatureDescriptor_Data_Single.fromJSON(t.single)),(0,i.isSet)(t.multi)&&(n.multi=e.SignatureDescriptor_Data_Multi.fromJSON(t.multi)),n},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.SignatureDescriptor_Data_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.SignatureDescriptor_Data_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=u();return t.single!==void 0&&t.single!==null&&(n.single=e.SignatureDescriptor_Data_Single.fromPartial(t.single)),t.multi!==void 0&&t.multi!==null&&(n.multi=e.SignatureDescriptor_Data_Multi.fromPartial(t.multi)),n}};function d(){return{mode:0,signature:new Uint8Array}}e.SignatureDescriptor_Data_Single={typeUrl:`/cosmos.tx.signing.v1beta1.Single`,encode(e,t=r.BinaryWriter.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),e.signature.length!==0&&t.uint32(18).bytes(e.signature),t},decode(e,t){let n=e instanceof r.BinaryReader?e:new r.BinaryReader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.mode=n.int32();break;case 2:a.signature=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){let t=d();return(0,i.isSet)(e.mode)&&(t.mode=o(e.mode)),(0,i.isSet)(e.signature)&&(t.signature=(0,i.bytesFromBase64)(e.signature)),t},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=s(e.mode)),e.signature!==void 0&&(t.signature=(0,i.base64FromBytes)(e.signature===void 0?new Uint8Array:e.signature)),t},fromPartial(e){let t=d();return t.mode=e.mode??0,t.signature=e.signature??new Uint8Array,t}};function f(){return{bitarray:void 0,signatures:[]}}e.SignatureDescriptor_Data_Multi={typeUrl:`/cosmos.tx.signing.v1beta1.Multi`,encode(n,i=r.BinaryWriter.create()){n.bitarray!==void 0&&t.CompactBitArray.encode(n.bitarray,i.uint32(10).fork()).ldelim();for(let t of n.signatures)e.SignatureDescriptor_Data.encode(t,i.uint32(18).fork()).ldelim();return i},decode(n,i){let a=n instanceof r.BinaryReader?n:new r.BinaryReader(n),o=i===void 0?a.len:a.pos+i,s=f();for(;a.pos<o;){let n=a.uint32();switch(n>>>3){case 1:s.bitarray=t.CompactBitArray.decode(a,a.uint32());break;case 2:s.signatures.push(e.SignatureDescriptor_Data.decode(a,a.uint32()));break;default:a.skipType(n&7);break}}return s},fromJSON(n){let r=f();return(0,i.isSet)(n.bitarray)&&(r.bitarray=t.CompactBitArray.fromJSON(n.bitarray)),Array.isArray(n?.signatures)&&(r.signatures=n.signatures.map(t=>e.SignatureDescriptor_Data.fromJSON(t))),r},toJSON(n){let r={};return n.bitarray!==void 0&&(r.bitarray=n.bitarray?t.CompactBitArray.toJSON(n.bitarray):void 0),n.signatures?r.signatures=n.signatures.map(t=>t?e.SignatureDescriptor_Data.toJSON(t):void 0):r.signatures=[],r},fromPartial(n){let r=f();return n.bitarray!==void 0&&n.bitarray!==null&&(r.bitarray=t.CompactBitArray.fromPartial(n.bitarray)),r.signatures=n.signatures?.map(t=>e.SignatureDescriptor_Data.fromPartial(t))||[],r}}})),Yn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DecProto=e.IntProto=e.DecCoin=e.Coin=e.protobufPackage=void 0;var t=Wn(),n=Gn();e.protobufPackage=`cosmos.base.v1beta1`;function r(){return{denom:``,amount:``}}e.Coin={typeUrl:`/cosmos.base.v1beta1.Coin`,encode(e,n=t.BinaryWriter.create()){return e.denom!==``&&n.uint32(10).string(e.denom),e.amount!==``&&n.uint32(18).string(e.amount),n},decode(e,n){let i=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?i.len:i.pos+n,o=r();for(;i.pos<a;){let e=i.uint32();switch(e>>>3){case 1:o.denom=i.string();break;case 2:o.amount=i.string();break;default:i.skipType(e&7);break}}return o},fromJSON(e){let t=r();return(0,n.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,n.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=r();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function i(){return{denom:``,amount:``}}e.DecCoin={typeUrl:`/cosmos.base.v1beta1.DecCoin`,encode(e,n=t.BinaryWriter.create()){return e.denom!==``&&n.uint32(10).string(e.denom),e.amount!==``&&n.uint32(18).string(e.amount),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),a=n===void 0?r.len:r.pos+n,o=i();for(;r.pos<a;){let e=r.uint32();switch(e>>>3){case 1:o.denom=r.string();break;case 2:o.amount=r.string();break;default:r.skipType(e&7);break}}return o},fromJSON(e){let t=i();return(0,n.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,n.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=i();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function a(){return{int:``}}e.IntProto={typeUrl:`/cosmos.base.v1beta1.IntProto`,encode(e,n=t.BinaryWriter.create()){return e.int!==``&&n.uint32(10).string(e.int),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),i=n===void 0?r.len:r.pos+n,o=a();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:o.int=r.string();break;default:r.skipType(e&7);break}}return o},fromJSON(e){let t=a();return(0,n.isSet)(e.int)&&(t.int=String(e.int)),t},toJSON(e){let t={};return e.int!==void 0&&(t.int=e.int),t},fromPartial(e){let t=a();return t.int=e.int??``,t}};function o(){return{dec:``}}e.DecProto={typeUrl:`/cosmos.base.v1beta1.DecProto`,encode(e,n=t.BinaryWriter.create()){return e.dec!==``&&n.uint32(10).string(e.dec),n},decode(e,n){let r=e instanceof t.BinaryReader?e:new t.BinaryReader(e),i=n===void 0?r.len:r.pos+n,a=o();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:a.dec=r.string();break;default:r.skipType(e&7);break}}return a},fromJSON(e){let t=o();return(0,n.isSet)(e.dec)&&(t.dec=String(e.dec)),t},toJSON(e){let t={};return e.dec!==void 0&&(t.dec=e.dec),t},fromPartial(e){let t=o();return t.dec=e.dec??``,t}}})),Xn=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AuxSignerData=e.Tip=e.Fee=e.ModeInfo_Multi=e.ModeInfo_Single=e.ModeInfo=e.SignerInfo=e.AuthInfo=e.TxBody=e.SignDocDirectAux=e.SignDoc=e.TxRaw=e.Tx=e.protobufPackage=void 0;var t=Kn(),n=Jn(),r=qn(),i=Yn(),a=Wn(),o=Gn();e.protobufPackage=`cosmos.tx.v1beta1`;function s(){return{body:void 0,authInfo:void 0,signatures:[]}}e.Tx={typeUrl:`/cosmos.tx.v1beta1.Tx`,encode(t,n=a.BinaryWriter.create()){t.body!==void 0&&e.TxBody.encode(t.body,n.uint32(10).fork()).ldelim(),t.authInfo!==void 0&&e.AuthInfo.encode(t.authInfo,n.uint32(18).fork()).ldelim();for(let e of t.signatures)n.uint32(26).bytes(e);return n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=s();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.body=e.TxBody.decode(r,r.uint32());break;case 2:o.authInfo=e.AuthInfo.decode(r,r.uint32());break;case 3:o.signatures.push(r.bytes());break;default:r.skipType(t&7);break}}return o},fromJSON(t){let n=s();return(0,o.isSet)(t.body)&&(n.body=e.TxBody.fromJSON(t.body)),(0,o.isSet)(t.authInfo)&&(n.authInfo=e.AuthInfo.fromJSON(t.authInfo)),Array.isArray(t?.signatures)&&(n.signatures=t.signatures.map(e=>(0,o.bytesFromBase64)(e))),n},toJSON(t){let n={};return t.body!==void 0&&(n.body=t.body?e.TxBody.toJSON(t.body):void 0),t.authInfo!==void 0&&(n.authInfo=t.authInfo?e.AuthInfo.toJSON(t.authInfo):void 0),t.signatures?n.signatures=t.signatures.map(e=>(0,o.base64FromBytes)(e===void 0?new Uint8Array:e)):n.signatures=[],n},fromPartial(t){let n=s();return t.body!==void 0&&t.body!==null&&(n.body=e.TxBody.fromPartial(t.body)),t.authInfo!==void 0&&t.authInfo!==null&&(n.authInfo=e.AuthInfo.fromPartial(t.authInfo)),n.signatures=t.signatures?.map(e=>e)||[],n}};function c(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}e.TxRaw={typeUrl:`/cosmos.tx.v1beta1.TxRaw`,encode(e,t=a.BinaryWriter.create()){e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes);for(let n of e.signatures)t.uint32(26).bytes(n);return t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,i=c();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.signatures.push(n.bytes());break;default:n.skipType(e&7);break}}return i},fromJSON(e){let t=c();return(0,o.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,o.bytesFromBase64)(e.bodyBytes)),(0,o.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,o.bytesFromBase64)(e.authInfoBytes)),Array.isArray(e?.signatures)&&(t.signatures=e.signatures.map(e=>(0,o.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=(0,o.base64FromBytes)(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=(0,o.base64FromBytes)(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.signatures?t.signatures=e.signatures.map(e=>(0,o.base64FromBytes)(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=c();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.signatures=e.signatures?.map(e=>e)||[],t}};function l(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:``,accountNumber:BigInt(0)}}e.SignDoc={typeUrl:`/cosmos.tx.v1beta1.SignDoc`,encode(e,t=a.BinaryWriter.create()){return e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes),e.chainId!==``&&t.uint32(26).string(e.chainId),e.accountNumber!==BigInt(0)&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,i=l();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.chainId=n.string();break;case 4:i.accountNumber=n.uint64();break;default:n.skipType(e&7);break}}return i},fromJSON(e){let t=l();return(0,o.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,o.bytesFromBase64)(e.bodyBytes)),(0,o.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,o.bytesFromBase64)(e.authInfoBytes)),(0,o.isSet)(e.chainId)&&(t.chainId=String(e.chainId)),(0,o.isSet)(e.accountNumber)&&(t.accountNumber=BigInt(e.accountNumber.toString())),t},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=(0,o.base64FromBytes)(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=(0,o.base64FromBytes)(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.chainId!==void 0&&(t.chainId=e.chainId),e.accountNumber!==void 0&&(t.accountNumber=(e.accountNumber||BigInt(0)).toString()),t},fromPartial(e){let t=l();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.chainId=e.chainId??``,e.accountNumber!==void 0&&e.accountNumber!==null&&(t.accountNumber=BigInt(e.accountNumber.toString())),t}};function u(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:``,accountNumber:BigInt(0),sequence:BigInt(0),tip:void 0}}e.SignDocDirectAux={typeUrl:`/cosmos.tx.v1beta1.SignDocDirectAux`,encode(n,r=a.BinaryWriter.create()){return n.bodyBytes.length!==0&&r.uint32(10).bytes(n.bodyBytes),n.publicKey!==void 0&&t.Any.encode(n.publicKey,r.uint32(18).fork()).ldelim(),n.chainId!==``&&r.uint32(26).string(n.chainId),n.accountNumber!==BigInt(0)&&r.uint32(32).uint64(n.accountNumber),n.sequence!==BigInt(0)&&r.uint32(40).uint64(n.sequence),n.tip!==void 0&&e.Tip.encode(n.tip,r.uint32(50).fork()).ldelim(),r},decode(n,r){let i=n instanceof a.BinaryReader?n:new a.BinaryReader(n),o=r===void 0?i.len:i.pos+r,s=u();for(;i.pos<o;){let n=i.uint32();switch(n>>>3){case 1:s.bodyBytes=i.bytes();break;case 2:s.publicKey=t.Any.decode(i,i.uint32());break;case 3:s.chainId=i.string();break;case 4:s.accountNumber=i.uint64();break;case 5:s.sequence=i.uint64();break;case 6:s.tip=e.Tip.decode(i,i.uint32());break;default:i.skipType(n&7);break}}return s},fromJSON(n){let r=u();return(0,o.isSet)(n.bodyBytes)&&(r.bodyBytes=(0,o.bytesFromBase64)(n.bodyBytes)),(0,o.isSet)(n.publicKey)&&(r.publicKey=t.Any.fromJSON(n.publicKey)),(0,o.isSet)(n.chainId)&&(r.chainId=String(n.chainId)),(0,o.isSet)(n.accountNumber)&&(r.accountNumber=BigInt(n.accountNumber.toString())),(0,o.isSet)(n.sequence)&&(r.sequence=BigInt(n.sequence.toString())),(0,o.isSet)(n.tip)&&(r.tip=e.Tip.fromJSON(n.tip)),r},toJSON(n){let r={};return n.bodyBytes!==void 0&&(r.bodyBytes=(0,o.base64FromBytes)(n.bodyBytes===void 0?new Uint8Array:n.bodyBytes)),n.publicKey!==void 0&&(r.publicKey=n.publicKey?t.Any.toJSON(n.publicKey):void 0),n.chainId!==void 0&&(r.chainId=n.chainId),n.accountNumber!==void 0&&(r.accountNumber=(n.accountNumber||BigInt(0)).toString()),n.sequence!==void 0&&(r.sequence=(n.sequence||BigInt(0)).toString()),n.tip!==void 0&&(r.tip=n.tip?e.Tip.toJSON(n.tip):void 0),r},fromPartial(n){let r=u();return r.bodyBytes=n.bodyBytes??new Uint8Array,n.publicKey!==void 0&&n.publicKey!==null&&(r.publicKey=t.Any.fromPartial(n.publicKey)),r.chainId=n.chainId??``,n.accountNumber!==void 0&&n.accountNumber!==null&&(r.accountNumber=BigInt(n.accountNumber.toString())),n.sequence!==void 0&&n.sequence!==null&&(r.sequence=BigInt(n.sequence.toString())),n.tip!==void 0&&n.tip!==null&&(r.tip=e.Tip.fromPartial(n.tip)),r}};function d(){return{messages:[],memo:``,timeoutHeight:BigInt(0),extensionOptions:[],nonCriticalExtensionOptions:[]}}e.TxBody={typeUrl:`/cosmos.tx.v1beta1.TxBody`,encode(e,n=a.BinaryWriter.create()){for(let r of e.messages)t.Any.encode(r,n.uint32(10).fork()).ldelim();e.memo!==``&&n.uint32(18).string(e.memo),e.timeoutHeight!==BigInt(0)&&n.uint32(24).uint64(e.timeoutHeight);for(let r of e.extensionOptions)t.Any.encode(r,n.uint32(8186).fork()).ldelim();for(let r of e.nonCriticalExtensionOptions)t.Any.encode(r,n.uint32(16378).fork()).ldelim();return n},decode(e,n){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=n===void 0?r.len:r.pos+n,o=d();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:o.messages.push(t.Any.decode(r,r.uint32()));break;case 2:o.memo=r.string();break;case 3:o.timeoutHeight=r.uint64();break;case 1023:o.extensionOptions.push(t.Any.decode(r,r.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(t.Any.decode(r,r.uint32()));break;default:r.skipType(e&7);break}}return o},fromJSON(e){let n=d();return Array.isArray(e?.messages)&&(n.messages=e.messages.map(e=>t.Any.fromJSON(e))),(0,o.isSet)(e.memo)&&(n.memo=String(e.memo)),(0,o.isSet)(e.timeoutHeight)&&(n.timeoutHeight=BigInt(e.timeoutHeight.toString())),Array.isArray(e?.extensionOptions)&&(n.extensionOptions=e.extensionOptions.map(e=>t.Any.fromJSON(e))),Array.isArray(e?.nonCriticalExtensionOptions)&&(n.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>t.Any.fromJSON(e))),n},toJSON(e){let n={};return e.messages?n.messages=e.messages.map(e=>e?t.Any.toJSON(e):void 0):n.messages=[],e.memo!==void 0&&(n.memo=e.memo),e.timeoutHeight!==void 0&&(n.timeoutHeight=(e.timeoutHeight||BigInt(0)).toString()),e.extensionOptions?n.extensionOptions=e.extensionOptions.map(e=>e?t.Any.toJSON(e):void 0):n.extensionOptions=[],e.nonCriticalExtensionOptions?n.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?t.Any.toJSON(e):void 0):n.nonCriticalExtensionOptions=[],n},fromPartial(e){let n=d();return n.messages=e.messages?.map(e=>t.Any.fromPartial(e))||[],n.memo=e.memo??``,e.timeoutHeight!==void 0&&e.timeoutHeight!==null&&(n.timeoutHeight=BigInt(e.timeoutHeight.toString())),n.extensionOptions=e.extensionOptions?.map(e=>t.Any.fromPartial(e))||[],n.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions?.map(e=>t.Any.fromPartial(e))||[],n}};function f(){return{signerInfos:[],fee:void 0,tip:void 0}}e.AuthInfo={typeUrl:`/cosmos.tx.v1beta1.AuthInfo`,encode(t,n=a.BinaryWriter.create()){for(let r of t.signerInfos)e.SignerInfo.encode(r,n.uint32(10).fork()).ldelim();return t.fee!==void 0&&e.Fee.encode(t.fee,n.uint32(18).fork()).ldelim(),t.tip!==void 0&&e.Tip.encode(t.tip,n.uint32(26).fork()).ldelim(),n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=f();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.signerInfos.push(e.SignerInfo.decode(r,r.uint32()));break;case 2:o.fee=e.Fee.decode(r,r.uint32());break;case 3:o.tip=e.Tip.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return o},fromJSON(t){let n=f();return Array.isArray(t?.signerInfos)&&(n.signerInfos=t.signerInfos.map(t=>e.SignerInfo.fromJSON(t))),(0,o.isSet)(t.fee)&&(n.fee=e.Fee.fromJSON(t.fee)),(0,o.isSet)(t.tip)&&(n.tip=e.Tip.fromJSON(t.tip)),n},toJSON(t){let n={};return t.signerInfos?n.signerInfos=t.signerInfos.map(t=>t?e.SignerInfo.toJSON(t):void 0):n.signerInfos=[],t.fee!==void 0&&(n.fee=t.fee?e.Fee.toJSON(t.fee):void 0),t.tip!==void 0&&(n.tip=t.tip?e.Tip.toJSON(t.tip):void 0),n},fromPartial(t){let n=f();return n.signerInfos=t.signerInfos?.map(t=>e.SignerInfo.fromPartial(t))||[],t.fee!==void 0&&t.fee!==null&&(n.fee=e.Fee.fromPartial(t.fee)),t.tip!==void 0&&t.tip!==null&&(n.tip=e.Tip.fromPartial(t.tip)),n}};function p(){return{publicKey:void 0,modeInfo:void 0,sequence:BigInt(0)}}e.SignerInfo={typeUrl:`/cosmos.tx.v1beta1.SignerInfo`,encode(n,r=a.BinaryWriter.create()){return n.publicKey!==void 0&&t.Any.encode(n.publicKey,r.uint32(10).fork()).ldelim(),n.modeInfo!==void 0&&e.ModeInfo.encode(n.modeInfo,r.uint32(18).fork()).ldelim(),n.sequence!==BigInt(0)&&r.uint32(24).uint64(n.sequence),r},decode(n,r){let i=n instanceof a.BinaryReader?n:new a.BinaryReader(n),o=r===void 0?i.len:i.pos+r,s=p();for(;i.pos<o;){let n=i.uint32();switch(n>>>3){case 1:s.publicKey=t.Any.decode(i,i.uint32());break;case 2:s.modeInfo=e.ModeInfo.decode(i,i.uint32());break;case 3:s.sequence=i.uint64();break;default:i.skipType(n&7);break}}return s},fromJSON(n){let r=p();return(0,o.isSet)(n.publicKey)&&(r.publicKey=t.Any.fromJSON(n.publicKey)),(0,o.isSet)(n.modeInfo)&&(r.modeInfo=e.ModeInfo.fromJSON(n.modeInfo)),(0,o.isSet)(n.sequence)&&(r.sequence=BigInt(n.sequence.toString())),r},toJSON(n){let r={};return n.publicKey!==void 0&&(r.publicKey=n.publicKey?t.Any.toJSON(n.publicKey):void 0),n.modeInfo!==void 0&&(r.modeInfo=n.modeInfo?e.ModeInfo.toJSON(n.modeInfo):void 0),n.sequence!==void 0&&(r.sequence=(n.sequence||BigInt(0)).toString()),r},fromPartial(n){let r=p();return n.publicKey!==void 0&&n.publicKey!==null&&(r.publicKey=t.Any.fromPartial(n.publicKey)),n.modeInfo!==void 0&&n.modeInfo!==null&&(r.modeInfo=e.ModeInfo.fromPartial(n.modeInfo)),n.sequence!==void 0&&n.sequence!==null&&(r.sequence=BigInt(n.sequence.toString())),r}};function m(){return{single:void 0,multi:void 0}}e.ModeInfo={typeUrl:`/cosmos.tx.v1beta1.ModeInfo`,encode(t,n=a.BinaryWriter.create()){return t.single!==void 0&&e.ModeInfo_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.ModeInfo_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=m();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.single=e.ModeInfo_Single.decode(r,r.uint32());break;case 2:o.multi=e.ModeInfo_Multi.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return o},fromJSON(t){let n=m();return(0,o.isSet)(t.single)&&(n.single=e.ModeInfo_Single.fromJSON(t.single)),(0,o.isSet)(t.multi)&&(n.multi=e.ModeInfo_Multi.fromJSON(t.multi)),n},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.ModeInfo_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.ModeInfo_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=m();return t.single!==void 0&&t.single!==null&&(n.single=e.ModeInfo_Single.fromPartial(t.single)),t.multi!==void 0&&t.multi!==null&&(n.multi=e.ModeInfo_Multi.fromPartial(t.multi)),n}};function h(){return{mode:0}}e.ModeInfo_Single={typeUrl:`/cosmos.tx.v1beta1.Single`,encode(e,t=a.BinaryWriter.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,i=h();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:i.mode=n.int32();break;default:n.skipType(e&7);break}}return i},fromJSON(e){let t=h();return(0,o.isSet)(e.mode)&&(t.mode=(0,n.signModeFromJSON)(e.mode)),t},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=(0,n.signModeToJSON)(e.mode)),t},fromPartial(e){let t=h();return t.mode=e.mode??0,t}};function g(){return{bitarray:void 0,modeInfos:[]}}e.ModeInfo_Multi={typeUrl:`/cosmos.tx.v1beta1.Multi`,encode(t,n=a.BinaryWriter.create()){t.bitarray!==void 0&&r.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(let r of t.modeInfos)e.ModeInfo.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof a.BinaryReader?t:new a.BinaryReader(t),o=n===void 0?i.len:i.pos+n,s=g();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.bitarray=r.CompactBitArray.decode(i,i.uint32());break;case 2:s.modeInfos.push(e.ModeInfo.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){let n=g();return(0,o.isSet)(t.bitarray)&&(n.bitarray=r.CompactBitArray.fromJSON(t.bitarray)),Array.isArray(t?.modeInfos)&&(n.modeInfos=t.modeInfos.map(t=>e.ModeInfo.fromJSON(t))),n},toJSON(t){let n={};return t.bitarray!==void 0&&(n.bitarray=t.bitarray?r.CompactBitArray.toJSON(t.bitarray):void 0),t.modeInfos?n.modeInfos=t.modeInfos.map(t=>t?e.ModeInfo.toJSON(t):void 0):n.modeInfos=[],n},fromPartial(t){let n=g();return t.bitarray!==void 0&&t.bitarray!==null&&(n.bitarray=r.CompactBitArray.fromPartial(t.bitarray)),n.modeInfos=t.modeInfos?.map(t=>e.ModeInfo.fromPartial(t))||[],n}};function _(){return{amount:[],gasLimit:BigInt(0),payer:``,granter:``}}e.Fee={typeUrl:`/cosmos.tx.v1beta1.Fee`,encode(e,t=a.BinaryWriter.create()){for(let n of e.amount)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.gasLimit!==BigInt(0)&&t.uint32(16).uint64(e.gasLimit),e.payer!==``&&t.uint32(26).string(e.payer),e.granter!==``&&t.uint32(34).string(e.granter),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,o=_();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:o.amount.push(i.Coin.decode(n,n.uint32()));break;case 2:o.gasLimit=n.uint64();break;case 3:o.payer=n.string();break;case 4:o.granter=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){let t=_();return Array.isArray(e?.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),(0,o.isSet)(e.gasLimit)&&(t.gasLimit=BigInt(e.gasLimit.toString())),(0,o.isSet)(e.payer)&&(t.payer=String(e.payer)),(0,o.isSet)(e.granter)&&(t.granter=String(e.granter)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],e.gasLimit!==void 0&&(t.gasLimit=(e.gasLimit||BigInt(0)).toString()),e.payer!==void 0&&(t.payer=e.payer),e.granter!==void 0&&(t.granter=e.granter),t},fromPartial(e){let t=_();return t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],e.gasLimit!==void 0&&e.gasLimit!==null&&(t.gasLimit=BigInt(e.gasLimit.toString())),t.payer=e.payer??``,t.granter=e.granter??``,t}};function v(){return{amount:[],tipper:``}}e.Tip={typeUrl:`/cosmos.tx.v1beta1.Tip`,encode(e,t=a.BinaryWriter.create()){for(let n of e.amount)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.tipper!==``&&t.uint32(18).string(e.tipper),t},decode(e,t){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),r=t===void 0?n.len:n.pos+t,o=v();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:o.amount.push(i.Coin.decode(n,n.uint32()));break;case 2:o.tipper=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){let t=v();return Array.isArray(e?.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),(0,o.isSet)(e.tipper)&&(t.tipper=String(e.tipper)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],e.tipper!==void 0&&(t.tipper=e.tipper),t},fromPartial(e){let t=v();return t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],t.tipper=e.tipper??``,t}};function y(){return{address:``,signDoc:void 0,mode:0,sig:new Uint8Array}}e.AuxSignerData={typeUrl:`/cosmos.tx.v1beta1.AuxSignerData`,encode(t,n=a.BinaryWriter.create()){return t.address!==``&&n.uint32(10).string(t.address),t.signDoc!==void 0&&e.SignDocDirectAux.encode(t.signDoc,n.uint32(18).fork()).ldelim(),t.mode!==0&&n.uint32(24).int32(t.mode),t.sig.length!==0&&n.uint32(34).bytes(t.sig),n},decode(t,n){let r=t instanceof a.BinaryReader?t:new a.BinaryReader(t),i=n===void 0?r.len:r.pos+n,o=y();for(;r.pos<i;){let t=r.uint32();switch(t>>>3){case 1:o.address=r.string();break;case 2:o.signDoc=e.SignDocDirectAux.decode(r,r.uint32());break;case 3:o.mode=r.int32();break;case 4:o.sig=r.bytes();break;default:r.skipType(t&7);break}}return o},fromJSON(t){let r=y();return(0,o.isSet)(t.address)&&(r.address=String(t.address)),(0,o.isSet)(t.signDoc)&&(r.signDoc=e.SignDocDirectAux.fromJSON(t.signDoc)),(0,o.isSet)(t.mode)&&(r.mode=(0,n.signModeFromJSON)(t.mode)),(0,o.isSet)(t.sig)&&(r.sig=(0,o.bytesFromBase64)(t.sig)),r},toJSON(t){let r={};return t.address!==void 0&&(r.address=t.address),t.signDoc!==void 0&&(r.signDoc=t.signDoc?e.SignDocDirectAux.toJSON(t.signDoc):void 0),t.mode!==void 0&&(r.mode=(0,n.signModeToJSON)(t.mode)),t.sig!==void 0&&(r.sig=(0,o.base64FromBytes)(t.sig===void 0?new Uint8Array:t.sig)),r},fromPartial(t){let n=y();return n.address=t.address??``,t.signDoc!==void 0&&t.signDoc!==null&&(n.signDoc=e.SignDocDirectAux.fromPartial(t.signDoc)),n.mode=t.mode??0,n.sig=t.sig??new Uint8Array,n}}})),Zn=a(((e,t)=>{var n=D(),r=P().Buffer;t.exports=function(e){function t(t){var i=e(t);return n.encode(r.concat([t,i],t.length+4))}function i(t){var n=t.slice(0,-4),r=t.slice(-4),i=e(n);if(!(r[0]^i[0]|r[1]^i[1]|r[2]^i[2]|r[3]^i[3]))return n}function a(e){var t=n.decodeUnsafe(e);if(t)return i(t)}function o(t){var r=i(n.decode(t),e);if(!r)throw Error(`Invalid checksum`);return r}return{encode:t,decode:o,decodeUnsafe:a}}})),Qn=a(((e,t)=>{var n=A(),r=Zn();function i(e){var t=n(`sha256`).update(e).digest();return n(`sha256`).update(t).digest()}t.exports=r(i)})),U=a(((t,n)=>{h(),(function(e,r){typeof t==`object`?n.exports=t=r():typeof define==`function`&&define.amd?define([],r):e.CryptoJS=r()})(t,function(){var t=t||function(t,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&g!==void 0&&g.crypto&&(r=g.crypto),!r&&typeof e==`function`)try{r=j()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],t==n?this.sigBytes=e.length*4:this.sigBytes=t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=e?t.ceil(s):t.max((s|0)-this._minBufferSize,0);var c=s*o,u=t.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return t})})),$n=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.Base,a=r.WordArray,o=n.x64={};o.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),o.WordArray=i.extend({init:function(e,n){e=this.words=e||[],n==t?this.sigBytes=e.length*8:this.sigBytes=n},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}})})(),e})})),er=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){if(typeof ArrayBuffer==`function`){var t=e.lib.WordArray,n=t.init,r=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||typeof Uint8ClampedArray<`u`&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,r=[],i=0;i<t;i++)r[i>>>2]|=e[i]<<24-i%4*8;n.call(this,r,t)}else n.apply(this,arguments)};r.prototype=t}})(),e.lib.WordArray})})),tr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.enc;r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var a=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return n.create(r,t*2)}},r.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a+=2){var o=i(t[a>>>2]>>>16-a%4*8&65535);r.push(String.fromCharCode(o))}return r.join(``)},parse:function(e){for(var t=e.length,r=[],a=0;a<t;a++)r[a>>>1]|=i(e.charCodeAt(a)<<16-a%2*16);return n.create(r,t*2)}};function i(e){return e<<8&4278255360|e>>>8&16711935}})(),e.enc.Utf16})})),nr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.enc;r.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],a=0;a<n;a+=3)for(var o=t[a>>>2]>>>24-a%4*8&255,s=t[a+1>>>2]>>>24-(a+1)%4*8&255,c=t[a+2>>>2]>>>24-(a+2)%4*8&255,l=o<<16|s<<8|c,u=0;u<4&&a+u*.75<n;u++)i.push(r.charAt(l>>>6*(3-u)&63));var d=r.charAt(64);if(d)for(;i.length%4;)i.push(d);return i.join(``)},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a<n.length;a++)r[n.charCodeAt(a)]=a}var o=n.charAt(64);if(o){var s=e.indexOf(o);s!==-1&&(t=s)}return i(e,t,r)},_map:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`};function i(e,t,r){for(var i=[],a=0,o=0;o<t;o++)if(o%4){var s=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2;i[a>>>2]|=s<<24-a%4*8,a++}return n.create(i,a)}})(),e.enc.Base64})})),rr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.enc;r.Base64url={stringify:function(e,t){t===void 0&&(t=!0);var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o<r;o+=3)for(var s=n[o>>>2]>>>24-o%4*8&255,c=n[o+1>>>2]>>>24-(o+1)%4*8&255,l=n[o+2>>>2]>>>24-(o+2)%4*8&255,u=s<<16|c<<8|l,d=0;d<4&&o+d*.75<r;d++)a.push(i.charAt(u>>>6*(3-d)&63));var f=i.charAt(64);if(f)for(;a.length%4;)a.push(f);return a.join(``)},parse:function(e,t){t===void 0&&(t=!0);var n=e.length,r=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<r.length;o++)a[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var c=e.indexOf(s);c!==-1&&(n=c)}return i(e,n,a)},_map:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,_safe_map:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`};function i(e,t,r){for(var i=[],a=0,o=0;o<t;o++)if(o%4){var s=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2;i[a>>>2]|=s<<24-a%4*8,a++}return n.create(i,a)}})(),e.enc.Base64url})})),ir=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[];(function(){for(var e=0;e<64;e++)s[e]=t.abs(t.sin(e+1))*4294967296|0})();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],m=e[t+3],h=e[t+4],g=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],b=e[t+9],x=e[t+10],S=e[t+11],C=e[t+12],w=e[t+13],T=e[t+14],E=e[t+15],D=a[0],O=a[1],k=a[2],A=a[3];D=l(D,O,k,A,o,7,s[0]),A=l(A,D,O,k,c,12,s[1]),k=l(k,A,D,O,p,17,s[2]),O=l(O,k,A,D,m,22,s[3]),D=l(D,O,k,A,h,7,s[4]),A=l(A,D,O,k,g,12,s[5]),k=l(k,A,D,O,_,17,s[6]),O=l(O,k,A,D,v,22,s[7]),D=l(D,O,k,A,y,7,s[8]),A=l(A,D,O,k,b,12,s[9]),k=l(k,A,D,O,x,17,s[10]),O=l(O,k,A,D,S,22,s[11]),D=l(D,O,k,A,C,7,s[12]),A=l(A,D,O,k,w,12,s[13]),k=l(k,A,D,O,T,17,s[14]),O=l(O,k,A,D,E,22,s[15]),D=u(D,O,k,A,c,5,s[16]),A=u(A,D,O,k,_,9,s[17]),k=u(k,A,D,O,S,14,s[18]),O=u(O,k,A,D,o,20,s[19]),D=u(D,O,k,A,g,5,s[20]),A=u(A,D,O,k,x,9,s[21]),k=u(k,A,D,O,E,14,s[22]),O=u(O,k,A,D,h,20,s[23]),D=u(D,O,k,A,b,5,s[24]),A=u(A,D,O,k,T,9,s[25]),k=u(k,A,D,O,m,14,s[26]),O=u(O,k,A,D,y,20,s[27]),D=u(D,O,k,A,w,5,s[28]),A=u(A,D,O,k,p,9,s[29]),k=u(k,A,D,O,v,14,s[30]),O=u(O,k,A,D,C,20,s[31]),D=d(D,O,k,A,g,4,s[32]),A=d(A,D,O,k,y,11,s[33]),k=d(k,A,D,O,S,16,s[34]),O=d(O,k,A,D,T,23,s[35]),D=d(D,O,k,A,c,4,s[36]),A=d(A,D,O,k,h,11,s[37]),k=d(k,A,D,O,v,16,s[38]),O=d(O,k,A,D,x,23,s[39]),D=d(D,O,k,A,w,4,s[40]),A=d(A,D,O,k,o,11,s[41]),k=d(k,A,D,O,m,16,s[42]),O=d(O,k,A,D,_,23,s[43]),D=d(D,O,k,A,b,4,s[44]),A=d(A,D,O,k,C,11,s[45]),k=d(k,A,D,O,E,16,s[46]),O=d(O,k,A,D,p,23,s[47]),D=f(D,O,k,A,o,6,s[48]),A=f(A,D,O,k,v,10,s[49]),k=f(k,A,D,O,T,15,s[50]),O=f(O,k,A,D,g,21,s[51]),D=f(D,O,k,A,C,6,s[52]),A=f(A,D,O,k,m,10,s[53]),k=f(k,A,D,O,x,15,s[54]),O=f(O,k,A,D,c,21,s[55]),D=f(D,O,k,A,y,6,s[56]),A=f(A,D,O,k,E,10,s[57]),k=f(k,A,D,O,_,15,s[58]),O=f(O,k,A,D,w,21,s[59]),D=f(D,O,k,A,h,6,s[60]),A=f(A,D,O,k,S,10,s[61]),k=f(k,A,D,O,p,15,s[62]),O=f(O,k,A,D,b,21,s[63]),a[0]=a[0]+D|0,a[1]=a[1]+O|0,a[2]=a[2]+k|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}n.MD5=a._createHelper(c),n.HmacMD5=a._createHmacHelper(c)})(Math),e.MD5})})),ar=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.WordArray,i=n.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],s=n[3],c=n[4],l=0;l<80;l++){if(l<16)o[l]=e[t+l]|0;else{var u=o[l-3]^o[l-8]^o[l-14]^o[l-16];o[l]=u<<1|u>>>31}var d=(r<<5|r>>>27)+c+o[l];l<20?d+=(i&a|~i&s)+1518500249:l<40?d+=(i^a^s)+1859775393:l<60?d+=(i&a|i&s|a&s)-1894007588:d+=(i^a^s)-899497514,c=s,s=a,a=i<<30|i>>>2,i=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(r+64>>>9<<4)+15]=n,e.sigBytes=t.length*4,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)})(),e.SHA1})})),or=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[],c=[];(function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return(e-(e|0))*4294967296|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,1/2))),c[i]=n(t.pow(r,1/3)),i++),r++})();var l=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=0;p<64;p++){if(p<16)l[p]=e[t+p]|0;else{var m=l[p-15],h=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=l[p-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[p]=h+l[p-7]+_+l[p-16]}var v=s&u^~s&d,y=r&i^r&a^i&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),S=f+x+v+c[p]+l[p],C=b+y;f=d,d=u,u=s,s=o+S|0,o=a,a=i,i=r,r=S+C|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=n.length*4,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=a._createHelper(u),n.HmacSHA256=a._createHmacHelper(u)})(Math),e.SHA256})})),sr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),or()):typeof define==`function`&&define.amd?define([`./core`,`./sha256`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.WordArray,r=t.algo,i=r.SHA256,a=r.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=i._createHelper(a),t.HmacSHA224=i._createHmacHelper(a)})(),e.SHA224})})),cr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n()):typeof define==`function`&&define.amd?define([`./core`,`./x64-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.Hasher,r=t.x64,i=r.Word,a=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];(function(){for(var e=0;e<80;e++)l[e]=s()})();var u=o.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],f=n[7],p=r.high,m=r.low,h=i.high,g=i.low,_=a.high,v=a.low,y=o.high,b=o.low,x=s.high,S=s.low,C=u.high,w=u.low,T=d.high,E=d.low,D=f.high,O=f.low,k=p,A=m,j=h,M=g,N=_,P=v,F=y,I=b,L=x,R=S,ee=C,te=w,ne=T,re=E,ie=D,ae=O,oe=0;oe<80;oe++){var se,ce,le=l[oe];if(oe<16)ce=le.high=e[t+oe*2]|0,se=le.low=e[t+oe*2+1]|0;else{var ue=l[oe-15],de=ue.high,fe=ue.low,pe=(de>>>1|fe<<31)^(de>>>8|fe<<24)^de>>>7,me=(fe>>>1|de<<31)^(fe>>>8|de<<24)^(fe>>>7|de<<25),he=l[oe-2],ge=he.high,_e=he.low,ve=(ge>>>19|_e<<13)^(ge<<3|_e>>>29)^ge>>>6,ye=(_e>>>19|ge<<13)^(_e<<3|ge>>>29)^(_e>>>6|ge<<26),z=l[oe-7],be=z.high,xe=z.low,Se=l[oe-16],Ce=Se.high,we=Se.low;se=me+xe,ce=pe+be+ +(se>>>0<me>>>0),se+=ye,ce=ce+ve+ +(se>>>0<ye>>>0),se+=we,ce=ce+Ce+ +(se>>>0<we>>>0),le.high=ce,le.low=se}var Te=L&ee^~L&ne,Ee=R&te^~R&re,De=k&j^k&N^j&N,Oe=A&M^A&P^M&P,ke=(k>>>28|A<<4)^(k<<30|A>>>2)^(k<<25|A>>>7),Ae=(A>>>28|k<<4)^(A<<30|k>>>2)^(A<<25|k>>>7),je=(L>>>14|R<<18)^(L>>>18|R<<14)^(L<<23|R>>>9),Me=(R>>>14|L<<18)^(R>>>18|L<<14)^(R<<23|L>>>9),B=c[oe],Ne=B.high,Pe=B.low,Fe=ae+Me,Ie=ie+je+ +(Fe>>>0<ae>>>0),Fe=Fe+Ee,Ie=Ie+Te+ +(Fe>>>0<Ee>>>0),Fe=Fe+Pe,Ie=Ie+Ne+ +(Fe>>>0<Pe>>>0),Fe=Fe+se,Ie=Ie+ce+ +(Fe>>>0<se>>>0),Le=Ae+Oe,Re=ke+De+ +(Le>>>0<Ae>>>0);ie=ne,ae=re,ne=ee,re=te,ee=L,te=R,R=I+Fe|0,L=F+Ie+ +(R>>>0<I>>>0)|0,F=N,I=P,N=j,P=M,j=k,M=A,A=Fe+Le|0,k=Ie+Re+ +(A>>>0<Fe>>>0)|0}m=r.low=m+A,r.high=p+k+ +(m>>>0<A>>>0),g=i.low=g+M,i.high=h+j+ +(g>>>0<M>>>0),v=a.low=v+P,a.high=_+N+ +(v>>>0<P>>>0),b=o.low=b+I,o.high=y+F+ +(b>>>0<I>>>0),S=s.low=S+R,s.high=x+L+ +(S>>>0<R>>>0),w=u.low=w+te,u.high=C+ee+ +(w>>>0<te>>>0),E=d.low=E+re,d.high=T+ne+ +(E>>>0<re>>>0),O=f.low=O+ae,f.high=D+ie+ +(O>>>0<ae>>>0)},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),t[(r+128>>>10<<5)+31]=n,e.sigBytes=t.length*4,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:1024/32});t.SHA512=n._createHelper(u),t.HmacSHA512=n._createHmacHelper(u)})(),e.SHA512})})),lr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n(),cr()):typeof define==`function`&&define.amd?define([`./core`,`./x64-core`,`./sha512`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.x64,r=n.Word,i=n.WordArray,a=t.algo,o=a.SHA512,s=a.SHA384=o.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=16,e}});t.SHA384=o._createHelper(s),t.HmacSHA384=o._createHmacHelper(s)})(),e.SHA384})})),ur=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n()):typeof define==`function`&&define.amd?define([`./core`,`./x64-core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.x64.Word,s=n.algo,c=[],l=[],u=[];(function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var r=t%5,i=(2*e+3*t)%5;e=r,t=i}for(var e=0;e<5;e++)for(var t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var a=1,s=0;s<24;s++){for(var d=0,f=0,p=0;p<7;p++){if(a&1){var m=(1<<p)-1;m<32?f^=1<<m:d^=1<<m-32}a&128?a=a<<1^113:a<<=1}u[s]=o.create(d,f)}})();var d=[];(function(){for(var e=0;e<25;e++)d[e]=o.create()})();var f=s.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var a=e[t+2*i],o=e[t+2*i+1];a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,o=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;var s=n[i];s.high^=o,s.low^=a}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,h=0,g=0;g<5;g++){var s=n[p+5*g];m^=s.high,h^=s.low}var _=d[p];_.high=m,_.low=h}for(var p=0;p<5;p++)for(var v=d[(p+4)%5],y=d[(p+1)%5],b=y.high,x=y.low,m=v.high^(b<<1|x>>>31),h=v.low^(x<<1|b>>>31),g=0;g<5;g++){var s=n[p+5*g];s.high^=m,s.low^=h}for(var S=1;S<25;S++){var m,h,s=n[S],C=s.high,w=s.low,T=c[S];T<32?(m=C<<T|w>>>32-T,h=w<<T|C>>>32-T):(m=w<<T-32|C>>>64-T,h=C<<T-32|w>>>64-T);var E=d[l[S]];E.high=m,E.low=h}var D=d[0],O=n[0];D.high=O.high,D.low=O.low;for(var p=0;p<5;p++)for(var g=0;g<5;g++){var S=p+5*g,s=n[S],k=d[S],A=d[(p+1)%5+5*g],j=d[(p+2)%5+5*g];s.high=k.high^~A.high&j.high,s.low=k.low^~A.low&j.low}var s=n[0],M=u[f];s.high^=M.high,s.low^=M.low}},_doFinalize:function(){var e=this._data,n=e.words;this._nDataBytes*8;var r=e.sigBytes*8,a=this.blockSize*32;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/a)*a>>>5)-1]|=128,e.sigBytes=n.length*4,this._process();for(var o=this._state,s=this.cfg.outputLength/8,c=s/8,l=[],u=0;u<c;u++){var d=o[u],f=d.high,p=d.low;f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,p=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,l.push(p),l.push(f)}return new i.init(l,s)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});n.SHA3=a._createHelper(f),n.HmacSHA3=a._createHmacHelper(f)})(Math),e.SHA3})})),dr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}for(var a=this._hash.words,o=d.words,p=f.words,b=s.words,x=c.words,S=l.words,C=u.words,w,T,E,D,O,k=w=a[0],A=T=a[1],j=E=a[2],M=D=a[3],N=O=a[4],P,n=0;n<80;n+=1)P=w+e[t+b[n]]|0,n<16?P+=m(T,E,D)+o[0]:n<32?P+=h(T,E,D)+o[1]:n<48?P+=g(T,E,D)+o[2]:n<64?P+=_(T,E,D)+o[3]:P+=v(T,E,D)+o[4],P|=0,P=y(P,S[n]),P=P+O|0,w=O,O=D,D=y(E,10),E=T,T=P,P=k+e[t+x[n]]|0,n<16?P+=v(A,j,M)+p[0]:n<32?P+=_(A,j,M)+p[1]:n<48?P+=g(A,j,M)+p[2]:n<64?P+=h(A,j,M)+p[3]:P+=m(A,j,M)+p[4],P|=0,P=y(P,C[n]),P=P+N|0,k=N,N=M,M=y(j,10),j=A,A=P;P=a[1]+E+M|0,a[1]=a[2]+D+N|0,a[2]=a[3]+O+k|0,a[3]=a[4]+w+A|0,a[4]=a[0]+T+j|0,a[0]=P},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,e.sigBytes=(t.length+1)*4,this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function m(e,t,n){return e^t^n}function h(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function _(e,t,n){return e&n|t&~n}function v(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}n.RIPEMD160=a._createHelper(p),n.HmacRIPEMD160=a._createHmacHelper(p)})(Math),e.RIPEMD160})})),fr=a(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(U()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){(function(){var t=e,n=t.lib.Base,r=t.enc.Utf8,i=t.algo;i.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,typeof t==`string`&&(t=r.parse(t));var n=e.blockSize,i=n*4;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,c=o.words,l=0;l<n;l++)s[l]^=1549556828,c[l]^=909522486;a.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})})()})})),pr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),or(),fr()):typeof define==`function`&&define.amd?define([`./core`,`./sha256`,`./hmac`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,a=t.algo,o=a.SHA256,s=a.HMAC,c=a.PBKDF2=r.extend({cfg:r.extend({keySize:128/32,hasher:o,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=s.create(n.hasher,e),a=i.create(),o=i.create([1]),c=a.words,l=o.words,u=n.keySize,d=n.iterations;c.length<u;){var f=r.update(t).finalize(o);r.reset();for(var p=f.words,m=p.length,h=f,g=1;g<d;g++){h=r.finalize(h),r.reset();for(var _=h.words,v=0;v<m;v++)p[v]^=_[v]}a.concat(f),l[0]++}return a.sigBytes=u*4,a}});t.PBKDF2=function(e,t,n){return c.create(n).compute(e,t)}})(),e.PBKDF2})})),mr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),ar(),fr()):typeof define==`function`&&define.amd?define([`./core`,`./sha1`,`./hmac`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,a=t.algo,o=a.MD5,s=a.EvpKDF=r.extend({cfg:r.extend({keySize:128/32,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,a=r.hasher.create(),o=i.create(),s=o.words,c=r.keySize,l=r.iterations;s.length<c;){n&&a.update(n),n=a.update(e).finalize(t),a.reset();for(var u=1;u<l;u++)n=a.finalize(n),a.reset();o.concat(n)}return o.sigBytes=c*4,o}});t.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)}})(),e.EvpKDF})})),hr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),mr()):typeof define==`function`&&define.amd?define([`./core`,`./evpkdf`],r):r(n.CryptoJS)})(e,function(e){e.lib.Cipher||function(t){var n=e,r=n.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=n.enc;s.Utf8;var c=s.Base64,l=n.algo.EvpKDF,u=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return typeof e==`string`?S:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var d=n.mode={},f=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=d.CBC=function(){var e=f.extend();e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,a=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=a}});function n(e,n,r){var i,a=this._iv;a?(i=a,this._iv=t):i=this._prevBlock;for(var o=0;o<r;o++)e[n+o]^=i[o]}return e}(),m=n.pad={},h=m.Pkcs7={pad:function(e,t){for(var n=t*4,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],s=0;s<r;s+=4)o.push(i);var c=a.create(o,r);e.concat(c)},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:h}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:128/32});var g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),_=n.format={},v=_.OpenSSL={stringify:function(e){var t,n=e.ciphertext,r=e.salt;return t=r?a.create([1398893684,1701076831]).concat(r).concat(n):n,t.toString(c)},parse:function(e){var t,n=c.parse(e),r=n.words;return r[0]==1398893684&&r[1]==1701076831&&(t=a.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},y=r.SerializableCipher=i.extend({cfg:i.extend({format:v}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),a=i.finalize(t),o=i.cfg;return g.create({ciphertext:a,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return typeof e==`string`?t.parse(e,this):e}}),b=n.kdf={},x=b.OpenSSL={execute:function(e,t,n,r,i){if(r||=a.random(64/8),i)var o=l.create({keySize:t+n,hasher:i}).compute(e,r);else var o=l.create({keySize:t+n}).compute(e,r);var s=a.create(o.words.slice(t),n*4);return o.sigBytes=t*4,g.create({key:o,iv:s,salt:r})}},S=r.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:x}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=r.kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var a=y.encrypt.call(this,e,t,i.key,r);return a.mixIn(i),a},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()})})),gr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i,r),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,a=e.slice(t,t+i);n.call(this,e,t,i,r),this._prevBlock=a}});function n(e,t,n,r){var i,a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var o=0;o<n;o++)e[t+o]^=i[o]}return t}(),e.mode.CFB})})),_r=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend();return t.Decryptor=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0);var o=a.slice(0);n.encryptBlock(o,0),a[r-1]=a[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=o[s]}}),t}(),e.mode.CTR})})),vr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function n(e){if((e>>24&255)==255){var t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}function r(e){return(e[0]=n(e[0]))===0&&(e[1]=n(e[1])),e}return t.Decryptor=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),r(o);var s=o.slice(0);n.encryptBlock(s,0);for(var c=0;c<i;c++)e[t+c]^=s[c]}}),t}(),e.mode.CTRGladman})})),yr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend();return t.Decryptor=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._keystream;i&&(a=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(a,0);for(var o=0;o<r;o++)e[t+o]^=a[o]}}),t}(),e.mode.OFB})})),br=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t}(),e.mode.ECB})})),xr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=t*4,i=r-n%r,a=n+i-1;e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},e.pad.Ansix923})})),Sr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.Iso10126={pad:function(t,n){var r=n*4,i=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},e.pad.Iso10126})})),Cr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})})),wr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.ZeroPadding={pad:function(e,t){var n=t*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){for(var t=e.words,n=e.sigBytes-1,n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding})})),Tr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})})),Er=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib.CipherParams,i=n.enc.Hex,a=n.format;a.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return r.create({ciphertext:t})}}})(),e.format.Hex})})),Dr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[];(function(){for(var e=[],t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var n=0,r=0,t=0;t<256;t++){var m=r^r<<1^r<<2^r<<3^r<<4;m=m>>>8^m&255^99,i[n]=m,a[m]=n;var h=e[n],g=e[h],_=e[g],v=e[m]*257^m*16843008;o[n]=v<<24|v>>>8,s[n]=v<<16|v>>>16,c[n]=v<<8|v>>>24,l[n]=v;var v=_*16843009^g*65537^h*257^n*16843008;u[m]=v<<24|v>>>8,d[m]=v<<16|v>>>16,f[m]=v<<8|v>>>24,p[m]=v,n?(n=h^e[e[e[_^h]]],r^=e[e[r]]):n=r=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],h=r.AES=n.extend({_doReset:function(){var e;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var t=this._keyPriorReset=this._key,n=t.words,r=t.sigBytes/4,a=((this._nRounds=r+6)+1)*4,o=this._keySchedule=[],s=0;s<a;s++)s<r?o[s]=n[s]:(e=o[s-1],s%r?r>6&&s%r==4&&(e=i[e>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[e&255]):(e=e<<8|e>>>24,e=i[e>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[e&255],e^=m[s/r|0]<<24),o[s]=o[s-r]^e);for(var c=this._invKeySchedule=[],l=0;l<a;l++){var s=a-l;if(l%4)var e=o[s];else var e=o[s-4];l<4||s<=4?c[l]=e:c[l]=u[i[e>>>24]]^d[i[e>>>16&255]]^f[i[e>>>8&255]]^p[i[e&255]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,c,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,p,a);var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,a,o,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],f=e[t+3]^n[3],p=4,m=1;m<c;m++){var h=r[l>>>24]^i[u>>>16&255]^a[d>>>8&255]^o[f&255]^n[p++],g=r[u>>>24]^i[d>>>16&255]^a[f>>>8&255]^o[l&255]^n[p++],_=r[d>>>24]^i[f>>>16&255]^a[l>>>8&255]^o[u&255]^n[p++],v=r[f>>>24]^i[l>>>16&255]^a[u>>>8&255]^o[d&255]^n[p++];l=h,u=g,d=_,f=v}var h=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[f&255])^n[p++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[l&255])^n[p++],_=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[u&255])^n[p++],v=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[d&255])^n[p++];e[t]=h,e[t+1]=g,e[t+2]=_,e[t+3]=v},keySize:256/32});t.AES=n._createHelper(h)})(),e.AES})})),Or=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib,r=n.WordArray,i=n.BlockCipher,a=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=o[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){for(var l=i[a]=[],u=c[a],n=0;n<24;n++)l[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;l[0]=l[0]<<1|l[0]>>>31;for(var n=1;n<7;n++)l[n]=l[n]>>>(n-1)*4+3;l[7]=l[7]<<5|l[7]>>>27}for(var d=this._invSubKeys=[],n=0;n<16;n++)d[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],f.call(this,4,252645135),f.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],a=this._lBlock,o=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((o^i[c])&u[c])>>>0];this._lBlock=o,this._rBlock=a^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,f.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function p(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}t.DES=i._createHelper(d);var m=a.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(e.length!==2&&e.length!==4&&e.length<6)throw Error(`Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.`);var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(r.create(t)),this._des2=d.createEncryptor(r.create(n)),this._des3=d.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=i._createHelper(m)})(),e.TripleDES})})),kr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=r.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;for(var i=0,a=0;i<256;i++){var o=i%n,s=t[o>>>2]>>>24-o%4*8&255;a=(a+r[i]+s)%256;var c=r[i];r[i]=r[a],r[a]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:256/32,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){t=(t+1)%256,n=(n+e[t])%256;var a=e[t];e[t]=e[n],e[n]=a,r|=e[(e[t]+e[n])%256]<<24-i*8}return this._i=t,this._j=n,r}t.RC4=n._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});t.RC4Drop=n._createHelper(o)})(),e.RC4})})),Ar=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],a=[],o=[],s=r.Rabbit=n.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=(e[n]<<8|e[n]>>>24)&16711935|(e[n]<<24|e[n]>>>8)&4278255360;var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var n=0;n<4;n++)c.call(this);for(var n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,u=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,d=l>>>16|u&4294901760,f=u<<16|l&65535;i[0]^=l,i[1]^=d,i[2]^=u,i[3]^=f,i[4]^=l,i[5]^=d,i[6]^=u,i[7]^=f;for(var n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=(i[r]<<8|i[r]>>>24)&16711935|(i[r]<<24|i[r]>>>8)&4278255360,e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+ +(t[0]>>>0<a[0]>>>0)|0,t[2]=t[2]+886263092+ +(t[1]>>>0<a[1]>>>0)|0,t[3]=t[3]+1295307597+ +(t[2]>>>0<a[2]>>>0)|0,t[4]=t[4]+3545052371+ +(t[3]>>>0<a[3]>>>0)|0,t[5]=t[5]+886263092+ +(t[4]>>>0<a[4]>>>0)|0,t[6]=t[6]+1295307597+ +(t[5]>>>0<a[5]>>>0)|0,t[7]=t[7]+3545052371+ +(t[6]>>>0<a[6]>>>0)|0,this._b=+(t[7]>>>0<a[7]>>>0);for(var n=0;n<8;n++){var r=e[n]+t[n],i=r&65535,s=r>>>16;o[n]=((i*i>>>17)+i*s>>>15)+s*s^((r&4294901760)*r|0)+((r&65535)*r|0)}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=n._createHelper(s)})(),e.Rabbit})})),jr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],a=[],o=[],s=r.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var i=0;i<4;i++)c.call(this);for(var i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var a=t.words,o=a[0],s=a[1],l=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,u=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,d=l>>>16|u&4294901760,f=u<<16|l&65535;r[0]^=l,r[1]^=d,r[2]^=u,r[3]^=f,r[4]^=l,r[5]^=d,r[6]^=u,r[7]^=f;for(var i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=(i[r]<<8|i[r]>>>24)&16711935|(i[r]<<24|i[r]>>>8)&4278255360,e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+ +(t[0]>>>0<a[0]>>>0)|0,t[2]=t[2]+886263092+ +(t[1]>>>0<a[1]>>>0)|0,t[3]=t[3]+1295307597+ +(t[2]>>>0<a[2]>>>0)|0,t[4]=t[4]+3545052371+ +(t[3]>>>0<a[3]>>>0)|0,t[5]=t[5]+886263092+ +(t[4]>>>0<a[4]>>>0)|0,t[6]=t[6]+1295307597+ +(t[5]>>>0<a[5]>>>0)|0,t[7]=t[7]+3545052371+ +(t[6]>>>0<a[6]>>>0)|0,this._b=+(t[7]>>>0<a[7]>>>0);for(var n=0;n<8;n++){var r=e[n]+t[n],i=r&65535,s=r>>>16;o[n]=((i*i>>>17)+i*s>>>15)+s*s^((r&4294901760)*r|0)+((r&65535)*r|0)}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=n._createHelper(s)})(),e.RabbitLegacy})})),Mr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),nr(),ir(),mr(),hr()):typeof define==`function`&&define.amd?define([`./core`,`./enc-base64`,`./md5`,`./evpkdf`,`./cipher-core`],r):r(n.CryptoJS)})(e,function(e){return(function(){var t=e,n=t.lib.BlockCipher,r=t.algo;let i=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var o={pbox:[],sbox:[]};function s(e,t){let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=t&255,o=e.sbox[0][n]+e.sbox[1][r];return o^=e.sbox[2][i],o+=e.sbox[3][a],o}function c(e,t,n){let r=t,i=n,a;for(let t=0;t<16;++t)r^=e.pbox[t],i=s(e,r)^i,a=r,r=i,i=a;return a=r,r=i,i=a,i^=e.pbox[16],r^=e.pbox[17],{left:r,right:i}}function l(e,t,n){let r=t,i=n,a;for(let t=17;t>1;--t)r^=e.pbox[t],i=s(e,r)^i,a=r,r=i,i=a;return a=r,r=i,i=a,i^=e.pbox[1],r^=e.pbox[0],{left:r,right:i}}function u(e,t,n){for(let t=0;t<4;t++){e.sbox[t]=[];for(let n=0;n<256;n++)e.sbox[t][n]=a[t][n]}let r=0;for(let a=0;a<18;a++)e.pbox[a]=i[a]^t[r],r++,r>=n&&(r=0);let o=0,s=0,l=0;for(let t=0;t<18;t+=2)l=c(e,o,s),o=l.left,s=l.right,e.pbox[t]=o,e.pbox[t+1]=s;for(let t=0;t<4;t++)for(let n=0;n<256;n+=2)l=c(e,o,s),o=l.left,s=l.right,e.sbox[t][n]=o,e.sbox[t][n+1]=s;return!0}var d=r.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words;u(o,t,e.sigBytes/4)}},encryptBlock:function(e,t){var n=c(o,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=l(o,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(d)})(),e.Blowfish})})),Nr=a(((e,t)=>{(function(n,r,i){typeof e==`object`?t.exports=e=r(U(),$n(),er(),tr(),nr(),rr(),ir(),ar(),or(),sr(),cr(),lr(),ur(),dr(),fr(),pr(),mr(),hr(),gr(),_r(),vr(),yr(),br(),xr(),Sr(),Cr(),wr(),Tr(),Er(),Dr(),Or(),kr(),Ar(),jr(),Mr()):typeof define==`function`&&define.amd?define(`./core,./x64-core,./lib-typedarrays,./enc-utf16,./enc-base64,./enc-base64url,./md5,./sha1,./sha256,./sha224,./sha512,./sha384,./sha3,./ripemd160,./hmac,./pbkdf2,./evpkdf,./cipher-core,./mode-cfb,./mode-ctr,./mode-ctr-gladman,./mode-ofb,./mode-ecb,./pad-ansix923,./pad-iso10126,./pad-iso97971,./pad-zeropadding,./pad-nopadding,./format-hex,./aes,./tripledes,./rc4,./rabbit,./rabbit-legacy,./blowfish`.split(`,`),r):n.CryptoJS=r(n.CryptoJS)})(e,function(e){return e})})),Pr=a(((e,t)=>{t.exports=n;function n(e,t){for(var n=Array(arguments.length-1),r=0,i=2,a=!0;i<arguments.length;)n[r++]=arguments[i++];return new Promise(function(i,o){n[r]=function(e){if(a)if(a=!1,e)o(e);else{for(var t=Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];i.apply(null,t)}};try{e.apply(t||null,n)}catch(e){a&&(a=!1,o(e))}})}})),Fr=a((e=>{var t=e;t.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&e.charAt(t)===`=`;)++n;return Math.ceil(e.length*3)/4-n};for(var n=Array(64),r=Array(123),i=0;i<64;)r[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;t.encode=function(e,t,r){for(var i=null,a=[],o=0,s=0,c;t<r;){var l=e[t++];switch(s){case 0:a[o++]=n[l>>2],c=(l&3)<<4,s=1;break;case 1:a[o++]=n[c|l>>4],c=(l&15)<<2,s=2;break;case 2:a[o++]=n[c|l>>6],a[o++]=n[l&63],s=0;break}o>8191&&((i||=[]).push(String.fromCharCode.apply(String,a)),o=0)}return s&&(a[o++]=n[c],a[o++]=61,s===1&&(a[o++]=61)),i?(o&&i.push(String.fromCharCode.apply(String,a.slice(0,o))),i.join(``)):String.fromCharCode.apply(String,a.slice(0,o))};var a=`invalid encoding`;t.decode=function(e,t,n){for(var i=n,o=0,s,c=0;c<e.length;){var l=e.charCodeAt(c++);if(l===61&&o>1)break;if((l=r[l])===void 0)throw Error(a);switch(o){case 0:s=l,o=1;break;case 1:t[n++]=s<<2|(l&48)>>4,s=l,o=2;break;case 2:t[n++]=(s&15)<<4|(l&60)>>2,s=l,o=3;break;case 3:t[n++]=(s&3)<<6|l,o=0;break}}if(o===1)throw Error(a);return n-i},t.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}})),Ir=a(((e,t)=>{t.exports=n;function n(){this._listeners={}}n.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},n.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}})),Lr=a(((e,t)=>{t.exports=n(n);function n(e){return typeof Float32Array<`u`?(function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=n[3]===128;function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3]}function a(e,r,i){t[0]=e,r[i]=n[3],r[i+1]=n[2],r[i+2]=n[1],r[i+3]=n[0]}e.writeFloatLE=r?i:a,e.writeFloatBE=r?a:i;function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.readFloatLE=r?o:s,e.readFloatBE=r?s:o})():(function(){function t(e,t,n,r){var i=+(t<0);if(i&&(t=-t),t===0)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var a=Math.floor(Math.log(t)/Math.LN2),o=Math.round(t*2**-a*8388608)&8388607;e((i<<31|a+127<<23|o)>>>0,n,r)}}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,i);function n(e,t,n){var r=e(t,n),i=(r>>31)*2+1,a=r>>>23&255,o=r&8388607;return a===255?o?NaN:i*(1/0):a===0?i*1401298464324817e-60*o:i*2**(a-150)*(o+8388608)}e.readFloatLE=n.bind(null,a),e.readFloatBE=n.bind(null,o)})(),typeof Float64Array<`u`?(function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=n[7]===128;function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3],r[i+4]=n[4],r[i+5]=n[5],r[i+6]=n[6],r[i+7]=n[7]}function a(e,r,i){t[0]=e,r[i]=n[7],r[i+1]=n[6],r[i+2]=n[5],r[i+3]=n[4],r[i+4]=n[3],r[i+5]=n[2],r[i+6]=n[1],r[i+7]=n[0]}e.writeDoubleLE=r?i:a,e.writeDoubleBE=r?a:i;function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.readDoubleLE=r?o:s,e.readDoubleBE=r?s:o})():(function(){function t(e,t,n,r,i,a){var o=+(r<0);if(o&&(r=-r),r===0)e(0,i,a+t),e(1/r>0?0:2147483648,i,a+n);else if(isNaN(r))e(0,i,a+t),e(2146959360,i,a+n);else if(r>17976931348623157e292)e(0,i,a+t),e((o<<31|2146435072)>>>0,i,a+n);else{var s;if(r<22250738585072014e-324)s=r/5e-324,e(s>>>0,i,a+t),e((o<<31|s/4294967296)>>>0,i,a+n);else{var c=Math.floor(Math.log(r)/Math.LN2);c===1024&&(c=1023),s=r*2**-c,e(s*4503599627370496>>>0,i,a+t),e((o<<31|c+1023<<20|s*1048576&1048575)>>>0,i,a+n)}}}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,i,4,0);function n(e,t,n,r,i){var a=e(r,i+t),o=e(r,i+n),s=(o>>31)*2+1,c=o>>>20&2047,l=4294967296*(o&1048575)+a;return c===2047?l?NaN:s*(1/0):c===0?s*5e-324*l:s*2**(c-1075)*(l+4503599627370496)}e.readDoubleLE=n.bind(null,a,0,4),e.readDoubleBE=n.bind(null,o,4,0)})(),e}function r(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function i(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=e&255}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}})),Rr=a(((t,n)=>{n.exports=r;function r(t){try{if(typeof e!=`function`)return null;var n=e(t);return n&&(n.length||Object.keys(n).length)?n:null}catch{return null}}})),zr=a((e=>{var t=e,n=`�`;t.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)n=e.charCodeAt(r),n<128?t+=1:n<2048?t+=2:(n&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320?(++r,t+=4):t+=3;return t},t.read=function(e,t,r){if(r-t<1)return``;for(var i=``,a=t;a<r;){var o=e[a++];if(o<=127)i+=String.fromCharCode(o);else if(o>=192&&o<224){var s=(o&31)<<6|e[a++]&63;i+=s>=128?String.fromCharCode(s):n}else if(o>=224&&o<240){var c=(o&15)<<12|(e[a++]&63)<<6|e[a++]&63;i+=c>=2048?String.fromCharCode(c):n}else if(o>=240){var l=(o&7)<<18|(e[a++]&63)<<12|(e[a++]&63)<<6|e[a++]&63;l<65536||l>1114111?i+=n:(l-=65536,i+=String.fromCharCode(55296+(l>>10)),i+=String.fromCharCode(56320+(l&1023)))}}return i},t.write=function(e,t,n){for(var r=n,i,a,o=0;o<e.length;++o)i=e.charCodeAt(o),i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&((a=e.charCodeAt(o+1))&64512)==56320?(i=65536+((i&1023)<<10)+(a&1023),++o,t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128);return n-r}})),Br=a(((e,t)=>{t.exports=n;function n(e,t,n){var r=n||8192,i=r>>>1,a=null,o=r;return function(n){if(n<1||n>i)return e(n);o+n>r&&(a=e(r),o=0);var s=t.call(a,o,o+=n);return o&7&&(o=(o|7)+1),s}}})),Vr=`cosmiframe`,Hr=`cosmiframe_keystorechange`,Ur=class{_mutable;actions;_env;logger;constructor(){this._mutable={state:H.Init}}get env(){return this._env}setEnv(e){this._env=e}setActions=e=>{this.actions=e};get isMobile(){return this.env?.device===`mobile`}get mutable(){return this._mutable}get state(){return this.mutable.state}get isInit(){return this.state===`Init`}get isDone(){return this.state===`Done`}get isError(){return this.state===`Error`}get isPending(){return this.state===`Pending`}get data(){return this.mutable.data}get message(){return this.mutable.message}setState(e){this.logger?.debug(`[State Change] ${this.state} (${this.walletStatus}) -> ${e} (${this.chainName}/${this.walletName})`),this._mutable.state=e,this.actions?.state?.(e)}setData(e){this._mutable.data=e,this.actions?.data?.(e)}setMessage(e){this.logger?.debug(`[Message Set] ${e} (${this.chainName}/${this.walletName})`),this._mutable.message=e,this.actions?.message?.(e)}reset(){this.setData(void 0),this.setMessage(void 0),this.setState(H.Init)}get walletStatus(){return Dn(this.state,this.message)}get isWalletOnceConnect(){return this.isWalletConnected||this.isWalletError}get isWalletConnecting(){return this.walletStatus===`Connecting`}get isWalletConnected(){return this.walletStatus===`Connected`}get isWalletDisconnected(){return this.walletStatus===`Disconnected`}get isWalletRejected(){return this.walletStatus===`Rejected`}get isWalletNotExist(){return this.walletStatus===`NotExist`}get isWalletError(){return this.walletStatus===`Error`}},Wr=class extends Ur{clientMutable={state:H.Init};emitter;_walletInfo;callbacks;session;walletConnectOptions;isActive=!1;throwErrors=!1;constructor(e){super(),this._walletInfo=e}get appUrl(){return this.client?.appUrl}get qrUrl(){return this.client?.qrUrl}activate(){this.isActive=!0}inactivate(){this.isActive=!1}get client(){return this.clientMutable?.data}initingClient(){this.clientMutable.state=H.Pending,this.clientMutable.message=void 0,this.clientMutable.data=void 0}initClientDone(e){this.clientMutable.data=e,this.clientMutable.state=H.Done,this.clientMutable.message=void 0}initClientError(e){this.logger?.error(`${this.walletPrettyName} initClientError: ${e?.message}`),this.clientMutable.message=e?.message,this.clientMutable.state=H.Error,this.isModeExtension?this.setClientNotExist():this.setError(`InitClientError: ${e.message}`)}get walletInfo(){return this._walletInfo}get isModeExtension(){return this.walletInfo.mode===`extension`}get isModeWalletConnect(){return this.walletInfo.mode===`wallet-connect`}get downloadInfo(){let e=this.walletInfo.downloads||[];return e=e.filter(e=>e.device===this.env?.device||!e.device),e.length===1||(e=e.filter(e=>e.os===this.env?.os||!e.os),e.length===1)||(e=e.filter(e=>e.browser===this.env?.browser||!e.browser)),e[0]}get walletName(){return this.walletInfo.name}get walletPrettyName(){return this.walletInfo.prettyName}get rejectMessageSource(){return typeof this.walletInfo.rejectMessage==`string`?this.walletInfo.rejectMessage:this.walletInfo.rejectMessage?.source}get rejectMessageTarget(){if(typeof this.walletInfo.rejectMessage!=`string`)return this.walletInfo.rejectMessage?.target}get rejectCode(){return this.walletInfo.rejectCode}rejectMatched(e){return this.rejectMessageSource&&e.message===this.rejectMessageSource||this.rejectCode&&e.code===this.rejectCode}updateCallbacks(e){this.callbacks={...this.callbacks,...e}}_disconnect=async(e,t)=>{await this.callbacks?.beforeDisconnect?.(),await this.client?.disconnect?.(t),this.clientMutable.state!==H.Error&&this.reset(),this.walletName!==`cosmiframe`&&window.localStorage.removeItem(`cosmos-kit@2:core//current-wallet`),e&&(this.emitter?.emit(`sync_disconnect`,this.chainName),this.logger?.debug("[WALLET EVENT] Emit `sync_disconnect`")),await this.callbacks?.afterDisconnect?.()};disconnect=async(e,t)=>{await this._disconnect(e,t)};setClientNotExist(e){let t=e===void 0?Error():e;t.message=jn.message,this.setError(t)}setRejected(e){let t=e===void 0?Error():e;t.message=Mn.message,this.setError(t)}setError(e){let t=typeof e==`string`||e===void 0?Error(e):e;if(this.setState(H.Error),this.setMessage(t.message),this.throwErrors===!0||this.throwErrors===`connect_only`&&t.name===`ConnectError`)throw t}connect=async e=>{await this.callbacks?.beforeConnect?.();let t=typeof this.walletInfo.mobileDisabled==`boolean`?this.walletInfo.mobileDisabled:this.walletInfo.mobileDisabled();if(this.isMobile&&t){this.setError(new wn(`This wallet is not supported on mobile, please use desktop browsers.`));return}e&&(this.emitter?.emit(`sync_connect`,this.chainName),this.logger?.debug(`[Event Emit] \`sync_connect\` (${this.chainName}/${this.walletName})`));try{if(!this.client&&(this.setState(H.Pending),this.setMessage(`InitClient`),await this.initClient(this.walletInfo.mode===`wallet-connect`?this.walletConnectOptions:void 0),this.emitter?.emit(`broadcast_client`,this.client),this.logger?.debug("[WALLET EVENT] Emit `broadcast_client`"),!this.client)){this.setClientNotExist(new wn);return}await this.update()}catch(e){this.setError(new wn(e.message))}await this.callbacks?.afterConnect?.()}},Gr=class extends Wr{mainWallet;chainRecord;_rpcEndpoint;_restEndpoint;connectChains;offlineSigner;namespace=`cosmos`;preferredSignType;constructor(e,t){super(e),this.chainRecord=t,this.preferredSignType=t.clientOptions?.preferredSignType||`amino`}get chain(){return this.chainRecord.chain}get assetList(){return this.chainRecord.assetList}get isTestNet(){return this.chainName.includes(`testnet`)}get preferredEndpoints(){return this.chainRecord.preferredEndpoints}get rpcEndpoints(){return this.preferredEndpoints?.rpc||[]}get restEndpoints(){return this.preferredEndpoints?.rest||[]}get isLazy(){return this.preferredEndpoints.isLazy}addEndpoints(e){this.chainRecord.preferredEndpoints={isLazy:e?.isLazy??this.preferredEndpoints?.isLazy,rpc:[...e?.rpc||[],...this.preferredEndpoints?.rpc||[]],rest:[...e?.rest||[],...this.preferredEndpoints?.rest||[]]}}get chainName(){return this.chainRecord.name}get chainLogoUrl(){return this.assetList?.assets[0]?.logo_URIs?.svg||this.assetList?.assets[0]?.logo_URIs?.png||void 0}get stargateOptions(){return this.chainRecord.clientOptions?.stargate}get signingStargateOptions(){return this.chainRecord.clientOptions?.signingStargate||this.chainRecord.clientOptions?.stargate}get signingCosmwasmOptions(){return this.chainRecord.clientOptions?.signingCosmwasm}get assets(){return this.assetList?.assets}get chainId(){return this.chain?.chain_id}get cosmwasmEnabled(){return this.chain?.codebase?.cosmwasm_enabled}get username(){return this.data?.username}get address(){return this.data?.address}setData(e){this.logger?.debug(`[Data Change] ${JSON.stringify(this.data)} -> ${JSON.stringify(e)} (${this.chainName}/${this.walletName})`),this._mutable.data=e,this.actions?.data?.(e);let t=window.localStorage.getItem(`cosmos-kit@2:core//accounts`),n=t?JSON.parse(t):[];e===void 0?n=n.filter(e=>e.chainId!==this.chainId||e.namespace!==this.namespace):(n=n.filter(e=>e.chainId!==this.chainId||e.namespace!==this.namespace),n.push(e)),window?.localStorage.setItem(`cosmos-kit@2:core//accounts`,JSON.stringify(n)),this.session?.update()}initClient(e){throw Error(`initClient not implemented`)}async update(e={connect:!0}){this.setState(H.Pending),this.setMessage(void 0);try{e.connect&&(this.connectChains?await this.connectChains():await this?.client?.connect?.(this.chainId));let t;try{this.logger?.debug(`Fetching ${this.walletName} ${this.chainId} account.`),t=await this?.client?.getSimpleAccount(this.chainId)}catch(e){if(this.rejectMatched(e)){this.logger?.debug(`Fetching rejected.`),this.setRejected(new wn);return}if(this.client&&this?.client?.addChain)this.logger?.debug(`Going to add chain ${this.chainId}`),await this.client.addChain(this.chainRecord),t=await this.client.getSimpleAccount(this.chainId);else throw e}this.setData(t),this.setState(H.Done),this.setMessage(void 0)}catch(e){e&&this.rejectMatched(e)?this.setRejected(new wn):this.setError(new wn(e.message))}!this.isWalletRejected&&this.walletName!==`cosmiframe`&&window?.localStorage.setItem(`cosmos-kit@2:core//current-wallet`,this.walletName)}getRpcEndpoint=async e=>{let{getIsLazy:t}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=t(void 0,this.isLazy,this._rpcEndpoint?.isLazy,e,this.logger);if(n)return this._rpcEndpoint||this.rpcEndpoints[0]||Promise.reject(`No endpoint available.`);let{isValidEndpoint:r}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);if(this._rpcEndpoint&&await r(this._rpcEndpoint,`rpc`,n,this.logger))return this._rpcEndpoint;let{getFastestEndpoint:i}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);return this._rpcEndpoint=await i(this.rpcEndpoints,`rpc`,this.logger),this._rpcEndpoint};getRestEndpoint=async e=>{let{getIsLazy:t}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=t(void 0,this.isLazy,this._restEndpoint?.isLazy,e,this.logger);if(n)return this._restEndpoint||this.restEndpoints[0]||Promise.reject(`No endpoint available.`);let r=`rest`,{isValidEndpoint:i}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);if(this._restEndpoint&&await i(this._restEndpoint,r,n,this.logger))return this._restEndpoint;let{getFastestEndpoint:a}=await import(`./utils-DLhgweWO.js`).then(e=>e.t);return this._restEndpoint=await a(this.restEndpoints,r,this.logger),this._restEndpoint};getStargateClient=async()=>{let e=await this.getRpcEndpoint(),{StargateClient:t}=await import(`./build-CcaOMxqz.js`).then(e=>i(e.t()));return t.connect(e,this.stargateOptions)};getCosmWasmClient=async()=>{let e=await this.getRpcEndpoint(),{CosmWasmClient:t}=await import(`./build-Dzd_3NK0.js`).then(e=>i(e.default));return t.connect(e)};getNameService=async()=>{let e=await this.getCosmWasmClient(),{getNameServiceRegistryFromChainName:t}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=t(this.chainName),{NameService:r}=await import(`./name-service-DjQ9v_M-.js`).then(e=>e.t);return new r(e,n)};async initOfflineSigner(e){if(this.client===void 0)throw Error(`WalletClient is not initialized`);e&&(this.preferredSignType=e),this.offlineSigner=await this.client.getOfflineSigner(this.chainId,this.preferredSignType)}getSigningStargateClient=async()=>{let e=await this.getRpcEndpoint();this.offlineSigner||await this.initOfflineSigner();let{SigningStargateClient:t}=await import(`./build-CcaOMxqz.js`).then(e=>i(e.t()));return t.connectWithSigner(e,this.offlineSigner,this.signingStargateOptions)};getSigningCosmWasmClient=async()=>{let e=await this.getRpcEndpoint();this.offlineSigner||await this.initOfflineSigner();let{SigningCosmWasmClient:t}=await import(`./build-Dzd_3NK0.js`).then(e=>i(e.default));return t.connectWithSigner(e,this.offlineSigner,this.signingCosmwasmOptions)};getSigningClient=async e=>{switch(e){case`stargate`:return await this.getSigningStargateClient();case`cosmwasm`:return await this.getSigningCosmWasmClient();default:return this.getSigningStargateClient()}};estimateFee=async(e,t,n,r)=>{if(!this.address)throw Error(`Address is required to estimate fee. Try connect to fetch address.`);let a;switch(t){case`stargate`:a=this.signingStargateOptions?.gasPrice;break;case`cosmwasm`:a=this.signingCosmwasmOptions?.gasPrice;break;default:a=this.signingStargateOptions?.gasPrice;break}if(!a)throw Error(`Gas price must be set in the client options when auto gas is used.`);let o=await(await this.getSigningClient(t)).simulate(this.address,e,n),{calculateFee:s}=await import(`./build-CcaOMxqz.js`).then(e=>i(e.t()));return s(Math.round(o*(r||1.4)),a)};sign=async(e,t,n,r)=>{if(!this.address)throw Error(`Address is required to estimate fee. Try connect to fetch address.`);let i=await this.getSigningClient(r),a;return a=t===void 0||typeof t==`number`?await this.estimateFee(e,r,n,t):t,await i.sign(this.address,e,a,n||``)};broadcast=async(e,t)=>{let n=await this.getSigningClient(t),{TxRaw:r}=await import(`./tx-DygTArs0.js`).then(e=>i(e.default)),a=r.encode(e).finish(),o,s;switch(t){case`stargate`:o=this.signingStargateOptions?.broadcastTimeoutMs,s=this.signingStargateOptions?.broadcastPollIntervalMs;break;case`cosmwasm`:o=this.signingCosmwasmOptions?.broadcastTimeoutMs,s=this.signingCosmwasmOptions?.broadcastPollIntervalMs;break;default:o=this.signingStargateOptions?.broadcastTimeoutMs,s=this.signingStargateOptions?.broadcastPollIntervalMs;break}return n.broadcastTx(a,o,s)};signAndBroadcast=async(e,t,n,r)=>{let i=await this.sign(e,t,n,r);return this.broadcast(i,r)}},Kr=i(I()),qr=class extends Wr{_chainWalletMap;preferredEndpoints;ChainWallet;constructor(e,t){super(e),this.ChainWallet=t,this.emitter=new Kr.default,this.emitter.on(`broadcast_client`,e=>{this.logger?.debug(`[Event Fired] \`broadcast_client\` (${this.walletName})`),this.chainWalletMap?.forEach(t=>{t.initClientDone(e)})}),this.emitter.on(`broadcast_env`,e=>{this.logger?.debug(`[Event Fired] \`broadcast_env\` (${this.walletName})`),this.chainWalletMap?.forEach(t=>{t.setEnv(e)})}),this.emitter.on(`sync_connect`,async e=>{this.logger?.debug(`[Event Fired] \`sync_connect\` (${this.walletName})`),await this.connectAll(!0,e),this.update()}),this.emitter.on(`sync_disconnect`,async e=>{this.logger?.debug(`[Event Fired] \`sync_disconnect\` (${this.walletName})`),await this.disconnectAll(!0,e),this.reset()}),this.emitter.on(`reset`,e=>{this.logger?.debug(`[Event Fired] \`reset\` (${this.walletName})`),e.forEach(e=>Array.from(this.chainWalletMap.values()).find(t=>t.chainId===e)?.reset())})}initingClient(){this.clientMutable.state=H.Pending,this.clientMutable.message=void 0,this.clientMutable.data=void 0,this.actions?.clientState?.(H.Pending),this.actions?.clientMessage?.(void 0),this.chainWalletMap?.forEach(e=>{e.initingClient()})}initClientDone(e){this.clientMutable.data=e,this.clientMutable.state=H.Done,this.clientMutable.message=void 0,this.actions?.clientState?.(H.Done),this.actions?.clientMessage?.(void 0),this.chainWalletMap?.forEach(t=>{t.initClientDone(e)})}initClientError(e){if(this.clientMutable.message=e?.message,this.clientMutable.state=H.Error,this.actions?.clientState?.(H.Error),this.actions?.clientMessage?.(e?.message),this.chainWalletMap?.forEach(t=>{t.initClientError(e)}),this.throwErrors===!0)throw Error(this.clientMutable.message)}onSetChainsDone(){}makeFinalEndpoints(e){let t=e.name.includes(`testnet`);return{isLazy:e.preferredEndpoints?.isLazy,rpc:[...e.preferredEndpoints?.rpc||[],...this.preferredEndpoints?.[e.name]?.rpc||[],...e.chain?.apis?.rpc?.map(e=>e.address)||[],t?`https://rpc.testcosmos.directory/${e.name}`:`https://rpc.cosmos.directory/${e.name}`],rest:[...e.preferredEndpoints?.rest||[],...this.preferredEndpoints?.[e.name]?.rest||[],...e.chain?.apis?.rest?.map(e=>e.address)||[],t?`https://rest.testcosmos.directory/${e.name}`:`https://rest.cosmos.directory/${e.name}`]}}addEnpoints(e){this.getChainWalletList(!1).forEach(t=>{t.addEndpoints(e[t.chainName])})}setChains(e,t=!0){(t||!this._chainWalletMap)&&(this._chainWalletMap=new Map),e.forEach(e=>{let t=new this.ChainWallet(this.walletInfo,{...e,preferredEndpoints:this.makeFinalEndpoints(e)});t.mainWallet=this,t.emitter=this.emitter,t.logger=this.logger,t.throwErrors=this.throwErrors,t.session=this.session,t.walletConnectOptions=this.walletConnectOptions,t.initClient=this.initClient,this._chainWalletMap.set(e.name,t)}),this.onSetChainsDone()}get chainWalletMap(){return this._chainWalletMap}getChainWallet=e=>this.chainWalletMap?.get(e);getChainWalletList=(e=!0)=>{let t=Array.from(this.chainWalletMap.values());return e?t.filter(e=>e.isActive):t};getGlobalStatusAndMessage=(e=!0)=>{let t=this.getChainWalletList(e),n=t.find(e=>e.isWalletNotExist);return n?[n.walletStatus,n.message]:(n=t.find(e=>e.isWalletConnecting),n?[Cn.Connecting,void 0]:(n=t.find(e=>e.isWalletDisconnected),n?[Cn.Disconnected,`Exist disconnected wallets`]:(n=t.find(e=>e.isError||e.isWalletRejected),n?[n.walletStatus,n.message]:[Cn.Connected,void 0])))};async update(){if(this.walletStatus===`NotExist`)return window.localStorage.removeItem(`cosmos-kit@2:core//current-wallet`);this.setData(void 0),this.setMessage(void 0),this.setState(H.Done),this.activate(),this.walletName!==`cosmiframe`&&window?.localStorage.setItem(`cosmos-kit@2:core//current-wallet`,this.walletName)}reset(){this.setData(void 0),this.setMessage(void 0),this.setState(H.Init),this.inactivate()}async connectAll(e=!0,t){let n=this.getChainWalletList(e);if(!(n.length>0&&n.every(e=>e.isModeWalletConnect&&e.connectChains)))for(let e of n)e.chainName!==t&&await e.connect()}async disconnectAll(e=!0,t,n){let r=this.getChainWalletList(e);for(let e of r)e.chainName!==t&&await e.disconnect(!1,n)}},Jr=class extends Gr{constructor(e,t){super(e,t)}},Yr=class{cosmiframe;constructor(e){this.cosmiframe=e}async getSimpleAccount(...e){return await this.cosmiframe.p.getSimpleAccount(...e)}async connect(...e){return await this.cosmiframe.p.connect(...e)}async enable(...e){await this.cosmiframe.p.enable(...e)}async suggestToken(...e){await this.cosmiframe.p.suggestToken(...e)}async addChain(...e){let t=e[0];t&&`clientOptions`in t&&(t={...t,clientOptions:{}},e[0]=t),await this.cosmiframe.p.addChain(...e)}async getAccount(...e){return await this.cosmiframe.p.getAccount(...e)}getOfflineSigner(e,t){return t===`direct`?this.getOfflineSignerDirect(e):this.getOfflineSignerAmino(e)}getOfflineSignerAmino(e){return this.cosmiframe.getOfflineSignerAmino(e)}getOfflineSignerDirect(e){return this.cosmiframe.getOfflineSignerDirect(e)}async sign(...e){return await this.cosmiframe.p.sign(...e)}async signAmino(...e){return await this.cosmiframe.p.signAmino(...e)}async signDirect(...e){return await this.cosmiframe.p.signDirect(...e)}async signArbitrary(...e){return await this.cosmiframe.p.signArbitrary(...e)}async getEnigmaPubKey(...e){return await this.cosmiframe.p.getEnigmaPubKey(...e)}async getEnigmaTxEncryptionKey(...e){return await this.cosmiframe.p.getEnigmaTxEncryptionKey(...e)}async enigmaEncrypt(...e){return await this.cosmiframe.p.enigmaEncrypt(...e)}async enigmaDecrypt(...e){return await this.cosmiframe.p.enigmaDecrypt(...e)}async sendTx(...e){return await this.cosmiframe.p.sendTx(...e)}},Xr=Object.defineProperty,Zr=(e,t,n)=>t in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qr=(e,t)=>Xr(e,`name`,{value:t,configurable:!0}),$r=(e,t,n)=>(Zr(e,typeof t==`symbol`?t:t+``,n),n),ei=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},ti=(e,t,n)=>(ei(e,t,`read from private field`),n?n.call(e):t.get(e)),ni=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},ri=(e,t,n,r)=>(ei(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ii=class extends Error{constructor(e){super(e),this.name=`CosmiframeTimeoutError`}};Qr(ii,`CosmiframeTimeoutError`);var ai=ii,oi=Qr((e,t,n)=>new Promise((r,i)=>{let a=null,o=In(),s=Qr(({origin:e,source:n,data:c})=>{!li(t,e)||n!==window.parent||c.id!==o||(window.removeEventListener(`message`,s),a!==null&&clearTimeout(a),c.type===`success`?r({result:c.response,origin:e}):i(Error(c.error)))},`listener`);window.addEventListener(`message`,s);try{let t={...e,id:o};window.parent.postMessage(t,`*`)}catch(e){window.removeEventListener(`message`,s),i(e)}n&&(a=setTimeout(()=>{window.removeEventListener(`message`,s),i(new ai(`Timed out after ${n}ms waiting for parent to respond.`))},n))}),`callParentMethod`),si=Qr(e=>{if(!e||e.type===`error`)return{type:`error`,error:e&&e.type===`error`&&e.error||`Handled by outer wallet.`};if(e.type===`success`)return{type:`success`,response:e.value}},`processOverrideHandler`),ci=Qr(()=>typeof window<`u`&&window.self!==window.parent,`isInIframe`),li=Qr((e,t)=>e.some(e=>e===`*`||typeof e==`string`&&t===e||e instanceof RegExp&&e.test(t)),`isOriginAllowed`),ui,di=class{constructor(e,t){$r(this,`chainId`),ni(this,ui,void 0),this.chainId=e,ri(this,ui,t)}async getAccounts(){return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`direct`},ti(this,ui))).result}async signDirect(e,t){return(await oi({method:`signDirect`,params:[e,t],chainId:this.chainId,signerType:`direct`},ti(this,ui))).result}};ui=new WeakMap,Qr(di,`CosmiframeDirectSigner`);var fi=di,pi,mi=class{constructor(e,t){$r(this,`chainId`),ni(this,pi,void 0),this.chainId=e,ri(this,pi,t)}async getAccounts(){return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`amino`},ti(this,pi))).result}async signAmino(e,t){return(await oi({method:`signAmino`,params:[e,t],chainId:this.chainId,signerType:`amino`},ti(this,pi))).result}};pi=new WeakMap,Qr(mi,`CosmiframeAminoSigner`);var hi=mi,gi,_i=class{constructor(e,t){$r(this,`chainId`),ni(this,gi,void 0),this.chainId=e,ri(this,gi,t)}async getAccounts(){try{return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`amino`},ti(this,gi))).result}catch{return(await oi({method:`getAccounts`,params:[],chainId:this.chainId,signerType:`direct`},ti(this,gi))).result}}async signDirect(e,t){return(await oi({method:`signDirect`,params:[e,t],chainId:this.chainId,signerType:`direct`},ti(this,gi))).result}async signAmino(e,t){return(await oi({method:`signAmino`,params:[e,t],chainId:this.chainId,signerType:`amino`},ti(this,gi))).result}};gi=new WeakMap,Qr(_i,`CosmiframeEitherSigner`);var vi=_i,yi;(function(e){e.IsCosmiframe=`isCosmiframe`,e.GetMetadata=`getMetadata`})(yi||={});var bi,xi=class{constructor(e){if(ni(this,bi,void 0),$r(this,`p`),!e.length)throw Error(`You must explicitly allow parent origins.`);if(e.includes(`*`))throw Error("It is very unsafe to allow all origins because a controlling app has the power to manipulate messages before they are signed. If you really want to do this, pass in `UNSAFE_ALLOW_ANY_ORIGIN`.");ri(this,bi,e.includes(`UNSAFE_ALLOW_ANY_ORIGIN`)?[`*`]:[...e]),this.p=new Proxy({getEnigmaUtils:e=>({getPubkey:()=>this.p.getEnigmaPubKey(e),decrypt:(...t)=>this.p.enigmaDecrypt(e,...t),encrypt:(...t)=>this.p.enigmaEncrypt(e,...t),getTxEncryptionKey:(...t)=>this.p.getEnigmaTxEncryptionKey(e,...t)})},{get:(e,t)=>t in e&&typeof e[t]!=`function`?e[t]:(...n)=>t in e&&typeof e[t]==`function`?e[t](...n):this.callParentMethod({method:t.toString(),params:n}).then(({result:e})=>e)})}callParentMethod(e,t){return oi(e,ti(this,bi),t)}async isReady(){if(!ci())return!1;try{let{origin:e,result:t}=await this.callParentMethod({internal:!0,method:yi.IsCosmiframe,params:[]},500);return e||t}catch(e){if(e instanceof ai)return!1;throw e}}async getMetadata(){return(await this.callParentMethod({internal:!0,method:yi.GetMetadata,params:[]},500)).result}getKeplrClient(){let e=new Proxy({version:`cosmiframe`,mode:`extension`,defaultOptions:{},getOfflineSigner:this.getOfflineSigner.bind(this),getOfflineSignerOnlyAmino:this.getOfflineSignerAmino.bind(this),getOfflineSignerAuto:e=>Promise.resolve(this.getOfflineSigner(e)),getEnigmaUtils:t=>({getPubkey:()=>e.getEnigmaPubKey(t),decrypt:(...n)=>e.enigmaDecrypt(t,...n),encrypt:(...n)=>e.enigmaEncrypt(t,...n),getTxEncryptionKey:(...n)=>e.getEnigmaTxEncryptionKey(t,...n)})},{get:(e,t)=>t in e&&typeof e[t]!=`function`?e[t]:(...n)=>t in e&&typeof e[t]==`function`?e[t](...n):this.callParentMethod({method:t.toString(),params:n}).then(({result:e})=>e)});return e}getOfflineSigner(e){return new vi(e,ti(this,bi))}getOfflineSignerAmino(e){return new hi(e,ti(this,bi))}getOfflineSignerDirect(e){return new fi(e,ti(this,bi))}static listen(e){let{iframe:t,target:n,getOfflineSignerDirect:r,getOfflineSignerAmino:i,nonSignerOverrides:a,signerOverrides:o,origins:s,metadata:c}=e,l=s?.length?s:[`*`],u={[yi.IsCosmiframe]:()=>!0,[yi.GetMetadata]:()=>c||null},d=Qr(async({source:e,origin:s,data:c})=>{if(!t.contentWindow)throw Error(`Iframe contentWindow does not exist.`);if(e!==t.contentWindow||!li(l,s)||!c||typeof c!=`object`||!(`id`in c)||!(`method`in c)||!(`params`in c))return;let{id:d,params:f,chainId:p,signType:m,internal:h}=c,{method:g,signerType:_}=c;_||=m,g=g.replace(/^signer:/,``);let v;try{if(h){if(typeof u[g]!=`function`)throw Error(`Unknown internal method: ${g}`);v={type:`success`,response:await u[g](...f)}}else if(_){if(!p)throw Error(`Missing chainId in signer message request`);let e=typeof o==`function`?await o(p):o;if(e&&g in e){let t=si(await e[g](...f));t&&(v=t)}if(!v){let e=_===`direct`?await r(p):await i(p);if(!(g in e)||typeof e[g]!=`function`)throw Error(`No ${_} signer method '${g}' for chain ID '${p}'.`);v={type:`success`,response:await e[g](...f)}}}else{let e=typeof a==`function`?await a():a;if(e&&g in e){let t=si(await e[g](...f));t&&(v=t)}if(!v){if(!(g in n)||typeof n[g]!=`function`)throw Error(`No method '${g}' on target.`);v={type:`success`,response:await n[g](...f)}}}}catch(e){v={type:`error`,error:e instanceof Error?e.message:`${e}`}}t.contentWindow?.postMessage({...v,id:d},s)},`listener`);return window.addEventListener(`message`,d),()=>window.removeEventListener(`message`,d)}};bi=new WeakMap,Qr(xi,`Cosmiframe`);var Si=xi,Ci=class extends qr{constructor(e){super(e,Jr)}get walletInfo(){return this._walletInfo}async initClient(){this.initingClient();let e=new Si(this.walletInfo.allowedParentOrigins);if(!await e.isReady()){this.initClientError(Error(`Failed to detect Cosmiframe parent of allowed origin wrapping this app in an iframe.`));return}let t=await e.getMetadata();t?.name&&typeof t.name==`string`&&(this.walletInfo.prettyName=t.name),t?.imageUrl&&typeof t.imageUrl==`string`&&(this.walletInfo.logo=t.imageUrl),this.initClientDone(new Yr(e))}},wi={name:Vr,prettyName:`Cosmiframe`,logo:`data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGgKICAgIGZpbGw9IiM5MzkzOTMiCiAgICBkPSJNOC4xNCAxMC45NmMtLjA5LjMzLS4xNC42OC0uMTQgMS4wNCAwIDEuMS40NSAyLjEgMS4xNyAyLjgzbC0xLjQyIDEuNDJDNi42NyAxNS4xNiA2IDEzLjY2IDYgMTJjMC0uOTMuMjEtMS44LjU4LTIuNTlMNS4xMSA3Ljk0QzQuNCA5LjEzIDQgMTAuNTIgNCAxMmMwIDIuMjEuOSA0LjIxIDIuMzUgNS42NWwtMS40MiAxLjQyQzMuMTIgMTcuMjYgMiAxNC43NiAyIDEyYzAtMi4wNC42MS0zLjkzIDEuNjYtNS41MUwxLjM5IDQuMjIgMi44IDIuODFsMTguMzggMTguMzgtMS40MSAxLjQxTDguMTQgMTAuOTZ6bTkuMjggMy42M2MuMzctLjc5LjU4LTEuNjYuNTgtMi41OSAwLTEuNjYtLjY3LTMuMTYtMS43Ni00LjI0bC0xLjQyIDEuNDJDMTUuNTUgOS45IDE2IDEwLjkgMTYgMTJjMCAuMzYtLjA1LjcxLS4xNCAxLjA0bDEuNTYgMS41NXpNMjAgMTJjMCAxLjQ4LS40IDIuODctMS4xMSA0LjA2bDEuNDUgMS40NUMyMS4zOSAxNS45MyAyMiAxNC4wNCAyMiAxMmMwLTIuNzYtMS4xMi01LjI2LTIuOTMtNy4wN2wtMS40MiAxLjQyQzE5LjEgNy43OSAyMCA5Ljc5IDIwIDEyeiI+PC9wYXRoPgo8L3N2Zz4=`,mode:`extension`,mobileDisabled:!1,rejectMessage:{source:`Request rejected`},connectEventNamesOnWindow:[Hr],allowedParentOrigins:[]},Ti=e=>new Ci({...wi,allowedParentOrigins:e}),Ei=i(a(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.bowser=r():n.bowser=r()})(e,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,`default`,{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18);t.default=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||``},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||``},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case`NT`:return`NT`;case`XP`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.1`:return`XP`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}},e.getMacOSVersionName=function(e){var t=e.split(`.`).splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),t[0]===10)switch(t[1]){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}},e.getAndroidVersionName=function(e){var t=e.split(`.`).splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0},e.getVersionPrecision=function(e){return e.split(`.`).length},e.compareVersions=function(t,n,r){r===void 0&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),(function(e){return Array(20-e.length).join(`0`)+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,a=Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var s=function(){var e=a[t];typeof e==`object`&&e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=a.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||``},e}(),e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":`amazon_silk`,"Android Browser":`android`,Bada:`bada`,BlackBerry:`blackberry`,Chrome:`chrome`,Chromium:`chromium`,Electron:`electron`,Epiphany:`epiphany`,Firefox:`firefox`,Focus:`focus`,Generic:`generic`,"Google Search":`google_search`,Googlebot:`googlebot`,"Internet Explorer":`ie`,"K-Meleon":`k_meleon`,Maxthon:`maxthon`,"Microsoft Edge":`edge`,"MZ Browser":`mz`,"NAVER Whale Browser":`naver`,Opera:`opera`,"Opera Coast":`opera_coast`,PhantomJS:`phantomjs`,Puffin:`puffin`,QupZilla:`qupzilla`,QQ:`qq`,QQLite:`qqlite`,Safari:`safari`,Sailfish:`sailfish`,"Samsung Internet for Android":`samsung_internet`,SeaMonkey:`seamonkey`,Sleipnir:`sleipnir`,Swing:`swing`,Tizen:`tizen`,"UC Browser":`uc`,Vivaldi:`vivaldi`,"WebOS Browser":`webos`,WeChat:`wechat`,"Yandex Browser":`yandex`,Roku:`roku`},t.BROWSER_MAP={amazon_silk:`Amazon Silk`,android:`Android Browser`,bada:`Bada`,blackberry:`BlackBerry`,chrome:`Chrome`,chromium:`Chromium`,electron:`Electron`,epiphany:`Epiphany`,firefox:`Firefox`,focus:`Focus`,generic:`Generic`,googlebot:`Googlebot`,google_search:`Google Search`,ie:`Internet Explorer`,k_meleon:`K-Meleon`,maxthon:`Maxthon`,edge:`Microsoft Edge`,mz:`MZ Browser`,naver:`NAVER Whale Browser`,opera:`Opera`,opera_coast:`Opera Coast`,phantomjs:`PhantomJS`,puffin:`Puffin`,qupzilla:`QupZilla`,qq:`QQ Browser`,qqlite:`QQ Browser Lite`,safari:`Safari`,sailfish:`Sailfish`,samsung_internet:`Samsung Internet for Android`,seamonkey:`SeaMonkey`,sleipnir:`Sleipnir`,swing:`Swing`,tizen:`Tizen`,uc:`UC Browser`,vivaldi:`Vivaldi`,webos:`WebOS Browser`,wechat:`WeChat`,yandex:`Yandex Browser`},t.PLATFORMS_MAP={tablet:`tablet`,mobile:`mobile`,desktop:`desktop`,tv:`tv`},t.OS_MAP={WindowsPhone:`Windows Phone`,Windows:`Windows`,MacOS:`macOS`,iOS:`iOS`,Android:`Android`,WebOS:`WebOS`,BlackBerry:`BlackBerry`,Bada:`Bada`,Tizen:`Tizen`,Linux:`Linux`,ChromeOS:`Chrome OS`,PlayStation4:`PlayStation 4`,Roku:`Roku`},t.ENGINE_MAP={EdgeHTML:`EdgeHTML`,Blink:`Blink`,Trident:`Trident`,Presto:`Presto`,Gecko:`Gecko`,WebKit:`WebKit`}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},a=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.default=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(t===void 0&&(t=!1),typeof e!=`string`)throw Error(`UserAgent should be a string`);return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:`BROWSER_MAP`,get:function(){return a.BROWSER_MAP}},{key:`ENGINE_MAP`,get:function(){return a.ENGINE_MAP}},{key:`OS_MAP`,get:function(){return a.OS_MAP}},{key:`PLATFORMS_MAP`,get:function(){return a.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}(),e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),a=c(n(94)),o=c(n(95)),s=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(){function e(e,t){if(t===void 0&&(t=!1),e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||``:t||``},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){e===void 0&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||``:t||``},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(a.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},a=0;if(Object.keys(e).forEach((function(t){var o=e[t];typeof o==`string`?(i[t]=o,a+=1):typeof o==`object`&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=s.default.find(o,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(n[c]);if(l!==void 0)return l}var u=s.default.find(o,(function(e){return t.isPlatform(e)}));if(u){var d=this.satisfies(n[u]);if(d!==void 0)return d}}if(a>0){var f=Object.keys(i),p=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(p!==void 0)return this.compareVersion(i[p])}},t.isBrowser=function(e,t){t===void 0&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return t===void 0&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return e===void 0&&(e=[]),e.some((function(e){return t.is(e)}))},e}(),e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i;t.default=[{test:[/googlebot/i],describe:function(e){var t={name:`Googlebot`},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:`Opera`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:`Opera`},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:`Samsung Internet for Android`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:`NAVER Whale Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:`MZ Browser`},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:`Focus`},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:`Swing`},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:`Opera Coast`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:`Opera Touch`},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:`Yandex Browser`},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:`UC Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:`Maxthon`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:`Epiphany`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:`Puffin`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:`Sleipnir`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:`K-Meleon`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:`WeChat`},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:`Internet Explorer`},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:`Microsoft Edge`},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:`Microsoft Edge`},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:`Vivaldi`},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:`SeaMonkey`},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:`Sailfish`},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:`Amazon Silk`},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:`PhantomJS`},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:`SlimerJS`},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:`BlackBerry`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:`WebOS Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:`Bada`},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:`Tizen`},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:`QupZilla`},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:`Firefox`},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:`Electron`},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:`Miui`},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:`Chromium`},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:`Chrome`},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:`Google Search`},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:`Android Browser`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:`PlayStation 4`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:`Safari`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}],e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}],e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:[/googlebot/i],describe:function(){return{type:`bot`,vendor:`Google`}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:a.PLATFORMS_MAP.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Nexus`}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Apple`,model:`iPad`}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Apple`,model:`iPad`}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Amazon`}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`Nexus`}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getBrowserName(!0)===`blackberry`},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`BlackBerry`}}},{test:function(e){return e.getBrowserName(!0)===`bada`},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getBrowserName()===`windows phone`},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`Microsoft`}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return e.getOSName(!0)===`android`},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getOSName(!0)===`macos`},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:`Apple`}}},{test:function(e){return e.getOSName(!0)===`windows`},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return e.getOSName(!0)===`linux`},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return e.getOSName(!0)===`playstation 4`},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return e.getOSName(!0)===`roku`},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}],e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:function(e){return e.getBrowserName(!0)===`microsoft edge`},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],e.exports=t.default}})}))}))());x();var Di=k(),Oi=(e,t)=>{let n=[];for(let t of e)n.push(`${t.port_id}/${t.channel_id}`);let r=`${n.join(`/`)}/${t}`;return`ibc/`+C.from(new Uint8Array(new Di.sha256().update(C.from(r)).digest())).toString(`hex`).toUpperCase()},ki=(e,t,n)=>e.find(e=>e.chain_1.chain_name===n&&e.chain_2.chain_name===t),Ai=(e,t,n)=>ki(e,t,n)||ki(e,n,t),ji=e=>e.channels.find(e=>e.chain_1.port_id===`transfer`&&e.chain_2.port_id===`transfer`),Mi=e=>e.channels.find(e=>e.chain_1.port_id.startsWith(`wasm.`)&&e.chain_2.port_id===`transfer`||e.chain_1.port_id===`transfer`&&e.chain_2.port_id.startsWith(`wasm`)),Ni=(e,t,n,r,i)=>{let a=Ai(e,t,n);if(!a)return[];let o=i.startsWith(`cw20:`)?Mi(a):ji(a);if(!o)return[];let s;s=a.chain_1.chain_name===t?o.chain_1:o.chain_2;let c=[s],l=r.find(({chain_name:e})=>e===n);if(!l)return c;let u=l.assets.find(e=>e.base===i);if(!u)return c;let d=u.traces?.filter?.(e=>e.type===`ibc`||e.type===`ibc-cw20`)??[];if(!d.length)return c;d.length;let[f]=d;return[...c,...Ni(e,n,f.counterparty.chain_name,r,f.counterparty.base_denom)]},Pi=(e,t,n,r,i)=>{let a=Ai(e,t,n);if(a){if(!(i.startsWith(`cw20:`)?Mi(a):ji(a)))return;let o=Ni(e,t,n,r,i),s=r.find(({chain_name:e})=>e===n);if(!s)return Oi(o,i);let c=s.assets.find(e=>e.base===i);return c?Oi(o,(c.traces?.find?.(e=>e.type===`ibc`))?.counterparty?.base_denom??c.base):Oi(o,i)}},Fi=(e,t,n)=>{let r=t.filter(t=>t.chain_1.chain_name===e||t.chain_2.chain_name===e).map(r=>{let i=r.chain_1.chain_name===e?`chain_2`:`chain_1`,a=r.chain_1.chain_name===e?`chain_1`:`chain_2`,o=r[i].chain_name,s=r[i],c=r[a],l=n.find(e=>e.chain_name===o);if(!l)return;let u={...l,assets:l.assets.filter(e=>!(l.chain_name===`carbon`&&e.base.startsWith(`ibc/`)))}.assets.filter(e=>!e.base.startsWith(`cw20:`)).map(r=>{let i=Pi(t,e,o,n,r.base),a={...r};return a.base=i,a.denom_units=a.denom_units.map(e=>{if(e.denom===r.base){let t={...e};return t.denom=i,t.aliases=[e.denom],t}return e}),a}),d=ji(r);if(d)return{chain:{...c,...d[a]},counterparty:{...s,...d[i]},assets:u}}).filter(Boolean).reduce((e,t)=>{e[t.chain.chain_name]=e[t.chain.chain_name]||[];let n=t.assets.map(e=>{try{return{...e,traces:[{type:`ibc`,counterparty:{channel_id:t.counterparty.channel_id,base_denom:e.denom_units[0]?.aliases?.[0]??e.denom_units[0].denom,chain_name:t.counterparty.chain_name},chain:{channel_id:t.chain.channel_id}}]}}catch{}}).filter(Boolean),r={...t,assets:n};return e[t.chain.chain_name].push(r),e},{});return Object.keys(r).map(e=>({chain_name:e,assets:r[e].reduce((e,t)=>[...e,...t.assets],[])}))},Ii=(e,t,n)=>{let r=t.filter(t=>t.chain_1.chain_name===e||t.chain_2.chain_name===e).map(r=>{let i=r.chain_1.chain_name===e?`chain_2`:`chain_1`,a=r.chain_1.chain_name===e?`chain_1`:`chain_2`,o=r[i].chain_name,s=r[i],c=r[a],l=n.find(e=>e.chain_name===o);if(!l)return;let u=l.assets.filter(e=>e.base.startsWith(`cw20:`)).map(r=>{let i=Pi(t,e,o,n,r.base),a={...r};return a.base=i,a.denom_units=a.denom_units.map(e=>{if(e.denom===r.base){let t={...e};return t.denom=i,t.aliases=[e.denom],t}return e}),a});if(!u.length)return;let d=Mi(r);if(d)return{chain:{...c,...d[a]},counterparty:{...s,...d[i]},assets:u}}).filter(Boolean).reduce((e,t)=>{let n=t;e[n.chain.chain_name]=e[n.chain.chain_name]||[];let r=n.assets.map(e=>{try{return{...e,traces:[{type:`ibc-cw20`,counterparty:{port:t.counterparty.port_id,channel_id:t.counterparty.channel_id,base_denom:e.denom_units[0]?.aliases?.[0]??e.denom_units[0].denom,chain_name:t.counterparty.chain_name},chain:{port:t.chain.port_id,channel_id:t.chain.channel_id}}]}}catch{}}).filter(Boolean),i={...t,assets:r};return e[t.chain.chain_name].push(i),e},{});return Object.keys(r).map(e=>({chain_name:e,assets:r[e].reduce((e,t)=>[...e,...t.assets],[])}))},Li=(e,t,n)=>{let r=Fi(e,t,n),i=Ii(e,t,n);return r.reduce((e,t)=>{let n=t.chain_name,r=[...t.assets],a=i.find(e=>e.chain_name===n);return a&&[].push.apply(r,a.assets),[{chain_name:n,assets:r},...e]},[])},Ri=class{chainName;fetcher;_chain;_assetList;_assetLists;_ibcData=[];constructor(e){this.chainName=e.chainName,this.fetcher=e.fetcher,this.refresh()}refresh(){this._assetList=this.fetcher.getChainAssetList(this.chainName),this._ibcData=this.fetcher.getChainIbcData(this.chainName),this._chain=this.fetcher.getChain(this.chainName);let e=this._ibcData.reduce((e,t)=>(e.includes(t.chain_1.chain_name)||e.push(t.chain_1.chain_name),e.includes(t.chain_2.chain_name)||e.push(t.chain_2.chain_name),e),[]);this._assetLists=this.fetcher.assetLists.filter(t=>e.includes(t.chain_name))}get chain(){return this._chain}get nativeAssetList(){return this._assetList}get assetLists(){return Li(this.chainName,this._ibcData,this._assetLists)}};s();function zi(e){e===``&&(e=`.`);var t=e.charAt(0)===`/`;e=Hi(e);for(var n=e.split(`/`),r=[],i=0;i<n.length;i++){var a=n[i];a!==`.`&&(a===`..`&&(t||!t&&r.length>0&&r[0]!==`..`)?r.pop():r.push(a))}if(!t&&r.length<2)switch(r.length){case 1:r[0]===``&&r.unshift(`.`);break;default:r.push(`.`)}return e=r.join(`/`),t&&e.charAt(0)!==`/`&&(e=`/`+e),e}function Bi(e,t=``){if(e===``)return e;e=zi(e);var n=e.split(`/`),r=n[n.length-1];return r===``&&n.length>1?n[n.length-2]:t.length>0&&r.substr(r.length-t.length)===t?r.substr(0,r.length-t.length):r}var Vi=RegExp(`//+`,`g`);function Hi(e){return e=e.replace(Vi,`/`),e}var Ui=i(_e()),Wi=e=>(0,Ui.default)(e).then(e=>{if(e.status>=400)throw Error(`Bad response`);return e.json()}),Gi=class{urls=[];_assetLists=[];_chains=[];_ibcData=[];chainInfoList=[];constructor(e={}){e.chains&&(this._chains=e.chains),e.assetLists&&(this._assetLists=e.assetLists),e.ibcData&&(this._ibcData=e.ibcData),e.urls&&(this.urls=e.urls)}get chains(){return this._chains}get assetLists(){return this._assetLists}get ibcData(){return this._ibcData}getChain(e){return this._chains.find(t=>t.chain_name===e)}getChainAssetList(e){return this._assetLists.find(t=>t.chain_name===e)}getGeneratedAssetLists(e){return Li(e,this._ibcData,this._assetLists)}getChainIbcData(e){return this._ibcData.filter(t=>t.chain_1.chain_name===e||t.chain_2.chain_name===e)}getChainInfo(e){let t=this.chainInfoList.find(t=>t.chainName===e);return t||(t=new Ri({chainName:e,fetcher:this}),this.chainInfoList.push(t)),t}upsertChain(e){if(!this._chains.find(t=>t.chain_name===e.chain_name&&t.network_type===e.network_type)){this._chains.push(e);return}this._chains=this._chains.map(t=>t.chain_name===e.chain_name&&t.network_type===e.network_type?e:t)}updateAssetList(e){if(!this._assetLists.find(t=>t.chain_name===e.chain_name)){this._assetLists.push(e);return}this._assetLists=this._assetLists.map(t=>t.chain_name===e.chain_name?e:t)}upsertIbcData(e){if(!this._ibcData.find(t=>t.chain_1.chain_name===e.chain_1.chain_name&&t.chain_2.chain_name===e.chain_2.chain_name)){this._ibcData.push(e);return}this._ibcData=this._ibcData.map(t=>t.chain_1.chain_name===e.chain_1.chain_name&&t.chain_2.chain_name===e.chain_2.chain_name?e:t)}update(e){if(!e.$schema)throw Error(`not a registered JSON schema type`);switch(Bi(e.$schema,`.schema.json`)){case`chain`:this.upsertChain(e);break;case`assetlist`:this.updateAssetList(e);break;case`ibc_data`:this.upsertIbcData(e);break;default:throw Error(`unknown schema type`)}this.chainInfoList.forEach(e=>{e.refresh()})}async fetch(e){let t=await Wi(e);this.update(t)}async fetchUrls(){return Promise.all(this.urls.map(e=>this.fetch(e)))}},Ki=class extends Ur{isActive=!1;chainRecord;_wallets;namespace=`cosmos`;session;repelWallet=!0;callbackOptions;fetchInfo=!1;constructor(e,t=[]){if(super(),this.chainRecord=e,this._wallets=t,this.repelWallet&&this.wallets.forEach(e=>{e.updateCallbacks({...e.callbacks,beforeConnect:async()=>{this.wallets.forEach(async t=>{!t.isWalletDisconnected&&t!==e&&await t.disconnect(!1,this.callbackOptions?.beforeConnect?.disconnect)})}})}),!this.chainRecord.chain){this.fetchInfo=!0;let t=new Gi({urls:[`https://raw.githubusercontent.com/cosmos/chain-registry/master/${e.name}/chain.json`]});t.fetchUrls().then(()=>{this.chainRecord.chain=t.getChain(e.name),this.actions?.render?.(e=>e+1)}).catch(t=>{this.chainRecord.chain=null,this.logger?.warn(`Failed to fetch chain info for chain ${e.name}: [${t.name}] ${t.message}`)})}if(!this.chainRecord.assetList){this.fetchInfo=!0;let t=new Gi({urls:[`https://raw.githubusercontent.com/cosmos/chain-registry/master/${e.name}/assetlist.json`]});t.fetchUrls().then(()=>{this.chainRecord.assetList=t.getChainAssetList(e.name)}).catch(t=>{this.chainRecord.assetList=null,this.logger?.warn(`Failed to fetch assetList info for chain ${e.name}: [${t.name}] ${t.message}`)})}this.fetchInfo&&this._wallets.forEach(e=>e.chainRecord=this.chainRecord)}setCallbackOptions(e){this.callbackOptions=e}setEnv(e){this._env=e,this.wallets.forEach(t=>t.setEnv(e))}activate(){this.isActive=!0,this.wallets.forEach(e=>e.activate())}get chainName(){return this.chainRecord.name}get chainLogo(){return this.chainRecord.assetList?.assets[0]?.logo_URIs?.svg||this.chainRecord.assetList?.assets[0]?.logo_URIs?.png||void 0}get wallets(){return this._wallets}get platformEnabledWallets(){return this.isMobile?this._wallets.filter(e=>typeof e.walletInfo.mobileDisabled==`boolean`?!e.walletInfo.mobileDisabled:!e.walletInfo.mobileDisabled()):this._wallets}get isSingleWallet(){return this.wallets.length===1}get current(){if(!this.repelWallet){this.logger.warn("when `repelWallet` is set false, `current` is always undefined.");return}return this.wallets.find(e=>!e.isWalletNotExist&&!e.isWalletDisconnected)}getWallet=e=>this.wallets.find(t=>t.walletName===e);openView=()=>{this.actions?.viewWalletRepo?.(this),this.actions?.viewOpen?.(!0)};closeView=()=>{this.actions?.viewOpen?.(!1)};connect=async(e,t=!0)=>{e?await this.getWallet(e)?.connect(t):this.openView()};disconnect=async(e,t=!0,n)=>{e?await this.getWallet(e)?.disconnect(t,n):await this.current.disconnect(t,n)};getRpcEndpoint=async e=>{for(let t of this.wallets)try{return await t.getRpcEndpoint(e)}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`No valid RPC endpoint for chain ${this.chainName}!`)};getRestEndpoint=async e=>{for(let t of this.wallets)try{return await t.getRestEndpoint(e)}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`No valid REST endpoint for chain ${this.chainName}!`)};getStargateClient=async()=>{for(let e of this.wallets)try{return await e.getStargateClient()}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`Something wrong! Probably no valid RPC endpoint for chain ${this.chainName}.`)};getCosmWasmClient=async()=>{for(let e of this.wallets)try{return await e.getCosmWasmClient()}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`Something wrong! Probably no valid RPC endpoint for chain ${this.chainName}.`)};getNameService=async()=>{for(let e of this.wallets)try{return await e.getNameService()}catch(e){this.logger?.debug(`${e.name}: ${e.message}`)}return Promise.reject(`Something wrong! Probably no valid RPC endpoint or name service is not registered for chain ${this.chainName}.`)}},qi=class extends Ur{chainRecords=[];walletRepos=[];defaultNameService=`icns`;mainWallets=[];coreEmitter;walletConnectOptions;session;repelWallet=!0;isLazy;throwErrors;subscribeConnectEvents;cosmiframeEnabled;_reconnectMap={};constructor(e,t,n,r,i=!0,a=[/^https?:\/\/localhost(:\d+)?/,/^https:\/\/(.+\.)?osmosis\.zone/,/^https:\/\/(.+\.)?daodao\.zone/,/^https:\/\/.+-da0da0\.vercel\.app/,/^https:\/\/(.+\.)?abstract\.money/],o,s,c,l,u,d){super(),this.throwErrors=r,this.subscribeConnectEvents=i,this.coreEmitter=new Kr.default,this.logger=n,s&&(this.defaultNameService=s),this.session=new kn({duration:18e5,callback:()=>{this.mainWallets.forEach(e=>e.disconnectAll(!1)),window?.localStorage.removeItem(`cosmos-kit@2:core//accounts`),window?.localStorage.removeItem(`cosmos-kit@2:core//current-wallet`)},...d}),this.walletConnectOptions=c,this.cosmiframeEnabled=ci()&&!!a?.length,t=[...this.cosmiframeEnabled?[Ti(a)]:[],...t],t.forEach(({walletName:e})=>this._reconnectMap[e]=()=>this._reconnect(e,!0)),this.init(e,o,t,c,l,u)}init(e,t,n,r,i,a){this.logger.info(`${e.length} chains and ${n.length} wallets are provided!`),this.isLazy=a?.isLazy,this.chainRecords=e.map(e=>{let n=typeof e==`string`?e:e.chain_name;return En(e,t,i,a?.endpoints?.[n],this.isLazy,this.logger)}),this.mainWallets=n.map(e=>(e.logger=this.logger,e.throwErrors=this.throwErrors,e.session=this.session,e.walletConnectOptions=this.walletConnectOptions,e?.setChains(this.chainRecords),e)),this.chainRecords.forEach((e,t)=>{let r=new Ki(e,n.map(({getChainWallet:t})=>t(e.name)));r.logger=this.logger,r.repelWallet=this.repelWallet,r.session=this.session,this.walletRepos.push(r),r.fetchInfo&&(this.chainRecords[t]=r.chainRecord)}),this.checkEndpoints(a?.endpoints)}checkEndpoints(e){Object.keys(e||{}).map(e=>{this.chainRecords.findIndex(t=>t.name===e)===-1&&this.logger?.warn(`You are providing endpointOptions with unrecognized chain NAME ${e} (NOT found such chain in ChainProvider property "chains")`)})}setWalletRepel(e){this.repelWallet=e,this.walletRepos.forEach(t=>t.repelWallet=e),window?.localStorage.setItem(`cosmos-kit@2:core//repel-wallet`,e.toString())}addEndpoints=e=>{this.mainWallets.forEach(t=>{t.addEnpoints(e)})};addChains=(e,t,n,r)=>{let i=e.map(e=>{let i=typeof e==`string`?e:e.chain_name;return En(e,t,n,r?.[i],this.isLazy,this.logger)});i.forEach(e=>{let t=this.chainRecords.findIndex(t=>t.name===e.name);t==-1?this.chainRecords.push(e):this.chainRecords[t]=e}),this.checkEndpoints(r),this.mainWallets.forEach(e=>{e.setChains(i,!1)}),i.forEach((e,t)=>{let n=new Ki(e,this.mainWallets.map(({getChainWallet:t})=>t(e.name)));n.setActions({viewOpen:this.actions?.viewOpen,viewWalletRepo:this.actions?.viewWalletRepo}),n.wallets.forEach(e=>{e.setActions({data:this.actions?.data,state:this.actions?.state,message:this.actions?.message})}),n.logger=this.logger,n.repelWallet=this.repelWallet,n.session=this.session,n.fetchInfo&&(this.chainRecords[t]=n.chainRecord);let r=this.walletRepos.findIndex(e=>e.chainName===n.chainName);r==-1?this.walletRepos.push(n):this.walletRepos[r]=n})};on=(e,t)=>{this.coreEmitter.on(e,t)};off=(e,t)=>{this.coreEmitter.off(e,t)};get activeRepos(){return this.walletRepos.filter(e=>e.isActive===!0)}getMainWallet=e=>{let t=this.mainWallets.find(t=>t.walletName===e);if(!t)throw new Tn(e);return t};getWalletRepo=e=>{let t=this.walletRepos.find(t=>t.chainName===e);if(!t)throw Error(`Chain ${e} is not provided.`);return t};getChainWallet=(e,t)=>{let n=this.getMainWallet(t).getChainWallet(e);if(!n)throw Error(`${e} is not provided!`);return n};getChainRecord=e=>{let t=this.chainRecords.find(t=>t.name===e);if(!t)throw Error(`${e} is not provided!`);return t};getChainLogo=e=>{let t=this.getChainRecord(e);return t?.assetList?.assets[0]?.logo_URIs?.svg||t?.assetList?.assets[0]?.logo_URIs?.png||void 0};getNameService=async e=>{let t;if(e)t=e;else{if(!this.defaultNameService)throw Error(`defaultNameService is undefined`);let{getNameServiceRegistryFromName:e}=await import(`./utils-DLhgweWO.js`).then(e=>e.t),n=e(this.defaultNameService);if(!n)throw Error(`Unknown defaultNameService `+this.defaultNameService);t=n.chainName}return await this.getWalletRepo(t).getNameService()};_reconnect=async(e,t=!1,n)=>{t&&this.getMainWallet(e)?.isWalletDisconnected||(this.logger?.debug("[Event Emit] `refresh_connection` (manager)"),this.coreEmitter.emit(`refresh_connection`),await this.getMainWallet(e).connect(),await Promise.all(this.getMainWallet(e).getChainWalletList(!0).map((e,t)=>n?n.includes(e.chainName)?e.connect(!1):void 0:t===0?e.connect(!0):void 0)))};_restoreAccounts=async()=>{let e=this.cosmiframeEnabled?Vr:window.localStorage.getItem(`cosmos-kit@2:core//current-wallet`);if(e)try{let t=this.getMainWallet(e);t.activate();let n;if(t.clientMutable.state===H.Done){let e=window.localStorage.getItem(`cosmos-kit@2:core//accounts`);if(e&&e!==`[]`){let r=JSON.parse(e).flatMap(e=>{let n=t.getChainWalletList(!1).find(t=>t.chainRecord.chain?.chain_id===e.chainId&&t.namespace===e.namespace);return n?.activate(),t.walletInfo.mode===`wallet-connect`&&(n?.setData(e),n?.setState(H.Done)),n||[]});t.setState(H.Done);let i=r.flatMap(e=>{try{let t=this.getWalletRepo(e.chainName);return t.activate(),t.chainRecord}catch{return[]}}),a=async()=>{try{return await t.client?.enable?.(i.map(e=>e.chain.chain_id)),!0}catch(e){if(e instanceof Error&&t.rejectMatched(e))return this.logger?.error(`Failed to connect to stored chains: ${e.message}`),!1;throw e}};try{if(!await a())return}catch{for(let e of i)await t.client?.addChain?.(e);if(!await a())return}n=i.map(e=>e.name)}}t.walletInfo.mode!==`wallet-connect`&&await this._reconnect(e,void 0,n)}catch(e){if(e instanceof Tn)this.logger?.warn(e.message);else throw e}};_handleCosmiframeKeystoreChangeEvent=e=>{typeof e.data==`object`&&`event`in e.data&&e.data.event===`cosmiframe_keystorechange`&&(window.dispatchEvent(new Event(Hr)),this._reconnect(Vr))};onMounted=async()=>{if(typeof window>`u`)return;this.cosmiframeEnabled&&window.addEventListener(`message`,this._handleCosmiframeKeystoreChangeEvent);let e=Ei.default.getParser(window.navigator.userAgent),t={browser:e.getBrowserName(!0),device:e.getPlatform().type||`desktop`,os:e.getOSName(!0)};this.setEnv(t),this.walletRepos.forEach(e=>e.setEnv(t)),await Promise.all(this.mainWallets.map(async e=>{e.setEnv(t),e.emitter?.emit(`broadcast_env`,t),this.subscribeConnectEvents&&(e.walletInfo.connectEventNamesOnWindow?.forEach(t=>{window.addEventListener(t,this._reconnectMap[e.walletName]),this.logger?.debug(`Add "${t}" event listener to window`)}),e.walletInfo.connectEventNamesOnClient?.forEach(async t=>{e.client?.on?.(t,this._reconnectMap[e.walletName]),this.logger?.debug(`Add "${t}" event listener to wallet client ${e.walletPrettyName}`)})),e.walletInfo.mode===`wallet-connect`?await e.initClient(this.walletConnectOptions):await e.initClient()})),await this._restoreAccounts()};onUnmounted=()=>{typeof window>`u`||(this.cosmiframeEnabled&&window.removeEventListener(`message`,this._handleCosmiframeKeystoreChangeEvent),this.mainWallets.forEach(e=>{e.walletInfo.connectEventNamesOnWindow?.forEach(t=>{window.removeEventListener(t,this._reconnectMap[e.walletName])}),e.walletInfo.connectEventNamesOnClient?.forEach(async t=>{e.client?.off?.(t,this._reconnectMap[e.walletName])})}))}},Ji={osmosis:{rpc:[`https://rpc-osmosis.keplr.app/`],rest:[`https://lcd-osmosis.keplr.app/`]},osmosistestnet:{rpc:[`https://rpc-test.osmosis.zone/`],rest:[`https://lcd-test.osmosis.zone/`]},cosmoshub:{rpc:[`https://rpc-cosmoshub.keplr.app`],rest:[`https://lcd-cosmoshub.keplr.app`]},terra:{rpc:[`https://rpc-columbus.keplr.app`],rest:[`https://lcd-columbus.keplr.app`]},secretnetwork:{rpc:[`https://rpc-secret.keplr.app`],rest:[`https://lcd-secret.keplr.app`]},akash:{rpc:[`https://rpc-akash.keplr.app`],rest:[`https://lcd-akash.keplr.app`]},regen:{rpc:[`https://rpc-regen.keplr.app`],rest:[`https://lcd-regen.keplr.app`]},sentinel:{rpc:[`https://rpc-sentinel.keplr.app`],rest:[`https://lcd-sentinel.keplr.app`]},persistence:{rpc:[`https://rpc-persistence.keplr.app`],rest:[`https://lcd-persistence.keplr.app`]},irisnet:{rpc:[`https://rpc-iris.keplr.app`],rest:[`https://lcd-iris.keplr.app`]},cryptoorgchain:{rpc:[`https://rpc-crypto-org.keplr.app/`],rest:[`https://lcd-crypto-org.keplr.app/`]},starname:{rpc:[`https://rpc-iov.keplr.app`],rest:[`https://lcd-iov.keplr.app`]},emoney:{rpc:[`https://rpc-emoney.keplr.app`],rest:[`https://lcd-emoney.keplr.app`]},juno:{rpc:[`https://rpc-juno.itastakers.com`],rest:[`https://lcd-juno.itastakers.com`]},microtick:{rpc:[`https://rpc-microtick.keplr.app`],rest:[`https://lcd-microtick.keplr.app`]},likecoin:{rpc:[`https://mainnet-node.like.co/rpc`],rest:[`https://mainnet-node.like.co`]},impacthub:{rpc:[`https://rpc-impacthub.keplr.app`],rest:[`https://lcd-impacthub.keplr.app`]},bitcanna:{rpc:[`https://rpc.bitcanna.io`],rest:[`https://lcd.bitcanna.io`]},bitsong:{rpc:[`https://rpc.explorebitsong.com`],rest:[`https://lcd.explorebitsong.com`]},kichain:{rpc:[`https://rpc-mainnet.blockchain.ki`],rest:[`https://api-mainnet.blockchain.ki`]},panacea:{rpc:[`https://rpc.gopanacea.org`],rest:[`https://api.gopanacea.org`]},bostrom:{rpc:[`https://rpc.bostrom.cybernode.ai`],rest:[`https://lcd.bostrom.cybernode.ai`]},comdex:{rpc:[`https://rpc.comdex.one`],rest:[`https://rest.comdex.one`]},cheqd:{rpc:[`https://rpc.cheqd.net`],rest:[`https://api.cheqd.net`]},stargaze:{rpc:[`https://rpc.stargaze-apis.com`],rest:[`https://rest.stargaze-apis.com`]},chihuahua:{rpc:[`https://rpc.chihuahua.wtf`],rest:[`https://api.chihuahua.wtf`]},lumnetwork:{rpc:[`https://node0.mainnet.lum.network/rpc`],rest:[`https://node0.mainnet.lum.network/rest`]},vidulum:{rpc:[`https://mainnet-rpc.vidulum.app`],rest:[`https://mainnet-lcd.vidulum.app`]},desmos:{rpc:[`https://rpc.mainnet.desmos.network`],rest:[`https://api.mainnet.desmos.network`]},dig:{rpc:[`https://rpc-1-dig.notional.ventures`],rest:[`https://api-1-dig.notional.ventures`]},sommelier:{rpc:[`https://rpc-sommelier.keplr.app`],rest:[`https://lcd-sommelier.keplr.app`]},sifchain:{rpc:[`https://rpc.sifchain.finance`],rest:[`https://api-int.sifchain.finance`]},bandchain:{rpc:[`https://rpc.laozi3.bandchain.org`],rest:[`https://laozi1.bandchain.org/api`]},konstellation:{rpc:[`https://node1.konstellation.tech:26657`],rest:[`https://node1.konstellation.tech:1318`]},umee:{rpc:[`https://rpc.aphrodite.main.network.umee.cc`],rest:[`https://api.aphrodite.main.network.umee.cc`]},gravitybridge:{rpc:[`https://gravitychain.io:26657`],rest:[`https://gravitychain.io:1317`]},decentr:{rpc:[`https://poseidon.mainnet.decentr.xyz`],rest:[`https://rest.mainnet.decentr.xyz`]},shentu:{rpc:[`https://shenturpc.certikpowered.info`],rest:[`https://azuredragon.noopsbycertik.com`]},carbon:{rpc:[`https://tm-api.carbon.network`],rest:[`https://api.carbon.network`]},injective:{rpc:[`https://public.api.injective.network`],rest:[`https://public.lcd.injective.network`]},cerberus:{rpc:[`https://rpc.cerberus.zone:26657`],rest:[`https://api.cerberus.zone:1317`]},fetchhub:{rpc:[`https://rpc-fetchhub.fetch.ai:443`],rest:[`https://rest-fetchhub.fetch.ai`]},assetmantle:{rpc:[`https://rpc.assetmantle.one/`],rest:[`https://rest.assetmantle.one/`]},provenance:{rpc:[`https://rpc.provenance.io/`],rest:[`https://api.provenance.io`]},galaxy:{rpc:[`https://rpc.galaxychain.zone`],rest:[`https://rest.galaxychain.zone`]},meme:{rpc:[`https://rpc-meme-1.meme.sx:443`],rest:[`https://api-meme-1.meme.sx:443`]},evmos:{rpc:[`https://rpc-evmos.keplr.app/`],rest:[`https://lcd-evmos.keplr.app/`]},terra2:{rpc:[`https://rpc.terrav2.ccvalidators.com/`],rest:[`https://phoenix-lcd.terra.dev/`]},rizon:{rpc:[`https://rpcapi.rizon.world/`],rest:[`https://restapi.rizon.world/`]},kava:{rpc:[`https://rpc-kava.keplr.app`],rest:[`https://lcd-kava.keplr.app`]},genesisl1:{rpc:[`https://26657.genesisl1.org`],rest:[`https://api.genesisl1.org`]}},Yi=class extends Gr{constructor(e,t){super(e,t)}},Xi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Zi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Qi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),$i=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ea=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ta=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EIP6963EventNames=void 0,(function(e){e.Announce=`eip6963:announceProvider`,e.Request=`eip6963:requestProvider`})(e.EIP6963EventNames||={})})),na=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ra=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ia=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CHAIN_TYPE_TO_GENESIS_HASH=e.GENESIS_HASH_TO_CHAIN_TYPE=e.NETWORK_TO_GENESIS_HASH=e.GENESIS_HASH_TO_NETWORK=e.ChainType=e.Network=e.GenesisHash=e.BitcoinSignMessageType=void 0,(function(e){e.ECDSA=`ecdsa`,e.BIP322_SIMPLE=`bip322-simple`})(e.BitcoinSignMessageType||={});var t;(function(e){e.MAINNET=`000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f`,e.TESTNET=`000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943`,e.SIGNET=`00000008819873e925422c1ff0f99f7cc9bbb232af63a077a480a3633bee1ef6`})(t=e.GenesisHash||={});var n;(function(e){e.MAINNET=`mainnet`,e.LIVENET=`livenet`,e.TESTNET=`testnet`,e.SIGNET=`signet`})(n=e.Network||={});var r;(function(e){e.BITCOIN_MAINNET=`BITCOIN_MAINNET`,e.BITCOIN_TESTNET=`BITCOIN_TESTNET`,e.BITCOIN_SIGNET=`BITCOIN_SIGNET`})(r=e.ChainType||={}),e.GENESIS_HASH_TO_NETWORK={[t.MAINNET]:n.MAINNET,[t.TESTNET]:n.TESTNET,[t.SIGNET]:n.SIGNET},e.NETWORK_TO_GENESIS_HASH={[n.MAINNET]:t.MAINNET,[n.LIVENET]:t.MAINNET,[n.TESTNET]:t.TESTNET,[n.SIGNET]:t.SIGNET},e.GENESIS_HASH_TO_CHAIN_TYPE={[t.MAINNET]:r.BITCOIN_MAINNET,[t.TESTNET]:r.BITCOIN_TESTNET,[t.SIGNET]:r.BITCOIN_SIGNET},e.CHAIN_TYPE_TO_GENESIS_HASH={[r.BITCOIN_MAINNET]:t.MAINNET,[r.BITCOIN_TESTNET]:t.TESTNET,[r.BITCOIN_SIGNET]:t.SIGNET}})),aa=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(ea(),e),n(ta(),e),n(na(),e),n(ra(),e),n(ia(),e)})),oa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),sa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EthTxStatus=e.EthSignType=void 0,(function(e){e.MESSAGE=`message`,e.TRANSACTION=`transaction`,e.EIP712=`eip-712`})(e.EthSignType||={}),(function(e){e.Success=`0x1`,e.Failure=`0x0`})(e.EthTxStatus||={})})),ca=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),la=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ua=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),da=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),fa=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Xi(),e),n(Zi(),e),n(Qi(),e),n($i(),e),n(aa(),e),n(oa(),e),n(sa(),e),n(ca(),e),n(la(),e),n(ua(),e),n(da(),e)})),pa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.fromHex=e.toHex=void 0;function t(e){let t=``;for(let n of e)t+=(`0`+n.toString(16)).slice(-2);return t}e.toHex=t;function n(e){if(e.length%2!=0)throw Error(`hex string length must be a multiple of 2`);let t=[];for(let n=0;n<e.length;n+=2){let r=e.substr(n,2);if(!r.match(/[0-9a-f]{2}/i))throw Error(`hex string contains invalid characters`);t.push(parseInt(r,16))}return new Uint8Array(t)}e.fromHex=n})),ma=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.JSONUint8Array=void 0;var t=pa();e.JSONUint8Array=class e{static parse(e){return JSON.parse(e,(e,n)=>{if(e===`__proto__`)throw Error(`__proto__ is disallowed`);return n&&typeof n==`string`&&n.startsWith(`__uint8array__`)?(0,t.fromHex)(n.replace(`__uint8array__`,``)):typeof BigInt<`u`&&n&&typeof n==`string`&&n.startsWith(`__bigint__`)?BigInt(n.replace(`__bigint__`,``)):n})}static stringify(e){return JSON.stringify(e,(e,n)=>{if(e===`__proto__`)throw Error(`__proto__ is disallowed`);if(n&&(n instanceof Uint8Array||typeof n==`object`&&`type`in n&&`data`in n&&n.type===`Buffer`&&Array.isArray(n.data))){let e=n instanceof Uint8Array?n:new Uint8Array(n.data);return`__uint8array__${(0,t.toHex)(e)}`}return typeof n==`bigint`?`__bigint__${n.toString()}`:n})}static wrap(t){if(t!==void 0)return JSON.parse(e.stringify(t))}static unwrap(t){if(t!==void 0)return e.parse(e.stringify(t))}}})),W=a(((e,t)=>{t.exports=r;var n=null;try{n=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 r(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}r.prototype.__isLong__,Object.defineProperty(r.prototype,`__isLong__`,{value:!0});function i(e){return(e&&e.__isLong__)===!0}r.isLong=i;var a={},o={};function s(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=l(e,(e|0)<0?-1:0,!0),i&&(o[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=a[e],r)?r:(n=l(e,e<0?-1:0,!1),i&&(a[e]=n),n))}r.fromInt=s;function c(e,t){if(isNaN(e))return t?b:y;if(t){if(e<0)return b;if(e>=g)return T}else{if(e<=-_)return E;if(e+1>=_)return w}return e<0?c(-e,t).neg():l(e%h|0,e/h|0,t)}r.fromNumber=c;function l(e,t,n){return new r(e,t,n)}r.fromBits=l;var u=Math.pow;function d(e,t,n){if(e.length===0)throw Error(`empty string`);if(e===`NaN`||e===`Infinity`||e===`+Infinity`||e===`-Infinity`)return y;if(typeof t==`number`?(n=t,t=!1):t=!!t,n||=10,n<2||36<n)throw RangeError(`radix`);var r;if((r=e.indexOf(`-`))>0)throw Error(`interior hyphen`);if(r===0)return d(e.substring(1),t,n).neg();for(var i=c(u(n,8)),a=y,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),l=parseInt(e.substring(o,o+s),n);if(s<8){var f=c(u(n,s));a=a.mul(f).add(c(l))}else a=a.mul(i),a=a.add(c(l))}return a.unsigned=t,a}r.fromString=d;function f(e,t){return typeof e==`number`?c(e,t):typeof e==`string`?d(e,t):l(e.low,e.high,typeof t==`boolean`?t:e.unsigned)}r.fromValue=f;var p=65536,m=1<<24,h=p*p,g=h*h,_=g/2,v=s(m),y=s(0);r.ZERO=y;var b=s(0,!0);r.UZERO=b;var x=s(1);r.ONE=x;var S=s(1,!0);r.UONE=S;var C=s(-1);r.NEG_ONE=C;var w=l(-1,2147483647,!1);r.MAX_VALUE=w;var T=l(-1,-1,!0);r.MAX_UNSIGNED_VALUE=T;var E=l(0,-2147483648,!1);r.MIN_VALUE=E;var D=r.prototype;D.toInt=function(){return this.unsigned?this.low>>>0:this.low},D.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},D.toString=function(e){if(e||=10,e<2||36<e)throw RangeError(`radix`);if(this.isZero())return`0`;if(this.isNegative())if(this.eq(E)){var t=c(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}else return`-`+this.neg().toString(e);for(var i=c(u(e,6),this.unsigned),a=this,o=``;;){var s=a.div(i),l=(a.sub(s.mul(i)).toInt()>>>0).toString(e);if(a=s,a.isZero())return l+o;for(;l.length<6;)l=`0`+l;o=``+l+o}},D.getHighBits=function(){return this.high},D.getHighBitsUnsigned=function(){return this.high>>>0},D.getLowBits=function(){return this.low},D.getLowBitsUnsigned=function(){return this.low>>>0},D.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=this.high==0?this.low:this.high,t=31;t>0&&!(e&1<<t);t--);return this.high==0?t+1:t+33},D.isZero=function(){return this.high===0&&this.low===0},D.eqz=D.isZero,D.isNegative=function(){return!this.unsigned&&this.high<0},D.isPositive=function(){return this.unsigned||this.high>=0},D.isOdd=function(){return(this.low&1)==1},D.isEven=function(){return(this.low&1)==0},D.equals=function(e){return i(e)||(e=f(e)),this.unsigned!==e.unsigned&&this.high>>>31==1&&e.high>>>31==1?!1:this.high===e.high&&this.low===e.low},D.eq=D.equals,D.notEquals=function(e){return!this.eq(e)},D.neq=D.notEquals,D.ne=D.notEquals,D.lessThan=function(e){return this.comp(e)<0},D.lt=D.lessThan,D.lessThanOrEqual=function(e){return this.comp(e)<=0},D.lte=D.lessThanOrEqual,D.le=D.lessThanOrEqual,D.greaterThan=function(e){return this.comp(e)>0},D.gt=D.greaterThan,D.greaterThanOrEqual=function(e){return this.comp(e)>=0},D.gte=D.greaterThanOrEqual,D.ge=D.greaterThanOrEqual,D.compare=function(e){if(i(e)||(e=f(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?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},D.comp=D.compare,D.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(x)},D.neg=D.negate,D.add=function(e){i(e)||(e=f(e));var t=this.high>>>16,n=this.high&65535,r=this.low>>>16,a=this.low&65535,o=e.high>>>16,s=e.high&65535,c=e.low>>>16,u=e.low&65535,d=0,p=0,m=0,h=0;return h+=a+u,m+=h>>>16,h&=65535,m+=r+c,p+=m>>>16,m&=65535,p+=n+s,d+=p>>>16,p&=65535,d+=t+o,d&=65535,l(m<<16|h,d<<16|p,this.unsigned)},D.subtract=function(e){return i(e)||(e=f(e)),this.add(e.neg())},D.sub=D.subtract,D.multiply=function(e){if(this.isZero())return y;if(i(e)||(e=f(e)),n)return l(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return y;if(this.eq(E))return e.isOdd()?E:y;if(e.eq(E))return this.isOdd()?E:y;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(v)&&e.lt(v))return c(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=this.high&65535,a=this.low>>>16,o=this.low&65535,s=e.high>>>16,u=e.high&65535,d=e.low>>>16,p=e.low&65535,m=0,h=0,g=0,_=0;return _+=o*p,g+=_>>>16,_&=65535,g+=a*p,h+=g>>>16,g&=65535,g+=o*d,h+=g>>>16,g&=65535,h+=r*p,m+=h>>>16,h&=65535,h+=a*d,m+=h>>>16,h&=65535,h+=o*u,m+=h>>>16,h&=65535,m+=t*p+r*d+a*u+o*s,m&=65535,l(g<<16|_,m<<16|h,this.unsigned)},D.mul=D.multiply,D.divide=function(e){if(i(e)||(e=f(e)),e.isZero())throw Error(`division by zero`);if(n)return!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1?this:l((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(this.isZero())return this.unsigned?b:y;var t,r,a;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return b;if(e.gt(this.shru(1)))return S;a=b}else{if(this.eq(E))return e.eq(x)||e.eq(C)?E:e.eq(E)?x:(t=this.shr(1).div(e).shl(1),t.eq(y)?e.isNegative()?x:C:(r=this.sub(e.mul(t)),a=t.add(r.div(e)),a));if(e.eq(E))return this.unsigned?b:y;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();a=y}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),s=o<=48?1:u(2,o-48),d=c(t),p=d.mul(e);p.isNegative()||p.gt(r);)t-=s,d=c(t,this.unsigned),p=d.mul(e);d.isZero()&&(d=x),a=a.add(d),r=r.sub(p)}return a},D.div=D.divide,D.modulo=function(e){return i(e)||(e=f(e)),n?l((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},D.mod=D.modulo,D.rem=D.modulo,D.not=function(){return l(~this.low,~this.high,this.unsigned)},D.and=function(e){return i(e)||(e=f(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},D.or=function(e){return i(e)||(e=f(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},D.xor=function(e){return i(e)||(e=f(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},D.shiftLeft=function(e){return i(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):l(0,this.low<<e-32,this.unsigned)},D.shl=D.shiftLeft,D.shiftRight=function(e){return i(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},D.shr=D.shiftRight,D.shiftRightUnsigned=function(e){if(i(e)&&(e=e.toInt()),e&=63,e===0)return this;var t=this.high;if(e<32){var n=this.low;return l(n>>>e|t<<32-e,t>>>e,this.unsigned)}else if(e===32)return l(t,0,this.unsigned);else return l(t>>>e-32,0,this.unsigned)},D.shru=D.shiftRightUnsigned,D.shr_u=D.shiftRightUnsigned,D.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},D.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},D.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},D.toBytesLE=function(){var e=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},D.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}})),ha=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.CosmJSOfflineSigner=e.CosmJSOfflineSignerOnlyAmino=void 0;var n=class{constructor(e,t,n){this.chainId=e,this.keplr=t,this.signOptions=n}getAccounts(){return t(this,void 0,void 0,function*(){let e=yield this.keplr.getKey(this.chainId);return[{address:e.bech32Address,algo:`secp256k1`,pubkey:e.pubKey}]})}signAmino(e,n){return t(this,void 0,void 0,function*(){if(this.chainId!==n.chain_id)throw Error(`Unmatched chain id with the offline signer`);if((yield this.keplr.getKey(n.chain_id)).bech32Address!==e)throw Error(`Unknown signer address`);return yield this.keplr.signAmino(this.chainId,e,n,this.signOptions)})}sign(e,n){return t(this,void 0,void 0,function*(){return yield this.signAmino(e,n)})}};e.CosmJSOfflineSignerOnlyAmino=n,e.CosmJSOfflineSigner=class extends n{constructor(e,t,n){super(e,t,n)}signDirect(e,n){return t(this,void 0,void 0,function*(){if(this.chainId!==n.chainId)throw Error(`Unmatched chain id with the offline signer`);if((yield this.keplr.getKey(n.chainId)).bech32Address!==e)throw Error(`Unknown signer address`);return yield this.keplr.signDirect(this.chainId,e,n,this.signOptions)})}}})),ga=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.KeplrEnigmaUtils=void 0,e.KeplrEnigmaUtils=class{constructor(e,t){this.chainId=e,this.keplr=t}getPubkey(){return t(this,void 0,void 0,function*(){return yield this.keplr.getEnigmaPubKey(this.chainId)})}getTxEncryptionKey(e){return t(this,void 0,void 0,function*(){return yield this.keplr.getEnigmaTxEncryptionKey(this.chainId,e)})}encrypt(e,n){return t(this,void 0,void 0,function*(){return yield this.keplr.enigmaEncrypt(this.chainId,e,n)})}decrypt(e,n){return t(this,void 0,void 0,function*(){return yield this.keplr.enigmaDecrypt(this.chainId,e,n)})}}})),_a=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BUILD_VERSION=void 0,e.BUILD_VERSION=`0.12.313`})),va=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.metaId=e.KeplrLogoBase64=void 0,e.KeplrLogoBase64=`iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACPfSURBVHgBzV0L0B9VdT9nvy/vB6nVOg4GEx/VER3A1iqo9aMzFgWtoOhgsYaHYNV2lNEqxAdfmKHTakuDTge1FJK2tqOtGqoWFWti8TFSxGDriFSbIK+qgB95h+Tb09397+49r3t3/99/LT0zm//e9917fud3zr27SRB+EbKd1gAcOhFg/kSYmjoBiJ4JhMsB6LHFJetS+wfoAowOQOKnumGVUfSX+23Ba0uRfFaGsh6pNKDqP2PzQN5TbNxqjAeqi2CuWLuvAuU74eT1O+AXIAhDSaX0g+fBFL6ymHShfFhT5RvdknNLzsTIb+cChmzb2OJqJY8aQG9gaAUXaXLbOH0gL4mXmXHC/HYUv1thEWyDk9bPwQAyOQC2H1wHGb29uNtQdLcmFJBv2AsFAPVQJDQPlFBYFACpso7+kFm17g/9sUgr3QFWNI3VtQWO0KaCGXbDBLJwAFSKz2cLjtvglhNFGmr6NomgxEQdT1kYK8N0uzBwH3bosHJo3EKkD1ZG0X6ctAFEW6cAAiwYCAsDwM2HL4e8tHpa45a7NN2UUaxBmFAPmpdt+rGDq0zdrpP2I6yRig06ANHNHuAwjxlzFp67fhOMKeMBoLT6Kby+GHMGmklySVosJAO+ajK9LX6Uxl51eyqZp/tYvVcPbRklynQ7au913aaeBwLRz+6CDU4dhw2yvhVh++EzIcPvBOXXc+SXJz3LMVYeEblOYxKZMx/kF4V70aZPv+q+7ceUmaivHTu0hDSWqzwRWa4rAsTtcOuuM6Gn9APAzYfeVszsM8UAazoVCgDj1DELneqrBgrq/ilyKUFwFE2R8cX8UABD1OmaOx87pkw137gxoP9ssq91xfUZ+Pddl0MP6QbAVwt/Pw+boY+MCQzsquNY6VhCHUoGNeY4fUKjVLR9JdIC8IkxkTrqkerVPsNsHxCk17RUPtFstJw6tE2RfNAPl35Cs7XrSHcGhWPHADBWIJj25XJ8ipbJcUmlZR01Fs+bh0vg+eujBhwHQOnzoaD9pFAi25ZhD2XzPKmHNAAQyC/zHbCelFNGicBPpxP8jZFA0El37xyaHA8oqm8uBGfB89Zv84p8AJTRPuD24m4dpKSLAdhPPGKv8wx4+1l8dO/vtVWL1PvQKMIIxOtFo3VKKy9y4JNmkboflef2N5K5gglO8nYHfgxAhfJHwQQkL9EmXgfHqNcnLkBSwWAPEUFfrG3Xs6k8b+dg66N6RpS7DNMvAp+vwTXrB2Lt7dqugWm4HhyxANhe+P2U5fcBQy0mYh+nntOmL0BcoMREK8vNr8uiCgnKkAEixIO5Zo41IOKKrgPNWFvw1liuVDWHvNi+f/NHs6BErmdJ/Tnugt5Clhl5mVPdUnCkLnMhfVwC8hUz5c69qifm4vYBLrWT285Jq7aUdAOM4ut02ycAkLECilgGb1+1naNcugLJAPPF1iFlid7FxmjH6VO3R99d2zdOwa2k+gNpNVGGcObc5vPRExZvKFwxjahLil1olGf7qd0DgWIXjM+5Hbusg2syxMvVU9RSWv/R/tbvWyUflMZoQ9YwE6vfhxHK1ensy3HC6FlypG56ixZnBDJ1bf/2OwPeU8Qyeh6n5kDrGxZoGSA7CrMiqPEubjFdF5tTnzbGkrkoy+L5HgslGSbyPG4QR85YTp7PABi10sbqTTBIym8T2jnpvsV8EEwQ6EhG8Ha+ZtXHHHjk8M+hr1D7R1TQK1ftumIAtI1Nuo+Vpw+GAHod8rR5qXSqX5mOWzixcpanrIM8RhL9yP6UzM0fLljg1PVzIwY4cujMTovuQBVQD2tnc+zy2ynG6NoGdjJBbO5QWxdoa4aoj9fHwl46jIMBX6Tqt8+j/DwEixcswNsTJNYSwxVkzaIlcF55UwEAc9wwFgA8ZUQnYOt2AcN1b4mybvCh7IN6UH8zLx2ggVcnnY66BqpnxdcILDCaZ3Dn3/RK/nNJAGN7EUy9slkTwBsPeXZhJE3JuoicNn47jJhllwvoVe5RuaJ5Mz7avgCHTZutnBqzy0U0eXblKGIlRuaOHMnXT8ONB2d6Bo+9JeaeTJ2By9pyXslbQ8RRAUU6oI68sdOlpkikkSQIRxoPL4dadmgUSqHzURH5ukaOiqQS1kxPw4nTWfkFL/WDTEr6xR5xBY6v9NGqoFeJEu08BdcrHoDLFr7KQ9np2Glv/EKRSAYoCJQED0GDX2Q5wOYKajAuoW55N5UXAKA8m1mI+jvbUL+6CwGEKFdKQlHDmYRrNWBAgYMzAbZWG5IIZIASGpGTZ+eFdXEPGsf6yZs1wEUnTBeJYzrbmZyOwWgMBRZy7YlL4A1rp2Eh8m8PzsNp39yfrOMqE5i76FK0l1d0+tHjV8Hrj10KQ8h39x2Bk2/5WRisZCQ2HrXKU7GCmKDM6SpCmC9cQA7rus25n3TFEgMNY8U8mErEXIK2UOZvEdK0vvEpKwZT/l2H5uGc2x8S7KDHQzFPaDOC21LlvDCqF1xTmt06sX1JAMk0h8nqDAaICOOgp2BWiB20GZvfZU9bARufuhyGkFL5p9/6INx9KHdezTb7EwfhdQxAKV9LXqaQddOdf3Uu0ndKMIEet58eYIsKBeuIWT7P8sow0UazxGW/unw45R8slP/tB+HHxW87mAoMUbOBmZ4T/Y4h0ykAjSPj+Pxx23aOrQOvUmKgAMdVeaxXBwicJc5duwQ2Pm0Y5T98lODlheXfUyi/sXxyqF9s/2KULgJhgLRPlDKNOSxIJqJ/VGUTMIDxgaQsGsaZq7Q03u7Zx0zDNSesgiGkVP4ZtxSWfyAHHnsYP68WBhNl4NQEVZMzc3M3PZSv71O3nYAecxIXULdHM5Zfry1DVpHS8z5u+RR8/uTOzVJvOffbP4fv7Tka37K2WU5+m9Of+jFxNz3pKeBCqX9S2hd9eXSfGqu1NpTbKrS3xy2fhs+dshqOWTTMjN/63T3w9QcfsSwIvrI9RWOPOn3FBoEdgj0QM57SaTIwELjbz9Y1CDfgLzKKotFN2efaFVPwuResLkDQ/2/QpWTj9/bCP9x9UG4x7UwgrsT+9E88Va0DgbfJmx4jXpAt3WETZThem7HEYYCkwgnc7TLPO2YxwudeOJzy//TO/fDRXQeqIcLcmoHNDE0ZueWx9s7alm8BHYabyAXELDpeFmk3qRsa0wWkqLdRzmdfdMxgyv/AD/bDBwsA8LDDzmYhjFDXEeBN1FUgL2V6nMVfqL+vymI0HWPDvlK6gJx3qG4JBPLdOSj5y+euLKL+KRhCKuXfsb+eQ+phVZlQFgoqT0vsYcnNMjFAWslxIupL8UNbP+/DuoDE+CY+GMm7j18Gr3vSYhhCPvajg/Bn39+/YIvXRI9Obuvr2fOknILGz1guIAkOitdDb2ToZpQ+gqxrFJEPq2OsyVJ++QDvKpT/rmcugyHkE3cdgvfdvq+w/BBUsgFHWzyMW7ws8IHbMoMoGy+oFgzQ2/r1AkdamMlBhDUmdQEx9xJJe2UXP31pBYAh5BsPHIG33bqX+fwI9VcgAIguQKVQC4aktH0mK7V3CwsCo0EXQ2sPl4A0iebNsGYMce9F/rWc8+QlcOVJwxzxfm9uHs7/+sMOKBNb0Ja71cKaJrVyqWMr1rms4el7BoHUL6p3wJqyxDZvoF2ATuvAS4OgzH72L0/Blc8ZxvLv3p/Dq3fMwd4jsfUKGvLjIzU5cpuCH9WS2vz3k+4gMNKZmx1jBow9sGy3YMnB3eM2/jIGwrUrM9j6opWweoBTvlL5Z29/GPYeptbvV2M5oAuTJVtu6tQZ3ikOF17f61MUBul2AWQjUlccJccUjBEqXpDUMYAOsqIgqBf3uJUIn3nJquK0b/K9fqn813zlYbh3/zx7nsaeO/bwVRWKzlvWg3jMYILM2GgouhrvbWDKr8diRHTyqudldDEBA3Dl60+/YiA4rrD8T79k5WDKf+2/KuXrSL2OzsEtr6HClIuReiEvZjYUtf5Yi44YgEwSI/Vic9KBHjpbtElZoF1bh/Kb8Zo6q4sj3utnVlT0P6nsKXz9a7/8MNyzb/RaF1Nb3fYolsRcRb0u6mfZsnM1mhc7RCTxMigR+EWsWhUn66EpmEB4n6RcDFusMvtDL1wOz3rM5Kd8lfJvKix/b171G+iVfV6uwc7+hORxjZ/y2k26hNYFJIIC36ezQxVj3Y5FMCsQljuBYP1dBbbjgutTr3j+MnjpcYtgCLlo+174/oPz7nd8Md9vlOvRvicC1F3BHiWTuotpo8y+lBz17baOuCWHIYaIATzLZ+l3PGcpXHT8EhhC3vn1/fCt+4+MLF8xdgAitidzdcpnBU37VP+BDnNG1lNm9tAea1MwQI/V96iM2j9kFTYzTET/VXpCy9f9mMOeOv8dv7a0AsAQcsUtB+BT/3UYmtM9d0wBCt/3G8OJWQ7PoQ7r9PrukM6DID53t8wJUPSzSLTKv7SZ6r+XlG35OQDJeV307MUVAIaQq79zELb85yFBx9jhkxF4XT5pv36b79I7hngnsRGId2wXeox3AayOg2jZ3qe9NOoXLsiBxeZ52vpFsOmUYU75rr7tYAWACtA84FV/d6/ZiiaftfmXP7hleOuRUmaXtWtdu9ba4xzAt/IIgiMTEqDRwdoA4sUAzyqOeDfPDKf8D912cOTzXcrn/5SL3RLz8wkNDLHArnVTXNkOQHoDopZ+L4NUoOi5q0AK4UmNFXj5zQNOIDoGWLsqg2tftgJWL5mcYq7/j8Pw4VsPyrknAk7sEfwhv0kCo+4PIK3sCbbWvT8KxWYkPQEFDr5Ioh6SzUfmRhYq5ZB5mFep/E+eWZzyrZpc+Z/6wSNw5TcOmICPK5UrQdO8LjfH5R7tq/VzrR57Wjp248EFAEZHBp+2sQuNZA5kmroY67OntBZZXE88plD+WYXyV0+u/HKPf+lX9tf/hg60IBBKM0qH5FYU2bt6Ga+Q7ENXaOqxcUU+RMSNA6TEXYBAIEVHCdbAKK8pY/my7uhmcjXV/RYgXr0U4dozVgym/Ndv2xuOqVvF1kzAx3Zjgjgz+FtVBxie23DcgJOMZzq69oNAdFpRpLhRpqH80BxVQ5zAZxmprf+q314Gxz9u8vP98mj39z69F/YVr3UzV3HsX/5Cct2BOYl0QCHSAO62D2MKj+QDqDFNphX/HIBsD+gkRgMpCxeKl44sgITES5pJdwOXzyyF054y+RHvvXtq5R+i4JoSikT2Sdc4ls/7AkgDw+tL5IsOrIi+HVExgKVx25NUZJXWflDeKP9PJg8mAMDJa6eqa1Iplf+GT+2F+/bkYlGxy7qhiQ9AKCpm+e5a6TYAFgiNLaWAwCcVEV083ee7PI9SxL+pKw291a4J/PjHJej3+2hIpfx/rJWP2u+Dq1hUAPHKYuWectHz95ohmnyAxOt3nQFJSW4DvUFa6zZ5jdhPoMVJnWEFGuxAaCGyp/D1Gz7JLF9t9bjiW4tnrBVYQIqXj2OUJ9Ns/FT9UC+OgvRBkLZstRuwL3sUMJyI37iDR1v5nyiUP1e/0/don8Ac77b1HIYw7Vm5Trf16zw3Jqg7cllAVJaCrJ5fOJL4OUCkN49iWlZwJsb/QUSJ9kS88X8k77nxAPzgJ/PGvyOApG6eX2Y0ZcyHx2IFnQaQykHzKhj6uwMAP45ICgpg9NoGJg9/qP3D+RKHVD0Ir0b5xB8FFii/3r3jf45WZwiefxfWD5D09a2ylQFYJkD/lbhj+bFX596HIcbae4Oh/MeiSwCoC+ehOl4dXaq83raN8qm6qkWkum19VS9F2nqhHa/flj8KAFhVvCfY8rpVcOzqrJpDVs8nq+fE58fvm3q6LMtZ+ypd/8PMObtYm0zUleNnTV7RJiN5NX1lug/TNugCKX6FD0I0XLR/Nwl1IoaqTPh6aJnC97OPAgIKObY4Ov7wq1bCBX8/2vsLyua/nrU7ZdzCOXUbt8AeV7AF4Ni7gSrfNXXGEInlzaqOaut1Lb2x3PaqmYFknbYNYw3OAMgYAdu6MGIEePTk6Y+fgut+d1X15jBlKfwKLIDqitfNTFsYWXRj2YRifQwLGUu2rICCLSRDGJZoruiDardQKT0ovqH7AJYRMCTdw0jBRKG+6P/R3QI2UoLg2nNXVZ+Me/Ru6D8HV+GZqhdLY94oXbqczOmrAUqj6Ky9wKX+Biyesl2AejGAVToJpQsrdhTfx+pFjPD/BARXnb0y6ddDmVQAt9A4CLiF2jqZUlxbt7LuiDUbhTuxQtclqZ7EFVN6UHRQPHDFp6zeAwUsXO64fx6+f/88DCG//qRpmH3FingQSMFydVnMelv3kPt1Mt13zkDCrTfX1uwFh77VZ6kL60geGmW2SrRKh1ZxdX2+EMzqgS2Asfq2HiubgAH2FMHbH358P9z78xyGkFecsBhmf2eFQ//oAEJZsirLcnQZRLKDVbi2+Ma6W4t2ACKAwi8OQkIDnGgMwJXeBnQ0UiJnAREcEsn8PFg9VzaqsknjgPsemofzrt07GAheXoDg8lesgNjauL7U/MYBwxnFA4Z2N0gWSJnDKC1QuILreIFfgrmiMYB4QMkQyJQIudoViLYUKJ9NPjBFzQiTSN3vfQ/lcP6AIDjjxMXwxt9c5isuB0PPoUzuCDKKW73IF+5EKY8snTcMk+UIOr7IHHCaqwEEKL/fXto1kKN4kooP9yRcBOigESQoJpEqfqjHvv/BHC74WHG2PxAI3jizFN744hoE4ARtpC8UytTKDb4bbKDYKLTD/4vtn1Kmr/AI9bcuIMEAMuADq/hcKr5hA7sbgPb8AEw+THwQxK3y/oIJLhwQBBcWILhwZpmlaQDDbD6FB+WiVm4uleqCh7T/t0wQ+mt2DfJswmOFpAuoJj8PMuBzjoa14jkbiLgh4iJaMMEE4ix6yQSX/M0+2Nvvf8PrlAsKEJRXbHdQLS4gWKrnQZhVbuMyLBMEV4COq8hUfCAOkhQr6CNhuwtw6B+aq6Z/swVkwDCgYFRv3EDbnkLw1/Q7gQj3U4995z1H4eKP7B0MBOefurS6hPVQ3OJH1tVY97juAMUOQlpveMfgsgCrZ+g+V+8mmnMA7xI+us3jAJFlwbrDwZBemPZUkEAywaQAaINNuRO5896j8KZr9gwGgvMKAJw3sxQs7aNRBDr5zfsDz2K5xWdkAWb8PmmLtkfBaOo4l97zy32+WlhB7aBiAgpRPXGrp+BCCMwZwKT/VFz7QiaXTNMo6M575+GqGw7AULLht5bC2ScvERQe/LwCgYkDwFV8AIV1IXrHIGMIeXCURRSOFGeF6DeB3jvm8L6awLwbbxO1IpDi79Rrv88/rVqwKOtqxuFf4Hz+lsNV3vvPWQFDyFtOXwb7DxLcdNsjclwIz1jFBM380CsPec1bRPkmEsX3EqFMfQdQj1Gl1bcCqdiqKRt9ENIRhYlPt7gy63RYeFIgYACpG9h8GMAFKCWwqxnjXwoQlD75vQOB4I9evbwa98u3HbEgYArwlOoqGqSSuUq08k1Z8wdZVXaotvx7ARRVgPtRaGPFlYRTPPcLWoKAFNbOWsGEboDCLyI4ChldJRM84ZcyuPC0Yf7W8DvPXl6A6iB8+duP+B+PAgchGoYSytfMIfItSMI9CmPUdUDUtyVj/YcRozIydc1XsvyvSCtAhIVijDCJ/gmES0GS8x39/f2Qvu4Lo7/pe8FAIHjTy5fCrvvmYdf981bxag58vaq/VAJ6DR2GwKBgzRyhTp0v1hE7rb8sN+8C+Nl+CN5U9C+2exBe9DSBIIA5OWy2Z+L7AD7egoVE0Kd3MPyVdpN3/Y0H4fovHoQhZMVShD+5eAU85QlTIZKv14ef3aMO3kgHfF4gh87BUNgpiLMBE+SpMckPDjPgR778DEAp0L4QIrGft9E/2F0EA5moN4FUFuPswVGN1cydg2DLF4YDwR9ftAKe3IIAROQtlQRW+Y1CnQMgpLB70DsFAYhcbTnNhe6VgTr4QXbxMv5CSCyuOCCSdTWrCOXzwyeYQJwxtNXJvADaLQUItt44EAiWIVx5cQCBVnQzPn9LGBSrLdwHiGYC8W0Ce2bzIanaRsqTQHVUKA6EnPyWEbhbiB3wcErWboIrblIhClSfx6xf543qlwD44i2PwBBSguDSDcvgV4pAs6F1CQKb1m8BAzBip4XOsS8HRf1hiKdwvRajgyClcO9wJ5z1M0bglt+Ape2HjJsQ4NBtJwSBfDAC8ckZgXNULK8P/N0++NJAICiVf8XvL69+o0xAMYrW1oxuHXtSKNmAuxOPETgzRF4Hg/kuwGUEQanE3AUYyvfoH5irmESQHMYhAP1No11gaOf7wb/dBzd9azgQbHrzcni8AAE6vtuCI+4KGDu0v5HXx8S/J9Ag0i6gUaa6+CLqKF+k2Y7A+9QLybbnjDGY8sm3LB6feGXBHQB85J/2w3/fM8z3hY8rlH/5m2NM4LgCBxwyKPR3ArZfZweQg/92MHd2AeaNoFIoGAVDS/tim9fSv1YEmLyJ4wBHuT4o1GtrVbb/AMG7rt4zHAgeg/D+N6fdgWUCT9mJdC4BYdmAMYL7QQhJWnQ/BqnuLUBQvDACNx7gfr/px7y9m1AaBRrQUowVKFJGcKAAwaWbhwXBe9/CQeBTsssE0AUGSCievx2044W3gWLhyFI8W9SUu/B//X5MX0NI2SfUDwksluFj1L8tG2hg1HXKFz1Xfmwv/OShHIaQEgTveesyWLlMWXvzbsADI3QEgDCqk0HcDRhXQDYYzbQC2rNzT8kqyPKULH99cBhWmEQobukcCLbMAUEe8n76QA7v+Ys98NMHhwHBYwsQXFaAoDw0atY46grAugV7VuDFDd5BkWQY831g6xdzbalkYwLQ0T65jBC7tCsRY00g2DGmPgrWtN+CEzgQAH5WgOC9m4cDwXHHZnDpHywdgUAoawSKkVVbKpdWa1nD21FkAhTy7IAbo38OIBTmpzllBn9PCTYg8W2gYJIJpH351GHt0IJPPhN/Bg2KBgTvK5jgZwOC4N0tCOxcpc9mbAGS8vl2L27pum/rCvxPwtj+3rNYewIYgjmP8mOAGWQXQBHaB3DB5oOEDGB4+oECBO+/au9gIFhbgOCcVy1ulZUBRIErlaqVz+YLUMcUGJgEAngyVSfUjVI+WMv3joUTlwSBBdEg7wIgNhc+jlIsOCAweSSA8ECh/A9cs6/aJQwhp/zGFJx/7hJB+RiNA/wj5fBMXf4fAWPvBLQFxZSoF9ZjBzfqhyYPJO3za0JxT/rEAkllgqNgrvSYm7jr7nnYVDDBUCA4+XlTsOHcxc6cOX2jejaUVk/xj0hjShduwQv8YoEaZwYc81fcK2VMJFx5RBBnJRJj6zwNertLGN2XILjiz/fCUFKC4DWvXhQUCRbEbkxAUvkcIPotoa3DyooH3u1ZPTp5niLdxQa58CiYILKrmFTacSnQOTgWLhSsqB+00lUf9f2PCxB8dMtwXxqfOjMNp58+zeicWzFjBYi4AbIuhFt9iAVQX7vLfyZubqTRkbDP/UIe+xYJeT7VeaoMdV/8vv58zC1boAhKbC8KH03Vcxt9ikWj7/NI1eV56PTJ84o/bv7GI1X64vOH+V/HGwB88fPzzazDuoJe28AEIVXfI69X35G/xsVT7y6Cw/nbMWL1bcPmXm8RAaJM4ZWjYgnk/S9YSLKO+vXdQqQNYxFxD4xB2P3XChB8/JPDfFBSyssKELz0jGlh8dbaI+cCAGaL6AWGgiHy/OGseKW406VwABsQ6bRSZnpRWT1w6i5QAm0z5bDf0RheGdk0gOMinGdjc/7STYdh22cPw1Dy0tOnAgj0BZHL1LUHQ55rAMId0zngzoyU1slShvnyl6Vj4rkCYBNvZM/+HO776Xy0fUr27a8nQe0foAiwnjuNbuqfoHRFp8hA1bqFhIso/rjhnw9V9y84ZbEaPS6YSD/1aRncRPVXxsjmRz71hzz2J/rz4HmLpvKduG5m15psesmuIr3Gq9Tmad+CctHMwOoX0VlkZGlWnqGth6pepTjeDmsKFG0w5LM8Xcek2X1m8oMSwj3KOl66XYtYHQBQ9SUArLLl3yaSoOe/tsZINl2TYbZ7x/q5Auw7Y9G/jgOi9B6heoz1BX7fyPLRqR/GIvC3dqB2IHo8SrsCfWYAcm7YsQayL5AuVdM58XroUH1sO4c9KV+eBag2O8o5jf5PJMpvcM8DYLSlEucAwO75r8oX5wcQ+gvbNCetFRgBA0/LQyevPjlgIqU4smNqcLC2QnnqXgNDKpqxB0HEv7vKkuWij0h9J1+u7fzWFgB5fmRLkTmnAxyMKMSz+CgLEFtQ3Z/pvwnmNIiYYsAfpwGDzzAeOLwzgcAC4OQZxUMcCEbJntJArrWsLykf1TomlQ8g3IB3wdKpbdAAYOQG8q3tbBxlcaoW9M7y3bYAUQWio0itqFGaAiM5fcrfUE8zhQUPBwaFcfXYoMbQz9z2EQGCkzdqg37dpr+YwgEiSsZ2HVNXcQC0ZXYzzpV12/9mK4fpzRA5yxcW2Ty5dgcgT/hSCtMg8KzaWnejFP4iSS2+AA654IjRLweB159v5WT6cEHi5MVo35ajVTQHQ9sO3efyrnmETc10WgDs3vGE3QUMtoIW9RDIHyhxL3wmB4UBiV3wuHWrcYAilg2tQtH0TfLZmOW3z8jrseqBtkkCBdSCewpI5ZEcW5eDUqqpp0ACrL1mkuJ4ecvsR3B380ziP9qbh/lZ5LEAG7BdDAUE9PIBXEsWymFWaRgF4sxh5iP6CGNxANq5BK0KyoUwL48BWrCQbMfn4wJB5RlWaMvQdRVCycz6gXwlx/sAODIVrL8UAYAiFthdLObVYmYeGNRDg14MDwzk1ImAJSjOWSmlKM/ivb5QK1gwB5m6fLymHJ3n5n256+PVB3BZIZRhWDOSoNd169rmAgDDMDnRJm79AMqgGnnqi+/eXjSYMf9tCWvRDtKkEUUdrMsWknYPfrC2glRdVi+L5MfSmXfAg/WHGTwPMHIwNHrDljoQAq8viNeXOwFO8+weffp39LZ7419l61URuP/X6jQePb/4Ea6glZYOQ3r0GywWDa3ruvIXY1Zt6vboUyccJmiExwg8NhCflEFiTvwZmoS2fgLr35Xlo1fGWFNavQoKHRfguITdeARPBUdcANxRuALK6Hyehx4Q2H0zIVB5DTVDT1Dwh5V9gPXtjrjBHuhFjIHYWg9XgrwnoTTpEqxitSEZZXvP0tZBoVT3eVQ7nl/M9JLLtkjqbyT6vy3/aMdx24jwEr3OGEO/p8iExQswgO3Tt2w2XlUWwKTHG6XJmQdZVmjmq8qE8kDuNjQQBUCbbK1wXYc/k2KF6DMDuFs/DyB15U0b/xq3QUSS/932D29+4uZiDTeBY/3Jew8kGkg8EWMHSPQtWIHMYsu+nc7IB2mUaUi2bccin/lilg9OHjplmkUA4pauJew0aNNl107NQkI6/7/1H35t7SyWINCKid0n8jymAFL5dabew7t9eQN6IHRcDjptkfz+uFW7lqyUjo5yXZ9f5aFsCw6LJIwHI78EdMll16WVX0onAEq5swBBcUpwVtHtbnM6qBYee1ovn2y8rnr6SD+h3BschOLCHC3di04pbX1cXJB6Fh5bm4iSfdqHliF0//XvHOV41sbrpjZDD+kFgFLuvHn9tmxq/tQRCEA+gHgKiitIC7N+jNVXykqCBqQ7kP6QlKJ5G9uXl5e8F2mPUfw2xuJTcwMHyBwQ5SveHE/auCXu87v67yXPeOFds8XG+fK2E2STQp7HPoRo6tS/sX08r8t/Rx9moO3D1BmN2/ccoK0H3pkAqnbe3r9Jh7Lmr3G19I7+fj9jtXg5APoflMTv54qA9+rLtnRTvpbeDMDljq89qQDA/PoCclurjJTlQsQ3R9jBixMMPZtxpBWhx0LuL7kW6QpnmQgbua5Al3fWw7Y8ZZ2BBXDLI4QnLUT5vJ8FyzNmdq3DPJstrOaVxZzX8M/DpNWjYgeInvjpOpmyWvAYAsPiZq61g3P6J63bsoG1/Axi+d5p3uhhsohFC+aA0IanQbSDJrf8imvrPGSbZyP7+74yMQAaKb8tXA5TZxYdbiiumapzAQAIx8WuYiDqBlpqb8vRAoClFwYApSg256BYHwCZUOSkAJC/DAAFzcPO4u6Go5BtKRQ/BwPIYADQ8qyZXTMZZCcW+4UXF6OsyZDWFQ+8DqKKWTgAMhcI4wHAKLatE+wuCoC6LK5cDwCoACbKdxd9FgrGncUrnNtHv9M7h1I6l/8FAVO2ym5DPSIAAAAASUVORK5CYII=`,e.metaId=`d_2hxd99brRo`})),ya=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=`ffffffff-ffff-ffff-ffff-ffffffffffff`})),ba=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=`00000000-0000-0000-0000-000000000000`})),xa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i})),Sa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=xa();function n(e){return typeof e==`string`&&t.default.test(e)}e.default=n})),Ca=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Sa();function n(e){if(!(0,t.default)(e))throw TypeError(`Invalid UUID`);let n;return Uint8Array.of((n=parseInt(e.slice(0,8),16))>>>24,n>>>16&255,n>>>8&255,n&255,(n=parseInt(e.slice(9,13),16))>>>8,n&255,(n=parseInt(e.slice(14,18),16))>>>8,n&255,(n=parseInt(e.slice(19,23),16))>>>8,n&255,(n=parseInt(e.slice(24,36),16))/1099511627776&255,n/4294967296&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255)}e.default=n})),wa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unsafeStringify=void 0;var t=Sa(),n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));function r(e,t=0){return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+`-`+n[e[t+4]]+n[e[t+5]]+`-`+n[e[t+6]]+n[e[t+7]]+`-`+n[e[t+8]]+n[e[t+9]]+`-`+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}e.unsafeStringify=r;function i(e,n=0){let i=r(e,n);if(!(0,t.default)(i))throw TypeError(`Stringified UUID is invalid`);return i}e.default=i})),Ta=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t,n=new Uint8Array(16);function r(){if(!t){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);t=crypto.getRandomValues.bind(crypto)}return t(n)}e.default=r})),Ea=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.updateV1State=void 0;var t=Ta(),n=wa(),r={};function i(e,i,s){let c,l=e?._v6??!1;if(e){let t=Object.keys(e);t.length===1&&t[0]===`_v6`&&(e=void 0)}if(e)c=o(e.random??e.rng?.()??(0,t.default)(),e.msecs,e.nsecs,e.clockseq,e.node,i,s);else{let e=Date.now(),n=(0,t.default)();a(r,e,n),c=o(n,r.msecs,r.nsecs,l?void 0:r.clockseq,l?void 0:r.node,i,s)}return i??(0,n.unsafeStringify)(c)}function a(e,t,n){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=n.slice(10,16),e.node[0]|=1,e.clockseq=(n[8]<<8|n[9])&16383),e.msecs=t,e}e.updateV1State=a;function o(e,t,n,r,i,a,o=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!a)a=new Uint8Array(16),o=0;else if(o<0||o+16>a.length)throw RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);t??=Date.now(),n??=0,r??=(e[8]<<8|e[9])&16383,i??=e.slice(10,16),t+=0xb1d069b5400;let s=((t&268435455)*1e4+n)%4294967296;a[o++]=s>>>24&255,a[o++]=s>>>16&255,a[o++]=s>>>8&255,a[o++]=s&255;let c=t/4294967296*1e4&268435455;a[o++]=c>>>8&255,a[o++]=c&255,a[o++]=c>>>24&15|16,a[o++]=c>>>16&255,a[o++]=r>>>8|128,a[o++]=r&255;for(let e=0;e<6;++e)a[o++]=i[e];return a}e.default=i})),Da=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ca(),n=wa();function r(e){let r=i(typeof e==`string`?(0,t.default)(e):e);return typeof e==`string`?(0,n.unsafeStringify)(r):r}e.default=r;function i(e){return Uint8Array.of((e[6]&15)<<4|e[7]>>4&15,(e[7]&15)<<4|(e[4]&240)>>4,(e[4]&15)<<4|(e[5]&240)>>4,(e[5]&15)<<4|(e[0]&240)>>4,(e[0]&15)<<4|(e[1]&240)>>4,(e[1]&15)<<4|(e[2]&240)>>4,96|e[2]&15,e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}})),Oa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){return n(i(a(e),e.length*8))}function n(e){let t=new Uint8Array(e.length*4);for(let n=0;n<e.length*4;n++)t[n]=e[n>>2]>>>n%4*8&255;return t}function r(e){return(e+64>>>9<<4)+14+1}function i(e,t){let n=new Uint32Array(r(t)).fill(0);n.set(e),n[t>>5]|=128<<t%32,n[n.length-1]=t,e=n;let i=1732584193,a=-271733879,s=-1732584194,c=271733878;for(let t=0;t<e.length;t+=16){let n=i,r=a,p=s,m=c;i=l(i,a,s,c,e[t],7,-680876936),c=l(c,i,a,s,e[t+1],12,-389564586),s=l(s,c,i,a,e[t+2],17,606105819),a=l(a,s,c,i,e[t+3],22,-1044525330),i=l(i,a,s,c,e[t+4],7,-176418897),c=l(c,i,a,s,e[t+5],12,1200080426),s=l(s,c,i,a,e[t+6],17,-1473231341),a=l(a,s,c,i,e[t+7],22,-45705983),i=l(i,a,s,c,e[t+8],7,1770035416),c=l(c,i,a,s,e[t+9],12,-1958414417),s=l(s,c,i,a,e[t+10],17,-42063),a=l(a,s,c,i,e[t+11],22,-1990404162),i=l(i,a,s,c,e[t+12],7,1804603682),c=l(c,i,a,s,e[t+13],12,-40341101),s=l(s,c,i,a,e[t+14],17,-1502002290),a=l(a,s,c,i,e[t+15],22,1236535329),i=u(i,a,s,c,e[t+1],5,-165796510),c=u(c,i,a,s,e[t+6],9,-1069501632),s=u(s,c,i,a,e[t+11],14,643717713),a=u(a,s,c,i,e[t],20,-373897302),i=u(i,a,s,c,e[t+5],5,-701558691),c=u(c,i,a,s,e[t+10],9,38016083),s=u(s,c,i,a,e[t+15],14,-660478335),a=u(a,s,c,i,e[t+4],20,-405537848),i=u(i,a,s,c,e[t+9],5,568446438),c=u(c,i,a,s,e[t+14],9,-1019803690),s=u(s,c,i,a,e[t+3],14,-187363961),a=u(a,s,c,i,e[t+8],20,1163531501),i=u(i,a,s,c,e[t+13],5,-1444681467),c=u(c,i,a,s,e[t+2],9,-51403784),s=u(s,c,i,a,e[t+7],14,1735328473),a=u(a,s,c,i,e[t+12],20,-1926607734),i=d(i,a,s,c,e[t+5],4,-378558),c=d(c,i,a,s,e[t+8],11,-2022574463),s=d(s,c,i,a,e[t+11],16,1839030562),a=d(a,s,c,i,e[t+14],23,-35309556),i=d(i,a,s,c,e[t+1],4,-1530992060),c=d(c,i,a,s,e[t+4],11,1272893353),s=d(s,c,i,a,e[t+7],16,-155497632),a=d(a,s,c,i,e[t+10],23,-1094730640),i=d(i,a,s,c,e[t+13],4,681279174),c=d(c,i,a,s,e[t],11,-358537222),s=d(s,c,i,a,e[t+3],16,-722521979),a=d(a,s,c,i,e[t+6],23,76029189),i=d(i,a,s,c,e[t+9],4,-640364487),c=d(c,i,a,s,e[t+12],11,-421815835),s=d(s,c,i,a,e[t+15],16,530742520),a=d(a,s,c,i,e[t+2],23,-995338651),i=f(i,a,s,c,e[t],6,-198630844),c=f(c,i,a,s,e[t+7],10,1126891415),s=f(s,c,i,a,e[t+14],15,-1416354905),a=f(a,s,c,i,e[t+5],21,-57434055),i=f(i,a,s,c,e[t+12],6,1700485571),c=f(c,i,a,s,e[t+3],10,-1894986606),s=f(s,c,i,a,e[t+10],15,-1051523),a=f(a,s,c,i,e[t+1],21,-2054922799),i=f(i,a,s,c,e[t+8],6,1873313359),c=f(c,i,a,s,e[t+15],10,-30611744),s=f(s,c,i,a,e[t+6],15,-1560198380),a=f(a,s,c,i,e[t+13],21,1309151649),i=f(i,a,s,c,e[t+4],6,-145523070),c=f(c,i,a,s,e[t+11],10,-1120210379),s=f(s,c,i,a,e[t+2],15,718787259),a=f(a,s,c,i,e[t+9],21,-343485551),i=o(i,n),a=o(a,r),s=o(s,p),c=o(c,m)}return Uint32Array.of(i,a,s,c)}function a(e){if(e.length===0)return new Uint32Array;let t=new Uint32Array(r(e.length*8)).fill(0);for(let n=0;n<e.length;n++)t[n>>2]|=(e[n]&255)<<n%4*8;return t}function o(e,t){let n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function s(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,i,a){return o(s(o(o(t,e),o(r,a)),i),n)}function l(e,t,n,r,i,a,o){return c(t&n|~t&r,e,t,i,a,o)}function u(e,t,n,r,i,a,o){return c(t&r|n&~r,e,t,i,a,o)}function d(e,t,n,r,i,a,o){return c(t^n^r,e,t,i,a,o)}function f(e,t,n,r,i,a,o){return c(n^(t|~r),e,t,i,a,o)}e.default=t})),ka=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.URL=e.DNS=e.stringToBytes=void 0;var t=Ca(),n=wa();function r(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}e.stringToBytes=r,e.DNS=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,e.URL=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function i(e,i,a,o,s,c){let l=typeof a==`string`?r(a):a,u=typeof o==`string`?(0,t.default)(o):o;if(typeof o==`string`&&(o=(0,t.default)(o)),o?.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);let d=new Uint8Array(16+l.length);if(d.set(u),d.set(l,u.length),d=i(d),d[6]=d[6]&15|e,d[8]=d[8]&63|128,s){if(c||=0,c<0||c+16>s.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let e=0;e<16;++e)s[c+e]=d[e];return s}return(0,n.unsafeStringify)(d)}e.default=i})),Aa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.URL=e.DNS=void 0;var t=Oa(),n=ka(),r=ka();Object.defineProperty(e,`DNS`,{enumerable:!0,get:function(){return r.DNS}}),Object.defineProperty(e,`URL`,{enumerable:!0,get:function(){return r.URL}});function i(e,r,i,a){return(0,n.default)(48,t.default,e,r,i,a)}i.DNS=n.DNS,i.URL=n.URL,e.default=i})),ja=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}})),Ma=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ja(),n=Ta(),r=wa();function i(e,i,a){if(t.default.randomUUID&&!i&&!e)return t.default.randomUUID();e||={};let o=e.random??e.rng?.()??(0,n.default)();if(o.length<16)throw Error(`Random bytes length must be >= 16`);if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,i){if(a||=0,a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)i[a+e]=o[e];return i}return(0,r.unsafeStringify)(o)}e.default=i})),Na=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function n(e,t){return e<<t|e>>>32-t}function r(e){let r=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520],a=new Uint8Array(e.length+1);a.set(e),a[e.length]=128,e=a;let o=e.length/4+2,s=Math.ceil(o/16),c=Array(s);for(let t=0;t<s;++t){let n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[t*64+r*4]<<24|e[t*64+r*4+1]<<16|e[t*64+r*4+2]<<8|e[t*64+r*4+3];c[t]=n}c[s-1][14]=(e.length-1)*8/2**32,c[s-1][14]=Math.floor(c[s-1][14]),c[s-1][15]=(e.length-1)*8&4294967295;for(let e=0;e<s;++e){let a=new Uint32Array(80);for(let t=0;t<16;++t)a[t]=c[e][t];for(let e=16;e<80;++e)a[e]=n(a[e-3]^a[e-8]^a[e-14]^a[e-16],1);let o=i[0],s=i[1],l=i[2],u=i[3],d=i[4];for(let e=0;e<80;++e){let i=Math.floor(e/20),c=n(o,5)+t(i,s,l,u)+d+r[i]+a[e]>>>0;d=u,u=l,l=n(s,30)>>>0,s=o,o=c}i[0]=i[0]+o>>>0,i[1]=i[1]+s>>>0,i[2]=i[2]+l>>>0,i[3]=i[3]+u>>>0,i[4]=i[4]+d>>>0}return Uint8Array.of(i[0]>>24,i[0]>>16,i[0]>>8,i[0],i[1]>>24,i[1]>>16,i[1]>>8,i[1],i[2]>>24,i[2]>>16,i[2]>>8,i[2],i[3]>>24,i[3]>>16,i[3]>>8,i[3],i[4]>>24,i[4]>>16,i[4]>>8,i[4])}e.default=r})),Pa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.URL=e.DNS=void 0;var t=Na(),n=ka(),r=ka();Object.defineProperty(e,`DNS`,{enumerable:!0,get:function(){return r.DNS}}),Object.defineProperty(e,`URL`,{enumerable:!0,get:function(){return r.URL}});function i(e,r,i,a){return(0,n.default)(80,t.default,e,r,i,a)}i.DNS=n.DNS,i.URL=n.URL,e.default=i})),Fa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=wa(),n=Ea(),r=Da();function i(e,i,a){e??={},a??=0;let o=(0,n.default)({...e,_v6:!0},new Uint8Array(16));if(o=(0,r.default)(o),i){if(a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;e++)i[a+e]=o[e];return i}return(0,t.unsafeStringify)(o)}e.default=i})),Ia=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ca(),n=wa();function r(e){let r=i(typeof e==`string`?(0,t.default)(e):e);return typeof e==`string`?(0,n.unsafeStringify)(r):r}e.default=r;function i(e){return Uint8Array.of((e[3]&15)<<4|e[4]>>4&15,(e[4]&15)<<4|(e[5]&240)>>4,(e[5]&15)<<4|e[6]&15,e[7],(e[1]&15)<<4|(e[2]&240)>>4,(e[2]&15)<<4|(e[3]&240)>>4,16|(e[0]&240)>>4,(e[0]&15)<<4|(e[1]&240)>>4,e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}})),La=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.updateV7State=void 0;var t=Ta(),n=wa(),r={};function i(e,i,s){let c;if(e)c=o(e.random??e.rng?.()??(0,t.default)(),e.msecs,e.seq,i,s);else{let e=Date.now(),n=(0,t.default)();a(r,e,n),c=o(n,r.msecs,r.seq,i,s)}return i??(0,n.unsafeStringify)(c)}function a(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}e.updateV7State=a;function o(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}e.default=i})),Ra=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Sa();function n(e){if(!(0,t.default)(e))throw TypeError(`Invalid UUID`);return parseInt(e.slice(14,15),16)}e.default=n})),za=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.version=e.validate=e.v7=e.v6ToV1=e.v6=e.v5=e.v4=e.v3=e.v1ToV6=e.v1=e.stringify=e.parse=e.NIL=e.MAX=void 0;var t=ya();Object.defineProperty(e,`MAX`,{enumerable:!0,get:function(){return t.default}});var n=ba();Object.defineProperty(e,`NIL`,{enumerable:!0,get:function(){return n.default}});var r=Ca();Object.defineProperty(e,`parse`,{enumerable:!0,get:function(){return r.default}});var i=wa();Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return i.default}});var a=Ea();Object.defineProperty(e,`v1`,{enumerable:!0,get:function(){return a.default}});var o=Da();Object.defineProperty(e,`v1ToV6`,{enumerable:!0,get:function(){return o.default}});var s=Aa();Object.defineProperty(e,`v3`,{enumerable:!0,get:function(){return s.default}});var c=Ma();Object.defineProperty(e,`v4`,{enumerable:!0,get:function(){return c.default}});var l=Pa();Object.defineProperty(e,`v5`,{enumerable:!0,get:function(){return l.default}});var u=Fa();Object.defineProperty(e,`v6`,{enumerable:!0,get:function(){return u.default}});var d=Ia();Object.defineProperty(e,`v6ToV1`,{enumerable:!0,get:function(){return d.default}});var f=La();Object.defineProperty(e,`v7`,{enumerable:!0,get:function(){return f.default}});var p=Sa();Object.defineProperty(e,`validate`,{enumerable:!0,get:function(){return p.default}});var m=Ra();Object.defineProperty(e,`version`,{enumerable:!0,get:function(){return m.default}})})),Ba=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.BitcoinProvider=e.Keplr=e.EthereumProviderRpcError=void 0;var r=fa(),i=ma(),a=n(Vn()),o=n(W()),s=ha(),c=ga(),l=_a(),u=n(I()),d=va(),f=za(),p=class e extends Error{constructor(t,n,r){super(n),this.code=t,this.data=r,Object.setPrototypeOf(this,e.prototype)}};e.EthereumProviderRpcError=p,e.Keplr=class e{constructor(){this.enigmaUtils=new Map,this.version=l.BUILD_VERSION,this.mode=`extension`,this.defaultOptions={},this.ethereum=new h(this),this.starknet=void 0,this.bitcoin=new g(this)}static staticRequestMethod(e,t){let n=`ReactNativeWebView`in window,r=n?e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e))}:e=>{window.postMessage(e,window.location.origin)},a=n?e=>{if(e&&typeof e==`string`)try{return JSON.parse(e)}catch{}return e}:e=>e,o=new Uint8Array(8),s=Array.from(crypto.getRandomValues(o)).map(e=>e.toString(16)).join(``),c={type:window.keplrRequestMetaIdSupport?`proxy-request${d.metaId?`-${d.metaId}`:``}`:`proxy-request`,id:s,method:e,args:i.JSONUint8Array.wrap(t)};return new Promise((e,t)=>{let n=r=>{let o=a(r.data);if(!o||o.type!==`proxy-request-response`||o.id!==s)return;window.removeEventListener(`message`,n);let c=i.JSONUint8Array.unwrap(o.result);if(!c){t(Error(`Result is null`));return}if(c.error){t(Error(c.error));return}e(c.return)};window.addEventListener(`message`,n),r(c)})}requestMethod(t,n){return e.staticRequestMethod(t,n)}static getKeplr(n=1500){return t(this,void 0,void 0,function*(){yield m();let t=`ReactNativeWebView`in window,r=typeof navigator<`u`&&`userAgent`in navigator?navigator.userAgent.includes(`Firefox`):!1;if(!(!t&&!r&&window.keplrRequestMetaIdSupport==null))return new Promise((t,r)=>{let i=setTimeout(()=>{t(void 0)},n);e.staticRequestMethod(`ping`,[]).then(()=>{clearTimeout(i),t(new e)}).catch(n=>{(n?.message)?.includes(`Invalid method: ping`)?(clearTimeout(i),t(new e)):r(n)})})})}ping(){return t(this,void 0,void 0,function*(){yield this.requestMethod(`ping`,[])})}enable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`enable`,[e])})}disable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`disable`,[e])})}experimentalSuggestChain(e){return t(this,void 0,void 0,function*(){if(e.hideInUI)throw Error(`hideInUI is not allowed`);e.features?.includes(`stargate`)||e.features?.includes(`no-legacy-stdTx`),yield this.requestMethod(`experimentalSuggestChain`,[e])})}getKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKey`,[e])})}getKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKeysSettled`,[e])})}sendTx(e,n,r){return t(this,void 0,void 0,function*(){return`length`in n,yield this.requestMethod(`sendTx`,[e,n,r])})}signAmino(e,n,r,i={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signAmino`,[e,n,r,(0,a.default)(this.defaultOptions.sign??{},i)])})}signDirect(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirect`,[e,n,{bodyBytes:r.bodyBytes,authInfoBytes:r.authInfoBytes,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null},(0,a.default)(this.defaultOptions.sign??{},i)]),s=t.signed;return{signed:{bodyBytes:s.bodyBytes,authInfoBytes:s.authInfoBytes,chainId:s.chainId,accountNumber:o.default.fromString(s.accountNumber)},signature:t.signature}})}signDirectAux(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirectAux`,[e,n,{bodyBytes:r.bodyBytes,publicKey:r.publicKey,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null,sequence:r.sequence?r.sequence.toString():null},(0,a.default)({preferNoSetMemo:this.defaultOptions.sign?.preferNoSetMemo},i)]),s=t.signed;return{signed:{bodyBytes:s.bodyBytes,publicKey:s.publicKey||void 0,chainId:s.chainId,accountNumber:o.default.fromString(s.accountNumber),sequence:o.default.fromString(s.sequence)},signature:t.signature}})}signArbitrary(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signArbitrary`,[e,n,r])})}signICNSAdr36(e,t,n,r,i){return this.requestMethod(`signICNSAdr36`,[e,t,n,r,i])}verifyArbitrary(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`verifyArbitrary`,[e,n,r,i])})}signEthereum(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signEthereum`,[e,n,r,i])})}getOfflineSigner(e,t){return new s.CosmJSOfflineSigner(e,this,t)}getOfflineSignerOnlyAmino(e,t){return new s.CosmJSOfflineSignerOnlyAmino(e,this,t)}getOfflineSignerAuto(e,n){return t(this,void 0,void 0,function*(){return(yield this.getKey(e)).isNanoLedger?new s.CosmJSOfflineSignerOnlyAmino(e,this,n):new s.CosmJSOfflineSigner(e,this,n)})}suggestToken(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestToken`,[e,n,r])})}getSecret20ViewingKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getSecret20ViewingKey`,[e,n])})}getEnigmaPubKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaPubKey`,[e])})}getEnigmaTxEncryptionKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaTxEncryptionKey`,[e,n])})}enigmaEncrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaEncrypt`,[e,n,r])})}enigmaDecrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaDecrypt`,[e,n,r])})}getEnigmaUtils(e){if(this.enigmaUtils.has(e))return this.enigmaUtils.get(e);let t=new c.KeplrEnigmaUtils(e,this);return this.enigmaUtils.set(e,t),t}experimentalSignEIP712CosmosTx_v0(e,n,r,i,o={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`experimentalSignEIP712CosmosTx_v0`,[e,n,r,i,(0,a.default)(this.defaultOptions.sign??{},o)])})}getChainInfosWithoutEndpoints(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfosWithoutEndpoints`,[])})}changeKeyRingName({defaultName:e,editable:n=!0}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`changeKeyRingName`,[{defaultName:e,editable:n}])})}sendEthereumTx(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`sendEthereumTx`,[e,n])})}suggestERC20(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestERC20`,[e,n])})}getChainInfoWithoutEndpoints(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfoWithoutEndpoints`,[e])})}getStarknetKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKey`,[e])})}getStarknetKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKeysSettled`,[e])})}signStarknetTx(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetTx`,[e,n,r])})}signStarknetDeployAccountTransaction(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetDeployAccountTransaction`,[e,n])})}getBitcoinKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKey`,[e])})}getBitcoinKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKeysSettled`,[e])})}signPsbt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbt`,[e,n,r])})}signPsbts(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbts`,[e,n,r])})}__core__getAnalyticsId(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__getAnalyticsId`,[])})}__core__privilageSignAminoWithdrawRewards(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoWithdrawRewards`,[e,n,r])})}__core__privilageSignAminoDelegate(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoDelegate`,[e,n,r])})}__core__privilageSignAminoExecuteCosmWasm(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoExecuteCosmWasm`,[e,n,r])})}__core__webpageClosed(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__webpageClosed`,[])})}};var m=()=>document.readyState===`complete`?Promise.resolve():new Promise(e=>{let t=n=>{n.target&&n.target.readyState===`complete`&&(e(),document.removeEventListener(`readystatechange`,t))};document.addEventListener(`readystatechange`,t)}),h=class e extends u.default{constructor(n){if(super(),this.keplr=n,this.eip6963ProviderInfo={uuid:(0,f.v4)(),name:`Keplr`,rdns:`app.keplr`,icon:`data:image/png;base64,${d.KeplrLogoBase64}`},this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.isKeplr=!0,this.isMetaMask=!0,this._isConnected=!1,this._currentChainId=null,this._initProviderState=()=>t(this,void 0,void 0,function*(){let t=yield e.requestMethod(`request`,{method:`keplr_initProviderState`});if(t){let{currentEvmChainId:e,currentChainId:n,selectedAddress:r}=t;n!=null&&e!=null&&r!=null&&(this._handleConnect(e),this._handleChainChanged(e),this._currentChainId=n,this._handleAccountsChanged(r))}}),this._initProviderState(),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){if(this._currentChainId&&(yield n.getChainInfoWithoutEndpoints(this._currentChainId))){let e=null;try{e=(yield n.getKey(this._currentChainId)).ethereumHexAddress}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}})),window.addEventListener(`keplr_chainChanged`,e=>{if(e.detail.origin===window.location.origin){let t=e.detail.evmChainId;this._handleChainChanged(t)}}),window.addEventListener(`keplr_ethSubscription`,e=>{let t=e.detail.origin,n=e.detail.providerId;if(t===window.location.origin&&n===this.eip6963ProviderInfo?.uuid){let t=e.detail.data;this.emit(`message`,{type:`eth_subscription`,data:t})}}),this.eip6963ProviderInfo){let e=new CustomEvent(r.EIP6963EventNames.Announce,{detail:Object.freeze({info:this.eip6963ProviderInfo,provider:this})});window.addEventListener(r.EIP6963EventNames.Request,()=>window.dispatchEvent(e)),window.dispatchEvent(e)}}static requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=`ReactNativeWebView`in window,r=t?e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e))}:e=>{window.postMessage(e,window.location.origin)},a=t?e=>{if(e&&typeof e==`string`)try{return JSON.parse(e)}catch{}return e}:e=>e,o=new Uint8Array(8),s=Array.from(crypto.getRandomValues(o)).map(e=>e.toString(16)).join(``),c={type:window.keplrRequestMetaIdSupport?`proxy-request${d.metaId?`-${d.metaId}`:``}`:`proxy-request`,id:s,method:`ethereum`,args:i.JSONUint8Array.wrap(n),ethereumProviderMethod:e};return new Promise((e,t)=>{let n=r=>{let o=a(r.data);if(!o||o.type!==`proxy-request-response`||o.id!==s)return;window.removeEventListener(`message`,n);let c=i.JSONUint8Array.unwrap(o.result);if(!c){t(Error(`Result is null`));return}if(c.error){let e=c.error;t(e.code&&!e.module?new p(e.code,e.message,e.data):Error(e));return}e(c.return)};window.addEventListener(`message`,n),r(c)})})}_handleConnect(e){return t(this,void 0,void 0,function*(){if(!this._isConnected){this._isConnected=!0;let t=`0x${e.toString(16)}`;this.emit(`connect`,{chainId:t})}})}_handleDisconnect(){return t(this,void 0,void 0,function*(){this._isConnected&&(yield e.requestMethod(`request`,{method:`keplr_disconnect`}),this._isConnected=!1,this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.emit(`disconnect`))})}_handleChainChanged(e){return t(this,void 0,void 0,function*(){let t=`0x${e.toString(16)}`;t!==this.chainId&&(this.chainId=t,this.networkVersion=e.toString(10),this.emit(`chainChanged`,t))})}_handleAccountsChanged(e){return t(this,void 0,void 0,function*(){this.selectedAddress!==e&&(this.selectedAddress=e,e?this.emit(`accountsChanged`,[e]):this.emit(`accountsChanged`,[]))})}isConnected(){return this._isConnected}request({method:n,params:r,chainId:i}){return t(this,void 0,void 0,function*(){if(typeof n!=`string`)throw Error("Invalid paramater: `method` must be a string");return this._isConnected||(yield this._initProviderState()),yield e.requestMethod(`request`,{method:n,params:r,providerId:this.eip6963ProviderInfo?.uuid,chainId:i})})}enable(){return t(this,void 0,void 0,function*(){return yield e.requestMethod(`request`,{method:`eth_requestAccounts`})})}net_version(){return t(this,void 0,void 0,function*(){return yield e.requestMethod(`request`,{method:`net_version`})})}},g=class e extends u.default{constructor(e){super(),this.keplr=e,this._handleNetworkChanged=e=>t(this,void 0,void 0,function*(){this.emit(`networkChanged`,e)}),this._handleAccountsChanged=e=>t(this,void 0,void 0,function*(){e&&e.length>0?(this.emit(`accountChanged`,e),this.emit(`accountsChanged`,e)):(this.emit(`accountChanged`,[``]),this.emit(`accountsChanged`,[``]))}),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)})),window.addEventListener(`keplr_bitcoinChainChanged`,e=>t(this,void 0,void 0,function*(){if(e.detail.origin===window.location.origin){let t=e.detail.network,n=null;try{n=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleNetworkChanged(t),this._handleAccountsChanged(n)}})),window.addEventListener(`keplr_bitcoinAccountsChanged`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}))}static _requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=`ReactNativeWebView`in window,r=t?e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e))}:e=>{window.postMessage(e,window.location.origin)},a=t?e=>{if(e&&typeof e==`string`)try{return JSON.parse(e)}catch{}return e}:e=>e,o=new Uint8Array(8),s=Array.from(crypto.getRandomValues(o)).map(e=>e.toString(16)).join(``),c={type:window.keplrRequestMetaIdSupport?`proxy-request${d.metaId?`-${d.metaId}`:``}`:`proxy-request`,id:s,method:`bitcoin`,args:i.JSONUint8Array.wrap(n),bitcoinProviderMethod:e};return new Promise((e,t)=>{let n=r=>{let o=a(r.data);if(!o||o.type!==`proxy-request-response`||o.id!==s)return;window.removeEventListener(`message`,n);let c=i.JSONUint8Array.unwrap(o.result);if(!c){t(Error(`Result is null`));return}if(c.error){t(Error(c.error));return}e(c.return)};window.addEventListener(`message`,n),r(c)})})}getAccounts(){return e._requestMethod(`getAccounts`,[])}requestAccounts(){return t(this,void 0,void 0,function*(){return e._requestMethod(`requestAccounts`,[])})}disconnect(){return t(this,void 0,void 0,function*(){return e._requestMethod(`disconnect`,[])})}getNetwork(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getNetwork`,[])})}switchNetwork(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`switchNetwork`,[n])})}getChain(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getChain`,[])})}switchChain(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`switchChain`,[n])})}getPublicKey(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getPublicKey`,[])})}getBalance(){return t(this,void 0,void 0,function*(){return e._requestMethod(`getBalance`,[])})}getInscriptions(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`getInscriptions`,[n,r])})}signMessage(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`signMessage`,[n,r])})}sendBitcoin(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`sendBitcoin`,[n,r])})}pushTx(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`pushTx`,[n])})}pushPsbt(n){return t(this,void 0,void 0,function*(){return e._requestMethod(`pushPsbt`,[n])})}signPsbt(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`signPsbt`,[n,r])})}signPsbts(n,r){return t(this,void 0,void 0,function*(){return e._requestMethod(`signPsbts`,[n,r])})}getAddress(){return t(this,void 0,void 0,function*(){return(yield this.getAccounts())[0]})}connectWallet(){return t(this,void 0,void 0,function*(){return this.requestAccounts()})}};e.BitcoinProvider=g})),Va=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.KeplrFallback=void 0;var n=Ba();e.KeplrFallback=class extends n.Keplr{constructor(e){super(),this.onKeplrNotDetected=e,this.isKeplrDetected=null,this.onKeplrNotDetected&&n.Keplr.getKeplr(500).then(e=>{var t;e||(t=this.onKeplrNotDetected)==null||t.call(this)})}requestMethod(e,r){return t(this,void 0,void 0,function*(){if(this.isKeplrDetected??((yield n.Keplr.getKeplr(500))?this.isKeplrDetected=!0:this.isKeplrDetected=!1),this.isKeplrDetected)return n.Keplr.staticRequestMethod(e,r);{let t=window.keplr;if(t)return t[e](...r);throw Error(`Can't detect keplr fallback`)}})}}})),Ha=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Ba(),e),n(Va(),e)})),Ua=a(((e,t)=>{var n=(function(e){var t=1e7,r=7,i=9007199254740992,a=p(i),o=`0123456789abcdefghijklmnopqrstuvwxyz`,s=typeof BigInt==`function`;function c(e,t,n,r){return e===void 0?c[0]:t===void 0||+t==10&&!n?z(e):pe(e,t,n,r)}function l(e,t){this.value=e,this.sign=t,this.isSmall=!1}l.prototype=Object.create(c.prototype);function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}u.prototype=Object.create(c.prototype);function d(e){this.value=e}d.prototype=Object.create(c.prototype);function f(e){return-i<e&&e<i}function p(e){return e<1e7?[e]:e<0x5af3107a4000?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/0x5af3107a4000)]}function m(e){h(e);var n=e.length;if(n<4&&F(e,a)<0)switch(n){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function h(e){for(var t=e.length;e[--t]===0;);e.length=t+1}function g(e){for(var t=Array(e),n=-1;++n<e;)t[n]=0;return t}function _(e){return e>0?Math.floor(e):Math.ceil(e)}function v(e,n){var r=e.length,i=n.length,a=Array(r),o=0,s=t,c,l;for(l=0;l<i;l++)c=e[l]+n[l]+o,o=+(c>=s),a[l]=c-o*s;for(;l<r;)c=e[l]+o,o=+(c===s),a[l++]=c-o*s;return o>0&&a.push(o),a}function y(e,t){return e.length>=t.length?v(e,t):v(t,e)}function b(e,n){var r=e.length,i=Array(r),a=t,o,s;for(s=0;s<r;s++)o=e[s]-a+n,n=Math.floor(o/a),i[s]=o-n*a,n+=1;for(;n>0;)i[s++]=n%a,n=Math.floor(n/a);return i}l.prototype.add=function(e){var t=z(e);if(this.sign!==t.sign)return this.subtract(t.negate());var n=this.value,r=t.value;return t.isSmall?new l(b(n,Math.abs(r)),this.sign):new l(y(n,r),this.sign)},l.prototype.plus=l.prototype.add,u.prototype.add=function(e){var t=z(e),n=this.value;if(n<0!==t.sign)return this.subtract(t.negate());var r=t.value;if(t.isSmall){if(f(n+r))return new u(n+r);r=p(Math.abs(r))}return new l(b(r,Math.abs(n)),n<0)},u.prototype.plus=u.prototype.add,d.prototype.add=function(e){return new d(this.value+z(e).value)},d.prototype.plus=d.prototype.add;function x(e,n){var r=e.length,i=n.length,a=Array(r),o=0,s=t,c,l;for(c=0;c<i;c++)l=e[c]-o-n[c],l<0?(l+=s,o=1):o=0,a[c]=l;for(c=i;c<r;c++){if(l=e[c]-o,l<0)l+=s;else{a[c++]=l;break}a[c]=l}for(;c<r;c++)a[c]=e[c];return h(a),a}function S(e,t,n){var r;return F(e,t)>=0?r=x(e,t):(r=x(t,e),n=!n),r=m(r),typeof r==`number`?(n&&(r=-r),new u(r)):new l(r,n)}function C(e,n,r){var i=e.length,a=Array(i),o=-n,s=t,c,d;for(c=0;c<i;c++)d=e[c]+o,o=Math.floor(d/s),d%=s,a[c]=d<0?d+s:d;return a=m(a),typeof a==`number`?(r&&(a=-a),new u(a)):new l(a,r)}l.prototype.subtract=function(e){var t=z(e);if(this.sign!==t.sign)return this.add(t.negate());var n=this.value,r=t.value;return t.isSmall?C(n,Math.abs(r),this.sign):S(n,r,this.sign)},l.prototype.minus=l.prototype.subtract,u.prototype.subtract=function(e){var t=z(e),n=this.value;if(n<0!==t.sign)return this.add(t.negate());var r=t.value;return t.isSmall?new u(n-r):C(r,Math.abs(n),n>=0)},u.prototype.minus=u.prototype.subtract,d.prototype.subtract=function(e){return new d(this.value-z(e).value)},d.prototype.minus=d.prototype.subtract,l.prototype.negate=function(){return new l(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},d.prototype.negate=function(){return new d(-this.value)},l.prototype.abs=function(){return new l(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},d.prototype.abs=function(){return new d(this.value>=0?this.value:-this.value)};function w(e,n){var r=e.length,i=n.length,a=g(r+i),o=t,s,c,l,u,d;for(l=0;l<r;++l){u=e[l];for(var f=0;f<i;++f)d=n[f],s=u*d+a[l+f],c=Math.floor(s/o),a[l+f]=s-c*o,a[l+f+1]+=c}return h(a),a}function T(e,n){var r=e.length,i=Array(r),a=t,o=0,s,c;for(c=0;c<r;c++)s=e[c]*n+o,o=Math.floor(s/a),i[c]=s-o*a;for(;o>0;)i[c++]=o%a,o=Math.floor(o/a);return i}function E(e,t){for(var n=[];t-- >0;)n.push(0);return n.concat(e)}function D(e,t){var n=Math.max(e.length,t.length);if(n<=30)return w(e,t);n=Math.ceil(n/2);var r=e.slice(n),i=e.slice(0,n),a=t.slice(n),o=t.slice(0,n),s=D(i,o),c=D(r,a),l=y(y(s,E(x(x(D(y(i,r),y(o,a)),s),c),n)),E(c,2*n));return h(l),l}function O(e,t){return-.012*e-.012*t+15e-6*e*t>0}l.prototype.multiply=function(e){var n=z(e),r=this.value,i=n.value,a=this.sign!==n.sign,o;if(n.isSmall){if(i===0)return c[0];if(i===1)return this;if(i===-1)return this.negate();if(o=Math.abs(i),o<t)return new l(T(r,o),a);i=p(o)}return O(r.length,i.length)?new l(D(r,i),a):new l(w(r,i),a)},l.prototype.times=l.prototype.multiply;function k(e,n,r){return e<t?new l(T(n,e),r):new l(w(n,p(e)),r)}u.prototype._multiplyBySmall=function(e){return f(e.value*this.value)?new u(e.value*this.value):k(Math.abs(e.value),p(Math.abs(this.value)),this.sign!==e.sign)},l.prototype._multiplyBySmall=function(e){return e.value===0?c[0]:e.value===1?this:e.value===-1?this.negate():k(Math.abs(e.value),this.value,this.sign!==e.sign)},u.prototype.multiply=function(e){return z(e)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,d.prototype.multiply=function(e){return new d(this.value*z(e).value)},d.prototype.times=d.prototype.multiply;function A(e){var n=e.length,r=g(n+n),i=t,a,o,s,c,l;for(s=0;s<n;s++){c=e[s],o=0-c*c;for(var u=s;u<n;u++)l=e[u],a=c*l*2+r[s+u]+o,o=Math.floor(a/i),r[s+u]=a-o*i;r[s+n]=o}return h(r),r}l.prototype.square=function(){return new l(A(this.value),!1)},u.prototype.square=function(){var e=this.value*this.value;return f(e)?new u(e):new l(A(p(Math.abs(this.value))),!1)},d.prototype.square=function(e){return new d(this.value*this.value)};function j(e,n){var r=e.length,i=n.length,a=t,o=g(n.length),s=n[i-1],c=Math.ceil(a/(2*s)),l=T(e,c),u=T(n,c),d,f,p,h,_,v,y;for(l.length<=r&&l.push(0),u.push(0),s=u[i-1],f=r-i;f>=0;f--){for(d=a-1,l[f+i]!==s&&(d=Math.floor((l[f+i]*a+l[f+i-1])/s)),p=0,h=0,v=u.length,_=0;_<v;_++)p+=d*u[_],y=Math.floor(p/a),h+=l[f+_]-(p-y*a),p=y,h<0?(l[f+_]=h+a,h=-1):(l[f+_]=h,h=0);for(;h!==0;){for(--d,p=0,_=0;_<v;_++)p+=l[f+_]-a+u[_],p<0?(l[f+_]=p+a,p=0):(l[f+_]=p,p=1);h+=p}o[f]=d}return l=N(l,c)[0],[m(o),m(l)]}function M(e,n){for(var r=e.length,i=n.length,a=[],o=[],s=t,c,l,u,d,f;r;){if(o.unshift(e[--r]),h(o),F(o,n)<0){a.push(0);continue}l=o.length,u=o[l-1]*s+o[l-2],d=n[i-1]*s+n[i-2],l>i&&(u=(u+1)*s),c=Math.ceil(u/d);do{if(f=T(n,c),F(f,o)<=0)break;c--}while(c);a.push(c),o=x(o,f)}return a.reverse(),[m(a),m(o)]}function N(e,n){var r=e.length,i=g(r),a=t,o,s,c=0,l;for(o=r-1;o>=0;--o)l=c*a+e[o],s=_(l/n),c=l-s*n,i[o]=s|0;return[i,c|0]}function P(e,n){var r,i=z(n);if(s)return[new d(e.value/i.value),new d(e.value%i.value)];var a=e.value,o=i.value,f;if(o===0)throw Error(`Cannot divide by zero`);if(e.isSmall)return i.isSmall?[new u(_(a/o)),new u(a%o)]:[c[0],e];if(i.isSmall){if(o===1)return[e,c[0]];if(o==-1)return[e.negate(),c[0]];var h=Math.abs(o);if(h<t){r=N(a,h),f=m(r[0]);var g=r[1];return e.sign&&(g=-g),typeof f==`number`?(e.sign!==i.sign&&(f=-f),[new u(f),new u(g)]):[new l(f,e.sign!==i.sign),new u(g)]}o=p(h)}var v=F(a,o);if(v===-1)return[c[0],e];if(v===0)return[c[e.sign===i.sign?1:-1],c[0]];r=a.length+o.length<=200?j(a,o):M(a,o),f=r[0];var y=e.sign!==i.sign,b=r[1],x=e.sign;return typeof f==`number`?(y&&(f=-f),f=new u(f)):f=new l(f,y),typeof b==`number`?(x&&(b=-b),b=new u(b)):b=new l(b,x),[f,b]}l.prototype.divmod=function(e){var t=P(this,e);return{quotient:t[0],remainder:t[1]}},d.prototype.divmod=u.prototype.divmod=l.prototype.divmod,l.prototype.divide=function(e){return P(this,e)[0]},d.prototype.over=d.prototype.divide=function(e){return new d(this.value/z(e).value)},u.prototype.over=u.prototype.divide=l.prototype.over=l.prototype.divide,l.prototype.mod=function(e){return P(this,e)[1]},d.prototype.mod=d.prototype.remainder=function(e){return new d(this.value%z(e).value)},u.prototype.remainder=u.prototype.mod=l.prototype.remainder=l.prototype.mod,l.prototype.pow=function(e){var t=z(e),n=this.value,r=t.value,i,a,o;if(r===0)return c[1];if(n===0)return c[0];if(n===1)return c[1];if(n===-1)return t.isEven()?c[1]:c[-1];if(t.sign)return c[0];if(!t.isSmall)throw Error(`The exponent `+t.toString()+` is too large.`);if(this.isSmall&&f(i=n**+r))return new u(_(i));for(a=this,o=c[1];r&!0&&(o=o.times(a),--r),r!==0;)r/=2,a=a.square();return o},u.prototype.pow=l.prototype.pow,d.prototype.pow=function(e){var t=z(e),n=this.value,r=t.value,i=BigInt(0),a=BigInt(1),o=BigInt(2);if(r===i)return c[1];if(n===i)return c[0];if(n===a)return c[1];if(n===BigInt(-1))return t.isEven()?c[1]:c[-1];if(t.isNegative())return new d(i);for(var s=this,l=c[1];(r&a)===a&&(l=l.times(s),--r),r!==i;)r/=o,s=s.square();return l},l.prototype.modPow=function(e,t){if(e=z(e),t=z(t),t.isZero())throw Error(`Cannot take modPow with modulus 0`);var n=c[1],r=this.mod(t);for(e.isNegative()&&(e=e.multiply(c[-1]),r=r.modInv(t));e.isPositive();){if(r.isZero())return c[0];e.isOdd()&&(n=n.multiply(r).mod(t)),e=e.divide(2),r=r.square().mod(t)}return n},d.prototype.modPow=u.prototype.modPow=l.prototype.modPow;function F(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var n=e.length-1;n>=0;n--)if(e[n]!==t[n])return e[n]>t[n]?1:-1;return 0}l.prototype.compareAbs=function(e){var t=z(e),n=this.value,r=t.value;return t.isSmall?1:F(n,r)},u.prototype.compareAbs=function(e){var t=z(e),n=Math.abs(this.value),r=t.value;return t.isSmall?(r=Math.abs(r),n===r?0:n>r?1:-1):-1},d.prototype.compareAbs=function(e){var t=this.value,n=z(e).value;return t=t>=0?t:-t,n=n>=0?n:-n,t===n?0:t>n?1:-1},l.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=z(e),n=this.value,r=t.value;return this.sign===t.sign?t.isSmall?this.sign?-1:1:F(n,r)*(this.sign?-1:1):t.sign?1:-1},l.prototype.compareTo=l.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=z(e),n=this.value,r=t.value;return t.isSmall?n==r?0:n>r?1:-1:n<0===t.sign?n<0?1:-1:n<0?-1:1},u.prototype.compareTo=u.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,n=z(e).value;return t===n?0:t>n?1:-1},d.prototype.compareTo=d.prototype.compare,l.prototype.equals=function(e){return this.compare(e)===0},d.prototype.eq=d.prototype.equals=u.prototype.eq=u.prototype.equals=l.prototype.eq=l.prototype.equals,l.prototype.notEquals=function(e){return this.compare(e)!==0},d.prototype.neq=d.prototype.notEquals=u.prototype.neq=u.prototype.notEquals=l.prototype.neq=l.prototype.notEquals,l.prototype.greater=function(e){return this.compare(e)>0},d.prototype.gt=d.prototype.greater=u.prototype.gt=u.prototype.greater=l.prototype.gt=l.prototype.greater,l.prototype.lesser=function(e){return this.compare(e)<0},d.prototype.lt=d.prototype.lesser=u.prototype.lt=u.prototype.lesser=l.prototype.lt=l.prototype.lesser,l.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},d.prototype.geq=d.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals,l.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},d.prototype.leq=d.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals,l.prototype.isEven=function(){return(this.value[0]&1)==0},u.prototype.isEven=function(){return(this.value&1)==0},d.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},l.prototype.isOdd=function(){return(this.value[0]&1)==1},u.prototype.isOdd=function(){return(this.value&1)==1},d.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},l.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},d.prototype.isPositive=u.prototype.isPositive,l.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},d.prototype.isNegative=u.prototype.isNegative,l.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return Math.abs(this.value)===1},d.prototype.isUnit=function(){return this.abs().value===BigInt(1)},l.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return this.value===0},d.prototype.isZero=function(){return this.value===BigInt(0)},l.prototype.isDivisibleBy=function(e){var t=z(e);return t.isZero()?!1:t.isUnit()?!0:t.compareAbs(2)===0?this.isEven():this.mod(t).isZero()},d.prototype.isDivisibleBy=u.prototype.isDivisibleBy=l.prototype.isDivisibleBy;function I(e){var t=e.abs();if(t.isUnit())return!1;if(t.equals(2)||t.equals(3)||t.equals(5))return!0;if(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))return!1;if(t.lesser(49))return!0}function L(e,t){for(var r=e.prev(),i=r,a=0,o,s,c;i.isEven();)i=i.divide(2),a++;next:for(s=0;s<t.length;s++)if(!e.lesser(t[s])&&(c=n(t[s]).modPow(i,e),!(c.isUnit()||c.equals(r)))){for(o=a-1;o!=0;o--){if(c=c.square().mod(e),c.isUnit())return!1;if(c.equals(r))continue next}return!1}return!0}l.prototype.isPrime=function(t){var r=I(this);if(r!==e)return r;var i=this.abs(),a=i.bitLength();if(a<=64)return L(i,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var o=Math.log(2)*a.toJSNumber(),s=Math.ceil(t===!0?2*o**2:o),c=[],l=0;l<s;l++)c.push(n(l+2));return L(i,c)},d.prototype.isPrime=u.prototype.isPrime=l.prototype.isPrime,l.prototype.isProbablePrime=function(t,r){var i=I(this);if(i!==e)return i;for(var a=this.abs(),o=t===e?5:t,s=[],c=0;c<o;c++)s.push(n.randBetween(2,a.minus(2),r));return L(a,s)},d.prototype.isProbablePrime=u.prototype.isProbablePrime=l.prototype.isProbablePrime,l.prototype.modInv=function(e){for(var t=n.zero,r=n.one,i=z(e),a=this.abs(),o,s,c;!a.isZero();)o=i.divide(a),s=t,c=i,t=r,i=a,r=s.subtract(o.multiply(r)),a=c.subtract(o.multiply(a));if(!i.isUnit())throw Error(this.toString()+` and `+e.toString()+` are not co-prime`);return t.compare(0)===-1&&(t=t.add(e)),this.isNegative()?t.negate():t},d.prototype.modInv=u.prototype.modInv=l.prototype.modInv,l.prototype.next=function(){var e=this.value;return this.sign?C(e,1,this.sign):new l(b(e,1),this.sign)},u.prototype.next=function(){var e=this.value;return e+1<i?new u(e+1):new l(a,!1)},d.prototype.next=function(){return new d(this.value+BigInt(1))},l.prototype.prev=function(){var e=this.value;return this.sign?new l(b(e,1),!0):C(e,1,this.sign)},u.prototype.prev=function(){var e=this.value;return e-1>-i?new u(e-1):new l(a,!0)},d.prototype.prev=function(){return new d(this.value-BigInt(1))};for(var R=[1];2*R[R.length-1]<=t;)R.push(2*R[R.length-1]);var ee=R.length,te=R[ee-1];function ne(e){return Math.abs(e)<=t}l.prototype.shiftLeft=function(e){var t=z(e).toJSNumber();if(!ne(t))throw Error(String(t)+` is too large for shifting.`);if(t<0)return this.shiftRight(-t);var n=this;if(n.isZero())return n;for(;t>=ee;)n=n.multiply(te),t-=ee-1;return n.multiply(R[t])},d.prototype.shiftLeft=u.prototype.shiftLeft=l.prototype.shiftLeft,l.prototype.shiftRight=function(e){var t,n=z(e).toJSNumber();if(!ne(n))throw Error(String(n)+` is too large for shifting.`);if(n<0)return this.shiftLeft(-n);for(var r=this;n>=ee;){if(r.isZero()||r.isNegative()&&r.isUnit())return r;t=P(r,te),r=t[1].isNegative()?t[0].prev():t[0],n-=ee-1}return t=P(r,R[n]),t[1].isNegative()?t[0].prev():t[0]},d.prototype.shiftRight=u.prototype.shiftRight=l.prototype.shiftRight;function re(e,t,r){t=z(t);for(var i=e.isNegative(),a=t.isNegative(),o=i?e.not():e,s=a?t.not():t,c=0,l=0,u=null,d=null,f=[];!o.isZero()||!s.isZero();)u=P(o,te),c=u[1].toJSNumber(),i&&(c=te-1-c),d=P(s,te),l=d[1].toJSNumber(),a&&(l=te-1-l),o=u[0],s=d[0],f.push(r(c,l));for(var p=r(+!!i,+!!a)===0?n(0):n(-1),m=f.length-1;m>=0;--m)p=p.multiply(te).add(n(f[m]));return p}l.prototype.not=function(){return this.negate().prev()},d.prototype.not=u.prototype.not=l.prototype.not,l.prototype.and=function(e){return re(this,e,function(e,t){return e&t})},d.prototype.and=u.prototype.and=l.prototype.and,l.prototype.or=function(e){return re(this,e,function(e,t){return e|t})},d.prototype.or=u.prototype.or=l.prototype.or,l.prototype.xor=function(e){return re(this,e,function(e,t){return e^t})},d.prototype.xor=u.prototype.xor=l.prototype.xor;var ie=1<<30,ae=(t&-t)*(t&-t)|ie;function oe(e){var n=e.value,r=typeof n==`number`?n|ie:typeof n==`bigint`?n|BigInt(ie):n[0]+n[1]*t|ae;return r&-r}function se(e,t){if(t.compareTo(e)<=0){var r=se(e,t.square(t)),i=r.p,a=r.e,o=i.multiply(t);return o.compareTo(e)<=0?{p:o,e:a*2+1}:{p:i,e:a*2}}return{p:n(1),e:0}}l.prototype.bitLength=function(){var e=this;return e.compareTo(n(0))<0&&(e=e.negate().subtract(n(1))),e.compareTo(n(0))===0?n(0):n(se(e,n(2)).e).add(n(1))},d.prototype.bitLength=u.prototype.bitLength=l.prototype.bitLength;function ce(e,t){return e=z(e),t=z(t),e.greater(t)?e:t}function le(e,t){return e=z(e),t=z(t),e.lesser(t)?e:t}function ue(e,t){if(e=z(e).abs(),t=z(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var n=c[1],r,i;e.isEven()&&t.isEven();)r=le(oe(e),oe(t)),e=e.divide(r),t=t.divide(r),n=n.multiply(r);for(;e.isEven();)e=e.divide(oe(e));do{for(;t.isEven();)t=t.divide(oe(t));e.greater(t)&&(i=t,t=e,e=i),t=t.subtract(e)}while(!t.isZero());return n.isUnit()?e:e.multiply(n)}function de(e,t){return e=z(e).abs(),t=z(t).abs(),e.divide(ue(e,t)).multiply(t)}function fe(e,n,r){e=z(e),n=z(n);var i=r||Math.random,a=le(e,n),o=ce(e,n).subtract(a).add(1);if(o.isSmall)return a.add(Math.floor(i()*o));for(var s=ge(o,t).value,l=[],u=!0,d=0;d<s.length;d++){var f=u?s[d]+(d+1<s.length?s[d+1]/t:0):t,p=_(i()*f);l.push(p),p<s[d]&&(u=!1)}return a.add(c.fromArray(l,t,!1))}var pe=function(e,t,n,r){n||=o,e=String(e),r||(e=e.toLowerCase(),n=n.toLowerCase());var i=e.length,a,s=Math.abs(t),c={};for(a=0;a<n.length;a++)c[n[a]]=a;for(a=0;a<i;a++){var l=e[a];if(l!==`-`&&l in c&&c[l]>=s){if(l===`1`&&s===1)continue;throw Error(l+` is not a valid digit in base `+t+`.`)}}t=z(t);var u=[],d=e[0]===`-`;for(a=+!!d;a<e.length;a++){var l=e[a];if(l in c)u.push(z(c[l]));else if(l===`<`){var f=a;do a++;while(e[a]!==`>`&&a<e.length);u.push(z(e.slice(f+1,a)))}else throw Error(l+` is not a valid character`)}return me(u,t,d)};function me(e,t,n){var r=c[0],i=c[1],a;for(a=e.length-1;a>=0;a--)r=r.add(e[a].times(i)),i=i.times(t);return n?r.negate():r}function he(e,t){return t||=o,e<t.length?t[e]:`<`+e+`>`}function ge(e,t){if(t=n(t),t.isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw Error(`Cannot convert nonzero numbers to base 0.`)}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var i=!1;if(e.isNegative()&&t.isPositive()&&(i=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:i};for(var a=[],o=e,s;o.isNegative()||o.compareAbs(t)>=0;){s=o.divmod(t),o=s.quotient;var c=s.remainder;c.isNegative()&&(c=t.minus(c).abs(),o=o.next()),a.push(c.toJSNumber())}return a.push(o.toJSNumber()),{value:a.reverse(),isNegative:i}}function _e(e,t,n){var r=ge(e,t);return(r.isNegative?`-`:``)+r.value.map(function(e){return he(e,n)}).join(``)}l.prototype.toArray=function(e){return ge(this,e)},u.prototype.toArray=function(e){return ge(this,e)},d.prototype.toArray=function(e){return ge(this,e)},l.prototype.toString=function(t,n){if(t===e&&(t=10),t!==10||n)return _e(this,t,n);for(var r=this.value,i=r.length,a=String(r[--i]),o=`0000000`,s;--i>=0;)s=String(r[i]),a+=o.slice(s.length)+s;return(this.sign?`-`:``)+a},u.prototype.toString=function(t,n){return t===e&&(t=10),t!=10||n?_e(this,t,n):String(this.value)},d.prototype.toString=u.prototype.toString,d.prototype.toJSON=l.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},l.prototype.valueOf=function(){return parseInt(this.toString(),10)},l.prototype.toJSNumber=l.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf,d.prototype.valueOf=d.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function ve(e){if(f(+e)){var t=+e;if(t===_(t))return s?new d(BigInt(t)):new u(t);throw Error(`Invalid integer: `+e)}var n=e[0]===`-`;n&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw Error(`Invalid integer: `+i.join(`e`));if(i.length===2){var a=i[1];if(a[0]===`+`&&(a=a.slice(1)),a=+a,a!==_(a)||!f(a))throw Error(`Invalid integer: `+a+` is not a valid exponent.`);var o=i[0],c=o.indexOf(`.`);if(c>=0&&(a-=o.length-c-1,o=o.slice(0,c)+o.slice(c+1)),a<0)throw Error(`Cannot include negative exponent part for integers`);o+=Array(a+1).join(`0`),e=o}if(!/^([0-9][0-9]*)$/.test(e))throw Error(`Invalid integer: `+e);if(s)return new d(BigInt(n?`-`+e:e));for(var p=[],m=e.length,g=r,v=m-g;m>0;)p.push(+e.slice(v,m)),v-=g,v<0&&(v=0),m-=g;return h(p),new l(p,n)}function ye(e){if(s)return new d(BigInt(e));if(f(e)){if(e!==_(e))throw Error(e+` is not an integer.`);return new u(e)}return ve(e.toString())}function z(e){return typeof e==`number`?ye(e):typeof e==`string`?ve(e):typeof e==`bigint`?new d(e):e}for(var be=0;be<1e3;be++)c[be]=z(be),be>0&&(c[-be]=z(-be));return c.one=c[1],c.zero=c[0],c.minusOne=c[-1],c.max=ce,c.min=le,c.gcd=ue,c.lcm=de,c.isInstance=function(e){return e instanceof l||e instanceof u||e instanceof d},c.randBetween=fe,c.fromArray=function(e,t,n){return me(e.map(z),z(t||10),n)},c})();t!==void 0&&t.hasOwnProperty(`exports`)&&(t.exports=n),typeof define==`function`&&define.amd&&define(function(){return n})})),Wa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.exponentDecStringToDecString=e.isExponentDecString=e.isValidDecimalString=e.isValidIntegerString=void 0;var t=/^-?\d+$/,n=/^-?\d+.?\d*$/,r=/^(-?)([\d.]+)e([-+])([\d]+)$/;function i(e){return t.test(e)}e.isValidIntegerString=i;function a(e){return n.test(e)}e.isValidDecimalString=a;function o(e){return r.test(e)}e.isExponentDecString=o;function s(e){let t=``;for(let n=0;n<e;n++)t+=`0`;return t}function c(e){for(;e.length>0&&e[0]===`0`;)e=e.slice(1);return e.length===0||e[0]===`.`?`0`+e:e}function l(e){let t=e.split(r);if(t.length!==6)return e;let n=t[1]===`-`,i=t[2],a=i.indexOf(`.`),o=t[4],l=parseInt(o)*(t[3]===`-`?-1:1);if(a>=0){let e=i.length-a-1;l-=e,i=c(i.replace(`.`,``))}let u=n?`-`:``;if(l<0){if(i.length>-l){let e=i.length+l;return u+(i.slice(0,e)+`.`+i.slice(e))}return u+`0.`+s(-(i.length+l))+i}else return u+i+s(l)}e.exponentDecStringToDecString=l})),Ga=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Uint=e.Int=void 0;var n=t(Ua()),r=Wa(),i=class e{constructor(e){if(typeof e==`number`&&(e=e.toString()),typeof e==`string`){if(!(0,r.isValidIntegerString)(e))if((0,r.isExponentDecString)(e))e=(0,r.exponentDecStringToDecString)(e);else throw Error(`invalid integer: ${e}`);this.int=(0,n.default)(e)}else this.int=(0,n.default)(e);this.checkBitLen()}checkBitLen(){if(this.int.abs().gt(e.maxInt))throw Error(`Integer out of range ${this.int.toString()}`)}toString(){return this.int.toString(10)}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}isZero(){return this.int.eq((0,n.default)(0))}equals(e){return this.int.equals(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.greaterOrEquals(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.lesserOrEquals(e.int)}abs(){return new e(this.int.abs())}absUInt(){return new a(this.int.abs())}add(t){return new e(this.int.add(t.int))}sub(t){return new e(this.int.subtract(t.int))}mul(t){return new e(this.int.multiply(t.int))}div(t){return new e(this.int.divide(t.int))}mod(t){return new e(this.int.mod(t.int))}neg(){return new e(this.int.negate())}pow(t){return new e(this.int.pow(t.toBigNumber()))}toBigNumber(){return this.int}};e.Int=i,i.maxInt=(0,n.default)(`115792089237316195423570985008687907853269984665640564039457584007913129639935`);var a=class e{constructor(e){if(typeof e==`number`&&(e=e.toString()),typeof e==`string`){if(!(0,r.isValidIntegerString)(e))if((0,r.isExponentDecString)(e))e=(0,r.exponentDecStringToDecString)(e);else throw Error(`invalid integer: ${e}`);this.uint=(0,n.default)(e)}else this.uint=(0,n.default)(e);if(this.uint.isNegative())throw TypeError(`Uint should not be negative`);this.checkBitLen()}checkBitLen(){if(this.uint.abs().bitLength().gt(256))throw Error(`Integer out of range ${this.uint.toString()}`)}toString(){return this.uint.toString(10)}isZero(){return this.uint.eq((0,n.default)(0))}equals(e){return this.uint.equals(e.uint)}gt(e){return this.uint.gt(e.uint)}gte(e){return this.uint.greaterOrEquals(e.uint)}lt(e){return this.uint.lt(e.uint)}lte(e){return this.uint.lesserOrEquals(e.uint)}add(t){return new e(this.uint.add(t.uint))}sub(t){return new e(this.uint.subtract(t.uint))}mul(t){return new e(this.uint.multiply(t.uint))}div(t){return new e(this.uint.divide(t.uint))}mod(t){return new e(this.uint.mod(t.uint))}pow(t){return new e(this.uint.pow(t.toBigNumber()))}toBigNumber(){return this.uint}};e.Uint=a})),Ka=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.integerStringToUSLocaleString=void 0;function t(e){if(e.indexOf(`.`)>=0)throw Error(`${e} is not integer`);if(typeof BigInt<`u`)return BigInt(e).toLocaleString(`en-US`);let t=e,n=[];for(let e=t.length;e>0;e-=3)n.push(t.slice(Math.max(0,e-3),e));return n.reverse().join(`,`)}e.integerStringToUSLocaleString=t})),qa=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Dec=void 0;var n=t(Ua()),r=Ga(),i=Wa(),a=Ka(),o=class e{static calcPrecisionMultiplier(t){if(t<0)throw Error(`Invalid prec`);if(t>e.precision)throw Error(`Too much precision`);let r=t.toString(),i=e.precisionMultipliers.get(r);if(i)return i;let a=e.precision-t,o=(0,n.default)(10).pow(a);return e.precisionMultipliers.set(r,o),o}static reduceDecimalsFromString(t){let n=t.indexOf(`.`);if(n<0)return{res:t,isDownToZero:!1};let r=t.length-1-n-e.precision;if(r<=0)return{res:t,isDownToZero:!1};let i=t.slice(0,t.length-r);return{res:i,isDownToZero:/^[0.]*$/.test(i)}}constructor(t,a=0){if(typeof t==`number`&&(t=t.toString()),typeof t==`string`){if(t.length===0)throw Error(`empty string`);if(!(0,i.isValidDecimalString)(t))if((0,i.isExponentDecString)(t))t=(0,i.exponentDecStringToDecString)(t);else throw Error(`invalid decimal: ${t}`);let r=e.reduceDecimalsFromString(t);r.isDownToZero,t=r.res,t.indexOf(`.`)>=0&&(a=t.length-t.indexOf(`.`)-1,t=t.replace(`.`,``)),this.int=(0,n.default)(t)}else t instanceof r.Int||t instanceof r.Uint?this.int=(0,n.default)(t.toString()):this.int=(0,n.default)(t);this.int=this.int.multiply(e.calcPrecisionMultiplier(a)),this.checkBitLen()}checkBitLen(){if(this.int.abs().gt(e.maxDec))throw Error(`Integer out of range ${this.int.toString()}`)}isZero(){return this.int.eq((0,n.default)(0))}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}equals(e){return this.int.eq(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.geq(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.leq(e.int)}neg(){return new e(this.int.negate(),e.precision)}abs(){return new e(this.int.abs(),e.precision)}add(t){return new e(this.int.add(t.int),e.precision)}sub(t){return new e(this.int.subtract(t.int),e.precision)}pow(t){if(t.isZero())return new e(1);if(t.isNegative())return new e(1).quo(this.pow(t.abs()));let n=new e(this.int,e.precision),i=new e(1);for(let e=t;e.gt(new r.Int(1));e=e.div(new r.Int(2)))e.mod(new r.Int(2)).isZero()||(i=i.mul(n)),n=n.mul(n);return n.mul(i)}approxSqrt(){return this.approxRoot(2)}approxRoot(t,n=300){if(this.isNegative())return this.neg().approxRoot(t).neg();if(t===1||this.isZero()||this.equals(e.one))return this;if(t===0)return e.one;let[i,a]=[e.one,e.one];for(let o=0;a.abs().gt(e.smallestDec)&&o<n;o++){let n=i.pow(new r.Int(t-1));n.isZero()&&(n=e.smallestDec),a=this.quo(n),a=a.sub(i),a=a.quoTruncate(new e(t)),i=i.add(a)}return i}mul(t){return new e(this.mulRaw(t).chopPrecisionAndRound(),e.precision)}mulTruncate(t){return new e(this.mulRaw(t).chopPrecisionAndTruncate(),e.precision)}mulRoundUp(t){return new e(this.mulRaw(t).chopPrecisionAndRoundUp(),e.precision)}mulRaw(t){return new e(this.int.multiply(t.int),e.precision)}quo(t){return new e(this.quoRaw(t).chopPrecisionAndRound(),e.precision)}quoTruncate(t){return new e(this.quoRaw(t).chopPrecisionAndTruncate(),e.precision)}quoRoundUp(t){return new e(this.quoRaw(t).chopPrecisionAndRoundUp(),e.precision)}quoRaw(t){let n=e.calcPrecisionMultiplier(0);return new e(this.int.multiply(n).multiply(n).divide(t.int),e.precision)}isInteger(){let t=e.calcPrecisionMultiplier(0);return this.int.remainder(t).equals((0,n.default)(0))}chopPrecisionAndRound(){if(this.isNegative())return this.abs().chopPrecisionAndRound().negate();let t=e.calcPrecisionMultiplier(0),r=t.divide((0,n.default)(2)),{quotient:i,remainder:a}=this.int.divmod(t);return a.equals((0,n.default)(0))||a.lt(r)?i:a.gt(r)?i.add((0,n.default)(1)):i.divide((0,n.default)(2)).equals((0,n.default)(0))?i:i.add((0,n.default)(1))}chopPrecisionAndRoundUp(){if(this.isNegative())return this.abs().chopPrecisionAndTruncate().negate();let t=e.calcPrecisionMultiplier(0),{quotient:r,remainder:i}=this.int.divmod(t);return i.equals((0,n.default)(0))?r:r.add((0,n.default)(1))}chopPrecisionAndTruncate(){let t=e.calcPrecisionMultiplier(0);return this.int.divide(t)}toString(t=e.precision,r=!1){let i=e.calcPrecisionMultiplier(0),{quotient:o,remainder:s}=this.int.abs().divmod(i),c=s.toString(10);for(let t=0,n=c.length;t<e.precision-n;t++)c=`0`+c;c=c.substring(0,t);let l=this.isNegative()&&!(o.eq((0,n.default)(0))&&c.length===0),u=r?(0,a.integerStringToUSLocaleString)(o.toString()):o.toString();return`${l?`-`:``}${u}${c.length>0?`.`+c:``}`}round(){return new r.Int(this.chopPrecisionAndRound())}roundUp(){return new r.Int(this.chopPrecisionAndRoundUp())}truncate(){return new r.Int(this.chopPrecisionAndTruncate())}roundDec(){return new e(this.chopPrecisionAndRound(),0)}roundUpDec(){return new e(this.chopPrecisionAndRoundUp(),0)}truncateDec(){return new e(this.chopPrecisionAndTruncate(),0)}};e.Dec=o,o.precision=18,o.decimalPrecisionBits=60,o.maxDec=(0,n.default)(`133499189745056880149688856635597007162669032647290798121690100488888732861290034376435130433535`),o.precisionMultipliers=new Map,o.zero=new o(0),o.smallestDec=new o(`1`,o.precision),o.one=new o(1),r.Int.prototype.toDec=function(){return new o(this)},r.Uint.prototype.toDec=function(){return new o(this)}})),Ja=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DecUtils=void 0;var t=qa(),n=Ga(),r=class e{static trim(e){let t=typeof e==`string`?e:e.toString();if(t.indexOf(`.`)<0)return t;for(let e=t.length-1;e>=0&&t[e]===`0`;e--)t=t.slice(0,e);return t.length>0&&t[t.length-1]===`.`&&(t=t.slice(0,t.length-1)),t}static getTenExponentN(r){if(r<-t.Dec.precision)throw Error(`Too little precision`);if(e.tenExponentNs[r.toString()])return e.tenExponentNs[r.toString()];let i=new t.Dec(10).pow(new n.Int(r));return e.tenExponentNs[r.toString()]=i,i}static getTenExponentNInPrecisionRange(n){if(n>t.Dec.precision)throw Error(`Too much precision`);return e.getTenExponentN(n)}static getPrecisionDec(t){return e.getTenExponentNInPrecisionRange(t)}};e.DecUtils=r,r.tenExponentNs={}})),Ya=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Coin=void 0;var t=Ga();e.Coin=class e{static parse(t){let n=RegExp(`([0-9]+)[ ]*([a-zA-Z]+)$`).exec(t);if(!n||n.length!==3)throw Error(`Invalid coin str`);let r=n[2],i=n[1];return new e(r,i)}constructor(e,n){this.denom=e,this.amount=n instanceof t.Int?n:new t.Int(n)}toString(){return`${this.amount.toString()}${this.denom}`}}})),Xa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CoinUtils=void 0;var t=Ya(),n=Ga(),r=qa(),i=Ja(),a=Ka(),o=class e{static createCoinsFromPrimitives(e){return e.map(e=>new t.Coin(e.denom,e.amount))}static amountOf(e,t){let r=e.find(e=>e.denom===t);return r?r.amount:new n.Int(0)}static exclude(e,t){return e.filter(e=>t.indexOf(e.denom)===0)}static concat(...e){return e.length===0?[]:e.slice().reduce((e,n)=>{let r=e.find(e=>e.denom===n.denom);if(r){let i=new t.Coin(r.denom,r.amount.add(n.amount));e.push(i)}else{let r=new t.Coin(n.denom,n.amount);e.push(r)}return e},[])}static getCoinFromDecimals(e,n,i){let a=e.find(e=>e.coinDenom===i);if(!a)throw Error(`Invalid currency`);let o=new r.Dec(1);for(let e=0;e<a.coinDecimals;e++)o=o.mul(new r.Dec(10));let s=new r.Dec(n);if(s=s.mul(o),!new r.Dec(s.truncate()).equals(s))throw Error(`Can't divide anymore`);return new t.Coin(a.coinMinimalDenom,s.truncate())}static parseDecAndDenomFromCoin(e,t){let n=e.find(e=>e.coinMinimalDenom===t.denom);n||={coinDecimals:0,coinDenom:t.denom,coinMinimalDenom:t.denom};let i=new r.Dec(1);for(let e=0;e<n.coinDecimals;e++)i=i.mul(new r.Dec(10));return{amount:new r.Dec(t.amount).quoTruncate(i).toString(n.coinDecimals),denom:n.coinDenom}}static shrinkDecimals(t,n,i,a=!1){if(t.equals(new r.Dec(0)))return`0`;let o=t.isNegative(),s=t.abs().truncate(),c=t.abs().sub(new r.Dec(s)),l=Math.max(i-s.toString().length+1,n),u=l===0?``:c.toString(l).replace(`0.`,``),d=a?e.integerStringToUSLocaleString(s.toString()):s.toString();return(o?`-`:``)+d+(u.length>0?`.`:``)+u}static coinToTrimmedString(e,t,n=` `){let a=new r.Dec(e.amount).quoTruncate(i.DecUtils.getPrecisionDec(t.coinDecimals));return`${i.DecUtils.trim(a)}${n}${t.coinDenom}`}};e.CoinUtils=o,o.integerStringToUSLocaleString=a.integerStringToUSLocaleString})),Za=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.IntPretty=void 0;var t=Ga(),n=qa(),r=Ja(),i=Xa();e.IntPretty=class e{constructor(e){if(this.floatingDecimalPointRight=0,this._options={maxDecimals:0,trim:!1,shrink:!1,ready:!0,locale:!0,inequalitySymbol:!1,inequalitySymbolSeparator:` `},typeof e==`object`&&`toDec`in e?e=e.toDec():e instanceof n.Dec||(e=new n.Dec(e)),e.isZero()){this.dec=e;return}let r=e,i=0;for(let e=0;e<18&&!(!r.truncate().equals(new t.Int(0))&&r.equals(new n.Dec(r.truncate())));e++)r=r.mul(new n.Dec(10)),i++;this.dec=e,this._options.maxDecimals=i}get options(){return this._options}moveDecimalPointLeft(e){let t=this.clone();return t.floatingDecimalPointRight+=-e,t}moveDecimalPointRight(e){let t=this.clone();return t.floatingDecimalPointRight+=e,t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t._options.maxDecimals=e,t}inequalitySymbol(e){let t=this.clone();return t._options.inequalitySymbol=e,t}inequalitySymbolSeparator(e){let t=this.clone();return t._options.inequalitySymbolSeparator=e,t}trim(e){let t=this.clone();return t._options.trim=e,t}shrink(e){let t=this.clone();return t._options.shrink=e,t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t._options.ready=e,t}get isReady(){return this._options.ready}add(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().add(t));return r._options=Object.assign({},this._options),r}sub(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().sub(t));return r._options=Object.assign({},this._options),r}mul(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().mul(t));return r._options=Object.assign({},this._options),r}quo(t){t instanceof n.Dec||(t=t.toDec());let r=new e(this.toDec().quo(t));return r._options=Object.assign({},this._options),r}toDec(){if(this.floatingDecimalPointRight===0)return this.dec;if(this.floatingDecimalPointRight>0)return this.dec.mulTruncate(r.DecUtils.getTenExponentN(this.floatingDecimalPointRight));{let e=-this.floatingDecimalPointRight,t=this.dec;for(;e>0;)if(e>=n.Dec.precision)t=t.mulTruncate(r.DecUtils.getTenExponentN(-n.Dec.precision)),e-=n.Dec.precision;else{t=t.mulTruncate(r.DecUtils.getTenExponentN(-(e%n.Dec.precision)));break}return t}}toString(){return this.toStringWithSymbols(``,``)}toStringWithSymbols(e,t){let n=this.toDec();if(this._options.inequalitySymbol&&!n.isZero()&&n.abs().lt(r.DecUtils.getTenExponentN(-this._options.maxDecimals))){let i=n.isNegative();return`${i?`>`:`<`}${this._options.inequalitySymbolSeparator}${i?`-`:``}${e}${r.DecUtils.getTenExponentN(-this._options.maxDecimals).toString(this._options.maxDecimals,this._options.locale)}${t}`}let a;a=this._options.shrink?i.CoinUtils.shrinkDecimals(n,0,this._options.maxDecimals,this._options.locale):n.toString(this._options.maxDecimals,this._options.locale),this._options.trim&&(a=r.DecUtils.trim(a));let o=a.charAt(0)===`-`;return o&&(a=a.slice(1)),`${o?`-`:``}${e}${a}${t}`}clone(){let t=new e(this.dec);return t.dec=this.dec,t.floatingDecimalPointRight=this.floatingDecimalPointRight,t._options=Object.assign({},this._options),t}}})),Qa=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CoinPretty=void 0;var t=Za(),n=qa(),r=Ja();e.CoinPretty=class e{constructor(e,i){this._currency=e,this._options={separator:` `,upperCase:!1,lowerCase:!1,hideDenom:!1,hideIBCMetadata:!1},typeof i==`object`&&`toDec`in i?i=i.toDec():i instanceof n.Dec||(i=new n.Dec(i)),this.intPretty=new t.IntPretty(i.quoTruncate(r.DecUtils.getTenExponentNInPrecisionRange(e.coinDecimals))).maxDecimals(e.coinDecimals)}get options(){return Object.assign(Object.assign({},this._options),this.intPretty.options)}get denom(){return this.currency.coinDenom}get currency(){return this._currency}setCurrency(e){let t=this.clone();return t.intPretty=this.intPretty.moveDecimalPointRight(this._currency.coinDecimals-e.coinDecimals),t._currency=e,t}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}hideDenom(e){let t=this.clone();return t._options.hideDenom=e,t}hideIBCMetadata(e){let t=this.clone();return t._options.hideIBCMetadata=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(t){let n=t instanceof e;if(n&&`currency`in t&&this.currency.coinMinimalDenom!==t.currency.coinMinimalDenom)return this.clone();`toDec`in t&&(t=t.toDec());let i=this.clone();return i.intPretty=i.intPretty.add(n?t:t.mul(r.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),i}sub(t){let n=t instanceof e;if(n&&`currency`in t&&this.currency.coinMinimalDenom!==t.currency.coinMinimalDenom)return this.clone();`toDec`in t&&(t=t.toDec());let i=this.clone();return i.intPretty=i.intPretty.sub(n?t:t.mul(r.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),i}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toCoin(){let e=this.toDec().mulTruncate(r.DecUtils.getTenExponentNInPrecisionRange(this.currency.coinDecimals)).truncate();return{denom:this.currency.coinMinimalDenom,amount:e.toString()}}toString(){let e=this.denom;this._options.hideIBCMetadata&&`originCurrency`in this.currency&&this.currency.originCurrency&&(e=this.currency.originCurrency.coinDenom),this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this._options.separator;return this._options.hideDenom&&(e=``,t=``),this.intPretty.toStringWithSymbols(``,`${t}${e}`)}clone(){let t=new e(this._currency,0);return t._options=Object.assign({},this._options),t.intPretty=this.intPretty.clone(),t}}})),$a=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PricePretty=void 0;var t=Za(),n=Ja();e.PricePretty=class e{constructor(e,n){this._fiatCurrency=e,this._options={separator:``,upperCase:!1,lowerCase:!1,locale:`en-US`},this.intPretty=new t.IntPretty(n).maxDecimals(e.maxDecimals).shrink(!0).trim(!0).locale(!1).inequalitySymbol(!0),this._options.locale=e.locale}get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}get symbol(){return this._fiatCurrency.symbol}get fiatCurrency(){return this._fiatCurrency}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){let e=this.symbol;this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this.toDec(),r=this.options;if(r.inequalitySymbol&&!t.isZero()&&t.abs().lt(n.DecUtils.getTenExponentN(-r.maxDecimals)))return this.intPretty.toStringWithSymbols(`${e}${this._options.separator}`,``);let i=parseFloat(this.intPretty.toString()).toLocaleString(r.locale,{maximumFractionDigits:r.maxDecimals}),a=i.charAt(0)===`-`;return a&&(i=i.slice(1)),`${a?`-`:``}${e}${this._options.separator}${i}`}clone(){let t=new e(this._fiatCurrency,0);return t._options=Object.assign({},this._options),t.intPretty=this.intPretty.clone(),t}}})),eo=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RatePretty=void 0;var t=Za();e.RatePretty=class e{constructor(e){this._options={separator:``,symbol:`%`},this.intPretty=new t.IntPretty(e),this.intPretty=this.intPretty.maxDecimals(3).shrink(!1).trim(!0).locale(!0).inequalitySymbol(!0)}get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}separator(e){let t=this.clone();return t._options.separator=e,t}symbol(e){let t=this.clone();return t._options.symbol=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){return this.intPretty.moveDecimalPointRight(2).toStringWithSymbols(``,`${this._options.separator}${this._options.symbol}`)}clone(){let t=new e(0);return t._options=Object.assign({},this._options),t.intPretty=this.intPretty.clone(),t}}})),to=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Za(),e),n(Qa(),e),n(Ya(),e),n(Ga(),e),n(qa(),e),n(Xa(),e),n(Ja(),e),n($a(),e),n(eo(),e)})),no=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isSimpleFetchError=e.SimpleFetchError=void 0;var t=class e extends Error{constructor(t,n,r){super(`Failed to get response from ${new URL(n,t).toString()}`),this.baseURL=t,this.url=n,this.response=r,Object.setPrototypeOf(this,e.prototype)}};e.SimpleFetchError=t;function n(e){return e instanceof t}e.isSimpleFetchError=n})),ro=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(e,`__esModule`,{value:!0}),e.simpleFetch=e.makeURL=void 0;var r=no();function i(e,t){let n=new URL(e);return e=o(n.origin),t=o(n.pathname)+`/`+a(t),o(e+`/`+a(t))}e.makeURL=i;function a(e){return e.length>0&&e[0]===`/`?e.slice(1):e}function o(e){return e.length>0&&e[e.length-1]===`/`?e.slice(0,e.length-1):e}function s(e,a,o){return t(this,void 0,void 0,function*(){typeof a!=`string`&&(a&&(o=a),a=``),a===`/`&&(a=``);let t=i(e,a),s=o||{},{headers:l}=s,u=n(s,[`headers`]),d=yield fetch(t,Object.assign({headers:Object.assign({accept:`application/json, text/plain, */*`},l)},u)),f;if((d.headers.get(`content-type`)||``).startsWith(`application/json`))f=yield d.json();else{let e=yield d.text(),t=e.trim();f=t.startsWith(`{`)&&t.endsWith(`}`)?JSON.parse(t):e}let p={url:t,data:f,headers:d.headers,status:d.status,statusText:d.statusText};if(!(o?.validateStatus||c)(d.status))throw new r.SimpleFetchError(e,a,p);return p})}e.simpleFetch=s;function c(e){return e===200}})),io=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ao=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(ro(),e),n(no(),e),n(io(),e)})),oo=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.BaseAccount=void 0;var n=to(),r=ao();e.BaseAccount=class e{static fetchFromRest(n,i,a=!1){return t(this,void 0,void 0,function*(){let t=yield(0,r.simpleFetch)(n,`/cosmos/auth/v1beta1/accounts/${i}`,{validateStatus:function(e){return e>=200&&e<300||e===404}});return e.fromProtoJSON(t.data,a?i:``)})}static fromProtoJSON(t,r=``){if(!t.account){if(!r)throw Error(`Account's address is unknown: ${JSON.stringify(t)}`);return new e(``,r,new n.Int(0),new n.Int(0))}let i=t.account,a=i[`@type`]||``,o=i.BaseAccount||i.baseAccount||i.base_account;o&&(i=o);let s=i.account;s&&(i=s);let c=i.BaseVestingAccount||i.baseVestingAccount||i.base_vesting_account;if(c){i=c;let e=i.BaseAccount||i.baseAccount||i.base_account;e&&(i=e)}let l=i.address;if(!l){if(!r)throw Error(`Account's address is unknown: ${JSON.stringify(t)}`);l=r}let u=i.account_number,d=i.sequence;return new e(a,l,new n.Int(u||`0`),new n.Int(d||`0`))}constructor(e,t,n,r){this.type=e,this.address=t,this.accountNumber=n,this.sequence=r}getType(){return this.type}getAddress(){return this.address}getAccountNumber(){return this.accountNumber}getSequence(){return this.sequence}}})),so,co=t((()=>{so=`logger/5.8.0`}));function lo(){try{let e=[];if([`NFD`,`NFC`,`NFKD`,`NFKC`].forEach(t=>{try{if(`test`.normalize(t)!==`test`)throw Error(`bad normalize`)}catch{e.push(t)}}),e.length)throw Error(`missing `+e.join(`, `));if(`é`.normalize(`NFD`)!==`é`)throw Error(`broken implementation`)}catch(e){return e.message}return null}var uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo=t((()=>{co(),uo=!1,fo=!1,po={debug:1,default:2,info:2,warning:3,error:4,off:5},mo=po.default,ho=null,go=lo(),(function(e){e.DEBUG=`DEBUG`,e.INFO=`INFO`,e.WARNING=`WARNING`,e.ERROR=`ERROR`,e.OFF=`OFF`})(_o||={}),(function(e){e.UNKNOWN_ERROR=`UNKNOWN_ERROR`,e.NOT_IMPLEMENTED=`NOT_IMPLEMENTED`,e.UNSUPPORTED_OPERATION=`UNSUPPORTED_OPERATION`,e.NETWORK_ERROR=`NETWORK_ERROR`,e.SERVER_ERROR=`SERVER_ERROR`,e.TIMEOUT=`TIMEOUT`,e.BUFFER_OVERRUN=`BUFFER_OVERRUN`,e.NUMERIC_FAULT=`NUMERIC_FAULT`,e.MISSING_NEW=`MISSING_NEW`,e.INVALID_ARGUMENT=`INVALID_ARGUMENT`,e.MISSING_ARGUMENT=`MISSING_ARGUMENT`,e.UNEXPECTED_ARGUMENT=`UNEXPECTED_ARGUMENT`,e.CALL_EXCEPTION=`CALL_EXCEPTION`,e.INSUFFICIENT_FUNDS=`INSUFFICIENT_FUNDS`,e.NONCE_EXPIRED=`NONCE_EXPIRED`,e.REPLACEMENT_UNDERPRICED=`REPLACEMENT_UNDERPRICED`,e.UNPREDICTABLE_GAS_LIMIT=`UNPREDICTABLE_GAS_LIMIT`,e.TRANSACTION_REPLACED=`TRANSACTION_REPLACED`,e.ACTION_REJECTED=`ACTION_REJECTED`})(vo||={}),yo=`0123456789abcdef`,bo=class e{constructor(e){Object.defineProperty(this,`version`,{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();po[n]??this.throwArgumentError(`invalid log level name`,`logLevel`,e),!(mo>po[n])&&console.log.apply(console,t)}debug(...t){this._log(e.levels.DEBUG,t)}info(...t){this._log(e.levels.INFO,t)}warn(...t){this._log(e.levels.WARNING,t)}makeError(t,n,r){if(fo)return this.makeError(`censored error`,n,{});n||=e.errors.UNKNOWN_ERROR,r||={};let i=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let n=``;for(let e=0;e<t.length;e++)n+=yo[t[e]>>4],n+=yo[t[e]&15];i.push(e+`=Uint8Array(0x`+n+`)`)}else i.push(e+`=`+JSON.stringify(t))}catch{i.push(e+`=`+JSON.stringify(r[e].toString()))}}),i.push(`code=${n}`),i.push(`version=${this.version}`);let a=t,o=``;switch(n){case vo.NUMERIC_FAULT:{o=`NUMERIC_FAULT`;let e=t;switch(e){case`overflow`:case`underflow`:case`division-by-zero`:o+=`-`+e;break;case`negative-power`:case`negative-width`:o+=`-unsupported`;break;case`unbound-bitwise-result`:o+=`-unbound-result`;break}break}case vo.CALL_EXCEPTION:case vo.INSUFFICIENT_FUNDS:case vo.MISSING_NEW:case vo.NONCE_EXPIRED:case vo.REPLACEMENT_UNDERPRICED:case vo.TRANSACTION_REPLACED:case vo.UNPREDICTABLE_GAS_LIMIT:o=n;break}o&&(t+=` [ See: https://links.ethers.org/v5-errors-`+o+` ]`),i.length&&(t+=` (`+i.join(`, `)+`)`);let s=Error(t);return s.reason=a,s.code=n,Object.keys(r).forEach(function(e){s[e]=r[e]}),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(t,n,r){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:n,value:r})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(t){t??=`platform missing String.prototype.normalize`,go&&this.throwError(`platform missing String.prototype.normalize`,e.errors.UNSUPPORTED_OPERATION,{operation:`String.prototype.normalize`,form:go})}checkSafeUint53(t,n){typeof t==`number`&&(n??=`value not safe`,(t<0||t>=9007199254740991)&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:`checkSafeInteger`,fault:`out-of-safe-range`,value:t}),t%1&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:`checkSafeInteger`,fault:`non-integer`,value:t}))}checkArgumentCount(t,n,r){r=r?`: `+r:``,t<n&&this.throwError(`missing argument`+r,e.errors.MISSING_ARGUMENT,{count:t,expectedCount:n}),t>n&&this.throwError(`too many arguments`+r,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}checkNew(t,n){(t===Object||t==null)&&this.throwError(`missing new`,e.errors.MISSING_NEW,{name:n.name})}checkAbstract(t,n){t===n?this.throwError(`cannot instantiate abstract class `+JSON.stringify(n.name)+` directly; use a sub-class`,e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:`new`}):(t===Object||t==null)&&this.throwError(`missing new`,e.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return ho||=new e(so),ho}static setCensorship(t,n){if(!t&&n&&this.globalLogger().throwError(`cannot permanently disable censorship`,e.errors.UNSUPPORTED_OPERATION,{operation:`setCensorship`}),uo){if(!t)return;this.globalLogger().throwError(`error censorship permanent`,e.errors.UNSUPPORTED_OPERATION,{operation:`setCensorship`})}fo=!!t,uo=!!n}static setLogLevel(t){let n=po[t.toLowerCase()];if(n==null){e.globalLogger().warn(`invalid log level - `+t);return}mo=n}static from(t){return new e(t)}},bo.errors=vo,bo.levels=_o})),So,Co=t((()=>{So=`bytes/5.8.0`}));function wo(e){return!!e.toHexString}function To(e){return e.slice||=function(){let t=Array.prototype.slice.call(arguments);return To(new Uint8Array(Array.prototype.slice.apply(e,t)))},e}function Eo(e){return Mo(e)&&!(e.length%2)||Oo(e)}function Do(e){return typeof e==`number`&&e==e&&e%1==0}function Oo(e){if(e==null)return!1;if(e.constructor===Uint8Array)return!0;if(typeof e==`string`||!Do(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let n=e[t];if(!Do(n)||n<0||n>=256)return!1}return!0}function ko(e,t){if(t||={},typeof e==`number`){Io.checkSafeUint53(e,`invalid arrayify value`);let t=[];for(;e;)t.unshift(e&255),e=parseInt(String(e/256));return t.length===0&&t.push(0),To(new Uint8Array(t))}if(t.allowMissingPrefix&&typeof e==`string`&&e.substring(0,2)!==`0x`&&(e=`0x`+e),wo(e)&&(e=e.toHexString()),Mo(e)){let n=e.substring(2);n.length%2&&(t.hexPad===`left`?n=`0`+n:t.hexPad===`right`?n+=`0`:Io.throwArgumentError(`hex data is odd-length`,`value`,e));let r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(n.substring(e,e+2),16));return To(new Uint8Array(r))}return Oo(e)?To(new Uint8Array(e)):Io.throwArgumentError(`invalid arrayify value`,`value`,e)}function Ao(e){let t=e.map(e=>ko(e)),n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);return t.reduce((e,t)=>(r.set(t,e),e+t.length),0),To(r)}function jo(e){let t=ko(e);if(t.length===0)return t;let n=0;for(;n<t.length&&t[n]===0;)n++;return n&&(t=t.slice(n)),t}function Mo(e,t){return!(typeof e!=`string`||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function No(e,t){if(t||={},typeof e==`number`){Io.checkSafeUint53(e,`invalid hexlify value`);let t=``;for(;e;)t=Lo[e&15]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t=`0`+t),`0x`+t):`0x00`}if(typeof e==`bigint`)return e=e.toString(16),e.length%2?`0x0`+e:`0x`+e;if(t.allowMissingPrefix&&typeof e==`string`&&e.substring(0,2)!==`0x`&&(e=`0x`+e),wo(e))return e.toHexString();if(Mo(e))return e.length%2&&(t.hexPad===`left`?e=`0x0`+e.substring(2):t.hexPad===`right`?e+=`0`:Io.throwArgumentError(`hex data is odd-length`,`value`,e)),e.toLowerCase();if(Oo(e)){let t=`0x`;for(let n=0;n<e.length;n++){let r=e[n];t+=Lo[(r&240)>>4]+Lo[r&15]}return t}return Io.throwArgumentError(`invalid hexlify value`,`value`,e)}function Po(e){if(typeof e!=`string`)e=No(e);else if(!Mo(e)||e.length%2)return null;return(e.length-2)/2}function Fo(e,t,n){return typeof e==`string`?(!Mo(e)||e.length%2)&&Io.throwArgumentError(`invalid hexData`,`value`,e):e=No(e),t=2+2*t,n==null?`0x`+e.substring(t):`0x`+e.substring(t,2+2*n)}var Io,Lo,Ro=t((()=>{xo(),Co(),Io=new bo(So),Lo=`0123456789abcdef`})),zo,Bo=t((()=>{zo=`bignumber/5.8.0`}));function Vo(e){if(typeof e!=`string`)return Vo(e.toString(16));if(e[0]===`-`)return e=e.substring(1),e[0]===`-`&&Jo.throwArgumentError(`invalid hex`,`value`,e),e=Vo(e),e===`0x00`?e:`-`+e;if(e.substring(0,2)!==`0x`&&(e=`0x`+e),e===`0x`)return`0x00`;for(e.length%2&&(e=`0x0`+e.substring(2));e.length>4&&e.substring(0,4)===`0x00`;)e=`0x`+e.substring(4);return e}function Ho(e){return Qo.from(Vo(e))}function G(e){let t=Qo.from(e).toHexString();return t[0]===`-`?new qo(`-`+t.substring(3),16):new qo(t.substring(2),16)}function Uo(e,t,n){let r={fault:e,operation:t};return n!=null&&(r.value=n),Jo.throwError(e,bo.errors.NUMERIC_FAULT,r)}function Wo(e){return new qo(e,36).toString(16)}function Go(e){return new qo(e,16).toString(36)}var Ko,qo,Jo,Yo,Xo,Zo,Qo,$o=t((()=>{Ko=i(O()),Ro(),xo(),Bo(),qo=Ko.default.BN,Jo=new bo(zo),Yo={},Xo=9007199254740991,Zo=!1,Qo=class e{constructor(e,t){e!==Yo&&Jo.throwError(`cannot call constructor directly; use BigNumber.from`,bo.errors.UNSUPPORTED_OPERATION,{operation:`new (BigNumber)`}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Ho(G(this).fromTwos(e))}toTwos(e){return Ho(G(this).toTwos(e))}abs(){return this._hex[0]===`-`?e.from(this._hex.substring(1)):this}add(e){return Ho(G(this).add(G(e)))}sub(e){return Ho(G(this).sub(G(e)))}div(t){return e.from(t).isZero()&&Uo(`division-by-zero`,`div`),Ho(G(this).div(G(t)))}mul(e){return Ho(G(this).mul(G(e)))}mod(e){let t=G(e);return t.isNeg()&&Uo(`division-by-zero`,`mod`),Ho(G(this).umod(t))}pow(e){let t=G(e);return t.isNeg()&&Uo(`negative-power`,`pow`),Ho(G(this).pow(t))}and(e){let t=G(e);return(this.isNegative()||t.isNeg())&&Uo(`unbound-bitwise-result`,`and`),Ho(G(this).and(t))}or(e){let t=G(e);return(this.isNegative()||t.isNeg())&&Uo(`unbound-bitwise-result`,`or`),Ho(G(this).or(t))}xor(e){let t=G(e);return(this.isNegative()||t.isNeg())&&Uo(`unbound-bitwise-result`,`xor`),Ho(G(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&Uo(`negative-width`,`mask`),Ho(G(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Uo(`negative-width`,`shl`),Ho(G(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Uo(`negative-width`,`shr`),Ho(G(this).shrn(e))}eq(e){return G(this).eq(G(e))}lt(e){return G(this).lt(G(e))}lte(e){return G(this).lte(G(e))}gt(e){return G(this).gt(G(e))}gte(e){return G(this).gte(G(e))}isNegative(){return this._hex[0]===`-`}isZero(){return G(this).isZero()}toNumber(){try{return G(this).toNumber()}catch{Uo(`overflow`,`toNumber`,this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Jo.throwError(`this platform does not support BigInt`,bo.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Zo||(Zo=!0,Jo.warn(`BigNumber.toString does not accept any parameters; base-10 is assumed`)):arguments[0]===16?Jo.throwError(`BigNumber.toString does not accept any parameters; use bigNumber.toHexString()`,bo.errors.UNEXPECTED_ARGUMENT,{}):Jo.throwError(`BigNumber.toString does not accept parameters`,bo.errors.UNEXPECTED_ARGUMENT,{})),G(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:`BigNumber`,hex:this.toHexString()}}static from(t){if(t instanceof e)return t;if(typeof t==`string`)return t.match(/^-?0x[0-9a-f]+$/i)?new e(Yo,Vo(t)):t.match(/^-?[0-9]+$/)?new e(Yo,Vo(new qo(t))):Jo.throwArgumentError(`invalid BigNumber string`,`value`,t);if(typeof t==`number`)return t%1&&Uo(`underflow`,`BigNumber.from`,t),(t>=Xo||t<=-Xo)&&Uo(`overflow`,`BigNumber.from`,t),e.from(String(t));let n=t;if(typeof n==`bigint`)return e.from(n.toString());if(Oo(n))return e.from(No(n));if(n)if(n.toHexString){let t=n.toHexString();if(typeof t==`string`)return e.from(t)}else{let t=n._hex;if(t==null&&n.type===`BigNumber`&&(t=n.hex),typeof t==`string`&&(Mo(t)||t[0]===`-`&&Mo(t.substring(1))))return e.from(t)}return Jo.throwArgumentError(`invalid BigNumber value`,`value`,t)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}})),es=t((()=>{$o(),Ro(),xo(),Bo()})),ts=a(((e,t)=>{h(),s(),(function(){var e=`input is invalid type`,n=`finalize already called`,r=typeof window==`object`,i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var a=!r&&typeof self==`object`;!i.JS_SHA3_NO_NODE_JS&&typeof o==`object`&&o.versions&&o.versions.node?i=g:a&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&typeof t==`object`&&t.exports,c=typeof define==`function`&&define.amd,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,u=`0123456789abcdef`.split(``),d=[31,7936,2031616,520093696],f=[4,1024,262144,67108864],p=[1,256,65536,16777216],m=[6,1536,393216,100663296],h=[0,8,16,24],_=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],y=[128,256],b=[`hex`,`buffer`,`arrayBuffer`,`array`,`digest`],x={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)===`[object Array]`}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var S=function(e,t,n){return function(r){return new L(e,t,e).update(r)[n]()}},C=function(e,t,n){return function(r,i){return new L(e,t,i).update(r)[n]()}},w=function(e,t,n){return function(t,r,i,a){return k[`cshake`+e].update(t,r,i,a)[n]()}},T=function(e,t,n){return function(t,r,i,a){return k[`kmac`+e].update(t,r,i,a)[n]()}},E=function(e,t,n,r){for(var i=0;i<b.length;++i){var a=b[i];e[a]=t(n,r,a)}return e},D=function(e,t){var n=S(e,t,`hex`);return n.create=function(){return new L(e,t,e)},n.update=function(e){return n.create().update(e)},E(n,S,e,t)},O=[{name:`keccak`,padding:p,bits:v,createMethod:D},{name:`sha3`,padding:m,bits:v,createMethod:D},{name:`shake`,padding:d,bits:y,createMethod:function(e,t){var n=C(e,t,`hex`);return n.create=function(n){return new L(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},E(n,C,e,t)}},{name:`cshake`,padding:f,bits:y,createMethod:function(e,t){var n=x[e],r=w(e,t,`hex`);return r.create=function(r,i,a){return!i&&!a?k[`shake`+e].create(r):new L(e,t,r).bytepad([i,a],n)},r.update=function(e,t,n,i){return r.create(t,n,i).update(e)},E(r,w,e,t)}},{name:`kmac`,padding:f,bits:y,createMethod:function(e,t){var n=x[e],r=T(e,t,`hex`);return r.create=function(r,i,a){return new R(e,t,i).bytepad([`KMAC`,a],n).bytepad([r],n)},r.update=function(e,t,n,i){return r.create(e,n,i).update(t)},E(r,T,e,t)}}],k={},A=[],j=0;j<O.length;++j)for(var M=O[j],N=M.bits,P=0;P<N.length;++P){var F=M.name+`_`+N[P];if(A.push(F),k[F]=M.createMethod(N[P],M.padding),M.name!==`sha3`){var I=M.name+N[P];A.push(I),k[I]=k[F]}}function L(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(n&31)>>3;for(var r=0;r<50;++r)this.s[r]=0}L.prototype.update=function(t){if(this.finalized)throw Error(n);var r,i=typeof t;if(i!==`string`){if(i===`object`){if(t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);r=!0}for(var a=this.blocks,o=this.byteCount,s=t.length,c=this.blockCount,u=0,d=this.s,f,p;u<s;){if(this.reset)for(this.reset=!1,a[0]=this.block,f=1;f<c+1;++f)a[f]=0;if(r)for(f=this.start;u<s&&f<o;++u)a[f>>2]|=t[u]<<h[f++&3];else for(f=this.start;u<s&&f<o;++u)p=t.charCodeAt(u),p<128?a[f>>2]|=p<<h[f++&3]:p<2048?(a[f>>2]|=(192|p>>6)<<h[f++&3],a[f>>2]|=(128|p&63)<<h[f++&3]):p<55296||p>=57344?(a[f>>2]|=(224|p>>12)<<h[f++&3],a[f>>2]|=(128|p>>6&63)<<h[f++&3],a[f>>2]|=(128|p&63)<<h[f++&3]):(p=65536+((p&1023)<<10|t.charCodeAt(++u)&1023),a[f>>2]|=(240|p>>18)<<h[f++&3],a[f>>2]|=(128|p>>12&63)<<h[f++&3],a[f>>2]|=(128|p>>6&63)<<h[f++&3],a[f>>2]|=(128|p&63)<<h[f++&3]);if(this.lastByteIndex=f,f>=o){for(this.start=f-o,this.block=a[c],f=0;f<c;++f)d[f]^=a[f];ee(d),this.reset=!0}else this.start=f}return this},L.prototype.encode=function(e,t){var n=e&255,r=1,i=[n];for(e>>=8,n=e&255;n>0;)i.unshift(n),e>>=8,n=e&255,++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},L.prototype.encodeString=function(t){var n,r=typeof t;if(r!==`string`){if(r===`object`){if(t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);n=!0}var i=0,a=t.length;if(n)i=a;else for(var o=0;o<t.length;++o){var s=t.charCodeAt(o);s<128?i+=1:s<2048?i+=2:s<55296||s>=57344?i+=3:(s=65536+((s&1023)<<10|t.charCodeAt(++o)&1023),i+=4)}return i+=this.encode(i*8),this.update(t),i},L.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var i=t-n%t,a=[];return a.length=i,this.update(a),this},L.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[t&3],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];ee(r)}},L.prototype.toString=L.prototype.hex=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,a=0,o=``,s;a<n;){for(i=0;i<e&&a<n;++i,++a)s=t[i],o+=u[s>>4&15]+u[s&15]+u[s>>12&15]+u[s>>8&15]+u[s>>20&15]+u[s>>16&15]+u[s>>28&15]+u[s>>24&15];a%e===0&&(ee(t),i=0)}return r&&(s=t[i],o+=u[s>>4&15]+u[s&15],r>1&&(o+=u[s>>12&15]+u[s>>8&15]),r>2&&(o+=u[s>>20&15]+u[s>>16&15])),o},L.prototype.arrayBuffer=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,a=0,o=this.outputBits>>3,s=r?new ArrayBuffer(n+1<<2):new ArrayBuffer(o),c=new Uint32Array(s);a<n;){for(i=0;i<e&&a<n;++i,++a)c[a]=t[i];a%e===0&&ee(t)}return r&&(c[i]=t[i],s=s.slice(0,o)),s},L.prototype.buffer=L.prototype.arrayBuffer,L.prototype.digest=L.prototype.array=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,a=0,o=[],s,c;a<n;){for(i=0;i<e&&a<n;++i,++a)s=a<<2,c=t[i],o[s]=c&255,o[s+1]=c>>8&255,o[s+2]=c>>16&255,o[s+3]=c>>24&255;a%e===0&&ee(t)}return r&&(s=a<<2,c=t[i],o[s]=c&255,r>1&&(o[s+1]=c>>8&255),r>2&&(o[s+2]=c>>16&255)),o};function R(e,t,n){L.call(this,e,t,n)}R.prototype=new L,R.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)};var ee=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,z,be,xe,Se,Ce,we;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],p=e[9]^e[19]^e[29]^e[39]^e[49],t=f^(o<<1|s>>>31),n=p^(s<<1|o>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(c<<1|l>>>31),n=a^(l<<1|c>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=o^(u<<1|d>>>31),n=s^(d<<1|u>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=c^(f<<1|p>>>31),n=l^(p<<1|f>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=u^(i<<1|a>>>31),n=d^(a<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,m=e[0],h=e[1],ce=e[11]<<4|e[10]>>>28,le=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,A=e[21]<<3|e[20]>>>29,xe=e[31]<<9|e[30]>>>23,Se=e[30]<<9|e[31]>>>23,ie=e[40]<<18|e[41]>>>14,ae=e[41]<<18|e[40]>>>14,F=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,ue=e[22]<<10|e[23]>>>22,de=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,Ce=e[42]<<2|e[43]>>>30,we=e[43]<<2|e[42]>>>30,ge=e[5]<<30|e[4]>>>2,_e=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,R=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,b=e[24]<<11|e[25]>>>21,fe=e[34]<<15|e[35]>>>17,pe=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,ve=e[17]<<23|e[16]>>>9,ye=e[16]<<23|e[17]>>>9,ee=e[26]<<25|e[27]>>>7,te=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,me=e[47]<<24|e[46]>>>8,he=e[46]<<24|e[47]>>>8,oe=e[8]<<27|e[9]>>>5,se=e[9]<<27|e[8]>>>5,D=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,z=e[29]<<7|e[28]>>>25,be=e[28]<<7|e[29]>>>25,ne=e[38]<<8|e[39]>>>24,re=e[39]<<8|e[38]>>>24,C=e[48]<<14|e[49]>>>18,w=e[49]<<14|e[48]>>>18,e[0]=m^~g&y,e[1]=h^~v&b,e[10]=T^~D&k,e[11]=E^~O&A,e[20]=F^~L&ee,e[21]=I^~R&te,e[30]=oe^~ce&ue,e[31]=se^~le&de,e[40]=ge^~ve&z,e[41]=_e^~ye&be,e[2]=g^~y&x,e[3]=v^~b&S,e[12]=D^~k&j,e[13]=O^~A&M,e[22]=L^~ee&ne,e[23]=R^~te&re,e[32]=ce^~ue&fe,e[33]=le^~de&pe,e[42]=ve^~z&xe,e[43]=ye^~be&Se,e[4]=y^~x&C,e[5]=b^~S&w,e[14]=k^~j&N,e[15]=A^~M&P,e[24]=ee^~ne&ie,e[25]=te^~re&ae,e[34]=ue^~fe&me,e[35]=de^~pe&he,e[44]=z^~xe&Ce,e[45]=be^~Se&we,e[6]=x^~C&m,e[7]=S^~w&h,e[16]=j^~N&T,e[17]=M^~P&E,e[26]=ne^~ie&F,e[27]=re^~ae&I,e[36]=fe^~me&oe,e[37]=pe^~he&se,e[46]=xe^~Ce&ge,e[47]=Se^~we&_e,e[8]=C^~m&g,e[9]=w^~h&v,e[18]=N^~T&D,e[19]=P^~E&O,e[28]=ie^~F&L,e[29]=ae^~I&R,e[38]=me^~oe&ce,e[39]=he^~se&le,e[48]=Ce^~ge&ve,e[49]=we^~_e&ye,e[0]^=_[r],e[1]^=_[r+1]};if(s)t.exports=k;else{for(j=0;j<A.length;++j)i[A[j]]=k[A[j]];c&&define(function(){return k})}})()})),ns=r({keccak256:()=>rs});function rs(e){return`0x`+is.default.keccak_256(ko(e))}var is,as=t((()=>{is=i(ts()),Ro()})),os,ss=t((()=>{os=`rlp/5.8.0`}));function cs(e){let t=[];for(;e;)t.unshift(e&255),e>>=8;return t}function ls(e){if(Array.isArray(e)){let t=[];if(e.forEach(function(e){t=t.concat(ls(e))}),t.length<=55)return t.unshift(192+t.length),t;let n=cs(t.length);return n.unshift(247+n.length),n.concat(t)}Eo(e)||ds.throwArgumentError(`RLP object must be BytesLike`,`object`,e);let t=Array.prototype.slice.call(ko(e));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;let n=cs(t.length);return n.unshift(183+n.length),n.concat(t)}function us(e){return No(ls(e))}var ds,fs=t((()=>{Ro(),xo(),ss(),ds=new bo(os)})),ps,ms=t((()=>{ps=`address/5.8.0`})),hs=r({getAddress:()=>ys,getContractAddress:()=>Ss,getCreate2Address:()=>Cs,getIcapAddress:()=>xs,isAddress:()=>bs});function gs(e){Mo(e,20)||ws.throwArgumentError(`invalid address`,`address`,e),e=e.toLowerCase();let t=e.substring(2).split(``),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);let r=ko(rs(n));for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(r[e>>1]&15)>=8&&(t[e+1]=t[e+1].toUpperCase());return`0x`+t.join(``)}function _s(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}function vs(e){e=e.toUpperCase(),e=e.substring(4)+e.substring(0,2)+`00`;let t=e.split(``).map(e=>Es[e]).join(``);for(;t.length>=Ds;){let e=t.substring(0,Ds);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n=`0`+n;return n}function ys(e){let t=null;if(typeof e!=`string`&&ws.throwArgumentError(`invalid address`,`address`,e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))e.substring(0,2)!==`0x`&&(e=`0x`+e),t=gs(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&ws.throwArgumentError(`bad address checksum`,`address`,e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==vs(e)&&ws.throwArgumentError(`bad icap checksum`,`address`,e),t=Wo(e.substring(4));t.length<40;)t=`0`+t;t=gs(`0x`+t)}else ws.throwArgumentError(`invalid address`,`address`,e);return t}function bs(e){try{return ys(e),!0}catch{}return!1}function xs(e){let t=Go(ys(e).substring(2)).toUpperCase();for(;t.length<30;)t=`0`+t;return`XE`+vs(`XE00`+t)+t}function Ss(e){let t=null;try{t=ys(e.from)}catch{ws.throwArgumentError(`missing from address`,`transaction`,e)}let n=jo(ko(Qo.from(e.nonce).toHexString()));return ys(Fo(rs(us([t,n])),12))}function Cs(e,t,n){return Po(t)!==32&&ws.throwArgumentError(`salt must be 32 bytes`,`salt`,t),Po(n)!==32&&ws.throwArgumentError(`initCodeHash must be 32 bytes`,`initCodeHash`,n),ys(Fo(rs(Ao([`0xff`,ys(e),t,n])),12))}var ws,Ts,Es,Ds,Os=t((()=>{Ro(),es(),as(),fs(),xo(),ms(),ws=new bo(ps),Ts=9007199254740991,Es={};for(let e=0;e<10;e++)Es[String(e)]=String(e);for(let e=0;e<26;e++)Es[String.fromCharCode(65+e)]=String(10+e);Ds=Math.floor(_s(Ts))})),ks=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,`__esModule`,{value:!0}),e.Bech32Address=void 0;var a=i(xn()),o=(x(),n(S)),s=(Os(),n(hs));e.Bech32Address=class e{static shortenAddress(e,t){if(t>=e.length)return e;let n=e.indexOf(`1`),r=e.slice(0,n),i=e.slice(n+1);if(t-=r.length,t-=3,--t,t<=0)return``;let a=Math.floor(i.length/2),o=i.slice(0,a),s=i.slice(a);for(;t<o.length+s.length;)(o.length+s.length)%2==1&&o.length>0?o=o.slice(0,o.length-1):s=s.slice(1);return r+`1`+o+`...`+s}static fromBech32(t,n){let r=a.default.decode(t);if(n&&r.prefix!==n)throw Error(`Unmatched prefix`);return new e(new Uint8Array((0,a.fromWords)(r.words)))}static validate(e,t){let{prefix:n}=a.default.decode(e);if(t&&t!==n)throw Error(`Unexpected prefix (expected: ${t}, actual: ${n})`)}static defaultBech32Config(e,t=`val`,n=`cons`,r=`pub`,i=`oper`){return{bech32PrefixAccAddr:e,bech32PrefixAccPub:e+r,bech32PrefixValAddr:e+t+i,bech32PrefixValPub:e+t+i+r,bech32PrefixConsAddr:e+t+n,bech32PrefixConsPub:e+t+n+r}}constructor(e){this.address=e}toBech32(e){let t=a.default.toWords(this.address);return a.default.encode(e,t)}toHex(e=!0){let t=o.Buffer.from(this.address).toString(`hex`);if(t.length===0)throw Error(`Empty address`);return e?(0,s.getAddress)(`0x`+t):`0x`+t}}})),As=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ChainIdHelper=void 0;var t=class e{static parse(t){if(t===`injective-777`||t===`injective-888`)return{identifier:t,version:0};let n=t.split(e.VersionFormatRegExp).filter(Boolean);return n.length===2?{identifier:n[0],version:parseInt(n[1])}:{identifier:t,version:0}}static hasChainVersion(t){return e.parse(t).identifier!==t}};e.ChainIdHelper=t,t.VersionFormatRegExp=/(.+)-([\d]+)/})),js=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EthermintChainIdHelper=void 0;var t=As();e.EthermintChainIdHelper=class{static parse(e){let n=t.ChainIdHelper.parse(e);if(e.startsWith(`injective`))return[`injective-777`,`injective-888`].includes(e)?Object.assign({ethChainId:5},n):Object.assign({ethChainId:1},n);let r=e.match(`^([a-z]{1,})_{1}([1-9][0-9]*)-{1}([1-9][0-9]*)$`);if(!r||r.length!==4||r[1]===``||Number.isNaN(parseFloat(r[2]))||!Number.isInteger(parseFloat(r[2])))throw Error(`Invalid chainId for ethermint: ${e}`);return Object.assign(Object.assign({},n),{ethChainId:parseFloat(r[2])})}}})),Ms=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(As(),e),n(js(),e)})),Ns=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WsReadyState=void 0,(function(e){e[e.CONNECTING=0]=`CONNECTING`,e[e.OPEN=1]=`OPEN`,e[e.CLOSING=2]=`CLOSING`,e[e.CLOSED=3]=`CLOSED`,e[e.NONE=4]=`NONE`})(e.WsReadyState||={})})),Ps=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TendermintTxTracer=void 0;var t=Ns(),r=(x(),n(S));e.TendermintTxTracer=class{constructor(e,t,n={}){this.url=e,this.wsEndpoint=t,this.options=n,this.newBlockSubscribes=[],this.txSubscribes=new Map,this.pendingQueries=new Map,this.listeners={},this.onOpen=e=>{this.newBlockSubscribes.length>0&&this.sendSubscribeBlockRpc();for(let[e,t]of this.txSubscribes)this.sendSubscribeTxRpc(e,t.params);for(let[e,t]of this.pendingQueries)this.sendQueryRpc(e,t.method,t.params);for(let t of this.listeners.open??[])t(e)},this.onMessage=e=>{for(let t of this.listeners.message??[])t(e);if(e.data)try{let t=JSON.parse(e.data);if(t?.id&&this.pendingQueries.has(t.id)&&(t.error?this.pendingQueries.get(t.id).rejector(Error(t.error.data||t.error.message)):t.result?.tx_result?this.pendingQueries.get(t.id).resolver(t.result.tx_result):this.pendingQueries.get(t.id).resolver(t.result),this.pendingQueries.delete(t.id)),t?.result?.data?.type===`tendermint/event/NewBlock`)for(let e of this.newBlockSubscribes)e.handler(t.result.data.value);t?.result?.data?.type===`tendermint/event/Tx`&&t?.id&&this.txSubscribes.has(t.id)&&(t.error?this.txSubscribes.get(t.id).rejector(Error(t.error.data||t.error.message)):this.txSubscribes.get(t.id).resolver(t.result.data.value.TxResult.result),this.txSubscribes.delete(t.id))}catch{}},this.onClose=e=>{for(let t of this.listeners.close??[])t(e)},this.ws=this.options.wsObject?new this.options.wsObject(this.getWsEndpoint()):new WebSocket(this.getWsEndpoint()),this.ws.onopen=this.onOpen,this.ws.onmessage=this.onMessage,this.ws.onclose=this.onClose}getWsEndpoint(){let e=this.url;if(e.startsWith(`http`)&&(e=e.replace(`http`,`ws`)),!e.endsWith(this.wsEndpoint)){let t=this.wsEndpoint.startsWith(`/`)?this.wsEndpoint:`/`+this.wsEndpoint;e=e.endsWith(`/`)?e+t.slice(1):e+t}return e}close(){this.ws.close()}get readyState(){switch(this.ws.readyState){case 0:return t.WsReadyState.CONNECTING;case 1:return t.WsReadyState.OPEN;case 2:return t.WsReadyState.CLOSING;case 3:return t.WsReadyState.CLOSED;default:return t.WsReadyState.NONE}}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}subscribeBlock(e){return this.newBlockSubscribes.push({handler:e}),this.newBlockSubscribes.length===1&&this.sendSubscribeBlockRpc(),()=>{this.newBlockSubscribes=this.newBlockSubscribes.filter(t=>t.handler!==e)}}sendSubscribeBlockRpc(){this.readyState===t.WsReadyState.OPEN&&this.ws.send(JSON.stringify({jsonrpc:`2.0`,method:`subscribe`,params:[`tm.event='NewBlock'`],id:1}))}traceTx(e){return new Promise(t=>{this.queryTx(e).then(n=>{if(e instanceof Uint8Array){t(n);return}if(n?.total_count!==`0`){t(n);return}}).catch(()=>{}),this.subscribeTx(e).then(t)}).then(e=>new Promise(t=>{setTimeout(()=>t(e),100)}))}subscribeTx(e){if(e instanceof Uint8Array){let t=this.createRandomId(),n={query:`tm.event='Tx' AND tx.hash='${r.Buffer.from(e).toString(`hex`).toUpperCase()}'`};return new Promise((e,r)=>{this.txSubscribes.set(t,{params:n,resolver:e,rejector:r}),this.sendSubscribeTxRpc(t,n)})}else{let t=this.createRandomId(),n={query:`tm.event='Tx' and `+Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>`${e.key}=${typeof e.value==`string`?`'${e.value}'`:e.value}`).join(` and `),page:`1`,per_page:`1`,order_by:`desc`};return new Promise((e,r)=>{this.txSubscribes.set(t,{params:n,resolver:e,rejector:r}),this.sendSubscribeTxRpc(t,n)})}}sendSubscribeTxRpc(e,n){this.readyState===t.WsReadyState.OPEN&&this.ws.send(JSON.stringify({jsonrpc:`2.0`,method:`subscribe`,params:n,id:e}))}queryTx(e){if(e instanceof Uint8Array)return this.query(`tx`,{hash:r.Buffer.from(e).toString(`base64`),prove:!1});{let t={query:Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>`${e.key}=${typeof e.value==`string`?`'${e.value}'`:e.value}`).join(` and `),page:`1`,per_page:`1`,order_by:`desc`};return this.query(`tx_search`,t)}}query(e,t){let n=this.createRandomId();return new Promise((r,i)=>{this.pendingQueries.set(n,{method:e,params:t,resolver:r,rejector:i}),this.sendQueryRpc(n,e,t)})}sendQueryRpc(e,n,r){this.readyState===t.WsReadyState.OPEN&&this.ws.send(JSON.stringify({jsonrpc:`2.0`,method:n,params:r,id:e}))}createRandomId(){return parseInt(Array.from({length:6}).map(()=>Math.floor(Math.random()*100)).join(``))}}})),Fs=a(((e,t)=>{t.exports=r;var n=Is();function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=r.zero=new r(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=r.zeroHash=`\0\0\0\0\0\0\0\0`;r.fromNumber=function(e){if(e===0)return i;var t=e<0;t&&(e=-e);var n=e>>>0,a=(e-n)/4294967296>>>0;return t&&(a=~a>>>0,n=~n>>>0,++n>4294967295&&(n=0,++a>4294967295&&(a=0))),new r(n,a)},r.from=function(e){if(typeof e==`number`)return r.fromNumber(e);if(n.isString(e))if(n.Long)e=n.Long.fromString(e);else return r.fromNumber(parseInt(e,10));return e.low||e.high?new r(e.low>>>0,e.high>>>0):i},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+n*4294967296)}return this.lo+this.hi*4294967296},r.prototype.toLong=function(e){return n.Long?new n.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var o=String.prototype.charCodeAt;r.fromHash=function(e){return e===a?i:new r((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}})),Is=a((e=>{h();var t=e;t.asPromise=Pr(),t.base64=Fr(),t.EventEmitter=Ir(),t.float=Lr(),t.inquire=Rr(),t.utf8=zr(),t.pool=Br(),t.LongBits=Fs(),t.isNode=!!(g!==void 0&&g&&g.process&&g.process.versions&&g.process.versions.node),t.global=t.isNode&&g||typeof window<`u`&&window||typeof self<`u`&&self||e,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return typeof e==`string`||e instanceof String},t.isObject=function(e){return e&&typeof e==`object`},t.isset=t.isSet=function(e,t){var n=e[t];return n!=null&&e.hasOwnProperty(t)?typeof n!=`object`||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1},t.Buffer=(function(){try{var e=t.inquire(`buffer`).Buffer;return e.prototype.utf8Write?e:null}catch{return null}})(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return typeof e==`number`?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):typeof Uint8Array>`u`?e:new Uint8Array(e)},t.Array=typeof Uint8Array<`u`?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire(`long`),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,n){var r=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(r.lo,r.hi,n):r.toNumber(!!n)};function n(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;++i)(e[r[i]]===void 0||!n)&&(e[r[i]]=t[r[i]]);return e}t.merge=n,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function r(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,`message`,{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,`stack`,{value:Error().stack||``}),r&&n(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,`name`,{get:function(){return e}}),t.prototype.toString=function(){return this.name+`: `+this.message},t}t.newError=r,t.ProtocolError=r(`ProtocolError`),t.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(t[e[n]]===1&&this[e[n]]!==void 0&&this[e[n]]!==null)return e[n]}},t.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;if(!e){t._Buffer_from=t._Buffer_allocUnsafe=null;return}t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}}})),Ls=a(((e,t)=>{t.exports=u;var n=Is(),r,i=n.LongBits,a=n.base64,o=n.utf8;function s(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function u(){this.len=0,this.head=new s(c,0,0),this.tail=this.head,this.states=null}var d=function(){return n.Buffer?function(){return(u.create=function(){return new r})()}:function(){return new u}};u.create=d(),u.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype._push=function(e,t,n){return this.tail=this.tail.next=new s(e,t,n),this.len+=t,this};function f(e,t,n){t[n]=e&255}function p(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}function m(e,t){this.len=e,this.next=void 0,this.val=t}m.prototype=Object.create(s.prototype),m.prototype.fn=p,u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new m((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(h,10,i.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function h(e,t,n){for(;e.hi;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo>>>=7;t[n++]=e.lo}u.prototype.uint64=function(e){var t=i.from(e);return this._push(h,t.length(),t)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(h,t.length(),t)},u.prototype.bool=function(e){return this._push(f,1,+!!e)};function g(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}u.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=i.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},u.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var _=n.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};u.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(n.isString(e)){var r=u.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(_,t,e)},u.prototype.string=function(e){var t=o.length(e);return t?this.uint32(t)._push(o.write,t,e):this._push(f,1,0)},u.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new s(c,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(c,0,0),this.len=0),this},u.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},u.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},u._configure=function(e){r=e,u.create=d(),r._configure()}})),Rs=a(((e,t)=>{t.exports=i;var n=Ls();(i.prototype=Object.create(n.prototype)).constructor=i;var r=Is();function i(){n.call(this)}i._configure=function(){i.alloc=r._Buffer_allocUnsafe,i.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&r.Buffer.prototype.set.name===`set`?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},i.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,`base64`));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this};function a(e,t,n){e.length<40?r.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i.prototype.string=function(e){var t=r.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()})),zs=a(((e,t)=>{t.exports=s;var n=Is(),r,i=n.LongBits,a=n.utf8;function o(e,t){return RangeError(`index out of range: `+e.pos+` + `+(t||1)+` > `+e.len)}function s(e){this.buf=e,this.pos=0,this.len=e.length}var c=typeof Uint8Array<`u`?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new s(e);throw Error(`illegal buffer`)}:function(e){if(Array.isArray(e))return new s(e);throw Error(`illegal buffer`)},l=function(){return n.Buffer?function(e){return(s.create=function(e){return n.Buffer.isBuffer(e)?new r(e):c(e)})(e)}:c};s.create=l(),s.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,s.prototype.uint32=(function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return e}})(),s.prototype.int32=function(){return this.uint32()|0},s.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function u(){var e=new i(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw o(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw o(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error(`invalid varint encoding`)}s.prototype.bool=function(){return this.uint32()!==0};function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}s.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return d(this.buf,this.pos+=4)},s.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return d(this.buf,this.pos+=4)|0};function f(){if(this.pos+8>this.len)throw o(this,8);return new i(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}s.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},s.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},s.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw o(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},s.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},s.prototype.skip=function(e){if(typeof e==`number`){if(this.pos+e>this.len)throw o(this,e);this.pos+=e}else do if(this.pos>=this.len)throw o(this);while(this.buf[this.pos++]&128);return this},s.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!=4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error(`invalid wire type `+e+` at offset `+this.pos)}return this},s._configure=function(e){r=e,s.create=l(),r._configure();var t=n.Long?`toLong`:`toNumber`;n.merge(s.prototype,{int64:function(){return u.call(this)[t](!1)},uint64:function(){return u.call(this)[t](!0)},sint64:function(){return u.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}})),Bs=a(((e,t)=>{t.exports=i;var n=zs();(i.prototype=Object.create(n.prototype)).constructor=i;var r=Is();function i(e){n.call(this,e)}i._configure=function(){r.Buffer&&(i.prototype._slice=r.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString(`utf-8`,this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()})),Vs=a(((e,t)=>{t.exports=r;var n=Is();(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r;function r(e,t,r){if(typeof e!=`function`)throw TypeError(`rpcImpl must be a function`);n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}r.prototype.rpcCall=function e(t,r,i,a,o){if(!a)throw TypeError(`request must be specified`);var s=this;if(!o)return n.asPromise(e,s,t,r,i,a);if(!s.rpcImpl){setTimeout(function(){o(Error(`already ended`))},0);return}try{return s.rpcImpl(t,r[s.requestDelimited?`encodeDelimited`:`encode`](a).finish(),function(e,n){if(e)return s.emit(`error`,e,t),o(e);if(n===null){s.end(!0);return}if(!(n instanceof i))try{n=i[s.responseDelimited?`decodeDelimited`:`decode`](n)}catch(e){return s.emit(`error`,e,t),o(e)}return s.emit(`data`,n,t),o(null,n)})}catch(e){s.emit(`error`,e,t),setTimeout(function(){o(e)},0);return}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit(`end`).off()),this}})),Hs=a((e=>{var t=e;t.Service=Vs()})),Us=a(((e,t)=>{t.exports={}})),Ws=a((e=>{var t=e;t.build=`minimal`,t.Writer=Ls(),t.BufferWriter=Rs(),t.Reader=zs(),t.BufferReader=Bs(),t.util=Is(),t.rpc=Hs(),t.roots=Us(),t.configure=n;function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}n()})),K=a(((e,t)=>{t.exports=Ws()})),Gs=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgInstallBundleResponse=e.MsgInstallBundle=e.MsgProvisionResponse=e.MsgProvision=e.MsgWalletSpendActionResponse=e.MsgWalletSpendAction=e.MsgWalletActionResponse=e.MsgWalletAction=e.MsgDeliverInboundResponse=e.MsgDeliverInbound=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`agoric.swingset`;function i(){return{messages:[],nums:[],ack:`0`,submitter:new Uint8Array}}e.MsgDeliverInbound={encode(e,t=r.default.Writer.create()){for(let n of e.messages)t.uint32(10).string(n);t.uint32(18).fork();for(let n of e.nums)t.uint64(n);return t.ldelim(),e.ack!==`0`&&t.uint32(24).uint64(e.ack),e.submitter.length!==0&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.messages.push(n.string());break;case 2:if((e&7)==2){let e=n.uint32()+n.pos;for(;n.pos<e;)o.nums.push(x(n.uint64()))}else o.nums.push(x(n.uint64()));break;case 3:o.ack=x(n.uint64());break;case 4:o.submitter=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{messages:Array.isArray(e?.messages)?e.messages.map(e=>String(e)):[],nums:Array.isArray(e?.nums)?e.nums.map(e=>String(e)):[],ack:S(e.ack)?String(e.ack):`0`,submitter:S(e.submitter)?v(e.submitter):new Uint8Array}},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e):t.messages=[],e.nums?t.nums=e.nums.map(e=>e):t.nums=[],e.ack!==void 0&&(t.ack=e.ack),e.submitter!==void 0&&(t.submitter=b(e.submitter===void 0?new Uint8Array:e.submitter)),t},fromPartial(e){let t=i();return t.messages=e.messages?.map(e=>e)||[],t.nums=e.nums?.map(e=>e)||[],t.ack=e.ack??`0`,t.submitter=e.submitter??new Uint8Array,t}};function a(){return{}}e.MsgDeliverInboundResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return o},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return a()}};function o(){return{owner:new Uint8Array,action:``}}e.MsgWalletAction={encode(e,t=r.default.Writer.create()){return e.owner.length!==0&&t.uint32(10).bytes(e.owner),e.action!==``&&t.uint32(18).string(e.action),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.owner=n.bytes();break;case 2:a.action=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{owner:S(e.owner)?v(e.owner):new Uint8Array,action:S(e.action)?String(e.action):``}},toJSON(e){let t={};return e.owner!==void 0&&(t.owner=b(e.owner===void 0?new Uint8Array:e.owner)),e.action!==void 0&&(t.action=e.action),t},fromPartial(e){let t=o();return t.owner=e.owner??new Uint8Array,t.action=e.action??``,t}};function s(){return{}}e.MsgWalletActionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return s()}};function c(){return{owner:new Uint8Array,spendAction:``}}e.MsgWalletSpendAction={encode(e,t=r.default.Writer.create()){return e.owner.length!==0&&t.uint32(10).bytes(e.owner),e.spendAction!==``&&t.uint32(18).string(e.spendAction),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.owner=n.bytes();break;case 2:a.spendAction=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{owner:S(e.owner)?v(e.owner):new Uint8Array,spendAction:S(e.spendAction)?String(e.spendAction):``}},toJSON(e){let t={};return e.owner!==void 0&&(t.owner=b(e.owner===void 0?new Uint8Array:e.owner)),e.spendAction!==void 0&&(t.spendAction=e.spendAction),t},fromPartial(e){let t=c();return t.owner=e.owner??new Uint8Array,t.spendAction=e.spendAction??``,t}};function l(){return{}}e.MsgWalletSpendActionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}};function u(){return{nickname:``,address:new Uint8Array,powerFlags:[],submitter:new Uint8Array}}e.MsgProvision={encode(e,t=r.default.Writer.create()){e.nickname!==``&&t.uint32(10).string(e.nickname),e.address.length!==0&&t.uint32(18).bytes(e.address);for(let n of e.powerFlags)t.uint32(26).string(n);return e.submitter.length!==0&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.nickname=n.string();break;case 2:a.address=n.bytes();break;case 3:a.powerFlags.push(n.string());break;case 4:a.submitter=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{nickname:S(e.nickname)?String(e.nickname):``,address:S(e.address)?v(e.address):new Uint8Array,powerFlags:Array.isArray(e?.powerFlags)?e.powerFlags.map(e=>String(e)):[],submitter:S(e.submitter)?v(e.submitter):new Uint8Array}},toJSON(e){let t={};return e.nickname!==void 0&&(t.nickname=e.nickname),e.address!==void 0&&(t.address=b(e.address===void 0?new Uint8Array:e.address)),e.powerFlags?t.powerFlags=e.powerFlags.map(e=>e):t.powerFlags=[],e.submitter!==void 0&&(t.submitter=b(e.submitter===void 0?new Uint8Array:e.submitter)),t},fromPartial(e){let t=u();return t.nickname=e.nickname??``,t.address=e.address??new Uint8Array,t.powerFlags=e.powerFlags?.map(e=>e)||[],t.submitter=e.submitter??new Uint8Array,t}};function d(){return{}}e.MsgProvisionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return d()}};function f(){return{bundle:``,submitter:new Uint8Array,compressedBundle:new Uint8Array,uncompressedSize:`0`}}e.MsgInstallBundle={encode(e,t=r.default.Writer.create()){return e.bundle!==``&&t.uint32(10).string(e.bundle),e.submitter.length!==0&&t.uint32(18).bytes(e.submitter),e.compressedBundle.length!==0&&t.uint32(26).bytes(e.compressedBundle),e.uncompressedSize!==`0`&&t.uint32(32).int64(e.uncompressedSize),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.bundle=n.string();break;case 2:a.submitter=n.bytes();break;case 3:a.compressedBundle=n.bytes();break;case 4:a.uncompressedSize=x(n.int64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{bundle:S(e.bundle)?String(e.bundle):``,submitter:S(e.submitter)?v(e.submitter):new Uint8Array,compressedBundle:S(e.compressedBundle)?v(e.compressedBundle):new Uint8Array,uncompressedSize:S(e.uncompressedSize)?String(e.uncompressedSize):`0`}},toJSON(e){let t={};return e.bundle!==void 0&&(t.bundle=e.bundle),e.submitter!==void 0&&(t.submitter=b(e.submitter===void 0?new Uint8Array:e.submitter)),e.compressedBundle!==void 0&&(t.compressedBundle=b(e.compressedBundle===void 0?new Uint8Array:e.compressedBundle)),e.uncompressedSize!==void 0&&(t.uncompressedSize=e.uncompressedSize),t},fromPartial(e){let t=f();return t.bundle=e.bundle??``,t.submitter=e.submitter??new Uint8Array,t.compressedBundle=e.compressedBundle??new Uint8Array,t.uncompressedSize=e.uncompressedSize??`0`,t}};function p(){return{}}e.MsgInstallBundleResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return p()}};var m=(()=>{if(m!==void 0)return m;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),_=m.atob||(e=>m.Buffer.from(e,`base64`).toString(`binary`));function v(e){let t=_(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var y=m.btoa||(e=>m.Buffer.from(e,`binary`).toString(`base64`));function b(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return y(t.join(``))}function x(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function S(e){return e!=null}})),Ks=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.DecProto=e.IntProto=e.DecCoin=e.Coin=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`cosmos.base.v1beta1`;function i(){return{denom:``,amount:``}}e.Coin={encode(e,t=r.default.Writer.create()){return e.denom!==``&&t.uint32(10).string(e.denom),e.amount!==``&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{denom:c(e.denom)?String(e.denom):``,amount:c(e.amount)?String(e.amount):``}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=i();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function a(){return{denom:``,amount:``}}e.DecCoin={encode(e,t=r.default.Writer.create()){return e.denom!==``&&t.uint32(10).string(e.denom),e.amount!==``&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{denom:c(e.denom)?String(e.denom):``,amount:c(e.amount)?String(e.amount):``}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=a();return t.denom=e.denom??``,t.amount=e.amount??``,t}};function o(){return{int:``}}e.IntProto={encode(e,t=r.default.Writer.create()){return e.int!==``&&t.uint32(10).string(e.int),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.int=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{int:c(e.int)?String(e.int):``}},toJSON(e){let t={};return e.int!==void 0&&(t.int=e.int),t},fromPartial(e){let t=o();return t.int=e.int??``,t}};function s(){return{dec:``}}e.DecProto={encode(e,t=r.default.Writer.create()){return e.dec!==``&&t.uint32(10).string(e.dec),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.dec=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{dec:c(e.dec)?String(e.dec):``}},toJSON(e){let t={};return e.dec!==void 0&&(t.dec=e.dec),t},fromPartial(e){let t=s();return t.dec=e.dec??``,t}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function c(e){return e!=null}})),qs=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Metadata=e.DenomUnit=e.Supply=e.Output=e.Input=e.SendEnabled=e.Params=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.bank.v1beta1`;function a(){return{sendEnabled:[],defaultSendEnabled:!1}}e.Params={encode(t,n=r.default.Writer.create()){for(let r of t.sendEnabled)e.SendEnabled.encode(r,n.uint32(10).fork()).ldelim();return t.defaultSendEnabled===!0&&n.uint32(16).bool(t.defaultSendEnabled),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=a();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.sendEnabled.push(e.SendEnabled.decode(i,i.uint32()));break;case 2:s.defaultSendEnabled=i.bool();break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{sendEnabled:Array.isArray(t?.sendEnabled)?t.sendEnabled.map(t=>e.SendEnabled.fromJSON(t)):[],defaultSendEnabled:f(t.defaultSendEnabled)?!!t.defaultSendEnabled:!1}},toJSON(t){let n={};return t.sendEnabled?n.sendEnabled=t.sendEnabled.map(t=>t?e.SendEnabled.toJSON(t):void 0):n.sendEnabled=[],t.defaultSendEnabled!==void 0&&(n.defaultSendEnabled=t.defaultSendEnabled),n},fromPartial(t){let n=a();return n.sendEnabled=t.sendEnabled?.map(t=>e.SendEnabled.fromPartial(t))||[],n.defaultSendEnabled=t.defaultSendEnabled??!1,n}};function o(){return{denom:``,enabled:!1}}e.SendEnabled={encode(e,t=r.default.Writer.create()){return e.denom!==``&&t.uint32(10).string(e.denom),e.enabled===!0&&t.uint32(16).bool(e.enabled),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.denom=n.string();break;case 2:a.enabled=n.bool();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{denom:f(e.denom)?String(e.denom):``,enabled:f(e.enabled)?!!e.enabled:!1}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.enabled!==void 0&&(t.enabled=e.enabled),t},fromPartial(e){let t=o();return t.denom=e.denom??``,t.enabled=e.enabled??!1,t}};function s(){return{address:``,coins:[]}}e.Input={encode(e,t=r.default.Writer.create()){e.address!==``&&t.uint32(10).string(e.address);for(let n of e.coins)i.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=s();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.address=n.string();break;case 2:o.coins.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{address:f(e.address)?String(e.address):``,coins:Array.isArray(e?.coins)?e.coins.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?i.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){let t=s();return t.address=e.address??``,t.coins=e.coins?.map(e=>i.Coin.fromPartial(e))||[],t}};function c(){return{address:``,coins:[]}}e.Output={encode(e,t=r.default.Writer.create()){e.address!==``&&t.uint32(10).string(e.address);for(let n of e.coins)i.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.address=n.string();break;case 2:o.coins.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{address:f(e.address)?String(e.address):``,coins:Array.isArray(e?.coins)?e.coins.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?i.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){let t=c();return t.address=e.address??``,t.coins=e.coins?.map(e=>i.Coin.fromPartial(e))||[],t}};function l(){return{total:[]}}e.Supply={encode(e,t=r.default.Writer.create()){for(let n of e.total)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=l();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.total.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{total:Array.isArray(e?.total)?e.total.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.total?t.total=e.total.map(e=>e?i.Coin.toJSON(e):void 0):t.total=[],t},fromPartial(e){let t=l();return t.total=e.total?.map(e=>i.Coin.fromPartial(e))||[],t}};function u(){return{denom:``,exponent:0,aliases:[]}}e.DenomUnit={encode(e,t=r.default.Writer.create()){e.denom!==``&&t.uint32(10).string(e.denom),e.exponent!==0&&t.uint32(16).uint32(e.exponent);for(let n of e.aliases)t.uint32(26).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.denom=n.string();break;case 2:a.exponent=n.uint32();break;case 3:a.aliases.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{denom:f(e.denom)?String(e.denom):``,exponent:f(e.exponent)?Number(e.exponent):0,aliases:Array.isArray(e?.aliases)?e.aliases.map(e=>String(e)):[]}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.exponent!==void 0&&(t.exponent=Math.round(e.exponent)),e.aliases?t.aliases=e.aliases.map(e=>e):t.aliases=[],t},fromPartial(e){let t=u();return t.denom=e.denom??``,t.exponent=e.exponent??0,t.aliases=e.aliases?.map(e=>e)||[],t}};function d(){return{description:``,denomUnits:[],base:``,display:``,name:``,symbol:``}}e.Metadata={encode(t,n=r.default.Writer.create()){t.description!==``&&n.uint32(10).string(t.description);for(let r of t.denomUnits)e.DenomUnit.encode(r,n.uint32(18).fork()).ldelim();return t.base!==``&&n.uint32(26).string(t.base),t.display!==``&&n.uint32(34).string(t.display),t.name!==``&&n.uint32(42).string(t.name),t.symbol!==``&&n.uint32(50).string(t.symbol),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=d();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.description=i.string();break;case 2:o.denomUnits.push(e.DenomUnit.decode(i,i.uint32()));break;case 3:o.base=i.string();break;case 4:o.display=i.string();break;case 5:o.name=i.string();break;case 6:o.symbol=i.string();break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{description:f(t.description)?String(t.description):``,denomUnits:Array.isArray(t?.denomUnits)?t.denomUnits.map(t=>e.DenomUnit.fromJSON(t)):[],base:f(t.base)?String(t.base):``,display:f(t.display)?String(t.display):``,name:f(t.name)?String(t.name):``,symbol:f(t.symbol)?String(t.symbol):``}},toJSON(t){let n={};return t.description!==void 0&&(n.description=t.description),t.denomUnits?n.denomUnits=t.denomUnits.map(t=>t?e.DenomUnit.toJSON(t):void 0):n.denomUnits=[],t.base!==void 0&&(n.base=t.base),t.display!==void 0&&(n.display=t.display),t.name!==void 0&&(n.name=t.name),t.symbol!==void 0&&(n.symbol=t.symbol),n},fromPartial(t){let n=d();return n.description=t.description??``,n.denomUnits=t.denomUnits?.map(t=>e.DenomUnit.fromPartial(t))||[],n.base=t.base??``,n.display=t.display??``,n.name=t.name??``,n.symbol=t.symbol??``,n}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function f(e){return e!=null}})),Js=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgMultiSendResponse=e.MsgMultiSend=e.MsgSendResponse=e.MsgSend=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks(),a=qs();e.protobufPackage=`cosmos.bank.v1beta1`;function o(){return{fromAddress:``,toAddress:``,amount:[]}}e.MsgSend={encode(e,t=r.default.Writer.create()){e.fromAddress!==``&&t.uint32(10).string(e.fromAddress),e.toAddress!==``&&t.uint32(18).string(e.toAddress);for(let n of e.amount)i.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.fromAddress=n.string();break;case 2:s.toAddress=n.string();break;case 3:s.amount.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{fromAddress:u(e.fromAddress)?String(e.fromAddress):``,toAddress:u(e.toAddress)?String(e.toAddress):``,amount:Array.isArray(e?.amount)?e.amount.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.fromAddress!==void 0&&(t.fromAddress=e.fromAddress),e.toAddress!==void 0&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){let t=o();return t.fromAddress=e.fromAddress??``,t.toAddress=e.toAddress??``,t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],t}};function s(){return{}}e.MsgSendResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return s()}};function c(){return{inputs:[],outputs:[]}}e.MsgMultiSend={encode(e,t=r.default.Writer.create()){for(let n of e.inputs)a.Input.encode(n,t.uint32(10).fork()).ldelim();for(let n of e.outputs)a.Output.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.inputs.push(a.Input.decode(n,n.uint32()));break;case 2:o.outputs.push(a.Output.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{inputs:Array.isArray(e?.inputs)?e.inputs.map(e=>a.Input.fromJSON(e)):[],outputs:Array.isArray(e?.outputs)?e.outputs.map(e=>a.Output.fromJSON(e)):[]}},toJSON(e){let t={};return e.inputs?t.inputs=e.inputs.map(e=>e?a.Input.toJSON(e):void 0):t.inputs=[],e.outputs?t.outputs=e.outputs.map(e=>e?a.Output.toJSON(e):void 0):t.outputs=[],t},fromPartial(e){let t=c();return t.inputs=e.inputs?.map(e=>a.Input.fromPartial(e))||[],t.outputs=e.outputs?.map(e=>a.Output.fromPartial(e))||[],t}};function l(){return{}}e.MsgMultiSendResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),Ys=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Timestamp=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`google.protobuf`;function i(){return{seconds:`0`,nanos:0}}e.Timestamp={encode(e,t=r.default.Writer.create()){return e.seconds!==`0`&&t.uint32(8).int64(e.seconds),e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=i();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.seconds=a(n.int64());break;case 2:s.nanos=n.int32();break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{seconds:o(e.seconds)?String(e.seconds):`0`,nanos:o(e.nanos)?Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==void 0&&(t.seconds=e.seconds),e.nanos!==void 0&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){let t=i();return t.seconds=e.seconds??`0`,t.nanos=e.nanos??0,t}};function a(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function o(e){return e!=null}})),Xs=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.ProofOps=e.ProofOp=e.DominoOp=e.ValueOp=e.Proof=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`tendermint.crypto`;function i(){return{total:`0`,index:`0`,leafHash:new Uint8Array,aunts:[]}}e.Proof={encode(e,t=r.default.Writer.create()){e.total!==`0`&&t.uint32(8).int64(e.total),e.index!==`0`&&t.uint32(16).int64(e.index),e.leafHash.length!==0&&t.uint32(26).bytes(e.leafHash);for(let n of e.aunts)t.uint32(34).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.total=m(n.int64());break;case 2:o.index=m(n.int64());break;case 3:o.leafHash=n.bytes();break;case 4:o.aunts.push(n.bytes());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{total:_(e.total)?String(e.total):`0`,index:_(e.index)?String(e.index):`0`,leafHash:_(e.leafHash)?d(e.leafHash):new Uint8Array,aunts:Array.isArray(e?.aunts)?e.aunts.map(e=>d(e)):[]}},toJSON(e){let t={};return e.total!==void 0&&(t.total=e.total),e.index!==void 0&&(t.index=e.index),e.leafHash!==void 0&&(t.leafHash=p(e.leafHash===void 0?new Uint8Array:e.leafHash)),e.aunts?t.aunts=e.aunts.map(e=>p(e===void 0?new Uint8Array:e)):t.aunts=[],t},fromPartial(e){let t=i();return t.total=e.total??`0`,t.index=e.index??`0`,t.leafHash=e.leafHash??new Uint8Array,t.aunts=e.aunts?.map(e=>e)||[],t}};function a(){return{key:new Uint8Array,proof:void 0}}e.ValueOp={encode(t,n=r.default.Writer.create()){return t.key.length!==0&&n.uint32(10).bytes(t.key),t.proof!==void 0&&e.Proof.encode(t.proof,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=a();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.key=i.bytes();break;case 2:s.proof=e.Proof.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{key:_(t.key)?d(t.key):new Uint8Array,proof:_(t.proof)?e.Proof.fromJSON(t.proof):void 0}},toJSON(t){let n={};return t.key!==void 0&&(n.key=p(t.key===void 0?new Uint8Array:t.key)),t.proof!==void 0&&(n.proof=t.proof?e.Proof.toJSON(t.proof):void 0),n},fromPartial(t){let n=a();return n.key=t.key??new Uint8Array,n.proof=t.proof!==void 0&&t.proof!==null?e.Proof.fromPartial(t.proof):void 0,n}};function o(){return{key:``,input:``,output:``}}e.DominoOp={encode(e,t=r.default.Writer.create()){return e.key!==``&&t.uint32(10).string(e.key),e.input!==``&&t.uint32(18).string(e.input),e.output!==``&&t.uint32(26).string(e.output),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.key=n.string();break;case 2:a.input=n.string();break;case 3:a.output=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{key:_(e.key)?String(e.key):``,input:_(e.input)?String(e.input):``,output:_(e.output)?String(e.output):``}},toJSON(e){let t={};return e.key!==void 0&&(t.key=e.key),e.input!==void 0&&(t.input=e.input),e.output!==void 0&&(t.output=e.output),t},fromPartial(e){let t=o();return t.key=e.key??``,t.input=e.input??``,t.output=e.output??``,t}};function s(){return{type:``,key:new Uint8Array,data:new Uint8Array}}e.ProofOp={encode(e,t=r.default.Writer.create()){return e.type!==``&&t.uint32(10).string(e.type),e.key.length!==0&&t.uint32(18).bytes(e.key),e.data.length!==0&&t.uint32(26).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.type=n.string();break;case 2:a.key=n.bytes();break;case 3:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{type:_(e.type)?String(e.type):``,key:_(e.key)?d(e.key):new Uint8Array,data:_(e.data)?d(e.data):new Uint8Array}},toJSON(e){let t={};return e.type!==void 0&&(t.type=e.type),e.key!==void 0&&(t.key=p(e.key===void 0?new Uint8Array:e.key)),e.data!==void 0&&(t.data=p(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=s();return t.type=e.type??``,t.key=e.key??new Uint8Array,t.data=e.data??new Uint8Array,t}};function c(){return{ops:[]}}e.ProofOps={encode(t,n=r.default.Writer.create()){for(let r of t.ops)e.ProofOp.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.ops.push(e.ProofOp.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{ops:Array.isArray(t?.ops)?t.ops.map(t=>e.ProofOp.fromJSON(t)):[]}},toJSON(t){let n={};return t.ops?n.ops=t.ops.map(t=>t?e.ProofOp.toJSON(t):void 0):n.ops=[],n},fromPartial(t){let n=c();return n.ops=t.ops?.map(t=>e.ProofOp.fromPartial(t))||[],n}};var l=(()=>{if(l!==void 0)return l;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),u=l.atob||(e=>l.Buffer.from(e,`base64`).toString(`binary`));function d(e){let t=u(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var f=l.btoa||(e=>l.Buffer.from(e,`binary`).toString(`base64`));function p(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return f(t.join(``))}function m(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function _(e){return e!=null}})),Zs=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Consensus=e.App=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`tendermint.version`;function i(){return{protocol:`0`,software:``}}e.App={encode(e,t=r.default.Writer.create()){return e.protocol!==`0`&&t.uint32(8).uint64(e.protocol),e.software!==``&&t.uint32(18).string(e.software),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.protocol=o(n.uint64());break;case 2:s.software=n.string();break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{protocol:s(e.protocol)?String(e.protocol):`0`,software:s(e.software)?String(e.software):``}},toJSON(e){let t={};return e.protocol!==void 0&&(t.protocol=e.protocol),e.software!==void 0&&(t.software=e.software),t},fromPartial(e){let t=i();return t.protocol=e.protocol??`0`,t.software=e.software??``,t}};function a(){return{block:`0`,app:`0`}}e.Consensus={encode(e,t=r.default.Writer.create()){return e.block!==`0`&&t.uint32(8).uint64(e.block),e.app!==`0`&&t.uint32(16).uint64(e.app),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,s=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:s.block=o(n.uint64());break;case 2:s.app=o(n.uint64());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{block:s(e.block)?String(e.block):`0`,app:s(e.app)?String(e.app):`0`}},toJSON(e){let t={};return e.block!==void 0&&(t.block=e.block),e.app!==void 0&&(t.app=e.app),t},fromPartial(e){let t=a();return t.block=e.block??`0`,t.app=e.app??`0`,t}};function o(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function s(e){return e!=null}})),Qs=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.PublicKey=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`tendermint.crypto`;function i(){return{ed25519:void 0,secp256k1:void 0}}e.PublicKey={encode(e,t=r.default.Writer.create()){return e.ed25519!==void 0&&t.uint32(10).bytes(e.ed25519),e.secp256k1!==void 0&&t.uint32(18).bytes(e.secp256k1),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.ed25519=n.bytes();break;case 2:o.secp256k1=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{ed25519:u(e.ed25519)?s(e.ed25519):void 0,secp256k1:u(e.secp256k1)?s(e.secp256k1):void 0}},toJSON(e){let t={};return e.ed25519!==void 0&&(t.ed25519=e.ed25519===void 0?void 0:l(e.ed25519)),e.secp256k1!==void 0&&(t.secp256k1=e.secp256k1===void 0?void 0:l(e.secp256k1)),t},fromPartial(e){let t=i();return t.ed25519=e.ed25519??void 0,t.secp256k1=e.secp256k1??void 0,t}};var a=(()=>{if(a!==void 0)return a;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),o=a.atob||(e=>a.Buffer.from(e,`base64`).toString(`binary`));function s(e){let t=o(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var c=a.btoa||(e=>a.Buffer.from(e,`binary`).toString(`base64`));function l(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return c(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),$s=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.SimpleValidator=e.Validator=e.ValidatorSet=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Qs();e.protobufPackage=`tendermint.types`;function a(){return{validators:[],proposer:void 0,totalVotingPower:`0`}}e.ValidatorSet={encode(t,n=r.default.Writer.create()){for(let r of t.validators)e.Validator.encode(r,n.uint32(10).fork()).ldelim();return t.proposer!==void 0&&e.Validator.encode(t.proposer,n.uint32(18).fork()).ldelim(),t.totalVotingPower!==`0`&&n.uint32(24).int64(t.totalVotingPower),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=a();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.validators.push(e.Validator.decode(i,i.uint32()));break;case 2:s.proposer=e.Validator.decode(i,i.uint32());break;case 3:s.totalVotingPower=p(i.int64());break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{validators:Array.isArray(t?.validators)?t.validators.map(t=>e.Validator.fromJSON(t)):[],proposer:m(t.proposer)?e.Validator.fromJSON(t.proposer):void 0,totalVotingPower:m(t.totalVotingPower)?String(t.totalVotingPower):`0`}},toJSON(t){let n={};return t.validators?n.validators=t.validators.map(t=>t?e.Validator.toJSON(t):void 0):n.validators=[],t.proposer!==void 0&&(n.proposer=t.proposer?e.Validator.toJSON(t.proposer):void 0),t.totalVotingPower!==void 0&&(n.totalVotingPower=t.totalVotingPower),n},fromPartial(t){let n=a();return n.validators=t.validators?.map(t=>e.Validator.fromPartial(t))||[],n.proposer=t.proposer!==void 0&&t.proposer!==null?e.Validator.fromPartial(t.proposer):void 0,n.totalVotingPower=t.totalVotingPower??`0`,n}};function o(){return{address:new Uint8Array,pubKey:void 0,votingPower:`0`,proposerPriority:`0`}}e.Validator={encode(e,t=r.default.Writer.create()){return e.address.length!==0&&t.uint32(10).bytes(e.address),e.pubKey!==void 0&&i.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower!==`0`&&t.uint32(24).int64(e.votingPower),e.proposerPriority!==`0`&&t.uint32(32).int64(e.proposerPriority),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.address=n.bytes();break;case 2:s.pubKey=i.PublicKey.decode(n,n.uint32());break;case 3:s.votingPower=p(n.int64());break;case 4:s.proposerPriority=p(n.int64());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{address:m(e.address)?u(e.address):new Uint8Array,pubKey:m(e.pubKey)?i.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):`0`,proposerPriority:m(e.proposerPriority)?String(e.proposerPriority):`0`}},toJSON(e){let t={};return e.address!==void 0&&(t.address=f(e.address===void 0?new Uint8Array:e.address)),e.pubKey!==void 0&&(t.pubKey=e.pubKey?i.PublicKey.toJSON(e.pubKey):void 0),e.votingPower!==void 0&&(t.votingPower=e.votingPower),e.proposerPriority!==void 0&&(t.proposerPriority=e.proposerPriority),t},fromPartial(e){let t=o();return t.address=e.address??new Uint8Array,t.pubKey=e.pubKey!==void 0&&e.pubKey!==null?i.PublicKey.fromPartial(e.pubKey):void 0,t.votingPower=e.votingPower??`0`,t.proposerPriority=e.proposerPriority??`0`,t}};function s(){return{pubKey:void 0,votingPower:`0`}}e.SimpleValidator={encode(e,t=r.default.Writer.create()){return e.pubKey!==void 0&&i.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower!==`0`&&t.uint32(16).int64(e.votingPower),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=s();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.pubKey=i.PublicKey.decode(n,n.uint32());break;case 2:o.votingPower=p(n.int64());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{pubKey:m(e.pubKey)?i.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):`0`}},toJSON(e){let t={};return e.pubKey!==void 0&&(t.pubKey=e.pubKey?i.PublicKey.toJSON(e.pubKey):void 0),e.votingPower!==void 0&&(t.votingPower=e.votingPower),t},fromPartial(e){let t=s();return t.pubKey=e.pubKey!==void 0&&e.pubKey!==null?i.PublicKey.fromPartial(e.pubKey):void 0,t.votingPower=e.votingPower??`0`,t}};var c=(()=>{if(c!==void 0)return c;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),l=c.atob||(e=>c.Buffer.from(e,`base64`).toString(`binary`));function u(e){let t=l(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var d=c.btoa||(e=>c.Buffer.from(e,`binary`).toString(`base64`));function f(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return d(t.join(``))}function p(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function m(e){return e!=null}})),ec=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.TxProof=e.BlockMeta=e.LightBlock=e.SignedHeader=e.Proposal=e.CommitSig=e.Commit=e.Vote=e.Data=e.Header=e.BlockID=e.Part=e.PartSetHeader=e.signedMsgTypeToJSON=e.signedMsgTypeFromJSON=e.SignedMsgType=e.blockIDFlagToJSON=e.blockIDFlagFromJSON=e.BlockIDFlag=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=Xs(),o=Zs(),s=$s();e.protobufPackage=`tendermint.types`;var c;(function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]=`BLOCK_ID_FLAG_UNKNOWN`,e[e.BLOCK_ID_FLAG_ABSENT=1]=`BLOCK_ID_FLAG_ABSENT`,e[e.BLOCK_ID_FLAG_COMMIT=2]=`BLOCK_ID_FLAG_COMMIT`,e[e.BLOCK_ID_FLAG_NIL=3]=`BLOCK_ID_FLAG_NIL`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(c=e.BlockIDFlag||={});function l(e){switch(e){case 0:case`BLOCK_ID_FLAG_UNKNOWN`:return c.BLOCK_ID_FLAG_UNKNOWN;case 1:case`BLOCK_ID_FLAG_ABSENT`:return c.BLOCK_ID_FLAG_ABSENT;case 2:case`BLOCK_ID_FLAG_COMMIT`:return c.BLOCK_ID_FLAG_COMMIT;case 3:case`BLOCK_ID_FLAG_NIL`:return c.BLOCK_ID_FLAG_NIL;default:return c.UNRECOGNIZED}}e.blockIDFlagFromJSON=l;function u(e){switch(e){case c.BLOCK_ID_FLAG_UNKNOWN:return`BLOCK_ID_FLAG_UNKNOWN`;case c.BLOCK_ID_FLAG_ABSENT:return`BLOCK_ID_FLAG_ABSENT`;case c.BLOCK_ID_FLAG_COMMIT:return`BLOCK_ID_FLAG_COMMIT`;case c.BLOCK_ID_FLAG_NIL:return`BLOCK_ID_FLAG_NIL`;default:return`UNKNOWN`}}e.blockIDFlagToJSON=u;var d;(function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]=`SIGNED_MSG_TYPE_UNKNOWN`,e[e.SIGNED_MSG_TYPE_PREVOTE=1]=`SIGNED_MSG_TYPE_PREVOTE`,e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]=`SIGNED_MSG_TYPE_PRECOMMIT`,e[e.SIGNED_MSG_TYPE_PROPOSAL=32]=`SIGNED_MSG_TYPE_PROPOSAL`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(d=e.SignedMsgType||={});function f(e){switch(e){case 0:case`SIGNED_MSG_TYPE_UNKNOWN`:return d.SIGNED_MSG_TYPE_UNKNOWN;case 1:case`SIGNED_MSG_TYPE_PREVOTE`:return d.SIGNED_MSG_TYPE_PREVOTE;case 2:case`SIGNED_MSG_TYPE_PRECOMMIT`:return d.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case`SIGNED_MSG_TYPE_PROPOSAL`:return d.SIGNED_MSG_TYPE_PROPOSAL;default:return d.UNRECOGNIZED}}e.signedMsgTypeFromJSON=f;function p(e){switch(e){case d.SIGNED_MSG_TYPE_UNKNOWN:return`SIGNED_MSG_TYPE_UNKNOWN`;case d.SIGNED_MSG_TYPE_PREVOTE:return`SIGNED_MSG_TYPE_PREVOTE`;case d.SIGNED_MSG_TYPE_PRECOMMIT:return`SIGNED_MSG_TYPE_PRECOMMIT`;case d.SIGNED_MSG_TYPE_PROPOSAL:return`SIGNED_MSG_TYPE_PROPOSAL`;default:return`UNKNOWN`}}e.signedMsgTypeToJSON=p;function m(){return{total:0,hash:new Uint8Array}}e.PartSetHeader={encode(e,t=r.default.Writer.create()){return e.total!==0&&t.uint32(8).uint32(e.total),e.hash.length!==0&&t.uint32(18).bytes(e.hash),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.total=n.uint32();break;case 2:a.hash=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{total:R(e.total)?Number(e.total):0,hash:R(e.hash)?j(e.hash):new Uint8Array}},toJSON(e){let t={};return e.total!==void 0&&(t.total=Math.round(e.total)),e.hash!==void 0&&(t.hash=N(e.hash===void 0?new Uint8Array:e.hash)),t},fromPartial(e){let t=m();return t.total=e.total??0,t.hash=e.hash??new Uint8Array,t}};function _(){return{index:0,bytes:new Uint8Array,proof:void 0}}e.Part={encode(e,t=r.default.Writer.create()){return e.index!==0&&t.uint32(8).uint32(e.index),e.bytes.length!==0&&t.uint32(18).bytes(e.bytes),e.proof!==void 0&&a.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.index=n.uint32();break;case 2:o.bytes=n.bytes();break;case 3:o.proof=a.Proof.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{index:R(e.index)?Number(e.index):0,bytes:R(e.bytes)?j(e.bytes):new Uint8Array,proof:R(e.proof)?a.Proof.fromJSON(e.proof):void 0}},toJSON(e){let t={};return e.index!==void 0&&(t.index=Math.round(e.index)),e.bytes!==void 0&&(t.bytes=N(e.bytes===void 0?new Uint8Array:e.bytes)),e.proof!==void 0&&(t.proof=e.proof?a.Proof.toJSON(e.proof):void 0),t},fromPartial(e){let t=_();return t.index=e.index??0,t.bytes=e.bytes??new Uint8Array,t.proof=e.proof!==void 0&&e.proof!==null?a.Proof.fromPartial(e.proof):void 0,t}};function v(){return{hash:new Uint8Array,partSetHeader:void 0}}e.BlockID={encode(t,n=r.default.Writer.create()){return t.hash.length!==0&&n.uint32(10).bytes(t.hash),t.partSetHeader!==void 0&&e.PartSetHeader.encode(t.partSetHeader,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=v();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.hash=i.bytes();break;case 2:o.partSetHeader=e.PartSetHeader.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{hash:R(t.hash)?j(t.hash):new Uint8Array,partSetHeader:R(t.partSetHeader)?e.PartSetHeader.fromJSON(t.partSetHeader):void 0}},toJSON(t){let n={};return t.hash!==void 0&&(n.hash=N(t.hash===void 0?new Uint8Array:t.hash)),t.partSetHeader!==void 0&&(n.partSetHeader=t.partSetHeader?e.PartSetHeader.toJSON(t.partSetHeader):void 0),n},fromPartial(t){let n=v();return n.hash=t.hash??new Uint8Array,n.partSetHeader=t.partSetHeader!==void 0&&t.partSetHeader!==null?e.PartSetHeader.fromPartial(t.partSetHeader):void 0,n}};function y(){return{version:void 0,chainId:``,height:`0`,time:void 0,lastBlockId:void 0,lastCommitHash:new Uint8Array,dataHash:new Uint8Array,validatorsHash:new Uint8Array,nextValidatorsHash:new Uint8Array,consensusHash:new Uint8Array,appHash:new Uint8Array,lastResultsHash:new Uint8Array,evidenceHash:new Uint8Array,proposerAddress:new Uint8Array}}e.Header={encode(t,n=r.default.Writer.create()){return t.version!==void 0&&o.Consensus.encode(t.version,n.uint32(10).fork()).ldelim(),t.chainId!==``&&n.uint32(18).string(t.chainId),t.height!==`0`&&n.uint32(24).int64(t.height),t.time!==void 0&&i.Timestamp.encode(P(t.time),n.uint32(34).fork()).ldelim(),t.lastBlockId!==void 0&&e.BlockID.encode(t.lastBlockId,n.uint32(42).fork()).ldelim(),t.lastCommitHash.length!==0&&n.uint32(50).bytes(t.lastCommitHash),t.dataHash.length!==0&&n.uint32(58).bytes(t.dataHash),t.validatorsHash.length!==0&&n.uint32(66).bytes(t.validatorsHash),t.nextValidatorsHash.length!==0&&n.uint32(74).bytes(t.nextValidatorsHash),t.consensusHash.length!==0&&n.uint32(82).bytes(t.consensusHash),t.appHash.length!==0&&n.uint32(90).bytes(t.appHash),t.lastResultsHash.length!==0&&n.uint32(98).bytes(t.lastResultsHash),t.evidenceHash.length!==0&&n.uint32(106).bytes(t.evidenceHash),t.proposerAddress.length!==0&&n.uint32(114).bytes(t.proposerAddress),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),s=n===void 0?a.len:a.pos+n,c=y();for(;a.pos<s;){let t=a.uint32();switch(t>>>3){case 1:c.version=o.Consensus.decode(a,a.uint32());break;case 2:c.chainId=a.string();break;case 3:c.height=L(a.int64());break;case 4:c.time=F(i.Timestamp.decode(a,a.uint32()));break;case 5:c.lastBlockId=e.BlockID.decode(a,a.uint32());break;case 6:c.lastCommitHash=a.bytes();break;case 7:c.dataHash=a.bytes();break;case 8:c.validatorsHash=a.bytes();break;case 9:c.nextValidatorsHash=a.bytes();break;case 10:c.consensusHash=a.bytes();break;case 11:c.appHash=a.bytes();break;case 12:c.lastResultsHash=a.bytes();break;case 13:c.evidenceHash=a.bytes();break;case 14:c.proposerAddress=a.bytes();break;default:a.skipType(t&7);break}}return c},fromJSON(t){return{version:R(t.version)?o.Consensus.fromJSON(t.version):void 0,chainId:R(t.chainId)?String(t.chainId):``,height:R(t.height)?String(t.height):`0`,time:R(t.time)?I(t.time):void 0,lastBlockId:R(t.lastBlockId)?e.BlockID.fromJSON(t.lastBlockId):void 0,lastCommitHash:R(t.lastCommitHash)?j(t.lastCommitHash):new Uint8Array,dataHash:R(t.dataHash)?j(t.dataHash):new Uint8Array,validatorsHash:R(t.validatorsHash)?j(t.validatorsHash):new Uint8Array,nextValidatorsHash:R(t.nextValidatorsHash)?j(t.nextValidatorsHash):new Uint8Array,consensusHash:R(t.consensusHash)?j(t.consensusHash):new Uint8Array,appHash:R(t.appHash)?j(t.appHash):new Uint8Array,lastResultsHash:R(t.lastResultsHash)?j(t.lastResultsHash):new Uint8Array,evidenceHash:R(t.evidenceHash)?j(t.evidenceHash):new Uint8Array,proposerAddress:R(t.proposerAddress)?j(t.proposerAddress):new Uint8Array}},toJSON(t){let n={};return t.version!==void 0&&(n.version=t.version?o.Consensus.toJSON(t.version):void 0),t.chainId!==void 0&&(n.chainId=t.chainId),t.height!==void 0&&(n.height=t.height),t.time!==void 0&&(n.time=t.time.toISOString()),t.lastBlockId!==void 0&&(n.lastBlockId=t.lastBlockId?e.BlockID.toJSON(t.lastBlockId):void 0),t.lastCommitHash!==void 0&&(n.lastCommitHash=N(t.lastCommitHash===void 0?new Uint8Array:t.lastCommitHash)),t.dataHash!==void 0&&(n.dataHash=N(t.dataHash===void 0?new Uint8Array:t.dataHash)),t.validatorsHash!==void 0&&(n.validatorsHash=N(t.validatorsHash===void 0?new Uint8Array:t.validatorsHash)),t.nextValidatorsHash!==void 0&&(n.nextValidatorsHash=N(t.nextValidatorsHash===void 0?new Uint8Array:t.nextValidatorsHash)),t.consensusHash!==void 0&&(n.consensusHash=N(t.consensusHash===void 0?new Uint8Array:t.consensusHash)),t.appHash!==void 0&&(n.appHash=N(t.appHash===void 0?new Uint8Array:t.appHash)),t.lastResultsHash!==void 0&&(n.lastResultsHash=N(t.lastResultsHash===void 0?new Uint8Array:t.lastResultsHash)),t.evidenceHash!==void 0&&(n.evidenceHash=N(t.evidenceHash===void 0?new Uint8Array:t.evidenceHash)),t.proposerAddress!==void 0&&(n.proposerAddress=N(t.proposerAddress===void 0?new Uint8Array:t.proposerAddress)),n},fromPartial(t){let n=y();return n.version=t.version!==void 0&&t.version!==null?o.Consensus.fromPartial(t.version):void 0,n.chainId=t.chainId??``,n.height=t.height??`0`,n.time=t.time??void 0,n.lastBlockId=t.lastBlockId!==void 0&&t.lastBlockId!==null?e.BlockID.fromPartial(t.lastBlockId):void 0,n.lastCommitHash=t.lastCommitHash??new Uint8Array,n.dataHash=t.dataHash??new Uint8Array,n.validatorsHash=t.validatorsHash??new Uint8Array,n.nextValidatorsHash=t.nextValidatorsHash??new Uint8Array,n.consensusHash=t.consensusHash??new Uint8Array,n.appHash=t.appHash??new Uint8Array,n.lastResultsHash=t.lastResultsHash??new Uint8Array,n.evidenceHash=t.evidenceHash??new Uint8Array,n.proposerAddress=t.proposerAddress??new Uint8Array,n}};function b(){return{txs:[]}}e.Data={encode(e,t=r.default.Writer.create()){for(let n of e.txs)t.uint32(10).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.txs.push(n.bytes());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{txs:Array.isArray(e?.txs)?e.txs.map(e=>j(e)):[]}},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>N(e===void 0?new Uint8Array:e)):t.txs=[],t},fromPartial(e){let t=b();return t.txs=e.txs?.map(e=>e)||[],t}};function x(){return{type:0,height:`0`,round:0,blockId:void 0,timestamp:void 0,validatorAddress:new Uint8Array,validatorIndex:0,signature:new Uint8Array}}e.Vote={encode(t,n=r.default.Writer.create()){return t.type!==0&&n.uint32(8).int32(t.type),t.height!==`0`&&n.uint32(16).int64(t.height),t.round!==0&&n.uint32(24).int32(t.round),t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(34).fork()).ldelim(),t.timestamp!==void 0&&i.Timestamp.encode(P(t.timestamp),n.uint32(42).fork()).ldelim(),t.validatorAddress.length!==0&&n.uint32(50).bytes(t.validatorAddress),t.validatorIndex!==0&&n.uint32(56).int32(t.validatorIndex),t.signature.length!==0&&n.uint32(66).bytes(t.signature),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=x();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.type=a.int32();break;case 2:s.height=L(a.int64());break;case 3:s.round=a.int32();break;case 4:s.blockId=e.BlockID.decode(a,a.uint32());break;case 5:s.timestamp=F(i.Timestamp.decode(a,a.uint32()));break;case 6:s.validatorAddress=a.bytes();break;case 7:s.validatorIndex=a.int32();break;case 8:s.signature=a.bytes();break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{type:R(t.type)?f(t.type):0,height:R(t.height)?String(t.height):`0`,round:R(t.round)?Number(t.round):0,blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,timestamp:R(t.timestamp)?I(t.timestamp):void 0,validatorAddress:R(t.validatorAddress)?j(t.validatorAddress):new Uint8Array,validatorIndex:R(t.validatorIndex)?Number(t.validatorIndex):0,signature:R(t.signature)?j(t.signature):new Uint8Array}},toJSON(t){let n={};return t.type!==void 0&&(n.type=p(t.type)),t.height!==void 0&&(n.height=t.height),t.round!==void 0&&(n.round=Math.round(t.round)),t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.timestamp!==void 0&&(n.timestamp=t.timestamp.toISOString()),t.validatorAddress!==void 0&&(n.validatorAddress=N(t.validatorAddress===void 0?new Uint8Array:t.validatorAddress)),t.validatorIndex!==void 0&&(n.validatorIndex=Math.round(t.validatorIndex)),t.signature!==void 0&&(n.signature=N(t.signature===void 0?new Uint8Array:t.signature)),n},fromPartial(t){let n=x();return n.type=t.type??0,n.height=t.height??`0`,n.round=t.round??0,n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.timestamp=t.timestamp??void 0,n.validatorAddress=t.validatorAddress??new Uint8Array,n.validatorIndex=t.validatorIndex??0,n.signature=t.signature??new Uint8Array,n}};function S(){return{height:`0`,round:0,blockId:void 0,signatures:[]}}e.Commit={encode(t,n=r.default.Writer.create()){t.height!==`0`&&n.uint32(8).int64(t.height),t.round!==0&&n.uint32(16).int32(t.round),t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(26).fork()).ldelim();for(let r of t.signatures)e.CommitSig.encode(r,n.uint32(34).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=S();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.height=L(i.int64());break;case 2:o.round=i.int32();break;case 3:o.blockId=e.BlockID.decode(i,i.uint32());break;case 4:o.signatures.push(e.CommitSig.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{height:R(t.height)?String(t.height):`0`,round:R(t.round)?Number(t.round):0,blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,signatures:Array.isArray(t?.signatures)?t.signatures.map(t=>e.CommitSig.fromJSON(t)):[]}},toJSON(t){let n={};return t.height!==void 0&&(n.height=t.height),t.round!==void 0&&(n.round=Math.round(t.round)),t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.signatures?n.signatures=t.signatures.map(t=>t?e.CommitSig.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=S();return n.height=t.height??`0`,n.round=t.round??0,n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.signatures=t.signatures?.map(t=>e.CommitSig.fromPartial(t))||[],n}};function C(){return{blockIdFlag:0,validatorAddress:new Uint8Array,timestamp:void 0,signature:new Uint8Array}}e.CommitSig={encode(e,t=r.default.Writer.create()){return e.blockIdFlag!==0&&t.uint32(8).int32(e.blockIdFlag),e.validatorAddress.length!==0&&t.uint32(18).bytes(e.validatorAddress),e.timestamp!==void 0&&i.Timestamp.encode(P(e.timestamp),t.uint32(26).fork()).ldelim(),e.signature.length!==0&&t.uint32(34).bytes(e.signature),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=C();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.blockIdFlag=n.int32();break;case 2:o.validatorAddress=n.bytes();break;case 3:o.timestamp=F(i.Timestamp.decode(n,n.uint32()));break;case 4:o.signature=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{blockIdFlag:R(e.blockIdFlag)?l(e.blockIdFlag):0,validatorAddress:R(e.validatorAddress)?j(e.validatorAddress):new Uint8Array,timestamp:R(e.timestamp)?I(e.timestamp):void 0,signature:R(e.signature)?j(e.signature):new Uint8Array}},toJSON(e){let t={};return e.blockIdFlag!==void 0&&(t.blockIdFlag=u(e.blockIdFlag)),e.validatorAddress!==void 0&&(t.validatorAddress=N(e.validatorAddress===void 0?new Uint8Array:e.validatorAddress)),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.signature!==void 0&&(t.signature=N(e.signature===void 0?new Uint8Array:e.signature)),t},fromPartial(e){let t=C();return t.blockIdFlag=e.blockIdFlag??0,t.validatorAddress=e.validatorAddress??new Uint8Array,t.timestamp=e.timestamp??void 0,t.signature=e.signature??new Uint8Array,t}};function w(){return{type:0,height:`0`,round:0,polRound:0,blockId:void 0,timestamp:void 0,signature:new Uint8Array}}e.Proposal={encode(t,n=r.default.Writer.create()){return t.type!==0&&n.uint32(8).int32(t.type),t.height!==`0`&&n.uint32(16).int64(t.height),t.round!==0&&n.uint32(24).int32(t.round),t.polRound!==0&&n.uint32(32).int32(t.polRound),t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(42).fork()).ldelim(),t.timestamp!==void 0&&i.Timestamp.encode(P(t.timestamp),n.uint32(50).fork()).ldelim(),t.signature.length!==0&&n.uint32(58).bytes(t.signature),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=w();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.type=a.int32();break;case 2:s.height=L(a.int64());break;case 3:s.round=a.int32();break;case 4:s.polRound=a.int32();break;case 5:s.blockId=e.BlockID.decode(a,a.uint32());break;case 6:s.timestamp=F(i.Timestamp.decode(a,a.uint32()));break;case 7:s.signature=a.bytes();break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{type:R(t.type)?f(t.type):0,height:R(t.height)?String(t.height):`0`,round:R(t.round)?Number(t.round):0,polRound:R(t.polRound)?Number(t.polRound):0,blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,timestamp:R(t.timestamp)?I(t.timestamp):void 0,signature:R(t.signature)?j(t.signature):new Uint8Array}},toJSON(t){let n={};return t.type!==void 0&&(n.type=p(t.type)),t.height!==void 0&&(n.height=t.height),t.round!==void 0&&(n.round=Math.round(t.round)),t.polRound!==void 0&&(n.polRound=Math.round(t.polRound)),t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.timestamp!==void 0&&(n.timestamp=t.timestamp.toISOString()),t.signature!==void 0&&(n.signature=N(t.signature===void 0?new Uint8Array:t.signature)),n},fromPartial(t){let n=w();return n.type=t.type??0,n.height=t.height??`0`,n.round=t.round??0,n.polRound=t.polRound??0,n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.timestamp=t.timestamp??void 0,n.signature=t.signature??new Uint8Array,n}};function T(){return{header:void 0,commit:void 0}}e.SignedHeader={encode(t,n=r.default.Writer.create()){return t.header!==void 0&&e.Header.encode(t.header,n.uint32(10).fork()).ldelim(),t.commit!==void 0&&e.Commit.encode(t.commit,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=T();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.header=e.Header.decode(i,i.uint32());break;case 2:o.commit=e.Commit.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{header:R(t.header)?e.Header.fromJSON(t.header):void 0,commit:R(t.commit)?e.Commit.fromJSON(t.commit):void 0}},toJSON(t){let n={};return t.header!==void 0&&(n.header=t.header?e.Header.toJSON(t.header):void 0),t.commit!==void 0&&(n.commit=t.commit?e.Commit.toJSON(t.commit):void 0),n},fromPartial(t){let n=T();return n.header=t.header!==void 0&&t.header!==null?e.Header.fromPartial(t.header):void 0,n.commit=t.commit!==void 0&&t.commit!==null?e.Commit.fromPartial(t.commit):void 0,n}};function E(){return{signedHeader:void 0,validatorSet:void 0}}e.LightBlock={encode(t,n=r.default.Writer.create()){return t.signedHeader!==void 0&&e.SignedHeader.encode(t.signedHeader,n.uint32(10).fork()).ldelim(),t.validatorSet!==void 0&&s.ValidatorSet.encode(t.validatorSet,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=E();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signedHeader=e.SignedHeader.decode(i,i.uint32());break;case 2:o.validatorSet=s.ValidatorSet.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{signedHeader:R(t.signedHeader)?e.SignedHeader.fromJSON(t.signedHeader):void 0,validatorSet:R(t.validatorSet)?s.ValidatorSet.fromJSON(t.validatorSet):void 0}},toJSON(t){let n={};return t.signedHeader!==void 0&&(n.signedHeader=t.signedHeader?e.SignedHeader.toJSON(t.signedHeader):void 0),t.validatorSet!==void 0&&(n.validatorSet=t.validatorSet?s.ValidatorSet.toJSON(t.validatorSet):void 0),n},fromPartial(t){let n=E();return n.signedHeader=t.signedHeader!==void 0&&t.signedHeader!==null?e.SignedHeader.fromPartial(t.signedHeader):void 0,n.validatorSet=t.validatorSet!==void 0&&t.validatorSet!==null?s.ValidatorSet.fromPartial(t.validatorSet):void 0,n}};function D(){return{blockId:void 0,blockSize:`0`,header:void 0,numTxs:`0`}}e.BlockMeta={encode(t,n=r.default.Writer.create()){return t.blockId!==void 0&&e.BlockID.encode(t.blockId,n.uint32(10).fork()).ldelim(),t.blockSize!==`0`&&n.uint32(16).int64(t.blockSize),t.header!==void 0&&e.Header.encode(t.header,n.uint32(26).fork()).ldelim(),t.numTxs!==`0`&&n.uint32(32).int64(t.numTxs),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=D();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.blockId=e.BlockID.decode(i,i.uint32());break;case 2:o.blockSize=L(i.int64());break;case 3:o.header=e.Header.decode(i,i.uint32());break;case 4:o.numTxs=L(i.int64());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{blockId:R(t.blockId)?e.BlockID.fromJSON(t.blockId):void 0,blockSize:R(t.blockSize)?String(t.blockSize):`0`,header:R(t.header)?e.Header.fromJSON(t.header):void 0,numTxs:R(t.numTxs)?String(t.numTxs):`0`}},toJSON(t){let n={};return t.blockId!==void 0&&(n.blockId=t.blockId?e.BlockID.toJSON(t.blockId):void 0),t.blockSize!==void 0&&(n.blockSize=t.blockSize),t.header!==void 0&&(n.header=t.header?e.Header.toJSON(t.header):void 0),t.numTxs!==void 0&&(n.numTxs=t.numTxs),n},fromPartial(t){let n=D();return n.blockId=t.blockId!==void 0&&t.blockId!==null?e.BlockID.fromPartial(t.blockId):void 0,n.blockSize=t.blockSize??`0`,n.header=t.header!==void 0&&t.header!==null?e.Header.fromPartial(t.header):void 0,n.numTxs=t.numTxs??`0`,n}};function O(){return{rootHash:new Uint8Array,data:new Uint8Array,proof:void 0}}e.TxProof={encode(e,t=r.default.Writer.create()){return e.rootHash.length!==0&&t.uint32(10).bytes(e.rootHash),e.data.length!==0&&t.uint32(18).bytes(e.data),e.proof!==void 0&&a.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=O();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.rootHash=n.bytes();break;case 2:o.data=n.bytes();break;case 3:o.proof=a.Proof.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{rootHash:R(e.rootHash)?j(e.rootHash):new Uint8Array,data:R(e.data)?j(e.data):new Uint8Array,proof:R(e.proof)?a.Proof.fromJSON(e.proof):void 0}},toJSON(e){let t={};return e.rootHash!==void 0&&(t.rootHash=N(e.rootHash===void 0?new Uint8Array:e.rootHash)),e.data!==void 0&&(t.data=N(e.data===void 0?new Uint8Array:e.data)),e.proof!==void 0&&(t.proof=e.proof?a.Proof.toJSON(e.proof):void 0),t},fromPartial(e){let t=O();return t.rootHash=e.rootHash??new Uint8Array,t.data=e.data??new Uint8Array,t.proof=e.proof!==void 0&&e.proof!==null?a.Proof.fromPartial(e.proof):void 0,t}};var k=(()=>{if(k!==void 0)return k;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),A=k.atob||(e=>k.Buffer.from(e,`base64`).toString(`binary`));function j(e){let t=A(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var M=k.btoa||(e=>k.Buffer.from(e,`binary`).toString(`base64`));function N(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return M(t.join(``))}function P(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function F(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function I(e){return e instanceof Date?e:typeof e==`string`?new Date(e):F(i.Timestamp.fromJSON(e))}function L(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function R(e){return e!=null}})),tc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Any=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`google.protobuf`;function i(){return{typeUrl:``,value:new Uint8Array}}e.Any={encode(e,t=r.default.Writer.create()){return e.typeUrl!==``&&t.uint32(10).string(e.typeUrl),e.value.length!==0&&t.uint32(18).bytes(e.value),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.typeUrl=n.string();break;case 2:o.value=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{typeUrl:u(e.typeUrl)?String(e.typeUrl):``,value:u(e.value)?s(e.value):new Uint8Array}},toJSON(e){let t={};return e.typeUrl!==void 0&&(t.typeUrl=e.typeUrl),e.value!==void 0&&(t.value=l(e.value===void 0?new Uint8Array:e.value)),t},fromPartial(e){let t=i();return t.typeUrl=e.typeUrl??``,t.value=e.value??new Uint8Array,t}};var a=(()=>{if(a!==void 0)return a;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),o=a.atob||(e=>a.Buffer.from(e,`base64`).toString(`binary`));function s(e){let t=o(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var c=a.btoa||(e=>a.Buffer.from(e,`binary`).toString(`base64`));function l(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return c(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),nc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Duration=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`google.protobuf`;function i(){return{seconds:`0`,nanos:0}}e.Duration={encode(e,t=r.default.Writer.create()){return e.seconds!==`0`&&t.uint32(8).int64(e.seconds),e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=i();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.seconds=a(n.int64());break;case 2:s.nanos=n.int32();break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{seconds:o(e.seconds)?String(e.seconds):`0`,nanos:o(e.nanos)?Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==void 0&&(t.seconds=e.seconds),e.nanos!==void 0&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){let t=i();return t.seconds=e.seconds??`0`,t.nanos=e.nanos??0,t}};function a(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function o(e){return e!=null}})),rc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Pool=e.RedelegationResponse=e.RedelegationEntryResponse=e.DelegationResponse=e.Params=e.Redelegation=e.RedelegationEntry=e.UnbondingDelegationEntry=e.UnbondingDelegation=e.Delegation=e.DVVTriplets=e.DVVTriplet=e.DVPairs=e.DVPair=e.ValAddresses=e.Validator=e.Description=e.Commission=e.CommissionRates=e.HistoricalInfo=e.bondStatusToJSON=e.bondStatusFromJSON=e.BondStatus=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=ec(),o=tc(),s=nc(),c=Ks();e.protobufPackage=`cosmos.staking.v1beta1`;var l;(function(e){e[e.BOND_STATUS_UNSPECIFIED=0]=`BOND_STATUS_UNSPECIFIED`,e[e.BOND_STATUS_UNBONDED=1]=`BOND_STATUS_UNBONDED`,e[e.BOND_STATUS_UNBONDING=2]=`BOND_STATUS_UNBONDING`,e[e.BOND_STATUS_BONDED=3]=`BOND_STATUS_BONDED`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(l=e.BondStatus||={});function u(e){switch(e){case 0:case`BOND_STATUS_UNSPECIFIED`:return l.BOND_STATUS_UNSPECIFIED;case 1:case`BOND_STATUS_UNBONDED`:return l.BOND_STATUS_UNBONDED;case 2:case`BOND_STATUS_UNBONDING`:return l.BOND_STATUS_UNBONDING;case 3:case`BOND_STATUS_BONDED`:return l.BOND_STATUS_BONDED;default:return l.UNRECOGNIZED}}e.bondStatusFromJSON=u;function d(e){switch(e){case l.BOND_STATUS_UNSPECIFIED:return`BOND_STATUS_UNSPECIFIED`;case l.BOND_STATUS_UNBONDED:return`BOND_STATUS_UNBONDED`;case l.BOND_STATUS_UNBONDING:return`BOND_STATUS_UNBONDING`;case l.BOND_STATUS_BONDED:return`BOND_STATUS_BONDED`;default:return`UNKNOWN`}}e.bondStatusToJSON=d;function f(){return{header:void 0,valset:[]}}e.HistoricalInfo={encode(t,n=r.default.Writer.create()){t.header!==void 0&&a.Header.encode(t.header,n.uint32(10).fork()).ldelim();for(let r of t.valset)e.Validator.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=f();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.header=a.Header.decode(i,i.uint32());break;case 2:s.valset.push(e.Validator.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{header:I(t.header)?a.Header.fromJSON(t.header):void 0,valset:Array.isArray(t?.valset)?t.valset.map(t=>e.Validator.fromJSON(t)):[]}},toJSON(t){let n={};return t.header!==void 0&&(n.header=t.header?a.Header.toJSON(t.header):void 0),t.valset?n.valset=t.valset.map(t=>t?e.Validator.toJSON(t):void 0):n.valset=[],n},fromPartial(t){let n=f();return n.header=t.header!==void 0&&t.header!==null?a.Header.fromPartial(t.header):void 0,n.valset=t.valset?.map(t=>e.Validator.fromPartial(t))||[],n}};function p(){return{rate:``,maxRate:``,maxChangeRate:``}}e.CommissionRates={encode(e,t=r.default.Writer.create()){return e.rate!==``&&t.uint32(10).string(e.rate),e.maxRate!==``&&t.uint32(18).string(e.maxRate),e.maxChangeRate!==``&&t.uint32(26).string(e.maxChangeRate),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.rate=n.string();break;case 2:a.maxRate=n.string();break;case 3:a.maxChangeRate=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{rate:I(e.rate)?String(e.rate):``,maxRate:I(e.maxRate)?String(e.maxRate):``,maxChangeRate:I(e.maxChangeRate)?String(e.maxChangeRate):``}},toJSON(e){let t={};return e.rate!==void 0&&(t.rate=e.rate),e.maxRate!==void 0&&(t.maxRate=e.maxRate),e.maxChangeRate!==void 0&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){let t=p();return t.rate=e.rate??``,t.maxRate=e.maxRate??``,t.maxChangeRate=e.maxChangeRate??``,t}};function m(){return{commissionRates:void 0,updateTime:void 0}}e.Commission={encode(t,n=r.default.Writer.create()){return t.commissionRates!==void 0&&e.CommissionRates.encode(t.commissionRates,n.uint32(10).fork()).ldelim(),t.updateTime!==void 0&&i.Timestamp.encode(M(t.updateTime),n.uint32(18).fork()).ldelim(),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=m();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.commissionRates=e.CommissionRates.decode(a,a.uint32());break;case 2:s.updateTime=N(i.Timestamp.decode(a,a.uint32()));break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{commissionRates:I(t.commissionRates)?e.CommissionRates.fromJSON(t.commissionRates):void 0,updateTime:I(t.updateTime)?P(t.updateTime):void 0}},toJSON(t){let n={};return t.commissionRates!==void 0&&(n.commissionRates=t.commissionRates?e.CommissionRates.toJSON(t.commissionRates):void 0),t.updateTime!==void 0&&(n.updateTime=t.updateTime.toISOString()),n},fromPartial(t){let n=m();return n.commissionRates=t.commissionRates!==void 0&&t.commissionRates!==null?e.CommissionRates.fromPartial(t.commissionRates):void 0,n.updateTime=t.updateTime??void 0,n}};function h(){return{moniker:``,identity:``,website:``,securityContact:``,details:``}}e.Description={encode(e,t=r.default.Writer.create()){return e.moniker!==``&&t.uint32(10).string(e.moniker),e.identity!==``&&t.uint32(18).string(e.identity),e.website!==``&&t.uint32(26).string(e.website),e.securityContact!==``&&t.uint32(34).string(e.securityContact),e.details!==``&&t.uint32(42).string(e.details),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=h();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.moniker=n.string();break;case 2:a.identity=n.string();break;case 3:a.website=n.string();break;case 4:a.securityContact=n.string();break;case 5:a.details=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{moniker:I(e.moniker)?String(e.moniker):``,identity:I(e.identity)?String(e.identity):``,website:I(e.website)?String(e.website):``,securityContact:I(e.securityContact)?String(e.securityContact):``,details:I(e.details)?String(e.details):``}},toJSON(e){let t={};return e.moniker!==void 0&&(t.moniker=e.moniker),e.identity!==void 0&&(t.identity=e.identity),e.website!==void 0&&(t.website=e.website),e.securityContact!==void 0&&(t.securityContact=e.securityContact),e.details!==void 0&&(t.details=e.details),t},fromPartial(e){let t=h();return t.moniker=e.moniker??``,t.identity=e.identity??``,t.website=e.website??``,t.securityContact=e.securityContact??``,t.details=e.details??``,t}};function g(){return{operatorAddress:``,consensusPubkey:void 0,jailed:!1,status:0,tokens:``,delegatorShares:``,description:void 0,unbondingHeight:`0`,unbondingTime:void 0,commission:void 0,minSelfDelegation:``}}e.Validator={encode(t,n=r.default.Writer.create()){return t.operatorAddress!==``&&n.uint32(10).string(t.operatorAddress),t.consensusPubkey!==void 0&&o.Any.encode(t.consensusPubkey,n.uint32(18).fork()).ldelim(),t.jailed===!0&&n.uint32(24).bool(t.jailed),t.status!==0&&n.uint32(32).int32(t.status),t.tokens!==``&&n.uint32(42).string(t.tokens),t.delegatorShares!==``&&n.uint32(50).string(t.delegatorShares),t.description!==void 0&&e.Description.encode(t.description,n.uint32(58).fork()).ldelim(),t.unbondingHeight!==`0`&&n.uint32(64).int64(t.unbondingHeight),t.unbondingTime!==void 0&&i.Timestamp.encode(M(t.unbondingTime),n.uint32(74).fork()).ldelim(),t.commission!==void 0&&e.Commission.encode(t.commission,n.uint32(82).fork()).ldelim(),t.minSelfDelegation!==``&&n.uint32(90).string(t.minSelfDelegation),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),s=n===void 0?a.len:a.pos+n,c=g();for(;a.pos<s;){let t=a.uint32();switch(t>>>3){case 1:c.operatorAddress=a.string();break;case 2:c.consensusPubkey=o.Any.decode(a,a.uint32());break;case 3:c.jailed=a.bool();break;case 4:c.status=a.int32();break;case 5:c.tokens=a.string();break;case 6:c.delegatorShares=a.string();break;case 7:c.description=e.Description.decode(a,a.uint32());break;case 8:c.unbondingHeight=F(a.int64());break;case 9:c.unbondingTime=N(i.Timestamp.decode(a,a.uint32()));break;case 10:c.commission=e.Commission.decode(a,a.uint32());break;case 11:c.minSelfDelegation=a.string();break;default:a.skipType(t&7);break}}return c},fromJSON(t){return{operatorAddress:I(t.operatorAddress)?String(t.operatorAddress):``,consensusPubkey:I(t.consensusPubkey)?o.Any.fromJSON(t.consensusPubkey):void 0,jailed:I(t.jailed)?!!t.jailed:!1,status:I(t.status)?u(t.status):0,tokens:I(t.tokens)?String(t.tokens):``,delegatorShares:I(t.delegatorShares)?String(t.delegatorShares):``,description:I(t.description)?e.Description.fromJSON(t.description):void 0,unbondingHeight:I(t.unbondingHeight)?String(t.unbondingHeight):`0`,unbondingTime:I(t.unbondingTime)?P(t.unbondingTime):void 0,commission:I(t.commission)?e.Commission.fromJSON(t.commission):void 0,minSelfDelegation:I(t.minSelfDelegation)?String(t.minSelfDelegation):``}},toJSON(t){let n={};return t.operatorAddress!==void 0&&(n.operatorAddress=t.operatorAddress),t.consensusPubkey!==void 0&&(n.consensusPubkey=t.consensusPubkey?o.Any.toJSON(t.consensusPubkey):void 0),t.jailed!==void 0&&(n.jailed=t.jailed),t.status!==void 0&&(n.status=d(t.status)),t.tokens!==void 0&&(n.tokens=t.tokens),t.delegatorShares!==void 0&&(n.delegatorShares=t.delegatorShares),t.description!==void 0&&(n.description=t.description?e.Description.toJSON(t.description):void 0),t.unbondingHeight!==void 0&&(n.unbondingHeight=t.unbondingHeight),t.unbondingTime!==void 0&&(n.unbondingTime=t.unbondingTime.toISOString()),t.commission!==void 0&&(n.commission=t.commission?e.Commission.toJSON(t.commission):void 0),t.minSelfDelegation!==void 0&&(n.minSelfDelegation=t.minSelfDelegation),n},fromPartial(t){let n=g();return n.operatorAddress=t.operatorAddress??``,n.consensusPubkey=t.consensusPubkey!==void 0&&t.consensusPubkey!==null?o.Any.fromPartial(t.consensusPubkey):void 0,n.jailed=t.jailed??!1,n.status=t.status??0,n.tokens=t.tokens??``,n.delegatorShares=t.delegatorShares??``,n.description=t.description!==void 0&&t.description!==null?e.Description.fromPartial(t.description):void 0,n.unbondingHeight=t.unbondingHeight??`0`,n.unbondingTime=t.unbondingTime??void 0,n.commission=t.commission!==void 0&&t.commission!==null?e.Commission.fromPartial(t.commission):void 0,n.minSelfDelegation=t.minSelfDelegation??``,n}};function _(){return{addresses:[]}}e.ValAddresses={encode(e,t=r.default.Writer.create()){for(let n of e.addresses)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.addresses.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{addresses:Array.isArray(e?.addresses)?e.addresses.map(e=>String(e)):[]}},toJSON(e){let t={};return e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){let t=_();return t.addresses=e.addresses?.map(e=>e)||[],t}};function v(){return{delegatorAddress:``,validatorAddress:``}}e.DVPair={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=v();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:I(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:I(e.validatorAddress)?String(e.validatorAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){let t=v();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t}};function y(){return{pairs:[]}}e.DVPairs={encode(t,n=r.default.Writer.create()){for(let r of t.pairs)e.DVPair.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=y();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.pairs.push(e.DVPair.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{pairs:Array.isArray(t?.pairs)?t.pairs.map(t=>e.DVPair.fromJSON(t)):[]}},toJSON(t){let n={};return t.pairs?n.pairs=t.pairs.map(t=>t?e.DVPair.toJSON(t):void 0):n.pairs=[],n},fromPartial(t){let n=y();return n.pairs=t.pairs?.map(t=>e.DVPair.fromPartial(t))||[],n}};function b(){return{delegatorAddress:``,validatorSrcAddress:``,validatorDstAddress:``}}e.DVVTriplet={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorSrcAddress!==``&&t.uint32(18).string(e.validatorSrcAddress),e.validatorDstAddress!==``&&t.uint32(26).string(e.validatorDstAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorSrcAddress=n.string();break;case 3:a.validatorDstAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:I(e.delegatorAddress)?String(e.delegatorAddress):``,validatorSrcAddress:I(e.validatorSrcAddress)?String(e.validatorSrcAddress):``,validatorDstAddress:I(e.validatorDstAddress)?String(e.validatorDstAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorSrcAddress!==void 0&&(t.validatorSrcAddress=e.validatorSrcAddress),e.validatorDstAddress!==void 0&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){let t=b();return t.delegatorAddress=e.delegatorAddress??``,t.validatorSrcAddress=e.validatorSrcAddress??``,t.validatorDstAddress=e.validatorDstAddress??``,t}};function x(){return{triplets:[]}}e.DVVTriplets={encode(t,n=r.default.Writer.create()){for(let r of t.triplets)e.DVVTriplet.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=x();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.triplets.push(e.DVVTriplet.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{triplets:Array.isArray(t?.triplets)?t.triplets.map(t=>e.DVVTriplet.fromJSON(t)):[]}},toJSON(t){let n={};return t.triplets?n.triplets=t.triplets.map(t=>t?e.DVVTriplet.toJSON(t):void 0):n.triplets=[],n},fromPartial(t){let n=x();return n.triplets=t.triplets?.map(t=>e.DVVTriplet.fromPartial(t))||[],n}};function S(){return{delegatorAddress:``,validatorAddress:``,shares:``}}e.Delegation={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.shares!==``&&t.uint32(26).string(e.shares),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=S();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;case 3:a.shares=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:I(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:I(e.validatorAddress)?String(e.validatorAddress):``,shares:I(e.shares)?String(e.shares):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.shares!==void 0&&(t.shares=e.shares),t},fromPartial(e){let t=S();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.shares=e.shares??``,t}};function C(){return{delegatorAddress:``,validatorAddress:``,entries:[]}}e.UnbondingDelegation={encode(t,n=r.default.Writer.create()){t.delegatorAddress!==``&&n.uint32(10).string(t.delegatorAddress),t.validatorAddress!==``&&n.uint32(18).string(t.validatorAddress);for(let r of t.entries)e.UnbondingDelegationEntry.encode(r,n.uint32(26).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=C();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.delegatorAddress=i.string();break;case 2:o.validatorAddress=i.string();break;case 3:o.entries.push(e.UnbondingDelegationEntry.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{delegatorAddress:I(t.delegatorAddress)?String(t.delegatorAddress):``,validatorAddress:I(t.validatorAddress)?String(t.validatorAddress):``,entries:Array.isArray(t?.entries)?t.entries.map(t=>e.UnbondingDelegationEntry.fromJSON(t)):[]}},toJSON(t){let n={};return t.delegatorAddress!==void 0&&(n.delegatorAddress=t.delegatorAddress),t.validatorAddress!==void 0&&(n.validatorAddress=t.validatorAddress),t.entries?n.entries=t.entries.map(t=>t?e.UnbondingDelegationEntry.toJSON(t):void 0):n.entries=[],n},fromPartial(t){let n=C();return n.delegatorAddress=t.delegatorAddress??``,n.validatorAddress=t.validatorAddress??``,n.entries=t.entries?.map(t=>e.UnbondingDelegationEntry.fromPartial(t))||[],n}};function w(){return{creationHeight:`0`,completionTime:void 0,initialBalance:``,balance:``}}e.UnbondingDelegationEntry={encode(e,t=r.default.Writer.create()){return e.creationHeight!==`0`&&t.uint32(8).int64(e.creationHeight),e.completionTime!==void 0&&i.Timestamp.encode(M(e.completionTime),t.uint32(18).fork()).ldelim(),e.initialBalance!==``&&t.uint32(26).string(e.initialBalance),e.balance!==``&&t.uint32(34).string(e.balance),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=w();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.creationHeight=F(n.int64());break;case 2:o.completionTime=N(i.Timestamp.decode(n,n.uint32()));break;case 3:o.initialBalance=n.string();break;case 4:o.balance=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{creationHeight:I(e.creationHeight)?String(e.creationHeight):`0`,completionTime:I(e.completionTime)?P(e.completionTime):void 0,initialBalance:I(e.initialBalance)?String(e.initialBalance):``,balance:I(e.balance)?String(e.balance):``}},toJSON(e){let t={};return e.creationHeight!==void 0&&(t.creationHeight=e.creationHeight),e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),e.initialBalance!==void 0&&(t.initialBalance=e.initialBalance),e.balance!==void 0&&(t.balance=e.balance),t},fromPartial(e){let t=w();return t.creationHeight=e.creationHeight??`0`,t.completionTime=e.completionTime??void 0,t.initialBalance=e.initialBalance??``,t.balance=e.balance??``,t}};function T(){return{creationHeight:`0`,completionTime:void 0,initialBalance:``,sharesDst:``}}e.RedelegationEntry={encode(e,t=r.default.Writer.create()){return e.creationHeight!==`0`&&t.uint32(8).int64(e.creationHeight),e.completionTime!==void 0&&i.Timestamp.encode(M(e.completionTime),t.uint32(18).fork()).ldelim(),e.initialBalance!==``&&t.uint32(26).string(e.initialBalance),e.sharesDst!==``&&t.uint32(34).string(e.sharesDst),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=T();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.creationHeight=F(n.int64());break;case 2:o.completionTime=N(i.Timestamp.decode(n,n.uint32()));break;case 3:o.initialBalance=n.string();break;case 4:o.sharesDst=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{creationHeight:I(e.creationHeight)?String(e.creationHeight):`0`,completionTime:I(e.completionTime)?P(e.completionTime):void 0,initialBalance:I(e.initialBalance)?String(e.initialBalance):``,sharesDst:I(e.sharesDst)?String(e.sharesDst):``}},toJSON(e){let t={};return e.creationHeight!==void 0&&(t.creationHeight=e.creationHeight),e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),e.initialBalance!==void 0&&(t.initialBalance=e.initialBalance),e.sharesDst!==void 0&&(t.sharesDst=e.sharesDst),t},fromPartial(e){let t=T();return t.creationHeight=e.creationHeight??`0`,t.completionTime=e.completionTime??void 0,t.initialBalance=e.initialBalance??``,t.sharesDst=e.sharesDst??``,t}};function E(){return{delegatorAddress:``,validatorSrcAddress:``,validatorDstAddress:``,entries:[]}}e.Redelegation={encode(t,n=r.default.Writer.create()){t.delegatorAddress!==``&&n.uint32(10).string(t.delegatorAddress),t.validatorSrcAddress!==``&&n.uint32(18).string(t.validatorSrcAddress),t.validatorDstAddress!==``&&n.uint32(26).string(t.validatorDstAddress);for(let r of t.entries)e.RedelegationEntry.encode(r,n.uint32(34).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=E();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.delegatorAddress=i.string();break;case 2:o.validatorSrcAddress=i.string();break;case 3:o.validatorDstAddress=i.string();break;case 4:o.entries.push(e.RedelegationEntry.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{delegatorAddress:I(t.delegatorAddress)?String(t.delegatorAddress):``,validatorSrcAddress:I(t.validatorSrcAddress)?String(t.validatorSrcAddress):``,validatorDstAddress:I(t.validatorDstAddress)?String(t.validatorDstAddress):``,entries:Array.isArray(t?.entries)?t.entries.map(t=>e.RedelegationEntry.fromJSON(t)):[]}},toJSON(t){let n={};return t.delegatorAddress!==void 0&&(n.delegatorAddress=t.delegatorAddress),t.validatorSrcAddress!==void 0&&(n.validatorSrcAddress=t.validatorSrcAddress),t.validatorDstAddress!==void 0&&(n.validatorDstAddress=t.validatorDstAddress),t.entries?n.entries=t.entries.map(t=>t?e.RedelegationEntry.toJSON(t):void 0):n.entries=[],n},fromPartial(t){let n=E();return n.delegatorAddress=t.delegatorAddress??``,n.validatorSrcAddress=t.validatorSrcAddress??``,n.validatorDstAddress=t.validatorDstAddress??``,n.entries=t.entries?.map(t=>e.RedelegationEntry.fromPartial(t))||[],n}};function D(){return{unbondingTime:void 0,maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:``}}e.Params={encode(e,t=r.default.Writer.create()){return e.unbondingTime!==void 0&&s.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),e.maxValidators!==0&&t.uint32(16).uint32(e.maxValidators),e.maxEntries!==0&&t.uint32(24).uint32(e.maxEntries),e.historicalEntries!==0&&t.uint32(32).uint32(e.historicalEntries),e.bondDenom!==``&&t.uint32(42).string(e.bondDenom),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=D();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.unbondingTime=s.Duration.decode(n,n.uint32());break;case 2:a.maxValidators=n.uint32();break;case 3:a.maxEntries=n.uint32();break;case 4:a.historicalEntries=n.uint32();break;case 5:a.bondDenom=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{unbondingTime:I(e.unbondingTime)?s.Duration.fromJSON(e.unbondingTime):void 0,maxValidators:I(e.maxValidators)?Number(e.maxValidators):0,maxEntries:I(e.maxEntries)?Number(e.maxEntries):0,historicalEntries:I(e.historicalEntries)?Number(e.historicalEntries):0,bondDenom:I(e.bondDenom)?String(e.bondDenom):``}},toJSON(e){let t={};return e.unbondingTime!==void 0&&(t.unbondingTime=e.unbondingTime?s.Duration.toJSON(e.unbondingTime):void 0),e.maxValidators!==void 0&&(t.maxValidators=Math.round(e.maxValidators)),e.maxEntries!==void 0&&(t.maxEntries=Math.round(e.maxEntries)),e.historicalEntries!==void 0&&(t.historicalEntries=Math.round(e.historicalEntries)),e.bondDenom!==void 0&&(t.bondDenom=e.bondDenom),t},fromPartial(e){let t=D();return t.unbondingTime=e.unbondingTime!==void 0&&e.unbondingTime!==null?s.Duration.fromPartial(e.unbondingTime):void 0,t.maxValidators=e.maxValidators??0,t.maxEntries=e.maxEntries??0,t.historicalEntries=e.historicalEntries??0,t.bondDenom=e.bondDenom??``,t}};function O(){return{delegation:void 0,balance:void 0}}e.DelegationResponse={encode(t,n=r.default.Writer.create()){return t.delegation!==void 0&&e.Delegation.encode(t.delegation,n.uint32(10).fork()).ldelim(),t.balance!==void 0&&c.Coin.encode(t.balance,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=O();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.delegation=e.Delegation.decode(i,i.uint32());break;case 2:o.balance=c.Coin.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{delegation:I(t.delegation)?e.Delegation.fromJSON(t.delegation):void 0,balance:I(t.balance)?c.Coin.fromJSON(t.balance):void 0}},toJSON(t){let n={};return t.delegation!==void 0&&(n.delegation=t.delegation?e.Delegation.toJSON(t.delegation):void 0),t.balance!==void 0&&(n.balance=t.balance?c.Coin.toJSON(t.balance):void 0),n},fromPartial(t){let n=O();return n.delegation=t.delegation!==void 0&&t.delegation!==null?e.Delegation.fromPartial(t.delegation):void 0,n.balance=t.balance!==void 0&&t.balance!==null?c.Coin.fromPartial(t.balance):void 0,n}};function k(){return{redelegationEntry:void 0,balance:``}}e.RedelegationEntryResponse={encode(t,n=r.default.Writer.create()){return t.redelegationEntry!==void 0&&e.RedelegationEntry.encode(t.redelegationEntry,n.uint32(10).fork()).ldelim(),t.balance!==``&&n.uint32(34).string(t.balance),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=k();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.redelegationEntry=e.RedelegationEntry.decode(i,i.uint32());break;case 4:o.balance=i.string();break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{redelegationEntry:I(t.redelegationEntry)?e.RedelegationEntry.fromJSON(t.redelegationEntry):void 0,balance:I(t.balance)?String(t.balance):``}},toJSON(t){let n={};return t.redelegationEntry!==void 0&&(n.redelegationEntry=t.redelegationEntry?e.RedelegationEntry.toJSON(t.redelegationEntry):void 0),t.balance!==void 0&&(n.balance=t.balance),n},fromPartial(t){let n=k();return n.redelegationEntry=t.redelegationEntry!==void 0&&t.redelegationEntry!==null?e.RedelegationEntry.fromPartial(t.redelegationEntry):void 0,n.balance=t.balance??``,n}};function A(){return{redelegation:void 0,entries:[]}}e.RedelegationResponse={encode(t,n=r.default.Writer.create()){t.redelegation!==void 0&&e.Redelegation.encode(t.redelegation,n.uint32(10).fork()).ldelim();for(let r of t.entries)e.RedelegationEntryResponse.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=A();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.redelegation=e.Redelegation.decode(i,i.uint32());break;case 2:o.entries.push(e.RedelegationEntryResponse.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{redelegation:I(t.redelegation)?e.Redelegation.fromJSON(t.redelegation):void 0,entries:Array.isArray(t?.entries)?t.entries.map(t=>e.RedelegationEntryResponse.fromJSON(t)):[]}},toJSON(t){let n={};return t.redelegation!==void 0&&(n.redelegation=t.redelegation?e.Redelegation.toJSON(t.redelegation):void 0),t.entries?n.entries=t.entries.map(t=>t?e.RedelegationEntryResponse.toJSON(t):void 0):n.entries=[],n},fromPartial(t){let n=A();return n.redelegation=t.redelegation!==void 0&&t.redelegation!==null?e.Redelegation.fromPartial(t.redelegation):void 0,n.entries=t.entries?.map(t=>e.RedelegationEntryResponse.fromPartial(t))||[],n}};function j(){return{notBondedTokens:``,bondedTokens:``}}e.Pool={encode(e,t=r.default.Writer.create()){return e.notBondedTokens!==``&&t.uint32(10).string(e.notBondedTokens),e.bondedTokens!==``&&t.uint32(18).string(e.bondedTokens),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=j();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.notBondedTokens=n.string();break;case 2:a.bondedTokens=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{notBondedTokens:I(e.notBondedTokens)?String(e.notBondedTokens):``,bondedTokens:I(e.bondedTokens)?String(e.bondedTokens):``}},toJSON(e){let t={};return e.notBondedTokens!==void 0&&(t.notBondedTokens=e.notBondedTokens),e.bondedTokens!==void 0&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){let t=j();return t.notBondedTokens=e.notBondedTokens??``,t.bondedTokens=e.bondedTokens??``,t}};function M(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function N(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function P(e){return e instanceof Date?e:typeof e==`string`?new Date(e):N(i.Timestamp.fromJSON(e))}function F(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function I(e){return e!=null}})),ic=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgUndelegateResponse=e.MsgUndelegate=e.MsgBeginRedelegateResponse=e.MsgBeginRedelegate=e.MsgDelegateResponse=e.MsgDelegate=e.MsgEditValidatorResponse=e.MsgEditValidator=e.MsgCreateValidatorResponse=e.MsgCreateValidator=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=rc(),o=tc(),s=Ks();e.protobufPackage=`cosmos.staking.v1beta1`;function c(){return{description:void 0,commission:void 0,minSelfDelegation:``,delegatorAddress:``,validatorAddress:``,pubkey:void 0,value:void 0}}e.MsgCreateValidator={encode(e,t=r.default.Writer.create()){return e.description!==void 0&&a.Description.encode(e.description,t.uint32(10).fork()).ldelim(),e.commission!==void 0&&a.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),e.minSelfDelegation!==``&&t.uint32(26).string(e.minSelfDelegation),e.delegatorAddress!==``&&t.uint32(34).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(42).string(e.validatorAddress),e.pubkey!==void 0&&o.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),e.value!==void 0&&s.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,l=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:l.description=a.Description.decode(n,n.uint32());break;case 2:l.commission=a.CommissionRates.decode(n,n.uint32());break;case 3:l.minSelfDelegation=n.string();break;case 4:l.delegatorAddress=n.string();break;case 5:l.validatorAddress=n.string();break;case 6:l.pubkey=o.Any.decode(n,n.uint32());break;case 7:l.value=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return l},fromJSON(e){return{description:x(e.description)?a.Description.fromJSON(e.description):void 0,commission:x(e.commission)?a.CommissionRates.fromJSON(e.commission):void 0,minSelfDelegation:x(e.minSelfDelegation)?String(e.minSelfDelegation):``,delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,pubkey:x(e.pubkey)?o.Any.fromJSON(e.pubkey):void 0,value:x(e.value)?s.Coin.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.description!==void 0&&(t.description=e.description?a.Description.toJSON(e.description):void 0),e.commission!==void 0&&(t.commission=e.commission?a.CommissionRates.toJSON(e.commission):void 0),e.minSelfDelegation!==void 0&&(t.minSelfDelegation=e.minSelfDelegation),e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.pubkey!==void 0&&(t.pubkey=e.pubkey?o.Any.toJSON(e.pubkey):void 0),e.value!==void 0&&(t.value=e.value?s.Coin.toJSON(e.value):void 0),t},fromPartial(e){let t=c();return t.description=e.description!==void 0&&e.description!==null?a.Description.fromPartial(e.description):void 0,t.commission=e.commission!==void 0&&e.commission!==null?a.CommissionRates.fromPartial(e.commission):void 0,t.minSelfDelegation=e.minSelfDelegation??``,t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.pubkey=e.pubkey!==void 0&&e.pubkey!==null?o.Any.fromPartial(e.pubkey):void 0,t.value=e.value!==void 0&&e.value!==null?s.Coin.fromPartial(e.value):void 0,t}};function l(){return{}}e.MsgCreateValidatorResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}};function u(){return{description:void 0,validatorAddress:``,commissionRate:``,minSelfDelegation:``}}e.MsgEditValidator={encode(e,t=r.default.Writer.create()){return e.description!==void 0&&a.Description.encode(e.description,t.uint32(10).fork()).ldelim(),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.commissionRate!==``&&t.uint32(26).string(e.commissionRate),e.minSelfDelegation!==``&&t.uint32(34).string(e.minSelfDelegation),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.description=a.Description.decode(n,n.uint32());break;case 2:o.validatorAddress=n.string();break;case 3:o.commissionRate=n.string();break;case 4:o.minSelfDelegation=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{description:x(e.description)?a.Description.fromJSON(e.description):void 0,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,commissionRate:x(e.commissionRate)?String(e.commissionRate):``,minSelfDelegation:x(e.minSelfDelegation)?String(e.minSelfDelegation):``}},toJSON(e){let t={};return e.description!==void 0&&(t.description=e.description?a.Description.toJSON(e.description):void 0),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.commissionRate!==void 0&&(t.commissionRate=e.commissionRate),e.minSelfDelegation!==void 0&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){let t=u();return t.description=e.description!==void 0&&e.description!==null?a.Description.fromPartial(e.description):void 0,t.validatorAddress=e.validatorAddress??``,t.commissionRate=e.commissionRate??``,t.minSelfDelegation=e.minSelfDelegation??``,t}};function d(){return{}}e.MsgEditValidatorResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return d()}};function f(){return{delegatorAddress:``,validatorAddress:``,amount:void 0}}e.MsgDelegate={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.amount!==void 0&&s.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;case 3:a.amount=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,amount:x(e.amount)?s.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.amount!==void 0&&(t.amount=e.amount?s.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=f();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.amount=e.amount!==void 0&&e.amount!==null?s.Coin.fromPartial(e.amount):void 0,t}};function p(){return{}}e.MsgDelegateResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return p()}};function m(){return{delegatorAddress:``,validatorSrcAddress:``,validatorDstAddress:``,amount:void 0}}e.MsgBeginRedelegate={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorSrcAddress!==``&&t.uint32(18).string(e.validatorSrcAddress),e.validatorDstAddress!==``&&t.uint32(26).string(e.validatorDstAddress),e.amount!==void 0&&s.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorSrcAddress=n.string();break;case 3:a.validatorDstAddress=n.string();break;case 4:a.amount=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorSrcAddress:x(e.validatorSrcAddress)?String(e.validatorSrcAddress):``,validatorDstAddress:x(e.validatorDstAddress)?String(e.validatorDstAddress):``,amount:x(e.amount)?s.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorSrcAddress!==void 0&&(t.validatorSrcAddress=e.validatorSrcAddress),e.validatorDstAddress!==void 0&&(t.validatorDstAddress=e.validatorDstAddress),e.amount!==void 0&&(t.amount=e.amount?s.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=m();return t.delegatorAddress=e.delegatorAddress??``,t.validatorSrcAddress=e.validatorSrcAddress??``,t.validatorDstAddress=e.validatorDstAddress??``,t.amount=e.amount!==void 0&&e.amount!==null?s.Coin.fromPartial(e.amount):void 0,t}};function h(){return{completionTime:void 0}}e.MsgBeginRedelegateResponse={encode(e,t=r.default.Writer.create()){return e.completionTime!==void 0&&i.Timestamp.encode(v(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=h();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.completionTime=y(i.Timestamp.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{completionTime:x(e.completionTime)?b(e.completionTime):void 0}},toJSON(e){let t={};return e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){let t=h();return t.completionTime=e.completionTime??void 0,t}};function g(){return{delegatorAddress:``,validatorAddress:``,amount:void 0}}e.MsgUndelegate={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),e.amount!==void 0&&s.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=g();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;case 3:a.amount=s.Coin.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:x(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:x(e.validatorAddress)?String(e.validatorAddress):``,amount:x(e.amount)?s.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.amount!==void 0&&(t.amount=e.amount?s.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=g();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t.amount=e.amount!==void 0&&e.amount!==null?s.Coin.fromPartial(e.amount):void 0,t}};function _(){return{completionTime:void 0}}e.MsgUndelegateResponse={encode(e,t=r.default.Writer.create()){return e.completionTime!==void 0&&i.Timestamp.encode(v(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=_();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.completionTime=y(i.Timestamp.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{completionTime:x(e.completionTime)?b(e.completionTime):void 0}},toJSON(e){let t={};return e.completionTime!==void 0&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){let t=_();return t.completionTime=e.completionTime??void 0,t}};function v(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function y(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function b(e){return e instanceof Date?e:typeof e==`string`?new Date(e):y(i.Timestamp.fromJSON(e))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function x(e){return e!=null}})),ac=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Grant=e.GenericAuthorization=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=tc();e.protobufPackage=`cosmos.authz.v1beta1`;function o(){return{msg:``}}e.GenericAuthorization={encode(e,t=r.default.Writer.create()){return e.msg!==``&&t.uint32(10).string(e.msg),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.msg=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{msg:d(e.msg)?String(e.msg):``}},toJSON(e){let t={};return e.msg!==void 0&&(t.msg=e.msg),t},fromPartial(e){let t=o();return t.msg=e.msg??``,t}};function s(){return{authorization:void 0,expiration:void 0}}e.Grant={encode(e,t=r.default.Writer.create()){return e.authorization!==void 0&&a.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),e.expiration!==void 0&&i.Timestamp.encode(c(e.expiration),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,c=s();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:c.authorization=a.Any.decode(n,n.uint32());break;case 2:c.expiration=l(i.Timestamp.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return c},fromJSON(e){return{authorization:d(e.authorization)?a.Any.fromJSON(e.authorization):void 0,expiration:d(e.expiration)?u(e.expiration):void 0}},toJSON(e){let t={};return e.authorization!==void 0&&(t.authorization=e.authorization?a.Any.toJSON(e.authorization):void 0),e.expiration!==void 0&&(t.expiration=e.expiration.toISOString()),t},fromPartial(e){let t=s();return t.authorization=e.authorization!==void 0&&e.authorization!==null?a.Any.fromPartial(e.authorization):void 0,t.expiration=e.expiration??void 0,t}};function c(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function l(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function u(e){return e instanceof Date?e:typeof e==`string`?new Date(e):l(i.Timestamp.fromJSON(e))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function d(e){return e!=null}})),oc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgRevokeResponse=e.MsgRevoke=e.MsgGrantResponse=e.MsgExec=e.MsgExecResponse=e.MsgGrant=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=ac(),a=tc();e.protobufPackage=`cosmos.authz.v1beta1`;function o(){return{granter:``,grantee:``,grant:void 0}}e.MsgGrant={encode(e,t=r.default.Writer.create()){return e.granter!==``&&t.uint32(10).string(e.granter),e.grantee!==``&&t.uint32(18).string(e.grantee),e.grant!==void 0&&i.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.granter=n.string();break;case 2:s.grantee=n.string();break;case 3:s.grant=i.Grant.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{granter:y(e.granter)?String(e.granter):``,grantee:y(e.grantee)?String(e.grantee):``,grant:y(e.grant)?i.Grant.fromJSON(e.grant):void 0}},toJSON(e){let t={};return e.granter!==void 0&&(t.granter=e.granter),e.grantee!==void 0&&(t.grantee=e.grantee),e.grant!==void 0&&(t.grant=e.grant?i.Grant.toJSON(e.grant):void 0),t},fromPartial(e){let t=o();return t.granter=e.granter??``,t.grantee=e.grantee??``,t.grant=e.grant!==void 0&&e.grant!==null?i.Grant.fromPartial(e.grant):void 0,t}};function s(){return{results:[]}}e.MsgExecResponse={encode(e,t=r.default.Writer.create()){for(let n of e.results)t.uint32(10).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.results.push(n.bytes());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{results:Array.isArray(e?.results)?e.results.map(e=>m(e)):[]}},toJSON(e){let t={};return e.results?t.results=e.results.map(e=>v(e===void 0?new Uint8Array:e)):t.results=[],t},fromPartial(e){let t=s();return t.results=e.results?.map(e=>e)||[],t}};function c(){return{grantee:``,msgs:[]}}e.MsgExec={encode(e,t=r.default.Writer.create()){e.grantee!==``&&t.uint32(10).string(e.grantee);for(let n of e.msgs)a.Any.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.grantee=n.string();break;case 2:o.msgs.push(a.Any.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{grantee:y(e.grantee)?String(e.grantee):``,msgs:Array.isArray(e?.msgs)?e.msgs.map(e=>a.Any.fromJSON(e)):[]}},toJSON(e){let t={};return e.grantee!==void 0&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map(e=>e?a.Any.toJSON(e):void 0):t.msgs=[],t},fromPartial(e){let t=c();return t.grantee=e.grantee??``,t.msgs=e.msgs?.map(e=>a.Any.fromPartial(e))||[],t}};function l(){return{}}e.MsgGrantResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return l()}};function u(){return{granter:``,grantee:``,msgTypeUrl:``}}e.MsgRevoke={encode(e,t=r.default.Writer.create()){return e.granter!==``&&t.uint32(10).string(e.granter),e.grantee!==``&&t.uint32(18).string(e.grantee),e.msgTypeUrl!==``&&t.uint32(26).string(e.msgTypeUrl),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.granter=n.string();break;case 2:a.grantee=n.string();break;case 3:a.msgTypeUrl=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{granter:y(e.granter)?String(e.granter):``,grantee:y(e.grantee)?String(e.grantee):``,msgTypeUrl:y(e.msgTypeUrl)?String(e.msgTypeUrl):``}},toJSON(e){let t={};return e.granter!==void 0&&(t.granter=e.granter),e.grantee!==void 0&&(t.grantee=e.grantee),e.msgTypeUrl!==void 0&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial(e){let t=u();return t.granter=e.granter??``,t.grantee=e.grantee??``,t.msgTypeUrl=e.msgTypeUrl??``,t}};function d(){return{}}e.MsgRevokeResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return d()}};var f=(()=>{if(f!==void 0)return f;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),p=f.atob||(e=>f.Buffer.from(e,`base64`).toString(`binary`));function m(e){let t=p(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var _=f.btoa||(e=>f.Buffer.from(e,`binary`).toString(`base64`));function v(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return _(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function y(e){return e!=null}})),sc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.TallyParams=e.VotingParams=e.DepositParams=e.Vote=e.TallyResult=e.Proposal=e.Deposit=e.TextProposal=e.WeightedVoteOption=e.proposalStatusToJSON=e.proposalStatusFromJSON=e.ProposalStatus=e.voteOptionToJSON=e.voteOptionFromJSON=e.VoteOption=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=Ks(),o=tc(),s=nc();e.protobufPackage=`cosmos.gov.v1beta1`;var c;(function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]=`VOTE_OPTION_UNSPECIFIED`,e[e.VOTE_OPTION_YES=1]=`VOTE_OPTION_YES`,e[e.VOTE_OPTION_ABSTAIN=2]=`VOTE_OPTION_ABSTAIN`,e[e.VOTE_OPTION_NO=3]=`VOTE_OPTION_NO`,e[e.VOTE_OPTION_NO_WITH_VETO=4]=`VOTE_OPTION_NO_WITH_VETO`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(c=e.VoteOption||={});function l(e){switch(e){case 0:case`VOTE_OPTION_UNSPECIFIED`:return c.VOTE_OPTION_UNSPECIFIED;case 1:case`VOTE_OPTION_YES`:return c.VOTE_OPTION_YES;case 2:case`VOTE_OPTION_ABSTAIN`:return c.VOTE_OPTION_ABSTAIN;case 3:case`VOTE_OPTION_NO`:return c.VOTE_OPTION_NO;case 4:case`VOTE_OPTION_NO_WITH_VETO`:return c.VOTE_OPTION_NO_WITH_VETO;default:return c.UNRECOGNIZED}}e.voteOptionFromJSON=l;function u(e){switch(e){case c.VOTE_OPTION_UNSPECIFIED:return`VOTE_OPTION_UNSPECIFIED`;case c.VOTE_OPTION_YES:return`VOTE_OPTION_YES`;case c.VOTE_OPTION_ABSTAIN:return`VOTE_OPTION_ABSTAIN`;case c.VOTE_OPTION_NO:return`VOTE_OPTION_NO`;case c.VOTE_OPTION_NO_WITH_VETO:return`VOTE_OPTION_NO_WITH_VETO`;default:return`UNKNOWN`}}e.voteOptionToJSON=u;var d;(function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]=`PROPOSAL_STATUS_UNSPECIFIED`,e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]=`PROPOSAL_STATUS_DEPOSIT_PERIOD`,e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]=`PROPOSAL_STATUS_VOTING_PERIOD`,e[e.PROPOSAL_STATUS_PASSED=3]=`PROPOSAL_STATUS_PASSED`,e[e.PROPOSAL_STATUS_REJECTED=4]=`PROPOSAL_STATUS_REJECTED`,e[e.PROPOSAL_STATUS_FAILED=5]=`PROPOSAL_STATUS_FAILED`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(d=e.ProposalStatus||={});function f(e){switch(e){case 0:case`PROPOSAL_STATUS_UNSPECIFIED`:return d.PROPOSAL_STATUS_UNSPECIFIED;case 1:case`PROPOSAL_STATUS_DEPOSIT_PERIOD`:return d.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case`PROPOSAL_STATUS_VOTING_PERIOD`:return d.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case`PROPOSAL_STATUS_PASSED`:return d.PROPOSAL_STATUS_PASSED;case 4:case`PROPOSAL_STATUS_REJECTED`:return d.PROPOSAL_STATUS_REJECTED;case 5:case`PROPOSAL_STATUS_FAILED`:return d.PROPOSAL_STATUS_FAILED;default:return d.UNRECOGNIZED}}e.proposalStatusFromJSON=f;function p(e){switch(e){case d.PROPOSAL_STATUS_UNSPECIFIED:return`PROPOSAL_STATUS_UNSPECIFIED`;case d.PROPOSAL_STATUS_DEPOSIT_PERIOD:return`PROPOSAL_STATUS_DEPOSIT_PERIOD`;case d.PROPOSAL_STATUS_VOTING_PERIOD:return`PROPOSAL_STATUS_VOTING_PERIOD`;case d.PROPOSAL_STATUS_PASSED:return`PROPOSAL_STATUS_PASSED`;case d.PROPOSAL_STATUS_REJECTED:return`PROPOSAL_STATUS_REJECTED`;case d.PROPOSAL_STATUS_FAILED:return`PROPOSAL_STATUS_FAILED`;default:return`UNKNOWN`}}e.proposalStatusToJSON=p;function m(){return{option:0,weight:``}}e.WeightedVoteOption={encode(e,t=r.default.Writer.create()){return e.option!==0&&t.uint32(8).int32(e.option),e.weight!==``&&t.uint32(18).string(e.weight),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.option=n.int32();break;case 2:a.weight=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{option:P(e.option)?l(e.option):0,weight:P(e.weight)?String(e.weight):``}},toJSON(e){let t={};return e.option!==void 0&&(t.option=u(e.option)),e.weight!==void 0&&(t.weight=e.weight),t},fromPartial(e){let t=m();return t.option=e.option??0,t.weight=e.weight??``,t}};function _(){return{title:``,description:``}}e.TextProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{title:P(e.title)?String(e.title):``,description:P(e.description)?String(e.description):``}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),t},fromPartial(e){let t=_();return t.title=e.title??``,t.description=e.description??``,t}};function v(){return{proposalId:`0`,depositor:``,amount:[]}}e.Deposit={encode(e,t=r.default.Writer.create()){e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.depositor!==``&&t.uint32(18).string(e.depositor);for(let n of e.amount)a.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=v();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.proposalId=N(n.uint64());break;case 2:o.depositor=n.string();break;case 3:o.amount.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{proposalId:P(e.proposalId)?String(e.proposalId):`0`,depositor:P(e.depositor)?String(e.depositor):``,amount:Array.isArray(e?.amount)?e.amount.map(e=>a.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.depositor!==void 0&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){let t=v();return t.proposalId=e.proposalId??`0`,t.depositor=e.depositor??``,t.amount=e.amount?.map(e=>a.Coin.fromPartial(e))||[],t}};function y(){return{proposalId:`0`,content:void 0,status:0,finalTallyResult:void 0,submitTime:void 0,depositEndTime:void 0,totalDeposit:[],votingStartTime:void 0,votingEndTime:void 0}}e.Proposal={encode(t,n=r.default.Writer.create()){t.proposalId!==`0`&&n.uint32(8).uint64(t.proposalId),t.content!==void 0&&o.Any.encode(t.content,n.uint32(18).fork()).ldelim(),t.status!==0&&n.uint32(24).int32(t.status),t.finalTallyResult!==void 0&&e.TallyResult.encode(t.finalTallyResult,n.uint32(34).fork()).ldelim(),t.submitTime!==void 0&&i.Timestamp.encode(A(t.submitTime),n.uint32(42).fork()).ldelim(),t.depositEndTime!==void 0&&i.Timestamp.encode(A(t.depositEndTime),n.uint32(50).fork()).ldelim();for(let e of t.totalDeposit)a.Coin.encode(e,n.uint32(58).fork()).ldelim();return t.votingStartTime!==void 0&&i.Timestamp.encode(A(t.votingStartTime),n.uint32(66).fork()).ldelim(),t.votingEndTime!==void 0&&i.Timestamp.encode(A(t.votingEndTime),n.uint32(74).fork()).ldelim(),n},decode(t,n){let s=t instanceof r.default.Reader?t:new r.default.Reader(t),c=n===void 0?s.len:s.pos+n,l=y();for(;s.pos<c;){let t=s.uint32();switch(t>>>3){case 1:l.proposalId=N(s.uint64());break;case 2:l.content=o.Any.decode(s,s.uint32());break;case 3:l.status=s.int32();break;case 4:l.finalTallyResult=e.TallyResult.decode(s,s.uint32());break;case 5:l.submitTime=j(i.Timestamp.decode(s,s.uint32()));break;case 6:l.depositEndTime=j(i.Timestamp.decode(s,s.uint32()));break;case 7:l.totalDeposit.push(a.Coin.decode(s,s.uint32()));break;case 8:l.votingStartTime=j(i.Timestamp.decode(s,s.uint32()));break;case 9:l.votingEndTime=j(i.Timestamp.decode(s,s.uint32()));break;default:s.skipType(t&7);break}}return l},fromJSON(t){return{proposalId:P(t.proposalId)?String(t.proposalId):`0`,content:P(t.content)?o.Any.fromJSON(t.content):void 0,status:P(t.status)?f(t.status):0,finalTallyResult:P(t.finalTallyResult)?e.TallyResult.fromJSON(t.finalTallyResult):void 0,submitTime:P(t.submitTime)?M(t.submitTime):void 0,depositEndTime:P(t.depositEndTime)?M(t.depositEndTime):void 0,totalDeposit:Array.isArray(t?.totalDeposit)?t.totalDeposit.map(e=>a.Coin.fromJSON(e)):[],votingStartTime:P(t.votingStartTime)?M(t.votingStartTime):void 0,votingEndTime:P(t.votingEndTime)?M(t.votingEndTime):void 0}},toJSON(t){let n={};return t.proposalId!==void 0&&(n.proposalId=t.proposalId),t.content!==void 0&&(n.content=t.content?o.Any.toJSON(t.content):void 0),t.status!==void 0&&(n.status=p(t.status)),t.finalTallyResult!==void 0&&(n.finalTallyResult=t.finalTallyResult?e.TallyResult.toJSON(t.finalTallyResult):void 0),t.submitTime!==void 0&&(n.submitTime=t.submitTime.toISOString()),t.depositEndTime!==void 0&&(n.depositEndTime=t.depositEndTime.toISOString()),t.totalDeposit?n.totalDeposit=t.totalDeposit.map(e=>e?a.Coin.toJSON(e):void 0):n.totalDeposit=[],t.votingStartTime!==void 0&&(n.votingStartTime=t.votingStartTime.toISOString()),t.votingEndTime!==void 0&&(n.votingEndTime=t.votingEndTime.toISOString()),n},fromPartial(t){let n=y();return n.proposalId=t.proposalId??`0`,n.content=t.content!==void 0&&t.content!==null?o.Any.fromPartial(t.content):void 0,n.status=t.status??0,n.finalTallyResult=t.finalTallyResult!==void 0&&t.finalTallyResult!==null?e.TallyResult.fromPartial(t.finalTallyResult):void 0,n.submitTime=t.submitTime??void 0,n.depositEndTime=t.depositEndTime??void 0,n.totalDeposit=t.totalDeposit?.map(e=>a.Coin.fromPartial(e))||[],n.votingStartTime=t.votingStartTime??void 0,n.votingEndTime=t.votingEndTime??void 0,n}};function b(){return{yes:``,abstain:``,no:``,noWithVeto:``}}e.TallyResult={encode(e,t=r.default.Writer.create()){return e.yes!==``&&t.uint32(10).string(e.yes),e.abstain!==``&&t.uint32(18).string(e.abstain),e.no!==``&&t.uint32(26).string(e.no),e.noWithVeto!==``&&t.uint32(34).string(e.noWithVeto),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.yes=n.string();break;case 2:a.abstain=n.string();break;case 3:a.no=n.string();break;case 4:a.noWithVeto=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{yes:P(e.yes)?String(e.yes):``,abstain:P(e.abstain)?String(e.abstain):``,no:P(e.no)?String(e.no):``,noWithVeto:P(e.noWithVeto)?String(e.noWithVeto):``}},toJSON(e){let t={};return e.yes!==void 0&&(t.yes=e.yes),e.abstain!==void 0&&(t.abstain=e.abstain),e.no!==void 0&&(t.no=e.no),e.noWithVeto!==void 0&&(t.noWithVeto=e.noWithVeto),t},fromPartial(e){let t=b();return t.yes=e.yes??``,t.abstain=e.abstain??``,t.no=e.no??``,t.noWithVeto=e.noWithVeto??``,t}};function x(){return{proposalId:`0`,voter:``,option:0,options:[]}}e.Vote={encode(t,n=r.default.Writer.create()){t.proposalId!==`0`&&n.uint32(8).uint64(t.proposalId),t.voter!==``&&n.uint32(18).string(t.voter),t.option!==0&&n.uint32(24).int32(t.option);for(let r of t.options)e.WeightedVoteOption.encode(r,n.uint32(34).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=x();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.proposalId=N(i.uint64());break;case 2:o.voter=i.string();break;case 3:o.option=i.int32();break;case 4:o.options.push(e.WeightedVoteOption.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{proposalId:P(t.proposalId)?String(t.proposalId):`0`,voter:P(t.voter)?String(t.voter):``,option:P(t.option)?l(t.option):0,options:Array.isArray(t?.options)?t.options.map(t=>e.WeightedVoteOption.fromJSON(t)):[]}},toJSON(t){let n={};return t.proposalId!==void 0&&(n.proposalId=t.proposalId),t.voter!==void 0&&(n.voter=t.voter),t.option!==void 0&&(n.option=u(t.option)),t.options?n.options=t.options.map(t=>t?e.WeightedVoteOption.toJSON(t):void 0):n.options=[],n},fromPartial(t){let n=x();return n.proposalId=t.proposalId??`0`,n.voter=t.voter??``,n.option=t.option??0,n.options=t.options?.map(t=>e.WeightedVoteOption.fromPartial(t))||[],n}};function S(){return{minDeposit:[],maxDepositPeriod:void 0}}e.DepositParams={encode(e,t=r.default.Writer.create()){for(let n of e.minDeposit)a.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.maxDepositPeriod!==void 0&&s.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=S();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.minDeposit.push(a.Coin.decode(n,n.uint32()));break;case 2:o.maxDepositPeriod=s.Duration.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{minDeposit:Array.isArray(e?.minDeposit)?e.minDeposit.map(e=>a.Coin.fromJSON(e)):[],maxDepositPeriod:P(e.maxDepositPeriod)?s.Duration.fromJSON(e.maxDepositPeriod):void 0}},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?a.Coin.toJSON(e):void 0):t.minDeposit=[],e.maxDepositPeriod!==void 0&&(t.maxDepositPeriod=e.maxDepositPeriod?s.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){let t=S();return t.minDeposit=e.minDeposit?.map(e=>a.Coin.fromPartial(e))||[],t.maxDepositPeriod=e.maxDepositPeriod!==void 0&&e.maxDepositPeriod!==null?s.Duration.fromPartial(e.maxDepositPeriod):void 0,t}};function C(){return{votingPeriod:void 0}}e.VotingParams={encode(e,t=r.default.Writer.create()){return e.votingPeriod!==void 0&&s.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=C();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.votingPeriod=s.Duration.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{votingPeriod:P(e.votingPeriod)?s.Duration.fromJSON(e.votingPeriod):void 0}},toJSON(e){let t={};return e.votingPeriod!==void 0&&(t.votingPeriod=e.votingPeriod?s.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=C();return t.votingPeriod=e.votingPeriod!==void 0&&e.votingPeriod!==null?s.Duration.fromPartial(e.votingPeriod):void 0,t}};function w(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}e.TallyParams={encode(e,t=r.default.Writer.create()){return e.quorum.length!==0&&t.uint32(10).bytes(e.quorum),e.threshold.length!==0&&t.uint32(18).bytes(e.threshold),e.vetoThreshold.length!==0&&t.uint32(26).bytes(e.vetoThreshold),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=w();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.quorum=n.bytes();break;case 2:a.threshold=n.bytes();break;case 3:a.vetoThreshold=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{quorum:P(e.quorum)?D(e.quorum):new Uint8Array,threshold:P(e.threshold)?D(e.threshold):new Uint8Array,vetoThreshold:P(e.vetoThreshold)?D(e.vetoThreshold):new Uint8Array}},toJSON(e){let t={};return e.quorum!==void 0&&(t.quorum=k(e.quorum===void 0?new Uint8Array:e.quorum)),e.threshold!==void 0&&(t.threshold=k(e.threshold===void 0?new Uint8Array:e.threshold)),e.vetoThreshold!==void 0&&(t.vetoThreshold=k(e.vetoThreshold===void 0?new Uint8Array:e.vetoThreshold)),t},fromPartial(e){let t=w();return t.quorum=e.quorum??new Uint8Array,t.threshold=e.threshold??new Uint8Array,t.vetoThreshold=e.vetoThreshold??new Uint8Array,t}};var T=(()=>{if(T!==void 0)return T;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),E=T.atob||(e=>T.Buffer.from(e,`base64`).toString(`binary`));function D(e){let t=E(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var O=T.btoa||(e=>T.Buffer.from(e,`binary`).toString(`base64`));function k(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return O(t.join(``))}function A(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function j(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function M(e){return e instanceof Date?e:typeof e==`string`?new Date(e):j(i.Timestamp.fromJSON(e))}function N(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function P(e){return e!=null}})),cc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgDepositResponse=e.MsgDeposit=e.MsgVoteWeightedResponse=e.MsgVoteWeighted=e.MsgVoteResponse=e.MsgVote=e.MsgSubmitProposalResponse=e.MsgSubmitProposal=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=sc(),a=tc(),o=Ks();e.protobufPackage=`cosmos.gov.v1beta1`;function s(){return{content:void 0,initialDeposit:[],proposer:``}}e.MsgSubmitProposal={encode(e,t=r.default.Writer.create()){e.content!==void 0&&a.Any.encode(e.content,t.uint32(10).fork()).ldelim();for(let n of e.initialDeposit)o.Coin.encode(n,t.uint32(18).fork()).ldelim();return e.proposer!==``&&t.uint32(26).string(e.proposer),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,c=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:c.content=a.Any.decode(n,n.uint32());break;case 2:c.initialDeposit.push(o.Coin.decode(n,n.uint32()));break;case 3:c.proposer=n.string();break;default:n.skipType(e&7);break}}return c},fromJSON(e){return{content:g(e.content)?a.Any.fromJSON(e.content):void 0,initialDeposit:Array.isArray(e?.initialDeposit)?e.initialDeposit.map(e=>o.Coin.fromJSON(e)):[],proposer:g(e.proposer)?String(e.proposer):``}},toJSON(e){let t={};return e.content!==void 0&&(t.content=e.content?a.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.initialDeposit=[],e.proposer!==void 0&&(t.proposer=e.proposer),t},fromPartial(e){let t=s();return t.content=e.content!==void 0&&e.content!==null?a.Any.fromPartial(e.content):void 0,t.initialDeposit=e.initialDeposit?.map(e=>o.Coin.fromPartial(e))||[],t.proposer=e.proposer??``,t}};function c(){return{proposalId:`0`}}e.MsgSubmitProposalResponse={encode(e,t=r.default.Writer.create()){return e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.proposalId=h(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),t},fromPartial(e){let t=c();return t.proposalId=e.proposalId??`0`,t}};function l(){return{proposalId:`0`,voter:``,option:0}}e.MsgVote={encode(e,t=r.default.Writer.create()){return e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.voter!==``&&t.uint32(18).string(e.voter),e.option!==0&&t.uint32(24).int32(e.option),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.proposalId=h(n.uint64());break;case 2:a.voter=n.string();break;case 3:a.option=n.int32();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`,voter:g(e.voter)?String(e.voter):``,option:g(e.option)?(0,i.voteOptionFromJSON)(e.option):0}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.voter!==void 0&&(t.voter=e.voter),e.option!==void 0&&(t.option=(0,i.voteOptionToJSON)(e.option)),t},fromPartial(e){let t=l();return t.proposalId=e.proposalId??`0`,t.voter=e.voter??``,t.option=e.option??0,t}};function u(){return{}}e.MsgVoteResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return u()}};function d(){return{proposalId:`0`,voter:``,options:[]}}e.MsgVoteWeighted={encode(e,t=r.default.Writer.create()){e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.voter!==``&&t.uint32(18).string(e.voter);for(let n of e.options)i.WeightedVoteOption.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=d();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.proposalId=h(n.uint64());break;case 2:o.voter=n.string();break;case 3:o.options.push(i.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`,voter:g(e.voter)?String(e.voter):``,options:Array.isArray(e?.options)?e.options.map(e=>i.WeightedVoteOption.fromJSON(e)):[]}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.voter!==void 0&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?i.WeightedVoteOption.toJSON(e):void 0):t.options=[],t},fromPartial(e){let t=d();return t.proposalId=e.proposalId??`0`,t.voter=e.voter??``,t.options=e.options?.map(e=>i.WeightedVoteOption.fromPartial(e))||[],t}};function f(){return{}}e.MsgVoteWeightedResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return f()}};function p(){return{proposalId:`0`,depositor:``,amount:[]}}e.MsgDeposit={encode(e,t=r.default.Writer.create()){e.proposalId!==`0`&&t.uint32(8).uint64(e.proposalId),e.depositor!==``&&t.uint32(18).string(e.depositor);for(let n of e.amount)o.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.proposalId=h(n.uint64());break;case 2:a.depositor=n.string();break;case 3:a.amount.push(o.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{proposalId:g(e.proposalId)?String(e.proposalId):`0`,depositor:g(e.depositor)?String(e.depositor):``,amount:Array.isArray(e?.amount)?e.amount.map(e=>o.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.proposalId!==void 0&&(t.proposalId=e.proposalId),e.depositor!==void 0&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?o.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){let t=p();return t.proposalId=e.proposalId??`0`,t.depositor=e.depositor??``,t.amount=e.amount?.map(e=>o.Coin.fromPartial(e))||[],t}};function m(){return{}}e.MsgDepositResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return m()}};function h(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function g(e){return e!=null}})),lc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgFundCommunityPoolResponse=e.MsgFundCommunityPool=e.MsgWithdrawValidatorCommissionResponse=e.MsgWithdrawValidatorCommission=e.MsgWithdrawDelegatorRewardResponse=e.MsgWithdrawDelegatorReward=e.MsgSetWithdrawAddressResponse=e.MsgSetWithdrawAddress=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.distribution.v1beta1`;function a(){return{delegatorAddress:``,withdrawAddress:``}}e.MsgSetWithdrawAddress={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.withdrawAddress!==``&&t.uint32(18).string(e.withdrawAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.withdrawAddress=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{delegatorAddress:p(e.delegatorAddress)?String(e.delegatorAddress):``,withdrawAddress:p(e.withdrawAddress)?String(e.withdrawAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.withdrawAddress!==void 0&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){let t=a();return t.delegatorAddress=e.delegatorAddress??``,t.withdrawAddress=e.withdrawAddress??``,t}};function o(){return{}}e.MsgSetWithdrawAddressResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=o();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return o()}};function s(){return{delegatorAddress:``,validatorAddress:``}}e.MsgWithdrawDelegatorReward={encode(e,t=r.default.Writer.create()){return e.delegatorAddress!==``&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==``&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.delegatorAddress=n.string();break;case 2:a.validatorAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{delegatorAddress:p(e.delegatorAddress)?String(e.delegatorAddress):``,validatorAddress:p(e.validatorAddress)?String(e.validatorAddress):``}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){let t=s();return t.delegatorAddress=e.delegatorAddress??``,t.validatorAddress=e.validatorAddress??``,t}};function c(){return{}}e.MsgWithdrawDelegatorRewardResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return c()}};function l(){return{validatorAddress:``}}e.MsgWithdrawValidatorCommission={encode(e,t=r.default.Writer.create()){return e.validatorAddress!==``&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.validatorAddress=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{validatorAddress:p(e.validatorAddress)?String(e.validatorAddress):``}},toJSON(e){let t={};return e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){let t=l();return t.validatorAddress=e.validatorAddress??``,t}};function u(){return{}}e.MsgWithdrawValidatorCommissionResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return u()}};function d(){return{amount:[],depositor:``}}e.MsgFundCommunityPool={encode(e,t=r.default.Writer.create()){for(let n of e.amount)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.depositor!==``&&t.uint32(18).string(e.depositor),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=d();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.amount.push(i.Coin.decode(n,n.uint32()));break;case 2:o.depositor=n.string();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{amount:Array.isArray(e?.amount)?e.amount.map(e=>i.Coin.fromJSON(e)):[],depositor:p(e.depositor)?String(e.depositor):``}},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],e.depositor!==void 0&&(t.depositor=e.depositor),t},fromPartial(e){let t=d();return t.amount=e.amount?.map(e=>i.Coin.fromPartial(e))||[],t.depositor=e.depositor??``,t}};function f(){return{}}e.MsgFundCommunityPoolResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return f()}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function p(e){return e!=null}})),uc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Model=e.AbsoluteTxPosition=e.ContractCodeHistoryEntry=e.ContractInfo=e.CodeInfo=e.Params=e.AccessConfig=e.AccessTypeParam=e.contractCodeHistoryOperationTypeToJSON=e.contractCodeHistoryOperationTypeFromJSON=e.ContractCodeHistoryOperationType=e.accessTypeToJSON=e.accessTypeFromJSON=e.AccessType=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=tc();e.protobufPackage=`cosmwasm.wasm.v1`;var a;(function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]=`ACCESS_TYPE_UNSPECIFIED`,e[e.ACCESS_TYPE_NOBODY=1]=`ACCESS_TYPE_NOBODY`,e[e.ACCESS_TYPE_ONLY_ADDRESS=2]=`ACCESS_TYPE_ONLY_ADDRESS`,e[e.ACCESS_TYPE_EVERYBODY=3]=`ACCESS_TYPE_EVERYBODY`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(a=e.AccessType||={});function o(e){switch(e){case 0:case`ACCESS_TYPE_UNSPECIFIED`:return a.ACCESS_TYPE_UNSPECIFIED;case 1:case`ACCESS_TYPE_NOBODY`:return a.ACCESS_TYPE_NOBODY;case 2:case`ACCESS_TYPE_ONLY_ADDRESS`:return a.ACCESS_TYPE_ONLY_ADDRESS;case 3:case`ACCESS_TYPE_EVERYBODY`:return a.ACCESS_TYPE_EVERYBODY;default:return a.UNRECOGNIZED}}e.accessTypeFromJSON=o;function s(e){switch(e){case a.ACCESS_TYPE_UNSPECIFIED:return`ACCESS_TYPE_UNSPECIFIED`;case a.ACCESS_TYPE_NOBODY:return`ACCESS_TYPE_NOBODY`;case a.ACCESS_TYPE_ONLY_ADDRESS:return`ACCESS_TYPE_ONLY_ADDRESS`;case a.ACCESS_TYPE_EVERYBODY:return`ACCESS_TYPE_EVERYBODY`;default:return`UNKNOWN`}}e.accessTypeToJSON=s;var c;(function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED`,e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT`,e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE`,e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]=`CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(c=e.ContractCodeHistoryOperationType||={});function l(e){switch(e){case 0:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case`CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS`:return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;default:return c.UNRECOGNIZED}}e.contractCodeHistoryOperationTypeFromJSON=l;function u(e){switch(e){case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED`;case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT`;case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE`;case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return`CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS`;default:return`UNKNOWN`}}e.contractCodeHistoryOperationTypeToJSON=u;function d(){return{value:0}}e.AccessTypeParam={encode(e,t=r.default.Writer.create()){return e.value!==0&&t.uint32(8).int32(e.value),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.value=n.int32();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{value:D(e.value)?o(e.value):0}},toJSON(e){let t={};return e.value!==void 0&&(t.value=s(e.value)),t},fromPartial(e){let t=d();return t.value=e.value??0,t}};function f(){return{permission:0,address:``}}e.AccessConfig={encode(e,t=r.default.Writer.create()){return e.permission!==0&&t.uint32(8).int32(e.permission),e.address!==``&&t.uint32(18).string(e.address),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.permission=n.int32();break;case 2:a.address=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{permission:D(e.permission)?o(e.permission):0,address:D(e.address)?String(e.address):``}},toJSON(e){let t={};return e.permission!==void 0&&(t.permission=s(e.permission)),e.address!==void 0&&(t.address=e.address),t},fromPartial(e){let t=f();return t.permission=e.permission??0,t.address=e.address??``,t}};function p(){return{codeUploadAccess:void 0,instantiateDefaultPermission:0,maxWasmCodeSize:`0`}}e.Params={encode(t,n=r.default.Writer.create()){return t.codeUploadAccess!==void 0&&e.AccessConfig.encode(t.codeUploadAccess,n.uint32(10).fork()).ldelim(),t.instantiateDefaultPermission!==0&&n.uint32(16).int32(t.instantiateDefaultPermission),t.maxWasmCodeSize!==`0`&&n.uint32(24).uint64(t.maxWasmCodeSize),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=p();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.codeUploadAccess=e.AccessConfig.decode(i,i.uint32());break;case 2:o.instantiateDefaultPermission=i.int32();break;case 3:o.maxWasmCodeSize=E(i.uint64());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{codeUploadAccess:D(t.codeUploadAccess)?e.AccessConfig.fromJSON(t.codeUploadAccess):void 0,instantiateDefaultPermission:D(t.instantiateDefaultPermission)?o(t.instantiateDefaultPermission):0,maxWasmCodeSize:D(t.maxWasmCodeSize)?String(t.maxWasmCodeSize):`0`}},toJSON(t){let n={};return t.codeUploadAccess!==void 0&&(n.codeUploadAccess=t.codeUploadAccess?e.AccessConfig.toJSON(t.codeUploadAccess):void 0),t.instantiateDefaultPermission!==void 0&&(n.instantiateDefaultPermission=s(t.instantiateDefaultPermission)),t.maxWasmCodeSize!==void 0&&(n.maxWasmCodeSize=t.maxWasmCodeSize),n},fromPartial(t){let n=p();return n.codeUploadAccess=t.codeUploadAccess!==void 0&&t.codeUploadAccess!==null?e.AccessConfig.fromPartial(t.codeUploadAccess):void 0,n.instantiateDefaultPermission=t.instantiateDefaultPermission??0,n.maxWasmCodeSize=t.maxWasmCodeSize??`0`,n}};function m(){return{codeHash:new Uint8Array,creator:``,instantiateConfig:void 0}}e.CodeInfo={encode(t,n=r.default.Writer.create()){return t.codeHash.length!==0&&n.uint32(10).bytes(t.codeHash),t.creator!==``&&n.uint32(18).string(t.creator),t.instantiateConfig!==void 0&&e.AccessConfig.encode(t.instantiateConfig,n.uint32(42).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=m();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.codeHash=i.bytes();break;case 2:o.creator=i.string();break;case 5:o.instantiateConfig=e.AccessConfig.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{codeHash:D(t.codeHash)?C(t.codeHash):new Uint8Array,creator:D(t.creator)?String(t.creator):``,instantiateConfig:D(t.instantiateConfig)?e.AccessConfig.fromJSON(t.instantiateConfig):void 0}},toJSON(t){let n={};return t.codeHash!==void 0&&(n.codeHash=T(t.codeHash===void 0?new Uint8Array:t.codeHash)),t.creator!==void 0&&(n.creator=t.creator),t.instantiateConfig!==void 0&&(n.instantiateConfig=t.instantiateConfig?e.AccessConfig.toJSON(t.instantiateConfig):void 0),n},fromPartial(t){let n=m();return n.codeHash=t.codeHash??new Uint8Array,n.creator=t.creator??``,n.instantiateConfig=t.instantiateConfig!==void 0&&t.instantiateConfig!==null?e.AccessConfig.fromPartial(t.instantiateConfig):void 0,n}};function _(){return{codeId:`0`,creator:``,admin:``,label:``,created:void 0,ibcPortId:``,extension:void 0}}e.ContractInfo={encode(t,n=r.default.Writer.create()){return t.codeId!==`0`&&n.uint32(8).uint64(t.codeId),t.creator!==``&&n.uint32(18).string(t.creator),t.admin!==``&&n.uint32(26).string(t.admin),t.label!==``&&n.uint32(34).string(t.label),t.created!==void 0&&e.AbsoluteTxPosition.encode(t.created,n.uint32(42).fork()).ldelim(),t.ibcPortId!==``&&n.uint32(50).string(t.ibcPortId),t.extension!==void 0&&i.Any.encode(t.extension,n.uint32(58).fork()).ldelim(),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=_();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.codeId=E(a.uint64());break;case 2:s.creator=a.string();break;case 3:s.admin=a.string();break;case 4:s.label=a.string();break;case 5:s.created=e.AbsoluteTxPosition.decode(a,a.uint32());break;case 6:s.ibcPortId=a.string();break;case 7:s.extension=i.Any.decode(a,a.uint32());break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{codeId:D(t.codeId)?String(t.codeId):`0`,creator:D(t.creator)?String(t.creator):``,admin:D(t.admin)?String(t.admin):``,label:D(t.label)?String(t.label):``,created:D(t.created)?e.AbsoluteTxPosition.fromJSON(t.created):void 0,ibcPortId:D(t.ibcPortId)?String(t.ibcPortId):``,extension:D(t.extension)?i.Any.fromJSON(t.extension):void 0}},toJSON(t){let n={};return t.codeId!==void 0&&(n.codeId=t.codeId),t.creator!==void 0&&(n.creator=t.creator),t.admin!==void 0&&(n.admin=t.admin),t.label!==void 0&&(n.label=t.label),t.created!==void 0&&(n.created=t.created?e.AbsoluteTxPosition.toJSON(t.created):void 0),t.ibcPortId!==void 0&&(n.ibcPortId=t.ibcPortId),t.extension!==void 0&&(n.extension=t.extension?i.Any.toJSON(t.extension):void 0),n},fromPartial(t){let n=_();return n.codeId=t.codeId??`0`,n.creator=t.creator??``,n.admin=t.admin??``,n.label=t.label??``,n.created=t.created!==void 0&&t.created!==null?e.AbsoluteTxPosition.fromPartial(t.created):void 0,n.ibcPortId=t.ibcPortId??``,n.extension=t.extension!==void 0&&t.extension!==null?i.Any.fromPartial(t.extension):void 0,n}};function v(){return{operation:0,codeId:`0`,updated:void 0,msg:new Uint8Array}}e.ContractCodeHistoryEntry={encode(t,n=r.default.Writer.create()){return t.operation!==0&&n.uint32(8).int32(t.operation),t.codeId!==`0`&&n.uint32(16).uint64(t.codeId),t.updated!==void 0&&e.AbsoluteTxPosition.encode(t.updated,n.uint32(26).fork()).ldelim(),t.msg.length!==0&&n.uint32(34).bytes(t.msg),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=v();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.operation=i.int32();break;case 2:o.codeId=E(i.uint64());break;case 3:o.updated=e.AbsoluteTxPosition.decode(i,i.uint32());break;case 4:o.msg=i.bytes();break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{operation:D(t.operation)?l(t.operation):0,codeId:D(t.codeId)?String(t.codeId):`0`,updated:D(t.updated)?e.AbsoluteTxPosition.fromJSON(t.updated):void 0,msg:D(t.msg)?C(t.msg):new Uint8Array}},toJSON(t){let n={};return t.operation!==void 0&&(n.operation=u(t.operation)),t.codeId!==void 0&&(n.codeId=t.codeId),t.updated!==void 0&&(n.updated=t.updated?e.AbsoluteTxPosition.toJSON(t.updated):void 0),t.msg!==void 0&&(n.msg=T(t.msg===void 0?new Uint8Array:t.msg)),n},fromPartial(t){let n=v();return n.operation=t.operation??0,n.codeId=t.codeId??`0`,n.updated=t.updated!==void 0&&t.updated!==null?e.AbsoluteTxPosition.fromPartial(t.updated):void 0,n.msg=t.msg??new Uint8Array,n}};function y(){return{blockHeight:`0`,txIndex:`0`}}e.AbsoluteTxPosition={encode(e,t=r.default.Writer.create()){return e.blockHeight!==`0`&&t.uint32(8).uint64(e.blockHeight),e.txIndex!==`0`&&t.uint32(16).uint64(e.txIndex),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=y();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.blockHeight=E(n.uint64());break;case 2:a.txIndex=E(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{blockHeight:D(e.blockHeight)?String(e.blockHeight):`0`,txIndex:D(e.txIndex)?String(e.txIndex):`0`}},toJSON(e){let t={};return e.blockHeight!==void 0&&(t.blockHeight=e.blockHeight),e.txIndex!==void 0&&(t.txIndex=e.txIndex),t},fromPartial(e){let t=y();return t.blockHeight=e.blockHeight??`0`,t.txIndex=e.txIndex??`0`,t}};function b(){return{key:new Uint8Array,value:new Uint8Array}}e.Model={encode(e,t=r.default.Writer.create()){return e.key.length!==0&&t.uint32(10).bytes(e.key),e.value.length!==0&&t.uint32(18).bytes(e.value),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=b();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.key=n.bytes();break;case 2:a.value=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{key:D(e.key)?C(e.key):new Uint8Array,value:D(e.value)?C(e.value):new Uint8Array}},toJSON(e){let t={};return e.key!==void 0&&(t.key=T(e.key===void 0?new Uint8Array:e.key)),e.value!==void 0&&(t.value=T(e.value===void 0?new Uint8Array:e.value)),t},fromPartial(e){let t=b();return t.key=e.key??new Uint8Array,t.value=e.value??new Uint8Array,t}};var x=(()=>{if(x!==void 0)return x;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),S=x.atob||(e=>x.Buffer.from(e,`base64`).toString(`binary`));function C(e){let t=S(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var w=x.btoa||(e=>x.Buffer.from(e,`binary`).toString(`base64`));function T(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return w(t.join(``))}function E(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function D(e){return e!=null}})),dc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgClearAdminResponse=e.MsgClearAdmin=e.MsgUpdateAdminResponse=e.MsgUpdateAdmin=e.MsgMigrateContractResponse=e.MsgMigrateContract=e.MsgExecuteContractResponse=e.MsgExecuteContract=e.MsgInstantiateContractResponse=e.MsgInstantiateContract=e.MsgStoreCodeResponse=e.MsgStoreCode=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=uc(),a=Ks();e.protobufPackage=`cosmwasm.wasm.v1`;function o(){return{sender:``,wasmByteCode:new Uint8Array,instantiatePermission:void 0}}e.MsgStoreCode={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.wasmByteCode.length!==0&&t.uint32(18).bytes(e.wasmByteCode),e.instantiatePermission!==void 0&&i.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.sender=n.string();break;case 2:s.wasmByteCode=n.bytes();break;case 5:s.instantiatePermission=i.AccessConfig.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,wasmByteCode:E(e.wasmByteCode)?S(e.wasmByteCode):new Uint8Array,instantiatePermission:E(e.instantiatePermission)?i.AccessConfig.fromJSON(e.instantiatePermission):void 0}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.wasmByteCode!==void 0&&(t.wasmByteCode=w(e.wasmByteCode===void 0?new Uint8Array:e.wasmByteCode)),e.instantiatePermission!==void 0&&(t.instantiatePermission=e.instantiatePermission?i.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){let t=o();return t.sender=e.sender??``,t.wasmByteCode=e.wasmByteCode??new Uint8Array,t.instantiatePermission=e.instantiatePermission!==void 0&&e.instantiatePermission!==null?i.AccessConfig.fromPartial(e.instantiatePermission):void 0,t}};function s(){return{codeId:`0`}}e.MsgStoreCodeResponse={encode(e,t=r.default.Writer.create()){return e.codeId!==`0`&&t.uint32(8).uint64(e.codeId),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.codeId=T(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{codeId:E(e.codeId)?String(e.codeId):`0`}},toJSON(e){let t={};return e.codeId!==void 0&&(t.codeId=e.codeId),t},fromPartial(e){let t=s();return t.codeId=e.codeId??`0`,t}};function c(){return{sender:``,admin:``,codeId:`0`,label:``,msg:new Uint8Array,funds:[]}}e.MsgInstantiateContract={encode(e,t=r.default.Writer.create()){e.sender!==``&&t.uint32(10).string(e.sender),e.admin!==``&&t.uint32(18).string(e.admin),e.codeId!==`0`&&t.uint32(24).uint64(e.codeId),e.label!==``&&t.uint32(34).string(e.label),e.msg.length!==0&&t.uint32(42).bytes(e.msg);for(let n of e.funds)a.Coin.encode(n,t.uint32(50).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.sender=n.string();break;case 2:o.admin=n.string();break;case 3:o.codeId=T(n.uint64());break;case 4:o.label=n.string();break;case 5:o.msg=n.bytes();break;case 6:o.funds.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,admin:E(e.admin)?String(e.admin):``,codeId:E(e.codeId)?String(e.codeId):`0`,label:E(e.label)?String(e.label):``,msg:E(e.msg)?S(e.msg):new Uint8Array,funds:Array.isArray(e?.funds)?e.funds.map(e=>a.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.admin!==void 0&&(t.admin=e.admin),e.codeId!==void 0&&(t.codeId=e.codeId),e.label!==void 0&&(t.label=e.label),e.msg!==void 0&&(t.msg=w(e.msg===void 0?new Uint8Array:e.msg)),e.funds?t.funds=e.funds.map(e=>e?a.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){let t=c();return t.sender=e.sender??``,t.admin=e.admin??``,t.codeId=e.codeId??`0`,t.label=e.label??``,t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(e=>a.Coin.fromPartial(e))||[],t}};function l(){return{address:``,data:new Uint8Array}}e.MsgInstantiateContractResponse={encode(e,t=r.default.Writer.create()){return e.address!==``&&t.uint32(10).string(e.address),e.data.length!==0&&t.uint32(18).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.address=n.string();break;case 2:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{address:E(e.address)?String(e.address):``,data:E(e.data)?S(e.data):new Uint8Array}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.data!==void 0&&(t.data=w(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=l();return t.address=e.address??``,t.data=e.data??new Uint8Array,t}};function u(){return{sender:``,contract:``,msg:new Uint8Array,funds:[]}}e.MsgExecuteContract={encode(e,t=r.default.Writer.create()){e.sender!==``&&t.uint32(10).string(e.sender),e.contract!==``&&t.uint32(18).string(e.contract),e.msg.length!==0&&t.uint32(26).bytes(e.msg);for(let n of e.funds)a.Coin.encode(n,t.uint32(42).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.msg=n.bytes();break;case 5:o.funds.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,contract:E(e.contract)?String(e.contract):``,msg:E(e.msg)?S(e.msg):new Uint8Array,funds:Array.isArray(e?.funds)?e.funds.map(e=>a.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.contract!==void 0&&(t.contract=e.contract),e.msg!==void 0&&(t.msg=w(e.msg===void 0?new Uint8Array:e.msg)),e.funds?t.funds=e.funds.map(e=>e?a.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){let t=u();return t.sender=e.sender??``,t.contract=e.contract??``,t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(e=>a.Coin.fromPartial(e))||[],t}};function d(){return{data:new Uint8Array}}e.MsgExecuteContractResponse={encode(e,t=r.default.Writer.create()){return e.data.length!==0&&t.uint32(10).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{data:E(e.data)?S(e.data):new Uint8Array}},toJSON(e){let t={};return e.data!==void 0&&(t.data=w(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=d();return t.data=e.data??new Uint8Array,t}};function f(){return{sender:``,contract:``,codeId:`0`,msg:new Uint8Array}}e.MsgMigrateContract={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.contract!==``&&t.uint32(18).string(e.contract),e.codeId!==`0`&&t.uint32(24).uint64(e.codeId),e.msg.length!==0&&t.uint32(34).bytes(e.msg),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.sender=n.string();break;case 2:a.contract=n.string();break;case 3:a.codeId=T(n.uint64());break;case 4:a.msg=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,contract:E(e.contract)?String(e.contract):``,codeId:E(e.codeId)?String(e.codeId):`0`,msg:E(e.msg)?S(e.msg):new Uint8Array}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.contract!==void 0&&(t.contract=e.contract),e.codeId!==void 0&&(t.codeId=e.codeId),e.msg!==void 0&&(t.msg=w(e.msg===void 0?new Uint8Array:e.msg)),t},fromPartial(e){let t=f();return t.sender=e.sender??``,t.contract=e.contract??``,t.codeId=e.codeId??`0`,t.msg=e.msg??new Uint8Array,t}};function p(){return{data:new Uint8Array}}e.MsgMigrateContractResponse={encode(e,t=r.default.Writer.create()){return e.data.length!==0&&t.uint32(10).bytes(e.data),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=p();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.data=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{data:E(e.data)?S(e.data):new Uint8Array}},toJSON(e){let t={};return e.data!==void 0&&(t.data=w(e.data===void 0?new Uint8Array:e.data)),t},fromPartial(e){let t=p();return t.data=e.data??new Uint8Array,t}};function m(){return{sender:``,newAdmin:``,contract:``}}e.MsgUpdateAdmin={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.newAdmin!==``&&t.uint32(18).string(e.newAdmin),e.contract!==``&&t.uint32(26).string(e.contract),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=m();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.sender=n.string();break;case 2:a.newAdmin=n.string();break;case 3:a.contract=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,newAdmin:E(e.newAdmin)?String(e.newAdmin):``,contract:E(e.contract)?String(e.contract):``}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.newAdmin!==void 0&&(t.newAdmin=e.newAdmin),e.contract!==void 0&&(t.contract=e.contract),t},fromPartial(e){let t=m();return t.sender=e.sender??``,t.newAdmin=e.newAdmin??``,t.contract=e.contract??``,t}};function _(){return{}}e.MsgUpdateAdminResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return _()}};function v(){return{sender:``,contract:``}}e.MsgClearAdmin={encode(e,t=r.default.Writer.create()){return e.sender!==``&&t.uint32(10).string(e.sender),e.contract!==``&&t.uint32(26).string(e.contract),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=v();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.sender=n.string();break;case 3:a.contract=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{sender:E(e.sender)?String(e.sender):``,contract:E(e.contract)?String(e.contract):``}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.contract!==void 0&&(t.contract=e.contract),t},fromPartial(e){let t=v();return t.sender=e.sender??``,t.contract=e.contract??``,t}};function y(){return{}}e.MsgClearAdminResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=y();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return y()}};var b=(()=>{if(b!==void 0)return b;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),x=b.atob||(e=>b.Buffer.from(e,`base64`).toString(`binary`));function S(e){let t=x(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var C=b.btoa||(e=>b.Buffer.from(e,`binary`).toString(`base64`));function w(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return C(t.join(``))}function T(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function E(e){return e!=null}})),fc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.ModuleVersion=e.CancelSoftwareUpgradeProposal=e.SoftwareUpgradeProposal=e.Plan=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ys(),a=tc();e.protobufPackage=`cosmos.upgrade.v1beta1`;function o(){return{name:``,time:void 0,height:`0`,info:``,upgradedClientState:void 0}}e.Plan={encode(e,t=r.default.Writer.create()){return e.name!==``&&t.uint32(10).string(e.name),e.time!==void 0&&i.Timestamp.encode(u(e.time),t.uint32(18).fork()).ldelim(),e.height!==`0`&&t.uint32(24).int64(e.height),e.info!==``&&t.uint32(34).string(e.info),e.upgradedClientState!==void 0&&a.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),s=t===void 0?n.len:n.pos+t,c=o();for(;n.pos<s;){let e=n.uint32();switch(e>>>3){case 1:c.name=n.string();break;case 2:c.time=d(i.Timestamp.decode(n,n.uint32()));break;case 3:c.height=p(n.int64());break;case 4:c.info=n.string();break;case 5:c.upgradedClientState=a.Any.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return c},fromJSON(e){return{name:m(e.name)?String(e.name):``,time:m(e.time)?f(e.time):void 0,height:m(e.height)?String(e.height):`0`,info:m(e.info)?String(e.info):``,upgradedClientState:m(e.upgradedClientState)?a.Any.fromJSON(e.upgradedClientState):void 0}},toJSON(e){let t={};return e.name!==void 0&&(t.name=e.name),e.time!==void 0&&(t.time=e.time.toISOString()),e.height!==void 0&&(t.height=e.height),e.info!==void 0&&(t.info=e.info),e.upgradedClientState!==void 0&&(t.upgradedClientState=e.upgradedClientState?a.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){let t=o();return t.name=e.name??``,t.time=e.time??void 0,t.height=e.height??`0`,t.info=e.info??``,t.upgradedClientState=e.upgradedClientState!==void 0&&e.upgradedClientState!==null?a.Any.fromPartial(e.upgradedClientState):void 0,t}};function s(){return{title:``,description:``,plan:void 0}}e.SoftwareUpgradeProposal={encode(t,n=r.default.Writer.create()){return t.title!==``&&n.uint32(10).string(t.title),t.description!==``&&n.uint32(18).string(t.description),t.plan!==void 0&&e.Plan.encode(t.plan,n.uint32(26).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=s();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.title=i.string();break;case 2:o.description=i.string();break;case 3:o.plan=e.Plan.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{title:m(t.title)?String(t.title):``,description:m(t.description)?String(t.description):``,plan:m(t.plan)?e.Plan.fromJSON(t.plan):void 0}},toJSON(t){let n={};return t.title!==void 0&&(n.title=t.title),t.description!==void 0&&(n.description=t.description),t.plan!==void 0&&(n.plan=t.plan?e.Plan.toJSON(t.plan):void 0),n},fromPartial(t){let n=s();return n.title=t.title??``,n.description=t.description??``,n.plan=t.plan!==void 0&&t.plan!==null?e.Plan.fromPartial(t.plan):void 0,n}};function c(){return{title:``,description:``}}e.CancelSoftwareUpgradeProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=c();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{title:m(e.title)?String(e.title):``,description:m(e.description)?String(e.description):``}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),t},fromPartial(e){let t=c();return t.title=e.title??``,t.description=e.description??``,t}};function l(){return{name:``,version:`0`}}e.ModuleVersion={encode(e,t=r.default.Writer.create()){return e.name!==``&&t.uint32(10).string(e.name),e.version!==`0`&&t.uint32(16).uint64(e.version),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.name=n.string();break;case 2:a.version=p(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{name:m(e.name)?String(e.name):``,version:m(e.version)?String(e.version):`0`}},toJSON(e){let t={};return e.name!==void 0&&(t.name=e.name),e.version!==void 0&&(t.version=e.version),t},fromPartial(e){let t=l();return t.name=e.name??``,t.version=e.version??`0`,t}};function u(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function d(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}function f(e){return e instanceof Date?e:typeof e==`string`?new Date(e):d(i.Timestamp.fromJSON(e))}function p(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function m(e){return e!=null}})),pc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Params=e.Height=e.UpgradeProposal=e.ClientUpdateProposal=e.ClientConsensusStates=e.ConsensusStateWithHeight=e.IdentifiedClientState=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=tc(),a=fc();e.protobufPackage=`ibc.core.client.v1`;function o(){return{clientId:``,clientState:void 0}}e.IdentifiedClientState={encode(e,t=r.default.Writer.create()){return e.clientId!==``&&t.uint32(10).string(e.clientId),e.clientState!==void 0&&i.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,s=o();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:s.clientId=n.string();break;case 2:s.clientState=i.Any.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{clientId:m(e.clientId)?String(e.clientId):``,clientState:m(e.clientState)?i.Any.fromJSON(e.clientState):void 0}},toJSON(e){let t={};return e.clientId!==void 0&&(t.clientId=e.clientId),e.clientState!==void 0&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),t},fromPartial(e){let t=o();return t.clientId=e.clientId??``,t.clientState=e.clientState!==void 0&&e.clientState!==null?i.Any.fromPartial(e.clientState):void 0,t}};function s(){return{height:void 0,consensusState:void 0}}e.ConsensusStateWithHeight={encode(t,n=r.default.Writer.create()){return t.height!==void 0&&e.Height.encode(t.height,n.uint32(10).fork()).ldelim(),t.consensusState!==void 0&&i.Any.encode(t.consensusState,n.uint32(18).fork()).ldelim(),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,c=s();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:c.height=e.Height.decode(a,a.uint32());break;case 2:c.consensusState=i.Any.decode(a,a.uint32());break;default:a.skipType(t&7);break}}return c},fromJSON(t){return{height:m(t.height)?e.Height.fromJSON(t.height):void 0,consensusState:m(t.consensusState)?i.Any.fromJSON(t.consensusState):void 0}},toJSON(t){let n={};return t.height!==void 0&&(n.height=t.height?e.Height.toJSON(t.height):void 0),t.consensusState!==void 0&&(n.consensusState=t.consensusState?i.Any.toJSON(t.consensusState):void 0),n},fromPartial(t){let n=s();return n.height=t.height!==void 0&&t.height!==null?e.Height.fromPartial(t.height):void 0,n.consensusState=t.consensusState!==void 0&&t.consensusState!==null?i.Any.fromPartial(t.consensusState):void 0,n}};function c(){return{clientId:``,consensusStates:[]}}e.ClientConsensusStates={encode(t,n=r.default.Writer.create()){t.clientId!==``&&n.uint32(10).string(t.clientId);for(let r of t.consensusStates)e.ConsensusStateWithHeight.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.clientId=i.string();break;case 2:o.consensusStates.push(e.ConsensusStateWithHeight.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{clientId:m(t.clientId)?String(t.clientId):``,consensusStates:Array.isArray(t?.consensusStates)?t.consensusStates.map(t=>e.ConsensusStateWithHeight.fromJSON(t)):[]}},toJSON(t){let n={};return t.clientId!==void 0&&(n.clientId=t.clientId),t.consensusStates?n.consensusStates=t.consensusStates.map(t=>t?e.ConsensusStateWithHeight.toJSON(t):void 0):n.consensusStates=[],n},fromPartial(t){let n=c();return n.clientId=t.clientId??``,n.consensusStates=t.consensusStates?.map(t=>e.ConsensusStateWithHeight.fromPartial(t))||[],n}};function l(){return{title:``,description:``,subjectClientId:``,substituteClientId:``}}e.ClientUpdateProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),e.subjectClientId!==``&&t.uint32(26).string(e.subjectClientId),e.substituteClientId!==``&&t.uint32(34).string(e.substituteClientId),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;case 3:a.subjectClientId=n.string();break;case 4:a.substituteClientId=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{title:m(e.title)?String(e.title):``,description:m(e.description)?String(e.description):``,subjectClientId:m(e.subjectClientId)?String(e.subjectClientId):``,substituteClientId:m(e.substituteClientId)?String(e.substituteClientId):``}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),e.subjectClientId!==void 0&&(t.subjectClientId=e.subjectClientId),e.substituteClientId!==void 0&&(t.substituteClientId=e.substituteClientId),t},fromPartial(e){let t=l();return t.title=e.title??``,t.description=e.description??``,t.subjectClientId=e.subjectClientId??``,t.substituteClientId=e.substituteClientId??``,t}};function u(){return{title:``,description:``,plan:void 0,upgradedClientState:void 0}}e.UpgradeProposal={encode(e,t=r.default.Writer.create()){return e.title!==``&&t.uint32(10).string(e.title),e.description!==``&&t.uint32(18).string(e.description),e.plan!==void 0&&a.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),e.upgradedClientState!==void 0&&i.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=u();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.title=n.string();break;case 2:s.description=n.string();break;case 3:s.plan=a.Plan.decode(n,n.uint32());break;case 4:s.upgradedClientState=i.Any.decode(n,n.uint32());break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{title:m(e.title)?String(e.title):``,description:m(e.description)?String(e.description):``,plan:m(e.plan)?a.Plan.fromJSON(e.plan):void 0,upgradedClientState:m(e.upgradedClientState)?i.Any.fromJSON(e.upgradedClientState):void 0}},toJSON(e){let t={};return e.title!==void 0&&(t.title=e.title),e.description!==void 0&&(t.description=e.description),e.plan!==void 0&&(t.plan=e.plan?a.Plan.toJSON(e.plan):void 0),e.upgradedClientState!==void 0&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){let t=u();return t.title=e.title??``,t.description=e.description??``,t.plan=e.plan!==void 0&&e.plan!==null?a.Plan.fromPartial(e.plan):void 0,t.upgradedClientState=e.upgradedClientState!==void 0&&e.upgradedClientState!==null?i.Any.fromPartial(e.upgradedClientState):void 0,t}};function d(){return{revisionNumber:`0`,revisionHeight:`0`}}e.Height={encode(e,t=r.default.Writer.create()){return e.revisionNumber!==`0`&&t.uint32(8).uint64(e.revisionNumber),e.revisionHeight!==`0`&&t.uint32(16).uint64(e.revisionHeight),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.revisionNumber=p(n.uint64());break;case 2:a.revisionHeight=p(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{revisionNumber:m(e.revisionNumber)?String(e.revisionNumber):`0`,revisionHeight:m(e.revisionHeight)?String(e.revisionHeight):`0`}},toJSON(e){let t={};return e.revisionNumber!==void 0&&(t.revisionNumber=e.revisionNumber),e.revisionHeight!==void 0&&(t.revisionHeight=e.revisionHeight),t},fromPartial(e){let t=d();return t.revisionNumber=e.revisionNumber??`0`,t.revisionHeight=e.revisionHeight??`0`,t}};function f(){return{allowedClients:[]}}e.Params={encode(e,t=r.default.Writer.create()){for(let n of e.allowedClients)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.allowedClients.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{allowedClients:Array.isArray(e?.allowedClients)?e.allowedClients.map(e=>String(e)):[]}},toJSON(e){let t={};return e.allowedClients?t.allowedClients=e.allowedClients.map(e=>e):t.allowedClients=[],t},fromPartial(e){let t=f();return t.allowedClients=e.allowedClients?.map(e=>e)||[],t}};function p(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function m(e){return e!=null}})),mc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.MsgTransferResponse=e.MsgTransfer=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks(),a=pc();e.protobufPackage=`ibc.applications.transfer.v1`;function o(){return{sourcePort:``,sourceChannel:``,token:void 0,sender:``,receiver:``,timeoutHeight:void 0,timeoutTimestamp:`0`,memo:``}}e.MsgTransfer={encode(e,t=r.default.Writer.create()){return e.sourcePort!==``&&t.uint32(10).string(e.sourcePort),e.sourceChannel!==``&&t.uint32(18).string(e.sourceChannel),e.token!==void 0&&i.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),e.sender!==``&&t.uint32(34).string(e.sender),e.receiver!==``&&t.uint32(42).string(e.receiver),e.timeoutHeight!==void 0&&a.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp!==`0`&&t.uint32(56).uint64(e.timeoutTimestamp),e.memo!==``&&t.uint32(66).string(e.memo),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),s=t===void 0?n.len:n.pos+t,l=o();for(;n.pos<s;){let e=n.uint32();switch(e>>>3){case 1:l.sourcePort=n.string();break;case 2:l.sourceChannel=n.string();break;case 3:l.token=i.Coin.decode(n,n.uint32());break;case 4:l.sender=n.string();break;case 5:l.receiver=n.string();break;case 6:l.timeoutHeight=a.Height.decode(n,n.uint32());break;case 7:l.timeoutTimestamp=c(n.uint64());break;case 8:l.memo=n.string();break;default:n.skipType(e&7);break}}return l},fromJSON(e){return{sourcePort:l(e.sourcePort)?String(e.sourcePort):``,sourceChannel:l(e.sourceChannel)?String(e.sourceChannel):``,token:l(e.token)?i.Coin.fromJSON(e.token):void 0,sender:l(e.sender)?String(e.sender):``,receiver:l(e.receiver)?String(e.receiver):``,timeoutHeight:l(e.timeoutHeight)?a.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:l(e.timeoutTimestamp)?String(e.timeoutTimestamp):`0`,memo:l(e.memo)?String(e.memo):``}},toJSON(e){let t={};return e.sourcePort!==void 0&&(t.sourcePort=e.sourcePort),e.sourceChannel!==void 0&&(t.sourceChannel=e.sourceChannel),e.token!==void 0&&(t.token=e.token?i.Coin.toJSON(e.token):void 0),e.sender!==void 0&&(t.sender=e.sender),e.receiver!==void 0&&(t.receiver=e.receiver),e.timeoutHeight!==void 0&&(t.timeoutHeight=e.timeoutHeight?a.Height.toJSON(e.timeoutHeight):void 0),e.timeoutTimestamp!==void 0&&(t.timeoutTimestamp=e.timeoutTimestamp),e.memo!==void 0&&(t.memo=e.memo),t},fromPartial(e){let t=o();return t.sourcePort=e.sourcePort??``,t.sourceChannel=e.sourceChannel??``,t.token=e.token!==void 0&&e.token!==null?i.Coin.fromPartial(e.token):void 0,t.sender=e.sender??``,t.receiver=e.receiver??``,t.timeoutHeight=e.timeoutHeight!==void 0&&e.timeoutHeight!==null?a.Height.fromPartial(e.timeoutHeight):void 0,t.timeoutTimestamp=e.timeoutTimestamp??`0`,t.memo=e.memo??``,t}};function s(){return{}}e.MsgTransferResponse={encode(e,t=r.default.Writer.create()){return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=s();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){default:n.skipType(e&7);break}}return a},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return s()}};function c(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function l(e){return e!=null}})),hc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UnknownMessage=void 0;var t=(x(),n(S));e.UnknownMessage=class{constructor(e,t){this._typeUrl=e,this._value=t}get typeUrl(){return this._typeUrl}get value(){return this._value}toJSON(){return{typeUrl:this._typeUrl,value:t.Buffer.from(this._value).toString(`base64`)}}}})),gc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.StakeAuthorization_Validators=e.StakeAuthorization=e.authorizationTypeToJSON=e.authorizationTypeFromJSON=e.AuthorizationType=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.staking.v1beta1`;var a;(function(e){e[e.AUTHORIZATION_TYPE_UNSPECIFIED=0]=`AUTHORIZATION_TYPE_UNSPECIFIED`,e[e.AUTHORIZATION_TYPE_DELEGATE=1]=`AUTHORIZATION_TYPE_DELEGATE`,e[e.AUTHORIZATION_TYPE_UNDELEGATE=2]=`AUTHORIZATION_TYPE_UNDELEGATE`,e[e.AUTHORIZATION_TYPE_REDELEGATE=3]=`AUTHORIZATION_TYPE_REDELEGATE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(a=e.AuthorizationType||={});function o(e){switch(e){case 0:case`AUTHORIZATION_TYPE_UNSPECIFIED`:return a.AUTHORIZATION_TYPE_UNSPECIFIED;case 1:case`AUTHORIZATION_TYPE_DELEGATE`:return a.AUTHORIZATION_TYPE_DELEGATE;case 2:case`AUTHORIZATION_TYPE_UNDELEGATE`:return a.AUTHORIZATION_TYPE_UNDELEGATE;case 3:case`AUTHORIZATION_TYPE_REDELEGATE`:return a.AUTHORIZATION_TYPE_REDELEGATE;default:return a.UNRECOGNIZED}}e.authorizationTypeFromJSON=o;function s(e){switch(e){case a.AUTHORIZATION_TYPE_UNSPECIFIED:return`AUTHORIZATION_TYPE_UNSPECIFIED`;case a.AUTHORIZATION_TYPE_DELEGATE:return`AUTHORIZATION_TYPE_DELEGATE`;case a.AUTHORIZATION_TYPE_UNDELEGATE:return`AUTHORIZATION_TYPE_UNDELEGATE`;case a.AUTHORIZATION_TYPE_REDELEGATE:return`AUTHORIZATION_TYPE_REDELEGATE`;default:return`UNKNOWN`}}e.authorizationTypeToJSON=s;function c(){return{maxTokens:void 0,allowList:void 0,denyList:void 0,authorizationType:0}}e.StakeAuthorization={encode(t,n=r.default.Writer.create()){return t.maxTokens!==void 0&&i.Coin.encode(t.maxTokens,n.uint32(10).fork()).ldelim(),t.allowList!==void 0&&e.StakeAuthorization_Validators.encode(t.allowList,n.uint32(18).fork()).ldelim(),t.denyList!==void 0&&e.StakeAuthorization_Validators.encode(t.denyList,n.uint32(26).fork()).ldelim(),t.authorizationType!==0&&n.uint32(32).int32(t.authorizationType),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=c();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.maxTokens=i.Coin.decode(a,a.uint32());break;case 2:s.allowList=e.StakeAuthorization_Validators.decode(a,a.uint32());break;case 3:s.denyList=e.StakeAuthorization_Validators.decode(a,a.uint32());break;case 4:s.authorizationType=a.int32();break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{maxTokens:u(t.maxTokens)?i.Coin.fromJSON(t.maxTokens):void 0,allowList:u(t.allowList)?e.StakeAuthorization_Validators.fromJSON(t.allowList):void 0,denyList:u(t.denyList)?e.StakeAuthorization_Validators.fromJSON(t.denyList):void 0,authorizationType:u(t.authorizationType)?o(t.authorizationType):0}},toJSON(t){let n={};return t.maxTokens!==void 0&&(n.maxTokens=t.maxTokens?i.Coin.toJSON(t.maxTokens):void 0),t.allowList!==void 0&&(n.allowList=t.allowList?e.StakeAuthorization_Validators.toJSON(t.allowList):void 0),t.denyList!==void 0&&(n.denyList=t.denyList?e.StakeAuthorization_Validators.toJSON(t.denyList):void 0),t.authorizationType!==void 0&&(n.authorizationType=s(t.authorizationType)),n},fromPartial(t){let n=c();return n.maxTokens=t.maxTokens!==void 0&&t.maxTokens!==null?i.Coin.fromPartial(t.maxTokens):void 0,n.allowList=t.allowList!==void 0&&t.allowList!==null?e.StakeAuthorization_Validators.fromPartial(t.allowList):void 0,n.denyList=t.denyList!==void 0&&t.denyList!==null?e.StakeAuthorization_Validators.fromPartial(t.denyList):void 0,n.authorizationType=t.authorizationType??0,n}};function l(){return{address:[]}}e.StakeAuthorization_Validators={encode(e,t=r.default.Writer.create()){for(let n of e.address)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.address.push(n.string());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{address:Array.isArray(e?.address)?e.address.map(e=>String(e)):[]}},toJSON(e){let t={};return e.address?t.address=e.address.map(e=>e):t.address=[],t},fromPartial(e){let t=l();return t.address=e.address?.map(e=>e)||[],t}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function u(e){return e!=null}})),_c=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.SendAuthorization=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=Ks();e.protobufPackage=`cosmos.bank.v1beta1`;function a(){return{spendLimit:[]}}e.SendAuthorization={encode(e,t=r.default.Writer.create()){for(let n of e.spendLimit)i.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),o=t===void 0?n.len:n.pos+t,s=a();for(;n.pos<o;){let e=n.uint32();switch(e>>>3){case 1:s.spendLimit.push(i.Coin.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return s},fromJSON(e){return{spendLimit:Array.isArray(e?.spendLimit)?e.spendLimit.map(e=>i.Coin.fromJSON(e)):[]}},toJSON(e){let t={};return e.spendLimit?t.spendLimit=e.spendLimit.map(e=>e?i.Coin.toJSON(e):void 0):t.spendLimit=[],t},fromPartial(e){let t=a();return t.spendLimit=e.spendLimit?.map(e=>i.Coin.fromPartial(e))||[],t}},r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure())})),vc=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultProtoCodec=e.ProtoCodec=void 0;var i=Gs(),a=Js(),o=ic(),s=oc(),c=cc(),l=lc(),u=dc(),d=mc(),f=hc(),p=ac(),m=gc(),h=_c(),g=(x(),n(S));r(hc(),e);var _=class{constructor(){this.typeUrlMap=new Map}unpackAnyFactory(e){if(this.typeUrlMap.has(e))return this.typeUrlMap.get(e)}unpackAny(e){let t=this.unpackAnyFactory(e.typeUrl);if(!t)return new f.UnknownMessage(e.typeUrl,e.value);let n=t.decode(e.value);return Object.assign(Object.assign({},e),{unpacked:n})}unpackedAnyToJSONRecursive(e){if(e instanceof f.UnknownMessage)return e.toJSON();let t=this.unpackAnyFactory(e.typeUrl);if(t&&`unpacked`in e&&e.unpacked){let n=e=>{let t=typeof e==`object`&&!(e instanceof f.UnknownMessage)&&`typeUrl`in e&&e.typeUrl&&typeof e.typeUrl==`string`&&`value`in e&&e.value&&typeof e.value==`string`;if(t)try{g.Buffer.from(e.value,`base64`)}catch{return!1}return t},r=e=>{let t=this.unpackAnyFactory(e.typeUrl),n=g.Buffer.from(e.value,`base64`);if(!t)return new f.UnknownMessage(e.typeUrl,n).toJSON();let r=t.decode(n);return{typeUrl:e.typeUrl,value:t.toJSON(r)}},i=e=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){let a=e[t];n(a)?e[t]=r(a):typeof a==`object`&&(e[t]=i(a))}else for(let t in e){let a=e[t];n(a)?e[t]=r(a):typeof a==`object`&&(e[t]=i(a))}return e},a=t.toJSON(e.unpacked);if(a&&typeof a==`object`)return a=i(a),{typeUrl:e.typeUrl,value:a}}return new f.UnknownMessage(e.typeUrl,e.value).toJSON()}registerAny(e,t){this.typeUrlMap.set(e,t)}};e.ProtoCodec=_,e.defaultProtoCodec=new _,e.defaultProtoCodec.registerAny(`/agoric.swingset.MsgWalletSpendAction`,i.MsgWalletSpendAction),e.defaultProtoCodec.registerAny(`/agoric.swingset.MsgProvision`,i.MsgProvision),e.defaultProtoCodec.registerAny(`/cosmos.bank.v1beta1.MsgSend`,a.MsgSend),e.defaultProtoCodec.registerAny(`/cosmos.bank.v1beta1.MsgMultiSend`,a.MsgMultiSend),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.MsgDelegate`,o.MsgDelegate),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.MsgUndelegate`,o.MsgUndelegate),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.MsgBeginRedelegate`,o.MsgBeginRedelegate),e.defaultProtoCodec.registerAny(`/cosmwasm.wasm.v1.MsgExecuteContract`,u.MsgExecuteContract),e.defaultProtoCodec.registerAny(`/cosmwasm.wasm.v1.MsgInstantiateContract`,u.MsgInstantiateContract),e.defaultProtoCodec.registerAny(`/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward`,l.MsgWithdrawDelegatorReward),e.defaultProtoCodec.registerAny(`/cosmos.distribution.v1beta1.MsgSetWithdrawAddress`,l.MsgSetWithdrawAddress),e.defaultProtoCodec.registerAny(`/ibc.applications.transfer.v1.MsgTransfer`,d.MsgTransfer),e.defaultProtoCodec.registerAny(`/cosmos.gov.v1beta1.MsgVote`,c.MsgVote),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.MsgGrant`,s.MsgGrant),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.GenericAuthorization`,p.GenericAuthorization),e.defaultProtoCodec.registerAny(`/cosmos.staking.v1beta1.StakeAuthorization`,m.StakeAuthorization),e.defaultProtoCodec.registerAny(`/cosmos.bank.v1beta1.SendAuthorization`,h.SendAuthorization),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.MsgRevoke`,s.MsgRevoke),e.defaultProtoCodec.registerAny(`/cosmos.authz.v1beta1.MsgExec`,s.MsgExec)})),yc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.CompactBitArray=e.MultiSignature=e.protobufPackage=void 0;var n=t(W()),r=t(K());e.protobufPackage=`cosmos.crypto.multisig.v1beta1`;function i(){return{signatures:[]}}e.MultiSignature={encode(e,t=r.default.Writer.create()){for(let n of e.signatures)t.uint32(10).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),a=t===void 0?n.len:n.pos+t,o=i();for(;n.pos<a;){let e=n.uint32();switch(e>>>3){case 1:o.signatures.push(n.bytes());break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{signatures:Array.isArray(e?.signatures)?e.signatures.map(e=>c(e)):[]}},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>u(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=i();return t.signatures=e.signatures?.map(e=>e)||[],t}};function a(){return{extraBitsStored:0,elems:new Uint8Array}}e.CompactBitArray={encode(e,t=r.default.Writer.create()){return e.extraBitsStored!==0&&t.uint32(8).uint32(e.extraBitsStored),e.elems.length!==0&&t.uint32(18).bytes(e.elems),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=a();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.extraBitsStored=n.uint32();break;case 2:o.elems=n.bytes();break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{extraBitsStored:d(e.extraBitsStored)?Number(e.extraBitsStored):0,elems:d(e.elems)?c(e.elems):new Uint8Array}},toJSON(e){let t={};return e.extraBitsStored!==void 0&&(t.extraBitsStored=Math.round(e.extraBitsStored)),e.elems!==void 0&&(t.elems=u(e.elems===void 0?new Uint8Array:e.elems)),t},fromPartial(e){let t=a();return t.extraBitsStored=e.extraBitsStored??0,t.elems=e.elems??new Uint8Array,t}};var o=(()=>{if(o!==void 0)return o;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),s=o.atob||(e=>o.Buffer.from(e,`base64`).toString(`binary`));function c(e){let t=s(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var l=o.btoa||(e=>o.Buffer.from(e,`binary`).toString(`base64`));function u(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return l(t.join(``))}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function d(e){return e!=null}})),bc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.SignatureDescriptor_Data_Multi=e.SignatureDescriptor_Data_Single=e.SignatureDescriptor_Data=e.SignatureDescriptor=e.SignatureDescriptors=e.signModeToJSON=e.signModeFromJSON=e.SignMode=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=tc(),a=yc();e.protobufPackage=`cosmos.tx.signing.v1beta1`;var o;(function(e){e[e.SIGN_MODE_UNSPECIFIED=0]=`SIGN_MODE_UNSPECIFIED`,e[e.SIGN_MODE_DIRECT=1]=`SIGN_MODE_DIRECT`,e[e.SIGN_MODE_TEXTUAL=2]=`SIGN_MODE_TEXTUAL`,e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]=`SIGN_MODE_LEGACY_AMINO_JSON`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(o=e.SignMode||={});function s(e){switch(e){case 0:case`SIGN_MODE_UNSPECIFIED`:return o.SIGN_MODE_UNSPECIFIED;case 1:case`SIGN_MODE_DIRECT`:return o.SIGN_MODE_DIRECT;case 2:case`SIGN_MODE_TEXTUAL`:return o.SIGN_MODE_TEXTUAL;case 127:case`SIGN_MODE_LEGACY_AMINO_JSON`:return o.SIGN_MODE_LEGACY_AMINO_JSON;default:return o.UNRECOGNIZED}}e.signModeFromJSON=s;function c(e){switch(e){case o.SIGN_MODE_UNSPECIFIED:return`SIGN_MODE_UNSPECIFIED`;case o.SIGN_MODE_DIRECT:return`SIGN_MODE_DIRECT`;case o.SIGN_MODE_TEXTUAL:return`SIGN_MODE_TEXTUAL`;case o.SIGN_MODE_LEGACY_AMINO_JSON:return`SIGN_MODE_LEGACY_AMINO_JSON`;default:return`UNKNOWN`}}e.signModeToJSON=c;function l(){return{signatures:[]}}e.SignatureDescriptors={encode(t,n=r.default.Writer.create()){for(let r of t.signatures)e.SignatureDescriptor.encode(r,n.uint32(10).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=l();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signatures.push(e.SignatureDescriptor.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{signatures:Array.isArray(t?.signatures)?t.signatures.map(t=>e.SignatureDescriptor.fromJSON(t)):[]}},toJSON(t){let n={};return t.signatures?n.signatures=t.signatures.map(t=>t?e.SignatureDescriptor.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=l();return n.signatures=t.signatures?.map(t=>e.SignatureDescriptor.fromPartial(t))||[],n}};function u(){return{publicKey:void 0,data:void 0,sequence:`0`}}e.SignatureDescriptor={encode(t,n=r.default.Writer.create()){return t.publicKey!==void 0&&i.Any.encode(t.publicKey,n.uint32(10).fork()).ldelim(),t.data!==void 0&&e.SignatureDescriptor_Data.encode(t.data,n.uint32(18).fork()).ldelim(),t.sequence!==`0`&&n.uint32(24).uint64(t.sequence),n},decode(t,n){let a=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?a.len:a.pos+n,s=u();for(;a.pos<o;){let t=a.uint32();switch(t>>>3){case 1:s.publicKey=i.Any.decode(a,a.uint32());break;case 2:s.data=e.SignatureDescriptor_Data.decode(a,a.uint32());break;case 3:s.sequence=x(a.uint64());break;default:a.skipType(t&7);break}}return s},fromJSON(t){return{publicKey:S(t.publicKey)?i.Any.fromJSON(t.publicKey):void 0,data:S(t.data)?e.SignatureDescriptor_Data.fromJSON(t.data):void 0,sequence:S(t.sequence)?String(t.sequence):`0`}},toJSON(t){let n={};return t.publicKey!==void 0&&(n.publicKey=t.publicKey?i.Any.toJSON(t.publicKey):void 0),t.data!==void 0&&(n.data=t.data?e.SignatureDescriptor_Data.toJSON(t.data):void 0),t.sequence!==void 0&&(n.sequence=t.sequence),n},fromPartial(t){let n=u();return n.publicKey=t.publicKey!==void 0&&t.publicKey!==null?i.Any.fromPartial(t.publicKey):void 0,n.data=t.data!==void 0&&t.data!==null?e.SignatureDescriptor_Data.fromPartial(t.data):void 0,n.sequence=t.sequence??`0`,n}};function d(){return{single:void 0,multi:void 0}}e.SignatureDescriptor_Data={encode(t,n=r.default.Writer.create()){return t.single!==void 0&&e.SignatureDescriptor_Data_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.SignatureDescriptor_Data_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=d();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.single=e.SignatureDescriptor_Data_Single.decode(i,i.uint32());break;case 2:o.multi=e.SignatureDescriptor_Data_Multi.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{single:S(t.single)?e.SignatureDescriptor_Data_Single.fromJSON(t.single):void 0,multi:S(t.multi)?e.SignatureDescriptor_Data_Multi.fromJSON(t.multi):void 0}},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.SignatureDescriptor_Data_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.SignatureDescriptor_Data_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=d();return n.single=t.single!==void 0&&t.single!==null?e.SignatureDescriptor_Data_Single.fromPartial(t.single):void 0,n.multi=t.multi!==void 0&&t.multi!==null?e.SignatureDescriptor_Data_Multi.fromPartial(t.multi):void 0,n}};function f(){return{mode:0,signature:new Uint8Array}}e.SignatureDescriptor_Data_Single={encode(e,t=r.default.Writer.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),e.signature.length!==0&&t.uint32(18).bytes(e.signature),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=f();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.mode=n.int32();break;case 2:a.signature=n.bytes();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{mode:S(e.mode)?s(e.mode):0,signature:S(e.signature)?v(e.signature):new Uint8Array}},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=c(e.mode)),e.signature!==void 0&&(t.signature=b(e.signature===void 0?new Uint8Array:e.signature)),t},fromPartial(e){let t=f();return t.mode=e.mode??0,t.signature=e.signature??new Uint8Array,t}};function p(){return{bitarray:void 0,signatures:[]}}e.SignatureDescriptor_Data_Multi={encode(t,n=r.default.Writer.create()){t.bitarray!==void 0&&a.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(let r of t.signatures)e.SignatureDescriptor_Data.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=p();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.bitarray=a.CompactBitArray.decode(i,i.uint32());break;case 2:s.signatures.push(e.SignatureDescriptor_Data.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{bitarray:S(t.bitarray)?a.CompactBitArray.fromJSON(t.bitarray):void 0,signatures:Array.isArray(t?.signatures)?t.signatures.map(t=>e.SignatureDescriptor_Data.fromJSON(t)):[]}},toJSON(t){let n={};return t.bitarray!==void 0&&(n.bitarray=t.bitarray?a.CompactBitArray.toJSON(t.bitarray):void 0),t.signatures?n.signatures=t.signatures.map(t=>t?e.SignatureDescriptor_Data.toJSON(t):void 0):n.signatures=[],n},fromPartial(t){let n=p();return n.bitarray=t.bitarray!==void 0&&t.bitarray!==null?a.CompactBitArray.fromPartial(t.bitarray):void 0,n.signatures=t.signatures?.map(t=>e.SignatureDescriptor_Data.fromPartial(t))||[],n}};var m=(()=>{if(m!==void 0)return m;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),_=m.atob||(e=>m.Buffer.from(e,`base64`).toString(`binary`));function v(e){let t=_(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var y=m.btoa||(e=>m.Buffer.from(e,`binary`).toString(`base64`));function b(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return y(t.join(``))}function x(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function S(e){return e!=null}})),xc=a((e=>{h();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Fee=e.ModeInfo_Multi=e.ModeInfo_Single=e.ModeInfo=e.SignerInfo=e.AuthInfo=e.TxBody=e.SignDoc=e.TxRaw=e.Tx=e.protobufPackage=void 0;var n=t(W()),r=t(K()),i=bc(),a=tc(),o=yc(),s=Ks();e.protobufPackage=`cosmos.tx.v1beta1`;function c(){return{body:void 0,authInfo:void 0,signatures:[]}}e.Tx={encode(t,n=r.default.Writer.create()){t.body!==void 0&&e.TxBody.encode(t.body,n.uint32(10).fork()).ldelim(),t.authInfo!==void 0&&e.AuthInfo.encode(t.authInfo,n.uint32(18).fork()).ldelim();for(let e of t.signatures)n.uint32(26).bytes(e);return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=c();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.body=e.TxBody.decode(i,i.uint32());break;case 2:o.authInfo=e.AuthInfo.decode(i,i.uint32());break;case 3:o.signatures.push(i.bytes());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{body:E(t.body)?e.TxBody.fromJSON(t.body):void 0,authInfo:E(t.authInfo)?e.AuthInfo.fromJSON(t.authInfo):void 0,signatures:Array.isArray(t?.signatures)?t.signatures.map(e=>S(e)):[]}},toJSON(t){let n={};return t.body!==void 0&&(n.body=t.body?e.TxBody.toJSON(t.body):void 0),t.authInfo!==void 0&&(n.authInfo=t.authInfo?e.AuthInfo.toJSON(t.authInfo):void 0),t.signatures?n.signatures=t.signatures.map(e=>w(e===void 0?new Uint8Array:e)):n.signatures=[],n},fromPartial(t){let n=c();return n.body=t.body!==void 0&&t.body!==null?e.TxBody.fromPartial(t.body):void 0,n.authInfo=t.authInfo!==void 0&&t.authInfo!==null?e.AuthInfo.fromPartial(t.authInfo):void 0,n.signatures=t.signatures?.map(e=>e)||[],n}};function l(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}e.TxRaw={encode(e,t=r.default.Writer.create()){e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes);for(let n of e.signatures)t.uint32(26).bytes(n);return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=l();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.bodyBytes=n.bytes();break;case 2:a.authInfoBytes=n.bytes();break;case 3:a.signatures.push(n.bytes());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{bodyBytes:E(e.bodyBytes)?S(e.bodyBytes):new Uint8Array,authInfoBytes:E(e.authInfoBytes)?S(e.authInfoBytes):new Uint8Array,signatures:Array.isArray(e?.signatures)?e.signatures.map(e=>S(e)):[]}},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=w(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=w(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.signatures?t.signatures=e.signatures.map(e=>w(e===void 0?new Uint8Array:e)):t.signatures=[],t},fromPartial(e){let t=l();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.signatures=e.signatures?.map(e=>e)||[],t}};function u(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:``,accountNumber:`0`}}e.SignDoc={encode(e,t=r.default.Writer.create()){return e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes),e.chainId!==``&&t.uint32(26).string(e.chainId),e.accountNumber!==`0`&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=u();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.bodyBytes=n.bytes();break;case 2:a.authInfoBytes=n.bytes();break;case 3:a.chainId=n.string();break;case 4:a.accountNumber=T(n.uint64());break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{bodyBytes:E(e.bodyBytes)?S(e.bodyBytes):new Uint8Array,authInfoBytes:E(e.authInfoBytes)?S(e.authInfoBytes):new Uint8Array,chainId:E(e.chainId)?String(e.chainId):``,accountNumber:E(e.accountNumber)?String(e.accountNumber):`0`}},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=w(e.bodyBytes===void 0?new Uint8Array:e.bodyBytes)),e.authInfoBytes!==void 0&&(t.authInfoBytes=w(e.authInfoBytes===void 0?new Uint8Array:e.authInfoBytes)),e.chainId!==void 0&&(t.chainId=e.chainId),e.accountNumber!==void 0&&(t.accountNumber=e.accountNumber),t},fromPartial(e){let t=u();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.chainId=e.chainId??``,t.accountNumber=e.accountNumber??`0`,t}};function d(){return{messages:[],memo:``,timeoutHeight:`0`,extensionOptions:[],nonCriticalExtensionOptions:[]}}e.TxBody={encode(e,t=r.default.Writer.create()){for(let n of e.messages)a.Any.encode(n,t.uint32(10).fork()).ldelim();e.memo!==``&&t.uint32(18).string(e.memo),e.timeoutHeight!==`0`&&t.uint32(24).uint64(e.timeoutHeight);for(let n of e.extensionOptions)a.Any.encode(n,t.uint32(8186).fork()).ldelim();for(let n of e.nonCriticalExtensionOptions)a.Any.encode(n,t.uint32(16378).fork()).ldelim();return t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,o=d();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:o.messages.push(a.Any.decode(n,n.uint32()));break;case 2:o.memo=n.string();break;case 3:o.timeoutHeight=T(n.uint64());break;case 1023:o.extensionOptions.push(a.Any.decode(n,n.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(a.Any.decode(n,n.uint32()));break;default:n.skipType(e&7);break}}return o},fromJSON(e){return{messages:Array.isArray(e?.messages)?e.messages.map(e=>a.Any.fromJSON(e)):[],memo:E(e.memo)?String(e.memo):``,timeoutHeight:E(e.timeoutHeight)?String(e.timeoutHeight):`0`,extensionOptions:Array.isArray(e?.extensionOptions)?e.extensionOptions.map(e=>a.Any.fromJSON(e)):[],nonCriticalExtensionOptions:Array.isArray(e?.nonCriticalExtensionOptions)?e.nonCriticalExtensionOptions.map(e=>a.Any.fromJSON(e)):[]}},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?a.Any.toJSON(e):void 0):t.messages=[],e.memo!==void 0&&(t.memo=e.memo),e.timeoutHeight!==void 0&&(t.timeoutHeight=e.timeoutHeight),e.extensionOptions?t.extensionOptions=e.extensionOptions.map(e=>e?a.Any.toJSON(e):void 0):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?a.Any.toJSON(e):void 0):t.nonCriticalExtensionOptions=[],t},fromPartial(e){let t=d();return t.messages=e.messages?.map(e=>a.Any.fromPartial(e))||[],t.memo=e.memo??``,t.timeoutHeight=e.timeoutHeight??`0`,t.extensionOptions=e.extensionOptions?.map(e=>a.Any.fromPartial(e))||[],t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions?.map(e=>a.Any.fromPartial(e))||[],t}};function f(){return{signerInfos:[],fee:void 0}}e.AuthInfo={encode(t,n=r.default.Writer.create()){for(let r of t.signerInfos)e.SignerInfo.encode(r,n.uint32(10).fork()).ldelim();return t.fee!==void 0&&e.Fee.encode(t.fee,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=f();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.signerInfos.push(e.SignerInfo.decode(i,i.uint32()));break;case 2:o.fee=e.Fee.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{signerInfos:Array.isArray(t?.signerInfos)?t.signerInfos.map(t=>e.SignerInfo.fromJSON(t)):[],fee:E(t.fee)?e.Fee.fromJSON(t.fee):void 0}},toJSON(t){let n={};return t.signerInfos?n.signerInfos=t.signerInfos.map(t=>t?e.SignerInfo.toJSON(t):void 0):n.signerInfos=[],t.fee!==void 0&&(n.fee=t.fee?e.Fee.toJSON(t.fee):void 0),n},fromPartial(t){let n=f();return n.signerInfos=t.signerInfos?.map(t=>e.SignerInfo.fromPartial(t))||[],n.fee=t.fee!==void 0&&t.fee!==null?e.Fee.fromPartial(t.fee):void 0,n}};function p(){return{publicKey:void 0,modeInfo:void 0,sequence:`0`}}e.SignerInfo={encode(t,n=r.default.Writer.create()){return t.publicKey!==void 0&&a.Any.encode(t.publicKey,n.uint32(10).fork()).ldelim(),t.modeInfo!==void 0&&e.ModeInfo.encode(t.modeInfo,n.uint32(18).fork()).ldelim(),t.sequence!==`0`&&n.uint32(24).uint64(t.sequence),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),o=n===void 0?i.len:i.pos+n,s=p();for(;i.pos<o;){let t=i.uint32();switch(t>>>3){case 1:s.publicKey=a.Any.decode(i,i.uint32());break;case 2:s.modeInfo=e.ModeInfo.decode(i,i.uint32());break;case 3:s.sequence=T(i.uint64());break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{publicKey:E(t.publicKey)?a.Any.fromJSON(t.publicKey):void 0,modeInfo:E(t.modeInfo)?e.ModeInfo.fromJSON(t.modeInfo):void 0,sequence:E(t.sequence)?String(t.sequence):`0`}},toJSON(t){let n={};return t.publicKey!==void 0&&(n.publicKey=t.publicKey?a.Any.toJSON(t.publicKey):void 0),t.modeInfo!==void 0&&(n.modeInfo=t.modeInfo?e.ModeInfo.toJSON(t.modeInfo):void 0),t.sequence!==void 0&&(n.sequence=t.sequence),n},fromPartial(t){let n=p();return n.publicKey=t.publicKey!==void 0&&t.publicKey!==null?a.Any.fromPartial(t.publicKey):void 0,n.modeInfo=t.modeInfo!==void 0&&t.modeInfo!==null?e.ModeInfo.fromPartial(t.modeInfo):void 0,n.sequence=t.sequence??`0`,n}};function m(){return{single:void 0,multi:void 0}}e.ModeInfo={encode(t,n=r.default.Writer.create()){return t.single!==void 0&&e.ModeInfo_Single.encode(t.single,n.uint32(10).fork()).ldelim(),t.multi!==void 0&&e.ModeInfo_Multi.encode(t.multi,n.uint32(18).fork()).ldelim(),n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,o=m();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:o.single=e.ModeInfo_Single.decode(i,i.uint32());break;case 2:o.multi=e.ModeInfo_Multi.decode(i,i.uint32());break;default:i.skipType(t&7);break}}return o},fromJSON(t){return{single:E(t.single)?e.ModeInfo_Single.fromJSON(t.single):void 0,multi:E(t.multi)?e.ModeInfo_Multi.fromJSON(t.multi):void 0}},toJSON(t){let n={};return t.single!==void 0&&(n.single=t.single?e.ModeInfo_Single.toJSON(t.single):void 0),t.multi!==void 0&&(n.multi=t.multi?e.ModeInfo_Multi.toJSON(t.multi):void 0),n},fromPartial(t){let n=m();return n.single=t.single!==void 0&&t.single!==null?e.ModeInfo_Single.fromPartial(t.single):void 0,n.multi=t.multi!==void 0&&t.multi!==null?e.ModeInfo_Multi.fromPartial(t.multi):void 0,n}};function _(){return{mode:0}}e.ModeInfo_Single={encode(e,t=r.default.Writer.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=_();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.mode=n.int32();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{mode:E(e.mode)?(0,i.signModeFromJSON)(e.mode):0}},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=(0,i.signModeToJSON)(e.mode)),t},fromPartial(e){let t=_();return t.mode=e.mode??0,t}};function v(){return{bitarray:void 0,modeInfos:[]}}e.ModeInfo_Multi={encode(t,n=r.default.Writer.create()){t.bitarray!==void 0&&o.CompactBitArray.encode(t.bitarray,n.uint32(10).fork()).ldelim();for(let r of t.modeInfos)e.ModeInfo.encode(r,n.uint32(18).fork()).ldelim();return n},decode(t,n){let i=t instanceof r.default.Reader?t:new r.default.Reader(t),a=n===void 0?i.len:i.pos+n,s=v();for(;i.pos<a;){let t=i.uint32();switch(t>>>3){case 1:s.bitarray=o.CompactBitArray.decode(i,i.uint32());break;case 2:s.modeInfos.push(e.ModeInfo.decode(i,i.uint32()));break;default:i.skipType(t&7);break}}return s},fromJSON(t){return{bitarray:E(t.bitarray)?o.CompactBitArray.fromJSON(t.bitarray):void 0,modeInfos:Array.isArray(t?.modeInfos)?t.modeInfos.map(t=>e.ModeInfo.fromJSON(t)):[]}},toJSON(t){let n={};return t.bitarray!==void 0&&(n.bitarray=t.bitarray?o.CompactBitArray.toJSON(t.bitarray):void 0),t.modeInfos?n.modeInfos=t.modeInfos.map(t=>t?e.ModeInfo.toJSON(t):void 0):n.modeInfos=[],n},fromPartial(t){let n=v();return n.bitarray=t.bitarray!==void 0&&t.bitarray!==null?o.CompactBitArray.fromPartial(t.bitarray):void 0,n.modeInfos=t.modeInfos?.map(t=>e.ModeInfo.fromPartial(t))||[],n}};function y(){return{amount:[],gasLimit:`0`,payer:``,granter:``}}e.Fee={encode(e,t=r.default.Writer.create()){for(let n of e.amount)s.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.gasLimit!==`0`&&t.uint32(16).uint64(e.gasLimit),e.payer!==``&&t.uint32(26).string(e.payer),e.granter!==``&&t.uint32(34).string(e.granter),t},decode(e,t){let n=e instanceof r.default.Reader?e:new r.default.Reader(e),i=t===void 0?n.len:n.pos+t,a=y();for(;n.pos<i;){let e=n.uint32();switch(e>>>3){case 1:a.amount.push(s.Coin.decode(n,n.uint32()));break;case 2:a.gasLimit=T(n.uint64());break;case 3:a.payer=n.string();break;case 4:a.granter=n.string();break;default:n.skipType(e&7);break}}return a},fromJSON(e){return{amount:Array.isArray(e?.amount)?e.amount.map(e=>s.Coin.fromJSON(e)):[],gasLimit:E(e.gasLimit)?String(e.gasLimit):`0`,payer:E(e.payer)?String(e.payer):``,granter:E(e.granter)?String(e.granter):``}},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?s.Coin.toJSON(e):void 0):t.amount=[],e.gasLimit!==void 0&&(t.gasLimit=e.gasLimit),e.payer!==void 0&&(t.payer=e.payer),e.granter!==void 0&&(t.granter=e.granter),t},fromPartial(e){let t=y();return t.amount=e.amount?.map(e=>s.Coin.fromPartial(e))||[],t.gasLimit=e.gasLimit??`0`,t.payer=e.payer??``,t.granter=e.granter??``,t}};var b=(()=>{if(b!==void 0)return b;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(g!==void 0)return g;throw`Unable to locate global object`})(),x=b.atob||(e=>b.Buffer.from(e,`base64`).toString(`binary`));function S(e){let t=x(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}var C=b.btoa||(e=>b.Buffer.from(e,`binary`).toString(`base64`));function w(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return C(t.join(``))}function T(e){return e.toString()}r.default.util.Long!==n.default&&(r.default.util.Long=n.default,r.default.configure());function E(e){return e!=null}})),Sc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProtoSignDocDecoder=void 0;var t=xc(),n=vc();e.ProtoSignDocDecoder=class e{static decode(n){return new e(t.SignDoc.decode(n))}constructor(e,t=n.defaultProtoCodec){this.signDoc=e,this.protoCodec=t}get txBody(){return this._txBody||=t.TxBody.decode(this.signDoc.bodyBytes),this._txBody}get txMsgs(){let e=[];for(let t of this.txBody.messages)e.push(this.protoCodec.unpackAny(t));return e}get authInfo(){return this._authInfo||=t.AuthInfo.decode(this.signDoc.authInfoBytes),this._authInfo}get chainId(){return this.signDoc.chainId}get accountNumber(){return this.signDoc.accountNumber.toString()}toBytes(){return t.SignDoc.encode(this.signDoc).finish()}toJSON(){return{txBody:Object.assign(Object.assign({},t.TxBody.toJSON(this.txBody)),{messages:this.txMsgs.map(e=>this.protoCodec.unpackedAnyToJSONRecursive(e))}),authInfo:t.AuthInfo.toJSON(this.authInfo),chainId:this.chainId,accountNumber:this.accountNumber}}}})),Cc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),wc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.BaseKVStore=void 0,e.BaseKVStore=class{constructor(e,t){this.provider=e,this._prefix=t}get(e){return t(this,void 0,void 0,function*(){let t=this.prefix()+`/`+e;return(yield this.provider.get())[t]})}set(e,t){let n=this.prefix()+`/`+e;return this.provider.set({[n]:t})}prefix(){return this._prefix}}})),Tc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.ExtensionKVStore=void 0;var n=wc();e.ExtensionKVStore=class e extends n.BaseKVStore{constructor(t){if(e.KVStoreProvider||typeof browser>`u`||!browser.storage||!browser.storage.local||(e.KVStoreProvider={get:browser.storage.local.get,set:browser.storage.local.set,multiGet:browser.storage.local.get}),!e.KVStoreProvider)throw Error(`Can't initialize kv store for browser extension`);super(e.KVStoreProvider,t)}multiGet(n){return t(this,void 0,void 0,function*(){n=Array.from(new Set(n));let t=(yield e.KVStoreProvider.multiGet(n.map(e=>this.prefix()+`/`+e)))??{},r=Object.keys(t);for(let e of r){let n=e.slice(this.prefix().length+1);t[n]=t[e],delete t[e]}return t})}}})),Ec=a((e=>{s(),Object.defineProperty(e,`__esModule`,{value:!0}),e.MemoryKVStore=void 0;var t=wc(),n=class{constructor(){this.store={}}get(){return Promise.resolve(this.store)}set(e){return o!==void 0&&(o.env.NODE_ENV===`test`||o.env.NODE_ENV===`development`)&&this.checkNotPrimitiveField(e),this.store=Object.assign(Object.assign({},this.store),e),Promise.resolve()}checkNotPrimitiveField(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n==`object`&&n){if(n.constructor!==Object&&n.constructor!==Array)throw Error(`${t} may not be serializable: ${n.constructor.name}`);this.checkNotPrimitiveField(n)}})}};e.MemoryKVStore=class extends t.BaseKVStore{constructor(e){super(new n,e)}}})),Dc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LocalKVStore=void 0,e.LocalKVStore=class{constructor(e){this._prefix=e}get(e){let t=this.prefix()+`/`+e,n=localStorage.getItem(t);return n===null?Promise.resolve(void 0):Promise.resolve(JSON.parse(n))}set(e,t){let n=this.prefix()+`/`+e;return t===null?Promise.resolve(localStorage.removeItem(n)):Promise.resolve(localStorage.setItem(n,JSON.stringify(t)))}prefix(){return this._prefix}}})),Oc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.IndexedDBKVStore=void 0,e.IndexedDBKVStore=class{constructor(e){this._prefix=e}get(e){return t(this,void 0,void 0,function*(){let t=(yield this.getDB()).transaction([this.prefix()],`readonly`).objectStore(this.prefix());return new Promise((n,r)=>{let i=t.get(e);i.onerror=e=>{e.stopPropagation(),r(e.target)},i.onsuccess=()=>{i.result?n(i.result.data):n(void 0)}})})}set(e,n){return t(this,void 0,void 0,function*(){if(n===null){let t=(yield this.getDB()).transaction([this.prefix()],`readwrite`).objectStore(this.prefix());return new Promise((n,r)=>{let i=t.delete(e);i.onerror=e=>{e.stopPropagation(),r(e.target)},i.onsuccess=()=>{n()}})}else{let t=(yield this.getDB()).transaction([this.prefix()],`readwrite`).objectStore(this.prefix());return new Promise((r,i)=>{let a=t.put({key:e,data:n});a.onerror=e=>{e.stopPropagation(),i(e.target)},a.onsuccess=()=>{r()}})}})}prefix(){return this._prefix}getDB(){return t(this,void 0,void 0,function*(){return this.cachedDB?this.cachedDB:new Promise((e,t)=>{let n=window.indexedDB.open(this.prefix());n.onerror=e=>{e.stopPropagation(),t(e.target)},n.onupgradeneeded=e=>{e.target.result.createObjectStore(this.prefix(),{keyPath:`key`})},n.onsuccess=()=>{this.cachedDB=n.result,e(n.result)}})})}}})),kc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.PrefixKVStore=void 0,e.PrefixKVStore=class{constructor(e,t){this.kvStore=e,this._prefix=t}prefix(){return this._prefix}get(e){return t(this,void 0,void 0,function*(){let t=this.prefix()+`/`+e;return yield this.kvStore.get(t)})}set(e,n){return t(this,void 0,void 0,function*(){let t=this.prefix()+`/`+e;return yield this.kvStore.set(t,n)})}}})),Ac=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.WrapMultiGetKVStore=void 0,e.WrapMultiGetKVStore=class{constructor(e){this.kvStore=e}multiGet(e){return t(this,void 0,void 0,function*(){e=Array.from(new Set(e));let n={},r=[];for(let i of e)r.push(t(this,void 0,void 0,function*(){n[i]=yield this.kvStore.get(i)}));return yield Promise.all(r),n})}}})),jc=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Cc(),e),n(Tc(),e),n(wc(),e),n(Ec(),e),n(Dc(),e),n(Oc(),e),n(kc(),e),n(Ac(),e)})),Mc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=A(),n=N();function r(e){let n=t(`sha256`).update(e).digest();try{return t(`rmd160`).update(n).digest()}catch{return t(`ripemd160`).update(n).digest()}}e.hash160=r;function i(e,t){return n(`sha512`,e).update(t).digest()}e.hmacSHA512=i})),Nc=a(((e,t)=>{x();var n=N(),r=C.alloc(1,1),i=C.alloc(1,0);function a(e,t,a,o,s){let c=C.alloc(32,0),l=C.alloc(32,1);c=n(`sha256`,c).update(l).update(i).update(t).update(e).update(s||``).digest(),l=n(`sha256`,c).update(l).digest(),c=n(`sha256`,c).update(l).update(r).update(t).update(e).update(s||``).digest(),l=n(`sha256`,c).update(l).digest(),l=n(`sha256`,c).update(l).digest();let u=l;for(;!o(u)||!a(u);)c=n(`sha256`,c).update(l).update(i).digest(),l=n(`sha256`,c).update(l).digest(),l=n(`sha256`,c).update(l).digest(),u=l;return u}t.exports=a})),Pc=a(((e,t)=>{x();var n=M(),r=F().ec,i=new r(`secp256k1`),a=Nc(),o=C.alloc(32,0),s=C.from(`fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141`,`hex`),c=C.from(`fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f`,`hex`),l=i.curve.n,u=l.shrn(1),d=i.curve.g,f=`Expected Private`,p=`Expected Point`,m=`Expected Tweak`,h=`Expected Hash`,g=`Expected Signature`,_=`Expected Extra Data (32 bytes)`;function v(e){return e instanceof Uint8Array&&e.length===32}function y(e){return v(e)?s.compare(e)>0:!1}function b(e){if(!(e instanceof Uint8Array)||e.length<33)return!1;let t=e[0],n=e.subarray(1,33);if(o.compare(n)===0||c.compare(n)<=0)return!1;if((t===2||t===3)&&e.length===33){try{A(e)}catch{return!1}return!0}let r=e.subarray(33);return o.compare(r)===0||c.compare(r)<=0?!1:t===4&&e.length===65}function S(e){return e[0]!==4}function w(e){return b(e)?S(e):!1}function T(e){return v(e)?o.compare(e)<0&&s.compare(e)>0:!1}function E(e){let t=e.subarray(0,32),n=e.subarray(32,64);return e instanceof Uint8Array&&e.length===64&&s.compare(t)>0&&s.compare(n)>0}function D(e,t){return e===void 0&&t!==void 0?S(t):e===void 0?!0:e}function O(e){return new n(e)}function k(e){return e.toArrayLike(C,`be`,32)}function A(e){return i.curve.decodePoint(e)}function j(e,t){return C.from(e._encode(t))}function N(e,t,n){if(!b(e)||!b(t))throw TypeError(p);let r=A(e),i=A(t),a=r.add(i);return a.isInfinity()?null:j(a,D(n,e))}function P(e,t,n){if(!b(e))throw TypeError(p);if(!y(t))throw TypeError(m);let r=D(n,e),i=A(e);if(o.compare(t)===0)return j(i,r);let a=O(t),s=d.mul(a),c=i.add(s);return c.isInfinity()?null:j(c,r)}function I(e,t){if(!b(e))throw TypeError(p);let n=A(e);if(n.isInfinity())throw TypeError(p);return j(n,D(t,e))}function L(e,t){if(!T(e))throw TypeError(f);let n=O(e),r=d.mul(n);return r.isInfinity()?null:j(r,D(t))}function R(e,t,n){if(!b(e))throw TypeError(p);if(!y(t))throw TypeError(m);let r=D(n,e),i=A(e),a=O(t),o=i.mul(a);return o.isInfinity()?null:j(o,r)}function ee(e,t){if(!T(e))throw TypeError(f);if(!y(t))throw TypeError(m);let n=O(e),r=O(t),i=k(n.add(r).umod(l));return T(i)?i:null}function te(e,t){if(!T(e))throw TypeError(f);if(!y(t))throw TypeError(m);let n=O(e),r=O(t),i=k(n.sub(r).umod(l));return T(i)?i:null}function ne(e,t){return ie(e,t)}function re(e,t,n){return ie(e,t,n)}function ie(e,t,n){if(!v(e))throw TypeError(h);if(!T(t))throw TypeError(f);if(n!==void 0&&!v(n))throw TypeError(_);let r=O(t),i=O(e),o,s;a(e,t,function(e){let t=O(e),n=d.mul(t);return!(n.isInfinity()||(o=n.x.umod(l),o.isZero()===0)||(s=t.invm(l).mul(i.add(r.mul(o))).umod(l),s.isZero()===0))},T,n),s.cmp(u)>0&&(s=l.sub(s));let c=C.allocUnsafe(64);return k(o).copy(c,0),k(s).copy(c,32),c}function ae(e,t,n,r){if(!v(e))throw TypeError(h);if(!b(t))throw TypeError(p);if(!E(n))throw TypeError(g);let i=A(t),a=O(n.subarray(0,32)),o=O(n.subarray(32,64));if(r&&o.cmp(u)>0||a.gtn(0)<=0||o.gtn(0)<=0)return!1;let s=O(e),c=o.invm(l),f=s.mul(c).umod(l),m=a.mul(c).umod(l),_=d.mulAdd(f,i,m);return _.isInfinity()?!1:_.x.umod(l).eq(a)}t.exports={isPoint:b,isPointCompressed:w,isPrivate:T,pointAdd:N,pointAddScalar:P,pointCompress:I,pointFromScalar:L,pointMultiply:R,privateAdd:ee,privateSub:te,sign:ne,signWithEntropy:re,verify:ae}})),Fc=a(((e,t)=>{var n={Array:function(e){return e!=null&&e.constructor===Array},Boolean:function(e){return typeof e==`boolean`},Function:function(e){return typeof e==`function`},Nil:function(e){return e==null},Number:function(e){return typeof e==`number`},Object:function(e){return typeof e==`object`},String:function(e){return typeof e==`string`},"":function(){return!0}};for(var r in n.Null=n.Nil,n)n[r].toJSON=function(e){return e}.bind(null,r);t.exports=n})),Ic=a(((e,t)=>{var n=Fc();function r(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function i(e){return n.Nil(e)?``:r(e.constructor)}function a(e){return n.Function(e)?``:n.String(e)?JSON.stringify(e):e&&n.Object(e)?``:e}function o(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function s(e){return n.Function(e)?e.toJSON?e.toJSON():r(e):n.Array(e)?`Array`:e&&n.Object(e)?`Object`:e===void 0?``:e}function c(e,t,n){var r=a(t);return`Expected `+s(e)+`, got`+(n===``?``:` `+n)+(r===``?``:` `+r)}function l(e,t,n){n||=i(t),this.message=c(e,t,n),o(this,l),this.__type=e,this.__value=t,this.__valueTypeName=n}l.prototype=Object.create(Error.prototype),l.prototype.constructor=l;function u(e,t,n,r,i){var a=`" of type `;return t===`key`&&(a=`" with key type `),c(`property "`+s(n)+a+s(e),r,i)}function d(e,t,n,r,a){e?(a||=i(r),this.message=u(e,n,t,r,a)):this.message=`Unexpected property "`+t+`"`,o(this,l),this.__label=n,this.__property=t,this.__type=e,this.__value=r,this.__valueTypeName=a}d.prototype=Object.create(Error.prototype),d.prototype.constructor=l;function f(e,t){return new l(e,{},t)}function p(e,t,n){return e instanceof d?(t=t+`.`+e.__property,e=new d(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof l&&(e=new d(e.__type,t,n,e.__value,e.__valueTypeName)),o(e),e}t.exports={TfTypeError:l,TfPropertyTypeError:d,tfCustomError:f,tfSubError:p,tfJSON:s,getValueTypeName:i}})),Lc=a(((e,t)=>{x();var n=Fc(),r=Ic();function i(e){return C.isBuffer(e)}function a(e){return typeof e==`string`&&/^([0-9a-f]{2})+$/i.test(e)}function o(e,t){var n=e.toJSON();function i(i){if(!e(i))return!1;if(i.length===t)return!0;throw r.tfCustomError(n+`(Length: `+t+`)`,n+`(Length: `+i.length+`)`)}return i.toJSON=function(){return n},i}var s=o.bind(null,n.Array),c=o.bind(null,i),l=o.bind(null,a),u=o.bind(null,n.String);function d(e,t,r){r||=n.Number;function i(n,i){return r(n,i)&&n>e&&n<t}return i.toJSON=function(){return`${r.toJSON()} between [${e}, ${t}]`},i}var f=2**53-1;function p(e){return typeof e==`number`&&isFinite(e)}function m(e){return e<<24>>24===e}function h(e){return e<<16>>16===e}function g(e){return(e|0)===e}function _(e){return typeof e==`number`&&e>=-f&&e<=f&&Math.floor(e)===e}function v(e){return(e&255)===e}function y(e){return(e&65535)===e}function b(e){return e>>>0===e}function S(e){return typeof e==`number`&&e>=0&&e<=f&&Math.floor(e)===e}var w={ArrayN:s,Buffer:i,BufferN:c,Finite:p,Hex:a,HexN:l,Int8:m,Int16:h,Int32:g,Int53:_,Range:d,StringN:u,UInt8:v,UInt16:y,UInt32:b,UInt53:S};for(var T in w)w[T].toJSON=function(e){return e}.bind(null,T);t.exports=w})),Rc=a(((e,t)=>{var n=Ic(),r=Fc(),i=n.tfJSON,a=n.TfTypeError,o=n.TfPropertyTypeError,s=n.tfSubError,c=n.getValueTypeName,l={arrayOf:function(e,t){e=u(e),t||={};function n(n,i){return!r.Array(n)||r.Nil(n)||t.minLength!==void 0&&n.length<t.minLength||t.maxLength!==void 0&&n.length>t.maxLength||t.length!==void 0&&n.length!==t.length?!1:n.every(function(t,n){try{return d(e,t,i)}catch(e){throw s(e,n)}})}return n.toJSON=function(){var n=`[`+i(e)+`]`;return t.length===void 0?(t.minLength!==void 0||t.maxLength!==void 0)&&(n+=`{`+(t.minLength===void 0?0:t.minLength)+`,`+(t.maxLength===void 0?1/0:t.maxLength)+`}`):n+=`{`+t.length+`}`,n},n},maybe:function e(t){t=u(t);function n(n,i){return r.Nil(n)||t(n,i,e)}return n.toJSON=function(){return`?`+i(t)},n},map:function(e,t){e=u(e),t&&=u(t);function n(n,i){if(!r.Object(n)||r.Nil(n))return!1;for(var a in n){try{t&&d(t,a,i)}catch(e){throw s(e,a,`key`)}try{var o=n[a];d(e,o,i)}catch(e){throw s(e,a)}}return!0}return t?n.toJSON=function(){return`{`+i(t)+`: `+i(e)+`}`}:n.toJSON=function(){return`{`+i(e)+`}`},n},object:function(e){var t={};for(var n in e)t[n]=u(e[n]);function a(e,n){if(!r.Object(e)||r.Nil(e))return!1;var i;try{for(i in t){var a=t[i],c=e[i];d(a,c,n)}}catch(e){throw s(e,i)}if(n){for(i in e)if(!t[i])throw new o(void 0,i)}return!0}return a.toJSON=function(){return i(t)},a},anyOf:function(){var e=[].slice.call(arguments).map(u);function t(t,n){return e.some(function(e){try{return d(e,t,n)}catch{return!1}})}return t.toJSON=function(){return e.map(i).join(`|`)},t},allOf:function(){var e=[].slice.call(arguments).map(u);function t(t,n){return e.every(function(e){try{return d(e,t,n)}catch{return!1}})}return t.toJSON=function(){return e.map(i).join(` & `)},t},quacksLike:function(e){function t(t){return e===c(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(u);function t(t,n){return r.Nil(t)||r.Nil(t.length)||n&&t.length!==e.length?!1:e.every(function(e,r){try{return d(e,t[r],n)}catch(e){throw s(e,r)}})}return t.toJSON=function(){return`(`+e.map(i).join(`, `)+`)`},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};l.oneOf=l.anyOf;function u(e){if(r.String(e))return e[0]===`?`?l.maybe(e.slice(1)):r[e]||l.quacksLike(e);if(e&&r.Object(e)){if(r.Array(e)){if(e.length!==1)throw TypeError(`Expected compile() parameter of type Array of length 1`);return l.arrayOf(e[0])}return l.object(e)}else if(r.Function(e))return e;return l.value(e)}function d(e,t,n,i){if(r.Function(e)){if(e(t,n))return!0;throw new a(i||e,t)}return d(u(e),t,n)}for(var f in r)d[f]=r[f];for(f in l)d[f]=l[f];var p=Lc();for(f in p)d[f]=p[f];d.compile=u,d.TfTypeError=a,d.TfPropertyTypeError=o,t.exports=d})),zc=a(((e,t)=>{x();var n=Qn();function r(e,t){if(t!==void 0&&e[0]!==t)throw Error(`Invalid network version`);if(e.length===33)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(e.length!==34)throw Error(`Invalid WIF length`);if(e[33]!==1)throw Error(`Invalid compression flag`);return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function i(e,t,n){var r=new C(n?34:33);return r.writeUInt8(e,0),t.copy(r,1),n&&(r[33]=1),r}function a(e,t){return r(n.decode(e),t)}function o(e,t,r){return typeof e==`number`?n.encode(i(e,t,r)):n.encode(i(e.version,e.privateKey,e.compressed))}t.exports={decode:a,decodeRaw:r,encode:o,encodeRaw:i}})),Bc=a((e=>{x(),Object.defineProperty(e,`__esModule`,{value:!0});var t=Mc(),n=Qn(),r=Pc(),i=Rc(),a=zc(),o=i.BufferN(32),s=i.compile({wif:i.UInt8,bip32:{public:i.UInt32,private:i.UInt32}}),c={messagePrefix:`Bitcoin Signed Message:
|
|
2
2
|
`,bech32:`bc`,bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},l=2147483648,u=2**31-1;function d(e){return i.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)!==null}function f(e){return i.UInt32(e)&&e<=u}var p=class{constructor(e,t,n,r,a=0,o=0,c=0){this.__D=e,this.__Q=t,this.chainCode=n,this.network=r,this.__DEPTH=a,this.__INDEX=o,this.__PARENT_FINGERPRINT=c,i(s,r),this.lowR=!1}get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){return this.__Q===void 0&&(this.__Q=r.pointFromScalar(this.__D,!0)),this.__Q}get privateKey(){return this.__D}get identifier(){return t.hash160(this.publicKey)}get fingerprint(){return this.identifier.slice(0,4)}get compressed(){return!0}isNeutered(){return this.__D===void 0}neutered(){return v(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){let e=this.network,t=this.isNeutered()?e.bip32.public:e.bip32.private,r=C.allocUnsafe(78);return r.writeUInt32BE(t,0),r.writeUInt8(this.depth,4),r.writeUInt32BE(this.parentFingerprint,5),r.writeUInt32BE(this.index,9),this.chainCode.copy(r,13),this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46)),n.encode(r)}toWIF(){if(!this.privateKey)throw TypeError(`Missing private key`);return a.encode(this.network.wif,this.privateKey,!0)}derive(e){i(i.UInt32,e);let n=e>=l,a=C.allocUnsafe(37);if(n){if(this.isNeutered())throw TypeError(`Missing private key for hardened child key`);a[0]=0,this.privateKey.copy(a,1),a.writeUInt32BE(e,33)}else this.publicKey.copy(a,0),a.writeUInt32BE(e,33);let o=t.hmacSHA512(this.chainCode,a),s=o.slice(0,32),c=o.slice(32);if(!r.isPrivate(s))return this.derive(e+1);let u;if(this.isNeutered()){let t=r.pointAddScalar(this.publicKey,s,!0);if(t===null)return this.derive(e+1);u=v(t,c,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}else{let t=r.privateAdd(this.privateKey,s);if(t==null)return this.derive(e+1);u=g(t,c,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}return u}deriveHardened(e){return i(f,e),this.derive(e+l)}derivePath(e){i(d,e);let t=e.split(`/`);if(t[0]===`m`){if(this.parentFingerprint)throw TypeError(`Expected master, got child`);t=t.slice(1)}return t.reduce((e,t)=>{let n;return t.slice(-1)===`'`?(n=parseInt(t.slice(0,-1),10),e.deriveHardened(n)):(n=parseInt(t,10),e.derive(n))},this)}sign(e,t){if(!this.privateKey)throw Error(`Missing private key`);if(t===void 0&&(t=this.lowR),t===!1)return r.sign(e,this.privateKey);{let t=r.sign(e,this.privateKey),n=C.alloc(32,0),i=0;for(;t[0]>127;)i++,n.writeUIntLE(i,0,6),t=r.signWithEntropy(e,this.privateKey,n);return t}}verify(e,t){return r.verify(e,this.publicKey,t)}};function m(e,t){let r=n.decode(e);if(r.length!==78)throw TypeError(`Invalid buffer length`);t||=c;let i=r.readUInt32BE(0);if(i!==t.bip32.private&&i!==t.bip32.public)throw TypeError(`Invalid network version`);let a=r[4],o=r.readUInt32BE(5);if(a===0&&o!==0)throw TypeError(`Invalid parent fingerprint`);let s=r.readUInt32BE(9);if(a===0&&s!==0)throw TypeError(`Invalid index`);let l=r.slice(13,45),u;if(i===t.bip32.private){if(r.readUInt8(45)!==0)throw TypeError(`Invalid private key`);u=g(r.slice(46,78),l,t,a,s,o)}else u=v(r.slice(45,78),l,t,a,s,o);return u}e.fromBase58=m;function h(e,t,n){return g(e,t,n)}e.fromPrivateKey=h;function g(e,t,n,a,s,l){if(i({privateKey:o,chainCode:o},{privateKey:e,chainCode:t}),n||=c,!r.isPrivate(e))throw TypeError(`Private key not in range [1, n)`);return new p(e,void 0,t,n,a,s,l)}function _(e,t,n){return v(e,t,n)}e.fromPublicKey=_;function v(e,t,n,a,s,l){if(i({publicKey:i.BufferN(33),chainCode:o},{publicKey:e,chainCode:t}),n||=c,!r.isPoint(e))throw TypeError(`Point is not on the curve`);return new p(void 0,e,t,n,a,s,l)}function y(e,n){if(i(i.Buffer,e),e.length<16)throw TypeError(`Seed should be at least 128 bits`);if(e.length>64)throw TypeError(`Seed should be at most 512 bits`);n||=c;let r=t.hmacSHA512(C.from(`Bitcoin seed`,`utf8`),e);return h(r.slice(0,32),r.slice(32),n)}e.fromSeed=y})),Vc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Bc();e.fromSeed=t.fromSeed,e.fromBase58=t.fromBase58,e.fromPublicKey=t.fromPublicKey,e.fromPrivateKey=t.fromPrivateKey})),Hc=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.Mnemonic=void 0;var r=Pn(),i=Vc(),a=Qn(),o=(x(),n(S));e.Mnemonic=class e{static generateWallet(n,r=`m/44'/118'/0'/0/0`,i=``,a=256){return t(this,void 0,void 0,function*(){let t=yield e.generateSeed(n,a);return{privKey:e.generateWalletFromMnemonic(t,r,i),mnemonic:t}})}static validateMnemonic(e){return r.validateMnemonic(e)}static generateSeed(e,n=128){return t(this,void 0,void 0,function*(){if(n%32!=0)throw TypeError(`invalid entropy`);let t=new Uint8Array(n/8);return t=yield e(t),r.entropyToMnemonic(o.Buffer.from(t).toString(`hex`))})}static generateWalletFromMnemonic(e,t=`m/44'/118'/0'/0/0`,n=``){let a=r.mnemonicToSeedSync(e,n),o=i.fromSeed(a).derivePath(t).privateKey;if(!o)throw Error(`null hd key`);return o}static generateMasterSeedFromMnemonic(e,t=``){let n=r.mnemonicToSeedSync(e,t),s=i.fromSeed(n);return o.Buffer.from(a.decode(s.toBase58()))}static generatePrivateKeyFromMasterSeed(e,t=`m/44'/118'/0'/0/0`){let n=i.fromBase58(a.encode(e)).derivePath(t).privateKey;if(!n)throw Error(`null hd key`);return n}}})),Uc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Hash=void 0;var t=k(),r=(as(),n(ns)),i=(x(),n(S));e.Hash=class{static sha256(e){return new Uint8Array(new t.sha256().update(e).digest())}static keccak256(e){return i.Buffer.from((0,r.keccak256)(e).replace(`0x`,``),`hex`)}static truncHashPortion(e,t=e.length,n=0){return e.substring(0,t)+`…`+e.substring(e.length-n,e.length)}}})),Wc=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.PubKeySecp256k1=e.PrivKeySecp256k1=void 0;var r=F(),i=t(Nr()),a=(x(),n(S)),o=Uc();e.PrivKeySecp256k1=class e{static generateRandomKey(){let t=new r.ec(`secp256k1`);return new e(a.Buffer.from(t.genKeyPair().getPrivate().toArray()))}constructor(e){this.privKey=e}toBytes(){return new Uint8Array(this.privKey)}getPubKey(){let e=new r.ec(`secp256k1`).keyFromPrivate(this.privKey);return new s(new Uint8Array(e.getPublic().encodeCompressed(`array`)))}signDigest32(e){if(e.length!==32)throw Error(`Invalid length of digest to sign: ${e.length}`);let t=new r.ec(`secp256k1`).keyFromPrivate(this.privKey).sign(e,{canonical:!0});return{r:new Uint8Array(t.r.toArray(`be`,32)),s:new Uint8Array(t.s.toArray(`be`,32)),v:t.recoveryParam}}};var s=class{constructor(e){if(this.pubKey=e,e.length!==33&&e.length!==65)throw Error(`Invalid length of public key: ${e.length}`)}toBytes(e){if(e&&this.pubKey.length===65||!e&&this.pubKey.length===33)return this.pubKey;let t=this.toKeyPair();return e?new Uint8Array(a.Buffer.from(t.getPublic().encode(`hex`,!1),`hex`)):new Uint8Array(a.Buffer.from(t.getPublic().encodeCompressed(`hex`),`hex`))}getAddress(){return this.getCosmosAddress()}getCosmosAddress(){let e=i.default.SHA256(i.default.lib.WordArray.create(this.toBytes(!1))).toString();return e=i.default.RIPEMD160(i.default.enc.Hex.parse(e)).toString(),new Uint8Array(a.Buffer.from(e,`hex`))}getEthAddress(){return o.Hash.keccak256(this.toBytes(!0).slice(1)).slice(-20)}toKeyPair(){return new r.ec(`secp256k1`).keyFromPublic(a.Buffer.from(this.pubKey).toString(`hex`),`hex`)}verifyDigest32(e,t){if(e.length!==32)throw Error(`Invalid length of digest to verify: ${e.length}`);if(t.length!==64)throw Error(`Invalid length of signature: ${t.length}`);let n=new r.ec(`secp256k1`),i=t.slice(0,32),o=t.slice(32);return n.verify(e,{r:a.Buffer.from(i).toString(`hex`),s:a.Buffer.from(o).toString(`hex`)},this.toKeyPair())}};e.PubKeySecp256k1=s})),Gc=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Hc(),e),n(Wc(),e),n(Uc(),e)})),Kc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DenomHelper=void 0;var t=(x(),n(S)),r=Gc();e.DenomHelper=class{static ibcDenom(e,n){let i=[];for(let t of e)i.push(`${t.portId}/${t.channelId}`);let a=`${i.join(`/`)}/${n}`;return`ibc/`+t.Buffer.from(r.Hash.sha256(t.Buffer.from(a))).toString(`hex`).toUpperCase()}constructor(e){this._denom=e;let t=this.denom.split(/(\w+):(\w+):(.+)/).filter(Boolean);if(t.length!==1&&t.length!==3)throw Error(`Invalid denom: ${this.denom}`);this._type=t.length===3?t[0]:``,this._contractAddress=t.length===3?t[1]:``}get denom(){return this._denom}get type(){return this._type||`native`}get contractAddress(){return this._contractAddress}}})),qc=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.toGenerator=void 0;function*t(e){return yield e}e.toGenerator=t})),Jc=r({$mobx:()=>Y,FlowCancellationError:()=>Em,ObservableMap:()=>Hm,ObservableSet:()=>Gm,Reaction:()=>rm,_allowStateChanges:()=>Mu,_allowStateChangesInsideComputed:()=>Sd,_allowStateReadsEnd:()=>Ju,_allowStateReadsStart:()=>qu,_autoAction:()=>vm,_endAction:()=>ju,_getAdministration:()=>Yf,_getGlobalState:()=>Zu,_interceptReads:()=>Hd,_isComputingDerivation:()=>Lu,_resetGlobalState:()=>Qu,_startAction:()=>Au,action:()=>_m,autorun:()=>wd,comparer:()=>xp,computed:()=>Vp,configure:()=>jd,createAtom:()=>Rl,defineProperty:()=>of,entries:()=>ef,extendObservable:()=>Md,flow:()=>km,flowResult:()=>Bd,get:()=>af,getAtom:()=>Jf,getDebugName:()=>Xf,getDependencyTree:()=>Nd,getObserverTree:()=>Fd,has:()=>rf,intercept:()=>Ud,isAction:()=>Cd,isBoxedObservable:()=>Jp,isComputed:()=>qd,isComputedProp:()=>Jd,isFlow:()=>Vd,isFlowCancellationError:()=>Rd,isObservable:()=>Xd,isObservableArray:()=>Pf,isObservableMap:()=>Um,isObservableObject:()=>Bf,isObservableProp:()=>Zd,isObservableSet:()=>Km,keys:()=>Qd,makeAutoObservable:()=>kf,makeObservable:()=>Of,observable:()=>Ip,observe:()=>cf,onBecomeObserved:()=>Od,onBecomeUnobserved:()=>kd,onReactionError:()=>fd,override:()=>Cp,ownKeys:()=>sf,reaction:()=>Ed,remove:()=>nf,runInAction:()=>Sd,set:()=>tf,spy:()=>bd,toJS:()=>pf,trace:()=>mf,transaction:()=>gf,untracked:()=>Wu,values:()=>$d,when:()=>_f});function q(e){var t=[...arguments].slice(1);if(o.env.NODE_ENV!==`production`){var n=typeof e==`string`?e:ip[e];throw typeof n==`function`&&(n=n.apply(null,t)),Error(`[MobX] `+n)}throw Error(typeof e==`number`?`[MobX] minified error nr: `+e+(t.length?` `+t.map(String).join(`,`):``)+`. Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts`:`[MobX] `+e)}function Yc(){return typeof globalThis<`u`?globalThis:typeof window<`u`?window:g===void 0?typeof self<`u`?self:ap:g}function Xc(){fp||q(o.env.NODE_ENV===`production`?`Proxy not available`:"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`")}function Zc(e){o.env.NODE_ENV!==`production`&&Z.verifyProxies&&q(`MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to `+e)}function Qc(){return++Z.mobxGuid}function $c(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function el(e){return typeof e==`function`}function tl(e){switch(typeof e){case`string`:case`symbol`:case`number`:return!0}return!1}function nl(e){return typeof e==`object`&&!!e}function rl(e){if(!nl(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var n=Object.hasOwnProperty.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n.toString()===pp}function il(e){var t=e?.constructor;return t?t.name===`GeneratorFunction`||t.displayName===`GeneratorFunction`:!1}function al(e,t,n){cp(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ol(e,t,n){cp(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function sl(e,t){var n=`isMobX`+e;return t.prototype[n]=!0,function(e){return nl(e)&&e[n]===!0}}function cl(e){return e!=null&&Object.prototype.toString.call(e)===`[object Map]`}function ll(e){return Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(e)))===null}function ul(e){return e!=null&&Object.prototype.toString.call(e)===`[object Set]`}function dl(e){var t=Object.keys(e);if(!hp)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return lp.propertyIsEnumerable.call(e,t)})):t}function fl(e){return typeof e==`string`?e:typeof e==`symbol`?e.toString():new String(e).toString()}function pl(e){return e===null?null:typeof e==`object`?``+e:e}function ml(e,t){return lp.hasOwnProperty.call(e,t)}function hl(e,t){return!!(e&t)}function gl(e,t,n){return n?e|=t:e&=~t,e}function _l(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vl(e,t,n){if(El())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Dl(i,n.prototype),i}function yl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,kl(r.key),r)}}function bl(e,t,n){return t&&yl(e.prototype,t),n&&yl(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function xl(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Al(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sl.apply(null,arguments)}function Cl(e){return Cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cl(e)}function wl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Dl(e,t)}function Tl(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function El(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(El=function(){return!!e})()}function Dl(e,t){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dl(e,t)}function Ol(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function kl(e){var t=Ol(e,`string`);return typeof t==`symbol`?t:t+``}function Al(e,t){if(e){if(typeof e==`string`)return _l(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_l(e,t):void 0}}function jl(e){var t=typeof Map==`function`?new Map:void 0;return jl=function(e){if(e===null||!Tl(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return vl(e,arguments,Cl(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Dl(n,e)},jl(e)}function Ml(e){function t(t,n){if(Il(n))return e.decorate_20223_(t,n);Nl(t,n,e)}return Object.assign(t,e)}function Nl(e,t,n){ml(e,vp)||al(e,vp,Sl({},e[vp])),o.env.NODE_ENV!==`production`&&ql(n)&&!ml(e[vp],t)&&q(`'`+(e.constructor.name+`.prototype.`+t.toString())+`' is decorated with 'override', but no such decorated member was found on prototype.`),Pl(e,n,t),ql(n)||(e[vp][t]=n)}function Pl(e,t,n){if(o.env.NODE_ENV!==`production`&&!ql(t)&&ml(e[vp],n)){var r=e.constructor.name+`.prototype.`+n.toString(),i=e[vp][n].annotationType_,a=t.annotationType_;q(`Cannot apply '@`+a+`' to '`+r+`':`+(`
|
|
4
4
|
The field is already decorated with '@`+i+`'.`)+`
|
|
@@ -68,4 +68,4 @@ Use 'override' annotation for methods overridden by subclass.`)}}function Uf(e,t
|
|
|
68
68
|
<svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
69
69
|
<path d="M30 29.7522C25.1484 31.0691 16.7109 27.1184 18.6093 18.3391C20.5078 9.55979 25.5703 11.5351 26.414 12.852C27.2578 14.1689 28.3125 22.2898 15.8672 19.2171C5.9109 16.7589 7.15625 6.04811 8 1M8 1L14 8M8 1L1 7.5" stroke="${r?`#2C4BE2`:`#72747B`}"/>
|
|
70
70
|
</svg>
|
|
71
|
-
`;let c=document.createElement(`div`);c.style.boxSizing=`border-box`,c.style.position=`relative`,c.style.marginRight=`1rem`;let l=document.createElement(`img`);l.src=chrome.runtime.getURL(`/assets/${e?`locked-keplr-logo`:`icon`}-128.png`),l.style.boxSizing=`border-box`,l.style.width=`3rem`,l.style.height=`3rem`,c.appendChild(l);let u=document.createElement(`img`);u.src=chrome.runtime.getURL(`assets/icon-click-cursor.png`),u.style.boxSizing=`border-box`,u.style.position=`absolute`,u.style.right=`-0.2rem`,u.style.bottom=`-0.2rem`,u.style.aspectRatio=`78/98`,u.style.height=`1.375rem`,c.appendChild(u);let d=document.createElement(`span`);if(d.style.boxSizing=`border-box`,d.style.fontSize=`1rem`,d.style.color=r?`#020202`:`#FEFEFE`,d.textContent=e?`Unlock Keplr to proceed`:`Open Keplr to approve request(s)`,o.appendChild(s),o.appendChild(c),o.appendChild(d),!document.getElementById(`__open_keplr_side_panel__`)){let e=!1,t=setInterval(()=>{(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`interaction`,`ping-content-script-tab-has-opened-side-panel`,{}).then(n=>{n&&(clearInterval(t),e||=(o.remove(),!0))})},300);document.body.appendChild(o)}}}})}};var d=[`eth_signTransaction`,`eth_sendTransaction`,`personal_sign`,`eth_signTypedData_v3`,`eth_signTypedData_v4`,`wallet_addEthereumChain`,`wallet_switchEthereumChain`,`wallet_watchAsset`],f=class extends u.default{constructor(e,t){super(),this.keplr=e,this.requester=t,this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.isKeplr=!0,this.isMetaMask=!0}protectedEnableAccess(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`permission-interactive`,`enable-access-for-evm`,{chainId:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}protectedGetNewCurrentChainIdFromRequest(e,n){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-ethereum`,`get-new-current-chain-id-for-evm`,{method:e,params:n})})}protectedCheckNeedEnableAccess(e){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-ethereum`,`check-need-enable-access-for-evm`,{method:e})})}isConnected(){return!0}request({method:e,params:n,providerId:r,chainId:a}){return t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid paramater: `method` must be a string");if(yield this.protectedCheckNeedEnableAccess(e)){let t=yield this.protectedGetNewCurrentChainIdFromRequest(e,n);yield this.protectedEnableAccess(t)}return new Promise((t,o)=>{let s=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-ethereum`,`request-json-rpc-to-evm`,{method:e,params:n,providerId:r,chainId:a}).then(t).catch(o).finally(()=>s=!0),setTimeout(()=>{!s&&d.includes(e)&&this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}enable(){return t(this,void 0,void 0,function*(){return yield this.request({method:`eth_requestAccounts`})})}net_version(){return t(this,void 0,void 0,function*(){return yield this.request({method:`net_version`})})}},p=[`wallet_watchAsset`,`wallet_switchStarknetChain`,`wallet_addInvokeTransaction`,`wallet_addDeclareTransaction`,`wallet_signTypedData`],m=class{constructor(e,t){this.keplr=e,this.requester=t,this.id=``,this.name=``,this.version=``,this.icon=``,this.isConnected=!1}protectedEnableAccess(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`permission-interactive`,`enable-access-for-starknet`,{chainId:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}protectedGetNewCurrentChainIdFromRequest(e,n){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-starknet`,`get-new-current-chain-id-for-starknet`,{method:e,params:n})})}protectedCheckNeedEnableAccess(e,n){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-starknet`,`check-need-enable-access-for-starknet`,{method:e,params:n})})}request({type:e,params:n}){return t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid parameter: `type` must be a string");if(yield this.protectedCheckNeedEnableAccess(e,n)){let t=yield this.protectedGetNewCurrentChainIdFromRequest(e,n);yield this.protectedEnableAccess(t)}return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-starknet`,`request-json-rpc-to-starknet`,{method:e,params:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{!a&&p.includes(e)&&this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}enable(e){return t(this,void 0,void 0,function*(){throw Error(`Method not implemented.`)})}isPreauthorized(){throw Error(`Method not implemented.`)}on(e,t){throw Error(`Method not implemented.`)}off(e,t){throw Error(`Method not implemented.`)}},h=class extends u.default{constructor(e,t){super(),this.keplr=e,this.requester=t}protectedEnableAccess(){return t(this,void 0,void 0,function*(){return new Promise((e,t)=>{let n=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`permission-interactive`,`enable-access-for-bitcoin`,{}).then(e).catch(t).finally(()=>n=!0),setTimeout(()=>{n||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getAccounts(){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-accounts`,{})})}requestAccounts(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-request-accounts`,{})})}disconnect(){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-disconnect`,{})})}getNetwork(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-network`,{})})}switchNetwork(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-switch-network`,{network:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getChain(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-chain`,{})})}switchChain(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-switch-chain`,{chainType:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getPublicKey(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-public-key`,{})})}getBalance(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-balance`,{})})}getInscriptions(e,n){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-inscriptions`,{offset:e,limit:n})})}signMessage(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-sign-bitcoin-message`,{message:e,signType:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}sendBitcoin(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-send-bitcoin`,{to:e,amount:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}pushTx(e){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-push-tx`,{rawTxHex:e})})}pushPsbt(e){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-push-psbt`,{psbtHex:e})})}signPsbt(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-sign-bitcoin-psbt`,{psbtHex:e,options:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}signPsbts(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-sign-bitcoin-psbts`,{psbtsHexes:e,options:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getAddress(){return t(this,void 0,void 0,function*(){throw Error(`This method should not be called`)})}connectWallet(){return t(this,void 0,void 0,function*(){throw Error(`This method should not be called`)})}}})),jv=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.BitcoinProvider=e.InjectedKeplr=e.injectKeplrToWindow=void 0;var r=fa(),i=Dv(),a=Ov(),o=kv(),s=n(Vn()),c=n(W()),l=n(I());function u(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);(!r||r.writable)&&(!r||r.configurable?Object.defineProperty(e,t,{value:n,writable:!1}):e[t]=n)}function d(e){u(window,`keplr`,e),u(window,`getOfflineSigner`,e.getOfflineSigner),u(window,`getOfflineSignerOnlyAmino`,e.getOfflineSignerOnlyAmino),u(window,`getOfflineSignerAuto`,e.getOfflineSignerAuto),u(window,`getEnigmaUtils`,e.getEnigmaUtils),u(window,`starknet_keplr`,e.starknet),u(window,`bitcoin_keplr`,e.bitcoin)}e.injectKeplrToWindow=d,e.InjectedKeplr=class e{static startProxy(e,n,r={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},a){let o=`proxy-request${n?`-${n}`:``}`,s=n=>t(this,void 0,void 0,function*(){let s=a?a(n.data):n.data;if(!(!s||s.type!==o&&s.type!==`proxy-request`))try{if(!s.id)throw Error(`Empty id`);if(s.method.startsWith(`protected`))throw Error(`Rejected`);if(s.method===`version`)throw Error(`Version is not function`);if(s.method===`mode`)throw Error(`Mode is not function`);if(s.method===`defaultOptions`)throw Error(`DefaultOptions is not function`);if(!e[s.method]||s.method!==`ethereum`&&s.method!==`starknet`&&s.method!==`bitcoin`&&typeof e[s.method]!=`function`)throw Error(`Invalid method: ${s.method}`);if(s.method===`getOfflineSigner`)throw Error(`GetOfflineSigner method can't be proxy request`);if(s.method===`getOfflineSignerOnlyAmino`)throw Error(`GetOfflineSignerOnlyAmino method can't be proxy request`);if(s.method===`getOfflineSignerAuto`)throw Error(`GetOfflineSignerAuto method can't be proxy request`);if(s.method===`getEnigmaUtils`)throw Error(`GetEnigmaUtils method can't be proxy request`);let n=s.method,a=yield t(this,void 0,void 0,function*(){if(n===`signDirect`)return yield t(this,void 0,void 0,function*(){let t=s.args[2],n=yield e.signDirect(s.args[0],s.args[1],{bodyBytes:t.bodyBytes,authInfoBytes:t.authInfoBytes,chainId:t.chainId,accountNumber:t.accountNumber?c.default.fromString(t.accountNumber):null},s.args[3]);return{signed:{bodyBytes:n.signed.bodyBytes,authInfoBytes:n.signed.authInfoBytes,chainId:n.signed.chainId,accountNumber:n.signed.accountNumber.toString()},signature:n.signature}});if(n===`signDirectAux`)return yield t(this,void 0,void 0,function*(){let t=s.args[2],n=yield e.signDirectAux(s.args[0],s.args[1],{bodyBytes:t.bodyBytes,publicKey:t.publicKey,chainId:t.chainId,accountNumber:t.accountNumber?c.default.fromString(t.accountNumber):null,sequence:t.sequence?c.default.fromString(t.sequence):null},s.args[3]);return{signed:{bodyBytes:n.signed.bodyBytes,publicKey:n.signed.publicKey,chainId:n.signed.chainId,accountNumber:n.signed.accountNumber.toString(),sequence:n.signed.sequence.toString()},signature:n.signature}});if(n===`ethereum`){let t=s.ethereumProviderMethod;if(t?.startsWith(`protected`))throw Error(`Rejected`);if(t===`chainId`)throw Error(`chainId is not function`);if(t===`selectedAddress`)throw Error(`selectedAddress is not function`);if(t===`networkVersion`)throw Error(`networkVersion is not function`);if(t===`isKeplr`)throw Error(`isKeplr is not function`);if(t===`isMetaMask`)throw Error(`isMetaMask is not function`);if(t===void 0||typeof e.ethereum[t]!=`function`)throw Error(`${s.ethereumProviderMethod} is not function or invalid Ethereum provider method`);let n=i.JSONUint8Array.unwrap(s.args);return t===`request`?yield e.ethereum.request(typeof n==`string`?JSON.parse(n):n):yield e.ethereum[t](...typeof n==`string`?JSON.parse(n):n)}if(n===`starknet`){let t=s.starknetProviderMethod;if(t?.startsWith(`protected`))throw Error(`Rejected`);if(t===`id`)throw Error(`id is not function`);if(t===`name`)throw Error(`name is not function`);if(t===`version`)throw Error(`version is not function`);if(t===`icon`)throw Error(`icon is not function`);if(t===`chainId`)throw Error(`chainId is not function`);if(t===`selectedAddress`)throw Error(`selectedAddress is not function`);if(t===`isConnected`)throw Error(`isConnected is not function`);if(t===`account`)throw Error(`account is not function`);if(t===`provider`)throw Error(`provider is not function`);if(t===void 0||typeof e.starknet?.[t]!=`function`)throw Error(`${s.starknetProviderMethod} is not function or invalid Starknet provider method`);let n=i.JSONUint8Array.unwrap(s.args);return t===`request`?yield e.starknet.request(typeof n==`string`?JSON.parse(n):n):yield e.starknet[t](...typeof n==`string`?JSON.parse(n):n)}if(n===`bitcoin`){let t=s.bitcoinProviderMethod;if(t?.startsWith(`protected`))throw Error(`Rejected`);if(t===void 0||typeof e.bitcoin?.[t]!=`function`)throw Error(`${s.bitcoinProviderMethod} is not function or invalid Bitcoin provider method`);let n=i.JSONUint8Array.unwrap(s.args);return yield e.bitcoin[t](...typeof n==`string`?JSON.parse(n):n)}return yield e[n](...i.JSONUint8Array.unwrap(s.args))}),o={type:`proxy-request-response`,id:s.id,result:{return:i.JSONUint8Array.wrap(a)}};r.postMessage(o)}catch(e){let t={type:`proxy-request-response`,id:s.id,result:{error:e.code&&!e.module?{code:e.code,message:e.message,data:e.data}:e.message||e.toString()}};r.postMessage(t)}});return r.addMessageListener(s),()=>{r.removeMessageListener(s)}}requestMethod(e,t){let n=new Uint8Array(8),r=Array.from(crypto.getRandomValues(n)).map(e=>e.toString(16)).join(``),a={type:`proxy-request${this.metaId?`-${this.metaId}`:``}`,id:r,method:e,args:i.JSONUint8Array.wrap(t)};return new Promise((e,t)=>{let n=a=>{let o=this.parseMessage?this.parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this.eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){t(Error(s.error));return}e(s.return)};this.eventListener.addMessageListener(n),this.eventListener.postMessage(a)})}constructor(t,n,r,i,a,o={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},s,c,l){this.metaId=t,this.version=n,this.mode=r,this.onStarknetStateChange=i,this.onStarknetAccountChange=a,this.eventListener=o,this.parseMessage=s,this.eip6963ProviderInfo=c,this.starknetProviderInfo=l,this.enigmaUtils=new Map,this.defaultOptions={},this.ethereum=new f(this.metaId,()=>this,this.eventListener,this.parseMessage,this.eip6963ProviderInfo),this.starknet=this.generateStarknetProvider(),this.bitcoin=new m(()=>this,this.eventListener,this.parseMessage);let u=Object.keys(this);for(let e of u)if(e!==`defaultOptions`&&Object.defineProperty(this,e,{value:this[e],writable:!1}),e===`eventListener`){let e=Object.keys(this.eventListener);for(let t of e)Object.defineProperty(this.eventListener,t,{value:this.eventListener[t],writable:!1})}let d=Object.getOwnPropertyNames(e.prototype);for(let e of d)e!==`constructor`&&typeof this[e]==`function`&&Object.defineProperty(this,e,{value:this[e].bind(this),writable:!1})}ping(){return t(this,void 0,void 0,function*(){yield this.requestMethod(`ping`,[])})}enable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`enable`,[e])})}disable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`disable`,[e])})}experimentalSuggestChain(e){return t(this,void 0,void 0,function*(){if(e.hideInUI)throw Error(`hideInUI is not allowed`);e.features?.includes(`stargate`)||e.features?.includes(`no-legacy-stdTx`),yield this.requestMethod(`experimentalSuggestChain`,[e])})}getKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKey`,[e])})}getKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKeysSettled`,[e])})}sendTx(e,n,r){return t(this,void 0,void 0,function*(){return`length`in n,yield this.requestMethod(`sendTx`,[e,n,r])})}signAmino(e,n,r,i={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signAmino`,[e,n,r,(0,s.default)(this.defaultOptions.sign??{},i)])})}signDirect(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirect`,[e,n,{bodyBytes:r.bodyBytes,authInfoBytes:r.authInfoBytes,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null},(0,s.default)(this.defaultOptions.sign??{},i)]),a=t.signed;return{signed:{bodyBytes:a.bodyBytes,authInfoBytes:a.authInfoBytes,chainId:a.chainId,accountNumber:c.default.fromString(a.accountNumber)},signature:t.signature}})}signDirectAux(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirectAux`,[e,n,{bodyBytes:r.bodyBytes,publicKey:r.publicKey,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null,sequence:r.sequence?r.sequence.toString():null},(0,s.default)({preferNoSetMemo:this.defaultOptions.sign?.preferNoSetMemo},i)]),a=t.signed;return{signed:{bodyBytes:a.bodyBytes,publicKey:a.publicKey||void 0,chainId:a.chainId,accountNumber:c.default.fromString(a.accountNumber),sequence:c.default.fromString(a.sequence)},signature:t.signature}})}signArbitrary(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signArbitrary`,[e,n,r])})}signICNSAdr36(e,t,n,r,i){return this.requestMethod(`signICNSAdr36`,[e,t,n,r,i])}verifyArbitrary(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`verifyArbitrary`,[e,n,r,i])})}signEthereum(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signEthereum`,[e,n,r,i])})}getOfflineSigner(e,t){return new o.CosmJSOfflineSigner(e,this,t)}getOfflineSignerOnlyAmino(e,t){return new o.CosmJSOfflineSignerOnlyAmino(e,this,t)}getOfflineSignerAuto(e,n){return t(this,void 0,void 0,function*(){return(yield this.getKey(e)).isNanoLedger?new o.CosmJSOfflineSignerOnlyAmino(e,this,n):new o.CosmJSOfflineSigner(e,this,n)})}suggestToken(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestToken`,[e,n,r])})}getSecret20ViewingKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getSecret20ViewingKey`,[e,n])})}getEnigmaPubKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaPubKey`,[e])})}getEnigmaTxEncryptionKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaTxEncryptionKey`,[e,n])})}enigmaEncrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaEncrypt`,[e,n,r])})}enigmaDecrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaDecrypt`,[e,n,r])})}getEnigmaUtils(e){if(this.enigmaUtils.has(e))return this.enigmaUtils.get(e);let t=new a.KeplrEnigmaUtils(e,this);return this.enigmaUtils.set(e,t),t}experimentalSignEIP712CosmosTx_v0(e,n,r,i,a={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`experimentalSignEIP712CosmosTx_v0`,[e,n,r,i,(0,s.default)(this.defaultOptions.sign??{},a)])})}getChainInfosWithoutEndpoints(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfosWithoutEndpoints`,[])})}getChainInfoWithoutEndpoints(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfoWithoutEndpoints`,[e])})}__core__getAnalyticsId(){return this.requestMethod(`__core__getAnalyticsId`,[])}changeKeyRingName({defaultName:e,editable:n=!0}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`changeKeyRingName`,[{defaultName:e,editable:n}])})}__core__privilageSignAminoWithdrawRewards(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoWithdrawRewards`,[e,n,r])})}__core__privilageSignAminoDelegate(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoDelegate`,[e,n,r])})}__core__privilageSignAminoExecuteCosmWasm(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoExecuteCosmWasm`,[e,n,r])})}sendEthereumTx(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`sendEthereumTx`,[e,n])})}suggestERC20(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestERC20`,[e,n])})}__core__webpageClosed(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__webpageClosed`,[])})}getStarknetKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKey`,[e])})}getStarknetKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKeysSettled`,[e])})}signStarknetTx(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetTx`,[e,n,r])})}signStarknetDeployAccountTransaction(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetDeployAccountTransaction`,[e,n])})}generateStarknetProvider(){return new p(this.metaId,this.starknetProviderInfo.id,this.starknetProviderInfo.name,this.version,this.starknetProviderInfo.icon,()=>this,this.onStarknetStateChange,this.onStarknetAccountChange,this.eventListener,this.parseMessage)}getBitcoinKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKey`,[e])})}getBitcoinKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKeysSettled`,[e])})}signPsbt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbt`,[e,n,r])})}signPsbts(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbts`,[e,n,r])})}};var f=class extends l.default{constructor(e,n,a={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},o,s){if(super(),this.metaId=e,this.injectedKeplr=n,this.eventListener=a,this.parseMessage=o,this.eip6963ProviderInfo=s,this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.isKeplr=!0,this.isMetaMask=!0,this._isConnected=!1,this._currentChainId=null,this._requestMethod=(e,n)=>t(this,void 0,void 0,function*(){let t=new Uint8Array(8),r=Array.from(crypto.getRandomValues(t)).map(e=>e.toString(16)).join(``),a={type:`proxy-request${this.metaId?`-${this.metaId}`:``}`,id:r,method:`ethereum`,args:i.JSONUint8Array.wrap(n),ethereumProviderMethod:e};return new Promise((e,t)=>{let n=a=>{let o=this.parseMessage?this.parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this.eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){let e=s.error;t(e.code&&!e.module?new i.EthereumProviderRpcError(e.code,e.message,e.data):Error(e));return}e(s.return)};this.eventListener.addMessageListener(n),this.eventListener.postMessage(a)})}),this._initProviderState=()=>t(this,void 0,void 0,function*(){let e=yield this._requestMethod(`request`,{method:`keplr_initProviderState`});if(e){let{currentEvmChainId:t,currentChainId:n,selectedAddress:r}=e;n!=null&&t!=null&&r!=null&&(this._handleConnect(t),this._handleChainChanged(t),this._currentChainId=n,this._handleAccountsChanged(r))}}),this._handleConnect=e=>t(this,void 0,void 0,function*(){if(!this._isConnected){this._isConnected=!0;let t=`0x${e.toString(16)}`;this.emit(`connect`,{chainId:t})}}),this._handleDisconnect=()=>t(this,void 0,void 0,function*(){this._isConnected&&(yield this._requestMethod(`request`,{method:`keplr_disconnect`}),this._isConnected=!1,this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.emit(`disconnect`))}),this._handleChainChanged=e=>t(this,void 0,void 0,function*(){let t=`0x${e.toString(16)}`;t!==this.chainId&&(this.chainId=t,this.networkVersion=e.toString(10),this.emit(`chainChanged`,t))}),this._handleAccountsChanged=e=>t(this,void 0,void 0,function*(){this.selectedAddress!==e&&(this.selectedAddress=e,e?this.emit(`accountsChanged`,[e]):this.emit(`accountsChanged`,[]))}),this.request=({method:e,params:n,chainId:r})=>t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid paramater: `method` must be a string");return this._isConnected||(yield this._initProviderState()),yield this._requestMethod(`request`,{method:e,params:n,providerId:this.eip6963ProviderInfo?.uuid,chainId:r})}),this.enable=()=>t(this,void 0,void 0,function*(){return yield this.request({method:`eth_requestAccounts`})}),this.net_version=()=>t(this,void 0,void 0,function*(){return yield this.request({method:`net_version`})}),this._initProviderState(),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){if(this._currentChainId&&(yield n().getChainInfoWithoutEndpoints(this._currentChainId))){let e=null;try{e=(yield n().getKey(this._currentChainId)).ethereumHexAddress}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}})),window.addEventListener(`keplr_chainChanged`,e=>{if(e.detail.origin===window.location.origin){let t=e.detail.evmChainId;this._handleChainChanged(t)}}),window.addEventListener(`keplr_ethSubscription`,e=>{let t=e.detail.origin,n=e.detail.providerId;if(t===window.location.origin&&n===this.eip6963ProviderInfo?.uuid){let t=e.detail.data;this.emit(`message`,{type:`eth_subscription`,data:t})}}),this.eip6963ProviderInfo){let e=new CustomEvent(r.EIP6963EventNames.Announce,{detail:Object.freeze({info:this.eip6963ProviderInfo,provider:this})});window.addEventListener(r.EIP6963EventNames.Request,()=>window.dispatchEvent(e)),window.dispatchEvent(e)}}isConnected(){return this._isConnected}},p=class{constructor(e,n,r,i,a,o,s,c,l={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},u){this.metaId=e,this.id=n,this.name=r,this.version=i,this.icon=a,this._injectedKeplr=o,this.onStateChange=s,this.onAccountChange=c,this._eventListener=l,this._parseMessage=u,this.isConnected=!1,this.chainId=void 0,this.selectedAddress=void 0,this.account=void 0,this.provider=void 0,this._currentChainId=void 0,this._userWalletEvents=[],this._initProviderState(),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){if(this._currentChainId){let e=null;try{e=(yield this._injectedKeplr().getStarknetKey(this._currentChainId)).hexAddress}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this.selectedAddress=e??void 0,this.onAccountChange({selectedAddress:e}),this._userWalletEvents.forEach(t=>{t.type===`accountsChanged`&&t.handler(e?[e]:[``])})}})),window.addEventListener(`keplr_starknetChainChanged`,e=>{let t=e.detail.origin,n=e.detail.starknetChainId;this.chainId=n,t===window.location.origin&&this._userWalletEvents.forEach(e=>{e.type===`networkChanged`&&e.handler(n)})})}_requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=new Uint8Array(8),r=Array.from(crypto.getRandomValues(t)).map(e=>e.toString(16)).join(``),a={type:`proxy-request${this.metaId?`-${this.metaId}`:``}`,id:r,method:`starknet`,args:i.JSONUint8Array.wrap(n),starknetProviderMethod:e};return new Promise((e,t)=>{let n=a=>{let o=this._parseMessage?this._parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this._eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){let e=s.error;t(e.code&&!e.module?new i.EthereumProviderRpcError(e.code,e.message,e.data):Error(e));return}e(s.return)};this._eventListener.addMessageListener(n),this._eventListener.postMessage(a)})})}_initProviderState(){return t(this,void 0,void 0,function*(){let{currentChainId:e,selectedAddress:t,rpc:n}=yield this.request({type:`keplr_initStarknetProviderState`});e!=null&&t!=null&&n!=null?(this.onStateChange({selectedAddress:t,chainId:e,rpc:n}),this._currentChainId=e,this.chainId=e.replace(`starknet:`,``),this.selectedAddress=t,this.isConnected=!0):this.onStateChange({selectedAddress:null,chainId:null,rpc:null})})}request({type:e,params:n}){return t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid parameter: `type` must be a string");return yield this._requestMethod(`request`,{type:e,params:n})})}enable(e){return t(this,void 0,void 0,function*(){let{currentChainId:e,selectedAddress:t,rpc:n}=yield this.request({type:`keplr_enableStarknetProvider`});return this.onStateChange({selectedAddress:t,chainId:e,rpc:n}),this._currentChainId=e,this.chainId=e.replace(`starknet:`,``),this.selectedAddress=t,this.isConnected=!0,[t]})}isPreauthorized(){return t(this,void 0,void 0,function*(){let{currentChainId:e,selectedAddress:t}=yield this.request({type:`keplr_initStarknetProviderState`});return e!=null&&t!=null})}on(e,t){if(e===`accountsChanged`)this._userWalletEvents.push({type:`accountsChanged`,handler:t});else if(e===`networkChanged`)this._userWalletEvents.push({type:`networkChanged`,handler:t});else throw Error(`Invalid event type`)}off(e,t){if(e!==`accountsChanged`&&e!==`networkChanged`)throw Error(`Invalid event type`);let n=this._userWalletEvents.findIndex(n=>n.type===e&&n.handler===t);n>=0&&this._userWalletEvents.splice(n,1)}},m=class extends l.default{constructor(e,n={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},r){super(),this._injectedKeplr=e,this._eventListener=n,this._parseMessage=r,this._handleNetworkChanged=e=>t(this,void 0,void 0,function*(){this.emit(`networkChanged`,e)}),this._handleAccountsChanged=e=>t(this,void 0,void 0,function*(){e&&e.length>0?(this.emit(`accountChanged`,e),this.emit(`accountsChanged`,e)):(this.emit(`accountChanged`,[``]),this.emit(`accountsChanged`,[``]))}),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)})),window.addEventListener(`keplr_bitcoinChainChanged`,e=>t(this,void 0,void 0,function*(){if(e.detail.origin===window.location.origin){let t=e.detail.network,n=null;try{n=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleNetworkChanged(t),this._handleAccountsChanged(n)}})),window.addEventListener(`keplr_bitcoinAccountsChanged`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}))}_requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=new Uint8Array(8),r=Array.from(crypto.getRandomValues(t)).map(e=>e.toString(16)).join(``),a={type:`proxy-request`,id:r,method:`bitcoin`,args:i.JSONUint8Array.wrap(n),bitcoinProviderMethod:e};return new Promise((e,t)=>{let n=a=>{let o=this._parseMessage?this._parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this._eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){t(Error(s.error));return}e(s.return)};this._eventListener.addMessageListener(n),this._eventListener.postMessage(a)})})}getAccounts(){return this._requestMethod(`getAccounts`,[])}requestAccounts(){return t(this,void 0,void 0,function*(){return this._requestMethod(`requestAccounts`,[])})}disconnect(){return t(this,void 0,void 0,function*(){return this._requestMethod(`disconnect`,[])})}getNetwork(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getNetwork`,[])})}switchNetwork(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`switchNetwork`,[e])})}getChain(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getChain`,[])})}switchChain(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`switchChain`,[e])})}getPublicKey(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getPublicKey`,[])})}getBalance(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getBalance`,[])})}getInscriptions(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`getInscriptions`,[e,n])})}signMessage(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`signMessage`,[e,n])})}sendBitcoin(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`sendBitcoin`,[e,n])})}pushTx(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`pushTx`,[e])})}pushPsbt(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`pushPsbt`,[e])})}signPsbt(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`signPsbt`,[e,n])})}signPsbts(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`signPsbts`,[e,n])})}getAddress(){return t(this,void 0,void 0,function*(){return(yield this.getAccounts())[0]})}connectWallet(){return t(this,void 0,void 0,function*(){return this.requestAccounts()})}};e.BitcoinProvider=m})),Mv=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Av(),e),n(kv(),e),n(Ov(),e),n(jv(),e)})),Nv=a(((e,t)=>{(function(n,r){function i(e){return e.default||e}typeof define==`function`&&define.amd?define([],function(){var e={};return r(e),i(e)}):typeof e==`object`?(r(e),typeof t==`object`&&(t.exports=i(e))):(function(){var e={};r(e),n.Long=i(e)})()})(typeof globalThis<`u`?globalThis:typeof self<`u`?self:e,function(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=null;try{t=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 n(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}n.prototype.__isLong__,Object.defineProperty(n.prototype,`__isLong__`,{value:!0});function r(e){return(e&&e.__isLong__)===!0}function i(e){var t=Math.clz32(e&-e);return e?31-t:t}n.isLong=r;var a={},o={};function s(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=l(e,0,!0),i&&(o[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=a[e],r)?r:(n=l(e,e<0?-1:0,!1),i&&(a[e]=n),n))}n.fromInt=s;function c(e,t){if(isNaN(e))return t?b:y;if(t){if(e<0)return b;if(e>=g)return T}else{if(e<=-_)return E;if(e+1>=_)return w}return e<0?c(-e,t).neg():l(e%h|0,e/h|0,t)}n.fromNumber=c;function l(e,t,r){return new n(e,t,r)}n.fromBits=l;var u=Math.pow;function d(e,t,n){if(e.length===0)throw Error(`empty string`);if(typeof t==`number`?(n=t,t=!1):t=!!t,e===`NaN`||e===`Infinity`||e===`+Infinity`||e===`-Infinity`)return t?b:y;if(n||=10,n<2||36<n)throw RangeError(`radix`);var r;if((r=e.indexOf(`-`))>0)throw Error(`interior hyphen`);if(r===0)return d(e.substring(1),t,n).neg();for(var i=c(u(n,8)),a=y,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),l=parseInt(e.substring(o,o+s),n);if(s<8){var f=c(u(n,s));a=a.mul(f).add(c(l))}else a=a.mul(i),a=a.add(c(l))}return a.unsigned=t,a}n.fromString=d;function f(e,t){return typeof e==`number`?c(e,t):typeof e==`string`?d(e,t):l(e.low,e.high,typeof t==`boolean`?t:e.unsigned)}n.fromValue=f;var p=65536,m=1<<24,h=p*p,g=h*h,_=g/2,v=s(m),y=s(0);n.ZERO=y;var b=s(0,!0);n.UZERO=b;var x=s(1);n.ONE=x;var S=s(1,!0);n.UONE=S;var C=s(-1);n.NEG_ONE=C;var w=l(-1,2147483647,!1);n.MAX_VALUE=w;var T=l(-1,-1,!0);n.MAX_UNSIGNED_VALUE=T;var E=l(0,-2147483648,!1);n.MIN_VALUE=E;var D=n.prototype;D.toInt=function(){return this.unsigned?this.low>>>0:this.low},D.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},D.toString=function(e){if(e||=10,e<2||36<e)throw RangeError(`radix`);if(this.isZero())return`0`;if(this.isNegative())if(this.eq(E)){var t=c(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}else return`-`+this.neg().toString(e);for(var i=c(u(e,6),this.unsigned),a=this,o=``;;){var s=a.div(i),l=(a.sub(s.mul(i)).toInt()>>>0).toString(e);if(a=s,a.isZero())return l+o;for(;l.length<6;)l=`0`+l;o=``+l+o}},D.getHighBits=function(){return this.high},D.getHighBitsUnsigned=function(){return this.high>>>0},D.getLowBits=function(){return this.low},D.getLowBitsUnsigned=function(){return this.low>>>0},D.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=this.high==0?this.low:this.high,t=31;t>0&&!(e&1<<t);t--);return this.high==0?t+1:t+33},D.isSafeInteger=function(){var e=this.high>>21;return e?this.unsigned?!1:e===-1&&!(this.low===0&&this.high===-2097152):!0},D.isZero=function(){return this.high===0&&this.low===0},D.eqz=D.isZero,D.isNegative=function(){return!this.unsigned&&this.high<0},D.isPositive=function(){return this.unsigned||this.high>=0},D.isOdd=function(){return(this.low&1)==1},D.isEven=function(){return(this.low&1)==0},D.equals=function(e){return r(e)||(e=f(e)),this.unsigned!==e.unsigned&&this.high>>>31==1&&e.high>>>31==1?!1:this.high===e.high&&this.low===e.low},D.eq=D.equals,D.notEquals=function(e){return!this.eq(e)},D.neq=D.notEquals,D.ne=D.notEquals,D.lessThan=function(e){return this.comp(e)<0},D.lt=D.lessThan,D.lessThanOrEqual=function(e){return this.comp(e)<=0},D.lte=D.lessThanOrEqual,D.le=D.lessThanOrEqual,D.greaterThan=function(e){return this.comp(e)>0},D.gt=D.greaterThan,D.greaterThanOrEqual=function(e){return this.comp(e)>=0},D.gte=D.greaterThanOrEqual,D.ge=D.greaterThanOrEqual,D.compare=function(e){if(r(e)||(e=f(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?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},D.comp=D.compare,D.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(x)},D.neg=D.negate,D.add=function(e){r(e)||(e=f(e));var t=this.high>>>16,n=this.high&65535,i=this.low>>>16,a=this.low&65535,o=e.high>>>16,s=e.high&65535,c=e.low>>>16,u=e.low&65535,d=0,p=0,m=0,h=0;return h+=a+u,m+=h>>>16,h&=65535,m+=i+c,p+=m>>>16,m&=65535,p+=n+s,d+=p>>>16,p&=65535,d+=t+o,d&=65535,l(m<<16|h,d<<16|p,this.unsigned)},D.subtract=function(e){return r(e)||(e=f(e)),this.add(e.neg())},D.sub=D.subtract,D.multiply=function(e){if(this.isZero())return this;if(r(e)||(e=f(e)),t)return l(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return this.unsigned?b:y;if(this.eq(E))return e.isOdd()?E:y;if(e.eq(E))return this.isOdd()?E:y;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(v)&&e.lt(v))return c(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=e.high>>>16,u=e.high&65535,d=e.low>>>16,p=e.low&65535,m=0,h=0,g=0,_=0;return _+=o*p,g+=_>>>16,_&=65535,g+=a*p,h+=g>>>16,g&=65535,g+=o*d,h+=g>>>16,g&=65535,h+=i*p,m+=h>>>16,h&=65535,h+=a*d,m+=h>>>16,h&=65535,h+=o*u,m+=h>>>16,h&=65535,m+=n*p+i*d+a*u+o*s,m&=65535,l(g<<16|_,m<<16|h,this.unsigned)},D.mul=D.multiply,D.divide=function(e){if(r(e)||(e=f(e)),e.isZero())throw Error(`division by zero`);if(t)return!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1?this:l((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(this.isZero())return this.unsigned?b:y;var n,i,a;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return b;if(e.gt(this.shru(1)))return S;a=b}else{if(this.eq(E))return e.eq(x)||e.eq(C)?E:e.eq(E)?x:(n=this.shr(1).div(e).shl(1),n.eq(y)?e.isNegative()?x:C:(i=this.sub(e.mul(n)),a=n.add(i.div(e)),a));if(e.eq(E))return this.unsigned?b:y;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();a=y}for(i=this;i.gte(e);){n=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(n)/Math.LN2),s=o<=48?1:u(2,o-48),d=c(n),p=d.mul(e);p.isNegative()||p.gt(i);)n-=s,d=c(n,this.unsigned),p=d.mul(e);d.isZero()&&(d=x),a=a.add(d),i=i.sub(p)}return a},D.div=D.divide,D.modulo=function(e){return r(e)||(e=f(e)),t?l((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},D.mod=D.modulo,D.rem=D.modulo,D.not=function(){return l(~this.low,~this.high,this.unsigned)},D.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},D.clz=D.countLeadingZeros,D.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},D.ctz=D.countTrailingZeros,D.and=function(e){return r(e)||(e=f(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},D.or=function(e){return r(e)||(e=f(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},D.xor=function(e){return r(e)||(e=f(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},D.shiftLeft=function(e){return r(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):l(0,this.low<<e-32,this.unsigned)},D.shl=D.shiftLeft,D.shiftRight=function(e){return r(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},D.shr=D.shiftRight,D.shiftRightUnsigned=function(e){return r(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):l(e===32?this.high:this.high>>>e-32,0,this.unsigned)},D.shru=D.shiftRightUnsigned,D.shr_u=D.shiftRightUnsigned,D.rotateLeft=function(e){var t;return r(e)&&(e=e.toInt()),(e&=63)==0?this:e===32?l(this.high,this.low,this.unsigned):e<32?(t=32-e,l(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(e-=32,t=32-e,l(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},D.rotl=D.rotateLeft,D.rotateRight=function(e){var t;return r(e)&&(e=e.toInt()),(e&=63)==0?this:e===32?l(this.high,this.low,this.unsigned):e<32?(t=32-e,l(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(e-=32,t=32-e,l(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},D.rotr=D.rotateRight,D.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},D.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},D.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},D.toBytesLE=function(){var e=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},D.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},typeof BigInt==`function`&&(n.fromBigInt=function(e,t){return l(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},n.fromValue=function(e,t){return typeof e==`bigint`?n.fromBigInt(e,t):f(e,t)},D.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e}),e.default=n})})),Pv=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.KeplrWalletConnectV2=void 0;var i=Mv(),a=(x(),n(S)),o=r(Nv()),s=r(I());e.KeplrWalletConnectV2=class{constructor(e,n){this.signClient=e,this.options=n,this.defaultOptions={},this.version=`0.12.20`,this.mode=`walletconnect`,this.storeKey=`keplr_wallet_connect_v2_key`,this.storeSuggestChainKey=`keplr_wallet_connect_v2_suggest_chain_key`,this.storeSuggestTokenKey=`keplr_wallet_connect_v2_suggest_token_key`,this.ethereum=new c,this.starknet={},this.bitcoin={},n.sessionProperties&&this.saveKeys(n.sessionProperties),e.on(`session_event`,e=>{e.params.event.name===`keplr_accountsChanged`&&(this.saveKeys(e.params.event.data),window.dispatchEvent(new Event(`keplr_keystorechange`)))}),e.on(`session_delete`,()=>t(this,void 0,void 0,function*(){localStorage.removeItem(this.getKeyLastSeenKey()),localStorage.removeItem(this.getSuggestChainKey()),localStorage.removeItem(this.getSuggestTokenKey())}))}saveKeys(e){if(e.hasOwnProperty(`keys`)){let t=JSON.parse(e.keys);t.length>0&&t.forEach(e=>{e.hasOwnProperty(`chainId`)&&this.saveLastSeenKey(e.chainId,this.convertToKeplrGetKeyWalletConnectV2Response(e))})}}convertToKeplrGetKeyWalletConnectV2Response(e){if(!e.hasOwnProperty(`name`)||!e.hasOwnProperty(`algo`)||!e.hasOwnProperty(`pubKey`)||!e.hasOwnProperty(`address`)||!e.hasOwnProperty(`bech32Address`)||!e.hasOwnProperty(`ethereumHexAddress`)||!e.hasOwnProperty(`isNanoLedger`))throw Error(`Invalid data`);return{name:e.name,algo:e.algo,pubKey:e.pubKey,address:e.address,bech32Address:e.bech32Address,ethereumHexAddress:e.ethereumHexAddress,isNanoLedger:e.isNanoLedger===`true`}}getLastSession(){let e=this.signClient.session.getAll().length-1;return this.signClient.session.getAll()[e]}getCurrentTopic(){let e=this.getLastSession();if(!e)throw Error(`No session`);return e.topic}getKeyLastSeenKey(){let e=this.getCurrentTopic();return`${this.storeKey}/${e}-key`}getLastSeenKey(e){let t=this.getAllLastSeenKey();if(t)return t[e]}getAllLastSeenKey(){let e=localStorage.getItem(this.getKeyLastSeenKey());if(e)return JSON.parse(e)}saveLastSeenKey(e,t){let n=this.getAllLastSeenKey();n||={},n[e]=t,this.saveAllLastSeenKey(n)}saveAllLastSeenKey(e){localStorage.setItem(this.getKeyLastSeenKey(),JSON.stringify(e))}getSuggestChainKey(){let e=this.getCurrentTopic();return`${this.storeSuggestChainKey}/${e}-key`}getRegisteredSuggestChain(e){let t=this.getAllRegisteredSuggestChain();if(t)return t[e]}getAllRegisteredSuggestChain(){let e=localStorage.getItem(this.getSuggestChainKey());if(e)return JSON.parse(e)}saveRegisteredSuggestChain(e){let t=this.getAllRegisteredSuggestChain();t||={},t[e.chainId]=e,this.saveAllRegisteredSuggestChain(t)}saveAllRegisteredSuggestChain(e){localStorage.setItem(this.getSuggestChainKey(),JSON.stringify(e))}getSuggestTokenKey(){let e=this.getCurrentTopic();return`${this.storeSuggestTokenKey}/${e}-key`}getRegisteredSuggestToken(e){let t=this.getAllRegisteredSuggestToken();if(t)return t[e]}getAllRegisteredSuggestToken(){let e=localStorage.getItem(this.getSuggestTokenKey());if(e)return JSON.parse(e)}saveRegisteredSuggestToken(e,t,n){let r=this.getAllRegisteredSuggestToken();r||={},r[t]={chainId:e,contractAddress:t,viewingKey:n},this.saveAllRegisteredSuggestToken(r)}saveAllRegisteredSuggestToken(e){localStorage.setItem(this.getSuggestTokenKey(),JSON.stringify(e))}sendCustomRequest(e){return t(this,void 0,void 0,function*(){return yield this.signClient.request(e)})}getNamespaceChainId(){let e=this.getLastSession();if(e&&e.namespaces.hasOwnProperty(`cosmos`)&&e.namespaces.cosmos.hasOwnProperty(`accounts`)){let t=e.namespaces.cosmos.accounts[0].split(`:`);return`${t[0]}:${t[1]}`}return`cosmos:cosmoshub-4`}checkDeepLink(){let e=localStorage.getItem(`wallet-connect-v2-mobile-link`);e&&(window.location.href=JSON.parse(e).href)}ping(){return Promise.resolve()}changeKeyRingName(e){throw Error(`Not yet implemented`)}disable(e){throw Error(`Not yet implemented`)}enable(e){return t(this,void 0,void 0,function*(){typeof e==`string`&&(e=[e]);let n=yield this.getAllLastSeenKey();if(n&&e.every(e=>Object.keys(n).includes(e)))return;this.checkDeepLink();let r=this.getCurrentTopic();if(!this.getNamespaceChainId())throw Error(`No Namespace chain id`);let i={topic:r,chainId:this.getNamespaceChainId(),request:{method:`keplr_enable`,params:{chainId:e}}};return yield this.sendCustomRequest(i),new Promise(n=>t(this,void 0,void 0,function*(){for(;;){yield new Promise(e=>setTimeout(e,100));let t=this.getLastSession();if(t&&t.namespaces.hasOwnProperty(`cosmos`)&&t.namespaces.cosmos.hasOwnProperty(`accounts`)&&t.namespaces.cosmos.accounts.some(t=>{let n=t.replace(`cosmos:`,``).split(`:`)[0];return e.includes(n)})){n();return}}}))})}enigmaDecrypt(e,t,n){throw Error(`Not yet implemented`)}enigmaEncrypt(e,t,n){throw Error(`Not yet implemented`)}experimentalSignEIP712CosmosTx_v0(e,t,n,r,i={}){throw Error(`Not yet implemented`)}experimentalSuggestChain(e){return t(this,void 0,void 0,function*(){if(e.features?.includes(`stargate`)||e.features?.includes(`no-legacy-stdTx`),this.getRegisteredSuggestChain(e.chainId))return;this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_experimentalSuggestChain`,params:{chainInfo:e}}};yield this.sendCustomRequest(t),this.saveRegisteredSuggestChain(e)})}getChainInfosWithoutEndpoints(){throw Error(`Not yet implemented`)}getChainInfoWithoutEndpoints(e){throw Error(`Not yet implemented`)}getEnigmaPubKey(e){throw Error(`Not yet implemented`)}getEnigmaTxEncryptionKey(e,t){throw Error(`Not yet implemented`)}getEnigmaUtils(e){throw Error(`Not yet implemented`)}getKey(e){return t(this,void 0,void 0,function*(){let t=this.getLastSeenKey(e);if(t)return{algo:t.algo,bech32Address:t.bech32Address,ethereumHexAddress:t.ethereumHexAddress,address:a.Buffer.from(t.address,`base64`),name:t.name,pubKey:a.Buffer.from(t.pubKey,`base64`),isNanoLedger:t.isNanoLedger,isKeystone:!1};let n=this.getLastSession();if(n&&n.sessionProperties&&n.sessionProperties.chainId===e)return{algo:n.sessionProperties.algo,bech32Address:n.sessionProperties.bech32Address,ethereumHexAddress:n.sessionProperties.ethereumHexAddress,address:a.Buffer.from(n.sessionProperties.address,`base64`),name:n.sessionProperties.name,pubKey:a.Buffer.from(n.sessionProperties.pubKey,`base64`),isNanoLedger:n.sessionProperties.isNanoLedger===`true`,isKeystone:!1};let r={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_getKey`,params:{chainId:e}}},i=yield this.sendCustomRequest(r);return Object.assign(Object.assign({},i),{pubKey:a.Buffer.from(i.pubKey,`base64`),address:a.Buffer.from(i.address,`base64`),isKeystone:!1})})}getKeysSettled(e){return t(this,void 0,void 0,function*(){let n=e.map(e=>t(this,void 0,void 0,function*(){return yield this.getKey(e)}));return yield Promise.allSettled(n)})}getOfflineSigner(e,t){return new i.CosmJSOfflineSigner(e,this,t)}getOfflineSignerAuto(e,n){return t(this,void 0,void 0,function*(){return(yield this.getKey(e)).isNanoLedger?new i.CosmJSOfflineSignerOnlyAmino(e,this,n):new i.CosmJSOfflineSigner(e,this,n)})}getOfflineSignerOnlyAmino(e,t){return new i.CosmJSOfflineSignerOnlyAmino(e,this,t)}getSecret20ViewingKey(e,t){throw Error(`Not yet implemented`)}sendTx(e,t,n){if(this.options.sendTx)return this.options.sendTx(e,t,n);throw Error(`send tx is not delivered by options`)}signAmino(e,n,r,i){return t(this,void 0,void 0,function*(){this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signAmino`,params:{chainId:e,signer:n,signDoc:r,signOptions:i}}};return yield this.sendCustomRequest(t)})}signArbitrary(e,t,n){this.checkDeepLink();let r={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signArbitrary`,params:{chainId:e,signer:t,type:typeof n==`string`?`string`:`Uint8Array`,data:typeof n==`string`?n:a.Buffer.from(n).toString(`base64`)}}};return this.sendCustomRequest(r)}signDirect(e,n,r,i){return t(this,void 0,void 0,function*(){this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signDirect`,params:{chainId:e,signer:n,signDoc:{chainId:r.chainId,accountNumber:r.accountNumber?.toString(),bodyBytes:r.bodyBytes?a.Buffer.from(r.bodyBytes).toString(`base64`):null,authInfoBytes:r.authInfoBytes?a.Buffer.from(r.authInfoBytes).toString(`base64`):null},signOptions:i}}},s=yield this.sendCustomRequest(t);return{signature:s.signature,signed:{chainId:s.signed.chainId??``,accountNumber:s.signed.accountNumber?o.default.fromString(s.signed.accountNumber):new o.default(0),bodyBytes:s.signed.bodyBytes?a.Buffer.from(s.signed.bodyBytes,`base64`):new Uint8Array([]),authInfoBytes:s.signed.authInfoBytes?a.Buffer.from(s.signed.authInfoBytes,`base64`):new Uint8Array([])}}})}signDirectAux(e,t,n,r){throw Error(`Not yet implemented`)}signEthereum(e,n,r,i){return t(this,void 0,void 0,function*(){this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signEthereum`,params:{chainId:e,signer:n,data:r,type:i}}};return yield this.sendCustomRequest(t)})}signICNSAdr36(e,t,n,r,i){throw Error(`Not yet implemented`)}suggestToken(e,n,r){return t(this,void 0,void 0,function*(){if(this.getRegisteredSuggestToken(n))return;this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_suggestToken`,params:{chainId:e,contractAddress:n,viewingKey:r}}};yield this.sendCustomRequest(t),this.saveRegisteredSuggestToken(e,n,r)})}verifyArbitrary(e,t,n,r){throw Error(`Not yet implemented`)}sendEthereumTx(e,t){throw Error(`Not yet implemented`)}suggestERC20(e,t){throw Error(`Not yet implemented`)}getStarknetKey(e){throw Error(`Not yet implemented`)}getStarknetKeysSettled(e){throw Error(`Not yet implemented`)}signStarknetTx(){throw Error(`Not yet implemented`)}signStarknetDeployAccountTransaction(e,t){throw Error(`Not yet implemented`)}getBitcoinKey(e){throw Error(`Not yet implemented`)}getBitcoinKeysSettled(e){throw Error(`Not yet implemented`)}signPsbt(e,t,n){throw Error(`Method not implemented.`)}signPsbts(e,t,n){throw Error(`Method not implemented.`)}};var c=class extends s.default{constructor(){super(),this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.isKeplr=!0,this.isMetaMask=!0}isConnected(){throw Error(`Method not implemented.`)}request({}){throw Error(`Not yet implemented`)}enable(){throw Error(`Method not implemented.`)}net_version(){throw Error(`Method not implemented.`)}}}))(),Fv=class extends mv{keplr=void 0;constructor(e){super(e)}initKeplrWCClient(e,t){this.keplr=new Pv.KeplrWalletConnectV2(e,t),localStorage.setItem(`wallet-connect-v2-mobile-link`,JSON.stringify(this.env?.os===`android`?{name:`Keplr`,href:`intent://wcV2#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`}:{name:`Keplr`,href:`keplrwallet://wcV2`}))}async connect(e,t){this.signClient===void 0&&await this.init(),this.qrUrl.state!==`Init`&&this.setQRState(H.Init);let n=typeof e==`string`?[`cosmos:${e}`]:e.map(e=>`cosmos:${e}`);this.restorePairings();let r=this.pairing;if(this.logger?.debug(`Restored active pairing topic is:`,r?.topic),this.signClient&&r?.topic){let e=this.signClient.session.getAll(),t=e.find(e=>e.pairingTopic===r.topic);if(e.length>0&&t){this.initKeplrWCClient(this.signClient,{sessionProperties:t.sessionProperties});return}}this.displayQRCode&&this.setQRState(H.Pending);let i={cosmos:{methods:[`cosmos_getAccounts`,`cosmos_signAmino`,`cosmos_signDirect`,...this.requiredNamespaces?.methods??[]],chains:n,events:[`chainChanged`,`accountsChanged`,...this.requiredNamespaces?.events??[]]}},a;try{this.logger?.debug(`Connecting chains:`,n),a=await this.signClient?.connect({pairingTopic:r?.topic,requiredNamespaces:i,...t}),this.qrUrl.data=a.uri,this.logger?.debug(`Using QR URI:`,a.uri),this.displayQRCode&&this.setQRState(H.Done)}catch(e){this.logger?.error(`Client connect error: `,e),this.displayQRCode&&this.setQRError(e);return}this.redirect&&this.openApp();try{let e=await a.approval();this.logger?.debug(`Established session:`,e),this.sessions.push(e),this.restorePairings(),this.signClient&&this.initKeplrWCClient(this.signClient,{sessionProperties:e.sessionProperties})}catch(e){throw this.logger?.error(`Session approval error: `,e),await this.deleteInactivePairings(),e?e.code==5001?Mn:e:(this.displayQRCode&&this.setQRError(On),Error(`Proposal Expired`))}finally{!r&&this.qrUrl.message!==On.message&&this.setQRState(H.Init)}}async enable(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);await this.keplr.enable(e)}async getSimpleAccount(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);await this.enable(e);let{address:t,username:n}=await this.getAccount(e);return{namespace:`cosmos`,chainId:e,address:t,username:n}}async getAccount(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);let t=await this.keplr.getKey(e);return{username:t.name,address:t.bech32Address,algo:t.algo,pubkey:t.pubKey,isNanoLedger:t.isNanoLedger}}async getOfflineSigner(e,t){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);switch(t){case`amino`:return this.getOfflineSignerAmino(e);case`direct`:return this.getOfflineSignerDirect(e);default:return this.getOfflineSignerAmino(e)}}getOfflineSignerAmino(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return this.keplr.getOfflineSignerOnlyAmino(e)}getOfflineSignerDirect(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return this.keplr.getOfflineSigner(e)}async signAmino(e,t,n,r){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return await this.keplr.signAmino(e,t,n,r)}async signDirect(e,t,n,r){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return await this.keplr.signDirect(e,t,{...n,accountNumber:jh.default.fromString(n.accountNumber?.toString()??`0`)},r)}async signArbitrary(e,t,n){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return await this.keplr.signArbitrary(e,t,n)}},Iv=class extends Ih{constructor(e,t){super(e,t,Fv)}},Lv=[new class extends hv{constructor(e,t){super(e,Iv,Fv),this.preferredEndpoints=t}async initClient(e){try{let t=await xh.Keplr.getKeplr(),n=window.navigator.userAgent;t&&n.includes(`KeplrWalletMobile`)?this.initClientDone(t?new Nh(t):void 0):await super.initClient(e)}catch(t){if(t instanceof Error){if(t.message===`Client Not Exist!`){await super.initClient(e);return}this.initClientError(t)}}}}({name:`keplr-mobile`,prettyName:`Keplr Mobile`,logo:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAB+ASURBVHgB7Z1NbFxVlsfPKzsfTUJc6baZjkTcFTELJLA6ySzQJJGwe9FSmAXxzAJ604QN9GJomgVsoEUi0RtY8NWLhg2kN8NqKlkMGbHARgpILDoYGSQ2KIWNFIQNKZskhNiu1/f/PpxyuapcH/e+e+595yc9XrnKuFKv3jn3fN+AhK4pla8Uq3SjuI0GiiEFxYCCUvpaSGH0OCAaqgVhMX0+CAM8Ltb/nSD6OSi2e68w+p2w7e/wJaiqz1ht/zthNWzyO2EQVtb/Shh8VfeS+pvx362p/xdPrNJqpUg7q5XJvVu8l9BIQMI6EOxrtFIiKhxUgqwEm34FIVY3YCkV8lTABa5AOYQVKBUokUIYQMF8VaCgAoWxmwZnRFHcIpcKoFi+XNpO2w6qG6KkbpJfq5tECXxQcnelFbojUAognKHY8vhUHdODNFj5ZnJvhXKG9woAq/pVWj2oHuK4X33kcRF0oTnriuEDdUwvTo5Mk+d4qQBGyt9iRR9XDx9UH/GgCLzQB9PqOKfciumFyTtmyDO8UQDD5YXxIBb4E+KnCyZQcaAKRQqh9qovysBpBZCY90+qhycoNvEFIRNiZVA7PUDbpl2OHTipANLVXpn5J8W8F2yjlMHbAzRw2kVF4JQCgOCr0/PqGCdBYIaLisAJBfDL8pXSKq2+RSL4ggO4pAhYK4DEx8eK/ycSBMdwQRGwVQAj5757MqyFp8THF1wmDRaqrMHbxBB2CkDMfcFHoAiUNTDBzRooECOw6q/S2ickwi94BmpT1MJ2SQWynydGsLAAZNUX8gQna8C6BSCrvpA3Emvgk+HyN9aD29YsAInwC0IkgK/sosHTtlqUrSgAmPxrtFoOpXxXEKy6BJkrgJHylYMhrU1Jek8QbpGkCyezbjLKNAbwi3OLj4TK9xHhF4SNIC4QUpB5XCAzBTB87rvng1r4NgmC0IaBl7NMFWbiAkD4qVY7RYIgdMqpxcmR02QY4wpAabOXSSL9gtALxpWAUQUwUl58S/k2J0kQhJ5AQ9HC5PCjZAhjMQCY/SL8gtAfkKGR2Io2ghEFID6/IOgjVC60qcCgdhdAhF8QjKE9JqBVAcQ9/LVXSBAEI4SF4OR3Dw6fIU1oUwBxhR+KfIR+2H9bgYa24Qho9LaB6Lk96jGO9PWU9PXGx41/rx/mr9c2Pbe0UlNHWPdzGD1X//vL6rnl5Pn49fhxs78ndEdA4SFdFYNaFEBc2782JfP4WwNBhJDiuFM9TgV9tE7gUyHPA1AEc9fXIsUwn5y/Tp7DIYqiLdVBGjyko3eg7zsu3lBz7RMR/ljIx4YG1Xkgeoxz/DOruSvO8NnSaqQYcIZCwDl9Lu8owZ3ZRYMT/XYRDlKfJC29JcoZEOpjw9vpnqEBulcJOQQ9Tyt4FuC6gqPD2zY8D9diNlEGHy2uKIshVg55Ap2012LZe4r6oK87Nk9BP9yEuCGPqPMxdYiw8wJK4YJSBlAIUAYfqnM+WHtqcfKXPctgz3dxPMZrzdvOPvjkD4/uFIF3lFQhnL98UymFm5GV4Cl9xQN6vqtHyouXfPP7U6E/vm/7JrNTcBtYBO/M/eSrMsBW5hPUAz0pAJ+KfUTo80eqDM5f/smjgGJvrkDXCiCZ4HuJHAf+/MOjO+h3SvjFvM8ncBPeVUrgpS+u+2AV9OQKdH3nu276Y5V/+u7bZLUXNvDO3I3IKnA8eNi1K9CVAhgpf3sypOAtchARfKEToAD+ePEHhy2C7lyBjhWAq9V+qLR77fDtIvhCV8AicNQ1qO6mwQOdFgh1XKKmhP9514QfK/7UxF4RfqFrEBj+x29/Ht1DjlFMCoQ6oiMLwLXAH6ryzty3R0pwBS2gDPnEhapT1oAKCB7oJCDYkYRg9SdHePyunfT+RFGEX9AG7iXXrIFkr80t2dICcGX1Rz4fq76Y+4JJ3r18k/48e9UVa2BCZQWm2/3ClsukC6s/An3i6wtZ8MC+7XT2WDG65xxgS9ltawG4sPrD3z97bEiKeYRMQVzg9x8vu9CF2NYKaKvGuK/+xyNtLMIvZA/iArj3YBFwJgjDE21fb/UC99Ufwv935fMLgm0eUZYAYgNMaVsX0NICWKOVcWIKzP6/Hr6dBIEDKDRLh5cwpHi1drPlzlwtLQCuNf+jkeklaT6OLCWDQGejsV3xANCvk2h54yDRRjArEa5cOkoNWR0I1ZAj7h0+22+mrrDMDmB82MLkyKEWr21mpPztQWxVTMwQ4ecDhPvC4k36fGktGuo5m8zt0w2UwlgyiSmdysRVKeDzT0xV1yckM6NpMLCF3VJ4Mpo6xowXxnaL8Fviw2TUFibsQNiXM+qjx/vgvXG8lDwHRZDOb+BkeuPePHPf7XTiwhJxIwkGTm96vtkvczT/n7n7Nhfrsp0Fqxl65bMW+G6B0GGmw0Pq4JKbf3b2Gr355Y/EiYCCysLk8IHNzzfA0fwfTUoxBbNA6NEFl664roGU3GN3/YxFQRhcAW41As02FNlkPynhHydmwO8XzIDgFVYrV4W+HqTicMAqgMWIjj5bIEV9+L3viROJbG9QAM1spgeJEfgixe/XD4Qdvuq//t939OIX170aow1L5omLVyMBtBWVxz3L0GXdJNubXIDh8gIbZ09Mf72kq/3f1MHVpzcBLAEIY9YxAoapwU1FQRuuiBL+cWKEBP30gNUd1Wrpap8n4QeIa6CfH+csQbryNV4Fa8WrtHqw/olGlThOTIC2tunD+UBq5uNgXKqaCalb8JyK0GeZpz+a1C8woq0CuJ+YwExzOkW94Odni6zOeEO5P4jQZ2mW87Jka+P1PzUqgIPEAIZa0wlE8DsjHfGVVZqO1/1c2LDIrysAdP+pE4t8GzbsEDpHBL97YiWQnWvEyAooFsuXS+kP6wpglVZLxADx/TsHUWb4tSL4vYHrh+AoNgQxDaey5e20bd3Sr3cBxokBEvnvDMysR54768i2jzxx8YdMLAEuC1utrsy/XgH8miyDtMlx5hNWbIOVHoKfx3SeSbAbkOmYAFzboW32i9rCIFiX9fp/jXX///g+HheII/Xm/jyfwhJvwPXFjD+T2QEscA8xiG8VwrCpC2A9AyDBv+bAzBdz3zxQrIgJmKwT4DBDUNmNpfRxpACK5StY/a1aAAj+SepvI3NJpBorv5j72QA34KUvzLXy4h5nYOUWS7HMxwpgsKE80AZHhsX3rwd9+BNTVyS6b4E3ku5IU3BwA67RSgnnSAGEFFj3/8X8j4EvinJV+KOy6tsDmQFTrgCPUeKFaNGPFEBgefqPmP8xmLyDVf8NZtNk8gjiAaZcAQ5uQEjhLRdAWQAlsoiY/zA7b9BvpqoS4WeESVfAthsQhPGiX4j/U7PqAhzfl9/VP07v/aDM/qsk8AMFVyawbfHWCoUhnFML4Fdkkbya/3PRGOkrmZSiCr1halSa7Xt+gwVAFlOATNIimZNG+cXk548JKwBFQTaVQEBBCedU8kpkiXuHBihvoIxXovzuYMoKuIdBc5B1C+BIzsx/pPhM+ZWCOUzM+bdpAaT7fgzGVYD25pfnxf9PW0+lsMdN0C2IugCd7qrtex/VgIWddMPa6g/zPw/+fxrsE+F3G93B2qFkM1RbVJXsF1ZpsESWwI6wvjOXjJ+SYJ/7nDcwM+CoxRqYbTRQtLr8+u7/p5V9Ivx+AAtO93dpc0oQWgAKNvsAOO3sqhsIPzr5JNLvF9gwVSc2s2BIBQ4qE6Bo6xb1NQUIX/HZWV4tvHG/RWfm5oeLNzntZsMKuAGP3/Uz0oXtRXAwbQrIGgRAfAwAQvhR2ssNjFp7YWx3R7+L+QNzMnykKbrHhqWBQFtuIiTQigLw0fznKvxgTxfKVjZjbQ3SubqzOWNDdmJhqAWw9k37Zv5zFn7QzcaYogDao9sKuNPi9bb2zvs9SgEi4Pcs826+bq63DGZtz2dLa6QTW+nwIAyLBVvDQHxxAVyJ9sPX7JQ81Gf0A4KkOrFlcaEl2Jqq7+aG5MpcMkXWhVRfNzeZD9+NSXQH7MYsLoYWYwBuWwCuVfgNSRBQKzq/d5vXu2BjGIjrN5hrwt/L9RYl0J7ZJb2ZABvXOwjX9lr5ll33MWH2u1Te28v1lkBge3S7fXZkwlIMwOUMAPr5s9pXXhe9+PQ+l2nrQHelpC2ZsKQA3FxdMMnHxZHdvUye2SOBwLYsr+hWAHZkwsq7uhhlRg24q5N8erMAJBXYDs0hAKsKIPNSYNcsAJh7/824ym8rejHnJQaQLTaut1oWUAiUfTuwSzcXar8R8Xe5rbcXC2BMYgBt0e0C2AkCBkXJAmwBgn6uD/ToxQKQNGB7ljQvCLbcYgkCtgFBv3ccb4vtx5cXJZAde/KkAFxgLtoc0v3x3f1YW0dlz8bMyI0F4MKqkvr9PtDP3EWpBWiNiby9DdnI/B1dSAFi5fdlkGc/QiypwGyxERy3oAB4WwDw+V0s9mnF0T4tAEkHNsfEEB8bi6NYAHXA73/Ro227+t15Bt+VWAHN2WNAMdooBy5kPRR0D+MVxSfTHzw8uoP65fi+/v+Gj4x6kCGB7GdeCTjEdC8QmP6up/wa0RHF16FEfMRE2s5CKjD7QiCOFoBvpj+A+a8jqmx7H3uumChmy0UMgCO+mf7gsbt2ki6evvs2EjbiS5FU5p+Cm++EbZ99M/1xjR/Q6LvDAhAr4BamNrXJRR0AN55jPs67F84e0x/WESvgFj4VSFmIAfBJA77ooen/jBJUEysJLIDHNO6J5zI+TU3ObSEQAn8+FfwAtPCaXKn/MrZLXAEyt629jS7Z3LoACPz5tHU3/P4z9+0h0+A9fMiB94O4AI6D1d+nwB8EEn5/FkEkmL94rzwrAZ+qI3NZCvxnjwJ/WQp/yv7kPfOoBCD8ptzYXLgAtmMA2NoZqT8fQJXe1MReK+kjvOf76r0fHtVXb+AC93ItZe2R3DV8+zDkA1YUgn2PW47K49/x+uHd0ar40hc/0tKKXxmVZhwd9ktkcmXDwe+HBeAyWHEv/vbn1oW/HvxbpiaKubAGfJuSlCsL4I0v3Qz8YaVFDv4P6uC6YQdcAlgDqENAevX85Z+0755jG8Q8fJuTmBsFgJXflS294j78QTq+b3t0din3DgF5YWxXdOB647pjUxU8XnI87XrEwxmJmSsAWxqUo++Pa4GgKAp47lF+NAZC4LEvqwyUF47UXYESgFWA89fqPHd9LTpcqcY8vs+sIrbxvefCAsBNl5Xvj9UbZjpSOmnTyJ2J6YjHo8k5jyO3Y4VA9MC+zSvpfKIQYCXMJ2coCQQW8RivoXDLphXhYxVkLhSAztUfNwFKQVNBz7tQ62J/F/51qixAvWL4f+VqzBpy86C0fJyP6L0C0F31h9x73nLf3KhXFkdp46psSgEc3+fnHgneL1m+NfwIdvB1kxTvFQDSUYLQDzD/fXXvvFYAMP196/cXssdX8x94rgBk9Rf6A8Fen2M+3iqALFN/gr/4vi+Ctwrgo0U/Ov4Eu/i+L4K3CsDVun+BD+hy9H0EmpcKIC03FYR+4NRxaQovFcB5TwZ+CPZAdWceCr68rAQ0Oe8PmQVYGM1q/qUUOBvmkx6BueSclgLrVPw+dv41wzsFYNr8R2ahXXYh7g/Y3AyEx/uT5/CaKIuNNAo1fm5sBsI5q0nOz+RkIxTvFIDt6P9ycpN2UoAEJQBlgANKAt1yo8nZR3BNUKuPbr/Pl9aix6mwcwKmf14UdOZ3Gr5skxf3/GV3cv+4Fjg+pI3/ZlgRY8lAEEShXVUI6RCW80mXniv7MNha/W0oQu+WGh+KfyAo9a7G/mSzT4wF4z6KG2b6m1/+SH9Th4sbr+Rp9QdeKQAIjI+TaeeTbcxw4AbFRGBuigCC/9zsNec3XMmL75/ilar7bGmNfAcC9pupK9EqywUUXR1+73vnhT9vqz/w6tPmpfUXq+2zarV94uJVqxYP/h1PXPwh2mLdh30W87b6A7EAHAYr7sRU1cr4bbznhLJEfOm45LD625h3mPknTme56QbCn4edaRpBfODEhWyVwFzynr7MWkBtBofV38b9640FYEqxuECqBLK4gXwTfoCa/7wWZnnzqfPe+w+BfOTjH8g0j3y87JXwI5vydA59/5TMFcC8oZX6c+n+i5QgUnGmePGL6951WXIS/lzEAEzh+rZTukCtgAlrCKa/Dzsr14Nhn5w6/iQG0AfS/38LE4IKv983XhjbTXnHQhZAv5bLW/pvK7bqWOyWdy/f9G66MqL+3AJ/Nq6xFxZAHtN/W6HTCuBUdaiDvAf+6slcASwbENY8pwBboasvwsfpymePFYkjtoKAmTp3SwbuJdn8ozk6qvR8m67M0fRPsVBOXS0EFDgf3ZEMQHN0jMjyaXMV7qZ/1goAsu9FHYAPjSgm+CyZuNMPPpn/XE3/lFykAU18yHmJATQFllE/GRKfhJ+z6Z+Si0IgMdezpZ/6CF/Sqxir5kLUPxcWgATssqUfIf7IAwsAfv/rh28nF8hNHYDk7bPjwz6i+D6kV1HtJyPYW2PlyizLpr2Z0c+q4np5Nfx+TFZ2AVuWsVgAOaCXm8t1/98Vvz/FlrVVCCnMvA5AKveyZbaH6iuXlbRLfn+KneB4WM28EhDozttj+y2hNb1cb1ctAIz3Qr7fNb/fhgsQohKQLKC7IxA76Qit6cWXd9UCwMrvYtDP1vW2cqXmRQFkSi/9F587aAG4FPRrJFdBQN2Ve9hcU2jNZzmIATx+106nW3xtVbNaiQHoDgLu2UZCG3oJMLkUqMWq7/p0H2tZgIDCJcoY3ebO2JBogHb0cr1dqdhExP+vjkX8m2ElCBgEFWvREp0fWCq9tqab6+1KvwaEHxF/12NANjMu1iRnVuNkEKR+RAm0pxuf3oXVPxV+H753m/GWQo0KVgaCiBuQLd34mNwDgD4JP7BlAQRh+BViAJYUgN4PfadYAG3pphiIcwDQN+EHNq+3FzEA8ICj+d+s6Kb4iqsL4KPwA5u7WmEmYIUsMKv5Q987NEhCa1wPAvoq/MBiELBqTWpwQ8LX1FXHj0AgOsDyvkloKzAX4MSFzjK+s8zagH0WfihbWzEXDAW1umxC8x0d1velHhEF0BIoXBenMfks/MDmzIUAzUAhhRWyhO4PDwtA8AffhR/YrAGooR3YVhYA6P7wUABSD+AHYyqm47vwA9tzFwsDtGZNAXxoYNcZTts9C70BRX722FAulLnNFOAqrVYKN2inNQWQBgJ18vhdPyPBXdDVB+HPQ4t3vG+DvRhAUcl+oTq51+rWYLqDdmk2QHAP9PO73tXXDbYD1hUl+5GNZasWAJjwgWTrZ7eA0sYkn7x9b5YVQLTwW3eyTERBYQGIFeAGcaR/SMVudlDe+NxuCrCCc6QAbKYCde1j34hYAfyBkp6a2JvLKk74/zYtgLDeAlCpwK/IIiYuhFgBvIG/n5dgXzNs+/8YBoJzpABstQSnmMqFihXAj3hs91Duv5vzl/WnwLuhUKtFdeGpBVAhi7wz9xOZABbAY5IWZENq8otlZqYGphs2WABoCiCLmPSHYGrKxiH2eWFsV26Ke7YC97rtvowC1SkA5QTMkGXOXzZjBcDkfO1wfnLL3ECUf2qiKAVadZiyeLuhlrQARApghbZVyDImLwqGhYgrkD2o6strlL8dts1/sJsGo0U/UgBJNaC3bgCAKyA3YjakuX1U9cmuTRvhYP4rqpWkArjeIauQZUy5AQCuwN/v2xPdnIIZcI0R3ZdAX2s4mP+KdZd/XRpUJuBTsgwujsnpKAhAnVFKQIKC+kkj/LC0ZNVvDqxc2+m/mNr6aKh1SQgpsB4IxAUyrSHhBrwwJvUBuoBFBctKIvxbAwuXx8j1wmYLILTYEFTPO3M3yDSYGfC6ZAb6ot7cd3VH3qx58YvrxITp9MF6VGwbrcyskv0gGZqDECgx7UNCCexRrsAfL151bidc2yC6/8zdu8TU7wIsbFxmMg7SaiV9vOEbHC4vXCHMCbBMOhEmCzCQ4ZGPl7uam59XoDTh44up3z2YyMxkYG11cXJkb/pD4zc5TQzAhcrqYt2bzJ6T7EBrUoUMt0mEv3uyvJ87YEOsr/Hb/ICY8FKG/hJu6n/89udSLNQAVvyL6rpA+CWt1ztPXPyBGLFBxhudfuuZgJRUa2Z54/1lbBeNDQ1EyievLgGCe1CEf1CH+Pj9w8n3T5iu/2HDN1wsXymqAMElYhAHAPuTOvKs8/b4whCxzSIjwQUoWkTzfxcFR0XwdXH4ve9ZKQDl/2/4cjdIVlISzMYKwIV788vshRCKB/4uzF+fTV+s9mjSgYmP43FZ9bWCRYTz6g+a5f3OqWOcmICL+JBalWwE6fYnNe1wReAW+LLtGJTaQ6M76D/27RCBNwRcyJf45P1TzjU+sUkBBBROh8TrpkCaDq6ALaLxYokiQKWia64BVnpkO8TEz44TF6z21jUFsr35uSaMlBcvhRSWiBEwTzFUggMw69DS+YZyTz5jtpNuCqyXB9QKD6HHNlsi9NkBq5Xb6o+pXwuTdxxofL5p6Z/yWs6p2+VJYsQbX/4Y3cwcfHIIF1JkOFJlAMsAygD9DLb+TceGt9O/Dw9GZ8nX2wHNPgxNf6UBCtNNn2725HB5YVydpogZMGXfn9jLumgHbgIUAQadwg/UbSHgGuy/bSBa1e9RKUuY9rLC8wDfN0x/jtuwKwvgkLIAZjY/3wKlBD5Rp4PEDFupwX5ILQNsBImbY1k9Xk4shfrNISHc6eeCQO+JhL0QPQelN6oEXwSdJ8yFv6n5D9p1/yBiyE4BzEcXellF593p608nER0lqabzESh3BKo5Cn/C6VYvtJSgVRp8hSyPCWsFVlR08QkCB1DqyzUYDAZobbrVay0VAIqCVDrwDDHlXRVsgdaVVl7BFlj5f6/uQR5TfpoTBMHb30zuq7R6va0NrXyHs8QYKAG4A9LKK2QNhB8tvpyFHwyEK6fbvd5WASxOjkwTkxbhVsD0QvBFlICQFbjXJqausDb7wVarP+gkinaamDOfRGDfZa6NBfdBmhfCzzjgt85Wqz/oKKekUoKoCRgnB8DEGtkUVDDBc7PXooI0F8Dqv3Bi+NEtf4864JflyyWVFbhEjhA38ciUH0EPMPkRcOZu8tczSKsHtjL/QUcSgj+kMgKvkiPAPPu3977nWZIpOAMCfbiHcC+5JPyd+P7rv0sdwm1YSKfAGoBbgLp9QegU+PrI77vg69eDqj+V95/QrgCAigX8SZ1eJgeJh3zcLrPthLa4PvtBKYBHFybveLvz3+8SlwKCzYACeHh0h1gEwgZ8GPrSrua/9f/TJUlAEI1CTrkCjaSuwfF9O6ImHCF/xFvR3Vhv5XadTgN/9fR057vsCjSC7joMzoBVIO5BPsAqjwq+/1HCv2xpfoN2arXTi//1L6eoS3pe+lx3BZoBq+Do8HZRBh7ipdAn9GL63/p/e8QXV6AVqTJIpxCJm+AWMO8h9BjM4qPQ11FVpv+hbk3/lL7uap9cga2AEkBf/xEMCBWFwI56gYc/78sE5w54anFy5BXqkb7v4l+UF19RJgir+YFZAGWASsMjiWLAIUohGyDsEHIcny+t0YXFm87l63UQhOGrC/95x5+oD/q+Y5MCIcQD2E0PyhoEFMcSZQAXIlUK6UQgoTsg1LNKyOeTUWo4xz9L5yf8/l107VBl8kBfQ3u0LFm+xwN0sD+Z6YfjzmjOXzzcE2c8l6cpvkvJTEQMc0GdPc4Q6q+v16IZiensRKE53Vb7tf9bmhgpf3swpOATEvoiHQIaDwiNh4SmA0LT10H6Oyn1A0Ub/14/tBLE+mGm9Y/T328cfLqUCLwIdv+0mvDb29/SiFICJ5USeIsEQTBFX0G/RrTanUkNMvsBIoLgJCj20Sj8wEjYWqUHT6nT8yQIgh56rPTbCmN5q7ymBwVBO4aEHxhNXI/877dvh0HwCAmC0BMq139G5fpPkiGM5p6Sf7jEBAShB5JCn5NkEOPJZxW0OEWiBAShO5TZ32+VXydkVrsqgUFB6BCDPn8jmRav56l5SBB6IaTw0e+6GOnVL5l3r6BiUJ3KIQUlEgQhpaqyZhO6Kvw6JfMCdHxA1DGjnpkEQUBp7wx6+rMWfmClAwVNDCu07ZBLew0IggkQ6d9F17Q09vT0/mSZJC6A4KB0Egp5Am282kt7u4XFBAu0E6/RwJTEBYScMK1M/kdtrfr1sBphI6lCwXNYrPr1sJthJdaA4ClsVv162A6xw2wBdXpeFIHgOOxW/XrYzqHCbIEkXXiGBMFBEOHfTVcPcBV+4MQY28QtOKWsAeksFFyApbnfDKfmWIsiEJgzTbG5P02O4OQge1EEAiNQwntG3YtnXRL8FKd3skgUwThJsFDIGCU4MyHROeXjv9LvbH6beLOVTdJkhKrC+0UZCCYIKKgQ1c65uto3w8u9rJI9CsbVwwfJsx2MhUzByo4GnXPKzJ+20axjmlxsZjdcXhinWBHcT/EWZtJ3IDSjqiRimkL6QD2eUeb9jMvmfSfkcjfLZCuzEkEpBPRr9YVDIYhiyA8Q6koYhDNBGHyqrMXKGq3MVB1I2+lGtrOto1S+VLxKu+E+FJXJV8JRC2hI3SQlipVDehaYEvvp0WQdCHilENISBFw9r4S+NrOLrlV8X9W7QRRAD0BRVGlncTC2IggKo6AUg7rpoBzWFYS6AX+VPk6USCNK0QRtFUrj33SMaix4rVGfD69v/J2AqsnzEYkQV+OXYgFP/l8l2GF1hdaqRbpRFcHunn8Cz9Ea2bs7Ut4AAAAASUVORK5CYII=`,mode:`wallet-connect`,mobileDisabled:!1,rejectMessage:{source:`Request rejected`},downloads:[{device:`mobile`,os:`android`,link:`https://play.google.com/store/apps/details?id=com.chainapsis.keplr&hl=en&gl=US&pli=1`},{device:`mobile`,os:`ios`,link:`https://apps.apple.com/us/app/keplr-wallet/id1567851089`},{link:`https://www.keplr.app/download`}],connectEventNamesOnWindow:[`keplr_keystorechange`],supportedChains:`agoric.akash.axelar.bitcanna.bitsong.bostrom.certik.cheqd.chihuahua.comdex.cosmoshub.cryptoorgchain.desmos.dig.emoney.evmos.gravitybridge.injective.irisnet.ixo.juno.ki.likecoin.lumnetwork.osmosis.panacea.persistence.regen.secretnetwork.sentinel.sifchain.sommelier.stargaze.starname.terra.tick.umee.vidulum`.split(`.`),walletconnect:{name:`Keplr`,projectId:`6adb6082c909901b9e7189af3a4a0223102cd6f8d5c39e39f3d49acb92b578bb`,encoding:`base64`,requiredNamespaces:{methods:[`keplr_getKey`,`keplr_signAmino`,`keplr_signDirect`,`keplr_signArbitrary`,`keplr_enable`,`keplr_signEthereum`],events:[`keplr_accountsChanged`]},mobile:{native:{ios:`keplrwallet:`,android:`intent:`}},formatNativeUrl:(e,t,n,r)=>{let i=e.split(`:`)[0],a=encodeURIComponent(t);switch(n){case`ios`:return`${i}://wcV2?${a}`;case`android`:return`intent://wcV2?${a}#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`;default:return`${i}://wcV2?${a}`}}}},Fh)],Rv=[...Ph,...Lv],zv=class extends Gr{constructor(e,t){super(e,t)}},Bv=class{client;_defaultSignOptions={preferNoSetFee:!1,preferNoSetMemo:!0,disableBalanceCheck:!0};get defaultSignOptions(){return this._defaultSignOptions}setDefaultSignOptions(e){this._defaultSignOptions=e}constructor(e){this.client=e}async enable(e){await this.client.enable(e)}async suggestToken({chainId:e,tokens:t,type:n}){if(n===`cw20`)for(let{contractAddress:n}of t)await this.client.suggestCW20Token(e,n)}async addChain(e){let t=Ah(e.chain,e.assetList?[e.assetList]:[]);e.preferredEndpoints?.rest?.[0]&&(t.rest=e.preferredEndpoints?.rest?.[0]),e.preferredEndpoints?.rpc?.[0]&&(t.rpc=e.preferredEndpoints?.rpc?.[0]),await this.client.experimentalSuggestChain(t)}async disconnect(){await this.client.disconnect()}async getSimpleAccount(e){let{address:t,username:n}=await this.getAccount(e);return{namespace:`cosmos`,chainId:e,address:t,username:n}}async getAccount(e){let t=await this.client.getKey(e);return{username:t.name,address:t.bech32Address,algo:t.algo,pubkey:t.pubKey,isNanoLedger:t.isNanoLedger}}getOfflineSigner(e,t){switch(t){case`amino`:return this.getOfflineSignerAmino(e);case`direct`:return this.getOfflineSignerDirect(e);default:return this.getOfflineSignerAmino(e)}}getOfflineSignerAmino(e){return this.client.getOfflineSignerOnlyAmino(e)}getOfflineSignerDirect(e){return this.client.getOfflineSigner(e)}async signAmino(e,t,n,r){return await this.client.signAmino(e,t,n,r||this.defaultSignOptions)}async signArbitrary(e,t,n){return await this.client.signArbitrary(e,t,n)}async signDirect(e,t,n,r){return await this.client.signDirect(e,t,{...n,accountNumber:jh.default.fromString(n.accountNumber.toString())},r||this.defaultSignOptions)}async sendTx(e,t,n){return await this.client.sendTx(e,t,n)}},Vv=async()=>{if(typeof window>`u`)return;let e=window.leap;if(e)return e;if(document.readyState===`complete`){if(e)return e;throw jn}return new Promise((t,n)=>{let r=i=>{i.target&&i.target.readyState===`complete`&&(e?t(e):n(jn.message),document.removeEventListener(`readystatechange`,r))};document.addEventListener(`readystatechange`,r)})},Hv=[new class extends qr{constructor(e){super(e,zv)}async initClient(){this.initingClient();try{let e=await Vv();this.initClientDone(e?new Bv(e):void 0)}catch(e){this.initClientError(e)}}}({name:`leap-extension`,prettyName:`Leap`,logo:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTY2IiBoZWlnaHQ9IjE2NiIgdmlld0JveD0iMCAwIDE2NiAxNjYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF83ODBfNjEwKSI+CjxyZWN0IHdpZHRoPSIxNjYiIGhlaWdodD0iMTY2IiBmaWxsPSIjQzVGRkNFIi8+CjxwYXRoIGQ9Ik0xMzguNjE0IDEwMC40NDVDMTM4LjYxNCAxMjAuMjE3IDExNC40ODMgMTI4LjI1MiA4NC41MjE2IDEyOC4yNTJDNTQuNTYwMyAxMjguMjUyIDMwLjA3ODQgMTIwLjIxNyAzMC4wNzg0IDEwMC40NDVDMzAuMDc4NCA4MC42NzI0IDU0LjM4NDYgNjQuNjczIDg0LjM0NiA2NC42NzNDMTE0LjMwNyA2NC42NzMgMTM4LjYxNCA4MC43MDc0IDEzOC42MTQgMTAwLjQ0NVoiIGZpbGw9IiMyNEE5NUEiLz4KPHBhdGggZD0iTTEzMy4xMDMgNTcuMzQ3MkMxMzMuMTAzIDQ2LjkzNyAxMjQuNjAzIDM4LjQ4MzIgMTE0LjEzNiAzOC40ODMyQzEwOC42OTMgMzguNDgzMiAxMDMuNzg3IDQwLjc3MTkgMTAwLjMzIDQ0LjQxNzFDOTkuNzk0NCA0NC45ODE4IDk5LjAxMTggNDUuMjU2OSA5OC4yNDkgNDUuMTAyOUM5My44NjkgNDQuMjE4NSA4OS4yMzU1IDQzLjcyMzIgODQuNDU1NSA0My43MjMyQzc5LjY3NiA0My43MjMyIDc1LjA0MyA0NC4xODkzIDcwLjY2MzQgNDUuMDk1QzY5Ljg5OTggNDUuMjUyOSA2OS4xMTM4IDQ0Ljk4MjMgNjguNTc1IDQ0LjQxODZDNjUuMDkgNDAuNzcyNSA2MC4xODY3IDM4LjQ4MzIgNTQuNzc1MiAzOC40ODMyQzQ0LjMwOCAzOC40ODMyIDM1LjgwNzkgNDYuOTM3IDM1LjgwNzkgNTcuMzQ3MkMzNS44MDc5IDYwLjM4MzQgMzYuNTI2MiA2My4yMjczIDM3Ljc5MTMgNjUuNzU3QzM4LjA5NDMgNjYuMzYyOCAzOC4xMjQ4IDY3LjA3MjEgMzcuODYyNyA2Ny42OTY2QzM2LjYzNTMgNzAuNjIxMiAzNS45ODM1IDczLjcwOTEgMzUuOTgzNSA3Ni45MDk4QzM1Ljk4MzUgOTUuMjQ5OCA1Ny42OTA1IDExMC4wOTYgODQuNDU1NSAxMTAuMDk2QzExMS4yMjEgMTEwLjA5NiAxMzIuOTI4IDk1LjI0OTggMTMyLjkyOCA3Ni45MDk4QzEzMi45MjggNzMuNzA5MSAxMzIuMjc2IDcwLjYyMTIgMTMxLjA0OCA2Ny42OTY2QzEzMC43ODYgNjcuMDcyMSAxMzAuODE3IDY2LjM2MjggMTMxLjEyIDY1Ljc1N0MxMzIuMzg1IDYzLjIyNzMgMTMzLjEwMyA2MC4zODM0IDEzMy4xMDMgNTcuMzQ3MloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjIyNzEgNjcuODExOUM1OS42Mjg3IDY3LjgxMTkgNjQuODE4MyA2Mi42NTA2IDY0LjgxODMgNTYuMjgzOUM2NC44MTgzIDQ5LjkxNzEgNTkuNjI4NyA0NC43NTU5IDUzLjIyNzEgNDQuNzU1OUM0Ni44MjU1IDQ0Ljc1NTkgNDEuNjM2IDQ5LjkxNzEgNDEuNjM2IDU2LjI4MzlDNDEuNjM2IDYyLjY1MDYgNDYuODI1NSA2Ny44MTE5IDUzLjIyNzEgNjcuODExOVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMTUuMDY1IDY3LjgxMTlDMTIxLjQ2NiA2Ny44MTE5IDEyNi42NTYgNjIuNjUwNiAxMjYuNjU2IDU2LjI4MzlDMTI2LjY1NiA0OS45MTcxIDEyMS40NjYgNDQuNzU1OSAxMTUuMDY1IDQ0Ljc1NTlDMTA4LjY2MyA0NC43NTU5IDEwMy40NzQgNDkuOTE3MSAxMDMuNDc0IDU2LjI4MzlDMTAzLjQ3NCA2Mi42NTA2IDEwOC42NjMgNjcuODExOSAxMTUuMDY1IDY3LjgxMTlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNDcuMDc1OSAxMjYuODI5QzQ5LjU2OTggMTI2LjgyOSA1MS41MzY4IDEyNC42NjMgNTEuMjU1OCAxMjIuMjE4QzUwLjIzNzIgMTEzLjU1NCA0NS45MTY4IDk0Ljc5NSAyNi45MTQ0IDgzLjUxMTVDNi4wODM2OCA3MS4xMzg3IDE1Ljk5NDEgMTA0LjAzNCAyMC4xMzY1IDExNi4wMTlDMjAuOTc0NCAxMTguNDQzIDIwLjAwMjcgMTIxLjEzNSAxNy43NzgzIDEyMi40MTFMMTYuNDEyMSAxMjMuMTk2QzE0LjY1NTkgMTI0LjIwOSAxNS4zOTM1IDEyNi44MjkgMTcuMzk1NiAxMjYuODI5SDQ3LjA3NTlaIiBmaWxsPSIjMzJEQTZEIi8+CjxwYXRoIGQ9Ik0xMjIuNTY2IDEyNi44MjlDMTIwLjMxOCAxMjYuODI5IDExOC41NjIgMTI0LjY2MyAxMTguODA4IDEyMi4yMThDMTE5LjY4NiAxMTMuNTg5IDEyMy42MiA5NC43OTUgMTQwLjc2MSA4My41MTE1QzE1OS43NDEgNzEuMDQyNiAxNTAuNTAzIDEwNC41NDcgMTQ2LjgxNSAxMTYuMjk0QzE0Ni4wOTIgMTE4LjU5OCAxNDYuOTgyIDEyMS4xMDYgMTQ5LjAyMiAxMjIuMzk5TDE1MC4yOCAxMjMuMTk2QzE1MS44NiAxMjQuMjA5IDE1MS4xOTMgMTI2LjgyOSAxNDkuNDAyIDEyNi44MjlIMTIyLjU2NloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjI0MjggNjMuMTc4N0M1Ny4wNjE3IDYzLjE3ODcgNjAuMTU3NiA2MC4wODI4IDYwLjE1NzYgNTYuMjYzOUM2MC4xNTc2IDUyLjQ0NSA1Ny4wNjE3IDQ5LjM0OTEgNTMuMjQyOCA0OS4zNDkxQzQ5LjQyMzkgNDkuMzQ5MSA0Ni4zMjggNTIuNDQ1IDQ2LjMyOCA1Ni4yNjM5QzQ2LjMyOCA2MC4wODI4IDQ5LjQyMzkgNjMuMTc4NyA1My4yNDI4IDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik0xMTUuMDgxIDYzLjE3ODdDMTE4LjkgNjMuMTc4NyAxMjEuOTk1IDYwLjA4MjggMTIxLjk5NSA1Ni4yNjM5QzEyMS45OTUgNTIuNDQ1IDExOC45IDQ5LjM0OTEgMTE1LjA4MSA0OS4zNDkxQzExMS4yNjIgNDkuMzQ5MSAxMDguMTY2IDUyLjQ0NSAxMDguMTY2IDU2LjI2MzlDMTA4LjE2NiA2MC4wODI4IDExMS4yNjIgNjMuMTc4NyAxMTUuMDgxIDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik05OS43OTk1IDgzLjAxNzZDMTAxLjUxNCA4My4xNjUxIDEwMi44MSA4NC42ODYyIDEwMi4zNzggODYuMzUxOEMxMDIuMDI5IDg3LjY5NzkgMTAxLjUyOSA4OS4wMDM5IDEwMC44ODYgOTAuMjQ0MkM5OS43NjMgOTIuNDA5IDk4LjIyNDYgOTQuMzMxNSA5Ni4zNTg2IDk1LjkwMThDOTQuNDkyNyA5Ny40NzIyIDkyLjMzNTcgOTguNjU5NiA5MC4wMTA4IDk5LjM5NjNDODcuNjg2IDEwMC4xMzMgODUuMjM4OCAxMDAuNDA1IDgyLjgwOSAxMDAuMTk2QzgwLjM3OTEgOTkuOTg2NiA3OC4wMTQzIDk5LjMwMSA3NS44NDk0IDk4LjE3OEM3My42ODQ2IDk3LjA1NTEgNzEuNzYyMSA5NS41MTY3IDcwLjE5MTcgOTMuNjUwN0M2OC42MjE0IDkxLjc4NDggNjcuNDM0IDg5LjYyNzggNjYuNjk3MiA4Ny4zMDI5QzY2LjE3MDEgODUuNjM5NiA2NS44ODExIDgzLjkxMzUgNjUuODM1OSA4Mi4xNzYxQzY1LjgwNiA4MS4wMjk0IDY2LjgyNDQgODAuMTgwOCA2Ny45NjczIDgwLjI3OTFMODQuNDAwNyA4MS42OTI4TDk5Ljc5OTUgODMuMDE3NloiIGZpbGw9IiMwOTI1MTEiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83ODBfNjEwIj4KPHJlY3Qgd2lkdGg9IjE2NiIgaGVpZ2h0PSIxNjYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==`,mode:`extension`,mobileDisabled:()=>!(`leap`in window||/LeapCosmos/i.test(navigator.userAgent)),rejectMessage:{source:`Request rejected`},connectEventNamesOnWindow:[`leap_keystorechange`],downloads:[{device:`desktop`,browser:`chrome`,link:`https://chrome.google.com/webstore/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg`},{link:`https://chrome.google.com/webstore/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg`}]})],Uv=class extends Gr{constructor(e,t){super(e,t)}},Wv=a((e=>{s(),Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultSnapOrigin=void 0,e.defaultSnapOrigin=o.env.SNAP_ORIGIN??`npm:@leapwallet/metamask-cosmos-snap`})),Gv=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={"eightball-1":{chainId:`eightball-1`,chainName:`8ball`,bech32Config:{bech32PrefixAccAddr:`8ball`},bip44:{coinType:118},denom:`uebl`,decimals:6},"agoric-3":{chainId:`agoric-3`,chainName:`agoric`,bech32Config:{bech32PrefixAccAddr:`agoric`},bip44:{coinType:564},denom:`ubld`,decimals:6},"akashnet-2":{chainId:`akashnet-2`,chainName:`akash`,bech32Config:{bech32PrefixAccAddr:`akash`},bip44:{coinType:118},denom:`uakt`,decimals:6},"archway-1":{chainId:`archway-1`,chainName:`archway`,bech32Config:{bech32PrefixAccAddr:`archway`},bip44:{coinType:118},denom:`aarch`,decimals:18},arkh:{chainId:`arkh`,chainName:`arkh`,bech32Config:{bech32PrefixAccAddr:`arkh`},bip44:{coinType:118},denom:`arkh`,decimals:6},"xstaxy-1":{chainId:`xstaxy-1`,chainName:`aura`,bech32Config:{bech32PrefixAccAddr:`aura`},bip44:{coinType:118},denom:`uaura`,decimals:6},"axelar-dojo-1":{chainId:`axelar-dojo-1`,chainName:`axelar`,bech32Config:{bech32PrefixAccAddr:`axelar`},bip44:{coinType:118},denom:`uaxl`,decimals:6},"laozi-mainnet":{chainId:`laozi-mainnet`,chainName:`bandchain`,bech32Config:{bech32PrefixAccAddr:`band`},bip44:{coinType:494},denom:`uband`,decimals:6},"beezee-1":{chainId:`beezee-1`,chainName:`beezee`,bech32Config:{bech32PrefixAccAddr:`bze`},bip44:{coinType:118},denom:`ubze`,decimals:6},"bitcanna-1":{chainId:`bitcanna-1`,chainName:`bitcanna`,bech32Config:{bech32PrefixAccAddr:`bcna`},bip44:{coinType:118},denom:`ubcna`,decimals:6},"bitsong-2b":{chainId:`bitsong-2b`,chainName:`bitsong`,bech32Config:{bech32PrefixAccAddr:`bitsong`},bip44:{coinType:639},denom:`ubtsg`,decimals:6},"bluzelle-9":{chainId:`bluzelle-9`,chainName:`bluzelle`,bech32Config:{bech32PrefixAccAddr:`bluzelle`},bip44:{coinType:483},denom:`ubnt`,decimals:6},bostrom:{chainId:`bostrom`,chainName:`bostrom`,bech32Config:{bech32PrefixAccAddr:`bostrom`},bip44:{coinType:118},denom:`boot`,decimals:0},"carbon-1":{chainId:`carbon-1`,chainName:`carbon`,bech32Config:{bech32PrefixAccAddr:`swth`},bip44:{coinType:118},denom:`swth`,decimals:8},"perun-1":{chainId:`perun-1`,chainName:`chain4energy`,bech32Config:{bech32PrefixAccAddr:`c4e`},bip44:{coinType:4444},denom:`uc4e`,decimals:6},celestia:{chainId:`celestia`,chainName:`Celestia`,bech32Config:{bech32PrefixAccAddr:`celestia`},bip44:{coinType:118},denom:`utia`,decimals:6},"cheqd-mainnet-1":{chainId:`cheqd-mainnet-1`,chainName:`cheqd`,bech32Config:{bech32PrefixAccAddr:`cheqd`},bip44:{coinType:118},denom:`ncheq`,decimals:9},"comdex-1":{chainId:`comdex-1`,chainName:`comdex`,bech32Config:{bech32PrefixAccAddr:`comdex`},bip44:{coinType:118},denom:`ucmdx`,decimals:6},"commercio-3":{chainId:`commercio-3`,chainName:`commercionetwork`,bech32Config:{bech32PrefixAccAddr:`did:com:`},bip44:{coinType:701},denom:`ucommercio`,decimals:6},"centauri-1":{chainId:`centauri-1`,chainName:`composable`,bech32Config:{bech32PrefixAccAddr:`centauri`},bip44:{coinType:118},denom:`ppica`,decimals:12},"coreum-mainnet-1":{chainId:`coreum-mainnet-1`,chainName:`coreum`,bech32Config:{bech32PrefixAccAddr:`core`},bip44:{coinType:990},denom:`ucore`,decimals:6},"cosmoshub-4":{chainId:`cosmoshub-4`,chainName:`cosmoshub`,bech32Config:{bech32PrefixAccAddr:`cosmos`},bip44:{coinType:118},denom:`uatom`,decimals:6},"crescent-1":{chainId:`crescent-1`,chainName:`crescent`,bech32Config:{bech32PrefixAccAddr:`cre`},bip44:{coinType:118},denom:`ucre`,decimals:6},"crypto-org-chain-mainnet-1":{chainId:`crypto-org-chain-mainnet-1`,chainName:`cryptoorgchain`,bech32Config:{bech32PrefixAccAddr:`cro`},bip44:{coinType:394},denom:`basecro`,decimals:8},"cudos-1":{chainId:`cudos-1`,chainName:`cudos`,bech32Config:{bech32PrefixAccAddr:`cudos`},bip44:{coinType:118},denom:`acudos`,decimals:18},"mainnet-3":{chainId:`mainnet-3`,chainName:`decentr`,bech32Config:{bech32PrefixAccAddr:`decentr`},bip44:{coinType:118},denom:`udec`,decimals:6},"morocco-1":{chainId:`morocco-1`,chainName:`terpnetwork`,bech32Config:{bech32PrefixAccAddr:`terp`},bip44:{coinType:118},denom:`uterp`,decimals:6},"desmos-mainnet":{chainId:`desmos-mainnet`,chainName:`desmos`,bech32Config:{bech32PrefixAccAddr:`desmos`},bip44:{coinType:852},denom:`udsm`,decimals:6},"dig-1":{chainId:`dig-1`,chainName:`dig`,bech32Config:{bech32PrefixAccAddr:`dig`},bip44:{coinType:118},denom:`udig`,decimals:6},dydx:{chainId:`dydx-mainnet-1`,chainName:`dYdX Protocol`,bech32Config:{bech32PrefixAccAddr:`dydx`},bip44:{coinType:118},denom:`DYDX`,decimals:18},"dyson-mainnet-01":{chainId:`dyson-mainnet-01`,chainName:`dyson`,bech32Config:{bech32PrefixAccAddr:`dys`},bip44:{coinType:118},denom:`dys`,decimals:0},"emoney-3":{chainId:`emoney-3`,chainName:`emoney`,bech32Config:{bech32PrefixAccAddr:`emoney`},bip44:{coinType:118},denom:`ungm`,decimals:6},"empowerchain-1":{chainId:`empowerchain-1`,chainName:`empowerchain`,bech32Config:{bech32PrefixAccAddr:`empower`},bip44:{coinType:118},denom:`umpwr`,decimals:6},"fetchhub-4":{chainId:`fetchhub-4`,chainName:`fetchhub`,bech32Config:{bech32PrefixAccAddr:`fetch`},bip44:{coinType:118},denom:`afet`,decimals:18},"colosseum-1":{chainId:`colosseum-1`,chainName:`firmachain`,bech32Config:{bech32PrefixAccAddr:`firma`},bip44:{coinType:7777777},denom:`ufct`,decimals:6},"galaxy-1":{chainId:`galaxy-1`,chainName:`galaxy`,bech32Config:{bech32PrefixAccAddr:`galaxy`},bip44:{coinType:118},denom:`uglx`,decimals:6},"genesis_29-2":{chainId:`genesis_29-2`,chainName:`genesisl1`,bech32Config:{bech32PrefixAccAddr:`genesis`},bip44:{coinType:118},denom:`el1`,decimals:18},gitopia:{chainId:`gitopia`,chainName:`gitopia`,bech32Config:{bech32PrefixAccAddr:`gitopia`},bip44:{coinType:118},denom:`ulore`,decimals:6},"gravity-bridge-3":{chainId:`gravity-bridge-3`,chainName:`gravitybridge`,bech32Config:{bech32PrefixAccAddr:`gravity`},bip44:{coinType:118},denom:`ugraviton`,decimals:6},Antora:{chainId:`Antora`,chainName:`idep`,bech32Config:{bech32PrefixAccAddr:`idep`},bip44:{coinType:118},denom:`idep`,decimals:6},"ixo-5":{chainId:`ixo-5`,chainName:`impacthub`,bech32Config:{bech32PrefixAccAddr:`ixo`},bip44:{coinType:118},denom:`uixo`,decimals:6},"irishub-1":{chainId:`irishub-1`,chainName:`irisnet`,bech32Config:{bech32PrefixAccAddr:`iaa`},bip44:{coinType:118},denom:`uiris`,decimals:6},"jackal-1":{chainId:`jackal-1`,chainName:`jackal`,bech32Config:{bech32PrefixAccAddr:`jkl`},bip44:{coinType:118},denom:`ujkl`,decimals:6},"juno-1":{chainId:`juno-1`,chainName:`juno`,bech32Config:{bech32PrefixAccAddr:`juno`},bip44:{coinType:118},denom:`ujuno`,decimals:6},"kava_2222-10":{chainId:`kava_2222-10`,chainName:`kava`,bech32Config:{bech32PrefixAccAddr:`kava`},bip44:{coinType:459},denom:`ukava`,decimals:6},"kichain-2":{chainId:`kichain-2`,chainName:`kichain`,bech32Config:{bech32PrefixAccAddr:`ki`},bip44:{coinType:118},denom:`uxki`,decimals:6},"kaiyo-1":{chainId:`kaiyo-1`,chainName:`kujira`,bech32Config:{bech32PrefixAccAddr:`kujira`},bip44:{coinType:118},denom:`ukuji`,decimals:6},"kyve-1":{chainId:`kyve-1`,chainName:`kyve`,bech32Config:{bech32PrefixAccAddr:`kyve`},bip44:{coinType:118},denom:`ukyve`,decimals:6},"likecoin-mainnet-2":{chainId:`likecoin-mainnet-2`,chainName:`likecoin`,bech32Config:{bech32PrefixAccAddr:`like`},bip44:{coinType:118},denom:`nanolike`,decimals:9},"loyal-main-02":{chainId:`loyal-main-02`,chainName:`loyal`,bech32Config:{bech32PrefixAccAddr:`loyal`},bip44:{coinType:118},denom:`ulyl`,decimals:6},LumenX:{chainId:`LumenX`,chainName:`lumenx`,bech32Config:{bech32PrefixAccAddr:`lumen`},bip44:{coinType:118},denom:`ulumen`,decimals:6},"lum-network-1":{chainId:`lum-network-1`,chainName:`lumnetwork`,bech32Config:{bech32PrefixAccAddr:`lum`},bip44:{coinType:880},denom:`ulum`,decimals:6},"mars-1":{chainId:`mars-1`,chainName:`mars`,bech32Config:{bech32PrefixAccAddr:`mars`},bip44:{coinType:118},denom:`umars`,decimals:6},"mayachain-mainnet-v1":{chainId:`mayachain-mainnet-v1`,chainName:`mayachain`,bech32Config:{bech32PrefixAccAddr:`maya`},bip44:{coinType:931},denom:`cacao`,decimals:10},"meme-1":{chainId:`meme-1`,chainName:`meme`,bech32Config:{bech32PrefixAccAddr:`meme`},bip44:{coinType:118},denom:`umeme`,decimals:6},"migaloo-1":{chainId:`migaloo-1`,chainName:`migaloo`,bech32Config:{bech32PrefixAccAddr:`migaloo`},bip44:{coinType:118},denom:`uwhale`,decimals:6},mainnet:{chainId:`mainnet`,chainName:`mises`,bech32Config:{bech32PrefixAccAddr:`mises`},bip44:{coinType:118},denom:`umis`,decimals:6},"mun-1":{chainId:`mun-1`,chainName:`mun`,bech32Config:{bech32PrefixAccAddr:`mun`},bip44:{coinType:118},denom:`umun`,decimals:6},"neutron-1":{chainId:`neutron-1`,chainName:`neutron`,bech32Config:{bech32PrefixAccAddr:`neutron`},bip44:{coinType:118},denom:`untrn`,decimals:6},"noble-1":{chainId:`noble-1`,chainName:`noble`,bech32Config:{bech32PrefixAccAddr:`noble`},bip44:{coinType:118},denom:`ustake`,decimals:6},"nois-1":{chainId:`nois-1`,chainName:`nois`,bech32Config:{bech32PrefixAccAddr:`nois`},bip44:{coinType:118},denom:`unois`,decimals:6},"pirin-1":{chainId:`pirin-1`,chainName:`nolus`,bech32Config:{bech32PrefixAccAddr:`nolus`},bip44:{coinType:118},denom:`unls`,decimals:6},nyx:{chainId:`nyx`,chainName:`nyx`,bech32Config:{bech32PrefixAccAddr:`n`},bip44:{coinType:118},denom:`unyx`,decimals:6},octa:{chainId:`octa`,chainName:`octa`,bech32Config:{bech32PrefixAccAddr:`octa`},bip44:{coinType:118},denom:`uocta`,decimals:6},"odin-mainnet-freya":{chainId:`odin-mainnet-freya`,chainName:`odin`,bech32Config:{bech32PrefixAccAddr:`odin`},bip44:{coinType:118},denom:`loki`,decimals:6},"omniflixhub-1":{chainId:`omniflixhub-1`,chainName:`omniflixhub`,bech32Config:{bech32PrefixAccAddr:`omniflix`},bip44:{coinType:118},denom:`uflix`,decimals:6},"onomy-mainnet-1":{chainId:`onomy-mainnet-1`,chainName:`onomy`,bech32Config:{bech32PrefixAccAddr:`onomy`},bip44:{coinType:118},denom:`anom`,decimals:18},Oraichain:{chainId:`Oraichain`,chainName:`oraichain`,bech32Config:{bech32PrefixAccAddr:`orai`},bip44:{coinType:118},denom:`orai`,decimals:6},"osmosis-1":{chainId:`osmosis-1`,chainName:`osmosis`,bech32Config:{bech32PrefixAccAddr:`osmo`},bip44:{coinType:118},denom:`uosmo`,decimals:6},"panacea-3":{chainId:`panacea-3`,chainName:`panacea`,bech32Config:{bech32PrefixAccAddr:`panacea`},bip44:{coinType:371},denom:`umed`,decimals:6},"passage-2":{chainId:`passage-2`,chainName:`passage`,bech32Config:{bech32PrefixAccAddr:`pasg`},bip44:{coinType:118},denom:`upasg`,decimals:6},"passage-1":{chainId:`passage-1`,chainName:`passage1`,bech32Config:{bech32PrefixAccAddr:`pasg`},bip44:{coinType:118},denom:`upasg`,decimals:6},"core-1":{chainId:`core-1`,chainName:`persistence`,bech32Config:{bech32PrefixAccAddr:`persistence`},bip44:{coinType:118},denom:`uxprt`,decimals:6},"pio-mainnet-1":{chainId:`pio-mainnet-1`,chainName:`provenance`,bech32Config:{bech32PrefixAccAddr:`pb`},bip44:{coinType:505},denom:`nhash`,decimals:9},"quasar-1":{chainId:`quasar-1`,chainName:`quasar`,bech32Config:{bech32PrefixAccAddr:`quasar`},bip44:{coinType:118},denom:`uqsr`,decimals:6},"quicksilver-2":{chainId:`quicksilver-2`,chainName:`quicksilver`,bech32Config:{bech32PrefixAccAddr:`quick`},bip44:{coinType:118},denom:`uqck`,decimals:6},"qwoyn-1":{chainId:`qwoyn-1`,chainName:`qwoyn`,bech32Config:{bech32PrefixAccAddr:`qwoyn`},bip44:{coinType:118},denom:`uqwoyn`,decimals:6},"reb_1111-1":{chainId:`reb_1111-1`,chainName:`rebus`,bech32Config:{bech32PrefixAccAddr:`rebus`},bip44:{coinType:118},denom:`arebus`,decimals:18},"regen-1":{chainId:`regen-1`,chainName:`regen`,bech32Config:{bech32PrefixAccAddr:`regen`},bip44:{coinType:118},denom:`uregen`,decimals:6},"titan-1":{chainId:`titan-1`,chainName:`rizon`,bech32Config:{bech32PrefixAccAddr:`rizon`},bip44:{coinType:118},denom:`uatolo`,decimals:6},"secret-4":{chainId:`secret-4`,chainName:`secretnetwork`,bech32Config:{bech32PrefixAccAddr:`secret`},bip44:{coinType:529},denom:`uscrt`,decimals:6},"pacific-1":{chainId:`pacific-1`,chainName:`sei`,bech32Config:{bech32PrefixAccAddr:`sei`},bip44:{coinType:118},denom:`usei`,decimals:6},"sentinelhub-2":{chainId:`sentinelhub-2`,chainName:`sentinel`,bech32Config:{bech32PrefixAccAddr:`sent`},bip44:{coinType:118},denom:`udvpn`,decimals:6},"ShareRing-VoyagerNet":{chainId:`ShareRing-VoyagerNet`,chainName:`shareledger`,bech32Config:{bech32PrefixAccAddr:`shareledger`},bip44:{coinType:118},denom:`nshr`,decimals:9},"shentu-2.2":{chainId:`shentu-2.2`,chainName:`shentu`,bech32Config:{bech32PrefixAccAddr:`certik`},bip44:{coinType:118},denom:`uctk`,decimals:6},"sommelier-3":{chainId:`sommelier-3`,chainName:`sommelier`,bech32Config:{bech32PrefixAccAddr:`somm`},bip44:{coinType:118},denom:`usomm`,decimals:6},"stafihub-1":{chainId:`stafihub-1`,chainName:`stafihub`,bech32Config:{bech32PrefixAccAddr:`stafi`},bip44:{coinType:118},denom:`ufis`,decimals:6},"stargaze-1":{chainId:`stargaze-1`,chainName:`stargaze`,bech32Config:{bech32PrefixAccAddr:`stars`},bip44:{coinType:118},denom:`ustars`,decimals:6},"iov-mainnet-ibc":{chainId:`iov-mainnet-ibc`,chainName:`starname`,bech32Config:{bech32PrefixAccAddr:`star`},bip44:{coinType:234},denom:`uiov`,decimals:6},"stride-1":{chainId:`stride-1`,chainName:`stride`,bech32Config:{bech32PrefixAccAddr:`stride`},bip44:{coinType:118},denom:`ustrd`,decimals:6},"teritori-1":{chainId:`teritori-1`,chainName:`teritori`,bech32Config:{bech32PrefixAccAddr:`tori`},bip44:{coinType:118},denom:`utori`,decimals:6},"columbus-5":{chainId:`columbus-5`,chainName:`terra`,bech32Config:{bech32PrefixAccAddr:`terra`},bip44:{coinType:330},denom:`uluna`,decimals:6},"phoenix-1":{chainId:`phoenix-1`,chainName:`terra2`,bech32Config:{bech32PrefixAccAddr:`terra`},bip44:{coinType:330},denom:`uluna`,decimals:6},"tgrade-mainnet-1":{chainId:`tgrade-mainnet-1`,chainName:`tgrade`,bech32Config:{bech32PrefixAccAddr:`tgrade`},bip44:{coinType:118},denom:`utgd`,decimals:6},"umee-1":{chainId:`umee-1`,chainName:`umee`,bech32Config:{bech32PrefixAccAddr:`umee`},bip44:{coinType:118},denom:`uumee`,decimals:6},"FUND-MainNet-2":{chainId:`FUND-MainNet-2`,chainName:`unification`,bech32Config:{bech32PrefixAccAddr:`und`},bip44:{coinType:5555},denom:`nund`,decimals:9},"ununifi-beta-v1":{chainId:`ununifi-beta-v1`,chainName:`ununifi`,bech32Config:{bech32PrefixAccAddr:`ununifi`},bip44:{coinType:118},denom:`uguu`,decimals:6},"vidulum-1":{chainId:`vidulum-1`,chainName:`vidulum`,bech32Config:{bech32PrefixAccAddr:`vdl`},bip44:{coinType:370},denom:`uvdl`,decimals:6},"vota-ash":{chainId:`vota-ash`,chainName:`doravota`,bech32Config:{bech32PrefixAccAddr:`dora`},bip44:{coinType:118},denom:`peaka`,decimals:18}}})),Kv=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.toSmall=e.getGasPriceForChainName=void 0;var n=t(Nn()),r=6;e.getGasPriceForChainName=async(e,t=`average`)=>{let n=await fetch(`https://assets.leapwallet.io/cosmos-registry/v1/gas/gas-prices.json`);if(!n.ok)throw Error(`Failed to get Gas price ${n.status}`);return(await n.json())?.[e]?.[t]};function i(e,t=r){return new n.default(e).times(10**t).toFixed().toString()}e.toSmall=i})),qv=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.experimentalSuggestChain=e.suggestChain=e.isLocalSnap=e.getKey=e.requestSignAmino=e.requestSignature=e.getSnap=e.connectSnap=e.getSnaps=void 0;var n=t(Nn()),r=t(Nv()),i=Wv(),a=t(Gv()),o=Kv(),s=async()=>{let e=!1;if(`detected`in window.ethereum)for(let t of window.ethereum.detected)try{return await t.request({method:`wallet_getSnaps`}),window.ethereum.setProvider(t),e=!0,t}catch{}if(!e&&`providers`in window.ethereum)for(let t of window.ethereum.providers)try{return await t.request({method:`wallet_getSnaps`}),window.ethereum=t,e=!0,t}catch{}return window.ethereum},c=async(e,t)=>(await s()).request({method:`wallet_invokeSnap`,params:{snapId:i.defaultSnapOrigin,request:{method:e,params:t}}});e.getSnaps=async()=>await(await s()).request({method:`wallet_getSnaps`}),e.connectSnap=async(e=i.defaultSnapOrigin,t={})=>(await s()).request({method:`wallet_requestSnaps`,params:{[e]:t}}),e.getSnap=async t=>{try{let n=await(0,e.getSnaps)();return Object.values(n).find(e=>e.id===i.defaultSnapOrigin&&(!t||e.version===t))}catch{return}},e.requestSignature=async(e,t,n)=>{let i=await c(`signDirect`,{chainId:e,signerAddress:t,signDoc:Object.assign(Object.assign({},n),{accountNumber:r.default.fromString(n.accountNumber.toString(),!0)})});return{signature:i.signature,signed:Object.assign(Object.assign({},i.signed),{accountNumber:n.accountNumber.toString(),authInfoBytes:new Uint8Array(Object.values(i.signed.authInfoBytes)),bodyBytes:new Uint8Array(Object.values(i.signed.bodyBytes))})}},e.requestSignAmino=async(e,t,r,i)=>{let{isADR36:s=!1,enableExtraEntropy:l=!1}=i||{};if(!s&&e!==r.chain_id)throw Error(`Chain ID does not match signer chain ID`);let u=a.default[e];if(!i?.preferNoSetFee&&u&&u.denom){let e=await(0,o.getGasPriceForChainName)(u.chainName),t=`gasLimit`in r.fee?r.fee.gasLimit:r.fee.gas;if(e){let i=[{amount:new n.default(e).multipliedBy(new n.default(t)).decimalPlaces(0,1).toString(),denom:u.denom}];r.fee.amount=i}}return await c(`signAmino`,{chainId:e,signerAddress:t,signDoc:r,isADR36:s,enableExtraEntropy:l})},e.getKey=async e=>{let t=await c(`getKey`,{chainId:e});if(!t)throw Error(`No account data found`);return t.pubkey=Uint8Array.from(Object.values(t.pubkey)),t},e.isLocalSnap=e=>e.startsWith(`local:`),e.suggestChain=async(e,t)=>t&&t.force?await c(`suggestChain`,{chainInfo:e}):(await c(`getSupportedChains`,{})||{})[e.chainId]?Promise.resolve({message:`Chain already added successfully`,chainInfo:e}):await c(`suggestChain`,{chainInfo:e}),e.experimentalSuggestChain=e.suggestChain})),Jv=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Yv=a((e=>{x(),Object.defineProperty(e,`__esModule`,{value:!0}),e.signArbitrary=e.getOfflineSigner=e.CosmjsOfflineSigner=void 0;var t=qv(),n=class{constructor(e){this.chainId=e}async getAccounts(){let e=await(0,t.getKey)(this.chainId);return[{address:e.address,algo:`secp256k1`,pubkey:e.pubkey}]}async signDirect(e,n){if(this.chainId!==n.chainId)throw Error(`Chain ID does not match signer chain ID`);if((await this.getAccounts()).find(t=>t.address!==e))throw Error(`Signer address does not match wallet address`);return(0,t.requestSignature)(this.chainId,e,n)}async signAmino(e,n,r){if(this.chainId!==n.chain_id)throw Error(`Chain ID does not match signer chain ID`);if((await this.getAccounts()).find(t=>t.address!==e))throw Error(`Signer address does not match wallet address`);return(0,t.requestSignAmino)(this.chainId,e,n,r)}};e.CosmjsOfflineSigner=n;function r(e){return new n(e)}e.getOfflineSigner=r;async function i(e,n,r,i){let{signDoc:o}=a(n,r);return(await(0,t.requestSignAmino)(e,n,o,{isADR36:!0,preferNoSetFee:!0,enableExtraEntropy:i?.enableExtraEntropy})).signature}e.signArbitrary=i;function a(e,t){let n=!1,r=``;return typeof t==`string`?(r=C.from(t).toString(`base64`),n=!0):r=C.from(t).toString(`base64`),{signDoc:{chain_id:``,account_number:`0`,sequence:`0`,fee:{gas:`0`,amount:[]},msgs:[{type:`sign/MsgSignData`,value:{signer:e,b64Data:r}}],memo:``},isADR36WithString:n}}})),Xv=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(qv(),e),n(Jv(),e),n(Yv(),e)}))(),Zv=class{snapInstalled=!1;_defaultSignOptions={preferNoSetFee:!1,preferNoSetMemo:!0,disableBalanceCheck:!0};get defaultSignOptions(){return this._defaultSignOptions}setDefaultSignOptions(e){this._defaultSignOptions=e}constructor(){this.snapInstalled=localStorage.getItem(`snapInstalled`)===`true`}async getSimpleAccount(e){let{address:t,username:n}=await this.getAccount(e);return{namespace:`cosmos`,chainId:e,address:t,username:n}}async handleConnect(){await(0,Xv.getSnap)()||await(0,Xv.connectSnap)()}async getAccount(e){await this.handleConnect();let t=await(0,Xv.getKey)(e);return{username:t?.address,address:t.address,algo:t.algo,pubkey:t.pubkey}}getOfflineSigner(e,t){switch(t){case`amino`:return this.getOfflineSignerAmino(e);case`direct`:return this.getOfflineSignerDirect(e);default:return this.getOfflineSignerAmino(e)}}getOfflineSignerAmino(e){return new Xv.CosmjsOfflineSigner(e)}getOfflineSignerDirect(e){return{getAccounts:async()=>[await this.getAccount(e)],signDirect:(t,n)=>this.signDirect(e,t,n)}}async signAmino(e,t,n,r){return(0,Xv.requestSignAmino)(e,t,n)}async signDirect(e,t,n){let r=jh.default.fromString(n.accountNumber.toString()),i=await(0,Xv.requestSignature)(e,t,{...n,accountNumber:r}),a=new jh.default(r.low,r.high,r.unsigned);return{signature:i.signature,signed:{...i.signed,accountNumber:BigInt(a.toString()),authInfoBytes:new Uint8Array(Object.values(i.signed.authInfoBytes)),bodyBytes:new Uint8Array(Object.values(i.signed.bodyBytes))}}}async signArbitrary(e,t,n){return await(0,Xv.signArbitrary)(e,t,n)}async addChain(e){await(0,Xv.experimentalSuggestChain)({chainId:e?.chain?.chain_id,chainName:e?.chain?.chain_name,bip44:{coinType:e?.chain?.slip44},bech32Config:{bech32PrefixAccAddr:e?.chain?.bech32_prefix}},{})}},Qv=async()=>{if(typeof window>`u`)return!1;let e=window.ethereum;if(e?.isMetaMask)return!0;if(document.readyState===`complete`){if(e?.isMetaMask)return!0;throw jn}return new Promise((t,n)=>{let r=i=>{i.target&&i.target.readyState===`complete`&&(e?.isMetaMask?t(!0):n(jn.message),document.removeEventListener(`readystatechange`,r))};document.addEventListener(`readystatechange`,r)})},$v=[new class extends qr{constructor(e){super(e,Uv)}async initClient(){this.initingClient();try{let e=await Qv();this.initClientDone(e?new Zv:void 0)}catch(e){this.initClientError(e)}}}({name:`leap-metamask-cosmos-snap`,description:`The Leap Cosmos MetaMask Snap allows signing of Cosmos transactions using MetaMask.`,prettyName:`Leap Cosmos MetaMask`,logo:{major:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEwIiBoZWlnaHQ9IjIxMCIgdmlld0JveD0iMCAwIDIxMCAyMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNzguMzQ0IDE0Ljk2NDhMMTE0LjkzOSA2My41NTU4TDEyNi42NjQgMzQuODg3OEwxNzguMzQ0IDE0Ljk2NDhaIiBmaWxsPSIjRTI3NjFCIiBzdHJva2U9IiNFMjc2MUIiIHN0cm9rZS13aWR0aD0iMC42MzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMzEuOTcxOCAxNC45NjQ4TDk0Ljg2NjggNjQuMDE2OEw4My43MTQ4IDM0Ljg4NzhMMzEuOTcxOCAxNC45NjQ4Wk0xNTUuNTMxIDEyNy42TDEzOC42NDQgMTU0LjI5NkwxNzQuNzc1IDE2NC41NTNMMTg1LjE2MiAxMjguMTkyTDE1NS41MzEgMTI3LjZaTTI1LjI4MDggMTI4LjE5MkwzNS42MDM4IDE2NC41NTNMNzEuNzM0OCAxNTQuMjk2TDU0Ljg0OTggMTI3LjZMMjUuMjgwOCAxMjguMTkyWiIgZmlsbD0iI0U0NzYxQiIgc3Ryb2tlPSIjRTQ3NjFCIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTY5LjY5NjkgODIuNDkxNEw1OS42Mjk5IDk4LjIwNjRMOTUuNTA1OSA5OS44NTA0TDk0LjIzMTkgNjAuMDcwNEw2OS42OTY5IDgyLjQ5MTRaTTE0MC42MjEgODIuNDkxNEwxMTUuNzY5IDU5LjYwOTRMMTE0Ljk0IDk5Ljg1MDRMMTUwLjc1MyA5OC4yMDY0TDE0MC42MjEgODIuNDkxNFpNNzEuNzM1OSAxNTQuMjk0TDkzLjI3NDkgMTQzLjQ0NEw3NC42NjY5IDEyOC40NTNMNzEuNzM1OSAxNTQuMjk0Wk0xMTcuMDQzIDE0My40NDRMMTM4LjY0NSAxNTQuMjk0TDEzNS42NSAxMjguNDUzTDExNy4wNDMgMTQzLjQ0NFoiIGZpbGw9IiNFNDc2MUIiIHN0cm9rZT0iI0U0NzYxQiIgc3Ryb2tlLXdpZHRoPSIwLjYzOSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMzguNjQzIDE1NC4yOTVMMTE3LjA0MSAxNDMuNDQ1TDExOC43NjIgMTU3Ljk3N0wxMTguNTcxIDE2NC4wOTJMMTM4LjY0MyAxNTQuMjk1Wk03MS43MzM5IDE1NC4yOTVMOTEuODA2OSAxNjQuMDkyTDkxLjY3OTkgMTU3Ljk3N0w5My4yNzI5IDE0My40NDVMNzEuNzMzOSAxNTQuMjk1WiIgZmlsbD0iI0Q3QzFCMyIgc3Ryb2tlPSIjRDdDMUIzIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTkyLjEyNTggMTE4Ljg1NUw3NC4xNTU4IDExMy4zOThMODYuODM2OCAxMDcuNDE0TDkyLjEyNTggMTE4Ljg1NVpNMTE4LjE4OSAxMTguODU1TDEyMy40NzggMTA3LjQxNEwxMzYuMjIyIDExMy4zOThMMTE4LjE4OSAxMTguODU1WiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3IiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTcxLjczNjEgMTU0LjI5NEw3NC43OTUxIDEyNy41OTlMNTQuODUwMSAxMjguMTlMNzEuNzM2MSAxNTQuMjk0Wk0xMzUuNTg3IDEyNy41OTlMMTM4LjY0NSAxNTQuMjk0TDE1NS41MzIgMTI4LjE5TDEzNS41ODcgMTI3LjU5OVpNMTUwLjc1MyA5OC4yMDdMMTE0Ljk0IDk5Ljg1MUwxMTguMjU0IDExOC44NTNMMTIzLjU0MyAxMDcuNDEyTDEzNi4yODggMTEzLjM5NkwxNTAuNzUzIDk4LjIwN1pNNzQuMTU4MSAxMTMuMzk2TDg2LjkwMjEgMTA3LjQxMkw5Mi4xMjcxIDExOC44NTNMOTUuNTA1MSA5OS44NTFMNTkuNjI5MSA5OC4yMDdMNzQuMTU4MSAxMTMuMzk2WiIgZmlsbD0iI0NENjExNiIgc3Ryb2tlPSIjQ0Q2MTE2IiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTU5LjYyODkgOTguMjEwOUw3NC42Njc5IDEyOC40NTdMNzQuMTU3OSAxMTMuNEw1OS42Mjc5IDk4LjIxMDlINTkuNjI4OVpNMTM2LjI4OCAxMTMuNEwxMzUuNjUgMTI4LjQ1N0wxNTAuNzUzIDk4LjIxMDlMMTM2LjI4OCAxMTMuNFpNOTUuNTA0OSA5OS44NTQ5TDkyLjEyNzkgMTE4Ljg1N0w5Ni4zMzI5IDE0MS4yNzlMOTcuMjg4OSAxMTEuNzU2TDk1LjUwNDkgOTkuODU0OVpNMTE0Ljk0IDk5Ljg1NDlMMTEzLjIyIDExMS42OUwxMTMuOTg1IDE0MS4yNzlMMTE4LjI1NCAxMTguODU3TDExNC45NCA5OS44NTQ5WiIgZmlsbD0iI0U0NzUxRiIgc3Ryb2tlPSIjRTQ3NTFGIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTExOC4yNTMgMTE4Ljg1M0wxMTMuOTgzIDE0MS4yNzVMMTE3LjA0MiAxNDMuNDQ1TDEzNS42NDkgMTI4LjQ1M0wxMzYuMjg2IDExMy4zOTVMMTE4LjI1MyAxMTguODUzWk03NC4xNTU4IDExMy4zOTVMNzQuNjY1OCAxMjguNDUzTDkzLjI3MjggMTQzLjQ0NUw5Ni4zMzE4IDE0MS4yNzVMOTIuMTI1OCAxMTguODUzTDc0LjE1NTggMTEzLjM5NVoiIGZpbGw9IiNGNjg1MUIiIHN0cm9rZT0iI0Y2ODUxQiIgc3Ryb2tlLXdpZHRoPSIwLjYzOSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMTguNTcxIDE2NC4wOTRMMTE4Ljc2MiAxNTcuOTc5TDExNy4xNjkgMTU2LjUzMkg5My4xNDQ5TDkxLjY3OTkgMTU3Ljk3OUw5MS44MDY5IDE2NC4wOTRMNzEuNzMzOSAxNTQuMjk3TDc4Ljc0MzkgMTYwLjIxNUw5Mi45NTM5IDE3MC40MDZIMTE3LjM2TDEzMS42MzQgMTYwLjIxNUwxMzguNjQzIDE1NC4yOTdMMTE4LjU3MSAxNjQuMDk0WiIgZmlsbD0iI0MwQUQ5RSIgc3Ryb2tlPSIjQzBBRDlFIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTExNy4wNDEgMTQzLjQ0N0wxMTMuOTgzIDE0MS4yNzdIOTYuMzMyMkw5My4yNzIyIDE0My40NDdMOTEuNjgwMiAxNTcuOTc5TDkzLjE0NTIgMTU2LjUzMkgxMTcuMTY5TDExOC43NjIgMTU3Ljk3OUwxMTcuMDQxIDE0My40NDdaIiBmaWxsPSIjMTYxNjE2IiBzdHJva2U9IiMxNjE2MTYiIHN0cm9rZS13aWR0aD0iMC42MzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTgxLjAyIDY2LjcxMjhMMTg2LjQzNyAzOS44ODQ4TDE3OC4zNDQgMTQuOTY0OEwxMTcuMDQzIDYxLjkxMThMMTQwLjYyIDgyLjQ5MjhMMTczLjk0NyA5Mi41NTI4TDE4MS4zMzkgODMuNjc2OEwxNzguMTUzIDgxLjMwOThMMTgzLjI1MSA3Ni41MDk4TDE3OS4zIDczLjM1MzhMMTg0LjM5OCA2OS4zNDI4TDE4MS4wMiA2Ni43MTI4Wk0yMy45NDI5IDM5Ljg4NDhMMjkuMzU5OSA2Ni43MTI4TDI1LjkxODkgNjkuMzQyOEwzMS4wMTY5IDczLjM1MjhMMjcuMTI5OSA3Ni41MDk4TDMyLjIyNjkgODEuMzA5OEwyOS4wNDA5IDgzLjY3NjhMMzYuMzY4OSA5Mi41NTI4TDY5LjY5NTkgODIuNDkyOEw5My4yNzM5IDYxLjkxMjhMMzEuOTcxOSAxNC45NjQ4TDIzLjk0MjkgMzkuODg0OFoiIGZpbGw9IiM3NjNEMTYiIHN0cm9rZT0iIzc2M0QxNiIgc3Ryb2tlLXdpZHRoPSIwLjYzOSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xNzMuOTQ3IDkyLjU1MTdMMTQwLjYyIDgyLjQ5MTdMMTUwLjc1MiA5OC4yMDY3TDEzNS42NDkgMTI4LjQ1M0wxNTUuNTMxIDEyOC4xOUgxODUuMTYyTDE3My45NDcgOTIuNTUxN1pNNjkuNjk2OCA4Mi40OTE3TDM2LjM2ODggOTIuNTUxN0wyNS4yODA4IDEyOC4xOUg1NC44NDk4TDc0LjY2NzggMTI4LjQ1M0w1OS42Mjc4IDk4LjIwNjdMNjkuNjk2OCA4Mi40OTE3Wk0xMTQuOTM5IDk5Ljg1MDdMMTE3LjA0MiA2MS45MTA3TDEyNi43MjggMzQuODg2N0g4My43MTQ4TDkzLjI3MzggNjEuOTEwN0w5NS41MDM4IDk5Ljg1MDdMOTYuMjY4OCAxMTEuODE4TDk2LjMzMTggMTQxLjI3NUgxMTMuOTg0TDExNC4xMTEgMTExLjgxOEwxMTQuOTM5IDk5Ljg1MDdaIiBmaWxsPSIjRjY4NTFCIiBzdHJva2U9IiNGNjg1MUIiIHN0cm9rZS13aWR0aD0iMC42MzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K`,minor:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQzIiBoZWlnaHQ9IjM0MyIgdmlld0JveD0iMCAwIDM0MyAzNDMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNzEuNzUgMzQyLjc1QzI2Ni4xOTEgMzQyLjc1IDM0Mi43NSAyNjYuMTkxIDM0Mi43NSAxNzEuNzVDMzQyLjc1IDc3LjMwOTMgMjY2LjE5MSAwLjc1IDE3MS43NSAwLjc1Qzc3LjMwOTMgMC43NSAwLjc1IDc3LjMwOTMgMC43NSAxNzEuNzVDMC43NSAyNjYuMTkxIDc3LjMwOTMgMzQyLjc1IDE3MS43NSAzNDIuNzVaIiBmaWxsPSIjMDUzMzE4Ii8+CjxwYXRoIGQ9Ik0yNjUuNjU0IDIwMC42NjlDMjY1LjY1NCAyMzQuMjM3IDIyNC42OSAyNDcuODgyIDE3My44MjYgMjQ3Ljg4MkMxMjIuOTYyIDI0Ny44ODIgODEuMzk4NCAyMzQuMjM3IDgxLjM5ODQgMjAwLjY2OUM4MS4zOTg0IDE2Ny4xMDEgMTIyLjY2MiAxMzkuOTM4IDE3My41MjYgMTM5LjkzOEMyMjQuMzkgMTM5LjkzOCAyNjUuNjU0IDE2Ny4xNjEgMjY1LjY1NCAyMDAuNjY5WiIgZmlsbD0iIzI0QTk1QSIvPgo8cGF0aCBkPSJNMjU2LjMxNSAxMjcuNTA4QzI1Ni4zMTUgMTA5LjgzNiAyNDEuODg3IDk1LjQ4NDQgMjI0LjExNSA5NS40ODQ0QzIxNC44NzUgOTUuNDg0NCAyMDYuNTUxIDk5LjM2ODQgMjAwLjY4MyAxMDUuNTUyQzIwMC4yNCAxMDYuMDMyIDE5OS42ODIgMTA2LjM5MSAxOTkuMDYyIDEwNi41OTVDMTk4LjQ0MiAxMDYuOCAxOTcuNzggMTA2Ljg0MyAxOTcuMTM5IDEwNi43MkMxODkuNDMyIDEwNS4xNjYgMTgxLjU4OSAxMDQuMzgyIDE3My43MjcgMTA0LjM4QzE2NS44NjUgMTA0LjM1OCAxNTguMDIyIDEwNS4xMzggMTUwLjMxOSAxMDYuNzA4QzE0OS42NzcgMTA2LjgzMyAxNDkuMDE1IDEwNi43OTMgMTQ4LjM5NCAxMDYuNTkyQzE0Ny43NzIgMTA2LjM5IDE0Ny4yMTIgMTA2LjAzNCAxNDYuNzY3IDEwNS41NTZDMTQzLjc0OCAxMDIuMzc5IDE0MC4xMTUgOTkuODQ4IDEzNi4wODggOTguMTE2N0MxMzIuMDYyIDk2LjM4NTQgMTI3LjcyNSA5NS40ODk4IDEyMy4zNDMgOTUuNDg0NEMxMDUuNTcxIDk1LjQ4NDQgOTEuMTQyNiAxMDkuODM2IDkxLjE0MjYgMTI3LjUwOEM5MS4xMzQ4IDEzMi40NjQgOTIuMjg2OCAxMzcuMzUzIDk0LjUwNjYgMTQxLjc4NEM5NC43NjM2IDE0Mi4yOTMgOTQuOTA3NSAxNDIuODUyIDk0LjkyODIgMTQzLjQyMUM5NC45NDg5IDE0My45OTEgOTQuODQ2IDE0NC41NTggOTQuNjI2NiAxNDUuMDg0QzkyLjUzMDIgMTUwLjAzMyA5MS40NDYyIDE1NS4zNSA5MS40Mzg2IDE2MC43MjRDOTEuNDM4NiAxOTEuODYgMTI4LjI5MSAyMTcuMDY4IDE3My43MjcgMjE3LjA2OEMyMTkuMTY3IDIxNy4wNjggMjU2LjAxOSAxOTEuODYgMjU2LjAxOSAxNjAuNzI0QzI1Ni4wMTEgMTU1LjM1IDI1NC45MjcgMTUwLjAzMyAyNTIuODMxIDE0NS4wODRDMjUyLjYxMSAxNDQuNTU4IDI1Mi41MDggMTQzLjk5MSAyNTIuNTI5IDE0My40MjFDMjUyLjU1IDE0Mi44NTIgMjUyLjY5NCAxNDIuMjkzIDI1Mi45NTEgMTQxLjc4NEMyNTUuMTY5IDEzNy4zNTMgMjU2LjMyMSAxMzIuNDY0IDI1Ni4zMTUgMTI3LjUwOFoiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTEyMC43MjcgMTQ1LjI2OUMxMzEuNTk1IDE0NS4yNjkgMTQwLjQwMyAxMzYuNTA1IDE0MC40MDMgMTI1LjY5N0MxNDAuNDAzIDExNC44ODUgMTMxLjU5NSAxMDYuMTI1IDEyMC43MjcgMTA2LjEyNUMxMDkuODU5IDEwNi4xMjUgMTAxLjA0NyAxMTQuODg1IDEwMS4wNDcgMTI1LjY5N0MxMDEuMDQ3IDEzNi41MDUgMTA5Ljg1OSAxNDUuMjY5IDEyMC43MjcgMTQ1LjI2OVpNMjI1LjY5NSAxNDUuMjY5QzIzNi41NjMgMTQ1LjI2OSAyNDUuMzcxIDEzNi41MDUgMjQ1LjM3MSAxMjUuNjk3QzI0NS4zNzEgMTE0Ljg4NSAyMzYuNTYzIDEwNi4xMjUgMjI1LjY5NSAxMDYuMTI1QzIxNC44MjcgMTA2LjEyNSAyMDYuMDE1IDExNC44ODUgMjA2LjAxNSAxMjUuNjk3QzIwNi4wMTUgMTM2LjUwNSAyMTQuODI3IDE0NS4yNjkgMjI1LjY5NSAxNDUuMjY5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTExMC4yODEgMjQ1LjQ1N0MxMTQuNTE3IDI0NS40NTcgMTE3Ljg1NyAyNDEuNzc3IDExNy4zNzcgMjM3LjYyNUMxMTUuNjQ5IDIyMi45MTcgMTA4LjMxMyAxOTEuMDY5IDc2LjA1NzQgMTcxLjkxM0M0MC43MDE0IDE1MC45MTMgNTcuNTA5NCAyMDYuNzI1IDY0LjU0MTQgMjI3LjA4NUM2NS4yNDM5IDIyOS4wODIgNjUuMjI3NSAyMzEuMjYxIDY0LjQ5NTEgMjMzLjI0N0M2My43NjI3IDIzNS4yMzQgNjIuMzYwMiAyMzYuOTAyIDYwLjUyOTUgMjM3Ljk2NUw1OC4yMjU0IDIzOS4yODlDNTUuMjQ1NCAyNDEuMDA5IDU2LjQ5NzQgMjQ1LjQ1NyA1OS44OTc0IDI0NS40NTdIMTEwLjI4MVpNMjM4LjQxNyAyNDUuNDU3QzIzNC42MDEgMjQ1LjQ1NyAyMzEuNjIxIDI0MS43NzcgMjMyLjAzNyAyMzcuNjI1QzIzMy41MjkgMjIyLjk3NyAyNDAuMjA5IDE5MS4wNjkgMjY5LjMwNSAxNzEuOTEzQzMwMS41MjEgMTUwLjc0OSAyODUuODUzIDIwNy41OTcgMjc5LjU4OSAyMjcuNTUzQzI3OC45ODIgMjI5LjQ1NyAyNzkuMDIxIDIzMS41MDggMjc5LjcwMSAyMzMuMzg3QzI4MC4zOCAyMzUuMjY3IDI4MS42NjEgMjM2Ljg2OSAyODMuMzQ1IDIzNy45NDVMMjg1LjQ2NSAyMzkuMjg5QzI4OC4xNDkgMjQxLjAwOSAyODcuMDE3IDI0NS40NTcgMjgzLjk3NyAyNDUuNDU3SDIzOC40MTdaIiBmaWxsPSIjMzJEQTZEIi8+CjxwYXRoIGQ9Ik0xMjAuNzIyIDEzNy40MDJDMTIzLjgzNiAxMzcuNDAyIDEyNi44MjIgMTM2LjE2NSAxMjkuMDI0IDEzMy45NjNDMTMxLjIyNiAxMzEuNzYyIDEzMi40NjIgMTI4Ljc3NiAxMzIuNDYyIDEyNS42NjJDMTMyLjQ2MiAxMjIuNTQ4IDEzMS4yMjYgMTE5LjU2MiAxMjkuMDI0IDExNy4zNkMxMjYuODIyIDExNS4xNTkgMTIzLjgzNiAxMTMuOTIyIDEyMC43MjIgMTEzLjkyMkMxMTcuNjA5IDExMy45MjIgMTE0LjYyMyAxMTUuMTU5IDExMi40MjEgMTE3LjM2QzExMC4yMTkgMTE5LjU2MiAxMDguOTgyIDEyMi41NDggMTA4Ljk4MiAxMjUuNjYyQzEwOC45ODIgMTI4Ljc3NiAxMTAuMjE5IDEzMS43NjIgMTEyLjQyMSAxMzMuOTYzQzExNC42MjMgMTM2LjE2NSAxMTcuNjA5IDEzNy40MDIgMTIwLjcyMiAxMzcuNDAyWk0yMjUuNjk0IDEzNy40MDJDMjI3LjIzNiAxMzcuNDAyIDIyOC43NjMgMTM3LjA5OCAyMzAuMTg3IDEzNi41MDdDMjMxLjYxMSAxMzUuOTE3IDIzMi45MDUgMTM1LjA1MiAyMzMuOTk1IDEzMy45NjJDMjM1LjA4NSAxMzIuODcyIDIzNS45NSAxMzEuNTc3IDIzNi41NCAxMzAuMTUzQzIzNy4xMjkgMTI4LjcyOCAyMzcuNDMzIDEyNy4yMDIgMjM3LjQzMiAxMjUuNjZDMjM3LjQzMiAxMjQuMTE4IDIzNy4xMjggMTIyLjU5MiAyMzYuNTM4IDEyMS4xNjdDMjM1Ljk0OCAxMTkuNzQzIDIzNS4wODMgMTE4LjQ0OSAyMzMuOTkyIDExNy4zNTlDMjMyLjkwMiAxMTYuMjY5IDIzMS42MDggMTE1LjQwNSAyMzAuMTgzIDExNC44MTVDMjI4Ljc1OSAxMTQuMjI1IDIyNy4yMzIgMTEzLjkyMiAyMjUuNjkgMTEzLjkyMkMyMjIuNTc3IDExMy45MjIgMjE5LjU5MSAxMTUuMTYgMjE3LjM5IDExNy4zNjJDMjE1LjE4OCAxMTkuNTY0IDIxMy45NTIgMTIyLjU1IDIxMy45NTIgMTI1LjY2NEMyMTMuOTUzIDEyOC43NzggMjE1LjE5IDEzMS43NjMgMjE3LjM5MiAxMzMuOTY1QzIxOS41OTQgMTM2LjE2NiAyMjIuNTgxIDEzNy40MDIgMjI1LjY5NCAxMzcuNDAyWk0xOTkuMzQ2IDE3MC40OTRDMjAyLjI2MiAxNzAuNzQ2IDIwNC40NyAxNzMuMzM0IDIwMy43MzQgMTc2LjE3QzIwMi4wOTMgMTgyLjUyMSAxOTguNTEyIDE4OC4yMDIgMTkzLjQ5IDE5Mi40MjJDMTg3LjA3NiAxOTcuODE0IDE3OC43ODQgMjAwLjQ0MiAxNzAuNDM0IDE5OS43M0MxNjQuMjA2IDE5OS4xOTUgMTU4LjI3NyAxOTYuODI0IDE1My4zOTcgMTkyLjkxOEMxNDguNTE2IDE4OS4wMTIgMTQ0LjkwNSAxODMuNzQ2IDE0My4wMTggMTc3Ljc4NkMxNDIuMTIgMTc0Ljk2MiAxNDEuNjI2IDE3Mi4wMjUgMTQxLjU1IDE2OS4wNjJDMTQxLjQ5OCAxNjcuMTEgMTQzLjIzNCAxNjUuNjY2IDE0NS4xNzggMTY1LjgzNEwxNzMuMTQyIDE2OC4yNDJMMTk5LjM0NiAxNzAuNDk0WiIgZmlsbD0iIzA5MjUxMSIvPgo8L3N2Zz4K`},mode:`extension`,extends:`MetaMask`,mobileDisabled:()=>!(`ethereum`in window),rejectMessage:{source:`Request rejected`},downloads:[{device:`desktop`,browser:`chrome`,link:`https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn`},{link:`https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn`}]})],ey=class extends mv{constructor(e){super(e)}},ty=class extends Ih{constructor(e,t){super(e,t,ey)}},ny=[new class extends hv{constructor(e,t){super(e,ty,ey),this.preferredEndpoints=t}}({name:`leap-cosmos-mobile`,prettyName:`Leap Mobile`,logo:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTY2IiBoZWlnaHQ9IjE2NiIgdmlld0JveD0iMCAwIDE2NiAxNjYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF83ODBfNjEwKSI+CjxyZWN0IHdpZHRoPSIxNjYiIGhlaWdodD0iMTY2IiBmaWxsPSIjQzVGRkNFIi8+CjxwYXRoIGQ9Ik0xMzguNjE0IDEwMC40NDVDMTM4LjYxNCAxMjAuMjE3IDExNC40ODMgMTI4LjI1MiA4NC41MjE2IDEyOC4yNTJDNTQuNTYwMyAxMjguMjUyIDMwLjA3ODQgMTIwLjIxNyAzMC4wNzg0IDEwMC40NDVDMzAuMDc4NCA4MC42NzI0IDU0LjM4NDYgNjQuNjczIDg0LjM0NiA2NC42NzNDMTE0LjMwNyA2NC42NzMgMTM4LjYxNCA4MC43MDc0IDEzOC42MTQgMTAwLjQ0NVoiIGZpbGw9IiMyNEE5NUEiLz4KPHBhdGggZD0iTTEzMy4xMDMgNTcuMzQ3MkMxMzMuMTAzIDQ2LjkzNyAxMjQuNjAzIDM4LjQ4MzIgMTE0LjEzNiAzOC40ODMyQzEwOC42OTMgMzguNDgzMiAxMDMuNzg3IDQwLjc3MTkgMTAwLjMzIDQ0LjQxNzFDOTkuNzk0NCA0NC45ODE4IDk5LjAxMTggNDUuMjU2OSA5OC4yNDkgNDUuMTAyOUM5My44NjkgNDQuMjE4NSA4OS4yMzU1IDQzLjcyMzIgODQuNDU1NSA0My43MjMyQzc5LjY3NiA0My43MjMyIDc1LjA0MyA0NC4xODkzIDcwLjY2MzQgNDUuMDk1QzY5Ljg5OTggNDUuMjUyOSA2OS4xMTM4IDQ0Ljk4MjMgNjguNTc1IDQ0LjQxODZDNjUuMDkgNDAuNzcyNSA2MC4xODY3IDM4LjQ4MzIgNTQuNzc1MiAzOC40ODMyQzQ0LjMwOCAzOC40ODMyIDM1LjgwNzkgNDYuOTM3IDM1LjgwNzkgNTcuMzQ3MkMzNS44MDc5IDYwLjM4MzQgMzYuNTI2MiA2My4yMjczIDM3Ljc5MTMgNjUuNzU3QzM4LjA5NDMgNjYuMzYyOCAzOC4xMjQ4IDY3LjA3MjEgMzcuODYyNyA2Ny42OTY2QzM2LjYzNTMgNzAuNjIxMiAzNS45ODM1IDczLjcwOTEgMzUuOTgzNSA3Ni45MDk4QzM1Ljk4MzUgOTUuMjQ5OCA1Ny42OTA1IDExMC4wOTYgODQuNDU1NSAxMTAuMDk2QzExMS4yMjEgMTEwLjA5NiAxMzIuOTI4IDk1LjI0OTggMTMyLjkyOCA3Ni45MDk4QzEzMi45MjggNzMuNzA5MSAxMzIuMjc2IDcwLjYyMTIgMTMxLjA0OCA2Ny42OTY2QzEzMC43ODYgNjcuMDcyMSAxMzAuODE3IDY2LjM2MjggMTMxLjEyIDY1Ljc1N0MxMzIuMzg1IDYzLjIyNzMgMTMzLjEwMyA2MC4zODM0IDEzMy4xMDMgNTcuMzQ3MloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjIyNzEgNjcuODExOUM1OS42Mjg3IDY3LjgxMTkgNjQuODE4MyA2Mi42NTA2IDY0LjgxODMgNTYuMjgzOUM2NC44MTgzIDQ5LjkxNzEgNTkuNjI4NyA0NC43NTU5IDUzLjIyNzEgNDQuNzU1OUM0Ni44MjU1IDQ0Ljc1NTkgNDEuNjM2IDQ5LjkxNzEgNDEuNjM2IDU2LjI4MzlDNDEuNjM2IDYyLjY1MDYgNDYuODI1NSA2Ny44MTE5IDUzLjIyNzEgNjcuODExOVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMTUuMDY1IDY3LjgxMTlDMTIxLjQ2NiA2Ny44MTE5IDEyNi42NTYgNjIuNjUwNiAxMjYuNjU2IDU2LjI4MzlDMTI2LjY1NiA0OS45MTcxIDEyMS40NjYgNDQuNzU1OSAxMTUuMDY1IDQ0Ljc1NTlDMTA4LjY2MyA0NC43NTU5IDEwMy40NzQgNDkuOTE3MSAxMDMuNDc0IDU2LjI4MzlDMTAzLjQ3NCA2Mi42NTA2IDEwOC42NjMgNjcuODExOSAxMTUuMDY1IDY3LjgxMTlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNDcuMDc1OSAxMjYuODI5QzQ5LjU2OTggMTI2LjgyOSA1MS41MzY4IDEyNC42NjMgNTEuMjU1OCAxMjIuMjE4QzUwLjIzNzIgMTEzLjU1NCA0NS45MTY4IDk0Ljc5NSAyNi45MTQ0IDgzLjUxMTVDNi4wODM2OCA3MS4xMzg3IDE1Ljk5NDEgMTA0LjAzNCAyMC4xMzY1IDExNi4wMTlDMjAuOTc0NCAxMTguNDQzIDIwLjAwMjcgMTIxLjEzNSAxNy43NzgzIDEyMi40MTFMMTYuNDEyMSAxMjMuMTk2QzE0LjY1NTkgMTI0LjIwOSAxNS4zOTM1IDEyNi44MjkgMTcuMzk1NiAxMjYuODI5SDQ3LjA3NTlaIiBmaWxsPSIjMzJEQTZEIi8+CjxwYXRoIGQ9Ik0xMjIuNTY2IDEyNi44MjlDMTIwLjMxOCAxMjYuODI5IDExOC41NjIgMTI0LjY2MyAxMTguODA4IDEyMi4yMThDMTE5LjY4NiAxMTMuNTg5IDEyMy42MiA5NC43OTUgMTQwLjc2MSA4My41MTE1QzE1OS43NDEgNzEuMDQyNiAxNTAuNTAzIDEwNC41NDcgMTQ2LjgxNSAxMTYuMjk0QzE0Ni4wOTIgMTE4LjU5OCAxNDYuOTgyIDEyMS4xMDYgMTQ5LjAyMiAxMjIuMzk5TDE1MC4yOCAxMjMuMTk2QzE1MS44NiAxMjQuMjA5IDE1MS4xOTMgMTI2LjgyOSAxNDkuNDAyIDEyNi44MjlIMTIyLjU2NloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjI0MjggNjMuMTc4N0M1Ny4wNjE3IDYzLjE3ODcgNjAuMTU3NiA2MC4wODI4IDYwLjE1NzYgNTYuMjYzOUM2MC4xNTc2IDUyLjQ0NSA1Ny4wNjE3IDQ5LjM0OTEgNTMuMjQyOCA0OS4zNDkxQzQ5LjQyMzkgNDkuMzQ5MSA0Ni4zMjggNTIuNDQ1IDQ2LjMyOCA1Ni4yNjM5QzQ2LjMyOCA2MC4wODI4IDQ5LjQyMzkgNjMuMTc4NyA1My4yNDI4IDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik0xMTUuMDgxIDYzLjE3ODdDMTE4LjkgNjMuMTc4NyAxMjEuOTk1IDYwLjA4MjggMTIxLjk5NSA1Ni4yNjM5QzEyMS45OTUgNTIuNDQ1IDExOC45IDQ5LjM0OTEgMTE1LjA4MSA0OS4zNDkxQzExMS4yNjIgNDkuMzQ5MSAxMDguMTY2IDUyLjQ0NSAxMDguMTY2IDU2LjI2MzlDMTA4LjE2NiA2MC4wODI4IDExMS4yNjIgNjMuMTc4NyAxMTUuMDgxIDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik05OS43OTk1IDgzLjAxNzZDMTAxLjUxNCA4My4xNjUxIDEwMi44MSA4NC42ODYyIDEwMi4zNzggODYuMzUxOEMxMDIuMDI5IDg3LjY5NzkgMTAxLjUyOSA4OS4wMDM5IDEwMC44ODYgOTAuMjQ0MkM5OS43NjMgOTIuNDA5IDk4LjIyNDYgOTQuMzMxNSA5Ni4zNTg2IDk1LjkwMThDOTQuNDkyNyA5Ny40NzIyIDkyLjMzNTcgOTguNjU5NiA5MC4wMTA4IDk5LjM5NjNDODcuNjg2IDEwMC4xMzMgODUuMjM4OCAxMDAuNDA1IDgyLjgwOSAxMDAuMTk2QzgwLjM3OTEgOTkuOTg2NiA3OC4wMTQzIDk5LjMwMSA3NS44NDk0IDk4LjE3OEM3My42ODQ2IDk3LjA1NTEgNzEuNzYyMSA5NS41MTY3IDcwLjE5MTcgOTMuNjUwN0M2OC42MjE0IDkxLjc4NDggNjcuNDM0IDg5LjYyNzggNjYuNjk3MiA4Ny4zMDI5QzY2LjE3MDEgODUuNjM5NiA2NS44ODExIDgzLjkxMzUgNjUuODM1OSA4Mi4xNzYxQzY1LjgwNiA4MS4wMjk0IDY2LjgyNDQgODAuMTgwOCA2Ny45NjczIDgwLjI3OTFMODQuNDAwNyA4MS42OTI4TDk5Ljc5OTUgODMuMDE3NloiIGZpbGw9IiMwOTI1MTEiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83ODBfNjEwIj4KPHJlY3Qgd2lkdGg9IjE2NiIgaGVpZ2h0PSIxNjYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==`,mode:`wallet-connect`,mobileDisabled:()=>`leap`in window&&/LeapCosmos/i.test(navigator.userAgent),rejectMessage:{source:`Request rejected`},downloads:[{device:`mobile`,os:`android`,link:`https://play.google.com/store/apps/details?id=io.leapwallet.cosmos`},{device:`mobile`,os:`ios`,link:`https://apps.apple.com/in/app/leap-cosmos/id1642465549`},{link:`https://chrome.google.com/webstore/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg`}],connectEventNamesOnWindow:[`leap_keystorechange`],walletconnect:{name:`Leap Cosmos Wallet`,projectId:`3ed8cc046c6211a798dc5ec70f1302b43e07db9639fd287de44a9aa115a21ed6`,encoding:`base64`,mobile:{native:{ios:`leapcosmos:`,android:`intent:`}},formatNativeUrl:(e,t,n,r)=>{let i=e.split(`:`)[0],a=encodeURIComponent(t);switch(n){case`ios`:return`${i}://wcV2?${a}`;case`android`:return`${i}://wcV2?${a}#Intent;package=io.leapwallet.cosmos;scheme=leapwallet;end;`;default:return`${i}://wcV2?${a}`}}}})],ry=[...Hv,...ny,...$v],iy=Sn(),ay=bn(),oy=Xn();T();var sy=e=>{if(e.walletInfo.mode===`extension`)return e.clientMutable.state===`Done`&&!!e.client},cy=({wallet:e,cosmosChainsMap:t,cosmosWagmiChains:n})=>({id:e.walletInfo.name,name:e.walletInfo.prettyName,iconUrl:(typeof e.walletInfo.logo==`string`?e.walletInfo.logo:e.walletInfo.logo?.major??e.walletInfo.logo?.minor)??``,iconBackground:`transparent`,downloadUrls:{chrome:e.walletInfo.downloads?.[0].link,firefox:e.walletInfo.downloads?.[1].link,browserExtension:e.walletInfo.downloads?.[0].link},qrCode:{getUri:e=>e},chainGroup:{iconUrl:u(w.Cosmos),title:`Cosmos`,id:`cosmos`},installed:sy(e),createConnector:r=>p(i=>{let a=new E,o=new d(n),s=e.chainWalletMap.get(t.cosmos?.chain.chain_name??Object.values(t)[0].chain.chain_name);if(!s)throw Error(`Chain wallet not found`);let l=new d(s),u=()=>new Promise((e,t)=>{let n=0,r=async()=>{if(n>3)return t();s.clientMutable.state===`Done`||s.clientMutable.state===`Error`?e():(await c(1e3),n++,r())};r()}),f=async e=>{i.emitter.emit(`message`,{type:`connecting`});let t=l.getValue(),n=t=>{if(!t.address||!t.chainId)throw Error(t.message??`Cosmos wallet did not return an account`);return{accounts:e?.withCapabilities?[{address:t.address,capabilities:{}}]:[t.address],chainId:t.chainId}};if(t.address&&t.chainId)return t.walletInfo.mode===`wallet-connect`&&await t.client.init(),n(t);let r=async e=>{if(!(e<=0)){if(await c(400),t.qrUrl.data)return a.emit(`display_uri`,t.qrUrl.data);r(e-1)}};t.walletInfo.mode===`wallet-connect`&&r(20),await t.connect();let o=n(t);return await p(),o},p=async()=>{let e=await l.getValue(),t=await e.client?.getAccount?.(e.chainId);if(!t)return;let{address:n,pubkey:r}=t;v(`sk-widget@1//skPubKeys`,{...y(`sk-widget@1//skPubKeys`).orDefault({})??{},[n]:(0,ay.toBase64)(r)})},h=async({chainId:t})=>{let n=i.chains.find(e=>e.id===t);if(!n)throw Error(`Chain not found`);let r=n,a=e.getChainWallet(r.cosmosChainName);if(!a)throw Error(`Chain wallet not found`);l.next(a),await f();let o=i.chains.find(e=>e.id===t);if(!o)throw Error(`Chain not found`);return _(t.toString()),g([a.address]),o},g=e=>{e.length===0?i.emitter.emit(`disconnect`):i.emitter.emit(`change`,{accounts:e})},_=e=>{i.emitter.emit(`change`,{chainId:e})},x=()=>{i.emitter.emit(`disconnect`)},S=async()=>{let e=l.getValue().address;return e?[e]:[]},C=async()=>{try{return!!l.getValue().address}catch{return!1}},w=({cw:e,tx:t})=>m(()=>e.client.signDirect(e.chainId,e.address,oy.SignDoc.decode((0,ay.fromHex)(t)))).mapLeft(e=>Error(`signDirect failed`)).map(e=>(0,ay.toHex)(oy.TxRaw.encode({authInfoBytes:e.signed.authInfoBytes,bodyBytes:e.signed.bodyBytes,signatures:[(0,iy.decodeSignature)(e.signature).signature]}).finish())),T=async()=>l.getValue().chainId,D=async()=>a,O=async()=>l.getValue().disconnect();return{...r,setup:u,id:e.walletInfo.name,name:e.walletInfo.name,type:b.type,$filteredChains:o.asObservable(),$chainWallet:l.asObservable(),connect:f,switchChain:h,onAccountsChanged:g,onChainChanged:_,onDisconnect:x,getAccounts:S,isAuthorized:C,getChainId:T,getProvider:D,disconnect:O,signTransaction:w,toBase64:ay.toBase64}})}),ly=class extends mv{disconnect(){return this.signClient?.pairing.getAll().forEach(e=>this.signClient?.core.pairing.disconnect({topic:e.topic})),super.disconnect()}restorePairings(){if(this.signClient===void 0)throw Error(`WalletConnect is not initialized`);this.pairings=this.signClient.pairing.getAll({active:!0}).filter(e=>e.expiry*1e3>Date.now()+1e3),this.logger?.debug(`RESTORED PAIRINGS: `,this.pairings)}restoreSessions(){if(this.signClient===void 0)throw Error(`WalletConnect is not initialized`);this.sessions=this.signClient.session.getAll().filter(e=>e.expiry*1e3>Date.now()+1e3),this.logger?.debug(`RESTORED SESSIONS: `,this.sessions)}},uy=class extends Ih{constructor(e,t){super(e,t,ly)}},dy=class extends hv{constructor(e,t){super(e,uy,ly),this.preferredEndpoints=t}},fy={name:`wallet-connect`,prettyName:`WalletConnect`,logo:_.wcLogo,mode:`wallet-connect`,mobileDisabled:!1,rejectMessage:{source:`Request rejected`},downloads:[{device:`mobile`,os:`android`,link:`https://play.google.com/store/apps/details?id=com.chainapsis.keplr&hl=en&gl=US&pli=1`},{device:`mobile`,os:`ios`,link:`https://apps.apple.com/us/app/keplr-wallet/id1567851089`},{link:`https://www.keplr.app/download`}],connectEventNamesOnWindow:[`wallet-connect_keystorechange`],walletconnect:{name:`Wallet Connect`,projectId:l.walletConnectV2.projectId,encoding:`base64`,mobile:{native:{ios:`keplrwallet:`,android:`intent:`}},formatNativeUrl:(e,t,n,r)=>`${e.replaceAll(`/`,``).replaceAll(`:`,``)}://wcV2?${encodeURIComponent(t)}`}},py=[...Rv,...ry,new dy(fy)],my=({cosmosChainsMap:e,forceWalletConnectOnly:t})=>{let n=t?py.filter(e=>e instanceof dy):py,{chains:r,cosmosWagmiChains:i}=f(e).map(e=>Object.values(e).reduce((e,t)=>(e.cosmosWagmiChains.push(t.wagmiChain),e.chains.push(t.chain),e),{cosmosWagmiChains:[],chains:[]})).map(e=>({...e,chains:[...e.chains].sort(e=>Bn[e.chain_id]===w.Cosmos?-1:1)})).unsafeCoerce();return{connector:{groupName:`Cosmos`,wallets:n.map(t=>()=>cy({wallet:t,cosmosChainsMap:e,cosmosWagmiChains:i}))},walletManager:new qi(r,n,new An(l.env.isDevMode?`ERROR`:`NONE`),!1,!0,void 0,zn,void 0,{signClient:{projectId:l.walletConnectV2.projectId,customStoragePrefix:`cosmoswalletconnect_`}})}};export{Kn as a,my as getWalletManager,qn as i,Yn as n,Gn as o,Jn as r,Wn as s,Xn as t};
|
|
71
|
+
`;let c=document.createElement(`div`);c.style.boxSizing=`border-box`,c.style.position=`relative`,c.style.marginRight=`1rem`;let l=document.createElement(`img`);l.src=chrome.runtime.getURL(`/assets/${e?`locked-keplr-logo`:`icon`}-128.png`),l.style.boxSizing=`border-box`,l.style.width=`3rem`,l.style.height=`3rem`,c.appendChild(l);let u=document.createElement(`img`);u.src=chrome.runtime.getURL(`assets/icon-click-cursor.png`),u.style.boxSizing=`border-box`,u.style.position=`absolute`,u.style.right=`-0.2rem`,u.style.bottom=`-0.2rem`,u.style.aspectRatio=`78/98`,u.style.height=`1.375rem`,c.appendChild(u);let d=document.createElement(`span`);if(d.style.boxSizing=`border-box`,d.style.fontSize=`1rem`,d.style.color=r?`#020202`:`#FEFEFE`,d.textContent=e?`Unlock Keplr to proceed`:`Open Keplr to approve request(s)`,o.appendChild(s),o.appendChild(c),o.appendChild(d),!document.getElementById(`__open_keplr_side_panel__`)){let e=!1,t=setInterval(()=>{(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`interaction`,`ping-content-script-tab-has-opened-side-panel`,{}).then(n=>{n&&(clearInterval(t),e||=(o.remove(),!0))})},300);document.body.appendChild(o)}}}})}};var d=[`eth_signTransaction`,`eth_sendTransaction`,`personal_sign`,`eth_signTypedData_v3`,`eth_signTypedData_v4`,`wallet_addEthereumChain`,`wallet_switchEthereumChain`,`wallet_watchAsset`],f=class extends u.default{constructor(e,t){super(),this.keplr=e,this.requester=t,this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.isKeplr=!0,this.isMetaMask=!0}protectedEnableAccess(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`permission-interactive`,`enable-access-for-evm`,{chainId:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}protectedGetNewCurrentChainIdFromRequest(e,n){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-ethereum`,`get-new-current-chain-id-for-evm`,{method:e,params:n})})}protectedCheckNeedEnableAccess(e){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-ethereum`,`check-need-enable-access-for-evm`,{method:e})})}isConnected(){return!0}request({method:e,params:n,providerId:r,chainId:a}){return t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid paramater: `method` must be a string");if(yield this.protectedCheckNeedEnableAccess(e)){let t=yield this.protectedGetNewCurrentChainIdFromRequest(e,n);yield this.protectedEnableAccess(t)}return new Promise((t,o)=>{let s=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-ethereum`,`request-json-rpc-to-evm`,{method:e,params:n,providerId:r,chainId:a}).then(t).catch(o).finally(()=>s=!0),setTimeout(()=>{!s&&d.includes(e)&&this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}enable(){return t(this,void 0,void 0,function*(){return yield this.request({method:`eth_requestAccounts`})})}net_version(){return t(this,void 0,void 0,function*(){return yield this.request({method:`net_version`})})}},p=[`wallet_watchAsset`,`wallet_switchStarknetChain`,`wallet_addInvokeTransaction`,`wallet_addDeclareTransaction`,`wallet_signTypedData`],m=class{constructor(e,t){this.keplr=e,this.requester=t,this.id=``,this.name=``,this.version=``,this.icon=``,this.isConnected=!1}protectedEnableAccess(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`permission-interactive`,`enable-access-for-starknet`,{chainId:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}protectedGetNewCurrentChainIdFromRequest(e,n){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-starknet`,`get-new-current-chain-id-for-starknet`,{method:e,params:n})})}protectedCheckNeedEnableAccess(e,n){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-starknet`,`check-need-enable-access-for-starknet`,{method:e,params:n})})}request({type:e,params:n}){return t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid parameter: `type` must be a string");if(yield this.protectedCheckNeedEnableAccess(e,n)){let t=yield this.protectedGetNewCurrentChainIdFromRequest(e,n);yield this.protectedEnableAccess(t)}return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-starknet`,`request-json-rpc-to-starknet`,{method:e,params:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{!a&&p.includes(e)&&this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}enable(e){return t(this,void 0,void 0,function*(){throw Error(`Method not implemented.`)})}isPreauthorized(){throw Error(`Method not implemented.`)}on(e,t){throw Error(`Method not implemented.`)}off(e,t){throw Error(`Method not implemented.`)}},h=class extends u.default{constructor(e,t){super(),this.keplr=e,this.requester=t}protectedEnableAccess(){return t(this,void 0,void 0,function*(){return new Promise((e,t)=>{let n=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`permission-interactive`,`enable-access-for-bitcoin`,{}).then(e).catch(t).finally(()=>n=!0),setTimeout(()=>{n||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getAccounts(){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-accounts`,{})})}requestAccounts(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-request-accounts`,{})})}disconnect(){return t(this,void 0,void 0,function*(){return yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-disconnect`,{})})}getNetwork(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-network`,{})})}switchNetwork(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-switch-network`,{network:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getChain(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-chain`,{})})}switchChain(e){return t(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-switch-chain`,{chainType:e}).then(t).catch(n).finally(()=>r=!0),setTimeout(()=>{r||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getPublicKey(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-public-key`,{})})}getBalance(){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-balance`,{})})}getInscriptions(e,n){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-get-inscriptions`,{offset:e,limit:n})})}signMessage(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-sign-bitcoin-message`,{message:e,signType:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}sendBitcoin(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-send-bitcoin`,{to:e,amount:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}pushTx(e){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-push-tx`,{rawTxHex:e})})}pushPsbt(e){return t(this,void 0,void 0,function*(){return yield this.protectedEnableAccess(),yield(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-bitcoin-push-psbt`,{psbtHex:e})})}signPsbt(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-sign-bitcoin-psbt`,{psbtHex:e,options:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}signPsbts(e,n){return t(this,void 0,void 0,function*(){return new Promise((t,r)=>{let a=!1;(0,i.sendSimpleMessage)(this.requester,i.BACKGROUND_PORT,`keyring-bitcoin`,`request-sign-bitcoin-psbts`,{psbtsHexes:e,options:n}).then(t).catch(r).finally(()=>a=!0),setTimeout(()=>{a||this.keplr.protectedTryOpenSidePanelIfEnabled()},300)})})}getAddress(){return t(this,void 0,void 0,function*(){throw Error(`This method should not be called`)})}connectWallet(){return t(this,void 0,void 0,function*(){throw Error(`This method should not be called`)})}}})),jv=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.BitcoinProvider=e.InjectedKeplr=e.injectKeplrToWindow=void 0;var r=fa(),i=Dv(),a=Ov(),o=kv(),s=n(Vn()),c=n(W()),l=n(I());function u(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);(!r||r.writable)&&(!r||r.configurable?Object.defineProperty(e,t,{value:n,writable:!1}):e[t]=n)}function d(e){u(window,`keplr`,e),u(window,`getOfflineSigner`,e.getOfflineSigner),u(window,`getOfflineSignerOnlyAmino`,e.getOfflineSignerOnlyAmino),u(window,`getOfflineSignerAuto`,e.getOfflineSignerAuto),u(window,`getEnigmaUtils`,e.getEnigmaUtils),u(window,`starknet_keplr`,e.starknet),u(window,`bitcoin_keplr`,e.bitcoin)}e.injectKeplrToWindow=d,e.InjectedKeplr=class e{static startProxy(e,n,r={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},a){let o=`proxy-request${n?`-${n}`:``}`,s=n=>t(this,void 0,void 0,function*(){let s=a?a(n.data):n.data;if(!(!s||s.type!==o&&s.type!==`proxy-request`))try{if(!s.id)throw Error(`Empty id`);if(s.method.startsWith(`protected`))throw Error(`Rejected`);if(s.method===`version`)throw Error(`Version is not function`);if(s.method===`mode`)throw Error(`Mode is not function`);if(s.method===`defaultOptions`)throw Error(`DefaultOptions is not function`);if(!e[s.method]||s.method!==`ethereum`&&s.method!==`starknet`&&s.method!==`bitcoin`&&typeof e[s.method]!=`function`)throw Error(`Invalid method: ${s.method}`);if(s.method===`getOfflineSigner`)throw Error(`GetOfflineSigner method can't be proxy request`);if(s.method===`getOfflineSignerOnlyAmino`)throw Error(`GetOfflineSignerOnlyAmino method can't be proxy request`);if(s.method===`getOfflineSignerAuto`)throw Error(`GetOfflineSignerAuto method can't be proxy request`);if(s.method===`getEnigmaUtils`)throw Error(`GetEnigmaUtils method can't be proxy request`);let n=s.method,a=yield t(this,void 0,void 0,function*(){if(n===`signDirect`)return yield t(this,void 0,void 0,function*(){let t=s.args[2],n=yield e.signDirect(s.args[0],s.args[1],{bodyBytes:t.bodyBytes,authInfoBytes:t.authInfoBytes,chainId:t.chainId,accountNumber:t.accountNumber?c.default.fromString(t.accountNumber):null},s.args[3]);return{signed:{bodyBytes:n.signed.bodyBytes,authInfoBytes:n.signed.authInfoBytes,chainId:n.signed.chainId,accountNumber:n.signed.accountNumber.toString()},signature:n.signature}});if(n===`signDirectAux`)return yield t(this,void 0,void 0,function*(){let t=s.args[2],n=yield e.signDirectAux(s.args[0],s.args[1],{bodyBytes:t.bodyBytes,publicKey:t.publicKey,chainId:t.chainId,accountNumber:t.accountNumber?c.default.fromString(t.accountNumber):null,sequence:t.sequence?c.default.fromString(t.sequence):null},s.args[3]);return{signed:{bodyBytes:n.signed.bodyBytes,publicKey:n.signed.publicKey,chainId:n.signed.chainId,accountNumber:n.signed.accountNumber.toString(),sequence:n.signed.sequence.toString()},signature:n.signature}});if(n===`ethereum`){let t=s.ethereumProviderMethod;if(t?.startsWith(`protected`))throw Error(`Rejected`);if(t===`chainId`)throw Error(`chainId is not function`);if(t===`selectedAddress`)throw Error(`selectedAddress is not function`);if(t===`networkVersion`)throw Error(`networkVersion is not function`);if(t===`isKeplr`)throw Error(`isKeplr is not function`);if(t===`isMetaMask`)throw Error(`isMetaMask is not function`);if(t===void 0||typeof e.ethereum[t]!=`function`)throw Error(`${s.ethereumProviderMethod} is not function or invalid Ethereum provider method`);let n=i.JSONUint8Array.unwrap(s.args);return t===`request`?yield e.ethereum.request(typeof n==`string`?JSON.parse(n):n):yield e.ethereum[t](...typeof n==`string`?JSON.parse(n):n)}if(n===`starknet`){let t=s.starknetProviderMethod;if(t?.startsWith(`protected`))throw Error(`Rejected`);if(t===`id`)throw Error(`id is not function`);if(t===`name`)throw Error(`name is not function`);if(t===`version`)throw Error(`version is not function`);if(t===`icon`)throw Error(`icon is not function`);if(t===`chainId`)throw Error(`chainId is not function`);if(t===`selectedAddress`)throw Error(`selectedAddress is not function`);if(t===`isConnected`)throw Error(`isConnected is not function`);if(t===`account`)throw Error(`account is not function`);if(t===`provider`)throw Error(`provider is not function`);if(t===void 0||typeof e.starknet?.[t]!=`function`)throw Error(`${s.starknetProviderMethod} is not function or invalid Starknet provider method`);let n=i.JSONUint8Array.unwrap(s.args);return t===`request`?yield e.starknet.request(typeof n==`string`?JSON.parse(n):n):yield e.starknet[t](...typeof n==`string`?JSON.parse(n):n)}if(n===`bitcoin`){let t=s.bitcoinProviderMethod;if(t?.startsWith(`protected`))throw Error(`Rejected`);if(t===void 0||typeof e.bitcoin?.[t]!=`function`)throw Error(`${s.bitcoinProviderMethod} is not function or invalid Bitcoin provider method`);let n=i.JSONUint8Array.unwrap(s.args);return yield e.bitcoin[t](...typeof n==`string`?JSON.parse(n):n)}return yield e[n](...i.JSONUint8Array.unwrap(s.args))}),o={type:`proxy-request-response`,id:s.id,result:{return:i.JSONUint8Array.wrap(a)}};r.postMessage(o)}catch(e){let t={type:`proxy-request-response`,id:s.id,result:{error:e.code&&!e.module?{code:e.code,message:e.message,data:e.data}:e.message||e.toString()}};r.postMessage(t)}});return r.addMessageListener(s),()=>{r.removeMessageListener(s)}}requestMethod(e,t){let n=new Uint8Array(8),r=Array.from(crypto.getRandomValues(n)).map(e=>e.toString(16)).join(``),a={type:`proxy-request${this.metaId?`-${this.metaId}`:``}`,id:r,method:e,args:i.JSONUint8Array.wrap(t)};return new Promise((e,t)=>{let n=a=>{let o=this.parseMessage?this.parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this.eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){t(Error(s.error));return}e(s.return)};this.eventListener.addMessageListener(n),this.eventListener.postMessage(a)})}constructor(t,n,r,i,a,o={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},s,c,l){this.metaId=t,this.version=n,this.mode=r,this.onStarknetStateChange=i,this.onStarknetAccountChange=a,this.eventListener=o,this.parseMessage=s,this.eip6963ProviderInfo=c,this.starknetProviderInfo=l,this.enigmaUtils=new Map,this.defaultOptions={},this.ethereum=new f(this.metaId,()=>this,this.eventListener,this.parseMessage,this.eip6963ProviderInfo),this.starknet=this.generateStarknetProvider(),this.bitcoin=new m(()=>this,this.eventListener,this.parseMessage);let u=Object.keys(this);for(let e of u)if(e!==`defaultOptions`&&Object.defineProperty(this,e,{value:this[e],writable:!1}),e===`eventListener`){let e=Object.keys(this.eventListener);for(let t of e)Object.defineProperty(this.eventListener,t,{value:this.eventListener[t],writable:!1})}let d=Object.getOwnPropertyNames(e.prototype);for(let e of d)e!==`constructor`&&typeof this[e]==`function`&&Object.defineProperty(this,e,{value:this[e].bind(this),writable:!1})}ping(){return t(this,void 0,void 0,function*(){yield this.requestMethod(`ping`,[])})}enable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`enable`,[e])})}disable(e){return t(this,void 0,void 0,function*(){yield this.requestMethod(`disable`,[e])})}experimentalSuggestChain(e){return t(this,void 0,void 0,function*(){if(e.hideInUI)throw Error(`hideInUI is not allowed`);e.features?.includes(`stargate`)||e.features?.includes(`no-legacy-stdTx`),yield this.requestMethod(`experimentalSuggestChain`,[e])})}getKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKey`,[e])})}getKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getKeysSettled`,[e])})}sendTx(e,n,r){return t(this,void 0,void 0,function*(){return`length`in n,yield this.requestMethod(`sendTx`,[e,n,r])})}signAmino(e,n,r,i={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signAmino`,[e,n,r,(0,s.default)(this.defaultOptions.sign??{},i)])})}signDirect(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirect`,[e,n,{bodyBytes:r.bodyBytes,authInfoBytes:r.authInfoBytes,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null},(0,s.default)(this.defaultOptions.sign??{},i)]),a=t.signed;return{signed:{bodyBytes:a.bodyBytes,authInfoBytes:a.authInfoBytes,chainId:a.chainId,accountNumber:c.default.fromString(a.accountNumber)},signature:t.signature}})}signDirectAux(e,n,r,i={}){return t(this,void 0,void 0,function*(){let t=yield this.requestMethod(`signDirectAux`,[e,n,{bodyBytes:r.bodyBytes,publicKey:r.publicKey,chainId:r.chainId,accountNumber:r.accountNumber?r.accountNumber.toString():null,sequence:r.sequence?r.sequence.toString():null},(0,s.default)({preferNoSetMemo:this.defaultOptions.sign?.preferNoSetMemo},i)]),a=t.signed;return{signed:{bodyBytes:a.bodyBytes,publicKey:a.publicKey||void 0,chainId:a.chainId,accountNumber:c.default.fromString(a.accountNumber),sequence:c.default.fromString(a.sequence)},signature:t.signature}})}signArbitrary(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signArbitrary`,[e,n,r])})}signICNSAdr36(e,t,n,r,i){return this.requestMethod(`signICNSAdr36`,[e,t,n,r,i])}verifyArbitrary(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`verifyArbitrary`,[e,n,r,i])})}signEthereum(e,n,r,i){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signEthereum`,[e,n,r,i])})}getOfflineSigner(e,t){return new o.CosmJSOfflineSigner(e,this,t)}getOfflineSignerOnlyAmino(e,t){return new o.CosmJSOfflineSignerOnlyAmino(e,this,t)}getOfflineSignerAuto(e,n){return t(this,void 0,void 0,function*(){return(yield this.getKey(e)).isNanoLedger?new o.CosmJSOfflineSignerOnlyAmino(e,this,n):new o.CosmJSOfflineSigner(e,this,n)})}suggestToken(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestToken`,[e,n,r])})}getSecret20ViewingKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getSecret20ViewingKey`,[e,n])})}getEnigmaPubKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaPubKey`,[e])})}getEnigmaTxEncryptionKey(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getEnigmaTxEncryptionKey`,[e,n])})}enigmaEncrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaEncrypt`,[e,n,r])})}enigmaDecrypt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`enigmaDecrypt`,[e,n,r])})}getEnigmaUtils(e){if(this.enigmaUtils.has(e))return this.enigmaUtils.get(e);let t=new a.KeplrEnigmaUtils(e,this);return this.enigmaUtils.set(e,t),t}experimentalSignEIP712CosmosTx_v0(e,n,r,i,a={}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`experimentalSignEIP712CosmosTx_v0`,[e,n,r,i,(0,s.default)(this.defaultOptions.sign??{},a)])})}getChainInfosWithoutEndpoints(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfosWithoutEndpoints`,[])})}getChainInfoWithoutEndpoints(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getChainInfoWithoutEndpoints`,[e])})}__core__getAnalyticsId(){return this.requestMethod(`__core__getAnalyticsId`,[])}changeKeyRingName({defaultName:e,editable:n=!0}){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`changeKeyRingName`,[{defaultName:e,editable:n}])})}__core__privilageSignAminoWithdrawRewards(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoWithdrawRewards`,[e,n,r])})}__core__privilageSignAminoDelegate(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoDelegate`,[e,n,r])})}__core__privilageSignAminoExecuteCosmWasm(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__privilageSignAminoExecuteCosmWasm`,[e,n,r])})}sendEthereumTx(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`sendEthereumTx`,[e,n])})}suggestERC20(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`suggestERC20`,[e,n])})}__core__webpageClosed(){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`__core__webpageClosed`,[])})}getStarknetKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKey`,[e])})}getStarknetKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getStarknetKeysSettled`,[e])})}signStarknetTx(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetTx`,[e,n,r])})}signStarknetDeployAccountTransaction(e,n){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signStarknetDeployAccountTransaction`,[e,n])})}generateStarknetProvider(){return new p(this.metaId,this.starknetProviderInfo.id,this.starknetProviderInfo.name,this.version,this.starknetProviderInfo.icon,()=>this,this.onStarknetStateChange,this.onStarknetAccountChange,this.eventListener,this.parseMessage)}getBitcoinKey(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKey`,[e])})}getBitcoinKeysSettled(e){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`getBitcoinKeysSettled`,[e])})}signPsbt(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbt`,[e,n,r])})}signPsbts(e,n,r){return t(this,void 0,void 0,function*(){return yield this.requestMethod(`signPsbts`,[e,n,r])})}};var f=class extends l.default{constructor(e,n,a={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},o,s){if(super(),this.metaId=e,this.injectedKeplr=n,this.eventListener=a,this.parseMessage=o,this.eip6963ProviderInfo=s,this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.isKeplr=!0,this.isMetaMask=!0,this._isConnected=!1,this._currentChainId=null,this._requestMethod=(e,n)=>t(this,void 0,void 0,function*(){let t=new Uint8Array(8),r=Array.from(crypto.getRandomValues(t)).map(e=>e.toString(16)).join(``),a={type:`proxy-request${this.metaId?`-${this.metaId}`:``}`,id:r,method:`ethereum`,args:i.JSONUint8Array.wrap(n),ethereumProviderMethod:e};return new Promise((e,t)=>{let n=a=>{let o=this.parseMessage?this.parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this.eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){let e=s.error;t(e.code&&!e.module?new i.EthereumProviderRpcError(e.code,e.message,e.data):Error(e));return}e(s.return)};this.eventListener.addMessageListener(n),this.eventListener.postMessage(a)})}),this._initProviderState=()=>t(this,void 0,void 0,function*(){let e=yield this._requestMethod(`request`,{method:`keplr_initProviderState`});if(e){let{currentEvmChainId:t,currentChainId:n,selectedAddress:r}=e;n!=null&&t!=null&&r!=null&&(this._handleConnect(t),this._handleChainChanged(t),this._currentChainId=n,this._handleAccountsChanged(r))}}),this._handleConnect=e=>t(this,void 0,void 0,function*(){if(!this._isConnected){this._isConnected=!0;let t=`0x${e.toString(16)}`;this.emit(`connect`,{chainId:t})}}),this._handleDisconnect=()=>t(this,void 0,void 0,function*(){this._isConnected&&(yield this._requestMethod(`request`,{method:`keplr_disconnect`}),this._isConnected=!1,this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.emit(`disconnect`))}),this._handleChainChanged=e=>t(this,void 0,void 0,function*(){let t=`0x${e.toString(16)}`;t!==this.chainId&&(this.chainId=t,this.networkVersion=e.toString(10),this.emit(`chainChanged`,t))}),this._handleAccountsChanged=e=>t(this,void 0,void 0,function*(){this.selectedAddress!==e&&(this.selectedAddress=e,e?this.emit(`accountsChanged`,[e]):this.emit(`accountsChanged`,[]))}),this.request=({method:e,params:n,chainId:r})=>t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid paramater: `method` must be a string");return this._isConnected||(yield this._initProviderState()),yield this._requestMethod(`request`,{method:e,params:n,providerId:this.eip6963ProviderInfo?.uuid,chainId:r})}),this.enable=()=>t(this,void 0,void 0,function*(){return yield this.request({method:`eth_requestAccounts`})}),this.net_version=()=>t(this,void 0,void 0,function*(){return yield this.request({method:`net_version`})}),this._initProviderState(),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){if(this._currentChainId&&(yield n().getChainInfoWithoutEndpoints(this._currentChainId))){let e=null;try{e=(yield n().getKey(this._currentChainId)).ethereumHexAddress}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}})),window.addEventListener(`keplr_chainChanged`,e=>{if(e.detail.origin===window.location.origin){let t=e.detail.evmChainId;this._handleChainChanged(t)}}),window.addEventListener(`keplr_ethSubscription`,e=>{let t=e.detail.origin,n=e.detail.providerId;if(t===window.location.origin&&n===this.eip6963ProviderInfo?.uuid){let t=e.detail.data;this.emit(`message`,{type:`eth_subscription`,data:t})}}),this.eip6963ProviderInfo){let e=new CustomEvent(r.EIP6963EventNames.Announce,{detail:Object.freeze({info:this.eip6963ProviderInfo,provider:this})});window.addEventListener(r.EIP6963EventNames.Request,()=>window.dispatchEvent(e)),window.dispatchEvent(e)}}isConnected(){return this._isConnected}},p=class{constructor(e,n,r,i,a,o,s,c,l={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},u){this.metaId=e,this.id=n,this.name=r,this.version=i,this.icon=a,this._injectedKeplr=o,this.onStateChange=s,this.onAccountChange=c,this._eventListener=l,this._parseMessage=u,this.isConnected=!1,this.chainId=void 0,this.selectedAddress=void 0,this.account=void 0,this.provider=void 0,this._currentChainId=void 0,this._userWalletEvents=[],this._initProviderState(),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){if(this._currentChainId){let e=null;try{e=(yield this._injectedKeplr().getStarknetKey(this._currentChainId)).hexAddress}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this.selectedAddress=e??void 0,this.onAccountChange({selectedAddress:e}),this._userWalletEvents.forEach(t=>{t.type===`accountsChanged`&&t.handler(e?[e]:[``])})}})),window.addEventListener(`keplr_starknetChainChanged`,e=>{let t=e.detail.origin,n=e.detail.starknetChainId;this.chainId=n,t===window.location.origin&&this._userWalletEvents.forEach(e=>{e.type===`networkChanged`&&e.handler(n)})})}_requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=new Uint8Array(8),r=Array.from(crypto.getRandomValues(t)).map(e=>e.toString(16)).join(``),a={type:`proxy-request${this.metaId?`-${this.metaId}`:``}`,id:r,method:`starknet`,args:i.JSONUint8Array.wrap(n),starknetProviderMethod:e};return new Promise((e,t)=>{let n=a=>{let o=this._parseMessage?this._parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this._eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){let e=s.error;t(e.code&&!e.module?new i.EthereumProviderRpcError(e.code,e.message,e.data):Error(e));return}e(s.return)};this._eventListener.addMessageListener(n),this._eventListener.postMessage(a)})})}_initProviderState(){return t(this,void 0,void 0,function*(){let{currentChainId:e,selectedAddress:t,rpc:n}=yield this.request({type:`keplr_initStarknetProviderState`});e!=null&&t!=null&&n!=null?(this.onStateChange({selectedAddress:t,chainId:e,rpc:n}),this._currentChainId=e,this.chainId=e.replace(`starknet:`,``),this.selectedAddress=t,this.isConnected=!0):this.onStateChange({selectedAddress:null,chainId:null,rpc:null})})}request({type:e,params:n}){return t(this,void 0,void 0,function*(){if(typeof e!=`string`)throw Error("Invalid parameter: `type` must be a string");return yield this._requestMethod(`request`,{type:e,params:n})})}enable(e){return t(this,void 0,void 0,function*(){let{currentChainId:e,selectedAddress:t,rpc:n}=yield this.request({type:`keplr_enableStarknetProvider`});return this.onStateChange({selectedAddress:t,chainId:e,rpc:n}),this._currentChainId=e,this.chainId=e.replace(`starknet:`,``),this.selectedAddress=t,this.isConnected=!0,[t]})}isPreauthorized(){return t(this,void 0,void 0,function*(){let{currentChainId:e,selectedAddress:t}=yield this.request({type:`keplr_initStarknetProviderState`});return e!=null&&t!=null})}on(e,t){if(e===`accountsChanged`)this._userWalletEvents.push({type:`accountsChanged`,handler:t});else if(e===`networkChanged`)this._userWalletEvents.push({type:`networkChanged`,handler:t});else throw Error(`Invalid event type`)}off(e,t){if(e!==`accountsChanged`&&e!==`networkChanged`)throw Error(`Invalid event type`);let n=this._userWalletEvents.findIndex(n=>n.type===e&&n.handler===t);n>=0&&this._userWalletEvents.splice(n,1)}},m=class extends l.default{constructor(e,n={addMessageListener:e=>window.addEventListener(`message`,e),removeMessageListener:e=>window.removeEventListener(`message`,e),postMessage:e=>window.postMessage(e,window.location.origin)},r){super(),this._injectedKeplr=e,this._eventListener=n,this._parseMessage=r,this._handleNetworkChanged=e=>t(this,void 0,void 0,function*(){this.emit(`networkChanged`,e)}),this._handleAccountsChanged=e=>t(this,void 0,void 0,function*(){e&&e.length>0?(this.emit(`accountChanged`,e),this.emit(`accountsChanged`,e)):(this.emit(`accountChanged`,[``]),this.emit(`accountsChanged`,[``]))}),window.addEventListener(`keplr_keystorechange`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)})),window.addEventListener(`keplr_bitcoinChainChanged`,e=>t(this,void 0,void 0,function*(){if(e.detail.origin===window.location.origin){let t=e.detail.network,n=null;try{n=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleNetworkChanged(t),this._handleAccountsChanged(n)}})),window.addEventListener(`keplr_bitcoinAccountsChanged`,()=>t(this,void 0,void 0,function*(){let e=null;try{e=yield this.getAccounts()}catch(e){e?.message.includes(`on Ledger by selecting the chain in the extension`)}this._handleAccountsChanged(e)}))}_requestMethod(e,n){return t(this,void 0,void 0,function*(){let t=new Uint8Array(8),r=Array.from(crypto.getRandomValues(t)).map(e=>e.toString(16)).join(``),a={type:`proxy-request`,id:r,method:`bitcoin`,args:i.JSONUint8Array.wrap(n),bitcoinProviderMethod:e};return new Promise((e,t)=>{let n=a=>{let o=this._parseMessage?this._parseMessage(a.data):a.data;if(!o||o.type!==`proxy-request-response`||o.id!==r)return;this._eventListener.removeMessageListener(n);let s=i.JSONUint8Array.unwrap(o.result);if(!s){t(Error(`Result is null`));return}if(s.error){t(Error(s.error));return}e(s.return)};this._eventListener.addMessageListener(n),this._eventListener.postMessage(a)})})}getAccounts(){return this._requestMethod(`getAccounts`,[])}requestAccounts(){return t(this,void 0,void 0,function*(){return this._requestMethod(`requestAccounts`,[])})}disconnect(){return t(this,void 0,void 0,function*(){return this._requestMethod(`disconnect`,[])})}getNetwork(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getNetwork`,[])})}switchNetwork(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`switchNetwork`,[e])})}getChain(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getChain`,[])})}switchChain(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`switchChain`,[e])})}getPublicKey(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getPublicKey`,[])})}getBalance(){return t(this,void 0,void 0,function*(){return this._requestMethod(`getBalance`,[])})}getInscriptions(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`getInscriptions`,[e,n])})}signMessage(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`signMessage`,[e,n])})}sendBitcoin(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`sendBitcoin`,[e,n])})}pushTx(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`pushTx`,[e])})}pushPsbt(e){return t(this,void 0,void 0,function*(){return this._requestMethod(`pushPsbt`,[e])})}signPsbt(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`signPsbt`,[e,n])})}signPsbts(e,n){return t(this,void 0,void 0,function*(){return this._requestMethod(`signPsbts`,[e,n])})}getAddress(){return t(this,void 0,void 0,function*(){return(yield this.getAccounts())[0]})}connectWallet(){return t(this,void 0,void 0,function*(){return this.requestAccounts()})}};e.BitcoinProvider=m})),Mv=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Av(),e),n(kv(),e),n(Ov(),e),n(jv(),e)})),Nv=a(((e,t)=>{(function(n,r){function i(e){return e.default||e}typeof define==`function`&&define.amd?define([],function(){var e={};return r(e),i(e)}):typeof e==`object`?(r(e),typeof t==`object`&&(t.exports=i(e))):(function(){var e={};r(e),n.Long=i(e)})()})(typeof globalThis<`u`?globalThis:typeof self<`u`?self:e,function(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=null;try{t=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 n(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}n.prototype.__isLong__,Object.defineProperty(n.prototype,`__isLong__`,{value:!0});function r(e){return(e&&e.__isLong__)===!0}function i(e){var t=Math.clz32(e&-e);return e?31-t:t}n.isLong=r;var a={},o={};function s(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=l(e,0,!0),i&&(o[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=a[e],r)?r:(n=l(e,e<0?-1:0,!1),i&&(a[e]=n),n))}n.fromInt=s;function c(e,t){if(isNaN(e))return t?b:y;if(t){if(e<0)return b;if(e>=g)return T}else{if(e<=-_)return E;if(e+1>=_)return w}return e<0?c(-e,t).neg():l(e%h|0,e/h|0,t)}n.fromNumber=c;function l(e,t,r){return new n(e,t,r)}n.fromBits=l;var u=Math.pow;function d(e,t,n){if(e.length===0)throw Error(`empty string`);if(typeof t==`number`?(n=t,t=!1):t=!!t,e===`NaN`||e===`Infinity`||e===`+Infinity`||e===`-Infinity`)return t?b:y;if(n||=10,n<2||36<n)throw RangeError(`radix`);var r;if((r=e.indexOf(`-`))>0)throw Error(`interior hyphen`);if(r===0)return d(e.substring(1),t,n).neg();for(var i=c(u(n,8)),a=y,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),l=parseInt(e.substring(o,o+s),n);if(s<8){var f=c(u(n,s));a=a.mul(f).add(c(l))}else a=a.mul(i),a=a.add(c(l))}return a.unsigned=t,a}n.fromString=d;function f(e,t){return typeof e==`number`?c(e,t):typeof e==`string`?d(e,t):l(e.low,e.high,typeof t==`boolean`?t:e.unsigned)}n.fromValue=f;var p=65536,m=1<<24,h=p*p,g=h*h,_=g/2,v=s(m),y=s(0);n.ZERO=y;var b=s(0,!0);n.UZERO=b;var x=s(1);n.ONE=x;var S=s(1,!0);n.UONE=S;var C=s(-1);n.NEG_ONE=C;var w=l(-1,2147483647,!1);n.MAX_VALUE=w;var T=l(-1,-1,!0);n.MAX_UNSIGNED_VALUE=T;var E=l(0,-2147483648,!1);n.MIN_VALUE=E;var D=n.prototype;D.toInt=function(){return this.unsigned?this.low>>>0:this.low},D.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},D.toString=function(e){if(e||=10,e<2||36<e)throw RangeError(`radix`);if(this.isZero())return`0`;if(this.isNegative())if(this.eq(E)){var t=c(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}else return`-`+this.neg().toString(e);for(var i=c(u(e,6),this.unsigned),a=this,o=``;;){var s=a.div(i),l=(a.sub(s.mul(i)).toInt()>>>0).toString(e);if(a=s,a.isZero())return l+o;for(;l.length<6;)l=`0`+l;o=``+l+o}},D.getHighBits=function(){return this.high},D.getHighBitsUnsigned=function(){return this.high>>>0},D.getLowBits=function(){return this.low},D.getLowBitsUnsigned=function(){return this.low>>>0},D.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=this.high==0?this.low:this.high,t=31;t>0&&!(e&1<<t);t--);return this.high==0?t+1:t+33},D.isSafeInteger=function(){var e=this.high>>21;return e?this.unsigned?!1:e===-1&&!(this.low===0&&this.high===-2097152):!0},D.isZero=function(){return this.high===0&&this.low===0},D.eqz=D.isZero,D.isNegative=function(){return!this.unsigned&&this.high<0},D.isPositive=function(){return this.unsigned||this.high>=0},D.isOdd=function(){return(this.low&1)==1},D.isEven=function(){return(this.low&1)==0},D.equals=function(e){return r(e)||(e=f(e)),this.unsigned!==e.unsigned&&this.high>>>31==1&&e.high>>>31==1?!1:this.high===e.high&&this.low===e.low},D.eq=D.equals,D.notEquals=function(e){return!this.eq(e)},D.neq=D.notEquals,D.ne=D.notEquals,D.lessThan=function(e){return this.comp(e)<0},D.lt=D.lessThan,D.lessThanOrEqual=function(e){return this.comp(e)<=0},D.lte=D.lessThanOrEqual,D.le=D.lessThanOrEqual,D.greaterThan=function(e){return this.comp(e)>0},D.gt=D.greaterThan,D.greaterThanOrEqual=function(e){return this.comp(e)>=0},D.gte=D.greaterThanOrEqual,D.ge=D.greaterThanOrEqual,D.compare=function(e){if(r(e)||(e=f(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?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},D.comp=D.compare,D.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(x)},D.neg=D.negate,D.add=function(e){r(e)||(e=f(e));var t=this.high>>>16,n=this.high&65535,i=this.low>>>16,a=this.low&65535,o=e.high>>>16,s=e.high&65535,c=e.low>>>16,u=e.low&65535,d=0,p=0,m=0,h=0;return h+=a+u,m+=h>>>16,h&=65535,m+=i+c,p+=m>>>16,m&=65535,p+=n+s,d+=p>>>16,p&=65535,d+=t+o,d&=65535,l(m<<16|h,d<<16|p,this.unsigned)},D.subtract=function(e){return r(e)||(e=f(e)),this.add(e.neg())},D.sub=D.subtract,D.multiply=function(e){if(this.isZero())return this;if(r(e)||(e=f(e)),t)return l(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return this.unsigned?b:y;if(this.eq(E))return e.isOdd()?E:y;if(e.eq(E))return this.isOdd()?E:y;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(v)&&e.lt(v))return c(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=e.high>>>16,u=e.high&65535,d=e.low>>>16,p=e.low&65535,m=0,h=0,g=0,_=0;return _+=o*p,g+=_>>>16,_&=65535,g+=a*p,h+=g>>>16,g&=65535,g+=o*d,h+=g>>>16,g&=65535,h+=i*p,m+=h>>>16,h&=65535,h+=a*d,m+=h>>>16,h&=65535,h+=o*u,m+=h>>>16,h&=65535,m+=n*p+i*d+a*u+o*s,m&=65535,l(g<<16|_,m<<16|h,this.unsigned)},D.mul=D.multiply,D.divide=function(e){if(r(e)||(e=f(e)),e.isZero())throw Error(`division by zero`);if(t)return!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1?this:l((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(this.isZero())return this.unsigned?b:y;var n,i,a;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return b;if(e.gt(this.shru(1)))return S;a=b}else{if(this.eq(E))return e.eq(x)||e.eq(C)?E:e.eq(E)?x:(n=this.shr(1).div(e).shl(1),n.eq(y)?e.isNegative()?x:C:(i=this.sub(e.mul(n)),a=n.add(i.div(e)),a));if(e.eq(E))return this.unsigned?b:y;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();a=y}for(i=this;i.gte(e);){n=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(n)/Math.LN2),s=o<=48?1:u(2,o-48),d=c(n),p=d.mul(e);p.isNegative()||p.gt(i);)n-=s,d=c(n,this.unsigned),p=d.mul(e);d.isZero()&&(d=x),a=a.add(d),i=i.sub(p)}return a},D.div=D.divide,D.modulo=function(e){return r(e)||(e=f(e)),t?l((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},D.mod=D.modulo,D.rem=D.modulo,D.not=function(){return l(~this.low,~this.high,this.unsigned)},D.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},D.clz=D.countLeadingZeros,D.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},D.ctz=D.countTrailingZeros,D.and=function(e){return r(e)||(e=f(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},D.or=function(e){return r(e)||(e=f(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},D.xor=function(e){return r(e)||(e=f(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},D.shiftLeft=function(e){return r(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):l(0,this.low<<e-32,this.unsigned)},D.shl=D.shiftLeft,D.shiftRight=function(e){return r(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},D.shr=D.shiftRight,D.shiftRightUnsigned=function(e){return r(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):l(e===32?this.high:this.high>>>e-32,0,this.unsigned)},D.shru=D.shiftRightUnsigned,D.shr_u=D.shiftRightUnsigned,D.rotateLeft=function(e){var t;return r(e)&&(e=e.toInt()),(e&=63)==0?this:e===32?l(this.high,this.low,this.unsigned):e<32?(t=32-e,l(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(e-=32,t=32-e,l(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},D.rotl=D.rotateLeft,D.rotateRight=function(e){var t;return r(e)&&(e=e.toInt()),(e&=63)==0?this:e===32?l(this.high,this.low,this.unsigned):e<32?(t=32-e,l(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(e-=32,t=32-e,l(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},D.rotr=D.rotateRight,D.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},D.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},D.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},D.toBytesLE=function(){var e=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},D.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},typeof BigInt==`function`&&(n.fromBigInt=function(e,t){return l(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},n.fromValue=function(e,t){return typeof e==`bigint`?n.fromBigInt(e,t):f(e,t)},D.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e}),e.default=n})})),Pv=a((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.KeplrWalletConnectV2=void 0;var i=Mv(),a=(x(),n(S)),o=r(Nv()),s=r(I());e.KeplrWalletConnectV2=class{constructor(e,n){this.signClient=e,this.options=n,this.defaultOptions={},this.version=`0.12.20`,this.mode=`walletconnect`,this.storeKey=`keplr_wallet_connect_v2_key`,this.storeSuggestChainKey=`keplr_wallet_connect_v2_suggest_chain_key`,this.storeSuggestTokenKey=`keplr_wallet_connect_v2_suggest_token_key`,this.ethereum=new c,this.starknet={},this.bitcoin={},n.sessionProperties&&this.saveKeys(n.sessionProperties),e.on(`session_event`,e=>{e.params.event.name===`keplr_accountsChanged`&&(this.saveKeys(e.params.event.data),window.dispatchEvent(new Event(`keplr_keystorechange`)))}),e.on(`session_delete`,()=>t(this,void 0,void 0,function*(){localStorage.removeItem(this.getKeyLastSeenKey()),localStorage.removeItem(this.getSuggestChainKey()),localStorage.removeItem(this.getSuggestTokenKey())}))}saveKeys(e){if(e.hasOwnProperty(`keys`)){let t=JSON.parse(e.keys);t.length>0&&t.forEach(e=>{e.hasOwnProperty(`chainId`)&&this.saveLastSeenKey(e.chainId,this.convertToKeplrGetKeyWalletConnectV2Response(e))})}}convertToKeplrGetKeyWalletConnectV2Response(e){if(!e.hasOwnProperty(`name`)||!e.hasOwnProperty(`algo`)||!e.hasOwnProperty(`pubKey`)||!e.hasOwnProperty(`address`)||!e.hasOwnProperty(`bech32Address`)||!e.hasOwnProperty(`ethereumHexAddress`)||!e.hasOwnProperty(`isNanoLedger`))throw Error(`Invalid data`);return{name:e.name,algo:e.algo,pubKey:e.pubKey,address:e.address,bech32Address:e.bech32Address,ethereumHexAddress:e.ethereumHexAddress,isNanoLedger:e.isNanoLedger===`true`}}getLastSession(){let e=this.signClient.session.getAll().length-1;return this.signClient.session.getAll()[e]}getCurrentTopic(){let e=this.getLastSession();if(!e)throw Error(`No session`);return e.topic}getKeyLastSeenKey(){let e=this.getCurrentTopic();return`${this.storeKey}/${e}-key`}getLastSeenKey(e){let t=this.getAllLastSeenKey();if(t)return t[e]}getAllLastSeenKey(){let e=localStorage.getItem(this.getKeyLastSeenKey());if(e)return JSON.parse(e)}saveLastSeenKey(e,t){let n=this.getAllLastSeenKey();n||={},n[e]=t,this.saveAllLastSeenKey(n)}saveAllLastSeenKey(e){localStorage.setItem(this.getKeyLastSeenKey(),JSON.stringify(e))}getSuggestChainKey(){let e=this.getCurrentTopic();return`${this.storeSuggestChainKey}/${e}-key`}getRegisteredSuggestChain(e){let t=this.getAllRegisteredSuggestChain();if(t)return t[e]}getAllRegisteredSuggestChain(){let e=localStorage.getItem(this.getSuggestChainKey());if(e)return JSON.parse(e)}saveRegisteredSuggestChain(e){let t=this.getAllRegisteredSuggestChain();t||={},t[e.chainId]=e,this.saveAllRegisteredSuggestChain(t)}saveAllRegisteredSuggestChain(e){localStorage.setItem(this.getSuggestChainKey(),JSON.stringify(e))}getSuggestTokenKey(){let e=this.getCurrentTopic();return`${this.storeSuggestTokenKey}/${e}-key`}getRegisteredSuggestToken(e){let t=this.getAllRegisteredSuggestToken();if(t)return t[e]}getAllRegisteredSuggestToken(){let e=localStorage.getItem(this.getSuggestTokenKey());if(e)return JSON.parse(e)}saveRegisteredSuggestToken(e,t,n){let r=this.getAllRegisteredSuggestToken();r||={},r[t]={chainId:e,contractAddress:t,viewingKey:n},this.saveAllRegisteredSuggestToken(r)}saveAllRegisteredSuggestToken(e){localStorage.setItem(this.getSuggestTokenKey(),JSON.stringify(e))}sendCustomRequest(e){return t(this,void 0,void 0,function*(){return yield this.signClient.request(e)})}getNamespaceChainId(){let e=this.getLastSession();if(e&&e.namespaces.hasOwnProperty(`cosmos`)&&e.namespaces.cosmos.hasOwnProperty(`accounts`)){let t=e.namespaces.cosmos.accounts[0].split(`:`);return`${t[0]}:${t[1]}`}return`cosmos:cosmoshub-4`}checkDeepLink(){let e=localStorage.getItem(`wallet-connect-v2-mobile-link`);e&&(window.location.href=JSON.parse(e).href)}ping(){return Promise.resolve()}changeKeyRingName(e){throw Error(`Not yet implemented`)}disable(e){throw Error(`Not yet implemented`)}enable(e){return t(this,void 0,void 0,function*(){typeof e==`string`&&(e=[e]);let n=yield this.getAllLastSeenKey();if(n&&e.every(e=>Object.keys(n).includes(e)))return;this.checkDeepLink();let r=this.getCurrentTopic();if(!this.getNamespaceChainId())throw Error(`No Namespace chain id`);let i={topic:r,chainId:this.getNamespaceChainId(),request:{method:`keplr_enable`,params:{chainId:e}}};return yield this.sendCustomRequest(i),new Promise(n=>t(this,void 0,void 0,function*(){for(;;){yield new Promise(e=>setTimeout(e,100));let t=this.getLastSession();if(t&&t.namespaces.hasOwnProperty(`cosmos`)&&t.namespaces.cosmos.hasOwnProperty(`accounts`)&&t.namespaces.cosmos.accounts.some(t=>{let n=t.replace(`cosmos:`,``).split(`:`)[0];return e.includes(n)})){n();return}}}))})}enigmaDecrypt(e,t,n){throw Error(`Not yet implemented`)}enigmaEncrypt(e,t,n){throw Error(`Not yet implemented`)}experimentalSignEIP712CosmosTx_v0(e,t,n,r,i={}){throw Error(`Not yet implemented`)}experimentalSuggestChain(e){return t(this,void 0,void 0,function*(){if(e.features?.includes(`stargate`)||e.features?.includes(`no-legacy-stdTx`),this.getRegisteredSuggestChain(e.chainId))return;this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_experimentalSuggestChain`,params:{chainInfo:e}}};yield this.sendCustomRequest(t),this.saveRegisteredSuggestChain(e)})}getChainInfosWithoutEndpoints(){throw Error(`Not yet implemented`)}getChainInfoWithoutEndpoints(e){throw Error(`Not yet implemented`)}getEnigmaPubKey(e){throw Error(`Not yet implemented`)}getEnigmaTxEncryptionKey(e,t){throw Error(`Not yet implemented`)}getEnigmaUtils(e){throw Error(`Not yet implemented`)}getKey(e){return t(this,void 0,void 0,function*(){let t=this.getLastSeenKey(e);if(t)return{algo:t.algo,bech32Address:t.bech32Address,ethereumHexAddress:t.ethereumHexAddress,address:a.Buffer.from(t.address,`base64`),name:t.name,pubKey:a.Buffer.from(t.pubKey,`base64`),isNanoLedger:t.isNanoLedger,isKeystone:!1};let n=this.getLastSession();if(n&&n.sessionProperties&&n.sessionProperties.chainId===e)return{algo:n.sessionProperties.algo,bech32Address:n.sessionProperties.bech32Address,ethereumHexAddress:n.sessionProperties.ethereumHexAddress,address:a.Buffer.from(n.sessionProperties.address,`base64`),name:n.sessionProperties.name,pubKey:a.Buffer.from(n.sessionProperties.pubKey,`base64`),isNanoLedger:n.sessionProperties.isNanoLedger===`true`,isKeystone:!1};let r={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_getKey`,params:{chainId:e}}},i=yield this.sendCustomRequest(r);return Object.assign(Object.assign({},i),{pubKey:a.Buffer.from(i.pubKey,`base64`),address:a.Buffer.from(i.address,`base64`),isKeystone:!1})})}getKeysSettled(e){return t(this,void 0,void 0,function*(){let n=e.map(e=>t(this,void 0,void 0,function*(){return yield this.getKey(e)}));return yield Promise.allSettled(n)})}getOfflineSigner(e,t){return new i.CosmJSOfflineSigner(e,this,t)}getOfflineSignerAuto(e,n){return t(this,void 0,void 0,function*(){return(yield this.getKey(e)).isNanoLedger?new i.CosmJSOfflineSignerOnlyAmino(e,this,n):new i.CosmJSOfflineSigner(e,this,n)})}getOfflineSignerOnlyAmino(e,t){return new i.CosmJSOfflineSignerOnlyAmino(e,this,t)}getSecret20ViewingKey(e,t){throw Error(`Not yet implemented`)}sendTx(e,t,n){if(this.options.sendTx)return this.options.sendTx(e,t,n);throw Error(`send tx is not delivered by options`)}signAmino(e,n,r,i){return t(this,void 0,void 0,function*(){this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signAmino`,params:{chainId:e,signer:n,signDoc:r,signOptions:i}}};return yield this.sendCustomRequest(t)})}signArbitrary(e,t,n){this.checkDeepLink();let r={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signArbitrary`,params:{chainId:e,signer:t,type:typeof n==`string`?`string`:`Uint8Array`,data:typeof n==`string`?n:a.Buffer.from(n).toString(`base64`)}}};return this.sendCustomRequest(r)}signDirect(e,n,r,i){return t(this,void 0,void 0,function*(){this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signDirect`,params:{chainId:e,signer:n,signDoc:{chainId:r.chainId,accountNumber:r.accountNumber?.toString(),bodyBytes:r.bodyBytes?a.Buffer.from(r.bodyBytes).toString(`base64`):null,authInfoBytes:r.authInfoBytes?a.Buffer.from(r.authInfoBytes).toString(`base64`):null},signOptions:i}}},s=yield this.sendCustomRequest(t);return{signature:s.signature,signed:{chainId:s.signed.chainId??``,accountNumber:s.signed.accountNumber?o.default.fromString(s.signed.accountNumber):new o.default(0),bodyBytes:s.signed.bodyBytes?a.Buffer.from(s.signed.bodyBytes,`base64`):new Uint8Array([]),authInfoBytes:s.signed.authInfoBytes?a.Buffer.from(s.signed.authInfoBytes,`base64`):new Uint8Array([])}}})}signDirectAux(e,t,n,r){throw Error(`Not yet implemented`)}signEthereum(e,n,r,i){return t(this,void 0,void 0,function*(){this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_signEthereum`,params:{chainId:e,signer:n,data:r,type:i}}};return yield this.sendCustomRequest(t)})}signICNSAdr36(e,t,n,r,i){throw Error(`Not yet implemented`)}suggestToken(e,n,r){return t(this,void 0,void 0,function*(){if(this.getRegisteredSuggestToken(n))return;this.checkDeepLink();let t={topic:this.getCurrentTopic(),chainId:this.getNamespaceChainId(),request:{method:`keplr_suggestToken`,params:{chainId:e,contractAddress:n,viewingKey:r}}};yield this.sendCustomRequest(t),this.saveRegisteredSuggestToken(e,n,r)})}verifyArbitrary(e,t,n,r){throw Error(`Not yet implemented`)}sendEthereumTx(e,t){throw Error(`Not yet implemented`)}suggestERC20(e,t){throw Error(`Not yet implemented`)}getStarknetKey(e){throw Error(`Not yet implemented`)}getStarknetKeysSettled(e){throw Error(`Not yet implemented`)}signStarknetTx(){throw Error(`Not yet implemented`)}signStarknetDeployAccountTransaction(e,t){throw Error(`Not yet implemented`)}getBitcoinKey(e){throw Error(`Not yet implemented`)}getBitcoinKeysSettled(e){throw Error(`Not yet implemented`)}signPsbt(e,t,n){throw Error(`Method not implemented.`)}signPsbts(e,t,n){throw Error(`Method not implemented.`)}};var c=class extends s.default{constructor(){super(),this.chainId=null,this.selectedAddress=null,this.networkVersion=null,this.isKeplr=!0,this.isMetaMask=!0}isConnected(){throw Error(`Method not implemented.`)}request({}){throw Error(`Not yet implemented`)}enable(){throw Error(`Method not implemented.`)}net_version(){throw Error(`Method not implemented.`)}}}))(),Fv=class extends mv{keplr=void 0;constructor(e){super(e)}initKeplrWCClient(e,t){this.keplr=new Pv.KeplrWalletConnectV2(e,t),localStorage.setItem(`wallet-connect-v2-mobile-link`,JSON.stringify(this.env?.os===`android`?{name:`Keplr`,href:`intent://wcV2#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`}:{name:`Keplr`,href:`keplrwallet://wcV2`}))}async connect(e,t){this.signClient===void 0&&await this.init(),this.qrUrl.state!==`Init`&&this.setQRState(H.Init);let n=typeof e==`string`?[`cosmos:${e}`]:e.map(e=>`cosmos:${e}`);this.restorePairings();let r=this.pairing;if(this.logger?.debug(`Restored active pairing topic is:`,r?.topic),this.signClient&&r?.topic){let e=this.signClient.session.getAll(),t=e.find(e=>e.pairingTopic===r.topic);if(e.length>0&&t){this.initKeplrWCClient(this.signClient,{sessionProperties:t.sessionProperties});return}}this.displayQRCode&&this.setQRState(H.Pending);let i={cosmos:{methods:[`cosmos_getAccounts`,`cosmos_signAmino`,`cosmos_signDirect`,...this.requiredNamespaces?.methods??[]],chains:n,events:[`chainChanged`,`accountsChanged`,...this.requiredNamespaces?.events??[]]}},a;try{this.logger?.debug(`Connecting chains:`,n),a=await this.signClient?.connect({pairingTopic:r?.topic,requiredNamespaces:i,...t}),this.qrUrl.data=a.uri,this.logger?.debug(`Using QR URI:`,a.uri),this.displayQRCode&&this.setQRState(H.Done)}catch(e){this.logger?.error(`Client connect error: `,e),this.displayQRCode&&this.setQRError(e);return}this.redirect&&this.openApp();try{let e=await a.approval();this.logger?.debug(`Established session:`,e),this.sessions.push(e),this.restorePairings(),this.signClient&&this.initKeplrWCClient(this.signClient,{sessionProperties:e.sessionProperties})}catch(e){throw this.logger?.error(`Session approval error: `,e),await this.deleteInactivePairings(),e?e.code==5001?Mn:e:(this.displayQRCode&&this.setQRError(On),Error(`Proposal Expired`))}finally{!r&&this.qrUrl.message!==On.message&&this.setQRState(H.Init)}}async enable(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);await this.keplr.enable(e)}async getSimpleAccount(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);await this.enable(e);let{address:t,username:n}=await this.getAccount(e);return{namespace:`cosmos`,chainId:e,address:t,username:n}}async getAccount(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);let t=await this.keplr.getKey(e);return{username:t.name,address:t.bech32Address,algo:t.algo,pubkey:t.pubKey,isNanoLedger:t.isNanoLedger}}async getOfflineSigner(e,t){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);switch(t){case`amino`:return this.getOfflineSignerAmino(e);case`direct`:return this.getOfflineSignerDirect(e);default:return this.getOfflineSignerAmino(e)}}getOfflineSignerAmino(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return this.keplr.getOfflineSignerOnlyAmino(e)}getOfflineSignerDirect(e){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return this.keplr.getOfflineSigner(e)}async signAmino(e,t,n,r){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return await this.keplr.signAmino(e,t,n,r)}async signDirect(e,t,n,r){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return await this.keplr.signDirect(e,t,{...n,accountNumber:jh.default.fromString(n.accountNumber?.toString()??`0`)},r)}async signArbitrary(e,t,n){if(!this.keplr)throw Error(`Keplr Wallet is not initialized`);return await this.keplr.signArbitrary(e,t,n)}},Iv=class extends Ih{constructor(e,t){super(e,t,Fv)}},Lv=[new class extends hv{constructor(e,t){super(e,Iv,Fv),this.preferredEndpoints=t}async initClient(e){try{let t=await xh.Keplr.getKeplr(),n=window.navigator.userAgent;t&&n.includes(`KeplrWalletMobile`)?this.initClientDone(t?new Nh(t):void 0):await super.initClient(e)}catch(t){if(t instanceof Error){if(t.message===`Client Not Exist!`){await super.initClient(e);return}this.initClientError(t)}}}}({name:`keplr-mobile`,prettyName:`Keplr Mobile`,logo:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAB+ASURBVHgB7Z1NbFxVlsfPKzsfTUJc6baZjkTcFTELJLA6ySzQJJGwe9FSmAXxzAJ604QN9GJomgVsoEUi0RtY8NWLhg2kN8NqKlkMGbHARgpILDoYGSQ2KIWNFIQNKZskhNiu1/f/PpxyuapcH/e+e+595yc9XrnKuFKv3jn3fN+AhK4pla8Uq3SjuI0GiiEFxYCCUvpaSGH0OCAaqgVhMX0+CAM8Ltb/nSD6OSi2e68w+p2w7e/wJaiqz1ht/zthNWzyO2EQVtb/Shh8VfeS+pvx362p/xdPrNJqpUg7q5XJvVu8l9BIQMI6EOxrtFIiKhxUgqwEm34FIVY3YCkV8lTABa5AOYQVKBUokUIYQMF8VaCgAoWxmwZnRFHcIpcKoFi+XNpO2w6qG6KkbpJfq5tECXxQcnelFbojUAognKHY8vhUHdODNFj5ZnJvhXKG9woAq/pVWj2oHuK4X33kcRF0oTnriuEDdUwvTo5Mk+d4qQBGyt9iRR9XDx9UH/GgCLzQB9PqOKfciumFyTtmyDO8UQDD5YXxIBb4E+KnCyZQcaAKRQqh9qovysBpBZCY90+qhycoNvEFIRNiZVA7PUDbpl2OHTipANLVXpn5J8W8F2yjlMHbAzRw2kVF4JQCgOCr0/PqGCdBYIaLisAJBfDL8pXSKq2+RSL4ggO4pAhYK4DEx8eK/ycSBMdwQRGwVQAj5757MqyFp8THF1wmDRaqrMHbxBB2CkDMfcFHoAiUNTDBzRooECOw6q/S2ickwi94BmpT1MJ2SQWynydGsLAAZNUX8gQna8C6BSCrvpA3Emvgk+HyN9aD29YsAInwC0IkgK/sosHTtlqUrSgAmPxrtFoOpXxXEKy6BJkrgJHylYMhrU1Jek8QbpGkCyezbjLKNAbwi3OLj4TK9xHhF4SNIC4QUpB5XCAzBTB87rvng1r4NgmC0IaBl7NMFWbiAkD4qVY7RYIgdMqpxcmR02QY4wpAabOXSSL9gtALxpWAUQUwUl58S/k2J0kQhJ5AQ9HC5PCjZAhjMQCY/SL8gtAfkKGR2Io2ghEFID6/IOgjVC60qcCgdhdAhF8QjKE9JqBVAcQ9/LVXSBAEI4SF4OR3Dw6fIU1oUwBxhR+KfIR+2H9bgYa24Qho9LaB6Lk96jGO9PWU9PXGx41/rx/mr9c2Pbe0UlNHWPdzGD1X//vL6rnl5Pn49fhxs78ndEdA4SFdFYNaFEBc2782JfP4WwNBhJDiuFM9TgV9tE7gUyHPA1AEc9fXIsUwn5y/Tp7DIYqiLdVBGjyko3eg7zsu3lBz7RMR/ljIx4YG1Xkgeoxz/DOruSvO8NnSaqQYcIZCwDl9Lu8owZ3ZRYMT/XYRDlKfJC29JcoZEOpjw9vpnqEBulcJOQQ9Tyt4FuC6gqPD2zY8D9diNlEGHy2uKIshVg55Ap2012LZe4r6oK87Nk9BP9yEuCGPqPMxdYiw8wJK4YJSBlAIUAYfqnM+WHtqcfKXPctgz3dxPMZrzdvOPvjkD4/uFIF3lFQhnL98UymFm5GV4Cl9xQN6vqtHyouXfPP7U6E/vm/7JrNTcBtYBO/M/eSrMsBW5hPUAz0pAJ+KfUTo80eqDM5f/smjgGJvrkDXCiCZ4HuJHAf+/MOjO+h3SvjFvM8ncBPeVUrgpS+u+2AV9OQKdH3nu276Y5V/+u7bZLUXNvDO3I3IKnA8eNi1K9CVAhgpf3sypOAtchARfKEToAD+ePEHhy2C7lyBjhWAq9V+qLR77fDtIvhCV8AicNQ1qO6mwQOdFgh1XKKmhP9514QfK/7UxF4RfqFrEBj+x29/Ht1DjlFMCoQ6oiMLwLXAH6ryzty3R0pwBS2gDPnEhapT1oAKCB7oJCDYkYRg9SdHePyunfT+RFGEX9AG7iXXrIFkr80t2dICcGX1Rz4fq76Y+4JJ3r18k/48e9UVa2BCZQWm2/3ClsukC6s/An3i6wtZ8MC+7XT2WDG65xxgS9ltawG4sPrD3z97bEiKeYRMQVzg9x8vu9CF2NYKaKvGuK/+xyNtLMIvZA/iArj3YBFwJgjDE21fb/UC99Ufwv935fMLgm0eUZYAYgNMaVsX0NICWKOVcWIKzP6/Hr6dBIEDKDRLh5cwpHi1drPlzlwtLQCuNf+jkeklaT6OLCWDQGejsV3xANCvk2h54yDRRjArEa5cOkoNWR0I1ZAj7h0+22+mrrDMDmB82MLkyKEWr21mpPztQWxVTMwQ4ecDhPvC4k36fGktGuo5m8zt0w2UwlgyiSmdysRVKeDzT0xV1yckM6NpMLCF3VJ4Mpo6xowXxnaL8Fviw2TUFibsQNiXM+qjx/vgvXG8lDwHRZDOb+BkeuPePHPf7XTiwhJxIwkGTm96vtkvczT/n7n7Nhfrsp0Fqxl65bMW+G6B0GGmw0Pq4JKbf3b2Gr355Y/EiYCCysLk8IHNzzfA0fwfTUoxBbNA6NEFl664roGU3GN3/YxFQRhcAW41As02FNlkPynhHydmwO8XzIDgFVYrV4W+HqTicMAqgMWIjj5bIEV9+L3viROJbG9QAM1spgeJEfgixe/XD4Qdvuq//t939OIX170aow1L5omLVyMBtBWVxz3L0GXdJNubXIDh8gIbZ09Mf72kq/3f1MHVpzcBLAEIY9YxAoapwU1FQRuuiBL+cWKEBP30gNUd1Wrpap8n4QeIa6CfH+csQbryNV4Fa8WrtHqw/olGlThOTIC2tunD+UBq5uNgXKqaCalb8JyK0GeZpz+a1C8woq0CuJ+YwExzOkW94Odni6zOeEO5P4jQZ2mW87Jka+P1PzUqgIPEAIZa0wlE8DsjHfGVVZqO1/1c2LDIrysAdP+pE4t8GzbsEDpHBL97YiWQnWvEyAooFsuXS+kP6wpglVZLxADx/TsHUWb4tSL4vYHrh+AoNgQxDaey5e20bd3Sr3cBxokBEvnvDMysR54768i2jzxx8YdMLAEuC1utrsy/XgH8miyDtMlx5hNWbIOVHoKfx3SeSbAbkOmYAFzboW32i9rCIFiX9fp/jXX///g+HheII/Xm/jyfwhJvwPXFjD+T2QEscA8xiG8VwrCpC2A9AyDBv+bAzBdz3zxQrIgJmKwT4DBDUNmNpfRxpACK5StY/a1aAAj+SepvI3NJpBorv5j72QA34KUvzLXy4h5nYOUWS7HMxwpgsKE80AZHhsX3rwd9+BNTVyS6b4E3ku5IU3BwA67RSgnnSAGEFFj3/8X8j4EvinJV+KOy6tsDmQFTrgCPUeKFaNGPFEBgefqPmP8xmLyDVf8NZtNk8gjiAaZcAQ5uQEjhLRdAWQAlsoiY/zA7b9BvpqoS4WeESVfAthsQhPGiX4j/U7PqAhzfl9/VP07v/aDM/qsk8AMFVyawbfHWCoUhnFML4Fdkkbya/3PRGOkrmZSiCr1halSa7Xt+gwVAFlOATNIimZNG+cXk548JKwBFQTaVQEBBCedU8kpkiXuHBihvoIxXovzuYMoKuIdBc5B1C+BIzsx/pPhM+ZWCOUzM+bdpAaT7fgzGVYD25pfnxf9PW0+lsMdN0C2IugCd7qrtex/VgIWddMPa6g/zPw/+fxrsE+F3G93B2qFkM1RbVJXsF1ZpsESWwI6wvjOXjJ+SYJ/7nDcwM+CoxRqYbTRQtLr8+u7/p5V9Ivx+AAtO93dpc0oQWgAKNvsAOO3sqhsIPzr5JNLvF9gwVSc2s2BIBQ4qE6Bo6xb1NQUIX/HZWV4tvHG/RWfm5oeLNzntZsMKuAGP3/Uz0oXtRXAwbQrIGgRAfAwAQvhR2ssNjFp7YWx3R7+L+QNzMnykKbrHhqWBQFtuIiTQigLw0fznKvxgTxfKVjZjbQ3SubqzOWNDdmJhqAWw9k37Zv5zFn7QzcaYogDao9sKuNPi9bb2zvs9SgEi4Pcs826+bq63DGZtz2dLa6QTW+nwIAyLBVvDQHxxAVyJ9sPX7JQ81Gf0A4KkOrFlcaEl2Jqq7+aG5MpcMkXWhVRfNzeZD9+NSXQH7MYsLoYWYwBuWwCuVfgNSRBQKzq/d5vXu2BjGIjrN5hrwt/L9RYl0J7ZJb2ZABvXOwjX9lr5ll33MWH2u1Te28v1lkBge3S7fXZkwlIMwOUMAPr5s9pXXhe9+PQ+l2nrQHelpC2ZsKQA3FxdMMnHxZHdvUye2SOBwLYsr+hWAHZkwsq7uhhlRg24q5N8erMAJBXYDs0hAKsKIPNSYNcsAJh7/824ym8rejHnJQaQLTaut1oWUAiUfTuwSzcXar8R8Xe5rbcXC2BMYgBt0e0C2AkCBkXJAmwBgn6uD/ToxQKQNGB7ljQvCLbcYgkCtgFBv3ccb4vtx5cXJZAde/KkAFxgLtoc0v3x3f1YW0dlz8bMyI0F4MKqkvr9PtDP3EWpBWiNiby9DdnI/B1dSAFi5fdlkGc/QiypwGyxERy3oAB4WwDw+V0s9mnF0T4tAEkHNsfEEB8bi6NYAHXA73/Ro227+t15Bt+VWAHN2WNAMdooBy5kPRR0D+MVxSfTHzw8uoP65fi+/v+Gj4x6kCGB7GdeCTjEdC8QmP6up/wa0RHF16FEfMRE2s5CKjD7QiCOFoBvpj+A+a8jqmx7H3uumChmy0UMgCO+mf7gsbt2ki6evvs2EjbiS5FU5p+Cm++EbZ99M/1xjR/Q6LvDAhAr4BamNrXJRR0AN55jPs67F84e0x/WESvgFj4VSFmIAfBJA77ooen/jBJUEysJLIDHNO6J5zI+TU3ObSEQAn8+FfwAtPCaXKn/MrZLXAEyt629jS7Z3LoACPz5tHU3/P4z9+0h0+A9fMiB94O4AI6D1d+nwB8EEn5/FkEkmL94rzwrAZ+qI3NZCvxnjwJ/WQp/yv7kPfOoBCD8ptzYXLgAtmMA2NoZqT8fQJXe1MReK+kjvOf76r0fHtVXb+AC93ItZe2R3DV8+zDkA1YUgn2PW47K49/x+uHd0ar40hc/0tKKXxmVZhwd9ktkcmXDwe+HBeAyWHEv/vbn1oW/HvxbpiaKubAGfJuSlCsL4I0v3Qz8YaVFDv4P6uC6YQdcAlgDqENAevX85Z+0755jG8Q8fJuTmBsFgJXflS294j78QTq+b3t0din3DgF5YWxXdOB647pjUxU8XnI87XrEwxmJmSsAWxqUo++Pa4GgKAp47lF+NAZC4LEvqwyUF47UXYESgFWA89fqPHd9LTpcqcY8vs+sIrbxvefCAsBNl5Xvj9UbZjpSOmnTyJ2J6YjHo8k5jyO3Y4VA9MC+zSvpfKIQYCXMJ2coCQQW8RivoXDLphXhYxVkLhSAztUfNwFKQVNBz7tQ62J/F/51qixAvWL4f+VqzBpy86C0fJyP6L0C0F31h9x73nLf3KhXFkdp46psSgEc3+fnHgneL1m+NfwIdvB1kxTvFQDSUYLQDzD/fXXvvFYAMP196/cXssdX8x94rgBk9Rf6A8Fen2M+3iqALFN/gr/4vi+Ctwrgo0U/Ov4Eu/i+L4K3CsDVun+BD+hy9H0EmpcKIC03FYR+4NRxaQovFcB5TwZ+CPZAdWceCr68rAQ0Oe8PmQVYGM1q/qUUOBvmkx6BueSclgLrVPw+dv41wzsFYNr8R2ahXXYh7g/Y3AyEx/uT5/CaKIuNNAo1fm5sBsI5q0nOz+RkIxTvFIDt6P9ycpN2UoAEJQBlgANKAt1yo8nZR3BNUKuPbr/Pl9aix6mwcwKmf14UdOZ3Gr5skxf3/GV3cv+4Fjg+pI3/ZlgRY8lAEEShXVUI6RCW80mXniv7MNha/W0oQu+WGh+KfyAo9a7G/mSzT4wF4z6KG2b6m1/+SH9Th4sbr+Rp9QdeKQAIjI+TaeeTbcxw4AbFRGBuigCC/9zsNec3XMmL75/ilar7bGmNfAcC9pupK9EqywUUXR1+73vnhT9vqz/w6tPmpfUXq+2zarV94uJVqxYP/h1PXPwh2mLdh30W87b6A7EAHAYr7sRU1cr4bbznhLJEfOm45LD625h3mPknTme56QbCn4edaRpBfODEhWyVwFzynr7MWkBtBofV38b9640FYEqxuECqBLK4gXwTfoCa/7wWZnnzqfPe+w+BfOTjH8g0j3y87JXwI5vydA59/5TMFcC8oZX6c+n+i5QgUnGmePGL6951WXIS/lzEAEzh+rZTukCtgAlrCKa/Dzsr14Nhn5w6/iQG0AfS/38LE4IKv983XhjbTXnHQhZAv5bLW/pvK7bqWOyWdy/f9G66MqL+3AJ/Nq6xFxZAHtN/W6HTCuBUdaiDvAf+6slcASwbENY8pwBboasvwsfpymePFYkjtoKAmTp3SwbuJdn8ozk6qvR8m67M0fRPsVBOXS0EFDgf3ZEMQHN0jMjyaXMV7qZ/1goAsu9FHYAPjSgm+CyZuNMPPpn/XE3/lFykAU18yHmJATQFllE/GRKfhJ+z6Z+Si0IgMdezpZ/6CF/Sqxir5kLUPxcWgATssqUfIf7IAwsAfv/rh28nF8hNHYDk7bPjwz6i+D6kV1HtJyPYW2PlyizLpr2Z0c+q4np5Nfx+TFZ2AVuWsVgAOaCXm8t1/98Vvz/FlrVVCCnMvA5AKveyZbaH6iuXlbRLfn+KneB4WM28EhDozttj+y2hNb1cb1ctAIz3Qr7fNb/fhgsQohKQLKC7IxA76Qit6cWXd9UCwMrvYtDP1vW2cqXmRQFkSi/9F587aAG4FPRrJFdBQN2Ve9hcU2jNZzmIATx+106nW3xtVbNaiQHoDgLu2UZCG3oJMLkUqMWq7/p0H2tZgIDCJcoY3ebO2JBogHb0cr1dqdhExP+vjkX8m2ElCBgEFWvREp0fWCq9tqab6+1KvwaEHxF/12NANjMu1iRnVuNkEKR+RAm0pxuf3oXVPxV+H753m/GWQo0KVgaCiBuQLd34mNwDgD4JP7BlAQRh+BViAJYUgN4PfadYAG3pphiIcwDQN+EHNq+3FzEA8ICj+d+s6Kb4iqsL4KPwA5u7WmEmYIUsMKv5Q987NEhCa1wPAvoq/MBiELBqTWpwQ8LX1FXHj0AgOsDyvkloKzAX4MSFzjK+s8zagH0WfihbWzEXDAW1umxC8x0d1velHhEF0BIoXBenMfks/MDmzIUAzUAhhRWyhO4PDwtA8AffhR/YrAGooR3YVhYA6P7wUABSD+AHYyqm47vwA9tzFwsDtGZNAXxoYNcZTts9C70BRX722FAulLnNFOAqrVYKN2inNQWQBgJ18vhdPyPBXdDVB+HPQ4t3vG+DvRhAUcl+oTq51+rWYLqDdmk2QHAP9PO73tXXDbYD1hUl+5GNZasWAJjwgWTrZ7eA0sYkn7x9b5YVQLTwW3eyTERBYQGIFeAGcaR/SMVudlDe+NxuCrCCc6QAbKYCde1j34hYAfyBkp6a2JvLKk74/zYtgLDeAlCpwK/IIiYuhFgBvIG/n5dgXzNs+/8YBoJzpABstQSnmMqFihXAj3hs91Duv5vzl/WnwLuhUKtFdeGpBVAhi7wz9xOZABbAY5IWZENq8otlZqYGphs2WABoCiCLmPSHYGrKxiH2eWFsV26Ke7YC97rtvowC1SkA5QTMkGXOXzZjBcDkfO1wfnLL3ECUf2qiKAVadZiyeLuhlrQARApghbZVyDImLwqGhYgrkD2o6strlL8dts1/sJsGo0U/UgBJNaC3bgCAKyA3YjakuX1U9cmuTRvhYP4rqpWkArjeIauQZUy5AQCuwN/v2xPdnIIZcI0R3ZdAX2s4mP+KdZd/XRpUJuBTsgwujsnpKAhAnVFKQIKC+kkj/LC0ZNVvDqxc2+m/mNr6aKh1SQgpsB4IxAUyrSHhBrwwJvUBuoBFBctKIvxbAwuXx8j1wmYLILTYEFTPO3M3yDSYGfC6ZAb6ot7cd3VH3qx58YvrxITp9MF6VGwbrcyskv0gGZqDECgx7UNCCexRrsAfL151bidc2yC6/8zdu8TU7wIsbFxmMg7SaiV9vOEbHC4vXCHMCbBMOhEmCzCQ4ZGPl7uam59XoDTh44up3z2YyMxkYG11cXJkb/pD4zc5TQzAhcrqYt2bzJ6T7EBrUoUMt0mEv3uyvJ87YEOsr/Hb/ICY8FKG/hJu6n/89udSLNQAVvyL6rpA+CWt1ztPXPyBGLFBxhudfuuZgJRUa2Z54/1lbBeNDQ1EyievLgGCe1CEf1CH+Pj9w8n3T5iu/2HDN1wsXymqAMElYhAHAPuTOvKs8/b4whCxzSIjwQUoWkTzfxcFR0XwdXH4ve9ZKQDl/2/4cjdIVlISzMYKwIV788vshRCKB/4uzF+fTV+s9mjSgYmP43FZ9bWCRYTz6g+a5f3OqWOcmICL+JBalWwE6fYnNe1wReAW+LLtGJTaQ6M76D/27RCBNwRcyJf45P1TzjU+sUkBBBROh8TrpkCaDq6ALaLxYokiQKWia64BVnpkO8TEz44TF6z21jUFsr35uSaMlBcvhRSWiBEwTzFUggMw69DS+YZyTz5jtpNuCqyXB9QKD6HHNlsi9NkBq5Xb6o+pXwuTdxxofL5p6Z/yWs6p2+VJYsQbX/4Y3cwcfHIIF1JkOFJlAMsAygD9DLb+TceGt9O/Dw9GZ8nX2wHNPgxNf6UBCtNNn2725HB5YVydpogZMGXfn9jLumgHbgIUAQadwg/UbSHgGuy/bSBa1e9RKUuY9rLC8wDfN0x/jtuwKwvgkLIAZjY/3wKlBD5Rp4PEDFupwX5ILQNsBImbY1k9Xk4shfrNISHc6eeCQO+JhL0QPQelN6oEXwSdJ8yFv6n5D9p1/yBiyE4BzEcXellF593p608nER0lqabzESh3BKo5Cn/C6VYvtJSgVRp8hSyPCWsFVlR08QkCB1DqyzUYDAZobbrVay0VAIqCVDrwDDHlXRVsgdaVVl7BFlj5f6/uQR5TfpoTBMHb30zuq7R6va0NrXyHs8QYKAG4A9LKK2QNhB8tvpyFHwyEK6fbvd5WASxOjkwTkxbhVsD0QvBFlICQFbjXJqausDb7wVarP+gkinaamDOfRGDfZa6NBfdBmhfCzzjgt85Wqz/oKKekUoKoCRgnB8DEGtkUVDDBc7PXooI0F8Dqv3Bi+NEtf4864JflyyWVFbhEjhA38ciUH0EPMPkRcOZu8tczSKsHtjL/QUcSgj+kMgKvkiPAPPu3977nWZIpOAMCfbiHcC+5JPyd+P7rv0sdwm1YSKfAGoBbgLp9QegU+PrI77vg69eDqj+V95/QrgCAigX8SZ1eJgeJh3zcLrPthLa4PvtBKYBHFybveLvz3+8SlwKCzYACeHh0h1gEwgZ8GPrSrua/9f/TJUlAEI1CTrkCjaSuwfF9O6ImHCF/xFvR3Vhv5XadTgN/9fR057vsCjSC7joMzoBVIO5BPsAqjwq+/1HCv2xpfoN2arXTi//1L6eoS3pe+lx3BZoBq+Do8HZRBh7ipdAn9GL63/p/e8QXV6AVqTJIpxCJm+AWMO8h9BjM4qPQ11FVpv+hbk3/lL7uap9cga2AEkBf/xEMCBWFwI56gYc/78sE5w54anFy5BXqkb7v4l+UF19RJgir+YFZAGWASsMjiWLAIUohGyDsEHIcny+t0YXFm87l63UQhOGrC/95x5+oD/q+Y5MCIcQD2E0PyhoEFMcSZQAXIlUK6UQgoTsg1LNKyOeTUWo4xz9L5yf8/l107VBl8kBfQ3u0LFm+xwN0sD+Z6YfjzmjOXzzcE2c8l6cpvkvJTEQMc0GdPc4Q6q+v16IZiensRKE53Vb7tf9bmhgpf3swpOATEvoiHQIaDwiNh4SmA0LT10H6Oyn1A0Ub/14/tBLE+mGm9Y/T328cfLqUCLwIdv+0mvDb29/SiFICJ5USeIsEQTBFX0G/RrTanUkNMvsBIoLgJCj20Sj8wEjYWqUHT6nT8yQIgh56rPTbCmN5q7ymBwVBO4aEHxhNXI/877dvh0HwCAmC0BMq139G5fpPkiGM5p6Sf7jEBAShB5JCn5NkEOPJZxW0OEWiBAShO5TZ32+VXydkVrsqgUFB6BCDPn8jmRav56l5SBB6IaTw0e+6GOnVL5l3r6BiUJ3KIQUlEgQhpaqyZhO6Kvw6JfMCdHxA1DGjnpkEQUBp7wx6+rMWfmClAwVNDCu07ZBLew0IggkQ6d9F17Q09vT0/mSZJC6A4KB0Egp5Am282kt7u4XFBAu0E6/RwJTEBYScMK1M/kdtrfr1sBphI6lCwXNYrPr1sJthJdaA4ClsVv162A6xw2wBdXpeFIHgOOxW/XrYzqHCbIEkXXiGBMFBEOHfTVcPcBV+4MQY28QtOKWsAeksFFyApbnfDKfmWIsiEJgzTbG5P02O4OQge1EEAiNQwntG3YtnXRL8FKd3skgUwThJsFDIGCU4MyHROeXjv9LvbH6beLOVTdJkhKrC+0UZCCYIKKgQ1c65uto3w8u9rJI9CsbVwwfJsx2MhUzByo4GnXPKzJ+20axjmlxsZjdcXhinWBHcT/EWZtJ3IDSjqiRimkL6QD2eUeb9jMvmfSfkcjfLZCuzEkEpBPRr9YVDIYhiyA8Q6koYhDNBGHyqrMXKGq3MVB1I2+lGtrOto1S+VLxKu+E+FJXJV8JRC2hI3SQlipVDehaYEvvp0WQdCHilENISBFw9r4S+NrOLrlV8X9W7QRRAD0BRVGlncTC2IggKo6AUg7rpoBzWFYS6AX+VPk6USCNK0QRtFUrj33SMaix4rVGfD69v/J2AqsnzEYkQV+OXYgFP/l8l2GF1hdaqRbpRFcHunn8Cz9Ea2bs7Ut4AAAAASUVORK5CYII=`,mode:`wallet-connect`,mobileDisabled:!1,rejectMessage:{source:`Request rejected`},downloads:[{device:`mobile`,os:`android`,link:`https://play.google.com/store/apps/details?id=com.chainapsis.keplr&hl=en&gl=US&pli=1`},{device:`mobile`,os:`ios`,link:`https://apps.apple.com/us/app/keplr-wallet/id1567851089`},{link:`https://www.keplr.app/download`}],connectEventNamesOnWindow:[`keplr_keystorechange`],supportedChains:`agoric.akash.axelar.bitcanna.bitsong.bostrom.certik.cheqd.chihuahua.comdex.cosmoshub.cryptoorgchain.desmos.dig.emoney.evmos.gravitybridge.injective.irisnet.ixo.juno.ki.likecoin.lumnetwork.osmosis.panacea.persistence.regen.secretnetwork.sentinel.sifchain.sommelier.stargaze.starname.terra.tick.umee.vidulum`.split(`.`),walletconnect:{name:`Keplr`,projectId:`6adb6082c909901b9e7189af3a4a0223102cd6f8d5c39e39f3d49acb92b578bb`,encoding:`base64`,requiredNamespaces:{methods:[`keplr_getKey`,`keplr_signAmino`,`keplr_signDirect`,`keplr_signArbitrary`,`keplr_enable`,`keplr_signEthereum`],events:[`keplr_accountsChanged`]},mobile:{native:{ios:`keplrwallet:`,android:`intent:`}},formatNativeUrl:(e,t,n,r)=>{let i=e.split(`:`)[0],a=encodeURIComponent(t);switch(n){case`ios`:return`${i}://wcV2?${a}`;case`android`:return`intent://wcV2?${a}#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`;default:return`${i}://wcV2?${a}`}}}},Fh)],Rv=[...Ph,...Lv],zv=class extends Gr{constructor(e,t){super(e,t)}},Bv=class{client;_defaultSignOptions={preferNoSetFee:!1,preferNoSetMemo:!0,disableBalanceCheck:!0};get defaultSignOptions(){return this._defaultSignOptions}setDefaultSignOptions(e){this._defaultSignOptions=e}constructor(e){this.client=e}async enable(e){await this.client.enable(e)}async suggestToken({chainId:e,tokens:t,type:n}){if(n===`cw20`)for(let{contractAddress:n}of t)await this.client.suggestCW20Token(e,n)}async addChain(e){let t=Ah(e.chain,e.assetList?[e.assetList]:[]);e.preferredEndpoints?.rest?.[0]&&(t.rest=e.preferredEndpoints?.rest?.[0]),e.preferredEndpoints?.rpc?.[0]&&(t.rpc=e.preferredEndpoints?.rpc?.[0]),await this.client.experimentalSuggestChain(t)}async disconnect(){await this.client.disconnect()}async getSimpleAccount(e){let{address:t,username:n}=await this.getAccount(e);return{namespace:`cosmos`,chainId:e,address:t,username:n}}async getAccount(e){let t=await this.client.getKey(e);return{username:t.name,address:t.bech32Address,algo:t.algo,pubkey:t.pubKey,isNanoLedger:t.isNanoLedger}}getOfflineSigner(e,t){switch(t){case`amino`:return this.getOfflineSignerAmino(e);case`direct`:return this.getOfflineSignerDirect(e);default:return this.getOfflineSignerAmino(e)}}getOfflineSignerAmino(e){return this.client.getOfflineSignerOnlyAmino(e)}getOfflineSignerDirect(e){return this.client.getOfflineSigner(e)}async signAmino(e,t,n,r){return await this.client.signAmino(e,t,n,r||this.defaultSignOptions)}async signArbitrary(e,t,n){return await this.client.signArbitrary(e,t,n)}async signDirect(e,t,n,r){return await this.client.signDirect(e,t,{...n,accountNumber:jh.default.fromString(n.accountNumber.toString())},r||this.defaultSignOptions)}async sendTx(e,t,n){return await this.client.sendTx(e,t,n)}},Vv=async()=>{if(typeof window>`u`)return;let e=window.leap;if(e)return e;if(document.readyState===`complete`){if(e)return e;throw jn}return new Promise((t,n)=>{let r=i=>{i.target&&i.target.readyState===`complete`&&(e?t(e):n(jn.message),document.removeEventListener(`readystatechange`,r))};document.addEventListener(`readystatechange`,r)})},Hv=[new class extends qr{constructor(e){super(e,zv)}async initClient(){this.initingClient();try{let e=await Vv();this.initClientDone(e?new Bv(e):void 0)}catch(e){this.initClientError(e)}}}({name:`leap-extension`,prettyName:`Leap`,logo:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTY2IiBoZWlnaHQ9IjE2NiIgdmlld0JveD0iMCAwIDE2NiAxNjYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF83ODBfNjEwKSI+CjxyZWN0IHdpZHRoPSIxNjYiIGhlaWdodD0iMTY2IiBmaWxsPSIjQzVGRkNFIi8+CjxwYXRoIGQ9Ik0xMzguNjE0IDEwMC40NDVDMTM4LjYxNCAxMjAuMjE3IDExNC40ODMgMTI4LjI1MiA4NC41MjE2IDEyOC4yNTJDNTQuNTYwMyAxMjguMjUyIDMwLjA3ODQgMTIwLjIxNyAzMC4wNzg0IDEwMC40NDVDMzAuMDc4NCA4MC42NzI0IDU0LjM4NDYgNjQuNjczIDg0LjM0NiA2NC42NzNDMTE0LjMwNyA2NC42NzMgMTM4LjYxNCA4MC43MDc0IDEzOC42MTQgMTAwLjQ0NVoiIGZpbGw9IiMyNEE5NUEiLz4KPHBhdGggZD0iTTEzMy4xMDMgNTcuMzQ3MkMxMzMuMTAzIDQ2LjkzNyAxMjQuNjAzIDM4LjQ4MzIgMTE0LjEzNiAzOC40ODMyQzEwOC42OTMgMzguNDgzMiAxMDMuNzg3IDQwLjc3MTkgMTAwLjMzIDQ0LjQxNzFDOTkuNzk0NCA0NC45ODE4IDk5LjAxMTggNDUuMjU2OSA5OC4yNDkgNDUuMTAyOUM5My44NjkgNDQuMjE4NSA4OS4yMzU1IDQzLjcyMzIgODQuNDU1NSA0My43MjMyQzc5LjY3NiA0My43MjMyIDc1LjA0MyA0NC4xODkzIDcwLjY2MzQgNDUuMDk1QzY5Ljg5OTggNDUuMjUyOSA2OS4xMTM4IDQ0Ljk4MjMgNjguNTc1IDQ0LjQxODZDNjUuMDkgNDAuNzcyNSA2MC4xODY3IDM4LjQ4MzIgNTQuNzc1MiAzOC40ODMyQzQ0LjMwOCAzOC40ODMyIDM1LjgwNzkgNDYuOTM3IDM1LjgwNzkgNTcuMzQ3MkMzNS44MDc5IDYwLjM4MzQgMzYuNTI2MiA2My4yMjczIDM3Ljc5MTMgNjUuNzU3QzM4LjA5NDMgNjYuMzYyOCAzOC4xMjQ4IDY3LjA3MjEgMzcuODYyNyA2Ny42OTY2QzM2LjYzNTMgNzAuNjIxMiAzNS45ODM1IDczLjcwOTEgMzUuOTgzNSA3Ni45MDk4QzM1Ljk4MzUgOTUuMjQ5OCA1Ny42OTA1IDExMC4wOTYgODQuNDU1NSAxMTAuMDk2QzExMS4yMjEgMTEwLjA5NiAxMzIuOTI4IDk1LjI0OTggMTMyLjkyOCA3Ni45MDk4QzEzMi45MjggNzMuNzA5MSAxMzIuMjc2IDcwLjYyMTIgMTMxLjA0OCA2Ny42OTY2QzEzMC43ODYgNjcuMDcyMSAxMzAuODE3IDY2LjM2MjggMTMxLjEyIDY1Ljc1N0MxMzIuMzg1IDYzLjIyNzMgMTMzLjEwMyA2MC4zODM0IDEzMy4xMDMgNTcuMzQ3MloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjIyNzEgNjcuODExOUM1OS42Mjg3IDY3LjgxMTkgNjQuODE4MyA2Mi42NTA2IDY0LjgxODMgNTYuMjgzOUM2NC44MTgzIDQ5LjkxNzEgNTkuNjI4NyA0NC43NTU5IDUzLjIyNzEgNDQuNzU1OUM0Ni44MjU1IDQ0Ljc1NTkgNDEuNjM2IDQ5LjkxNzEgNDEuNjM2IDU2LjI4MzlDNDEuNjM2IDYyLjY1MDYgNDYuODI1NSA2Ny44MTE5IDUzLjIyNzEgNjcuODExOVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMTUuMDY1IDY3LjgxMTlDMTIxLjQ2NiA2Ny44MTE5IDEyNi42NTYgNjIuNjUwNiAxMjYuNjU2IDU2LjI4MzlDMTI2LjY1NiA0OS45MTcxIDEyMS40NjYgNDQuNzU1OSAxMTUuMDY1IDQ0Ljc1NTlDMTA4LjY2MyA0NC43NTU5IDEwMy40NzQgNDkuOTE3MSAxMDMuNDc0IDU2LjI4MzlDMTAzLjQ3NCA2Mi42NTA2IDEwOC42NjMgNjcuODExOSAxMTUuMDY1IDY3LjgxMTlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNDcuMDc1OSAxMjYuODI5QzQ5LjU2OTggMTI2LjgyOSA1MS41MzY4IDEyNC42NjMgNTEuMjU1OCAxMjIuMjE4QzUwLjIzNzIgMTEzLjU1NCA0NS45MTY4IDk0Ljc5NSAyNi45MTQ0IDgzLjUxMTVDNi4wODM2OCA3MS4xMzg3IDE1Ljk5NDEgMTA0LjAzNCAyMC4xMzY1IDExNi4wMTlDMjAuOTc0NCAxMTguNDQzIDIwLjAwMjcgMTIxLjEzNSAxNy43NzgzIDEyMi40MTFMMTYuNDEyMSAxMjMuMTk2QzE0LjY1NTkgMTI0LjIwOSAxNS4zOTM1IDEyNi44MjkgMTcuMzk1NiAxMjYuODI5SDQ3LjA3NTlaIiBmaWxsPSIjMzJEQTZEIi8+CjxwYXRoIGQ9Ik0xMjIuNTY2IDEyNi44MjlDMTIwLjMxOCAxMjYuODI5IDExOC41NjIgMTI0LjY2MyAxMTguODA4IDEyMi4yMThDMTE5LjY4NiAxMTMuNTg5IDEyMy42MiA5NC43OTUgMTQwLjc2MSA4My41MTE1QzE1OS43NDEgNzEuMDQyNiAxNTAuNTAzIDEwNC41NDcgMTQ2LjgxNSAxMTYuMjk0QzE0Ni4wOTIgMTE4LjU5OCAxNDYuOTgyIDEyMS4xMDYgMTQ5LjAyMiAxMjIuMzk5TDE1MC4yOCAxMjMuMTk2QzE1MS44NiAxMjQuMjA5IDE1MS4xOTMgMTI2LjgyOSAxNDkuNDAyIDEyNi44MjlIMTIyLjU2NloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjI0MjggNjMuMTc4N0M1Ny4wNjE3IDYzLjE3ODcgNjAuMTU3NiA2MC4wODI4IDYwLjE1NzYgNTYuMjYzOUM2MC4xNTc2IDUyLjQ0NSA1Ny4wNjE3IDQ5LjM0OTEgNTMuMjQyOCA0OS4zNDkxQzQ5LjQyMzkgNDkuMzQ5MSA0Ni4zMjggNTIuNDQ1IDQ2LjMyOCA1Ni4yNjM5QzQ2LjMyOCA2MC4wODI4IDQ5LjQyMzkgNjMuMTc4NyA1My4yNDI4IDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik0xMTUuMDgxIDYzLjE3ODdDMTE4LjkgNjMuMTc4NyAxMjEuOTk1IDYwLjA4MjggMTIxLjk5NSA1Ni4yNjM5QzEyMS45OTUgNTIuNDQ1IDExOC45IDQ5LjM0OTEgMTE1LjA4MSA0OS4zNDkxQzExMS4yNjIgNDkuMzQ5MSAxMDguMTY2IDUyLjQ0NSAxMDguMTY2IDU2LjI2MzlDMTA4LjE2NiA2MC4wODI4IDExMS4yNjIgNjMuMTc4NyAxMTUuMDgxIDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik05OS43OTk1IDgzLjAxNzZDMTAxLjUxNCA4My4xNjUxIDEwMi44MSA4NC42ODYyIDEwMi4zNzggODYuMzUxOEMxMDIuMDI5IDg3LjY5NzkgMTAxLjUyOSA4OS4wMDM5IDEwMC44ODYgOTAuMjQ0MkM5OS43NjMgOTIuNDA5IDk4LjIyNDYgOTQuMzMxNSA5Ni4zNTg2IDk1LjkwMThDOTQuNDkyNyA5Ny40NzIyIDkyLjMzNTcgOTguNjU5NiA5MC4wMTA4IDk5LjM5NjNDODcuNjg2IDEwMC4xMzMgODUuMjM4OCAxMDAuNDA1IDgyLjgwOSAxMDAuMTk2QzgwLjM3OTEgOTkuOTg2NiA3OC4wMTQzIDk5LjMwMSA3NS44NDk0IDk4LjE3OEM3My42ODQ2IDk3LjA1NTEgNzEuNzYyMSA5NS41MTY3IDcwLjE5MTcgOTMuNjUwN0M2OC42MjE0IDkxLjc4NDggNjcuNDM0IDg5LjYyNzggNjYuNjk3MiA4Ny4zMDI5QzY2LjE3MDEgODUuNjM5NiA2NS44ODExIDgzLjkxMzUgNjUuODM1OSA4Mi4xNzYxQzY1LjgwNiA4MS4wMjk0IDY2LjgyNDQgODAuMTgwOCA2Ny45NjczIDgwLjI3OTFMODQuNDAwNyA4MS42OTI4TDk5Ljc5OTUgODMuMDE3NloiIGZpbGw9IiMwOTI1MTEiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83ODBfNjEwIj4KPHJlY3Qgd2lkdGg9IjE2NiIgaGVpZ2h0PSIxNjYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==`,mode:`extension`,mobileDisabled:()=>!(`leap`in window||/LeapCosmos/i.test(navigator.userAgent)),rejectMessage:{source:`Request rejected`},connectEventNamesOnWindow:[`leap_keystorechange`],downloads:[{device:`desktop`,browser:`chrome`,link:`https://chrome.google.com/webstore/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg`},{link:`https://chrome.google.com/webstore/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg`}]})],Uv=class extends Gr{constructor(e,t){super(e,t)}},Wv=a((e=>{s(),Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultSnapOrigin=void 0,e.defaultSnapOrigin=o.env.SNAP_ORIGIN??`npm:@leapwallet/metamask-cosmos-snap`})),Gv=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={"eightball-1":{chainId:`eightball-1`,chainName:`8ball`,bech32Config:{bech32PrefixAccAddr:`8ball`},bip44:{coinType:118},denom:`uebl`,decimals:6},"agoric-3":{chainId:`agoric-3`,chainName:`agoric`,bech32Config:{bech32PrefixAccAddr:`agoric`},bip44:{coinType:564},denom:`ubld`,decimals:6},"akashnet-2":{chainId:`akashnet-2`,chainName:`akash`,bech32Config:{bech32PrefixAccAddr:`akash`},bip44:{coinType:118},denom:`uakt`,decimals:6},"archway-1":{chainId:`archway-1`,chainName:`archway`,bech32Config:{bech32PrefixAccAddr:`archway`},bip44:{coinType:118},denom:`aarch`,decimals:18},arkh:{chainId:`arkh`,chainName:`arkh`,bech32Config:{bech32PrefixAccAddr:`arkh`},bip44:{coinType:118},denom:`arkh`,decimals:6},"xstaxy-1":{chainId:`xstaxy-1`,chainName:`aura`,bech32Config:{bech32PrefixAccAddr:`aura`},bip44:{coinType:118},denom:`uaura`,decimals:6},"axelar-dojo-1":{chainId:`axelar-dojo-1`,chainName:`axelar`,bech32Config:{bech32PrefixAccAddr:`axelar`},bip44:{coinType:118},denom:`uaxl`,decimals:6},"laozi-mainnet":{chainId:`laozi-mainnet`,chainName:`bandchain`,bech32Config:{bech32PrefixAccAddr:`band`},bip44:{coinType:494},denom:`uband`,decimals:6},"beezee-1":{chainId:`beezee-1`,chainName:`beezee`,bech32Config:{bech32PrefixAccAddr:`bze`},bip44:{coinType:118},denom:`ubze`,decimals:6},"bitcanna-1":{chainId:`bitcanna-1`,chainName:`bitcanna`,bech32Config:{bech32PrefixAccAddr:`bcna`},bip44:{coinType:118},denom:`ubcna`,decimals:6},"bitsong-2b":{chainId:`bitsong-2b`,chainName:`bitsong`,bech32Config:{bech32PrefixAccAddr:`bitsong`},bip44:{coinType:639},denom:`ubtsg`,decimals:6},"bluzelle-9":{chainId:`bluzelle-9`,chainName:`bluzelle`,bech32Config:{bech32PrefixAccAddr:`bluzelle`},bip44:{coinType:483},denom:`ubnt`,decimals:6},bostrom:{chainId:`bostrom`,chainName:`bostrom`,bech32Config:{bech32PrefixAccAddr:`bostrom`},bip44:{coinType:118},denom:`boot`,decimals:0},"carbon-1":{chainId:`carbon-1`,chainName:`carbon`,bech32Config:{bech32PrefixAccAddr:`swth`},bip44:{coinType:118},denom:`swth`,decimals:8},"perun-1":{chainId:`perun-1`,chainName:`chain4energy`,bech32Config:{bech32PrefixAccAddr:`c4e`},bip44:{coinType:4444},denom:`uc4e`,decimals:6},celestia:{chainId:`celestia`,chainName:`Celestia`,bech32Config:{bech32PrefixAccAddr:`celestia`},bip44:{coinType:118},denom:`utia`,decimals:6},"cheqd-mainnet-1":{chainId:`cheqd-mainnet-1`,chainName:`cheqd`,bech32Config:{bech32PrefixAccAddr:`cheqd`},bip44:{coinType:118},denom:`ncheq`,decimals:9},"comdex-1":{chainId:`comdex-1`,chainName:`comdex`,bech32Config:{bech32PrefixAccAddr:`comdex`},bip44:{coinType:118},denom:`ucmdx`,decimals:6},"commercio-3":{chainId:`commercio-3`,chainName:`commercionetwork`,bech32Config:{bech32PrefixAccAddr:`did:com:`},bip44:{coinType:701},denom:`ucommercio`,decimals:6},"centauri-1":{chainId:`centauri-1`,chainName:`composable`,bech32Config:{bech32PrefixAccAddr:`centauri`},bip44:{coinType:118},denom:`ppica`,decimals:12},"coreum-mainnet-1":{chainId:`coreum-mainnet-1`,chainName:`coreum`,bech32Config:{bech32PrefixAccAddr:`core`},bip44:{coinType:990},denom:`ucore`,decimals:6},"cosmoshub-4":{chainId:`cosmoshub-4`,chainName:`cosmoshub`,bech32Config:{bech32PrefixAccAddr:`cosmos`},bip44:{coinType:118},denom:`uatom`,decimals:6},"crescent-1":{chainId:`crescent-1`,chainName:`crescent`,bech32Config:{bech32PrefixAccAddr:`cre`},bip44:{coinType:118},denom:`ucre`,decimals:6},"crypto-org-chain-mainnet-1":{chainId:`crypto-org-chain-mainnet-1`,chainName:`cryptoorgchain`,bech32Config:{bech32PrefixAccAddr:`cro`},bip44:{coinType:394},denom:`basecro`,decimals:8},"cudos-1":{chainId:`cudos-1`,chainName:`cudos`,bech32Config:{bech32PrefixAccAddr:`cudos`},bip44:{coinType:118},denom:`acudos`,decimals:18},"mainnet-3":{chainId:`mainnet-3`,chainName:`decentr`,bech32Config:{bech32PrefixAccAddr:`decentr`},bip44:{coinType:118},denom:`udec`,decimals:6},"morocco-1":{chainId:`morocco-1`,chainName:`terpnetwork`,bech32Config:{bech32PrefixAccAddr:`terp`},bip44:{coinType:118},denom:`uterp`,decimals:6},"desmos-mainnet":{chainId:`desmos-mainnet`,chainName:`desmos`,bech32Config:{bech32PrefixAccAddr:`desmos`},bip44:{coinType:852},denom:`udsm`,decimals:6},"dig-1":{chainId:`dig-1`,chainName:`dig`,bech32Config:{bech32PrefixAccAddr:`dig`},bip44:{coinType:118},denom:`udig`,decimals:6},dydx:{chainId:`dydx-mainnet-1`,chainName:`dYdX Protocol`,bech32Config:{bech32PrefixAccAddr:`dydx`},bip44:{coinType:118},denom:`DYDX`,decimals:18},"dyson-mainnet-01":{chainId:`dyson-mainnet-01`,chainName:`dyson`,bech32Config:{bech32PrefixAccAddr:`dys`},bip44:{coinType:118},denom:`dys`,decimals:0},"emoney-3":{chainId:`emoney-3`,chainName:`emoney`,bech32Config:{bech32PrefixAccAddr:`emoney`},bip44:{coinType:118},denom:`ungm`,decimals:6},"empowerchain-1":{chainId:`empowerchain-1`,chainName:`empowerchain`,bech32Config:{bech32PrefixAccAddr:`empower`},bip44:{coinType:118},denom:`umpwr`,decimals:6},"fetchhub-4":{chainId:`fetchhub-4`,chainName:`fetchhub`,bech32Config:{bech32PrefixAccAddr:`fetch`},bip44:{coinType:118},denom:`afet`,decimals:18},"colosseum-1":{chainId:`colosseum-1`,chainName:`firmachain`,bech32Config:{bech32PrefixAccAddr:`firma`},bip44:{coinType:7777777},denom:`ufct`,decimals:6},"galaxy-1":{chainId:`galaxy-1`,chainName:`galaxy`,bech32Config:{bech32PrefixAccAddr:`galaxy`},bip44:{coinType:118},denom:`uglx`,decimals:6},"genesis_29-2":{chainId:`genesis_29-2`,chainName:`genesisl1`,bech32Config:{bech32PrefixAccAddr:`genesis`},bip44:{coinType:118},denom:`el1`,decimals:18},gitopia:{chainId:`gitopia`,chainName:`gitopia`,bech32Config:{bech32PrefixAccAddr:`gitopia`},bip44:{coinType:118},denom:`ulore`,decimals:6},"gravity-bridge-3":{chainId:`gravity-bridge-3`,chainName:`gravitybridge`,bech32Config:{bech32PrefixAccAddr:`gravity`},bip44:{coinType:118},denom:`ugraviton`,decimals:6},Antora:{chainId:`Antora`,chainName:`idep`,bech32Config:{bech32PrefixAccAddr:`idep`},bip44:{coinType:118},denom:`idep`,decimals:6},"ixo-5":{chainId:`ixo-5`,chainName:`impacthub`,bech32Config:{bech32PrefixAccAddr:`ixo`},bip44:{coinType:118},denom:`uixo`,decimals:6},"irishub-1":{chainId:`irishub-1`,chainName:`irisnet`,bech32Config:{bech32PrefixAccAddr:`iaa`},bip44:{coinType:118},denom:`uiris`,decimals:6},"jackal-1":{chainId:`jackal-1`,chainName:`jackal`,bech32Config:{bech32PrefixAccAddr:`jkl`},bip44:{coinType:118},denom:`ujkl`,decimals:6},"juno-1":{chainId:`juno-1`,chainName:`juno`,bech32Config:{bech32PrefixAccAddr:`juno`},bip44:{coinType:118},denom:`ujuno`,decimals:6},"kava_2222-10":{chainId:`kava_2222-10`,chainName:`kava`,bech32Config:{bech32PrefixAccAddr:`kava`},bip44:{coinType:459},denom:`ukava`,decimals:6},"kichain-2":{chainId:`kichain-2`,chainName:`kichain`,bech32Config:{bech32PrefixAccAddr:`ki`},bip44:{coinType:118},denom:`uxki`,decimals:6},"kaiyo-1":{chainId:`kaiyo-1`,chainName:`kujira`,bech32Config:{bech32PrefixAccAddr:`kujira`},bip44:{coinType:118},denom:`ukuji`,decimals:6},"kyve-1":{chainId:`kyve-1`,chainName:`kyve`,bech32Config:{bech32PrefixAccAddr:`kyve`},bip44:{coinType:118},denom:`ukyve`,decimals:6},"likecoin-mainnet-2":{chainId:`likecoin-mainnet-2`,chainName:`likecoin`,bech32Config:{bech32PrefixAccAddr:`like`},bip44:{coinType:118},denom:`nanolike`,decimals:9},"loyal-main-02":{chainId:`loyal-main-02`,chainName:`loyal`,bech32Config:{bech32PrefixAccAddr:`loyal`},bip44:{coinType:118},denom:`ulyl`,decimals:6},LumenX:{chainId:`LumenX`,chainName:`lumenx`,bech32Config:{bech32PrefixAccAddr:`lumen`},bip44:{coinType:118},denom:`ulumen`,decimals:6},"lum-network-1":{chainId:`lum-network-1`,chainName:`lumnetwork`,bech32Config:{bech32PrefixAccAddr:`lum`},bip44:{coinType:880},denom:`ulum`,decimals:6},"mars-1":{chainId:`mars-1`,chainName:`mars`,bech32Config:{bech32PrefixAccAddr:`mars`},bip44:{coinType:118},denom:`umars`,decimals:6},"mayachain-mainnet-v1":{chainId:`mayachain-mainnet-v1`,chainName:`mayachain`,bech32Config:{bech32PrefixAccAddr:`maya`},bip44:{coinType:931},denom:`cacao`,decimals:10},"meme-1":{chainId:`meme-1`,chainName:`meme`,bech32Config:{bech32PrefixAccAddr:`meme`},bip44:{coinType:118},denom:`umeme`,decimals:6},"migaloo-1":{chainId:`migaloo-1`,chainName:`migaloo`,bech32Config:{bech32PrefixAccAddr:`migaloo`},bip44:{coinType:118},denom:`uwhale`,decimals:6},mainnet:{chainId:`mainnet`,chainName:`mises`,bech32Config:{bech32PrefixAccAddr:`mises`},bip44:{coinType:118},denom:`umis`,decimals:6},"mun-1":{chainId:`mun-1`,chainName:`mun`,bech32Config:{bech32PrefixAccAddr:`mun`},bip44:{coinType:118},denom:`umun`,decimals:6},"neutron-1":{chainId:`neutron-1`,chainName:`neutron`,bech32Config:{bech32PrefixAccAddr:`neutron`},bip44:{coinType:118},denom:`untrn`,decimals:6},"noble-1":{chainId:`noble-1`,chainName:`noble`,bech32Config:{bech32PrefixAccAddr:`noble`},bip44:{coinType:118},denom:`ustake`,decimals:6},"nois-1":{chainId:`nois-1`,chainName:`nois`,bech32Config:{bech32PrefixAccAddr:`nois`},bip44:{coinType:118},denom:`unois`,decimals:6},"pirin-1":{chainId:`pirin-1`,chainName:`nolus`,bech32Config:{bech32PrefixAccAddr:`nolus`},bip44:{coinType:118},denom:`unls`,decimals:6},nyx:{chainId:`nyx`,chainName:`nyx`,bech32Config:{bech32PrefixAccAddr:`n`},bip44:{coinType:118},denom:`unyx`,decimals:6},octa:{chainId:`octa`,chainName:`octa`,bech32Config:{bech32PrefixAccAddr:`octa`},bip44:{coinType:118},denom:`uocta`,decimals:6},"odin-mainnet-freya":{chainId:`odin-mainnet-freya`,chainName:`odin`,bech32Config:{bech32PrefixAccAddr:`odin`},bip44:{coinType:118},denom:`loki`,decimals:6},"omniflixhub-1":{chainId:`omniflixhub-1`,chainName:`omniflixhub`,bech32Config:{bech32PrefixAccAddr:`omniflix`},bip44:{coinType:118},denom:`uflix`,decimals:6},"onomy-mainnet-1":{chainId:`onomy-mainnet-1`,chainName:`onomy`,bech32Config:{bech32PrefixAccAddr:`onomy`},bip44:{coinType:118},denom:`anom`,decimals:18},Oraichain:{chainId:`Oraichain`,chainName:`oraichain`,bech32Config:{bech32PrefixAccAddr:`orai`},bip44:{coinType:118},denom:`orai`,decimals:6},"osmosis-1":{chainId:`osmosis-1`,chainName:`osmosis`,bech32Config:{bech32PrefixAccAddr:`osmo`},bip44:{coinType:118},denom:`uosmo`,decimals:6},"panacea-3":{chainId:`panacea-3`,chainName:`panacea`,bech32Config:{bech32PrefixAccAddr:`panacea`},bip44:{coinType:371},denom:`umed`,decimals:6},"passage-2":{chainId:`passage-2`,chainName:`passage`,bech32Config:{bech32PrefixAccAddr:`pasg`},bip44:{coinType:118},denom:`upasg`,decimals:6},"passage-1":{chainId:`passage-1`,chainName:`passage1`,bech32Config:{bech32PrefixAccAddr:`pasg`},bip44:{coinType:118},denom:`upasg`,decimals:6},"core-1":{chainId:`core-1`,chainName:`persistence`,bech32Config:{bech32PrefixAccAddr:`persistence`},bip44:{coinType:118},denom:`uxprt`,decimals:6},"pio-mainnet-1":{chainId:`pio-mainnet-1`,chainName:`provenance`,bech32Config:{bech32PrefixAccAddr:`pb`},bip44:{coinType:505},denom:`nhash`,decimals:9},"quasar-1":{chainId:`quasar-1`,chainName:`quasar`,bech32Config:{bech32PrefixAccAddr:`quasar`},bip44:{coinType:118},denom:`uqsr`,decimals:6},"quicksilver-2":{chainId:`quicksilver-2`,chainName:`quicksilver`,bech32Config:{bech32PrefixAccAddr:`quick`},bip44:{coinType:118},denom:`uqck`,decimals:6},"qwoyn-1":{chainId:`qwoyn-1`,chainName:`qwoyn`,bech32Config:{bech32PrefixAccAddr:`qwoyn`},bip44:{coinType:118},denom:`uqwoyn`,decimals:6},"reb_1111-1":{chainId:`reb_1111-1`,chainName:`rebus`,bech32Config:{bech32PrefixAccAddr:`rebus`},bip44:{coinType:118},denom:`arebus`,decimals:18},"regen-1":{chainId:`regen-1`,chainName:`regen`,bech32Config:{bech32PrefixAccAddr:`regen`},bip44:{coinType:118},denom:`uregen`,decimals:6},"titan-1":{chainId:`titan-1`,chainName:`rizon`,bech32Config:{bech32PrefixAccAddr:`rizon`},bip44:{coinType:118},denom:`uatolo`,decimals:6},"secret-4":{chainId:`secret-4`,chainName:`secretnetwork`,bech32Config:{bech32PrefixAccAddr:`secret`},bip44:{coinType:529},denom:`uscrt`,decimals:6},"pacific-1":{chainId:`pacific-1`,chainName:`sei`,bech32Config:{bech32PrefixAccAddr:`sei`},bip44:{coinType:118},denom:`usei`,decimals:6},"sentinelhub-2":{chainId:`sentinelhub-2`,chainName:`sentinel`,bech32Config:{bech32PrefixAccAddr:`sent`},bip44:{coinType:118},denom:`udvpn`,decimals:6},"ShareRing-VoyagerNet":{chainId:`ShareRing-VoyagerNet`,chainName:`shareledger`,bech32Config:{bech32PrefixAccAddr:`shareledger`},bip44:{coinType:118},denom:`nshr`,decimals:9},"shentu-2.2":{chainId:`shentu-2.2`,chainName:`shentu`,bech32Config:{bech32PrefixAccAddr:`certik`},bip44:{coinType:118},denom:`uctk`,decimals:6},"sommelier-3":{chainId:`sommelier-3`,chainName:`sommelier`,bech32Config:{bech32PrefixAccAddr:`somm`},bip44:{coinType:118},denom:`usomm`,decimals:6},"stafihub-1":{chainId:`stafihub-1`,chainName:`stafihub`,bech32Config:{bech32PrefixAccAddr:`stafi`},bip44:{coinType:118},denom:`ufis`,decimals:6},"stargaze-1":{chainId:`stargaze-1`,chainName:`stargaze`,bech32Config:{bech32PrefixAccAddr:`stars`},bip44:{coinType:118},denom:`ustars`,decimals:6},"iov-mainnet-ibc":{chainId:`iov-mainnet-ibc`,chainName:`starname`,bech32Config:{bech32PrefixAccAddr:`star`},bip44:{coinType:234},denom:`uiov`,decimals:6},"stride-1":{chainId:`stride-1`,chainName:`stride`,bech32Config:{bech32PrefixAccAddr:`stride`},bip44:{coinType:118},denom:`ustrd`,decimals:6},"teritori-1":{chainId:`teritori-1`,chainName:`teritori`,bech32Config:{bech32PrefixAccAddr:`tori`},bip44:{coinType:118},denom:`utori`,decimals:6},"columbus-5":{chainId:`columbus-5`,chainName:`terra`,bech32Config:{bech32PrefixAccAddr:`terra`},bip44:{coinType:330},denom:`uluna`,decimals:6},"phoenix-1":{chainId:`phoenix-1`,chainName:`terra2`,bech32Config:{bech32PrefixAccAddr:`terra`},bip44:{coinType:330},denom:`uluna`,decimals:6},"tgrade-mainnet-1":{chainId:`tgrade-mainnet-1`,chainName:`tgrade`,bech32Config:{bech32PrefixAccAddr:`tgrade`},bip44:{coinType:118},denom:`utgd`,decimals:6},"umee-1":{chainId:`umee-1`,chainName:`umee`,bech32Config:{bech32PrefixAccAddr:`umee`},bip44:{coinType:118},denom:`uumee`,decimals:6},"FUND-MainNet-2":{chainId:`FUND-MainNet-2`,chainName:`unification`,bech32Config:{bech32PrefixAccAddr:`und`},bip44:{coinType:5555},denom:`nund`,decimals:9},"ununifi-beta-v1":{chainId:`ununifi-beta-v1`,chainName:`ununifi`,bech32Config:{bech32PrefixAccAddr:`ununifi`},bip44:{coinType:118},denom:`uguu`,decimals:6},"vidulum-1":{chainId:`vidulum-1`,chainName:`vidulum`,bech32Config:{bech32PrefixAccAddr:`vdl`},bip44:{coinType:370},denom:`uvdl`,decimals:6},"vota-ash":{chainId:`vota-ash`,chainName:`doravota`,bech32Config:{bech32PrefixAccAddr:`dora`},bip44:{coinType:118},denom:`peaka`,decimals:18}}})),Kv=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.toSmall=e.getGasPriceForChainName=void 0;var n=t(Nn()),r=6;e.getGasPriceForChainName=async(e,t=`average`)=>{let n=await fetch(`https://assets.leapwallet.io/cosmos-registry/v1/gas/gas-prices.json`);if(!n.ok)throw Error(`Failed to get Gas price ${n.status}`);return(await n.json())?.[e]?.[t]};function i(e,t=r){return new n.default(e).times(10**t).toFixed().toString()}e.toSmall=i})),qv=a((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.experimentalSuggestChain=e.suggestChain=e.isLocalSnap=e.getKey=e.requestSignAmino=e.requestSignature=e.getSnap=e.connectSnap=e.getSnaps=void 0;var n=t(Nn()),r=t(Nv()),i=Wv(),a=t(Gv()),o=Kv(),s=async()=>{let e=!1;if(`detected`in window.ethereum)for(let t of window.ethereum.detected)try{return await t.request({method:`wallet_getSnaps`}),window.ethereum.setProvider(t),e=!0,t}catch{}if(!e&&`providers`in window.ethereum)for(let t of window.ethereum.providers)try{return await t.request({method:`wallet_getSnaps`}),window.ethereum=t,e=!0,t}catch{}return window.ethereum},c=async(e,t)=>(await s()).request({method:`wallet_invokeSnap`,params:{snapId:i.defaultSnapOrigin,request:{method:e,params:t}}});e.getSnaps=async()=>await(await s()).request({method:`wallet_getSnaps`}),e.connectSnap=async(e=i.defaultSnapOrigin,t={})=>(await s()).request({method:`wallet_requestSnaps`,params:{[e]:t}}),e.getSnap=async t=>{try{let n=await(0,e.getSnaps)();return Object.values(n).find(e=>e.id===i.defaultSnapOrigin&&(!t||e.version===t))}catch{return}},e.requestSignature=async(e,t,n)=>{let i=await c(`signDirect`,{chainId:e,signerAddress:t,signDoc:Object.assign(Object.assign({},n),{accountNumber:r.default.fromString(n.accountNumber.toString(),!0)})});return{signature:i.signature,signed:Object.assign(Object.assign({},i.signed),{accountNumber:n.accountNumber.toString(),authInfoBytes:new Uint8Array(Object.values(i.signed.authInfoBytes)),bodyBytes:new Uint8Array(Object.values(i.signed.bodyBytes))})}},e.requestSignAmino=async(e,t,r,i)=>{let{isADR36:s=!1,enableExtraEntropy:l=!1}=i||{};if(!s&&e!==r.chain_id)throw Error(`Chain ID does not match signer chain ID`);let u=a.default[e];if(!i?.preferNoSetFee&&u&&u.denom){let e=await(0,o.getGasPriceForChainName)(u.chainName),t=`gasLimit`in r.fee?r.fee.gasLimit:r.fee.gas;if(e){let i=[{amount:new n.default(e).multipliedBy(new n.default(t)).decimalPlaces(0,1).toString(),denom:u.denom}];r.fee.amount=i}}return await c(`signAmino`,{chainId:e,signerAddress:t,signDoc:r,isADR36:s,enableExtraEntropy:l})},e.getKey=async e=>{let t=await c(`getKey`,{chainId:e});if(!t)throw Error(`No account data found`);return t.pubkey=Uint8Array.from(Object.values(t.pubkey)),t},e.isLocalSnap=e=>e.startsWith(`local:`),e.suggestChain=async(e,t)=>t&&t.force?await c(`suggestChain`,{chainInfo:e}):(await c(`getSupportedChains`,{})||{})[e.chainId]?Promise.resolve({message:`Chain already added successfully`,chainInfo:e}):await c(`suggestChain`,{chainInfo:e}),e.experimentalSuggestChain=e.suggestChain})),Jv=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Yv=a((e=>{x(),Object.defineProperty(e,`__esModule`,{value:!0}),e.signArbitrary=e.getOfflineSigner=e.CosmjsOfflineSigner=void 0;var t=qv(),n=class{constructor(e){this.chainId=e}async getAccounts(){let e=await(0,t.getKey)(this.chainId);return[{address:e.address,algo:`secp256k1`,pubkey:e.pubkey}]}async signDirect(e,n){if(this.chainId!==n.chainId)throw Error(`Chain ID does not match signer chain ID`);if((await this.getAccounts()).find(t=>t.address!==e))throw Error(`Signer address does not match wallet address`);return(0,t.requestSignature)(this.chainId,e,n)}async signAmino(e,n,r){if(this.chainId!==n.chain_id)throw Error(`Chain ID does not match signer chain ID`);if((await this.getAccounts()).find(t=>t.address!==e))throw Error(`Signer address does not match wallet address`);return(0,t.requestSignAmino)(this.chainId,e,n,r)}};e.CosmjsOfflineSigner=n;function r(e){return new n(e)}e.getOfflineSigner=r;async function i(e,n,r,i){let{signDoc:o}=a(n,r);return(await(0,t.requestSignAmino)(e,n,o,{isADR36:!0,preferNoSetFee:!0,enableExtraEntropy:i?.enableExtraEntropy})).signature}e.signArbitrary=i;function a(e,t){let n=!1,r=``;return typeof t==`string`?(r=C.from(t).toString(`base64`),n=!0):r=C.from(t).toString(`base64`),{signDoc:{chain_id:``,account_number:`0`,sequence:`0`,fee:{gas:`0`,amount:[]},msgs:[{type:`sign/MsgSignData`,value:{signer:e,b64Data:r}}],memo:``},isADR36WithString:n}}})),Xv=a((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(qv(),e),n(Jv(),e),n(Yv(),e)}))(),Zv=class{snapInstalled=!1;_defaultSignOptions={preferNoSetFee:!1,preferNoSetMemo:!0,disableBalanceCheck:!0};get defaultSignOptions(){return this._defaultSignOptions}setDefaultSignOptions(e){this._defaultSignOptions=e}constructor(){this.snapInstalled=localStorage.getItem(`snapInstalled`)===`true`}async getSimpleAccount(e){let{address:t,username:n}=await this.getAccount(e);return{namespace:`cosmos`,chainId:e,address:t,username:n}}async handleConnect(){await(0,Xv.getSnap)()||await(0,Xv.connectSnap)()}async getAccount(e){await this.handleConnect();let t=await(0,Xv.getKey)(e);return{username:t?.address,address:t.address,algo:t.algo,pubkey:t.pubkey}}getOfflineSigner(e,t){switch(t){case`amino`:return this.getOfflineSignerAmino(e);case`direct`:return this.getOfflineSignerDirect(e);default:return this.getOfflineSignerAmino(e)}}getOfflineSignerAmino(e){return new Xv.CosmjsOfflineSigner(e)}getOfflineSignerDirect(e){return{getAccounts:async()=>[await this.getAccount(e)],signDirect:(t,n)=>this.signDirect(e,t,n)}}async signAmino(e,t,n,r){return(0,Xv.requestSignAmino)(e,t,n)}async signDirect(e,t,n){let r=jh.default.fromString(n.accountNumber.toString()),i=await(0,Xv.requestSignature)(e,t,{...n,accountNumber:r}),a=new jh.default(r.low,r.high,r.unsigned);return{signature:i.signature,signed:{...i.signed,accountNumber:BigInt(a.toString()),authInfoBytes:new Uint8Array(Object.values(i.signed.authInfoBytes)),bodyBytes:new Uint8Array(Object.values(i.signed.bodyBytes))}}}async signArbitrary(e,t,n){return await(0,Xv.signArbitrary)(e,t,n)}async addChain(e){await(0,Xv.experimentalSuggestChain)({chainId:e?.chain?.chain_id,chainName:e?.chain?.chain_name,bip44:{coinType:e?.chain?.slip44},bech32Config:{bech32PrefixAccAddr:e?.chain?.bech32_prefix}},{})}},Qv=async()=>{if(typeof window>`u`)return!1;let e=window.ethereum;if(e?.isMetaMask)return!0;if(document.readyState===`complete`){if(e?.isMetaMask)return!0;throw jn}return new Promise((t,n)=>{let r=i=>{i.target&&i.target.readyState===`complete`&&(e?.isMetaMask?t(!0):n(jn.message),document.removeEventListener(`readystatechange`,r))};document.addEventListener(`readystatechange`,r)})},$v=[new class extends qr{constructor(e){super(e,Uv)}async initClient(){this.initingClient();try{let e=await Qv();this.initClientDone(e?new Zv:void 0)}catch(e){this.initClientError(e)}}}({name:`leap-metamask-cosmos-snap`,description:`The Leap Cosmos MetaMask Snap allows signing of Cosmos transactions using MetaMask.`,prettyName:`Leap Cosmos MetaMask`,logo:{major:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEwIiBoZWlnaHQ9IjIxMCIgdmlld0JveD0iMCAwIDIxMCAyMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNzguMzQ0IDE0Ljk2NDhMMTE0LjkzOSA2My41NTU4TDEyNi42NjQgMzQuODg3OEwxNzguMzQ0IDE0Ljk2NDhaIiBmaWxsPSIjRTI3NjFCIiBzdHJva2U9IiNFMjc2MUIiIHN0cm9rZS13aWR0aD0iMC42MzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMzEuOTcxOCAxNC45NjQ4TDk0Ljg2NjggNjQuMDE2OEw4My43MTQ4IDM0Ljg4NzhMMzEuOTcxOCAxNC45NjQ4Wk0xNTUuNTMxIDEyNy42TDEzOC42NDQgMTU0LjI5NkwxNzQuNzc1IDE2NC41NTNMMTg1LjE2MiAxMjguMTkyTDE1NS41MzEgMTI3LjZaTTI1LjI4MDggMTI4LjE5MkwzNS42MDM4IDE2NC41NTNMNzEuNzM0OCAxNTQuMjk2TDU0Ljg0OTggMTI3LjZMMjUuMjgwOCAxMjguMTkyWiIgZmlsbD0iI0U0NzYxQiIgc3Ryb2tlPSIjRTQ3NjFCIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTY5LjY5NjkgODIuNDkxNEw1OS42Mjk5IDk4LjIwNjRMOTUuNTA1OSA5OS44NTA0TDk0LjIzMTkgNjAuMDcwNEw2OS42OTY5IDgyLjQ5MTRaTTE0MC42MjEgODIuNDkxNEwxMTUuNzY5IDU5LjYwOTRMMTE0Ljk0IDk5Ljg1MDRMMTUwLjc1MyA5OC4yMDY0TDE0MC42MjEgODIuNDkxNFpNNzEuNzM1OSAxNTQuMjk0TDkzLjI3NDkgMTQzLjQ0NEw3NC42NjY5IDEyOC40NTNMNzEuNzM1OSAxNTQuMjk0Wk0xMTcuMDQzIDE0My40NDRMMTM4LjY0NSAxNTQuMjk0TDEzNS42NSAxMjguNDUzTDExNy4wNDMgMTQzLjQ0NFoiIGZpbGw9IiNFNDc2MUIiIHN0cm9rZT0iI0U0NzYxQiIgc3Ryb2tlLXdpZHRoPSIwLjYzOSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMzguNjQzIDE1NC4yOTVMMTE3LjA0MSAxNDMuNDQ1TDExOC43NjIgMTU3Ljk3N0wxMTguNTcxIDE2NC4wOTJMMTM4LjY0MyAxNTQuMjk1Wk03MS43MzM5IDE1NC4yOTVMOTEuODA2OSAxNjQuMDkyTDkxLjY3OTkgMTU3Ljk3N0w5My4yNzI5IDE0My40NDVMNzEuNzMzOSAxNTQuMjk1WiIgZmlsbD0iI0Q3QzFCMyIgc3Ryb2tlPSIjRDdDMUIzIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTkyLjEyNTggMTE4Ljg1NUw3NC4xNTU4IDExMy4zOThMODYuODM2OCAxMDcuNDE0TDkyLjEyNTggMTE4Ljg1NVpNMTE4LjE4OSAxMTguODU1TDEyMy40NzggMTA3LjQxNEwxMzYuMjIyIDExMy4zOThMMTE4LjE4OSAxMTguODU1WiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3IiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTcxLjczNjEgMTU0LjI5NEw3NC43OTUxIDEyNy41OTlMNTQuODUwMSAxMjguMTlMNzEuNzM2MSAxNTQuMjk0Wk0xMzUuNTg3IDEyNy41OTlMMTM4LjY0NSAxNTQuMjk0TDE1NS41MzIgMTI4LjE5TDEzNS41ODcgMTI3LjU5OVpNMTUwLjc1MyA5OC4yMDdMMTE0Ljk0IDk5Ljg1MUwxMTguMjU0IDExOC44NTNMMTIzLjU0MyAxMDcuNDEyTDEzNi4yODggMTEzLjM5NkwxNTAuNzUzIDk4LjIwN1pNNzQuMTU4MSAxMTMuMzk2TDg2LjkwMjEgMTA3LjQxMkw5Mi4xMjcxIDExOC44NTNMOTUuNTA1MSA5OS44NTFMNTkuNjI5MSA5OC4yMDdMNzQuMTU4MSAxMTMuMzk2WiIgZmlsbD0iI0NENjExNiIgc3Ryb2tlPSIjQ0Q2MTE2IiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTU5LjYyODkgOTguMjEwOUw3NC42Njc5IDEyOC40NTdMNzQuMTU3OSAxMTMuNEw1OS42Mjc5IDk4LjIxMDlINTkuNjI4OVpNMTM2LjI4OCAxMTMuNEwxMzUuNjUgMTI4LjQ1N0wxNTAuNzUzIDk4LjIxMDlMMTM2LjI4OCAxMTMuNFpNOTUuNTA0OSA5OS44NTQ5TDkyLjEyNzkgMTE4Ljg1N0w5Ni4zMzI5IDE0MS4yNzlMOTcuMjg4OSAxMTEuNzU2TDk1LjUwNDkgOTkuODU0OVpNMTE0Ljk0IDk5Ljg1NDlMMTEzLjIyIDExMS42OUwxMTMuOTg1IDE0MS4yNzlMMTE4LjI1NCAxMTguODU3TDExNC45NCA5OS44NTQ5WiIgZmlsbD0iI0U0NzUxRiIgc3Ryb2tlPSIjRTQ3NTFGIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTExOC4yNTMgMTE4Ljg1M0wxMTMuOTgzIDE0MS4yNzVMMTE3LjA0MiAxNDMuNDQ1TDEzNS42NDkgMTI4LjQ1M0wxMzYuMjg2IDExMy4zOTVMMTE4LjI1MyAxMTguODUzWk03NC4xNTU4IDExMy4zOTVMNzQuNjY1OCAxMjguNDUzTDkzLjI3MjggMTQzLjQ0NUw5Ni4zMzE4IDE0MS4yNzVMOTIuMTI1OCAxMTguODUzTDc0LjE1NTggMTEzLjM5NVoiIGZpbGw9IiNGNjg1MUIiIHN0cm9rZT0iI0Y2ODUxQiIgc3Ryb2tlLXdpZHRoPSIwLjYzOSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMTguNTcxIDE2NC4wOTRMMTE4Ljc2MiAxNTcuOTc5TDExNy4xNjkgMTU2LjUzMkg5My4xNDQ5TDkxLjY3OTkgMTU3Ljk3OUw5MS44MDY5IDE2NC4wOTRMNzEuNzMzOSAxNTQuMjk3TDc4Ljc0MzkgMTYwLjIxNUw5Mi45NTM5IDE3MC40MDZIMTE3LjM2TDEzMS42MzQgMTYwLjIxNUwxMzguNjQzIDE1NC4yOTdMMTE4LjU3MSAxNjQuMDk0WiIgZmlsbD0iI0MwQUQ5RSIgc3Ryb2tlPSIjQzBBRDlFIiBzdHJva2Utd2lkdGg9IjAuNjM5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTExNy4wNDEgMTQzLjQ0N0wxMTMuOTgzIDE0MS4yNzdIOTYuMzMyMkw5My4yNzIyIDE0My40NDdMOTEuNjgwMiAxNTcuOTc5TDkzLjE0NTIgMTU2LjUzMkgxMTcuMTY5TDExOC43NjIgMTU3Ljk3OUwxMTcuMDQxIDE0My40NDdaIiBmaWxsPSIjMTYxNjE2IiBzdHJva2U9IiMxNjE2MTYiIHN0cm9rZS13aWR0aD0iMC42MzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTgxLjAyIDY2LjcxMjhMMTg2LjQzNyAzOS44ODQ4TDE3OC4zNDQgMTQuOTY0OEwxMTcuMDQzIDYxLjkxMThMMTQwLjYyIDgyLjQ5MjhMMTczLjk0NyA5Mi41NTI4TDE4MS4zMzkgODMuNjc2OEwxNzguMTUzIDgxLjMwOThMMTgzLjI1MSA3Ni41MDk4TDE3OS4zIDczLjM1MzhMMTg0LjM5OCA2OS4zNDI4TDE4MS4wMiA2Ni43MTI4Wk0yMy45NDI5IDM5Ljg4NDhMMjkuMzU5OSA2Ni43MTI4TDI1LjkxODkgNjkuMzQyOEwzMS4wMTY5IDczLjM1MjhMMjcuMTI5OSA3Ni41MDk4TDMyLjIyNjkgODEuMzA5OEwyOS4wNDA5IDgzLjY3NjhMMzYuMzY4OSA5Mi41NTI4TDY5LjY5NTkgODIuNDkyOEw5My4yNzM5IDYxLjkxMjhMMzEuOTcxOSAxNC45NjQ4TDIzLjk0MjkgMzkuODg0OFoiIGZpbGw9IiM3NjNEMTYiIHN0cm9rZT0iIzc2M0QxNiIgc3Ryb2tlLXdpZHRoPSIwLjYzOSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xNzMuOTQ3IDkyLjU1MTdMMTQwLjYyIDgyLjQ5MTdMMTUwLjc1MiA5OC4yMDY3TDEzNS42NDkgMTI4LjQ1M0wxNTUuNTMxIDEyOC4xOUgxODUuMTYyTDE3My45NDcgOTIuNTUxN1pNNjkuNjk2OCA4Mi40OTE3TDM2LjM2ODggOTIuNTUxN0wyNS4yODA4IDEyOC4xOUg1NC44NDk4TDc0LjY2NzggMTI4LjQ1M0w1OS42Mjc4IDk4LjIwNjdMNjkuNjk2OCA4Mi40OTE3Wk0xMTQuOTM5IDk5Ljg1MDdMMTE3LjA0MiA2MS45MTA3TDEyNi43MjggMzQuODg2N0g4My43MTQ4TDkzLjI3MzggNjEuOTEwN0w5NS41MDM4IDk5Ljg1MDdMOTYuMjY4OCAxMTEuODE4TDk2LjMzMTggMTQxLjI3NUgxMTMuOTg0TDExNC4xMTEgMTExLjgxOEwxMTQuOTM5IDk5Ljg1MDdaIiBmaWxsPSIjRjY4NTFCIiBzdHJva2U9IiNGNjg1MUIiIHN0cm9rZS13aWR0aD0iMC42MzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K`,minor:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQzIiBoZWlnaHQ9IjM0MyIgdmlld0JveD0iMCAwIDM0MyAzNDMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNzEuNzUgMzQyLjc1QzI2Ni4xOTEgMzQyLjc1IDM0Mi43NSAyNjYuMTkxIDM0Mi43NSAxNzEuNzVDMzQyLjc1IDc3LjMwOTMgMjY2LjE5MSAwLjc1IDE3MS43NSAwLjc1Qzc3LjMwOTMgMC43NSAwLjc1IDc3LjMwOTMgMC43NSAxNzEuNzVDMC43NSAyNjYuMTkxIDc3LjMwOTMgMzQyLjc1IDE3MS43NSAzNDIuNzVaIiBmaWxsPSIjMDUzMzE4Ii8+CjxwYXRoIGQ9Ik0yNjUuNjU0IDIwMC42NjlDMjY1LjY1NCAyMzQuMjM3IDIyNC42OSAyNDcuODgyIDE3My44MjYgMjQ3Ljg4MkMxMjIuOTYyIDI0Ny44ODIgODEuMzk4NCAyMzQuMjM3IDgxLjM5ODQgMjAwLjY2OUM4MS4zOTg0IDE2Ny4xMDEgMTIyLjY2MiAxMzkuOTM4IDE3My41MjYgMTM5LjkzOEMyMjQuMzkgMTM5LjkzOCAyNjUuNjU0IDE2Ny4xNjEgMjY1LjY1NCAyMDAuNjY5WiIgZmlsbD0iIzI0QTk1QSIvPgo8cGF0aCBkPSJNMjU2LjMxNSAxMjcuNTA4QzI1Ni4zMTUgMTA5LjgzNiAyNDEuODg3IDk1LjQ4NDQgMjI0LjExNSA5NS40ODQ0QzIxNC44NzUgOTUuNDg0NCAyMDYuNTUxIDk5LjM2ODQgMjAwLjY4MyAxMDUuNTUyQzIwMC4yNCAxMDYuMDMyIDE5OS42ODIgMTA2LjM5MSAxOTkuMDYyIDEwNi41OTVDMTk4LjQ0MiAxMDYuOCAxOTcuNzggMTA2Ljg0MyAxOTcuMTM5IDEwNi43MkMxODkuNDMyIDEwNS4xNjYgMTgxLjU4OSAxMDQuMzgyIDE3My43MjcgMTA0LjM4QzE2NS44NjUgMTA0LjM1OCAxNTguMDIyIDEwNS4xMzggMTUwLjMxOSAxMDYuNzA4QzE0OS42NzcgMTA2LjgzMyAxNDkuMDE1IDEwNi43OTMgMTQ4LjM5NCAxMDYuNTkyQzE0Ny43NzIgMTA2LjM5IDE0Ny4yMTIgMTA2LjAzNCAxNDYuNzY3IDEwNS41NTZDMTQzLjc0OCAxMDIuMzc5IDE0MC4xMTUgOTkuODQ4IDEzNi4wODggOTguMTE2N0MxMzIuMDYyIDk2LjM4NTQgMTI3LjcyNSA5NS40ODk4IDEyMy4zNDMgOTUuNDg0NEMxMDUuNTcxIDk1LjQ4NDQgOTEuMTQyNiAxMDkuODM2IDkxLjE0MjYgMTI3LjUwOEM5MS4xMzQ4IDEzMi40NjQgOTIuMjg2OCAxMzcuMzUzIDk0LjUwNjYgMTQxLjc4NEM5NC43NjM2IDE0Mi4yOTMgOTQuOTA3NSAxNDIuODUyIDk0LjkyODIgMTQzLjQyMUM5NC45NDg5IDE0My45OTEgOTQuODQ2IDE0NC41NTggOTQuNjI2NiAxNDUuMDg0QzkyLjUzMDIgMTUwLjAzMyA5MS40NDYyIDE1NS4zNSA5MS40Mzg2IDE2MC43MjRDOTEuNDM4NiAxOTEuODYgMTI4LjI5MSAyMTcuMDY4IDE3My43MjcgMjE3LjA2OEMyMTkuMTY3IDIxNy4wNjggMjU2LjAxOSAxOTEuODYgMjU2LjAxOSAxNjAuNzI0QzI1Ni4wMTEgMTU1LjM1IDI1NC45MjcgMTUwLjAzMyAyNTIuODMxIDE0NS4wODRDMjUyLjYxMSAxNDQuNTU4IDI1Mi41MDggMTQzLjk5MSAyNTIuNTI5IDE0My40MjFDMjUyLjU1IDE0Mi44NTIgMjUyLjY5NCAxNDIuMjkzIDI1Mi45NTEgMTQxLjc4NEMyNTUuMTY5IDEzNy4zNTMgMjU2LjMyMSAxMzIuNDY0IDI1Ni4zMTUgMTI3LjUwOFoiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTEyMC43MjcgMTQ1LjI2OUMxMzEuNTk1IDE0NS4yNjkgMTQwLjQwMyAxMzYuNTA1IDE0MC40MDMgMTI1LjY5N0MxNDAuNDAzIDExNC44ODUgMTMxLjU5NSAxMDYuMTI1IDEyMC43MjcgMTA2LjEyNUMxMDkuODU5IDEwNi4xMjUgMTAxLjA0NyAxMTQuODg1IDEwMS4wNDcgMTI1LjY5N0MxMDEuMDQ3IDEzNi41MDUgMTA5Ljg1OSAxNDUuMjY5IDEyMC43MjcgMTQ1LjI2OVpNMjI1LjY5NSAxNDUuMjY5QzIzNi41NjMgMTQ1LjI2OSAyNDUuMzcxIDEzNi41MDUgMjQ1LjM3MSAxMjUuNjk3QzI0NS4zNzEgMTE0Ljg4NSAyMzYuNTYzIDEwNi4xMjUgMjI1LjY5NSAxMDYuMTI1QzIxNC44MjcgMTA2LjEyNSAyMDYuMDE1IDExNC44ODUgMjA2LjAxNSAxMjUuNjk3QzIwNi4wMTUgMTM2LjUwNSAyMTQuODI3IDE0NS4yNjkgMjI1LjY5NSAxNDUuMjY5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTExMC4yODEgMjQ1LjQ1N0MxMTQuNTE3IDI0NS40NTcgMTE3Ljg1NyAyNDEuNzc3IDExNy4zNzcgMjM3LjYyNUMxMTUuNjQ5IDIyMi45MTcgMTA4LjMxMyAxOTEuMDY5IDc2LjA1NzQgMTcxLjkxM0M0MC43MDE0IDE1MC45MTMgNTcuNTA5NCAyMDYuNzI1IDY0LjU0MTQgMjI3LjA4NUM2NS4yNDM5IDIyOS4wODIgNjUuMjI3NSAyMzEuMjYxIDY0LjQ5NTEgMjMzLjI0N0M2My43NjI3IDIzNS4yMzQgNjIuMzYwMiAyMzYuOTAyIDYwLjUyOTUgMjM3Ljk2NUw1OC4yMjU0IDIzOS4yODlDNTUuMjQ1NCAyNDEuMDA5IDU2LjQ5NzQgMjQ1LjQ1NyA1OS44OTc0IDI0NS40NTdIMTEwLjI4MVpNMjM4LjQxNyAyNDUuNDU3QzIzNC42MDEgMjQ1LjQ1NyAyMzEuNjIxIDI0MS43NzcgMjMyLjAzNyAyMzcuNjI1QzIzMy41MjkgMjIyLjk3NyAyNDAuMjA5IDE5MS4wNjkgMjY5LjMwNSAxNzEuOTEzQzMwMS41MjEgMTUwLjc0OSAyODUuODUzIDIwNy41OTcgMjc5LjU4OSAyMjcuNTUzQzI3OC45ODIgMjI5LjQ1NyAyNzkuMDIxIDIzMS41MDggMjc5LjcwMSAyMzMuMzg3QzI4MC4zOCAyMzUuMjY3IDI4MS42NjEgMjM2Ljg2OSAyODMuMzQ1IDIzNy45NDVMMjg1LjQ2NSAyMzkuMjg5QzI4OC4xNDkgMjQxLjAwOSAyODcuMDE3IDI0NS40NTcgMjgzLjk3NyAyNDUuNDU3SDIzOC40MTdaIiBmaWxsPSIjMzJEQTZEIi8+CjxwYXRoIGQ9Ik0xMjAuNzIyIDEzNy40MDJDMTIzLjgzNiAxMzcuNDAyIDEyNi44MjIgMTM2LjE2NSAxMjkuMDI0IDEzMy45NjNDMTMxLjIyNiAxMzEuNzYyIDEzMi40NjIgMTI4Ljc3NiAxMzIuNDYyIDEyNS42NjJDMTMyLjQ2MiAxMjIuNTQ4IDEzMS4yMjYgMTE5LjU2MiAxMjkuMDI0IDExNy4zNkMxMjYuODIyIDExNS4xNTkgMTIzLjgzNiAxMTMuOTIyIDEyMC43MjIgMTEzLjkyMkMxMTcuNjA5IDExMy45MjIgMTE0LjYyMyAxMTUuMTU5IDExMi40MjEgMTE3LjM2QzExMC4yMTkgMTE5LjU2MiAxMDguOTgyIDEyMi41NDggMTA4Ljk4MiAxMjUuNjYyQzEwOC45ODIgMTI4Ljc3NiAxMTAuMjE5IDEzMS43NjIgMTEyLjQyMSAxMzMuOTYzQzExNC42MjMgMTM2LjE2NSAxMTcuNjA5IDEzNy40MDIgMTIwLjcyMiAxMzcuNDAyWk0yMjUuNjk0IDEzNy40MDJDMjI3LjIzNiAxMzcuNDAyIDIyOC43NjMgMTM3LjA5OCAyMzAuMTg3IDEzNi41MDdDMjMxLjYxMSAxMzUuOTE3IDIzMi45MDUgMTM1LjA1MiAyMzMuOTk1IDEzMy45NjJDMjM1LjA4NSAxMzIuODcyIDIzNS45NSAxMzEuNTc3IDIzNi41NCAxMzAuMTUzQzIzNy4xMjkgMTI4LjcyOCAyMzcuNDMzIDEyNy4yMDIgMjM3LjQzMiAxMjUuNjZDMjM3LjQzMiAxMjQuMTE4IDIzNy4xMjggMTIyLjU5MiAyMzYuNTM4IDEyMS4xNjdDMjM1Ljk0OCAxMTkuNzQzIDIzNS4wODMgMTE4LjQ0OSAyMzMuOTkyIDExNy4zNTlDMjMyLjkwMiAxMTYuMjY5IDIzMS42MDggMTE1LjQwNSAyMzAuMTgzIDExNC44MTVDMjI4Ljc1OSAxMTQuMjI1IDIyNy4yMzIgMTEzLjkyMiAyMjUuNjkgMTEzLjkyMkMyMjIuNTc3IDExMy45MjIgMjE5LjU5MSAxMTUuMTYgMjE3LjM5IDExNy4zNjJDMjE1LjE4OCAxMTkuNTY0IDIxMy45NTIgMTIyLjU1IDIxMy45NTIgMTI1LjY2NEMyMTMuOTUzIDEyOC43NzggMjE1LjE5IDEzMS43NjMgMjE3LjM5MiAxMzMuOTY1QzIxOS41OTQgMTM2LjE2NiAyMjIuNTgxIDEzNy40MDIgMjI1LjY5NCAxMzcuNDAyWk0xOTkuMzQ2IDE3MC40OTRDMjAyLjI2MiAxNzAuNzQ2IDIwNC40NyAxNzMuMzM0IDIwMy43MzQgMTc2LjE3QzIwMi4wOTMgMTgyLjUyMSAxOTguNTEyIDE4OC4yMDIgMTkzLjQ5IDE5Mi40MjJDMTg3LjA3NiAxOTcuODE0IDE3OC43ODQgMjAwLjQ0MiAxNzAuNDM0IDE5OS43M0MxNjQuMjA2IDE5OS4xOTUgMTU4LjI3NyAxOTYuODI0IDE1My4zOTcgMTkyLjkxOEMxNDguNTE2IDE4OS4wMTIgMTQ0LjkwNSAxODMuNzQ2IDE0My4wMTggMTc3Ljc4NkMxNDIuMTIgMTc0Ljk2MiAxNDEuNjI2IDE3Mi4wMjUgMTQxLjU1IDE2OS4wNjJDMTQxLjQ5OCAxNjcuMTEgMTQzLjIzNCAxNjUuNjY2IDE0NS4xNzggMTY1LjgzNEwxNzMuMTQyIDE2OC4yNDJMMTk5LjM0NiAxNzAuNDk0WiIgZmlsbD0iIzA5MjUxMSIvPgo8L3N2Zz4K`},mode:`extension`,extends:`MetaMask`,mobileDisabled:()=>!(`ethereum`in window),rejectMessage:{source:`Request rejected`},downloads:[{device:`desktop`,browser:`chrome`,link:`https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn`},{link:`https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn`}]})],ey=class extends mv{constructor(e){super(e)}},ty=class extends Ih{constructor(e,t){super(e,t,ey)}},ny=[new class extends hv{constructor(e,t){super(e,ty,ey),this.preferredEndpoints=t}}({name:`leap-cosmos-mobile`,prettyName:`Leap Mobile`,logo:`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTY2IiBoZWlnaHQ9IjE2NiIgdmlld0JveD0iMCAwIDE2NiAxNjYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF83ODBfNjEwKSI+CjxyZWN0IHdpZHRoPSIxNjYiIGhlaWdodD0iMTY2IiBmaWxsPSIjQzVGRkNFIi8+CjxwYXRoIGQ9Ik0xMzguNjE0IDEwMC40NDVDMTM4LjYxNCAxMjAuMjE3IDExNC40ODMgMTI4LjI1MiA4NC41MjE2IDEyOC4yNTJDNTQuNTYwMyAxMjguMjUyIDMwLjA3ODQgMTIwLjIxNyAzMC4wNzg0IDEwMC40NDVDMzAuMDc4NCA4MC42NzI0IDU0LjM4NDYgNjQuNjczIDg0LjM0NiA2NC42NzNDMTE0LjMwNyA2NC42NzMgMTM4LjYxNCA4MC43MDc0IDEzOC42MTQgMTAwLjQ0NVoiIGZpbGw9IiMyNEE5NUEiLz4KPHBhdGggZD0iTTEzMy4xMDMgNTcuMzQ3MkMxMzMuMTAzIDQ2LjkzNyAxMjQuNjAzIDM4LjQ4MzIgMTE0LjEzNiAzOC40ODMyQzEwOC42OTMgMzguNDgzMiAxMDMuNzg3IDQwLjc3MTkgMTAwLjMzIDQ0LjQxNzFDOTkuNzk0NCA0NC45ODE4IDk5LjAxMTggNDUuMjU2OSA5OC4yNDkgNDUuMTAyOUM5My44NjkgNDQuMjE4NSA4OS4yMzU1IDQzLjcyMzIgODQuNDU1NSA0My43MjMyQzc5LjY3NiA0My43MjMyIDc1LjA0MyA0NC4xODkzIDcwLjY2MzQgNDUuMDk1QzY5Ljg5OTggNDUuMjUyOSA2OS4xMTM4IDQ0Ljk4MjMgNjguNTc1IDQ0LjQxODZDNjUuMDkgNDAuNzcyNSA2MC4xODY3IDM4LjQ4MzIgNTQuNzc1MiAzOC40ODMyQzQ0LjMwOCAzOC40ODMyIDM1LjgwNzkgNDYuOTM3IDM1LjgwNzkgNTcuMzQ3MkMzNS44MDc5IDYwLjM4MzQgMzYuNTI2MiA2My4yMjczIDM3Ljc5MTMgNjUuNzU3QzM4LjA5NDMgNjYuMzYyOCAzOC4xMjQ4IDY3LjA3MjEgMzcuODYyNyA2Ny42OTY2QzM2LjYzNTMgNzAuNjIxMiAzNS45ODM1IDczLjcwOTEgMzUuOTgzNSA3Ni45MDk4QzM1Ljk4MzUgOTUuMjQ5OCA1Ny42OTA1IDExMC4wOTYgODQuNDU1NSAxMTAuMDk2QzExMS4yMjEgMTEwLjA5NiAxMzIuOTI4IDk1LjI0OTggMTMyLjkyOCA3Ni45MDk4QzEzMi45MjggNzMuNzA5MSAxMzIuMjc2IDcwLjYyMTIgMTMxLjA0OCA2Ny42OTY2QzEzMC43ODYgNjcuMDcyMSAxMzAuODE3IDY2LjM2MjggMTMxLjEyIDY1Ljc1N0MxMzIuMzg1IDYzLjIyNzMgMTMzLjEwMyA2MC4zODM0IDEzMy4xMDMgNTcuMzQ3MloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjIyNzEgNjcuODExOUM1OS42Mjg3IDY3LjgxMTkgNjQuODE4MyA2Mi42NTA2IDY0LjgxODMgNTYuMjgzOUM2NC44MTgzIDQ5LjkxNzEgNTkuNjI4NyA0NC43NTU5IDUzLjIyNzEgNDQuNzU1OUM0Ni44MjU1IDQ0Ljc1NTkgNDEuNjM2IDQ5LjkxNzEgNDEuNjM2IDU2LjI4MzlDNDEuNjM2IDYyLjY1MDYgNDYuODI1NSA2Ny44MTE5IDUzLjIyNzEgNjcuODExOVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMTUuMDY1IDY3LjgxMTlDMTIxLjQ2NiA2Ny44MTE5IDEyNi42NTYgNjIuNjUwNiAxMjYuNjU2IDU2LjI4MzlDMTI2LjY1NiA0OS45MTcxIDEyMS40NjYgNDQuNzU1OSAxMTUuMDY1IDQ0Ljc1NTlDMTA4LjY2MyA0NC43NTU5IDEwMy40NzQgNDkuOTE3MSAxMDMuNDc0IDU2LjI4MzlDMTAzLjQ3NCA2Mi42NTA2IDEwOC42NjMgNjcuODExOSAxMTUuMDY1IDY3LjgxMTlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNDcuMDc1OSAxMjYuODI5QzQ5LjU2OTggMTI2LjgyOSA1MS41MzY4IDEyNC42NjMgNTEuMjU1OCAxMjIuMjE4QzUwLjIzNzIgMTEzLjU1NCA0NS45MTY4IDk0Ljc5NSAyNi45MTQ0IDgzLjUxMTVDNi4wODM2OCA3MS4xMzg3IDE1Ljk5NDEgMTA0LjAzNCAyMC4xMzY1IDExNi4wMTlDMjAuOTc0NCAxMTguNDQzIDIwLjAwMjcgMTIxLjEzNSAxNy43NzgzIDEyMi40MTFMMTYuNDEyMSAxMjMuMTk2QzE0LjY1NTkgMTI0LjIwOSAxNS4zOTM1IDEyNi44MjkgMTcuMzk1NiAxMjYuODI5SDQ3LjA3NTlaIiBmaWxsPSIjMzJEQTZEIi8+CjxwYXRoIGQ9Ik0xMjIuNTY2IDEyNi44MjlDMTIwLjMxOCAxMjYuODI5IDExOC41NjIgMTI0LjY2MyAxMTguODA4IDEyMi4yMThDMTE5LjY4NiAxMTMuNTg5IDEyMy42MiA5NC43OTUgMTQwLjc2MSA4My41MTE1QzE1OS43NDEgNzEuMDQyNiAxNTAuNTAzIDEwNC41NDcgMTQ2LjgxNSAxMTYuMjk0QzE0Ni4wOTIgMTE4LjU5OCAxNDYuOTgyIDEyMS4xMDYgMTQ5LjAyMiAxMjIuMzk5TDE1MC4yOCAxMjMuMTk2QzE1MS44NiAxMjQuMjA5IDE1MS4xOTMgMTI2LjgyOSAxNDkuNDAyIDEyNi44MjlIMTIyLjU2NloiIGZpbGw9IiMzMkRBNkQiLz4KPHBhdGggZD0iTTUzLjI0MjggNjMuMTc4N0M1Ny4wNjE3IDYzLjE3ODcgNjAuMTU3NiA2MC4wODI4IDYwLjE1NzYgNTYuMjYzOUM2MC4xNTc2IDUyLjQ0NSA1Ny4wNjE3IDQ5LjM0OTEgNTMuMjQyOCA0OS4zNDkxQzQ5LjQyMzkgNDkuMzQ5MSA0Ni4zMjggNTIuNDQ1IDQ2LjMyOCA1Ni4yNjM5QzQ2LjMyOCA2MC4wODI4IDQ5LjQyMzkgNjMuMTc4NyA1My4yNDI4IDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik0xMTUuMDgxIDYzLjE3ODdDMTE4LjkgNjMuMTc4NyAxMjEuOTk1IDYwLjA4MjggMTIxLjk5NSA1Ni4yNjM5QzEyMS45OTUgNTIuNDQ1IDExOC45IDQ5LjM0OTEgMTE1LjA4MSA0OS4zNDkxQzExMS4yNjIgNDkuMzQ5MSAxMDguMTY2IDUyLjQ0NSAxMDguMTY2IDU2LjI2MzlDMTA4LjE2NiA2MC4wODI4IDExMS4yNjIgNjMuMTc4NyAxMTUuMDgxIDYzLjE3ODdaIiBmaWxsPSIjMDkyNTExIi8+CjxwYXRoIGQ9Ik05OS43OTk1IDgzLjAxNzZDMTAxLjUxNCA4My4xNjUxIDEwMi44MSA4NC42ODYyIDEwMi4zNzggODYuMzUxOEMxMDIuMDI5IDg3LjY5NzkgMTAxLjUyOSA4OS4wMDM5IDEwMC44ODYgOTAuMjQ0MkM5OS43NjMgOTIuNDA5IDk4LjIyNDYgOTQuMzMxNSA5Ni4zNTg2IDk1LjkwMThDOTQuNDkyNyA5Ny40NzIyIDkyLjMzNTcgOTguNjU5NiA5MC4wMTA4IDk5LjM5NjNDODcuNjg2IDEwMC4xMzMgODUuMjM4OCAxMDAuNDA1IDgyLjgwOSAxMDAuMTk2QzgwLjM3OTEgOTkuOTg2NiA3OC4wMTQzIDk5LjMwMSA3NS44NDk0IDk4LjE3OEM3My42ODQ2IDk3LjA1NTEgNzEuNzYyMSA5NS41MTY3IDcwLjE5MTcgOTMuNjUwN0M2OC42MjE0IDkxLjc4NDggNjcuNDM0IDg5LjYyNzggNjYuNjk3MiA4Ny4zMDI5QzY2LjE3MDEgODUuNjM5NiA2NS44ODExIDgzLjkxMzUgNjUuODM1OSA4Mi4xNzYxQzY1LjgwNiA4MS4wMjk0IDY2LjgyNDQgODAuMTgwOCA2Ny45NjczIDgwLjI3OTFMODQuNDAwNyA4MS42OTI4TDk5Ljc5OTUgODMuMDE3NloiIGZpbGw9IiMwOTI1MTEiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83ODBfNjEwIj4KPHJlY3Qgd2lkdGg9IjE2NiIgaGVpZ2h0PSIxNjYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==`,mode:`wallet-connect`,mobileDisabled:()=>`leap`in window&&/LeapCosmos/i.test(navigator.userAgent),rejectMessage:{source:`Request rejected`},downloads:[{device:`mobile`,os:`android`,link:`https://play.google.com/store/apps/details?id=io.leapwallet.cosmos`},{device:`mobile`,os:`ios`,link:`https://apps.apple.com/in/app/leap-cosmos/id1642465549`},{link:`https://chrome.google.com/webstore/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg`}],connectEventNamesOnWindow:[`leap_keystorechange`],walletconnect:{name:`Leap Cosmos Wallet`,projectId:`3ed8cc046c6211a798dc5ec70f1302b43e07db9639fd287de44a9aa115a21ed6`,encoding:`base64`,mobile:{native:{ios:`leapcosmos:`,android:`intent:`}},formatNativeUrl:(e,t,n,r)=>{let i=e.split(`:`)[0],a=encodeURIComponent(t);switch(n){case`ios`:return`${i}://wcV2?${a}`;case`android`:return`${i}://wcV2?${a}#Intent;package=io.leapwallet.cosmos;scheme=leapwallet;end;`;default:return`${i}://wcV2?${a}`}}}})],ry=[...Hv,...ny,...$v],iy=Sn(),ay=bn(),oy=Xn();T();var sy=e=>{if(e.walletInfo.mode===`extension`)return e.clientMutable.state===`Done`&&!!e.client},cy=({wallet:e,cosmosChainsMap:t,cosmosWagmiChains:n})=>({id:e.walletInfo.name,name:e.walletInfo.prettyName,iconUrl:(typeof e.walletInfo.logo==`string`?e.walletInfo.logo:e.walletInfo.logo?.major??e.walletInfo.logo?.minor)??``,iconBackground:`transparent`,downloadUrls:{chrome:e.walletInfo.downloads?.[0].link,firefox:e.walletInfo.downloads?.[1].link,browserExtension:e.walletInfo.downloads?.[0].link},qrCode:{getUri:e=>e},chainGroup:{iconUrl:p(w.Cosmos),title:`Cosmos`,id:`cosmos`},installed:sy(e),createConnector:r=>f(i=>{let a=new E,o=new d(n),s=e.chainWalletMap.get(t.cosmos?.chain.chain_name??Object.values(t)[0].chain.chain_name);if(!s)throw Error(`Chain wallet not found`);let l=new d(s),u=()=>new Promise((e,t)=>{let n=0,r=async()=>{if(n>3)return t();s.clientMutable.state===`Done`||s.clientMutable.state===`Error`?e():(await c(1e3),n++,r())};r()}),f=async e=>{i.emitter.emit(`message`,{type:`connecting`});let t=l.getValue(),n=t=>{if(!t.address||!t.chainId)throw Error(t.message??`Cosmos wallet did not return an account`);return{accounts:e?.withCapabilities?[{address:t.address,capabilities:{}}]:[t.address],chainId:t.chainId}};if(t.address&&t.chainId)return t.walletInfo.mode===`wallet-connect`&&await t.client.init(),n(t);let r=async e=>{if(!(e<=0)){if(await c(400),t.qrUrl.data)return a.emit(`display_uri`,t.qrUrl.data);r(e-1)}};t.walletInfo.mode===`wallet-connect`&&r(20),await t.connect();let o=n(t);return await p(),o},p=async()=>{let e=await l.getValue(),t=await e.client?.getAccount?.(e.chainId);if(!t)return;let{address:n,pubkey:r}=t;v(`sk-widget@1//skPubKeys`,{...y(`sk-widget@1//skPubKeys`).orDefault({})??{},[n]:(0,ay.toBase64)(r)})},h=async({chainId:t})=>{let n=i.chains.find(e=>e.id===t);if(!n)throw Error(`Chain not found`);let r=n,a=e.getChainWallet(r.cosmosChainName);if(!a)throw Error(`Chain wallet not found`);l.next(a),await f();let o=i.chains.find(e=>e.id===t);if(!o)throw Error(`Chain not found`);return _(t.toString()),g([a.address]),o},g=e=>{e.length===0?i.emitter.emit(`disconnect`):i.emitter.emit(`change`,{accounts:e})},_=e=>{i.emitter.emit(`change`,{chainId:e})},x=()=>{i.emitter.emit(`disconnect`)},S=async()=>{let e=l.getValue().address;return e?[e]:[]},C=async()=>{try{return!!l.getValue().address}catch{return!1}},w=({cw:e,tx:t})=>m(()=>e.client.signDirect(e.chainId,e.address,oy.SignDoc.decode((0,ay.fromHex)(t)))).mapLeft(e=>Error(`signDirect failed`)).map(e=>(0,ay.toHex)(oy.TxRaw.encode({authInfoBytes:e.signed.authInfoBytes,bodyBytes:e.signed.bodyBytes,signatures:[(0,iy.decodeSignature)(e.signature).signature]}).finish())),T=async()=>l.getValue().chainId,D=async()=>a,O=async()=>l.getValue().disconnect();return{...r,setup:u,id:e.walletInfo.name,name:e.walletInfo.name,type:b.type,$filteredChains:o.asObservable(),$chainWallet:l.asObservable(),connect:f,switchChain:h,onAccountsChanged:g,onChainChanged:_,onDisconnect:x,getAccounts:S,isAuthorized:C,getChainId:T,getProvider:D,disconnect:O,signTransaction:w,toBase64:ay.toBase64}})}),ly=class extends mv{disconnect(){return this.signClient?.pairing.getAll().forEach(e=>this.signClient?.core.pairing.disconnect({topic:e.topic})),super.disconnect()}restorePairings(){if(this.signClient===void 0)throw Error(`WalletConnect is not initialized`);this.pairings=this.signClient.pairing.getAll({active:!0}).filter(e=>e.expiry*1e3>Date.now()+1e3),this.logger?.debug(`RESTORED PAIRINGS: `,this.pairings)}restoreSessions(){if(this.signClient===void 0)throw Error(`WalletConnect is not initialized`);this.sessions=this.signClient.session.getAll().filter(e=>e.expiry*1e3>Date.now()+1e3),this.logger?.debug(`RESTORED SESSIONS: `,this.sessions)}},uy=class extends Ih{constructor(e,t){super(e,t,ly)}},dy=class extends hv{constructor(e,t){super(e,uy,ly),this.preferredEndpoints=t}},fy={name:`wallet-connect`,prettyName:`WalletConnect`,logo:_.wcLogo,mode:`wallet-connect`,mobileDisabled:!1,rejectMessage:{source:`Request rejected`},downloads:[{device:`mobile`,os:`android`,link:`https://play.google.com/store/apps/details?id=com.chainapsis.keplr&hl=en&gl=US&pli=1`},{device:`mobile`,os:`ios`,link:`https://apps.apple.com/us/app/keplr-wallet/id1567851089`},{link:`https://www.keplr.app/download`}],connectEventNamesOnWindow:[`wallet-connect_keystorechange`],walletconnect:{name:`Wallet Connect`,projectId:u.walletConnectV2.projectId,encoding:`base64`,mobile:{native:{ios:`keplrwallet:`,android:`intent:`}},formatNativeUrl:(e,t,n,r)=>`${e.replaceAll(`/`,``).replaceAll(`:`,``)}://wcV2?${encodeURIComponent(t)}`}},py=[...Rv,...ry,new dy(fy)],my=({cosmosChainsMap:e,forceWalletConnectOnly:t})=>{let n=t?py.filter(e=>e instanceof dy):py,{chains:r,cosmosWagmiChains:i}=l(e).map(e=>Object.values(e).reduce((e,t)=>(e.cosmosWagmiChains.push(t.wagmiChain),e.chains.push(t.chain),e),{cosmosWagmiChains:[],chains:[]})).map(e=>({...e,chains:[...e.chains].sort(e=>Bn[e.chain_id]===w.Cosmos?-1:1)})).unsafeCoerce();return{connector:{groupName:`Cosmos`,wallets:n.map(t=>()=>cy({wallet:t,cosmosChainsMap:e,cosmosWagmiChains:i}))},walletManager:new qi(r,n,new An(u.env.isDevMode?`ERROR`:`NONE`),!1,!0,void 0,zn,void 0,{signClient:{projectId:u.walletConnectV2.projectId,customStoragePrefix:`cosmoswalletconnect_`}})}};export{Kn as a,my as getWalletManager,qn as i,Yn as n,Gn as o,Jn as r,Wn as s,Xn as t};
|