<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import{ce as he,cl as ae,ci as pe,ch as ye,an as E}from"./index-042db635.js";var de={},x=he,h=x.Reader,w=x.Writer,s=x.util,c=x.roots.default||(x.roots.default={});c.ics23=function(){var i={};return i.HashOp=function(){var r={},n=Object.create(r);return n[r[0]="NO_HASH"]=0,n[r[1]="SHA256"]=1,n[r[2]="SHA512"]=2,n[r[3]="KECCAK"]=3,n[r[4]="RIPEMD160"]=4,n[r[5]="BITCOIN"]=5,n[r[6]="SHA512_256"]=6,n}(),i.LengthOp=function(){var r={},n=Object.create(r);return n[r[0]="NO_PREFIX"]=0,n[r[1]="VAR_PROTO"]=1,n[r[2]="VAR_RLP"]=2,n[r[3]="FIXED32_BIG"]=3,n[r[4]="FIXED32_LITTLE"]=4,n[r[5]="FIXED64_BIG"]=5,n[r[6]="FIXED64_LITTLE"]=6,n[r[7]="REQUIRE_32_BYTES"]=7,n[r[8]="REQUIRE_64_BYTES"]=8,n}(),i.ExistenceProof=function(){function r(n){if(this.path=[],n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.key=s.newBuffer([]),r.prototype.value=s.newBuffer([]),r.prototype.leaf=null,r.prototype.path=s.emptyArray,r.create=function(t){return new r(t)},r.encode=function(t,e){if(e||(e=w.create()),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;e.uint32(10).bytes(t.key),t.value!=null&amp;&amp;t.hasOwnProperty("value")&amp;&amp;e.uint32(18).bytes(t.value),t.leaf!=null&amp;&amp;t.hasOwnProperty("leaf")&amp;&amp;c.ics23.LeafOp.encode(t.leaf,e.uint32(26).fork()).ldelim(),t.path!=null&amp;&amp;t.path.length)for(var o=0;o&lt;t.path.length;++o)c.ics23.InnerOp.encode(t.path[o],e.uint32(34).fork()).ldelim();return e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.ExistenceProof;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.key=t.bytes();break;case 2:f.value=t.bytes();break;case 3:f.leaf=c.ics23.LeafOp.decode(t,t.uint32());break;case 4:f.path&amp;&amp;f.path.length||(f.path=[]),f.path.push(c.ics23.InnerOp.decode(t,t.uint32()));break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;!(t.key&amp;&amp;typeof t.key.length=="number"||s.isString(t.key)))return"key: buffer expected";if(t.value!=null&amp;&amp;t.hasOwnProperty("value")&amp;&amp;!(t.value&amp;&amp;typeof t.value.length=="number"||s.isString(t.value)))return"value: buffer expected";if(t.leaf!=null&amp;&amp;t.hasOwnProperty("leaf")){var e=c.ics23.LeafOp.verify(t.leaf);if(e)return"leaf."+e}if(t.path!=null&amp;&amp;t.hasOwnProperty("path")){if(!Array.isArray(t.path))return"path: array expected";for(var o=0;o&lt;t.path.length;++o){var e=c.ics23.InnerOp.verify(t.path[o]);if(e)return"path."+e}}return null},r.fromObject=function(t){if(t instanceof c.ics23.ExistenceProof)return t;var e=new c.ics23.ExistenceProof;if(t.key!=null&amp;&amp;(typeof t.key=="string"?s.base64.decode(t.key,e.key=s.newBuffer(s.base64.length(t.key)),0):t.key.length&amp;&amp;(e.key=t.key)),t.value!=null&amp;&amp;(typeof t.value=="string"?s.base64.decode(t.value,e.value=s.newBuffer(s.base64.length(t.value)),0):t.value.length&amp;&amp;(e.value=t.value)),t.leaf!=null){if(typeof t.leaf!="object")throw TypeError(".ics23.ExistenceProof.leaf: object expected");e.leaf=c.ics23.LeafOp.fromObject(t.leaf)}if(t.path){if(!Array.isArray(t.path))throw TypeError(".ics23.ExistenceProof.path: array expected");e.path=[];for(var o=0;o&lt;t.path.length;++o){if(typeof t.path[o]!="object")throw TypeError(".ics23.ExistenceProof.path: object expected");e.path[o]=c.ics23.InnerOp.fromObject(t.path[o])}}return e},r.toObject=function(t,e){e||(e={});var o={};if((e.arrays||e.defaults)&amp;&amp;(o.path=[]),e.defaults&amp;&amp;(e.bytes===String?o.key="":(o.key=[],e.bytes!==Array&amp;&amp;(o.key=s.newBuffer(o.key))),e.bytes===String?o.value="":(o.value=[],e.bytes!==Array&amp;&amp;(o.value=s.newBuffer(o.value))),o.leaf=null),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;(o.key=e.bytes===String?s.base64.encode(t.key,0,t.key.length):e.bytes===Array?Array.prototype.slice.call(t.key):t.key),t.value!=null&amp;&amp;t.hasOwnProperty("value")&amp;&amp;(o.value=e.bytes===String?s.base64.encode(t.value,0,t.value.length):e.bytes===Array?Array.prototype.slice.call(t.value):t.value),t.leaf!=null&amp;&amp;t.hasOwnProperty("leaf")&amp;&amp;(o.leaf=c.ics23.LeafOp.toObject(t.leaf,e)),t.path&amp;&amp;t.path.length){o.path=[];for(var f=0;f&lt;t.path.length;++f)o.path[f]=c.ics23.InnerOp.toObject(t.path[f],e)}return o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.NonExistenceProof=function(){function r(n){if(n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.key=s.newBuffer([]),r.prototype.left=null,r.prototype.right=null,r.create=function(t){return new r(t)},r.encode=function(t,e){return e||(e=w.create()),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;e.uint32(10).bytes(t.key),t.left!=null&amp;&amp;t.hasOwnProperty("left")&amp;&amp;c.ics23.ExistenceProof.encode(t.left,e.uint32(18).fork()).ldelim(),t.right!=null&amp;&amp;t.hasOwnProperty("right")&amp;&amp;c.ics23.ExistenceProof.encode(t.right,e.uint32(26).fork()).ldelim(),e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.NonExistenceProof;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.key=t.bytes();break;case 2:f.left=c.ics23.ExistenceProof.decode(t,t.uint32());break;case 3:f.right=c.ics23.ExistenceProof.decode(t,t.uint32());break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;!(t.key&amp;&amp;typeof t.key.length=="number"||s.isString(t.key)))return"key: buffer expected";if(t.left!=null&amp;&amp;t.hasOwnProperty("left")){var e=c.ics23.ExistenceProof.verify(t.left);if(e)return"left."+e}if(t.right!=null&amp;&amp;t.hasOwnProperty("right")){var e=c.ics23.ExistenceProof.verify(t.right);if(e)return"right."+e}return null},r.fromObject=function(t){if(t instanceof c.ics23.NonExistenceProof)return t;var e=new c.ics23.NonExistenceProof;if(t.key!=null&amp;&amp;(typeof t.key=="string"?s.base64.decode(t.key,e.key=s.newBuffer(s.base64.length(t.key)),0):t.key.length&amp;&amp;(e.key=t.key)),t.left!=null){if(typeof t.left!="object")throw TypeError(".ics23.NonExistenceProof.left: object expected");e.left=c.ics23.ExistenceProof.fromObject(t.left)}if(t.right!=null){if(typeof t.right!="object")throw TypeError(".ics23.NonExistenceProof.right: object expected");e.right=c.ics23.ExistenceProof.fromObject(t.right)}return e},r.toObject=function(t,e){e||(e={});var o={};return e.defaults&amp;&amp;(e.bytes===String?o.key="":(o.key=[],e.bytes!==Array&amp;&amp;(o.key=s.newBuffer(o.key))),o.left=null,o.right=null),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;(o.key=e.bytes===String?s.base64.encode(t.key,0,t.key.length):e.bytes===Array?Array.prototype.slice.call(t.key):t.key),t.left!=null&amp;&amp;t.hasOwnProperty("left")&amp;&amp;(o.left=c.ics23.ExistenceProof.toObject(t.left,e)),t.right!=null&amp;&amp;t.hasOwnProperty("right")&amp;&amp;(o.right=c.ics23.ExistenceProof.toObject(t.right,e)),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.CommitmentProof=function(){function r(t){if(t)for(var e=Object.keys(t),o=0;o&lt;e.length;++o)t[e[o]]!=null&amp;&amp;(this[e[o]]=t[e[o]])}r.prototype.exist=null,r.prototype.nonexist=null,r.prototype.batch=null,r.prototype.compressed=null;var n;return Object.defineProperty(r.prototype,"proof",{get:s.oneOfGetter(n=["exist","nonexist","batch","compressed"]),set:s.oneOfSetter(n)}),r.create=function(e){return new r(e)},r.encode=function(e,o){return o||(o=w.create()),e.exist!=null&amp;&amp;e.hasOwnProperty("exist")&amp;&amp;c.ics23.ExistenceProof.encode(e.exist,o.uint32(10).fork()).ldelim(),e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")&amp;&amp;c.ics23.NonExistenceProof.encode(e.nonexist,o.uint32(18).fork()).ldelim(),e.batch!=null&amp;&amp;e.hasOwnProperty("batch")&amp;&amp;c.ics23.BatchProof.encode(e.batch,o.uint32(26).fork()).ldelim(),e.compressed!=null&amp;&amp;e.hasOwnProperty("compressed")&amp;&amp;c.ics23.CompressedBatchProof.encode(e.compressed,o.uint32(34).fork()).ldelim(),o},r.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},r.decode=function(e,o){e instanceof h||(e=h.create(e));for(var f=o===void 0?e.len:e.pos+o,l=new c.ics23.CommitmentProof;e.pos&lt;f;){var p=e.uint32();switch(p&gt;&gt;&gt;3){case 1:l.exist=c.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:l.nonexist=c.ics23.NonExistenceProof.decode(e,e.uint32());break;case 3:l.batch=c.ics23.BatchProof.decode(e,e.uint32());break;case 4:l.compressed=c.ics23.CompressedBatchProof.decode(e,e.uint32());break;default:e.skipType(p&amp;7);break}}return l},r.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},r.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var o={};if(e.exist!=null&amp;&amp;e.hasOwnProperty("exist")){o.proof=1;{var f=c.ics23.ExistenceProof.verify(e.exist);if(f)return"exist."+f}}if(e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")){if(o.proof===1)return"proof: multiple values";o.proof=1;{var f=c.ics23.NonExistenceProof.verify(e.nonexist);if(f)return"nonexist."+f}}if(e.batch!=null&amp;&amp;e.hasOwnProperty("batch")){if(o.proof===1)return"proof: multiple values";o.proof=1;{var f=c.ics23.BatchProof.verify(e.batch);if(f)return"batch."+f}}if(e.compressed!=null&amp;&amp;e.hasOwnProperty("compressed")){if(o.proof===1)return"proof: multiple values";o.proof=1;{var f=c.ics23.CompressedBatchProof.verify(e.compressed);if(f)return"compressed."+f}}return null},r.fromObject=function(e){if(e instanceof c.ics23.CommitmentProof)return e;var o=new c.ics23.CommitmentProof;if(e.exist!=null){if(typeof e.exist!="object")throw TypeError(".ics23.CommitmentProof.exist: object expected");o.exist=c.ics23.ExistenceProof.fromObject(e.exist)}if(e.nonexist!=null){if(typeof e.nonexist!="object")throw TypeError(".ics23.CommitmentProof.nonexist: object expected");o.nonexist=c.ics23.NonExistenceProof.fromObject(e.nonexist)}if(e.batch!=null){if(typeof e.batch!="object")throw TypeError(".ics23.CommitmentProof.batch: object expected");o.batch=c.ics23.BatchProof.fromObject(e.batch)}if(e.compressed!=null){if(typeof e.compressed!="object")throw TypeError(".ics23.CommitmentProof.compressed: object expected");o.compressed=c.ics23.CompressedBatchProof.fromObject(e.compressed)}return o},r.toObject=function(e,o){o||(o={});var f={};return e.exist!=null&amp;&amp;e.hasOwnProperty("exist")&amp;&amp;(f.exist=c.ics23.ExistenceProof.toObject(e.exist,o),o.oneofs&amp;&amp;(f.proof="exist")),e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")&amp;&amp;(f.nonexist=c.ics23.NonExistenceProof.toObject(e.nonexist,o),o.oneofs&amp;&amp;(f.proof="nonexist")),e.batch!=null&amp;&amp;e.hasOwnProperty("batch")&amp;&amp;(f.batch=c.ics23.BatchProof.toObject(e.batch,o),o.oneofs&amp;&amp;(f.proof="batch")),e.compressed!=null&amp;&amp;e.hasOwnProperty("compressed")&amp;&amp;(f.compressed=c.ics23.CompressedBatchProof.toObject(e.compressed,o),o.oneofs&amp;&amp;(f.proof="compressed")),f},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.LeafOp=function(){function r(n){if(n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.hash=0,r.prototype.prehashKey=0,r.prototype.prehashValue=0,r.prototype.length=0,r.prototype.prefix=s.newBuffer([]),r.create=function(t){return new r(t)},r.encode=function(t,e){return e||(e=w.create()),t.hash!=null&amp;&amp;t.hasOwnProperty("hash")&amp;&amp;e.uint32(8).int32(t.hash),t.prehashKey!=null&amp;&amp;t.hasOwnProperty("prehashKey")&amp;&amp;e.uint32(16).int32(t.prehashKey),t.prehashValue!=null&amp;&amp;t.hasOwnProperty("prehashValue")&amp;&amp;e.uint32(24).int32(t.prehashValue),t.length!=null&amp;&amp;t.hasOwnProperty("length")&amp;&amp;e.uint32(32).int32(t.length),t.prefix!=null&amp;&amp;t.hasOwnProperty("prefix")&amp;&amp;e.uint32(42).bytes(t.prefix),e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.LeafOp;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.hash=t.int32();break;case 2:f.prehashKey=t.int32();break;case 3:f.prehashValue=t.int32();break;case 4:f.length=t.int32();break;case 5:f.prefix=t.bytes();break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.hash!=null&amp;&amp;t.hasOwnProperty("hash"))switch(t.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:break}if(t.prehashKey!=null&amp;&amp;t.hasOwnProperty("prehashKey"))switch(t.prehashKey){default:return"prehashKey: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:break}if(t.prehashValue!=null&amp;&amp;t.hasOwnProperty("prehashValue"))switch(t.prehashValue){default:return"prehashValue: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:break}if(t.length!=null&amp;&amp;t.hasOwnProperty("length"))switch(t.length){default:return"length: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:break}return t.prefix!=null&amp;&amp;t.hasOwnProperty("prefix")&amp;&amp;!(t.prefix&amp;&amp;typeof t.prefix.length=="number"||s.isString(t.prefix))?"prefix: buffer expected":null},r.fromObject=function(t){if(t instanceof c.ics23.LeafOp)return t;var e=new c.ics23.LeafOp;switch(t.hash){case"NO_HASH":case 0:e.hash=0;break;case"SHA256":case 1:e.hash=1;break;case"SHA512":case 2:e.hash=2;break;case"KECCAK":case 3:e.hash=3;break;case"RIPEMD160":case 4:e.hash=4;break;case"BITCOIN":case 5:e.hash=5;break;case"SHA512_256":case 6:e.hash=6;break}switch(t.prehashKey){case"NO_HASH":case 0:e.prehashKey=0;break;case"SHA256":case 1:e.prehashKey=1;break;case"SHA512":case 2:e.prehashKey=2;break;case"KECCAK":case 3:e.prehashKey=3;break;case"RIPEMD160":case 4:e.prehashKey=4;break;case"BITCOIN":case 5:e.prehashKey=5;break;case"SHA512_256":case 6:e.prehashKey=6;break}switch(t.prehashValue){case"NO_HASH":case 0:e.prehashValue=0;break;case"SHA256":case 1:e.prehashValue=1;break;case"SHA512":case 2:e.prehashValue=2;break;case"KECCAK":case 3:e.prehashValue=3;break;case"RIPEMD160":case 4:e.prehashValue=4;break;case"BITCOIN":case 5:e.prehashValue=5;break;case"SHA512_256":case 6:e.prehashValue=6;break}switch(t.length){case"NO_PREFIX":case 0:e.length=0;break;case"VAR_PROTO":case 1:e.length=1;break;case"VAR_RLP":case 2:e.length=2;break;case"FIXED32_BIG":case 3:e.length=3;break;case"FIXED32_LITTLE":case 4:e.length=4;break;case"FIXED64_BIG":case 5:e.length=5;break;case"FIXED64_LITTLE":case 6:e.length=6;break;case"REQUIRE_32_BYTES":case 7:e.length=7;break;case"REQUIRE_64_BYTES":case 8:e.length=8;break}return t.prefix!=null&amp;&amp;(typeof t.prefix=="string"?s.base64.decode(t.prefix,e.prefix=s.newBuffer(s.base64.length(t.prefix)),0):t.prefix.length&amp;&amp;(e.prefix=t.prefix)),e},r.toObject=function(t,e){e||(e={});var o={};return e.defaults&amp;&amp;(o.hash=e.enums===String?"NO_HASH":0,o.prehashKey=e.enums===String?"NO_HASH":0,o.prehashValue=e.enums===String?"NO_HASH":0,o.length=e.enums===String?"NO_PREFIX":0,e.bytes===String?o.prefix="":(o.prefix=[],e.bytes!==Array&amp;&amp;(o.prefix=s.newBuffer(o.prefix)))),t.hash!=null&amp;&amp;t.hasOwnProperty("hash")&amp;&amp;(o.hash=e.enums===String?c.ics23.HashOp[t.hash]:t.hash),t.prehashKey!=null&amp;&amp;t.hasOwnProperty("prehashKey")&amp;&amp;(o.prehashKey=e.enums===String?c.ics23.HashOp[t.prehashKey]:t.prehashKey),t.prehashValue!=null&amp;&amp;t.hasOwnProperty("prehashValue")&amp;&amp;(o.prehashValue=e.enums===String?c.ics23.HashOp[t.prehashValue]:t.prehashValue),t.length!=null&amp;&amp;t.hasOwnProperty("length")&amp;&amp;(o.length=e.enums===String?c.ics23.LengthOp[t.length]:t.length),t.prefix!=null&amp;&amp;t.hasOwnProperty("prefix")&amp;&amp;(o.prefix=e.bytes===String?s.base64.encode(t.prefix,0,t.prefix.length):e.bytes===Array?Array.prototype.slice.call(t.prefix):t.prefix),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.InnerOp=function(){function r(n){if(n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.hash=0,r.prototype.prefix=s.newBuffer([]),r.prototype.suffix=s.newBuffer([]),r.create=function(t){return new r(t)},r.encode=function(t,e){return e||(e=w.create()),t.hash!=null&amp;&amp;t.hasOwnProperty("hash")&amp;&amp;e.uint32(8).int32(t.hash),t.prefix!=null&amp;&amp;t.hasOwnProperty("prefix")&amp;&amp;e.uint32(18).bytes(t.prefix),t.suffix!=null&amp;&amp;t.hasOwnProperty("suffix")&amp;&amp;e.uint32(26).bytes(t.suffix),e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.InnerOp;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.hash=t.int32();break;case 2:f.prefix=t.bytes();break;case 3:f.suffix=t.bytes();break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.hash!=null&amp;&amp;t.hasOwnProperty("hash"))switch(t.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:break}return t.prefix!=null&amp;&amp;t.hasOwnProperty("prefix")&amp;&amp;!(t.prefix&amp;&amp;typeof t.prefix.length=="number"||s.isString(t.prefix))?"prefix: buffer expected":t.suffix!=null&amp;&amp;t.hasOwnProperty("suffix")&amp;&amp;!(t.suffix&amp;&amp;typeof t.suffix.length=="number"||s.isString(t.suffix))?"suffix: buffer expected":null},r.fromObject=function(t){if(t instanceof c.ics23.InnerOp)return t;var e=new c.ics23.InnerOp;switch(t.hash){case"NO_HASH":case 0:e.hash=0;break;case"SHA256":case 1:e.hash=1;break;case"SHA512":case 2:e.hash=2;break;case"KECCAK":case 3:e.hash=3;break;case"RIPEMD160":case 4:e.hash=4;break;case"BITCOIN":case 5:e.hash=5;break;case"SHA512_256":case 6:e.hash=6;break}return t.prefix!=null&amp;&amp;(typeof t.prefix=="string"?s.base64.decode(t.prefix,e.prefix=s.newBuffer(s.base64.length(t.prefix)),0):t.prefix.length&amp;&amp;(e.prefix=t.prefix)),t.suffix!=null&amp;&amp;(typeof t.suffix=="string"?s.base64.decode(t.suffix,e.suffix=s.newBuffer(s.base64.length(t.suffix)),0):t.suffix.length&amp;&amp;(e.suffix=t.suffix)),e},r.toObject=function(t,e){e||(e={});var o={};return e.defaults&amp;&amp;(o.hash=e.enums===String?"NO_HASH":0,e.bytes===String?o.prefix="":(o.prefix=[],e.bytes!==Array&amp;&amp;(o.prefix=s.newBuffer(o.prefix))),e.bytes===String?o.suffix="":(o.suffix=[],e.bytes!==Array&amp;&amp;(o.suffix=s.newBuffer(o.suffix)))),t.hash!=null&amp;&amp;t.hasOwnProperty("hash")&amp;&amp;(o.hash=e.enums===String?c.ics23.HashOp[t.hash]:t.hash),t.prefix!=null&amp;&amp;t.hasOwnProperty("prefix")&amp;&amp;(o.prefix=e.bytes===String?s.base64.encode(t.prefix,0,t.prefix.length):e.bytes===Array?Array.prototype.slice.call(t.prefix):t.prefix),t.suffix!=null&amp;&amp;t.hasOwnProperty("suffix")&amp;&amp;(o.suffix=e.bytes===String?s.base64.encode(t.suffix,0,t.suffix.length):e.bytes===Array?Array.prototype.slice.call(t.suffix):t.suffix),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.ProofSpec=function(){function r(n){if(n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.leafSpec=null,r.prototype.innerSpec=null,r.prototype.maxDepth=0,r.prototype.minDepth=0,r.create=function(t){return new r(t)},r.encode=function(t,e){return e||(e=w.create()),t.leafSpec!=null&amp;&amp;t.hasOwnProperty("leafSpec")&amp;&amp;c.ics23.LeafOp.encode(t.leafSpec,e.uint32(10).fork()).ldelim(),t.innerSpec!=null&amp;&amp;t.hasOwnProperty("innerSpec")&amp;&amp;c.ics23.InnerSpec.encode(t.innerSpec,e.uint32(18).fork()).ldelim(),t.maxDepth!=null&amp;&amp;t.hasOwnProperty("maxDepth")&amp;&amp;e.uint32(24).int32(t.maxDepth),t.minDepth!=null&amp;&amp;t.hasOwnProperty("minDepth")&amp;&amp;e.uint32(32).int32(t.minDepth),e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.ProofSpec;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.leafSpec=c.ics23.LeafOp.decode(t,t.uint32());break;case 2:f.innerSpec=c.ics23.InnerSpec.decode(t,t.uint32());break;case 3:f.maxDepth=t.int32();break;case 4:f.minDepth=t.int32();break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.leafSpec!=null&amp;&amp;t.hasOwnProperty("leafSpec")){var e=c.ics23.LeafOp.verify(t.leafSpec);if(e)return"leafSpec."+e}if(t.innerSpec!=null&amp;&amp;t.hasOwnProperty("innerSpec")){var e=c.ics23.InnerSpec.verify(t.innerSpec);if(e)return"innerSpec."+e}return t.maxDepth!=null&amp;&amp;t.hasOwnProperty("maxDepth")&amp;&amp;!s.isInteger(t.maxDepth)?"maxDepth: integer expected":t.minDepth!=null&amp;&amp;t.hasOwnProperty("minDepth")&amp;&amp;!s.isInteger(t.minDepth)?"minDepth: integer expected":null},r.fromObject=function(t){if(t instanceof c.ics23.ProofSpec)return t;var e=new c.ics23.ProofSpec;if(t.leafSpec!=null){if(typeof t.leafSpec!="object")throw TypeError(".ics23.ProofSpec.leafSpec: object expected");e.leafSpec=c.ics23.LeafOp.fromObject(t.leafSpec)}if(t.innerSpec!=null){if(typeof t.innerSpec!="object")throw TypeError(".ics23.ProofSpec.innerSpec: object expected");e.innerSpec=c.ics23.InnerSpec.fromObject(t.innerSpec)}return t.maxDepth!=null&amp;&amp;(e.maxDepth=t.maxDepth|0),t.minDepth!=null&amp;&amp;(e.minDepth=t.minDepth|0),e},r.toObject=function(t,e){e||(e={});var o={};return e.defaults&amp;&amp;(o.leafSpec=null,o.innerSpec=null,o.maxDepth=0,o.minDepth=0),t.leafSpec!=null&amp;&amp;t.hasOwnProperty("leafSpec")&amp;&amp;(o.leafSpec=c.ics23.LeafOp.toObject(t.leafSpec,e)),t.innerSpec!=null&amp;&amp;t.hasOwnProperty("innerSpec")&amp;&amp;(o.innerSpec=c.ics23.InnerSpec.toObject(t.innerSpec,e)),t.maxDepth!=null&amp;&amp;t.hasOwnProperty("maxDepth")&amp;&amp;(o.maxDepth=t.maxDepth),t.minDepth!=null&amp;&amp;t.hasOwnProperty("minDepth")&amp;&amp;(o.minDepth=t.minDepth),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.InnerSpec=function(){function r(n){if(this.childOrder=[],n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.childOrder=s.emptyArray,r.prototype.childSize=0,r.prototype.minPrefixLength=0,r.prototype.maxPrefixLength=0,r.prototype.emptyChild=s.newBuffer([]),r.prototype.hash=0,r.create=function(t){return new r(t)},r.encode=function(t,e){if(e||(e=w.create()),t.childOrder!=null&amp;&amp;t.childOrder.length){e.uint32(10).fork();for(var o=0;o&lt;t.childOrder.length;++o)e.int32(t.childOrder[o]);e.ldelim()}return t.childSize!=null&amp;&amp;t.hasOwnProperty("childSize")&amp;&amp;e.uint32(16).int32(t.childSize),t.minPrefixLength!=null&amp;&amp;t.hasOwnProperty("minPrefixLength")&amp;&amp;e.uint32(24).int32(t.minPrefixLength),t.maxPrefixLength!=null&amp;&amp;t.hasOwnProperty("maxPrefixLength")&amp;&amp;e.uint32(32).int32(t.maxPrefixLength),t.emptyChild!=null&amp;&amp;t.hasOwnProperty("emptyChild")&amp;&amp;e.uint32(42).bytes(t.emptyChild),t.hash!=null&amp;&amp;t.hasOwnProperty("hash")&amp;&amp;e.uint32(48).int32(t.hash),e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.InnerSpec;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:if(f.childOrder&amp;&amp;f.childOrder.length||(f.childOrder=[]),(l&amp;7)===2)for(var p=t.uint32()+t.pos;t.pos&lt;p;)f.childOrder.push(t.int32());else f.childOrder.push(t.int32());break;case 2:f.childSize=t.int32();break;case 3:f.minPrefixLength=t.int32();break;case 4:f.maxPrefixLength=t.int32();break;case 5:f.emptyChild=t.bytes();break;case 6:f.hash=t.int32();break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.childOrder!=null&amp;&amp;t.hasOwnProperty("childOrder")){if(!Array.isArray(t.childOrder))return"childOrder: array expected";for(var e=0;e&lt;t.childOrder.length;++e)if(!s.isInteger(t.childOrder[e]))return"childOrder: integer[] expected"}if(t.childSize!=null&amp;&amp;t.hasOwnProperty("childSize")&amp;&amp;!s.isInteger(t.childSize))return"childSize: integer expected";if(t.minPrefixLength!=null&amp;&amp;t.hasOwnProperty("minPrefixLength")&amp;&amp;!s.isInteger(t.minPrefixLength))return"minPrefixLength: integer expected";if(t.maxPrefixLength!=null&amp;&amp;t.hasOwnProperty("maxPrefixLength")&amp;&amp;!s.isInteger(t.maxPrefixLength))return"maxPrefixLength: integer expected";if(t.emptyChild!=null&amp;&amp;t.hasOwnProperty("emptyChild")&amp;&amp;!(t.emptyChild&amp;&amp;typeof t.emptyChild.length=="number"||s.isString(t.emptyChild)))return"emptyChild: buffer expected";if(t.hash!=null&amp;&amp;t.hasOwnProperty("hash"))switch(t.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:break}return null},r.fromObject=function(t){if(t instanceof c.ics23.InnerSpec)return t;var e=new c.ics23.InnerSpec;if(t.childOrder){if(!Array.isArray(t.childOrder))throw TypeError(".ics23.InnerSpec.childOrder: array expected");e.childOrder=[];for(var o=0;o&lt;t.childOrder.length;++o)e.childOrder[o]=t.childOrder[o]|0}switch(t.childSize!=null&amp;&amp;(e.childSize=t.childSize|0),t.minPrefixLength!=null&amp;&amp;(e.minPrefixLength=t.minPrefixLength|0),t.maxPrefixLength!=null&amp;&amp;(e.maxPrefixLength=t.maxPrefixLength|0),t.emptyChild!=null&amp;&amp;(typeof t.emptyChild=="string"?s.base64.decode(t.emptyChild,e.emptyChild=s.newBuffer(s.base64.length(t.emptyChild)),0):t.emptyChild.length&amp;&amp;(e.emptyChild=t.emptyChild)),t.hash){case"NO_HASH":case 0:e.hash=0;break;case"SHA256":case 1:e.hash=1;break;case"SHA512":case 2:e.hash=2;break;case"KECCAK":case 3:e.hash=3;break;case"RIPEMD160":case 4:e.hash=4;break;case"BITCOIN":case 5:e.hash=5;break;case"SHA512_256":case 6:e.hash=6;break}return e},r.toObject=function(t,e){e||(e={});var o={};if((e.arrays||e.defaults)&amp;&amp;(o.childOrder=[]),e.defaults&amp;&amp;(o.childSize=0,o.minPrefixLength=0,o.maxPrefixLength=0,e.bytes===String?o.emptyChild="":(o.emptyChild=[],e.bytes!==Array&amp;&amp;(o.emptyChild=s.newBuffer(o.emptyChild))),o.hash=e.enums===String?"NO_HASH":0),t.childOrder&amp;&amp;t.childOrder.length){o.childOrder=[];for(var f=0;f&lt;t.childOrder.length;++f)o.childOrder[f]=t.childOrder[f]}return t.childSize!=null&amp;&amp;t.hasOwnProperty("childSize")&amp;&amp;(o.childSize=t.childSize),t.minPrefixLength!=null&amp;&amp;t.hasOwnProperty("minPrefixLength")&amp;&amp;(o.minPrefixLength=t.minPrefixLength),t.maxPrefixLength!=null&amp;&amp;t.hasOwnProperty("maxPrefixLength")&amp;&amp;(o.maxPrefixLength=t.maxPrefixLength),t.emptyChild!=null&amp;&amp;t.hasOwnProperty("emptyChild")&amp;&amp;(o.emptyChild=e.bytes===String?s.base64.encode(t.emptyChild,0,t.emptyChild.length):e.bytes===Array?Array.prototype.slice.call(t.emptyChild):t.emptyChild),t.hash!=null&amp;&amp;t.hasOwnProperty("hash")&amp;&amp;(o.hash=e.enums===String?c.ics23.HashOp[t.hash]:t.hash),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.BatchProof=function(){function r(n){if(this.entries=[],n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.entries=s.emptyArray,r.create=function(t){return new r(t)},r.encode=function(t,e){if(e||(e=w.create()),t.entries!=null&amp;&amp;t.entries.length)for(var o=0;o&lt;t.entries.length;++o)c.ics23.BatchEntry.encode(t.entries[o],e.uint32(10).fork()).ldelim();return e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.BatchProof;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.entries&amp;&amp;f.entries.length||(f.entries=[]),f.entries.push(c.ics23.BatchEntry.decode(t,t.uint32()));break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.entries!=null&amp;&amp;t.hasOwnProperty("entries")){if(!Array.isArray(t.entries))return"entries: array expected";for(var e=0;e&lt;t.entries.length;++e){var o=c.ics23.BatchEntry.verify(t.entries[e]);if(o)return"entries."+o}}return null},r.fromObject=function(t){if(t instanceof c.ics23.BatchProof)return t;var e=new c.ics23.BatchProof;if(t.entries){if(!Array.isArray(t.entries))throw TypeError(".ics23.BatchProof.entries: array expected");e.entries=[];for(var o=0;o&lt;t.entries.length;++o){if(typeof t.entries[o]!="object")throw TypeError(".ics23.BatchProof.entries: object expected");e.entries[o]=c.ics23.BatchEntry.fromObject(t.entries[o])}}return e},r.toObject=function(t,e){e||(e={});var o={};if((e.arrays||e.defaults)&amp;&amp;(o.entries=[]),t.entries&amp;&amp;t.entries.length){o.entries=[];for(var f=0;f&lt;t.entries.length;++f)o.entries[f]=c.ics23.BatchEntry.toObject(t.entries[f],e)}return o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.BatchEntry=function(){function r(t){if(t)for(var e=Object.keys(t),o=0;o&lt;e.length;++o)t[e[o]]!=null&amp;&amp;(this[e[o]]=t[e[o]])}r.prototype.exist=null,r.prototype.nonexist=null;var n;return Object.defineProperty(r.prototype,"proof",{get:s.oneOfGetter(n=["exist","nonexist"]),set:s.oneOfSetter(n)}),r.create=function(e){return new r(e)},r.encode=function(e,o){return o||(o=w.create()),e.exist!=null&amp;&amp;e.hasOwnProperty("exist")&amp;&amp;c.ics23.ExistenceProof.encode(e.exist,o.uint32(10).fork()).ldelim(),e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")&amp;&amp;c.ics23.NonExistenceProof.encode(e.nonexist,o.uint32(18).fork()).ldelim(),o},r.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},r.decode=function(e,o){e instanceof h||(e=h.create(e));for(var f=o===void 0?e.len:e.pos+o,l=new c.ics23.BatchEntry;e.pos&lt;f;){var p=e.uint32();switch(p&gt;&gt;&gt;3){case 1:l.exist=c.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:l.nonexist=c.ics23.NonExistenceProof.decode(e,e.uint32());break;default:e.skipType(p&amp;7);break}}return l},r.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},r.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var o={};if(e.exist!=null&amp;&amp;e.hasOwnProperty("exist")){o.proof=1;{var f=c.ics23.ExistenceProof.verify(e.exist);if(f)return"exist."+f}}if(e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")){if(o.proof===1)return"proof: multiple values";o.proof=1;{var f=c.ics23.NonExistenceProof.verify(e.nonexist);if(f)return"nonexist."+f}}return null},r.fromObject=function(e){if(e instanceof c.ics23.BatchEntry)return e;var o=new c.ics23.BatchEntry;if(e.exist!=null){if(typeof e.exist!="object")throw TypeError(".ics23.BatchEntry.exist: object expected");o.exist=c.ics23.ExistenceProof.fromObject(e.exist)}if(e.nonexist!=null){if(typeof e.nonexist!="object")throw TypeError(".ics23.BatchEntry.nonexist: object expected");o.nonexist=c.ics23.NonExistenceProof.fromObject(e.nonexist)}return o},r.toObject=function(e,o){o||(o={});var f={};return e.exist!=null&amp;&amp;e.hasOwnProperty("exist")&amp;&amp;(f.exist=c.ics23.ExistenceProof.toObject(e.exist,o),o.oneofs&amp;&amp;(f.proof="exist")),e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")&amp;&amp;(f.nonexist=c.ics23.NonExistenceProof.toObject(e.nonexist,o),o.oneofs&amp;&amp;(f.proof="nonexist")),f},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.CompressedBatchProof=function(){function r(n){if(this.entries=[],this.lookupInners=[],n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.entries=s.emptyArray,r.prototype.lookupInners=s.emptyArray,r.create=function(t){return new r(t)},r.encode=function(t,e){if(e||(e=w.create()),t.entries!=null&amp;&amp;t.entries.length)for(var o=0;o&lt;t.entries.length;++o)c.ics23.CompressedBatchEntry.encode(t.entries[o],e.uint32(10).fork()).ldelim();if(t.lookupInners!=null&amp;&amp;t.lookupInners.length)for(var o=0;o&lt;t.lookupInners.length;++o)c.ics23.InnerOp.encode(t.lookupInners[o],e.uint32(18).fork()).ldelim();return e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.CompressedBatchProof;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.entries&amp;&amp;f.entries.length||(f.entries=[]),f.entries.push(c.ics23.CompressedBatchEntry.decode(t,t.uint32()));break;case 2:f.lookupInners&amp;&amp;f.lookupInners.length||(f.lookupInners=[]),f.lookupInners.push(c.ics23.InnerOp.decode(t,t.uint32()));break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.entries!=null&amp;&amp;t.hasOwnProperty("entries")){if(!Array.isArray(t.entries))return"entries: array expected";for(var e=0;e&lt;t.entries.length;++e){var o=c.ics23.CompressedBatchEntry.verify(t.entries[e]);if(o)return"entries."+o}}if(t.lookupInners!=null&amp;&amp;t.hasOwnProperty("lookupInners")){if(!Array.isArray(t.lookupInners))return"lookupInners: array expected";for(var e=0;e&lt;t.lookupInners.length;++e){var o=c.ics23.InnerOp.verify(t.lookupInners[e]);if(o)return"lookupInners."+o}}return null},r.fromObject=function(t){if(t instanceof c.ics23.CompressedBatchProof)return t;var e=new c.ics23.CompressedBatchProof;if(t.entries){if(!Array.isArray(t.entries))throw TypeError(".ics23.CompressedBatchProof.entries: array expected");e.entries=[];for(var o=0;o&lt;t.entries.length;++o){if(typeof t.entries[o]!="object")throw TypeError(".ics23.CompressedBatchProof.entries: object expected");e.entries[o]=c.ics23.CompressedBatchEntry.fromObject(t.entries[o])}}if(t.lookupInners){if(!Array.isArray(t.lookupInners))throw TypeError(".ics23.CompressedBatchProof.lookupInners: array expected");e.lookupInners=[];for(var o=0;o&lt;t.lookupInners.length;++o){if(typeof t.lookupInners[o]!="object")throw TypeError(".ics23.CompressedBatchProof.lookupInners: object expected");e.lookupInners[o]=c.ics23.InnerOp.fromObject(t.lookupInners[o])}}return e},r.toObject=function(t,e){e||(e={});var o={};if((e.arrays||e.defaults)&amp;&amp;(o.entries=[],o.lookupInners=[]),t.entries&amp;&amp;t.entries.length){o.entries=[];for(var f=0;f&lt;t.entries.length;++f)o.entries[f]=c.ics23.CompressedBatchEntry.toObject(t.entries[f],e)}if(t.lookupInners&amp;&amp;t.lookupInners.length){o.lookupInners=[];for(var f=0;f&lt;t.lookupInners.length;++f)o.lookupInners[f]=c.ics23.InnerOp.toObject(t.lookupInners[f],e)}return o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.CompressedBatchEntry=function(){function r(t){if(t)for(var e=Object.keys(t),o=0;o&lt;e.length;++o)t[e[o]]!=null&amp;&amp;(this[e[o]]=t[e[o]])}r.prototype.exist=null,r.prototype.nonexist=null;var n;return Object.defineProperty(r.prototype,"proof",{get:s.oneOfGetter(n=["exist","nonexist"]),set:s.oneOfSetter(n)}),r.create=function(e){return new r(e)},r.encode=function(e,o){return o||(o=w.create()),e.exist!=null&amp;&amp;e.hasOwnProperty("exist")&amp;&amp;c.ics23.CompressedExistenceProof.encode(e.exist,o.uint32(10).fork()).ldelim(),e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")&amp;&amp;c.ics23.CompressedNonExistenceProof.encode(e.nonexist,o.uint32(18).fork()).ldelim(),o},r.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},r.decode=function(e,o){e instanceof h||(e=h.create(e));for(var f=o===void 0?e.len:e.pos+o,l=new c.ics23.CompressedBatchEntry;e.pos&lt;f;){var p=e.uint32();switch(p&gt;&gt;&gt;3){case 1:l.exist=c.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 2:l.nonexist=c.ics23.CompressedNonExistenceProof.decode(e,e.uint32());break;default:e.skipType(p&amp;7);break}}return l},r.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},r.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var o={};if(e.exist!=null&amp;&amp;e.hasOwnProperty("exist")){o.proof=1;{var f=c.ics23.CompressedExistenceProof.verify(e.exist);if(f)return"exist."+f}}if(e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")){if(o.proof===1)return"proof: multiple values";o.proof=1;{var f=c.ics23.CompressedNonExistenceProof.verify(e.nonexist);if(f)return"nonexist."+f}}return null},r.fromObject=function(e){if(e instanceof c.ics23.CompressedBatchEntry)return e;var o=new c.ics23.CompressedBatchEntry;if(e.exist!=null){if(typeof e.exist!="object")throw TypeError(".ics23.CompressedBatchEntry.exist: object expected");o.exist=c.ics23.CompressedExistenceProof.fromObject(e.exist)}if(e.nonexist!=null){if(typeof e.nonexist!="object")throw TypeError(".ics23.CompressedBatchEntry.nonexist: object expected");o.nonexist=c.ics23.CompressedNonExistenceProof.fromObject(e.nonexist)}return o},r.toObject=function(e,o){o||(o={});var f={};return e.exist!=null&amp;&amp;e.hasOwnProperty("exist")&amp;&amp;(f.exist=c.ics23.CompressedExistenceProof.toObject(e.exist,o),o.oneofs&amp;&amp;(f.proof="exist")),e.nonexist!=null&amp;&amp;e.hasOwnProperty("nonexist")&amp;&amp;(f.nonexist=c.ics23.CompressedNonExistenceProof.toObject(e.nonexist,o),o.oneofs&amp;&amp;(f.proof="nonexist")),f},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.CompressedExistenceProof=function(){function r(n){if(this.path=[],n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.key=s.newBuffer([]),r.prototype.value=s.newBuffer([]),r.prototype.leaf=null,r.prototype.path=s.emptyArray,r.create=function(t){return new r(t)},r.encode=function(t,e){if(e||(e=w.create()),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;e.uint32(10).bytes(t.key),t.value!=null&amp;&amp;t.hasOwnProperty("value")&amp;&amp;e.uint32(18).bytes(t.value),t.leaf!=null&amp;&amp;t.hasOwnProperty("leaf")&amp;&amp;c.ics23.LeafOp.encode(t.leaf,e.uint32(26).fork()).ldelim(),t.path!=null&amp;&amp;t.path.length){e.uint32(34).fork();for(var o=0;o&lt;t.path.length;++o)e.int32(t.path[o]);e.ldelim()}return e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.CompressedExistenceProof;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.key=t.bytes();break;case 2:f.value=t.bytes();break;case 3:f.leaf=c.ics23.LeafOp.decode(t,t.uint32());break;case 4:if(f.path&amp;&amp;f.path.length||(f.path=[]),(l&amp;7)===2)for(var p=t.uint32()+t.pos;t.pos&lt;p;)f.path.push(t.int32());else f.path.push(t.int32());break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;!(t.key&amp;&amp;typeof t.key.length=="number"||s.isString(t.key)))return"key: buffer expected";if(t.value!=null&amp;&amp;t.hasOwnProperty("value")&amp;&amp;!(t.value&amp;&amp;typeof t.value.length=="number"||s.isString(t.value)))return"value: buffer expected";if(t.leaf!=null&amp;&amp;t.hasOwnProperty("leaf")){var e=c.ics23.LeafOp.verify(t.leaf);if(e)return"leaf."+e}if(t.path!=null&amp;&amp;t.hasOwnProperty("path")){if(!Array.isArray(t.path))return"path: array expected";for(var o=0;o&lt;t.path.length;++o)if(!s.isInteger(t.path[o]))return"path: integer[] expected"}return null},r.fromObject=function(t){if(t instanceof c.ics23.CompressedExistenceProof)return t;var e=new c.ics23.CompressedExistenceProof;if(t.key!=null&amp;&amp;(typeof t.key=="string"?s.base64.decode(t.key,e.key=s.newBuffer(s.base64.length(t.key)),0):t.key.length&amp;&amp;(e.key=t.key)),t.value!=null&amp;&amp;(typeof t.value=="string"?s.base64.decode(t.value,e.value=s.newBuffer(s.base64.length(t.value)),0):t.value.length&amp;&amp;(e.value=t.value)),t.leaf!=null){if(typeof t.leaf!="object")throw TypeError(".ics23.CompressedExistenceProof.leaf: object expected");e.leaf=c.ics23.LeafOp.fromObject(t.leaf)}if(t.path){if(!Array.isArray(t.path))throw TypeError(".ics23.CompressedExistenceProof.path: array expected");e.path=[];for(var o=0;o&lt;t.path.length;++o)e.path[o]=t.path[o]|0}return e},r.toObject=function(t,e){e||(e={});var o={};if((e.arrays||e.defaults)&amp;&amp;(o.path=[]),e.defaults&amp;&amp;(e.bytes===String?o.key="":(o.key=[],e.bytes!==Array&amp;&amp;(o.key=s.newBuffer(o.key))),e.bytes===String?o.value="":(o.value=[],e.bytes!==Array&amp;&amp;(o.value=s.newBuffer(o.value))),o.leaf=null),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;(o.key=e.bytes===String?s.base64.encode(t.key,0,t.key.length):e.bytes===Array?Array.prototype.slice.call(t.key):t.key),t.value!=null&amp;&amp;t.hasOwnProperty("value")&amp;&amp;(o.value=e.bytes===String?s.base64.encode(t.value,0,t.value.length):e.bytes===Array?Array.prototype.slice.call(t.value):t.value),t.leaf!=null&amp;&amp;t.hasOwnProperty("leaf")&amp;&amp;(o.leaf=c.ics23.LeafOp.toObject(t.leaf,e)),t.path&amp;&amp;t.path.length){o.path=[];for(var f=0;f&lt;t.path.length;++f)o.path[f]=t.path[f]}return o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i.CompressedNonExistenceProof=function(){function r(n){if(n)for(var t=Object.keys(n),e=0;e&lt;t.length;++e)n[t[e]]!=null&amp;&amp;(this[t[e]]=n[t[e]])}return r.prototype.key=s.newBuffer([]),r.prototype.left=null,r.prototype.right=null,r.create=function(t){return new r(t)},r.encode=function(t,e){return e||(e=w.create()),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;e.uint32(10).bytes(t.key),t.left!=null&amp;&amp;t.hasOwnProperty("left")&amp;&amp;c.ics23.CompressedExistenceProof.encode(t.left,e.uint32(18).fork()).ldelim(),t.right!=null&amp;&amp;t.hasOwnProperty("right")&amp;&amp;c.ics23.CompressedExistenceProof.encode(t.right,e.uint32(26).fork()).ldelim(),e},r.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},r.decode=function(t,e){t instanceof h||(t=h.create(t));for(var o=e===void 0?t.len:t.pos+e,f=new c.ics23.CompressedNonExistenceProof;t.pos&lt;o;){var l=t.uint32();switch(l&gt;&gt;&gt;3){case 1:f.key=t.bytes();break;case 2:f.left=c.ics23.CompressedExistenceProof.decode(t,t.uint32());break;case 3:f.right=c.ics23.CompressedExistenceProof.decode(t,t.uint32());break;default:t.skipType(l&amp;7);break}}return f},r.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},r.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;!(t.key&amp;&amp;typeof t.key.length=="number"||s.isString(t.key)))return"key: buffer expected";if(t.left!=null&amp;&amp;t.hasOwnProperty("left")){var e=c.ics23.CompressedExistenceProof.verify(t.left);if(e)return"left."+e}if(t.right!=null&amp;&amp;t.hasOwnProperty("right")){var e=c.ics23.CompressedExistenceProof.verify(t.right);if(e)return"right."+e}return null},r.fromObject=function(t){if(t instanceof c.ics23.CompressedNonExistenceProof)return t;var e=new c.ics23.CompressedNonExistenceProof;if(t.key!=null&amp;&amp;(typeof t.key=="string"?s.base64.decode(t.key,e.key=s.newBuffer(s.base64.length(t.key)),0):t.key.length&amp;&amp;(e.key=t.key)),t.left!=null){if(typeof t.left!="object")throw TypeError(".ics23.CompressedNonExistenceProof.left: object expected");e.left=c.ics23.CompressedExistenceProof.fromObject(t.left)}if(t.right!=null){if(typeof t.right!="object")throw TypeError(".ics23.CompressedNonExistenceProof.right: object expected");e.right=c.ics23.CompressedExistenceProof.fromObject(t.right)}return e},r.toObject=function(t,e){e||(e={});var o={};return e.defaults&amp;&amp;(e.bytes===String?o.key="":(o.key=[],e.bytes!==Array&amp;&amp;(o.key=s.newBuffer(o.key))),o.left=null,o.right=null),t.key!=null&amp;&amp;t.hasOwnProperty("key")&amp;&amp;(o.key=e.bytes===String?s.base64.encode(t.key,0,t.key.length):e.bytes===Array?Array.prototype.slice.call(t.key):t.key),t.left!=null&amp;&amp;t.hasOwnProperty("left")&amp;&amp;(o.left=c.ics23.CompressedExistenceProof.toObject(t.left,e)),t.right!=null&amp;&amp;t.hasOwnProperty("right")&amp;&amp;(o.right=c.ics23.CompressedExistenceProof.toObject(t.right,e)),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},r}(),i}();var tt=c,m={},U={};Object.defineProperty(U,"__esModule",{value:!0});U.decompress=U.compress=void 0;const ve=tt;function xe(i){return i.batch?{compressed:Oe(i.batch)}:i}U.compress=xe;function be(i){return i.compressed?{batch:Pe(i.compressed)}:i}U.decompress=be;function Oe(i){const r=[],n=[],t=new Map;for(const e of i.entries)if(e.exist){const o={exist:ft(e.exist,n,t)};r.push(o)}else if(e.nonexist){const o=e.nonexist,f={nonexist:{key:o.key,left:ft(o.left,n,t),right:ft(o.right,n,t)}};r.push(f)}else throw new Error("Unexpected batch entry during compress");return{entries:r,lookupInners:n}}function ft(i,r,n){if(!i)return;const t=i.path.map(e=&gt;{const o=ve.ics23.InnerOp.encode(e).finish();let f=n.get(o);return f===void 0&amp;&amp;(f=r.length,r.push(e),n.set(o,f)),f});return{key:i.key,value:i.value,leaf:i.leaf,path:t}}function Pe(i){const r=i.lookupInners;return{entries:i.entries.map(t=&gt;{if(t.exist)return{exist:ct(t.exist,r)};if(t.nonexist){const e=t.nonexist;return{nonexist:{key:e.key,left:ct(e.left,r),right:ct(e.right,r)}}}else throw new Error("Unexpected batch entry during compress")})}}function ct(i,r){if(!i)return;const{key:n,value:t,leaf:e,path:o}=i,f=(o||[]).map(l=&gt;r[l]);return{key:n,value:t,leaf:e,path:f}}var v={},D={};Object.defineProperty(D,"__esModule",{value:!0});D.doHash=D.applyInner=D.applyLeaf=void 0;const kt=ae,Et=pe,mt=ye,S=tt;function _e(i,r,n){if(r.length===0)throw new Error("Missing key");if(n.length===0)throw new Error("Missing value");const t=It(G(i.prehashKey),At(i.length),r),e=It(G(i.prehashValue),At(i.length),n),o=new Uint8Array([...pt(i.prefix),...t,...e]);return et(G(i.hash),o)}D.applyLeaf=_e;function we(i,r){if(r.length===0)throw new Error("Inner op needs child value");const n=new Uint8Array([...pt(i.prefix),...r,...pt(i.suffix)]);return et(G(i.hash),n)}D.applyInner=we;function bt(i,r){return i??r}const G=i=&gt;bt(i,S.ics23.HashOp.NO_HASH),At=i=&gt;bt(i,S.ics23.LengthOp.NO_PREFIX),pt=i=&gt;bt(i,new Uint8Array([]));function It(i,r,n){const t=Se(i,n);return ke(r,t)}function Se(i,r){return i===S.ics23.HashOp.NO_HASH?r:et(i,r)}function et(i,r){switch(i){case S.ics23.HashOp.SHA256:return(0,Et.sha256)(r);case S.ics23.HashOp.SHA512:return(0,mt.sha512)(r);case S.ics23.HashOp.RIPEMD160:return(0,kt.ripemd160)(r);case S.ics23.HashOp.BITCOIN:return(0,kt.ripemd160)((0,Et.sha256)(r));case S.ics23.HashOp.SHA512_256:return(0,mt.sha512_256)(r)}throw new Error(`Unsupported hashop: ${i}`)}D.doHash=et;function ke(i,r){switch(i){case S.ics23.LengthOp.NO_PREFIX:return r;case S.ics23.LengthOp.VAR_PROTO:return new Uint8Array([...Ee(r.length),...r]);case S.ics23.LengthOp.REQUIRE_32_BYTES:if(r.length!==32)throw new Error(`Length is ${r.length}, not 32 bytes`);return r;case S.ics23.LengthOp.REQUIRE_64_BYTES:if(r.length!==64)throw new Error(`Length is ${r.length}, not 64 bytes`);return r;case S.ics23.LengthOp.FIXED32_LITTLE:return new Uint8Array([...me(r.length),...r])}throw new Error(`Unsupported lengthop: ${i}`)}function Ee(i){let r=[],n=i;for(;n&gt;=128;){const t=n%128+128;r=[...r,t],n=n/128}return r=[...r,n],new Uint8Array(r)}function me(i){const r=new Uint8Array(4);let n=i;for(let t=r.length;t&gt;0;t--)r[Math.abs(t-r.length)]=n%256,n=Math.floor(n/256);return r}var P={};Object.defineProperty(P,"__esModule",{value:!0});P.bytesBefore=P.ensureBytesBefore=P.bytesEqual=P.ensureBytesEqual=P.ensureInner=P.ensureLeaf=void 0;function Ae(i,r){if(i.hash!==r.hash)throw new Error(`Unexpected hashOp: ${i.hash}`);if(i.prehashKey!==r.prehashKey)throw new Error(`Unexpected prehashKey: ${i.prehashKey}`);if(i.prehashValue!==r.prehashValue)throw new Error(`Unexpected prehashValue: ${i.prehashValue}`);if(i.length!==r.length)throw new Error(`Unexpected length op: ${i.length}`);Ne(i.prefix,r.prefix)}P.ensureLeaf=Ae;function Ie(i,r,n){if(i.hash!==n.hash)throw new Error(`Unexpected hashOp: ${i.hash}`);if(!i.prefix)throw new Error("No prefix set for inner node");if(De(i.prefix,r))throw new Error("Inner node has leaf prefix");if(i.prefix.length&lt;(n.minPrefixLength||0))throw new Error(`Prefix too short: ${i.prefix.length} bytes`);const t=(n.childOrder.length-1)*n.childSize;if(i.prefix.length&gt;(n.maxPrefixLength||0)+t)throw new Error(`Prefix too long: ${i.prefix.length} bytes`)}P.ensureInner=Ie;function Ne(i,r){if(!(!r||r.length===0)){if(!i)throw new Error("Target bytes missing");$t(r,i.slice(0,r.length))}}function $t(i,r){if(i.length!==r.length)throw new Error(`Different lengths ${i.length} vs ${r.length}`);for(let n=0;n&lt;i.length;n++)if(i[n]!==r[n])throw new Error(`Arrays differ at index ${n}: ${i[n]} vs ${r[n]}`)}P.ensureBytesEqual=$t;function Be(i,r){if(i.length!==r.length)return!1;for(let n=0;n&lt;i.length;n++)if(i[n]!==r[n])return!1;return!0}P.bytesEqual=Be;function De(i,r){if(!r||r.length===0||!i||i.length&lt;=r.length)return!1;for(let n=0;n&lt;r.length;n++)if(i[n]!==r[n])return!1;throw!0}function ge(i,r){if(!Mt(i,r))throw new Error("first is after last")}P.ensureBytesBefore=ge;function Mt(i,r){const n=i.length&lt;r.length?i.length:r.length;for(let t=0;t&lt;n;t++){if(i[t]&lt;r[t])return!0;if(i[t]&gt;r[t])return!1}return i.length&lt;r.length}P.bytesBefore=Mt;Object.defineProperty(v,"__esModule",{value:!0});v.ensureLeftNeighbor=v.ensureSpec=v.calculateExistenceRoot=v.verifyNonExistence=v.verifyExistence=v.smtSpec=v.tendermintSpec=v.iavlSpec=void 0;const _=tt,Nt=D,N=P;v.iavlSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:_.ics23.HashOp.SHA256,prehashValue:_.ics23.HashOp.SHA256,prehashKey:_.ics23.HashOp.NO_HASH,length:_.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:4,maxPrefixLength:12,childSize:33,hash:_.ics23.HashOp.SHA256}};v.tendermintSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:_.ics23.HashOp.SHA256,prehashValue:_.ics23.HashOp.SHA256,prehashKey:_.ics23.HashOp.NO_HASH,length:_.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:1,maxPrefixLength:1,childSize:32,hash:_.ics23.HashOp.SHA256}};v.smtSpec={leafSpec:{hash:_.ics23.HashOp.SHA256,prehashKey:_.ics23.HashOp.NO_HASH,prehashValue:_.ics23.HashOp.SHA256,length:_.ics23.LengthOp.NO_PREFIX,prefix:Uint8Array.from([0])},innerSpec:{childOrder:[0,1],childSize:32,minPrefixLength:1,maxPrefixLength:1,emptyChild:new Uint8Array(32),hash:_.ics23.HashOp.SHA256},maxDepth:256};function yt(i,r,n,t,e){Kt(i,r);const o=Ut(i);(0,N.ensureBytesEqual)(o,n),(0,N.ensureBytesEqual)(t,i.key),(0,N.ensureBytesEqual)(e,i.value)}v.verifyExistence=yt;function Ce(i,r,n,t){let e,o;if(i.left&amp;&amp;(yt(i.left,r,n,i.left.key,i.left.value),e=i.left.key),i.right&amp;&amp;(yt(i.right,r,n,i.right.key,i.right.value),o=i.right.key),!e&amp;&amp;!o)throw new Error("neither left nor right proof defined");if(e&amp;&amp;(0,N.ensureBytesBefore)(e,t),o&amp;&amp;(0,N.ensureBytesBefore)(t,o),!r.innerSpec)throw new Error("no inner spec");e?o?Wt(r.innerSpec,i.left.path,i.right.path):Jt(r.innerSpec,i.left.path):Vt(r.innerSpec,i.right.path)}v.verifyNonExistence=Ce;function Ut(i){if(!i.key||!i.value)throw new Error("Existence proof needs key and value set");if(!i.leaf)throw new Error("Existence proof must start with a leaf operation");const r=i.path||[];let n=(0,Nt.applyLeaf)(i.leaf,i.key,i.value);for(const t of r)n=(0,Nt.applyInner)(t,n);return n}v.calculateExistenceRoot=Ut;function Kt(i,r){if(!i.leaf)throw new Error("Existence proof must start with a leaf operation");if(!r.leafSpec)throw new Error("Spec must include leafSpec");if(!r.innerSpec)throw new Error("Spec must include innerSpec");(0,N.ensureLeaf)(i.leaf,r.leafSpec);const n=i.path||[];if(r.minDepth&amp;&amp;n.length&lt;r.minDepth)throw new Error(`Too few inner nodes ${n.length}`);if(r.maxDepth&amp;&amp;n.length&gt;r.maxDepth)throw new Error(`Too many inner nodes ${n.length}`);for(const t of n)(0,N.ensureInner)(t,r.leafSpec.prefix,r.innerSpec)}v.ensureSpec=Kt;function Vt(i,r){const{minPrefix:n,maxPrefix:t,suffix:e}=Pt(i,0);for(const o of r)if(!Ot(o,n,t,e))throw new Error("Step not leftmost")}function Jt(i,r){const n=i.childOrder.length-1,{minPrefix:t,maxPrefix:e,suffix:o}=Pt(i,n);for(const f of r)if(!Ot(f,t,e,o))throw new Error("Step not leftmost")}function Wt(i,r,n){const t=[...r],e=[...n];let o=t.pop(),f=e.pop();for(;(0,N.bytesEqual)(o.prefix,f.prefix)&amp;&amp;(0,N.bytesEqual)(o.suffix,f.suffix);)o=t.pop(),f=e.pop();if(!Le(i,o,f))throw new Error("Not left neightbor at first divergent step");Jt(i,t),Vt(i,e)}v.ensureLeftNeighbor=Wt;function Le(i,r,n){const t=Bt(i,r);return Bt(i,n)===t+1}function Bt(i,r){for(let n=0;n&lt;i.childOrder.length;n++){const{minPrefix:t,maxPrefix:e,suffix:o}=Pt(i,n);if(Ot(r,t,e,o))return n}throw new Error("Cannot find any valid spacing for this node")}function Ot(i,r,n,t){return(i.prefix||[]).length&lt;r||(i.prefix||[]).length&gt;n?!1:(i.suffix||[]).length===t}function Pt(i,r){const n=Te(i.childOrder,r),t=n*i.childSize,e=t+i.minPrefixLength,o=t+i.maxPrefixLength,f=(i.childOrder.length-1-n)*i.childSize;return{minPrefix:e,maxPrefix:o,suffix:f}}function Te(i,r){if(r&lt;0||r&gt;=i.length)throw new Error(`Invalid branch: ${r}`);return i.findIndex(n=&gt;n===r)}Object.defineProperty(m,"__esModule",{value:!0});m.batchVerifyNonMembership=m.batchVerifyMembership=m.verifyNonMembership=m.verifyMembership=void 0;const rt=U,zt=v,dt=P;function Gt(i,r,n,t,e){const o=(0,rt.decompress)(i),f=je(o,t);if(!f)return!1;try{return(0,zt.verifyExistence)(f,r,n,t,e),!0}catch{return!1}}m.verifyMembership=Gt;function Xt(i,r,n,t){const e=(0,rt.decompress)(i),o=Fe(e,t);if(!o)return!1;try{return(0,zt.verifyNonExistence)(o,r,n,t),!0}catch{return!1}}m.verifyNonMembership=Xt;function He(i,r,n,t){const e=(0,rt.decompress)(i);for(const[o,f]of t.entries())if(!Gt(e,r,n,o,f))return!1;return!0}m.batchVerifyMembership=He;function Re(i,r,n,t){const e=(0,rt.decompress)(i);for(const o of t)if(!Xt(e,r,n,o))return!1;return!0}m.batchVerifyNonMembership=Re;function je(i,r){const n=t=&gt;!!t&amp;&amp;(0,dt.bytesEqual)(r,t.key);if(n(i.exist))return i.exist;if(i.batch)return i.batch.entries.map(t=&gt;t.exist||null).find(n)}function Fe(i,r){const n=t=&gt;!!t&amp;&amp;(!t.left||(0,dt.bytesBefore)(t.left.key,r))&amp;&amp;(!t.right||(0,dt.bytesBefore)(r,t.right.key));if(n(i.nonexist))return i.nonexist;if(i.batch)return i.batch.entries.map(t=&gt;t.nonexist||null).find(n)}(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.verifyNonExistence=i.verifyExistence=i.tendermintSpec=i.iavlSpec=i.calculateExistenceRoot=i.verifyNonMembership=i.verifyMembership=i.ics23=void 0;var r=tt;Object.defineProperty(i,"ics23",{enumerable:!0,get:function(){return r.ics23}});var n=m;Object.defineProperty(i,"verifyMembership",{enumerable:!0,get:function(){return n.verifyMembership}}),Object.defineProperty(i,"verifyNonMembership",{enumerable:!0,get:function(){return n.verifyNonMembership}});var t=v;Object.defineProperty(i,"calculateExistenceRoot",{enumerable:!0,get:function(){return t.calculateExistenceRoot}}),Object.defineProperty(i,"iavlSpec",{enumerable:!0,get:function(){return t.iavlSpec}}),Object.defineProperty(i,"tendermintSpec",{enumerable:!0,get:function(){return t.tendermintSpec}}),Object.defineProperty(i,"verifyExistence",{enumerable:!0,get:function(){return t.verifyExistence}}),Object.defineProperty(i,"verifyNonExistence",{enumerable:!0,get:function(){return t.verifyNonExistence}})})(de);var A={},qt={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;function r(n){var t,e=n.Symbol;if(typeof e=="function")if(e.observable)t=e.observable;else{t=e.for("https://github.com/benlesh/symbol-observable");try{e.observable=t}catch{}}else t="@@observable";return t}})(qt);var $e=qt,Dt=Object.prototype.toString,Yt=function(r){var n=Dt.call(r),t=n==="[object Arguments]";return t||(t=n!=="[object Array]"&amp;&amp;r!==null&amp;&amp;typeof r=="object"&amp;&amp;typeof r.length=="number"&amp;&amp;r.length&gt;=0&amp;&amp;Dt.call(r.callee)==="[object Function]"),t},ut,gt;function Me(){if(gt)return ut;gt=1;var i;if(!Object.keys){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Yt,e=Object.prototype.propertyIsEnumerable,o=!e.call({toString:null},"toString"),f=e.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(d){var y=d.constructor;return y&amp;&amp;y.prototype===d},I={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},k=function(){if(typeof window&gt;"u")return!1;for(var d in window)try{if(!I["$"+d]&amp;&amp;r.call(window,d)&amp;&amp;window[d]!==null&amp;&amp;typeof window[d]=="object")try{p(window[d])}catch{return!0}}catch{return!0}return!1}(),g=function(d){if(typeof window&gt;"u"||!k)return p(d);try{return p(d)}catch{return!1}};i=function(y){var C=y!==null&amp;&amp;typeof y=="object",L=n.call(y)==="[object Function]",St=t(y),ue=C&amp;&amp;n.call(y)==="[object String]",V=[];if(!C&amp;&amp;!L&amp;&amp;!St)throw new TypeError("Object.keys called on a non-object");var se=f&amp;&amp;L;if(ue&amp;&amp;y.length&gt;0&amp;&amp;!r.call(y,0))for(var nt=0;nt&lt;y.length;++nt)V.push(String(nt));if(St&amp;&amp;y.length&gt;0)for(var it=0;it&lt;y.length;++it)V.push(String(it));else for(var ot in y)!(se&amp;&amp;ot==="prototype")&amp;&amp;r.call(y,ot)&amp;&amp;V.push(String(ot));if(o)for(var le=g(y),J=0;J&lt;l.length;++J)!(le&amp;&amp;l[J]==="constructor")&amp;&amp;r.call(y,l[J])&amp;&amp;V.push(l[J]);return V}}return ut=i,ut}var Ue=Array.prototype.slice,Ke=Yt,Ct=Object.keys,X=Ct?function(r){return Ct(r)}:Me(),Lt=Object.keys;X.shim=function(){if(Object.keys){var r=function(){var n=Object.keys(arguments);return n&amp;&amp;n.length===arguments.length}(1,2);r||(Object.keys=function(t){return Ke(t)?Lt(Ue.call(t)):Lt(t)})}else Object.keys=X;return Object.keys||X};var Ve=X,Je=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),t=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;var e=42;r[n]=e;for(n in r)return!1;if(typeof Object.keys=="function"&amp;&amp;Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&amp;&amp;Object.getOwnPropertyNames(r).length!==0)return!1;var o=Object.getOwnPropertySymbols(r);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,n);if(f.value!==e||f.enumerable!==!0)return!1}return!0},Tt=typeof Symbol&lt;"u"&amp;&amp;Symbol,We=Je,ze=function(){return typeof Tt!="function"||typeof Symbol!="function"||typeof Tt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:We()},Ht={foo:{}},Ge=Object,Xe=function(){return{__proto__:Ht}.foo===Ht.foo&amp;&amp;!({__proto__:null}instanceof Ge)},qe="Function.prototype.bind called on incompatible ",st=Array.prototype.slice,Ye=Object.prototype.toString,Qe="[object Function]",Ze=function(r){var n=this;if(typeof n!="function"||Ye.call(n)!==Qe)throw new TypeError(qe+n);for(var t=st.call(arguments,1),e,o=function(){if(this instanceof e){var k=n.apply(this,t.concat(st.call(arguments)));return Object(k)===k?k:this}else return n.apply(r,t.concat(st.call(arguments)))},f=Math.max(0,n.length-t.length),l=[],p=0;p&lt;f;p++)l.push("$"+p);if(e=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var I=function(){};I.prototype=n.prototype,e.prototype=new I,I.prototype=null}return e},tr=Ze,Qt=Function.prototype.bind||tr,er=Qt,rr=er.call(Function.call,Object.prototype.hasOwnProperty),a,K=SyntaxError,Zt=Function,M=TypeError,lt=function(i){try{return Zt('"use strict"; return ('+i+").constructor;")()}catch{}},H=Object.getOwnPropertyDescriptor;if(H)try{H({},"")}catch{H=null}var ht=function(){throw new M},nr=H?function(){try{return arguments.callee,ht}catch{try{return H(arguments,"callee").get}catch{return ht}}}():ht,j=ze(),ir=Xe(),b=Object.getPrototypeOf||(ir?function(i){return i.__proto__}:null),F={},or=typeof Uint8Array&gt;"u"||!b?a:b(Uint8Array),R={"%AggregateError%":typeof AggregateError&gt;"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer&gt;"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":j&amp;&amp;b?b([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":typeof Atomics&gt;"u"?a:Atomics,"%BigInt%":typeof BigInt&gt;"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array&gt;"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array&gt;"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView&gt;"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array&gt;"u"?a:Float32Array,"%Float64Array%":typeof Float64Array&gt;"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry&gt;"u"?a:FinalizationRegistry,"%Function%":Zt,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array&gt;"u"?a:Int8Array,"%Int16Array%":typeof Int16Array&gt;"u"?a:Int16Array,"%Int32Array%":typeof Int32Array&gt;"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&amp;&amp;b?b(b([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map&gt;"u"?a:Map,"%MapIteratorPrototype%":typeof Map&gt;"u"||!j||!b?a:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise&gt;"u"?a:Promise,"%Proxy%":typeof Proxy&gt;"u"?a:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect&gt;"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set&gt;"u"?a:Set,"%SetIteratorPrototype%":typeof Set&gt;"u"||!j||!b?a:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer&gt;"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&amp;&amp;b?b(""[Symbol.iterator]()):a,"%Symbol%":j?Symbol:a,"%SyntaxError%":K,"%ThrowTypeError%":nr,"%TypedArray%":or,"%TypeError%":M,"%Uint8Array%":typeof Uint8Array&gt;"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray&gt;"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array&gt;"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array&gt;"u"?a:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap&gt;"u"?a:WeakMap,"%WeakRef%":typeof WeakRef&gt;"u"?a:WeakRef,"%WeakSet%":typeof WeakSet&gt;"u"?a:WeakSet};if(b)try{null.error}catch(i){var fr=b(b(i));R["%Error.prototype%"]=fr}var cr=function i(r){var n;if(r==="%AsyncFunction%")n=lt("async function () {}");else if(r==="%GeneratorFunction%")n=lt("function* () {}");else if(r==="%AsyncGeneratorFunction%")n=lt("async function* () {}");else if(r==="%AsyncGenerator%"){var t=i("%AsyncGeneratorFunction%");t&amp;&amp;(n=t.prototype)}else if(r==="%AsyncIteratorPrototype%"){var e=i("%AsyncGenerator%");e&amp;&amp;b&amp;&amp;(n=b(e.prototype))}return R[r]=n,n},Rt={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},W=Qt,Q=rr,ur=W.call(Function.call,Array.prototype.concat),sr=W.call(Function.apply,Array.prototype.splice),jt=W.call(Function.call,String.prototype.replace),Z=W.call(Function.call,String.prototype.slice),lr=W.call(Function.call,RegExp.prototype.exec),hr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ar=/\\(\\)?/g,pr=function(r){var n=Z(r,0,1),t=Z(r,-1);if(n==="%"&amp;&amp;t!=="%")throw new K("invalid intrinsic syntax, expected closing `%`");if(t==="%"&amp;&amp;n!=="%")throw new K("invalid intrinsic syntax, expected opening `%`");var e=[];return jt(r,hr,function(o,f,l,p){e[e.length]=l?jt(p,ar,"$1"):f||o}),e},yr=function(r,n){var t=r,e;if(Q(Rt,t)&amp;&amp;(e=Rt[t],t="%"+e[0]+"%"),Q(R,t)){var o=R[t];if(o===F&amp;&amp;(o=cr(t)),typeof o&gt;"u"&amp;&amp;!n)throw new M("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:e,name:t,value:o}}throw new K("intrinsic "+r+" does not exist!")},dr=function(r,n){if(typeof r!="string"||r.length===0)throw new M("intrinsic name must be a non-empty string");if(arguments.length&gt;1&amp;&amp;typeof n!="boolean")throw new M('"allowMissing" argument must be a boolean');if(lr(/^%?[^%]*%?$/,r)===null)throw new K("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=pr(r),e=t.length&gt;0?t[0]:"",o=yr("%"+e+"%",n),f=o.name,l=o.value,p=!1,I=o.alias;I&amp;&amp;(e=I[0],sr(t,ur([0,1],I)));for(var k=1,g=!0;k&lt;t.length;k+=1){var d=t[k],y=Z(d,0,1),C=Z(d,-1);if((y==='"'||y==="'"||y==="`"||C==='"'||C==="'"||C==="`")&amp;&amp;y!==C)throw new K("property names with quotes must have matching quotes");if((d==="constructor"||!g)&amp;&amp;(p=!0),e+="."+d,f="%"+e+"%",Q(R,f))l=R[f];else if(l!=null){if(!(d in l)){if(!n)throw new M("base intrinsic for "+r+" exists, but the property is not available.");return}if(H&amp;&amp;k+1&gt;=t.length){var L=H(l,d);g=!!L,g&amp;&amp;"get"in L&amp;&amp;!("originalValue"in L.get)?l=L.get:l=l[d]}else g=Q(l,d),l=l[d];g&amp;&amp;!p&amp;&amp;(R[f]=l)}}return l},vr=dr,vt=vr("%Object.defineProperty%",!0),xt=function(){if(vt)try{return vt({},"a",{value:1}),!0}catch{return!1}return!1};xt.hasArrayLengthDefineBug=function(){if(!xt())return null;try{return vt([],"length",{value:1}).length!==1}catch{return!0}};var xr=xt,br=Ve,Or=typeof Symbol=="function"&amp;&amp;typeof Symbol("foo")=="symbol",Pr=Object.prototype.toString,_r=Array.prototype.concat,te=Object.defineProperty,wr=function(i){return typeof i=="function"&amp;&amp;Pr.call(i)==="[object Function]"},Sr=xr(),ee=te&amp;&amp;Sr,kr=function(i,r,n,t){if(r in i){if(t===!0){if(i[r]===n)return}else if(!wr(t)||!t())return}ee?te(i,r,{configurable:!0,enumerable:!1,value:n,writable:!0}):i[r]=n},re=function(i,r){var n=arguments.length&gt;2?arguments[2]:{},t=br(r);Or&amp;&amp;(t=_r.call(t,Object.getOwnPropertySymbols(r)));for(var e=0;e&lt;t.length;e+=1)kr(i,t[e],r[t[e]],n[t[e]])};re.supportsDescriptors=!!ee;var ne=re,q={exports:{}};typeof self&lt;"u"?q.exports=self:typeof window&lt;"u"?q.exports=window:q.exports=Function("return this")();var ie=q.exports,Er=ie,oe=function(){return typeof E!="object"||!E||E.Math!==Math||E.Array!==Array?Er:E},mr=ne,Ar=oe,Ir=function(){var r=Ar();if(mr.supportsDescriptors){var n=Object.getOwnPropertyDescriptor(r,"globalThis");(!n||n.configurable&amp;&amp;(n.enumerable||!n.writable||globalThis!==r))&amp;&amp;Object.defineProperty(r,"globalThis",{configurable:!0,enumerable:!1,value:r,writable:!0})}else(typeof globalThis!="object"||globalThis!==r)&amp;&amp;(r.globalThis=r);return r},Nr=ne,Br=ie,fe=oe,Dr=Ir,gr=fe(),ce=function(){return gr};Nr(ce,{getPolyfill:fe,implementation:Br,shim:Dr});var Cr=ce,Lr=E&amp;&amp;E.__extends||function(){var i=function(r,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&amp;&amp;(t[o]=e[o])},i(r,n)};return function(r,n){i(r,n);function t(){this.constructor=r}r.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}();Object.defineProperty(A,"__esModule",{value:!0});A.NO_IL=A.NO=A.MemoryStream=A.Stream=void 0;var Tr=$e,Hr=Cr,z=Tr.default(Hr.getPolyfill()),u={};A.NO=u;function O(){}function Y(i){for(var r=i.length,n=Array(r),t=0;t&lt;r;++t)n[t]=i[t];return n}function Rr(i,r){return function(t){return i(t)&amp;&amp;r(t)}}function _t(i,r,n){try{return i.f(r)}catch(t){return n._e(t),u}}var T={_n:O,_e:O,_c:O};A.NO_IL=T;function Ft(i){i._start=function(n){n.next=n._n,n.error=n._e,n.complete=n._c,this.start(n)},i._stop=i.stop}var jr=function(){function i(r,n){this._stream=r,this._listener=n}return i.prototype.unsubscribe=function(){this._stream._remove(this._listener)},i}(),Fr=function(){function i(r){this._listener=r}return i.prototype.next=function(r){this._listener._n(r)},i.prototype.error=function(r){this._listener._e(r)},i.prototype.complete=function(){this._listener._c()},i}(),$r=function(){function i(r){this.type="fromObservable",this.ins=r,this.active=!1}return i.prototype._start=function(r){this.out=r,this.active=!0,this._sub=this.ins.subscribe(new Fr(r)),this.active||this._sub.unsubscribe()},i.prototype._stop=function(){this._sub&amp;&amp;this._sub.unsubscribe(),this.active=!1},i}(),Mr=function(){function i(r){this.type="merge",this.insArr=r,this.out=u,this.ac=0}return i.prototype._start=function(r){this.out=r;var n=this.insArr,t=n.length;this.ac=t;for(var e=0;e&lt;t;e++)n[e]._add(this)},i.prototype._stop=function(){for(var r=this.insArr,n=r.length,t=0;t&lt;n;t++)r[t]._remove(this);this.out=u},i.prototype._n=function(r){var n=this.out;n!==u&amp;&amp;n._n(r)},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){if(--this.ac&lt;=0){var r=this.out;if(r===u)return;r._c()}},i}(),Ur=function(){function i(r,n,t){this.i=r,this.out=n,this.p=t,t.ils.push(this)}return i.prototype._n=function(r){var n=this.p,t=this.out;if(t!==u&amp;&amp;n.up(r,this.i)){var e=Y(n.vals);t._n(e)}},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.p;r.out!==u&amp;&amp;--r.Nc===0&amp;&amp;r.out._c()},i}(),Kr=function(){function i(r){this.type="combine",this.insArr=r,this.out=u,this.ils=[],this.Nc=this.Nn=0,this.vals=[]}return i.prototype.up=function(r,n){var t=this.vals[n],e=this.Nn?t===u?--this.Nn:this.Nn:0;return this.vals[n]=r,e===0},i.prototype._start=function(r){this.out=r;var n=this.insArr,t=this.Nc=this.Nn=n.length,e=this.vals=new Array(t);if(t===0)r._n([]),r._c();else for(var o=0;o&lt;t;o++)e[o]=u,n[o]._add(new Ur(o,r,this))},i.prototype._stop=function(){for(var r=this.insArr,n=r.length,t=this.ils,e=0;e&lt;n;e++)r[e]._remove(t[e]);this.out=u,this.ils=[],this.vals=[]},i}(),Vr=function(){function i(r){this.type="fromArray",this.a=r}return i.prototype._start=function(r){for(var n=this.a,t=0,e=n.length;t&lt;e;t++)r._n(n[t]);r._c()},i.prototype._stop=function(){},i}(),Jr=function(){function i(r){this.type="fromPromise",this.on=!1,this.p=r}return i.prototype._start=function(r){var n=this;this.on=!0,this.p.then(function(t){n.on&amp;&amp;(r._n(t),r._c())},function(t){r._e(t)}).then(O,function(t){setTimeout(function(){throw t})})},i.prototype._stop=function(){this.on=!1},i}(),Wr=function(){function i(r){this.type="periodic",this.period=r,this.intervalID=-1,this.i=0}return i.prototype._start=function(r){var n=this;function t(){r._n(n.i++)}this.intervalID=setInterval(t,this.period)},i.prototype._stop=function(){this.intervalID!==-1&amp;&amp;clearInterval(this.intervalID),this.intervalID=-1,this.i=0},i}(),zr=function(){function i(r,n){this.type="debug",this.ins=r,this.out=u,this.s=O,this.l="",typeof n=="string"?this.l=n:typeof n=="function"&amp;&amp;(this.s=n)}return i.prototype._start=function(r){this.out=r,this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u},i.prototype._n=function(r){var n=this.out;if(n!==u){var t=this.s,e=this.l;if(t!==O)try{t(r)}catch(o){n._e(o)}else e?console.log(e+":",r):console.log(r);n._n(r)}},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;r._c()},i}(),Gr=function(){function i(r,n){this.type="drop",this.ins=n,this.out=u,this.max=r,this.dropped=0}return i.prototype._start=function(r){this.out=r,this.dropped=0,this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u},i.prototype._n=function(r){var n=this.out;n!==u&amp;&amp;this.dropped++&gt;=this.max&amp;&amp;n._n(r)},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;r._c()},i}(),Xr=function(){function i(r,n){this.out=r,this.op=n}return i.prototype._n=function(){this.op.end()},i.prototype._e=function(r){this.out._e(r)},i.prototype._c=function(){this.op.end()},i}(),qr=function(){function i(r,n){this.type="endWhen",this.ins=n,this.out=u,this.o=r,this.oil=T}return i.prototype._start=function(r){this.out=r,this.o._add(this.oil=new Xr(r,this)),this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=u,this.oil=T},i.prototype.end=function(){var r=this.out;r!==u&amp;&amp;r._c()},i.prototype._n=function(r){var n=this.out;n!==u&amp;&amp;n._n(r)},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){this.end()},i}(),at=function(){function i(r,n){this.type="filter",this.ins=n,this.out=u,this.f=r}return i.prototype._start=function(r){this.out=r,this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u},i.prototype._n=function(r){var n=this.out;if(n!==u){var t=_t(this,r,n);t===u||!t||n._n(r)}},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;r._c()},i}(),Yr=function(){function i(r,n){this.out=r,this.op=n}return i.prototype._n=function(r){this.out._n(r)},i.prototype._e=function(r){this.out._e(r)},i.prototype._c=function(){this.op.inner=u,this.op.less()},i}(),Qr=function(){function i(r){this.type="flatten",this.ins=r,this.out=u,this.open=!0,this.inner=u,this.il=T}return i.prototype._start=function(r){this.out=r,this.open=!0,this.inner=u,this.il=T,this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.inner!==u&amp;&amp;this.inner._remove(this.il),this.out=u,this.open=!0,this.inner=u,this.il=T},i.prototype.less=function(){var r=this.out;r!==u&amp;&amp;!this.open&amp;&amp;this.inner===u&amp;&amp;r._c()},i.prototype._n=function(r){var n=this.out;if(n!==u){var t=this,e=t.inner,o=t.il;e!==u&amp;&amp;o!==T&amp;&amp;e._remove(o),(this.inner=r)._add(this.il=new Yr(n,this))}},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){this.open=!1,this.less()},i}(),Zr=function(){function i(r,n,t){var e=this;this.type="fold",this.ins=t,this.out=u,this.f=function(o){return r(e.acc,o)},this.acc=this.seed=n}return i.prototype._start=function(r){this.out=r,this.acc=this.seed,r._n(this.acc),this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u,this.acc=this.seed},i.prototype._n=function(r){var n=this.out;if(n!==u){var t=_t(this,r,n);t!==u&amp;&amp;n._n(this.acc=t)}},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;r._c()},i}(),tn=function(){function i(r){this.type="last",this.ins=r,this.out=u,this.has=!1,this.val=u}return i.prototype._start=function(r){this.out=r,this.has=!1,this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u,this.val=u},i.prototype._n=function(r){this.has=!0,this.val=r},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;(this.has?(r._n(this.val),r._c()):r._e(new Error("last() failed because input stream completed")))},i}(),en=function(){function i(r,n){this.type="map",this.ins=n,this.out=u,this.f=r}return i.prototype._start=function(r){this.out=r,this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u},i.prototype._n=function(r){var n=this.out;if(n!==u){var t=_t(this,r,n);t!==u&amp;&amp;n._n(t)}},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;r._c()},i}(),rn=function(){function i(r){this.type="remember",this.ins=r,this.out=u}return i.prototype._start=function(r){this.out=r,this.ins._add(r)},i.prototype._stop=function(){this.ins._remove(this.out),this.out=u},i}(),nn=function(){function i(r,n){this.type="replaceError",this.ins=n,this.out=u,this.f=r}return i.prototype._start=function(r){this.out=r,this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u},i.prototype._n=function(r){var n=this.out;n!==u&amp;&amp;n._n(r)},i.prototype._e=function(r){var n=this.out;if(n!==u)try{this.ins._remove(this),(this.ins=this.f(r))._add(this)}catch(t){n._e(t)}},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;r._c()},i}(),on=function(){function i(r,n){this.type="startWith",this.ins=r,this.out=u,this.val=n}return i.prototype._start=function(r){this.out=r,this.out._n(this.val),this.ins._add(r)},i.prototype._stop=function(){this.ins._remove(this.out),this.out=u},i}(),fn=function(){function i(r,n){this.type="take",this.ins=n,this.out=u,this.max=r,this.taken=0}return i.prototype._start=function(r){this.out=r,this.taken=0,this.max&lt;=0?r._c():this.ins._add(this)},i.prototype._stop=function(){this.ins._remove(this),this.out=u},i.prototype._n=function(r){var n=this.out;if(n!==u){var t=++this.taken;t&lt;this.max?n._n(r):t===this.max&amp;&amp;(n._n(r),n._c())}},i.prototype._e=function(r){var n=this.out;n!==u&amp;&amp;n._e(r)},i.prototype._c=function(){var r=this.out;r!==u&amp;&amp;r._c()},i}(),wt=function(){function i(r){this._prod=r||u,this._ils=[],this._stopID=u,this._dl=u,this._d=!1,this._target=null,this._err=u}return i.prototype._n=function(r){var n=this._ils,t=n.length;if(this._d&amp;&amp;this._dl._n(r),t==1)n[0]._n(r);else{if(t==0)return;for(var e=Y(n),o=0;o&lt;t;o++)e[o]._n(r)}},i.prototype._e=function(r){if(this._err===u){this._err=r;var n=this._ils,t=n.length;if(this._x(),this._d&amp;&amp;this._dl._e(r),t==1)n[0]._e(r);else{if(t==0)return;for(var e=Y(n),o=0;o&lt;t;o++)e[o]._e(r)}if(!this._d&amp;&amp;t==0)throw this._err}},i.prototype._c=function(){var r=this._ils,n=r.length;if(this._x(),this._d&amp;&amp;this._dl._c(),n==1)r[0]._c();else{if(n==0)return;for(var t=Y(r),e=0;e&lt;n;e++)t[e]._c()}},i.prototype._x=function(){this._ils.length!==0&amp;&amp;(this._prod!==u&amp;&amp;this._prod._stop(),this._err=u,this._ils=[])},i.prototype._stopNow=function(){this._prod._stop(),this._err=u,this._stopID=u},i.prototype._add=function(r){var n=this._target;if(n)return n._add(r);var t=this._ils;if(t.push(r),!(t.length&gt;1))if(this._stopID!==u)clearTimeout(this._stopID),this._stopID=u;else{var e=this._prod;e!==u&amp;&amp;e._start(this)}},i.prototype._remove=function(r){var n=this,t=this._target;if(t)return t._remove(r);var e=this._ils,o=e.indexOf(r);o&gt;-1&amp;&amp;(e.splice(o,1),this._prod!==u&amp;&amp;e.length&lt;=0?(this._err=u,this._stopID=setTimeout(function(){return n._stopNow()})):e.length===1&amp;&amp;this._pruneCycles())},i.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&amp;&amp;this._remove(this._ils[0])},i.prototype._hasNoSinks=function(r,n){if(n.indexOf(r)!==-1)return!0;if(r.out===this)return!0;if(r.out&amp;&amp;r.out!==u)return this._hasNoSinks(r.out,n.concat(r));if(r._ils){for(var t=0,e=r._ils.length;t&lt;e;t++)if(!this._hasNoSinks(r._ils[t],n.concat(r)))return!1;return!0}else return!1},i.prototype.ctor=function(){return this instanceof B?B:i},i.prototype.addListener=function(r){r._n=r.next||O,r._e=r.error||O,r._c=r.complete||O,this._add(r)},i.prototype.removeListener=function(r){this._remove(r)},i.prototype.subscribe=function(r){return this.addListener(r),new jr(this,r)},i.prototype[z]=function(){return this},i.create=function(r){if(r){if(typeof r.start!="function"||typeof r.stop!="function")throw new Error("producer requires both start and stop functions");Ft(r)}return new i(r)},i.createWithMemory=function(r){return r&amp;&amp;Ft(r),new B(r)},i.never=function(){return new i({_start:O,_stop:O})},i.empty=function(){return new i({_start:function(r){r._c()},_stop:O})},i.throw=function(r){return new i({_start:function(n){n._e(r)},_stop:O})},i.from=function(r){if(typeof r[z]=="function")return i.fromObservable(r);if(typeof r.then=="function")return i.fromPromise(r);if(Array.isArray(r))return i.fromArray(r);throw new TypeError("Type of input to from() must be an Array, Promise, or Observable")},i.of=function(){for(var r=[],n=0;n&lt;arguments.length;n++)r[n]=arguments[n];return i.fromArray(r)},i.fromArray=function(r){return new i(new Vr(r))},i.fromPromise=function(r){return new i(new Jr(r))},i.fromObservable=function(r){if(r.endWhen!==void 0)return r;var n=typeof r[z]=="function"?r[z]():r;return new i(new $r(n))},i.periodic=function(r){return new i(new Wr(r))},i.prototype._map=function(r){return new(this.ctor())(new en(r,this))},i.prototype.map=function(r){return this._map(r)},i.prototype.mapTo=function(r){var n=this.map(function(){return r}),t=n._prod;return t.type="mapTo",n},i.prototype.filter=function(r){var n=this._prod;return n instanceof at?new i(new at(Rr(n.f,r),n.ins)):new i(new at(r,this))},i.prototype.take=function(r){return new(this.ctor())(new fn(r,this))},i.prototype.drop=function(r){return new i(new Gr(r,this))},i.prototype.last=function(){return new i(new tn(this))},i.prototype.startWith=function(r){return new B(new on(this,r))},i.prototype.endWhen=function(r){return new(this.ctor())(new qr(r,this))},i.prototype.fold=function(r,n){return new B(new Zr(r,n,this))},i.prototype.replaceError=function(r){return new(this.ctor())(new nn(r,this))},i.prototype.flatten=function(){return new i(new Qr(this))},i.prototype.compose=function(r){return r(this)},i.prototype.remember=function(){return new B(new rn(this))},i.prototype.debug=function(r){return new(this.ctor())(new zr(this,r))},i.prototype.imitate=function(r){if(r instanceof B)throw new Error("A MemoryStream was given to imitate(), but it only supports a Stream. Read more about this restriction here: https://github.com/staltz/xstream#faq");this._target=r;for(var n=this._ils,t=n.length,e=0;e&lt;t;e++)r._add(n[e]);this._ils=[]},i.prototype.shamefullySendNext=function(r){this._n(r)},i.prototype.shamefullySendError=function(r){this._e(r)},i.prototype.shamefullySendComplete=function(){this._c()},i.prototype.setDebugListener=function(r){r?(this._d=!0,r._n=r.next||O,r._e=r.error||O,r._c=r.complete||O,this._dl=r):(this._d=!1,this._dl=u)},i.merge=function(){for(var n=[],t=0;t&lt;arguments.length;t++)n[t]=arguments[t];return new i(new Mr(n))},i.combine=function(){for(var n=[],t=0;t&lt;arguments.length;t++)n[t]=arguments[t];return new i(new Kr(n))},i}();A.Stream=wt;var B=function(i){Lr(r,i);function r(n){var t=i.call(this,n)||this;return t._has=!1,t}return r.prototype._n=function(n){this._v=n,this._has=!0,i.prototype._n.call(this,n)},r.prototype._add=function(n){var t=this._target;if(t)return t._add(n);var e=this._ils;if(e.push(n),e.length&gt;1){this._has&amp;&amp;n._n(this._v);return}if(this._stopID!==u)this._has&amp;&amp;n._n(this._v),clearTimeout(this._stopID),this._stopID=u;else if(this._has)n._n(this._v);else{var o=this._prod;o!==u&amp;&amp;o._start(this)}},r.prototype._stopNow=function(){this._has=!1,i.prototype._stopNow.call(this)},r.prototype._x=function(){this._has=!1,i.prototype._x.call(this)},r.prototype.map=function(n){return this._map(n)},r.prototype.mapTo=function(n){return i.prototype.mapTo.call(this,n)},r.prototype.take=function(n){return i.prototype.take.call(this,n)},r.prototype.endWhen=function(n){return i.prototype.endWhen.call(this,n)},r.prototype.replaceError=function(n){return i.prototype.replaceError.call(this,n)},r.prototype.remember=function(){return this},r.prototype.debug=function(n){return i.prototype.debug.call(this,n)},r}(wt);A.MemoryStream=B;var cn=wt;A.default=cn;var $=null;typeof WebSocket&lt;"u"?$=WebSocket:typeof MozWebSocket&lt;"u"?$=MozWebSocket:typeof E&lt;"u"?$=E.WebSocket||E.MozWebSocket:typeof window&lt;"u"?$=window.WebSocket||window.MozWebSocket:typeof self&lt;"u"&amp;&amp;($=self.WebSocket||self.MozWebSocket);var sn=$;export{sn as a,de as b,A as x};
</pre></body></html>