@wormhole-foundation/wormhole-connect 0.3.3-beta.2-development → 0.3.3-beta.3-development

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.
Files changed (51) hide show
  1. package/dist/assets/{cosmos-TcYN7x14.js → cosmos-9t5ds48M.js} +1 -1
  2. package/dist/assets/index-bti7uInf.js +3 -0
  3. package/dist/assets/{solana-r3vOVfGL.js → solana-QOFlt-jY.js} +2 -2
  4. package/dist/assets/{solanaEmbed.esm-8lU7Qhqn.js → solanaEmbed.esm-bag_3ej_.js} +1 -1
  5. package/dist/main.js +7 -7
  6. package/dist/src/config/mainnet/gasEstimates.d.ts.map +1 -1
  7. package/dist/src/config/mainnet/nttGroups.d.ts.map +1 -1
  8. package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
  9. package/dist/src/routes/utils.d.ts.map +1 -1
  10. package/lib/{aptos-LWs6biUG.js → aptos-Gl7Lvx33.js} +1 -1
  11. package/lib/{aptos-_eNOiBgD.mjs → aptos-wWY9cYKb.mjs} +1 -1
  12. package/lib/{ccip-jAg7Haoi.mjs → ccip-U0O--jNe.mjs} +3 -3
  13. package/lib/{ccip-O2dTAw4K.js → ccip-ZIQJfzGP.js} +1 -1
  14. package/lib/{cosmos-iM9TKzc2.js → cosmos-FDC9IzRr.js} +1 -1
  15. package/lib/{cosmos-klhnZdoV.mjs → cosmos-c0ODp2pR.mjs} +3 -3
  16. package/lib/{evm-NhqlfUku.js → evm-HSpaYhQP.js} +3 -3
  17. package/lib/{evm-hVc6DNEy.mjs → evm-wgq2htQK.mjs} +4 -4
  18. package/lib/{index-M_wPC6Vm.js → index-4Y1uNAAU.js} +2 -2
  19. package/lib/{index-tzyGRr67.js → index-Mg5q9ZMw.js} +1 -1
  20. package/lib/{index-j2TK3prt.js → index-Mk7LYYdN.js} +1 -1
  21. package/lib/{index-OP4jJbqa.mjs → index-MoMbeAKz.mjs} +1 -1
  22. package/lib/{index-37rvdXxu.js → index-MvsxOCsW.js} +1 -1
  23. package/lib/{index-0w5isC6V.mjs → index-TdxYLzGx.mjs} +3 -3
  24. package/lib/{index-UVSvw22w.js → index-iJmUtx_H.js} +1 -1
  25. package/lib/{index-V79r3Hop.mjs → index-oliZI3Bw.mjs} +75 -19
  26. package/lib/{index-3DEi4MQW.mjs → index-vsAk8D8-.mjs} +2 -2
  27. package/lib/{index-9P4BLQSd.mjs → index-zXvuSp6M.mjs} +1 -1
  28. package/lib/{index.es-QiMkbMEt.mjs → index.es-9kvKUYIv.mjs} +2 -2
  29. package/lib/{index.es-hMTFEvlS.mjs → index.es-CueUNOIp.mjs} +1 -1
  30. package/lib/{index.es-tiKpOqLH.js → index.es-MjAXWJbv.js} +2 -2
  31. package/lib/{index.es-FZQEYWHH.js → index.es-NIfnGwYn.js} +1 -1
  32. package/lib/{index.es-WI3Djf7d.js → index.es-dKB91XRm.js} +1 -1
  33. package/lib/{index.es-KWVpNQDS.mjs → index.es-l5YUjdFo.mjs} +4 -4
  34. package/lib/index.js +1 -1
  35. package/lib/index.mjs +1 -1
  36. package/lib/{libsodium-wrappers-QfByZMNE.js → libsodium-wrappers-9aCJqlW5.js} +1 -1
  37. package/lib/{libsodium-wrappers-O5eUBP2B.mjs → libsodium-wrappers-t-G4VebW.mjs} +1 -1
  38. package/lib/{sei-5g0p82Yt.js → sei-LCVHAbJP.js} +1 -1
  39. package/lib/{sei-Jj-TlTZs.mjs → sei-kAT23rRb.mjs} +2 -2
  40. package/lib/{solana-eni_1kz2.mjs → solana-9cEEFpYk.mjs} +3 -3
  41. package/lib/{solana-YzuNXqee.js → solana-iA5G1mT6.js} +1 -1
  42. package/lib/{solanaEmbed.esm-ROq32hPm.mjs → solanaEmbed.esm-83vVt6e1.mjs} +2 -2
  43. package/lib/{solanaEmbed.esm-NwoQ8COc.js → solanaEmbed.esm-IF6HXU18.js} +1 -1
  44. package/lib/src/config/mainnet/gasEstimates.d.ts.map +1 -1
  45. package/lib/src/config/mainnet/nttGroups.d.ts.map +1 -1
  46. package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
  47. package/lib/src/routes/utils.d.ts.map +1 -1
  48. package/lib/{sui-doXF2U6q.js → sui-2auVkRE6.js} +1 -1
  49. package/lib/{sui-U_Fyg8HN.mjs → sui-MKTbT49-.mjs} +1 -1
  50. package/package.json +1 -1
  51. package/dist/assets/index-7UgR9Epe.js +0 -3
@@ -1,4 +1,4 @@
1
- "use strict";var ir=Object.defineProperty;var or=(e,a,c)=>a in e?ir(e,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):e[a]=c;var ye=(e,a,c)=>(or(e,typeof a!="symbol"?a+"":a,c),c);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-M_wPC6Vm.js"),rf=require("./index-j2TK3prt.js"),sr=require("./libsodium-wrappers-QfByZMNE.js");require("react");require("react-dom");var J2=function(){return J2=Object.assign||function(a){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var t in c)Object.prototype.hasOwnProperty.call(c,t)&&(a[t]=c[t])}return a},J2.apply(this,arguments)};var of={exports:{}};const Gt=e=>typeof e=="object"&&e!==null,$t=Symbol("skip"),I4=e=>Gt(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),id=(e,a,c,d=new WeakMap)=>{if(c={deep:!1,target:{},...c},d.has(e))return d.get(e);d.set(e,c.target);const{target:f}=c;delete c.target;const t=r=>r.map(l=>I4(l)?id(l,a,c,d):l);if(Array.isArray(e))return t(e);for(const[r,l]of Object.entries(e)){const p=a(r,l,e);if(p===$t)continue;let[F,S,{shouldRecurse:T=!0}={}]=p;F!=="__proto__"&&(c.deep&&T&&I4(S)&&(S=Array.isArray(S)?t(S):id(S,a,c,d)),f[F]=S)}return f};of.exports=(e,a,c)=>{if(!Gt(e))throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);return id(e,a,c)};of.exports.mapObjectSkip=$t;var xr=of.exports;function lr(e){return e.toLowerCase()}var Dr=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],hr=/[^A-Z0-9]+/gi;function mr(e,a){a===void 0&&(a={});for(var c=a.splitRegexp,d=c===void 0?Dr:c,f=a.stripRegexp,t=f===void 0?hr:f,r=a.transform,l=r===void 0?lr:r,p=a.delimiter,F=p===void 0?" ":p,S=S4(S4(e,d,"$1\0$2"),t,"\0"),T=0,w=S.length;S.charAt(T)==="\0";)T++;for(;S.charAt(w-1)==="\0";)w--;return S.slice(T,w).split("\0").map(l).join(F)}function S4(e,a,c){return a instanceof RegExp?e.replace(a,c):a.reduce(function(d,f){return d.replace(f,c)},e)}function pr(e,a){return a===void 0&&(a={}),mr(e,J2({delimiter:"."},a))}function Er(e,a){return a===void 0&&(a={}),pr(e,J2({delimiter:"_"},a))}const Ar=Object.freeze(Object.defineProperty({__proto__:null,snakeCase:Er},Symbol.toStringTag,{value:"Module"})),Fr=b.getAugmentedNamespace(Ar),yr=xr,{snakeCase:gr}=Fr;var vr=function(e,a){return a=Object.assign({deep:!0,exclude:[],parsingOptions:{}},a),yr(e,function(c,d){return[Cr(a.exclude,c)?c:gr(c,a.parsingOptions),d]},a)};function Cr(e,a){return e.some(function(c){return typeof c=="string"?c===a:c.test(a)})}const K6=b.getDefaultExportFromCjs(vr);var wr={exports:{}};/*! store2 - v2.14.2 - 2022-07-18
1
+ "use strict";var ir=Object.defineProperty;var or=(e,a,c)=>a in e?ir(e,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):e[a]=c;var ye=(e,a,c)=>(or(e,typeof a!="symbol"?a+"":a,c),c);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-4Y1uNAAU.js"),rf=require("./index-Mk7LYYdN.js"),sr=require("./libsodium-wrappers-9aCJqlW5.js");require("react");require("react-dom");var J2=function(){return J2=Object.assign||function(a){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var t in c)Object.prototype.hasOwnProperty.call(c,t)&&(a[t]=c[t])}return a},J2.apply(this,arguments)};var of={exports:{}};const Gt=e=>typeof e=="object"&&e!==null,$t=Symbol("skip"),I4=e=>Gt(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),id=(e,a,c,d=new WeakMap)=>{if(c={deep:!1,target:{},...c},d.has(e))return d.get(e);d.set(e,c.target);const{target:f}=c;delete c.target;const t=r=>r.map(l=>I4(l)?id(l,a,c,d):l);if(Array.isArray(e))return t(e);for(const[r,l]of Object.entries(e)){const p=a(r,l,e);if(p===$t)continue;let[F,S,{shouldRecurse:T=!0}={}]=p;F!=="__proto__"&&(c.deep&&T&&I4(S)&&(S=Array.isArray(S)?t(S):id(S,a,c,d)),f[F]=S)}return f};of.exports=(e,a,c)=>{if(!Gt(e))throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);return id(e,a,c)};of.exports.mapObjectSkip=$t;var xr=of.exports;function lr(e){return e.toLowerCase()}var Dr=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],hr=/[^A-Z0-9]+/gi;function mr(e,a){a===void 0&&(a={});for(var c=a.splitRegexp,d=c===void 0?Dr:c,f=a.stripRegexp,t=f===void 0?hr:f,r=a.transform,l=r===void 0?lr:r,p=a.delimiter,F=p===void 0?" ":p,S=S4(S4(e,d,"$1\0$2"),t,"\0"),T=0,w=S.length;S.charAt(T)==="\0";)T++;for(;S.charAt(w-1)==="\0";)w--;return S.slice(T,w).split("\0").map(l).join(F)}function S4(e,a,c){return a instanceof RegExp?e.replace(a,c):a.reduce(function(d,f){return d.replace(f,c)},e)}function pr(e,a){return a===void 0&&(a={}),mr(e,J2({delimiter:"."},a))}function Er(e,a){return a===void 0&&(a={}),pr(e,J2({delimiter:"_"},a))}const Ar=Object.freeze(Object.defineProperty({__proto__:null,snakeCase:Er},Symbol.toStringTag,{value:"Module"})),Fr=b.getAugmentedNamespace(Ar),yr=xr,{snakeCase:gr}=Fr;var vr=function(e,a){return a=Object.assign({deep:!0,exclude:[],parsingOptions:{}},a),yr(e,function(c,d){return[Cr(a.exclude,c)?c:gr(c,a.parsingOptions),d]},a)};function Cr(e,a){return e.some(function(c){return typeof c=="string"?c===a:c.test(a)})}const K6=b.getDefaultExportFromCjs(vr);var wr={exports:{}};/*! store2 - v2.14.2 - 2022-07-18
2
2
  * Copyright (c) 2022 Nathan Bubna; Licensed (MIT OR GPL-3.0) */(function(e){(function(a,c){var d={version:"2.14.2",areas:{},apis:{},nsdelim:".",inherit:function(t,r){for(var l in t)r.hasOwnProperty(l)||Object.defineProperty(r,l,Object.getOwnPropertyDescriptor(t,l));return r},stringify:function(t,r){return t===void 0||typeof t=="function"?t+"":JSON.stringify(t,r||d.replace)},parse:function(t,r){try{return JSON.parse(t,r||d.revive)}catch{return t}},fn:function(t,r){d.storeAPI[t]=r;for(var l in d.apis)d.apis[l][t]=r},get:function(t,r){return t.getItem(r)},set:function(t,r,l){t.setItem(r,l)},remove:function(t,r){t.removeItem(r)},key:function(t,r){return t.key(r)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,r,l){var p=d.inherit(d.storeAPI,function(S,T,w){return arguments.length===0?p.getAll():typeof T=="function"?p.transact(S,T,w):T!==void 0?p.set(S,T,w):typeof S=="string"||typeof S=="number"?p.get(S):typeof S=="function"?p.each(S):S?p.setAll(S,T):p.clear()});p._id=t;try{var F="__store2_test";r.setItem(F,"ok"),p._area=r,r.removeItem(F)}catch{p._area=d.storage("fake")}return p._ns=l||"",d.areas[t]||(d.areas[t]=p._area),d.apis[p._ns+p._id]||(d.apis[p._ns+p._id]=p),p},storeAPI:{area:function(t,r){var l=this[t];return(!l||!l.area)&&(l=d.Store(t,r,this._ns),this[t]||(this[t]=l)),l},namespace:function(t,r,l){if(l=l||this._delim||d.nsdelim,!t)return this._ns?this._ns.substring(0,this._ns.length-l.length):"";var p=t,F=this[p];if((!F||!F.namespace)&&(F=d.Store(this._id,this._area,this._ns+p+l),F._delim=l,this[p]||(this[p]=F),!r))for(var S in d.areas)F.area(S,d.areas[S]);return F},isFake:function(t){return t?(this._real=this._area,this._area=d.storage("fake")):t===!1&&(this._area=this._real||this._area),this._area.name==="fake"},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):this._in(t)in this._area},size:function(){return this.keys().length},each:function(t,r){for(var l=0,p=d.length(this._area);l<p;l++){var F=this._out(d.key(this._area,l));if(F!==void 0&&t.call(this,F,this.get(F),r)===!1)break;p>d.length(this._area)&&(p--,l--)}return r||this},keys:function(t){return this.each(function(r,l,p){p.push(r)},t||[])},get:function(t,r){var l=d.get(this._area,this._in(t)),p;return typeof r=="function"&&(p=r,r=null),l!==null?d.parse(l,p):r??l},getAll:function(t){return this.each(function(r,l,p){p[r]=l},t||{})},transact:function(t,r,l){var p=this.get(t,l),F=r(p);return this.set(t,F===void 0?p:F),this},set:function(t,r,l){var p=this.get(t),F;return p!=null&&l===!1?r:(typeof l=="function"&&(F=l,l=void 0),d.set(this._area,this._in(t),d.stringify(r,F),l)||p)},setAll:function(t,r){var l,p;for(var F in t)p=t[F],this.set(F,p,r)!==p&&(l=!0);return l},add:function(t,r,l){var p=this.get(t);if(p instanceof Array)r=p.concat(r);else if(p!==null){var F=typeof p;if(F===typeof r&&F==="object"){for(var S in r)p[S]=r[S];r=p}else r=p+r}return d.set(this._area,this._in(t),d.stringify(r,l)),r},remove:function(t,r){var l=this.get(t,r);return d.remove(this._area,this._in(t)),l},clear:function(){return this._ns?this.each(function(t){d.remove(this._area,this._in(t))},1):d.clear(this._area),this},clearAll:function(){var t=this._area;for(var r in d.areas)d.areas.hasOwnProperty(r)&&(this._area=d.areas[r],this.clear());return this._area=t,this},_in:function(t){return typeof t!="string"&&(t=d.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&t.indexOf(this._ns)===0?t.substring(this._ns.length):void 0:t}},storage:function(t){return d.inherit(d.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var r=0;for(var l in this.items)if(this.has(l)&&t===r++)return l},setItem:function(t,r){this.has(t)||this.length++,this.items[t]=r},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},f=d.Store("local",function(){try{return localStorage}catch{}}());f.local=f,f._=d,f.area("session",function(){try{return sessionStorage}catch{}}()),f.area("page",d.storage("page")),typeof c=="function"&&c.amd!==void 0?c("store2",[],function(){return f}):e.exports?e.exports=f:(a.store&&(d.conflict=a.store),a.store=f)})(b.commonjsGlobal,b.commonjsGlobal&&b.commonjsGlobal.define)})(wr);var jt={exports:{}};(function(e,a){(function(c,d){e.exports=d()})(b.commonjsGlobal,function(){return c={418:function(f,t){(function(r,l){for(var p in l)r[p]=l[p]})(t,function(r){var l={};function p(F){if(l[F])return l[F].exports;var S=l[F]={i:F,l:!1,exports:{}};return r[F].call(S.exports,S,S.exports,p),S.l=!0,S.exports}return p.m=r,p.c=l,p.i=function(F){return F},p.d=function(F,S,T){p.o(F,S)||Object.defineProperty(F,S,{configurable:!1,enumerable:!0,get:T})},p.n=function(F){var S=F&&F.__esModule?function(){return F.default}:function(){return F};return p.d(S,"a",S),S},p.o=function(F,S){return Object.prototype.hasOwnProperty.call(F,S)},p.p="",p(p.s=1)}([function(r,l,p){Object.defineProperty(l,"__esModule",{value:!0});var F=p(3),S=function(){function T(w,m){w===void 0&&(w={}),m===void 0&&(m={splitValues:!1});var D,x=this;this.headersMap={},w&&(typeof Headers<"u"&&w instanceof Headers?F.getHeaderKeys(w).forEach(function(o){F.getHeaderValues(w,o).forEach(function(A){m.splitValues?x.append(o,F.splitHeaderValue(A)):x.append(o,A)})}):typeof(D=w)=="object"&&typeof D.headersMap=="object"&&typeof D.forEach=="function"?w.forEach(function(o,A){x.append(o,A)}):typeof Map<"u"&&w instanceof Map?w.forEach(function(o,A){x.append(A,o)}):typeof w=="string"?this.appendFromString(w):typeof w=="object"&&Object.getOwnPropertyNames(w).forEach(function(o){var A=w[o];Array.isArray(A)?A.forEach(function(g){x.append(o,g)}):x.append(o,A)}))}return T.prototype.appendFromString=function(w){for(var m=w.split(`\r
3
3
  `),D=0;D<m.length;D++){var x=m[D],o=x.indexOf(":");if(o>0){var A=x.substring(0,o).trim(),g=x.substring(o+1).trim();this.append(A,g)}}},T.prototype.delete=function(w,m){var D=F.normalizeName(w);if(m===void 0)delete this.headersMap[D];else{var x=this.headersMap[D];if(x){var o=x.indexOf(m);o>=0&&x.splice(o,1),x.length===0&&delete this.headersMap[D]}}},T.prototype.append=function(w,m){var D=this,x=F.normalizeName(w);Array.isArray(this.headersMap[x])||(this.headersMap[x]=[]),Array.isArray(m)?m.forEach(function(o){D.headersMap[x].push(F.normalizeValue(o))}):this.headersMap[x].push(F.normalizeValue(m))},T.prototype.set=function(w,m){var D=F.normalizeName(w);if(Array.isArray(m)){var x=[];m.forEach(function(o){x.push(F.normalizeValue(o))}),this.headersMap[D]=x}else this.headersMap[D]=[F.normalizeValue(m)]},T.prototype.has=function(w,m){var D=this.headersMap[F.normalizeName(w)];if(!Array.isArray(D))return!1;if(m!==void 0){var x=F.normalizeValue(m);return D.indexOf(x)>=0}return!0},T.prototype.get=function(w){var m=this.headersMap[F.normalizeName(w)];return m!==void 0?m.concat():[]},T.prototype.forEach=function(w){var m=this;Object.getOwnPropertyNames(this.headersMap).forEach(function(D){w(D,m.headersMap[D])},this)},T.prototype.toHeaders=function(){if(typeof Headers<"u"){var w=new Headers;return this.forEach(function(m,D){D.forEach(function(x){w.append(m,x)})}),w}throw new Error("Headers class is not defined")},T}();l.BrowserHeaders=S},function(r,l,p){Object.defineProperty(l,"__esModule",{value:!0});var F=p(0);l.BrowserHeaders=F.BrowserHeaders},function(r,l,p){Object.defineProperty(l,"__esModule",{value:!0}),l.iterateHeaders=function(F,S){for(var T=F[Symbol.iterator](),w=T.next();!w.done;)S(w.value[0]),w=T.next()},l.iterateHeadersKeys=function(F,S){for(var T=F.keys(),w=T.next();!w.done;)S(w.value),w=T.next()}},function(r,l,p){Object.defineProperty(l,"__esModule",{value:!0});var F=p(2);l.normalizeName=function(S){if(typeof S!="string"&&(S=String(S)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(S))throw new TypeError("Invalid character in header field name");return S.toLowerCase()},l.normalizeValue=function(S){return typeof S!="string"&&(S=String(S)),S},l.getHeaderValues=function(S,T){var w=S;if(w instanceof Headers&&w.getAll)return w.getAll(T);var m=w.get(T);return m&&typeof m=="string"?[m]:m},l.getHeaderKeys=function(S){var T=S,w={},m=[];return T.keys?F.iterateHeadersKeys(T,function(D){w[D]||(w[D]=!0,m.push(D))}):T.forEach?T.forEach(function(D,x){w[x]||(w[x]=!0,m.push(x))}):F.iterateHeaders(T,function(D){var x=D[0];w[x]||(w[x]=!0,m.push(x))}),m},l.splitHeaderValue=function(S){var T=[];return S.split(", ").forEach(function(w){w.split(",").forEach(function(m){T.push(m)})}),T}}]))},617:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkParser=t.ChunkType=t.encodeASCII=t.decodeASCII=void 0;var l,p=r(65);function F(o){return(A=o)===9||A===10||A===13||o>=32&&o<=126;var A}function S(o){for(var A=0;A!==o.length;++A)if(!F(o[A]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(o))}function T(o){return(128&o.getUint8(0))==128}function w(o){return o.getUint32(1,!1)}function m(o,A,g){return o.byteLength-A>=g}function D(o,A,g){if(o.slice)return o.slice(A,g);var N=o.length;g!==void 0&&(N=g);for(var n=new Uint8Array(N-A),h=0,v=A;v<N;v++)n[h++]=o[v];return n}t.decodeASCII=S,t.encodeASCII=function(o){for(var A=new Uint8Array(o.length),g=0;g!==o.length;++g){var N=o.charCodeAt(g);if(!F(N))throw new Error("Metadata contains invalid ASCII");A[g]=N}return A},function(o){o[o.MESSAGE=1]="MESSAGE",o[o.TRAILERS=2]="TRAILERS"}(l=t.ChunkType||(t.ChunkType={}));var x=function(){function o(){this.buffer=null,this.position=0}return o.prototype.parse=function(A,g){if(A.length===0&&g)return[];var N,n=[];if(this.buffer==null)this.buffer=A,this.position=0;else if(this.position===this.buffer.byteLength)this.buffer=A,this.position=0;else{var h=this.buffer.byteLength-this.position,v=new Uint8Array(h+A.byteLength),R=D(this.buffer,this.position);v.set(R,0);var k=new Uint8Array(A);v.set(k,h),this.buffer=v,this.position=0}for(;;){if(!m(this.buffer,this.position,5))return n;var L=D(this.buffer,this.position,this.position+5),z=new DataView(L.buffer,L.byteOffset,L.byteLength),C=w(z);if(!m(this.buffer,this.position,5+C))return n;var u=D(this.buffer,this.position+5,this.position+5+C);if(this.position+=5+C,T(z))return n.push({chunkType:l.TRAILERS,trailers:(N=u,new p.Metadata(S(N)))}),n;n.push({chunkType:l.MESSAGE,data:u})}},o}();t.ChunkParser=x},8:function(f,t){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.httpStatusToCode=t.Code=void 0,function(l){l[l.OK=0]="OK",l[l.Canceled=1]="Canceled",l[l.Unknown=2]="Unknown",l[l.InvalidArgument=3]="InvalidArgument",l[l.DeadlineExceeded=4]="DeadlineExceeded",l[l.NotFound=5]="NotFound",l[l.AlreadyExists=6]="AlreadyExists",l[l.PermissionDenied=7]="PermissionDenied",l[l.ResourceExhausted=8]="ResourceExhausted",l[l.FailedPrecondition=9]="FailedPrecondition",l[l.Aborted=10]="Aborted",l[l.OutOfRange=11]="OutOfRange",l[l.Unimplemented=12]="Unimplemented",l[l.Internal=13]="Internal",l[l.Unavailable=14]="Unavailable",l[l.DataLoss=15]="DataLoss",l[l.Unauthenticated=16]="Unauthenticated"}(r=t.Code||(t.Code={})),t.httpStatusToCode=function(l){switch(l){case 0:return r.Internal;case 200:return r.OK;case 400:return r.InvalidArgument;case 401:return r.Unauthenticated;case 403:return r.PermissionDenied;case 404:return r.NotFound;case 409:return r.Aborted;case 412:return r.FailedPrecondition;case 429:return r.ResourceExhausted;case 499:return r.Canceled;case 500:return r.Unknown;case 501:return r.Unimplemented;case 503:return r.Unavailable;case 504:return r.DeadlineExceeded;default:return r.Unknown}}},934:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.client=void 0;var l=r(65),p=r(617),F=r(8),S=r(346),T=r(57),w=r(882);t.client=function(x,o){return new m(x,o)};var m=function(){function x(o,A){this.started=!1,this.sentFirstMessage=!1,this.completed=!1,this.closed=!1,this.finishedSending=!1,this.onHeadersCallbacks=[],this.onMessageCallbacks=[],this.onEndCallbacks=[],this.parser=new p.ChunkParser,this.methodDefinition=o,this.props=A,this.createTransport()}return x.prototype.createTransport=function(){var o=this.props.host+"/"+this.methodDefinition.service.serviceName+"/"+this.methodDefinition.methodName,A={methodDefinition:this.methodDefinition,debug:this.props.debug||!1,url:o,onHeaders:this.onTransportHeaders.bind(this),onChunk:this.onTransportChunk.bind(this),onEnd:this.onTransportEnd.bind(this)};this.props.transport?this.transport=this.props.transport(A):this.transport=T.makeDefaultTransport(A)},x.prototype.onTransportHeaders=function(o,A){if(this.props.debug&&S.debug("onHeaders",o,A),this.closed)this.props.debug&&S.debug("grpc.onHeaders received after request was closed - ignoring");else if(A!==0){this.responseHeaders=o,this.props.debug&&S.debug("onHeaders.responseHeaders",JSON.stringify(this.responseHeaders,null,2));var g=D(o);this.props.debug&&S.debug("onHeaders.gRPCStatus",g);var N=g&&g>=0?g:F.httpStatusToCode(A);this.props.debug&&S.debug("onHeaders.code",N);var n=o.get("grpc-message")||[];if(this.props.debug&&S.debug("onHeaders.gRPCMessage",n),this.rawOnHeaders(o),N!==F.Code.OK){var h=this.decodeGRPCStatus(n[0]);this.rawOnError(N,h,o)}}},x.prototype.onTransportChunk=function(o){var A=this;if(this.closed)this.props.debug&&S.debug("grpc.onChunk received after request was closed - ignoring");else{var g=[];try{g=this.parser.parse(o)}catch(N){return this.props.debug&&S.debug("onChunk.parsing error",N,N.message),void this.rawOnError(F.Code.Internal,"parsing error: "+N.message)}g.forEach(function(N){if(N.chunkType===p.ChunkType.MESSAGE){var n=A.methodDefinition.responseType.deserializeBinary(N.data);A.rawOnMessage(n)}else N.chunkType===p.ChunkType.TRAILERS&&(A.responseHeaders?(A.responseTrailers=new l.Metadata(N.trailers),A.props.debug&&S.debug("onChunk.trailers",A.responseTrailers)):(A.responseHeaders=new l.Metadata(N.trailers),A.rawOnHeaders(A.responseHeaders)))})}},x.prototype.onTransportEnd=function(){if(this.props.debug&&S.debug("grpc.onEnd"),this.closed)this.props.debug&&S.debug("grpc.onEnd received after request was closed - ignoring");else if(this.responseTrailers!==void 0){var o=D(this.responseTrailers);if(o!==null){var A=this.responseTrailers.get("grpc-message"),g=this.decodeGRPCStatus(A[0]);this.rawOnEnd(o,g,this.responseTrailers)}else this.rawOnError(F.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(this.responseHeaders===void 0)return void this.rawOnError(F.Code.Unknown,"Response closed without headers");var N=D(this.responseHeaders),n=this.responseHeaders.get("grpc-message");if(this.props.debug&&S.debug("grpc.headers only response ",N,n),N===null)return void this.rawOnEnd(F.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var h=this.decodeGRPCStatus(n[0]);this.rawOnEnd(N,h,this.responseHeaders)}},x.prototype.decodeGRPCStatus=function(o){if(!o)return"";try{return decodeURIComponent(o)}catch{return o}},x.prototype.rawOnEnd=function(o,A,g){var N=this;this.props.debug&&S.debug("rawOnEnd",o,A,g),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function(n){if(!N.closed)try{n(o,A,g)}catch(h){setTimeout(function(){throw h},0)}}))},x.prototype.rawOnHeaders=function(o){this.props.debug&&S.debug("rawOnHeaders",o),this.completed||this.onHeadersCallbacks.forEach(function(A){try{A(o)}catch(g){setTimeout(function(){throw g},0)}})},x.prototype.rawOnError=function(o,A,g){var N=this;g===void 0&&(g=new l.Metadata),this.props.debug&&S.debug("rawOnError",o,A),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function(n){if(!N.closed)try{n(o,A,g)}catch(h){setTimeout(function(){throw h},0)}}))},x.prototype.rawOnMessage=function(o){var A=this;this.props.debug&&S.debug("rawOnMessage",o.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach(function(g){if(!A.closed)try{g(o)}catch(N){setTimeout(function(){throw N},0)}})},x.prototype.onHeaders=function(o){this.onHeadersCallbacks.push(o)},x.prototype.onMessage=function(o){this.onMessageCallbacks.push(o)},x.prototype.onEnd=function(o){this.onEndCallbacks.push(o)},x.prototype.start=function(o){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var A=new l.Metadata(o||{});A.set("content-type","application/grpc-web+proto"),A.set("x-grpc-web","1"),this.transport.start(A)},x.prototype.send=function(o){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var A=w.frameRequest(o);this.transport.sendMessage(A)},x.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},x.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&S.debug("request.abort aborting request"),this.transport.cancel()},x}();function D(x){var o=x.get("grpc-status")||[];if(o.length>0)try{var A=o[0];return parseInt(A,10)}catch{return null}return null}},346:function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0,t.debug=function(){for(var r=[],l=0;l<arguments.length;l++)r[l]=arguments[l];console.debug?console.debug.apply(null,r):console.log.apply(null,r)}},607:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.grpc=void 0;var l,p=r(418),F=r(57),S=r(229),T=r(540),w=r(210),m=r(859),D=r(8),x=r(938),o=r(35),A=r(934);(l=t.grpc||(t.grpc={})).setDefaultTransport=F.setDefaultTransportFactory,l.CrossBrowserHttpTransport=m.CrossBrowserHttpTransport,l.FetchReadableStreamTransport=S.FetchReadableStreamTransport,l.XhrTransport=w.XhrTransport,l.WebsocketTransport=T.WebsocketTransport,l.Code=D.Code,l.Metadata=p.BrowserHeaders,l.client=function(g,N){return A.client(g,N)},l.invoke=x.invoke,l.unary=o.unary},938:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=void 0;var l=r(934);t.invoke=function(p,F){if(p.requestStream)throw new Error(".invoke cannot be used with client-streaming methods. Use .client instead.");var S=l.client(p,{host:F.host,transport:F.transport,debug:F.debug});return F.onHeaders&&S.onHeaders(F.onHeaders),F.onMessage&&S.onMessage(F.onMessage),F.onEnd&&S.onEnd(F.onEnd),S.start(F.metadata),S.send(F.request),S.finishSend(),{close:function(){S.close()}}}},65:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var l=r(418);Object.defineProperty(t,"Metadata",{enumerable:!0,get:function(){return l.BrowserHeaders}})},57:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.makeDefaultTransport=t.setDefaultTransportFactory=void 0;var l=r(859),p=function(F){return l.CrossBrowserHttpTransport({withCredentials:!1})(F)};t.setDefaultTransportFactory=function(F){p=F},t.makeDefaultTransport=function(F){return p(F)}},229:function(f,t,r){var l=this&&this.__assign||function(){return(l=Object.assign||function(T){for(var w,m=1,D=arguments.length;m<D;m++)for(var x in w=arguments[m])Object.prototype.hasOwnProperty.call(w,x)&&(T[x]=w[x]);return T}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.detectFetchSupport=t.FetchReadableStreamTransport=void 0;var p=r(65),F=r(346);t.FetchReadableStreamTransport=function(T){return function(w){return function(m,D){return m.debug&&F.debug("fetchRequest",m),new S(m,D)}(w,T)}};var S=function(){function T(w,m){this.cancelled=!1,this.controller=self.AbortController&&new AbortController,this.options=w,this.init=m}return T.prototype.pump=function(w,m){var D=this;if(this.reader=w,this.cancelled)return this.options.debug&&F.debug("Fetch.pump.cancel at first pump"),void this.reader.cancel().catch(function(x){D.options.debug&&F.debug("Fetch.pump.reader.cancel exception",x)});this.reader.read().then(function(x){if(x.done)return D.options.onEnd(),m;D.options.onChunk(x.value),D.pump(D.reader,m)}).catch(function(x){D.cancelled?D.options.debug&&F.debug("Fetch.catch - request cancelled"):(D.cancelled=!0,D.options.debug&&F.debug("Fetch.catch",x.message),D.options.onEnd(x))})},T.prototype.send=function(w){var m=this;fetch(this.options.url,l(l({},this.init),{headers:this.metadata.toHeaders(),method:"POST",body:w,signal:this.controller&&this.controller.signal})).then(function(D){if(m.options.debug&&F.debug("Fetch.response",D),m.options.onHeaders(new p.Metadata(D.headers),D.status),!D.body)return D;m.pump(D.body.getReader(),D)}).catch(function(D){m.cancelled?m.options.debug&&F.debug("Fetch.catch - request cancelled"):(m.cancelled=!0,m.options.debug&&F.debug("Fetch.catch",D.message),m.options.onEnd(D))})},T.prototype.sendMessage=function(w){this.send(w)},T.prototype.finishSend=function(){},T.prototype.start=function(w){this.metadata=w},T.prototype.cancel=function(){var w=this;this.cancelled?this.options.debug&&F.debug("Fetch.cancel already cancelled"):(this.cancelled=!0,this.controller?(this.options.debug&&F.debug("Fetch.cancel.controller.abort"),this.controller.abort()):this.options.debug&&F.debug("Fetch.cancel.missing abort controller"),this.reader?(this.options.debug&&F.debug("Fetch.cancel.reader.cancel"),this.reader.cancel().catch(function(m){w.options.debug&&F.debug("Fetch.cancel.reader.cancel exception",m)})):this.options.debug&&F.debug("Fetch.cancel before reader"))},T}();t.detectFetchSupport=function(){return typeof Response<"u"&&Response.prototype.hasOwnProperty("body")&&typeof Headers=="function"}},859:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CrossBrowserHttpTransport=void 0;var l=r(229),p=r(210);t.CrossBrowserHttpTransport=function(F){if(l.detectFetchSupport()){var S={credentials:F.withCredentials?"include":"same-origin"};return l.FetchReadableStreamTransport(S)}return p.XhrTransport({withCredentials:F.withCredentials})}},210:function(f,t,r){var l,p=this&&this.__extends||(l=function(o,A){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,N){g.__proto__=N}||function(g,N){for(var n in N)Object.prototype.hasOwnProperty.call(N,n)&&(g[n]=N[n])})(o,A)},function(o,A){function g(){this.constructor=o}l(o,A),o.prototype=A===null?Object.create(A):(g.prototype=A.prototype,new g)});Object.defineProperty(t,"__esModule",{value:!0}),t.stringToArrayBuffer=t.MozChunkedArrayBufferXHR=t.XHR=t.XhrTransport=void 0;var F=r(65),S=r(346),T=r(849);t.XhrTransport=function(o){return function(A){if(T.detectMozXHRSupport())return new m(A,o);if(T.detectXHROverrideMimeTypeSupport())return new w(A,o);throw new Error("This environment's XHR implementation cannot support binary transfer.")}};var w=function(){function o(A,g){this.options=A,this.init=g}return o.prototype.onProgressEvent=function(){this.options.debug&&S.debug("XHR.onProgressEvent.length: ",this.xhr.response.length);var A=this.xhr.response.substr(this.index);this.index=this.xhr.response.length;var g=x(A);this.options.onChunk(g)},o.prototype.onLoadEvent=function(){this.options.debug&&S.debug("XHR.onLoadEvent"),this.options.onEnd()},o.prototype.onStateChange=function(){this.options.debug&&S.debug("XHR.onStateChange",this.xhr.readyState),this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED&&this.options.onHeaders(new F.Metadata(this.xhr.getAllResponseHeaders()),this.xhr.status)},o.prototype.sendMessage=function(A){this.xhr.send(A)},o.prototype.responseCallback=function(A){this.options.onHeaders(new F.Metadata(function(g){var N={};for(var n in g){var h=g[n];g.hasOwnProperty(n)&&h!==void 0&&(N[n]=h)}return N}(A.headers)),A.statusCode)},o.prototype.finishSend=function(){},o.prototype.start=function(A){var g=this;this.metadata=A;var N=new XMLHttpRequest;this.xhr=N,N.open("POST",this.options.url),this.configureXhr(),this.metadata.forEach(function(n,h){N.setRequestHeader(n,h.join(", "))}),N.withCredentials=!!this.init.withCredentials,N.addEventListener("readystatechange",this.onStateChange.bind(this)),N.addEventListener("progress",this.onProgressEvent.bind(this)),N.addEventListener("loadend",this.onLoadEvent.bind(this)),N.addEventListener("error",function(n){g.options.debug&&S.debug("XHR.error",n),g.options.onEnd(n.error)})},o.prototype.configureXhr=function(){this.xhr.responseType="text",this.xhr.overrideMimeType("text/plain; charset=x-user-defined")},o.prototype.cancel=function(){this.options.debug&&S.debug("XHR.abort"),this.xhr.abort()},o}();t.XHR=w;var m=function(o){function A(){return o!==null&&o.apply(this,arguments)||this}return p(A,o),A.prototype.configureXhr=function(){this.options.debug&&S.debug("MozXHR.configureXhr: setting responseType to 'moz-chunked-arraybuffer'"),this.xhr.responseType="moz-chunked-arraybuffer"},A.prototype.onProgressEvent=function(){var g=this.xhr.response;this.options.debug&&S.debug("MozXHR.onProgressEvent: ",new Uint8Array(g)),this.options.onChunk(new Uint8Array(g))},A}(w);function D(o,A){var g=o.charCodeAt(A);if(g>=55296&&g<=56319){var N=o.charCodeAt(A+1);N>=56320&&N<=57343&&(g=65536+(g-55296<<10)+(N-56320))}return g}function x(o){for(var A=new Uint8Array(o.length),g=0,N=0;N<o.length;N++){var n=String.prototype.codePointAt?o.codePointAt(N):D(o,N);A[g++]=255&n}return A}t.MozChunkedArrayBufferXHR=m,t.stringToArrayBuffer=x},849:function(f,t){var r;function l(){if(r!==void 0)return r;if(XMLHttpRequest){r=new XMLHttpRequest;try{r.open("GET","https://localhost")}catch{}}return r}function p(F){var S=l();if(!S)return!1;try{return S.responseType=F,S.responseType===F}catch{}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.detectXHROverrideMimeTypeSupport=t.detectMozXHRSupport=t.xhrSupportsResponseType=void 0,t.xhrSupportsResponseType=p,t.detectMozXHRSupport=function(){return typeof XMLHttpRequest<"u"&&p("moz-chunked-arraybuffer")},t.detectXHROverrideMimeTypeSupport=function(){return typeof XMLHttpRequest<"u"&&XMLHttpRequest.prototype.hasOwnProperty("overrideMimeType")}},540:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketTransport=void 0;var l,p=r(346),F=r(617);(function(T){T[T.FINISH_SEND=1]="FINISH_SEND"})(l||(l={}));var S=new Uint8Array([1]);t.WebsocketTransport=function(){return function(T){return function(w){w.debug&&p.debug("websocketRequest",w);var m,D=function(A){if(A.substr(0,8)==="https://")return"wss://"+A.substr(8);if(A.substr(0,7)==="http://")return"ws://"+A.substr(7);throw new Error("Websocket transport constructed with non-https:// or http:// host.")}(w.url),x=[];function o(A){if(A===l.FINISH_SEND)m.send(S);else{var g=A,N=new Int8Array(g.byteLength+1);N.set(new Uint8Array([0])),N.set(g,1),m.send(N)}}return{sendMessage:function(A){m&&m.readyState!==m.CONNECTING?o(A):x.push(A)},finishSend:function(){m&&m.readyState!==m.CONNECTING?o(l.FINISH_SEND):x.push(l.FINISH_SEND)},start:function(A){(m=new WebSocket(D,["grpc-websockets"])).binaryType="arraybuffer",m.onopen=function(){var g;w.debug&&p.debug("websocketRequest.onopen"),m.send((g="",A.forEach(function(N,n){g+=N+": "+n.join(", ")+`\r
4
4
  `}),F.encodeASCII(g))),x.forEach(function(N){o(N)})},m.onclose=function(g){w.debug&&p.debug("websocketRequest.onclose",g),w.onEnd()},m.onerror=function(g){w.debug&&p.debug("websocketRequest.onerror",g)},m.onmessage=function(g){w.onChunk(new Uint8Array(g.data))}},cancel:function(){w.debug&&p.debug("websocket.abort"),m.close()}}}(T)}}},35:function(f,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.unary=void 0;var l=r(65),p=r(934);t.unary=function(F,S){if(F.responseStream)throw new Error(".unary cannot be used with server-streaming methods. Use .invoke or .client instead.");if(F.requestStream)throw new Error(".unary cannot be used with client-streaming methods. Use .client instead.");var T=null,w=null,m=p.client(F,{host:S.host,transport:S.transport,debug:S.debug});return m.onHeaders(function(D){T=D}),m.onMessage(function(D){w=D}),m.onEnd(function(D,x,o){S.onEnd({status:D,statusMessage:x,headers:T||new l.Metadata,message:w,trailers:o})}),m.start(S.metadata),m.send(S.request),m.finishSend(),{close:function(){m.close()}}}},882:function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.frameRequest=void 0,t.frameRequest=function(r){var l=r.serializeBinary(),p=new ArrayBuffer(l.byteLength+5);return new DataView(p,1,4).setUint32(0,l.length,!1),new Uint8Array(p,5).set(l),new Uint8Array(p)}}},d={},function f(t){if(d[t])return d[t].exports;var r=d[t]={exports:{}};return c[t].call(r.exports,r,r.exports,f),r.exports}(607);var c,d})})(jt);var r9=jt.exports,sf=b.commonjsGlobal&&b.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const Br=sf(b.bnExports),_r=sf(b.bufferPolyfill),Ir=sf(b.js),Ka=_r.default.Buffer;function Ht(e){return e=Sr(e),(0,Ir.default)("keccak256").update(e).digest()}function Sr(e){if(!Ka.isBuffer(e))if(Array.isArray(e))e=Ka.from(e);else if(typeof e=="string")Tr(e)?e=Ka.from(zt(Nr(e)),"hex"):e=Ka.from(e);else if(typeof e=="number")e=Mr(e);else if(e==null)e=Ka.allocUnsafe(0);else if(Br.default.isBN(e))e=e.toArrayLike(Ka);else if(e.toArray)e=Ka.from(e.toArray());else throw new Error("invalid type");return e}function Tr(e,a){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||a&&e.length!==2+2*a)}function zt(e){if(typeof e!="string")throw new Error(`while padding to even, value must be string, is currently ${typeof e}, while padToEven.`);return e.length%2&&(e=`0${e}`),e}function Nr(e){return typeof e!="string"?e:Pr(e)?e.slice(2):e}function Pr(e){if(typeof e!="string")throw new Error("value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return e.slice(0,2)==="0x"}function Mr(e){const a=Or(e);return Ka.from(zt(a.slice(2)),"hex")}function Or(e){return`0x${e.toString(16)}`}typeof window<"u"&&(window.keccak256=Ht);var kr=Ht;const Ur=b.getDefaultExportFromCjs(kr);var Lr={},a1={},i9={},o9={},Jt={},s9={};Object.defineProperty(s9,"__esModule",{value:!0});var Wt=b.requireBrowser();function Rr(e){return new Promise(function(a,c){Wt(e,function(d,f){if(d){c(d);return}a(f)})})}s9.getRandomBytes=Rr;function Gr(e){return Wt(e)}s9.getRandomBytesSync=Gr;(function(e){var a=b.commonjsGlobal&&b.commonjsGlobal.__awaiter||function(F,S,T,w){function m(D){return D instanceof T?D:new T(function(x){x(D)})}return new(T||(T=Promise))(function(D,x){function o(N){try{g(w.next(N))}catch(n){x(n)}}function A(N){try{g(w.throw(N))}catch(n){x(n)}}function g(N){N.done?D(N.value):m(N.value).then(o,A)}g((w=w.apply(F,S||[])).next())})},c=b.commonjsGlobal&&b.commonjsGlobal.__generator||function(F,S){var T={label:0,sent:function(){if(D[0]&1)throw D[1];return D[1]},trys:[],ops:[]},w,m,D,x;return x={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function o(g){return function(N){return A([g,N])}}function A(g){if(w)throw new TypeError("Generator is already executing.");for(;T;)try{if(w=1,m&&(D=g[0]&2?m.return:g[0]?m.throw||((D=m.return)&&D.call(m),0):m.next)&&!(D=D.call(m,g[1])).done)return D;switch(m=0,D&&(g=[g[0]&2,D.value]),g[0]){case 0:case 1:D=g;break;case 4:return T.label++,{value:g[1],done:!1};case 5:T.label++,m=g[1],g=[0];continue;case 7:g=T.ops.pop(),T.trys.pop();continue;default:if(D=T.trys,!(D=D.length>0&&D[D.length-1])&&(g[0]===6||g[0]===2)){T=0;continue}if(g[0]===3&&(!D||g[1]>D[0]&&g[1]<D[3])){T.label=g[1];break}if(g[0]===6&&T.label<D[1]){T.label=D[1],D=g;break}if(D&&T.label<D[2]){T.label=D[2],T.ops.push(g);break}D[2]&&T.ops.pop(),T.trys.pop();continue}g=S.call(F,T)}catch(N){g=[6,N],m=0}finally{w=D=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}};function d(F){for(var S in F)e.hasOwnProperty(S)||(e[S]=F[S])}Object.defineProperty(e,"__esModule",{value:!0});var f=b.elliptic,t=s9,r=32;function l(){return a(this,void 0,void 0,function(){var F;return c(this,function(S){switch(S.label){case 0:return[4,t.getRandomBytes(r)];case 1:return F=S.sent(),f.privateKeyVerify(F)?[2,F]:[3,0];case 2:return[2]}})})}e.createPrivateKey=l;function p(){for(;;){var F=t.getRandomBytesSync(r);if(f.privateKeyVerify(F))return F}}e.createPrivateKeySync=p,d(b.elliptic)})(Jt);var x6={},xf={exports:{}};xf.exports;(function(e){(function(a,c){function d(C,u){if(!C)throw new Error(u||"Assertion failed")}function f(C,u){C.super_=u;var s=function(){};s.prototype=u.prototype,C.prototype=new s,C.prototype.constructor=C}function t(C,u,s){if(t.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((u==="le"||u==="be")&&(s=u,u=10),this._init(C||0,u||10,s||"be"))}typeof a=="object"?a.exports=t:c.BN=t,t.BN=t,t.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=b.bufferPolyfill.Buffer}catch{}t.isBN=function(u){return u instanceof t?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===t.wordSize&&Array.isArray(u.words)},t.max=function(u,s){return u.cmp(s)>0?u:s},t.min=function(u,s){return u.cmp(s)<0?u:s},t.prototype._init=function(u,s,E){if(typeof u=="number")return this._initNumber(u,s,E);if(typeof u=="object")return this._initArray(u,s,E);s==="hex"&&(s=16),d(s===(s|0)&&s>=2&&s<=36),u=u.toString().replace(/\s+/g,"");var y=0;u[0]==="-"&&(y++,this.negative=1),y<u.length&&(s===16?this._parseHex(u,y,E):(this._parseBase(u,s,y),E==="le"&&this._initArray(this.toArray(),s,E)))},t.prototype._initNumber=function(u,s,E){u<0&&(this.negative=1,u=-u),u<67108864?(this.words=[u&67108863],this.length=1):u<4503599627370496?(this.words=[u&67108863,u/67108864&67108863],this.length=2):(d(u<9007199254740992),this.words=[u&67108863,u/67108864&67108863,1],this.length=3),E==="le"&&this._initArray(this.toArray(),s,E)},t.prototype._initArray=function(u,s,E){if(d(typeof u.length=="number"),u.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(u.length/3),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var I,P,O=0;if(E==="be")for(y=u.length-1,I=0;y>=0;y-=3)P=u[y]|u[y-1]<<8|u[y-2]<<16,this.words[I]|=P<<O&67108863,this.words[I+1]=P>>>26-O&67108863,O+=24,O>=26&&(O-=26,I++);else if(E==="le")for(y=0,I=0;y<u.length;y+=3)P=u[y]|u[y+1]<<8|u[y+2]<<16,this.words[I]|=P<<O&67108863,this.words[I+1]=P>>>26-O&67108863,O+=24,O>=26&&(O-=26,I++);return this.strip()};function l(C,u){var s=C.charCodeAt(u);return s>=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function p(C,u,s){var E=l(C,s);return s-1>=u&&(E|=l(C,s-1)<<4),E}t.prototype._parseHex=function(u,s,E){this.length=Math.ceil((u.length-s)/6),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var I=0,P=0,O;if(E==="be")for(y=u.length-1;y>=s;y-=2)O=p(u,s,y)<<I,this.words[P]|=O&67108863,I>=18?(I-=18,P+=1,this.words[P]|=O>>>26):I+=8;else{var B=u.length-s;for(y=B%2===0?s+1:s;y<u.length;y+=2)O=p(u,s,y)<<I,this.words[P]|=O&67108863,I>=18?(I-=18,P+=1,this.words[P]|=O>>>26):I+=8}this.strip()};function F(C,u,s,E){for(var y=0,I=Math.min(C.length,s),P=u;P<I;P++){var O=C.charCodeAt(P)-48;y*=E,O>=49?y+=O-49+10:O>=17?y+=O-17+10:y+=O}return y}t.prototype._parseBase=function(u,s,E){this.words=[0],this.length=1;for(var y=0,I=1;I<=67108863;I*=s)y++;y--,I=I/s|0;for(var P=u.length-E,O=P%y,B=Math.min(P,P-O)+E,i=0,_=E;_<B;_+=y)i=F(u,_,_+y,s),this.imuln(I),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i);if(O!==0){var H=1;for(i=F(u,_,u.length,s),_=0;_<O;_++)H*=s;this.imuln(H),this.words[0]+i<67108864?this.words[0]+=i:this._iaddn(i)}this.strip()},t.prototype.copy=function(u){u.words=new Array(this.length);for(var s=0;s<this.length;s++)u.words[s]=this.words[s];u.length=this.length,u.negative=this.negative,u.red=this.red},t.prototype.clone=function(){var u=new t(null);return this.copy(u),u},t.prototype._expand=function(u){for(;this.length<u;)this.words[this.length++]=0;return this},t.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},t.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},t.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var S=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];t.prototype.toString=function(u,s){u=u||10,s=s|0||1;var E;if(u===16||u==="hex"){E="";for(var y=0,I=0,P=0;P<this.length;P++){var O=this.words[P],B=((O<<y|I)&16777215).toString(16);I=O>>>24-y&16777215,I!==0||P!==this.length-1?E=S[6-B.length]+B+E:E=B+E,y+=2,y>=26&&(y-=26,P--)}for(I!==0&&(E=I.toString(16)+E);E.length%s!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}if(u===(u|0)&&u>=2&&u<=36){var i=T[u],_=w[u];E="";var H=this.clone();for(H.negative=0;!H.isZero();){var J=H.modn(_).toString(u);H=H.idivn(_),H.isZero()?E=J+E:E=S[i-J.length]+J+E}for(this.isZero()&&(E="0"+E);E.length%s!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}d(!1,"Base should be between 2 and 36")},t.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&d(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},t.prototype.toJSON=function(){return this.toString(16)},t.prototype.toBuffer=function(u,s){return d(typeof r<"u"),this.toArrayLike(r,u,s)},t.prototype.toArray=function(u,s){return this.toArrayLike(Array,u,s)},t.prototype.toArrayLike=function(u,s,E){var y=this.byteLength(),I=E||Math.max(1,y);d(y<=I,"byte array longer than desired length"),d(I>0,"Requested array length <= 0"),this.strip();var P=s==="le",O=new u(I),B,i,_=this.clone();if(P){for(i=0;!_.isZero();i++)B=_.andln(255),_.iushrn(8),O[i]=B;for(;i<I;i++)O[i]=0}else{for(i=0;i<I-y;i++)O[i]=0;for(i=0;!_.isZero();i++)B=_.andln(255),_.iushrn(8),O[I-i-1]=B}return O},Math.clz32?t.prototype._countBits=function(u){return 32-Math.clz32(u)}:t.prototype._countBits=function(u){var s=u,E=0;return s>=4096&&(E+=13,s>>>=13),s>=64&&(E+=7,s>>>=7),s>=8&&(E+=4,s>>>=4),s>=2&&(E+=2,s>>>=2),E+s},t.prototype._zeroBits=function(u){if(u===0)return 26;var s=u,E=0;return s&8191||(E+=13,s>>>=13),s&127||(E+=7,s>>>=7),s&15||(E+=4,s>>>=4),s&3||(E+=2,s>>>=2),s&1||E++,E},t.prototype.bitLength=function(){var u=this.words[this.length-1],s=this._countBits(u);return(this.length-1)*26+s};function m(C){for(var u=new Array(C.bitLength()),s=0;s<u.length;s++){var E=s/26|0,y=s%26;u[s]=(C.words[E]&1<<y)>>>y}return u}t.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,s=0;s<this.length;s++){var E=this._zeroBits(this.words[s]);if(u+=E,E!==26)break}return u},t.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},t.prototype.toTwos=function(u){return this.negative!==0?this.abs().inotn(u).iaddn(1):this.clone()},t.prototype.fromTwos=function(u){return this.testn(u-1)?this.notn(u).iaddn(1).ineg():this.clone()},t.prototype.isNeg=function(){return this.negative!==0},t.prototype.neg=function(){return this.clone().ineg()},t.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},t.prototype.iuor=function(u){for(;this.length<u.length;)this.words[this.length++]=0;for(var s=0;s<u.length;s++)this.words[s]=this.words[s]|u.words[s];return this.strip()},t.prototype.ior=function(u){return d((this.negative|u.negative)===0),this.iuor(u)},t.prototype.or=function(u){return this.length>u.length?this.clone().ior(u):u.clone().ior(this)},t.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},t.prototype.iuand=function(u){var s;this.length>u.length?s=u:s=this;for(var E=0;E<s.length;E++)this.words[E]=this.words[E]&u.words[E];return this.length=s.length,this.strip()},t.prototype.iand=function(u){return d((this.negative|u.negative)===0),this.iuand(u)},t.prototype.and=function(u){return this.length>u.length?this.clone().iand(u):u.clone().iand(this)},t.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},t.prototype.iuxor=function(u){var s,E;this.length>u.length?(s=this,E=u):(s=u,E=this);for(var y=0;y<E.length;y++)this.words[y]=s.words[y]^E.words[y];if(this!==s)for(;y<s.length;y++)this.words[y]=s.words[y];return this.length=s.length,this.strip()},t.prototype.ixor=function(u){return d((this.negative|u.negative)===0),this.iuxor(u)},t.prototype.xor=function(u){return this.length>u.length?this.clone().ixor(u):u.clone().ixor(this)},t.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},t.prototype.inotn=function(u){d(typeof u=="number"&&u>=0);var s=Math.ceil(u/26)|0,E=u%26;this._expand(s),E>0&&s--;for(var y=0;y<s;y++)this.words[y]=~this.words[y]&67108863;return E>0&&(this.words[y]=~this.words[y]&67108863>>26-E),this.strip()},t.prototype.notn=function(u){return this.clone().inotn(u)},t.prototype.setn=function(u,s){d(typeof u=="number"&&u>=0);var E=u/26|0,y=u%26;return this._expand(E+1),s?this.words[E]=this.words[E]|1<<y:this.words[E]=this.words[E]&~(1<<y),this.strip()},t.prototype.iadd=function(u){var s;if(this.negative!==0&&u.negative===0)return this.negative=0,s=this.isub(u),this.negative^=1,this._normSign();if(this.negative===0&&u.negative!==0)return u.negative=0,s=this.isub(u),u.negative=1,s._normSign();var E,y;this.length>u.length?(E=this,y=u):(E=u,y=this);for(var I=0,P=0;P<y.length;P++)s=(E.words[P]|0)+(y.words[P]|0)+I,this.words[P]=s&67108863,I=s>>>26;for(;I!==0&&P<E.length;P++)s=(E.words[P]|0)+I,this.words[P]=s&67108863,I=s>>>26;if(this.length=E.length,I!==0)this.words[this.length]=I,this.length++;else if(E!==this)for(;P<E.length;P++)this.words[P]=E.words[P];return this},t.prototype.add=function(u){var s;return u.negative!==0&&this.negative===0?(u.negative=0,s=this.sub(u),u.negative^=1,s):u.negative===0&&this.negative!==0?(this.negative=0,s=u.sub(this),this.negative=1,s):this.length>u.length?this.clone().iadd(u):u.clone().iadd(this)},t.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var s=this.iadd(u);return u.negative=1,s._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var E=this.cmp(u);if(E===0)return this.negative=0,this.length=1,this.words[0]=0,this;var y,I;E>0?(y=this,I=u):(y=u,I=this);for(var P=0,O=0;O<I.length;O++)s=(y.words[O]|0)-(I.words[O]|0)+P,P=s>>26,this.words[O]=s&67108863;for(;P!==0&&O<y.length;O++)s=(y.words[O]|0)+P,P=s>>26,this.words[O]=s&67108863;if(P===0&&O<y.length&&y!==this)for(;O<y.length;O++)this.words[O]=y.words[O];return this.length=Math.max(this.length,O),y!==this&&(this.negative=1),this.strip()},t.prototype.sub=function(u){return this.clone().isub(u)};function D(C,u,s){s.negative=u.negative^C.negative;var E=C.length+u.length|0;s.length=E,E=E-1|0;var y=C.words[0]|0,I=u.words[0]|0,P=y*I,O=P&67108863,B=P/67108864|0;s.words[0]=O;for(var i=1;i<E;i++){for(var _=B>>>26,H=B&67108863,J=Math.min(i,u.length-1),q=Math.max(0,i-C.length+1);q<=J;q++){var M=i-q|0;y=C.words[M]|0,I=u.words[q]|0,P=y*I+H,_+=P/67108864|0,H=P&67108863}s.words[i]=H|0,B=_|0}return B!==0?s.words[i]=B|0:s.length--,s.strip()}var x=function(u,s,E){var y=u.words,I=s.words,P=E.words,O=0,B,i,_,H=y[0]|0,J=H&8191,q=H>>>13,M=y[1]|0,W=M&8191,K=M>>>13,u0=y[2]|0,c0=u0&8191,t0=u0>>>13,L0=y[3]|0,f0=L0&8191,e0=L0>>>13,J0=y[4]|0,D0=J0&8191,h0=J0>>>13,ke=y[5]|0,m0=ke&8191,p0=ke>>>13,le=y[6]|0,V=le&8191,A0=le>>>13,U=y[7]|0,$=U&8191,j=U>>>13,a0=y[8]|0,Z=a0&8191,Y=a0>>>13,b0=y[9]|0,Q=b0&8191,d0=b0>>>13,x0=I[0]|0,r0=x0&8191,i0=x0>>>13,Y0=I[1]|0,n0=Y0&8191,o0=Y0>>>13,Ae=I[2]|0,l0=Ae&8191,E0=Ae>>>13,ia=I[3]|0,g0=ia&8191,v0=ia>>>13,oa=I[4]|0,C0=oa&8191,w0=oa>>>13,sa=I[5]|0,B0=sa&8191,_0=sa>>>13,xa=I[6]|0,I0=xa&8191,S0=xa>>>13,la=I[7]|0,T0=la&8191,N0=la>>>13,Da=I[8]|0,P0=Da&8191,M0=Da>>>13,ha=I[9]|0,O0=ha&8191,k0=ha>>>13;E.negative=u.negative^s.negative,E.length=19,B=Math.imul(J,r0),i=Math.imul(J,i0),i=i+Math.imul(q,r0)|0,_=Math.imul(q,i0);var Ue=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,B=Math.imul(W,r0),i=Math.imul(W,i0),i=i+Math.imul(K,r0)|0,_=Math.imul(K,i0),B=B+Math.imul(J,n0)|0,i=i+Math.imul(J,o0)|0,i=i+Math.imul(q,n0)|0,_=_+Math.imul(q,o0)|0;var Le=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,B=Math.imul(c0,r0),i=Math.imul(c0,i0),i=i+Math.imul(t0,r0)|0,_=Math.imul(t0,i0),B=B+Math.imul(W,n0)|0,i=i+Math.imul(W,o0)|0,i=i+Math.imul(K,n0)|0,_=_+Math.imul(K,o0)|0,B=B+Math.imul(J,l0)|0,i=i+Math.imul(J,E0)|0,i=i+Math.imul(q,l0)|0,_=_+Math.imul(q,E0)|0;var Re=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,B=Math.imul(f0,r0),i=Math.imul(f0,i0),i=i+Math.imul(e0,r0)|0,_=Math.imul(e0,i0),B=B+Math.imul(c0,n0)|0,i=i+Math.imul(c0,o0)|0,i=i+Math.imul(t0,n0)|0,_=_+Math.imul(t0,o0)|0,B=B+Math.imul(W,l0)|0,i=i+Math.imul(W,E0)|0,i=i+Math.imul(K,l0)|0,_=_+Math.imul(K,E0)|0,B=B+Math.imul(J,g0)|0,i=i+Math.imul(J,v0)|0,i=i+Math.imul(q,g0)|0,_=_+Math.imul(q,v0)|0;var Ge=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,B=Math.imul(D0,r0),i=Math.imul(D0,i0),i=i+Math.imul(h0,r0)|0,_=Math.imul(h0,i0),B=B+Math.imul(f0,n0)|0,i=i+Math.imul(f0,o0)|0,i=i+Math.imul(e0,n0)|0,_=_+Math.imul(e0,o0)|0,B=B+Math.imul(c0,l0)|0,i=i+Math.imul(c0,E0)|0,i=i+Math.imul(t0,l0)|0,_=_+Math.imul(t0,E0)|0,B=B+Math.imul(W,g0)|0,i=i+Math.imul(W,v0)|0,i=i+Math.imul(K,g0)|0,_=_+Math.imul(K,v0)|0,B=B+Math.imul(J,C0)|0,i=i+Math.imul(J,w0)|0,i=i+Math.imul(q,C0)|0,_=_+Math.imul(q,w0)|0;var $e=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+($e>>>26)|0,$e&=67108863,B=Math.imul(m0,r0),i=Math.imul(m0,i0),i=i+Math.imul(p0,r0)|0,_=Math.imul(p0,i0),B=B+Math.imul(D0,n0)|0,i=i+Math.imul(D0,o0)|0,i=i+Math.imul(h0,n0)|0,_=_+Math.imul(h0,o0)|0,B=B+Math.imul(f0,l0)|0,i=i+Math.imul(f0,E0)|0,i=i+Math.imul(e0,l0)|0,_=_+Math.imul(e0,E0)|0,B=B+Math.imul(c0,g0)|0,i=i+Math.imul(c0,v0)|0,i=i+Math.imul(t0,g0)|0,_=_+Math.imul(t0,v0)|0,B=B+Math.imul(W,C0)|0,i=i+Math.imul(W,w0)|0,i=i+Math.imul(K,C0)|0,_=_+Math.imul(K,w0)|0,B=B+Math.imul(J,B0)|0,i=i+Math.imul(J,_0)|0,i=i+Math.imul(q,B0)|0,_=_+Math.imul(q,_0)|0;var je=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(je>>>26)|0,je&=67108863,B=Math.imul(V,r0),i=Math.imul(V,i0),i=i+Math.imul(A0,r0)|0,_=Math.imul(A0,i0),B=B+Math.imul(m0,n0)|0,i=i+Math.imul(m0,o0)|0,i=i+Math.imul(p0,n0)|0,_=_+Math.imul(p0,o0)|0,B=B+Math.imul(D0,l0)|0,i=i+Math.imul(D0,E0)|0,i=i+Math.imul(h0,l0)|0,_=_+Math.imul(h0,E0)|0,B=B+Math.imul(f0,g0)|0,i=i+Math.imul(f0,v0)|0,i=i+Math.imul(e0,g0)|0,_=_+Math.imul(e0,v0)|0,B=B+Math.imul(c0,C0)|0,i=i+Math.imul(c0,w0)|0,i=i+Math.imul(t0,C0)|0,_=_+Math.imul(t0,w0)|0,B=B+Math.imul(W,B0)|0,i=i+Math.imul(W,_0)|0,i=i+Math.imul(K,B0)|0,_=_+Math.imul(K,_0)|0,B=B+Math.imul(J,I0)|0,i=i+Math.imul(J,S0)|0,i=i+Math.imul(q,I0)|0,_=_+Math.imul(q,S0)|0;var He=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(He>>>26)|0,He&=67108863,B=Math.imul($,r0),i=Math.imul($,i0),i=i+Math.imul(j,r0)|0,_=Math.imul(j,i0),B=B+Math.imul(V,n0)|0,i=i+Math.imul(V,o0)|0,i=i+Math.imul(A0,n0)|0,_=_+Math.imul(A0,o0)|0,B=B+Math.imul(m0,l0)|0,i=i+Math.imul(m0,E0)|0,i=i+Math.imul(p0,l0)|0,_=_+Math.imul(p0,E0)|0,B=B+Math.imul(D0,g0)|0,i=i+Math.imul(D0,v0)|0,i=i+Math.imul(h0,g0)|0,_=_+Math.imul(h0,v0)|0,B=B+Math.imul(f0,C0)|0,i=i+Math.imul(f0,w0)|0,i=i+Math.imul(e0,C0)|0,_=_+Math.imul(e0,w0)|0,B=B+Math.imul(c0,B0)|0,i=i+Math.imul(c0,_0)|0,i=i+Math.imul(t0,B0)|0,_=_+Math.imul(t0,_0)|0,B=B+Math.imul(W,I0)|0,i=i+Math.imul(W,S0)|0,i=i+Math.imul(K,I0)|0,_=_+Math.imul(K,S0)|0,B=B+Math.imul(J,T0)|0,i=i+Math.imul(J,N0)|0,i=i+Math.imul(q,T0)|0,_=_+Math.imul(q,N0)|0;var m1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(m1>>>26)|0,m1&=67108863,B=Math.imul(Z,r0),i=Math.imul(Z,i0),i=i+Math.imul(Y,r0)|0,_=Math.imul(Y,i0),B=B+Math.imul($,n0)|0,i=i+Math.imul($,o0)|0,i=i+Math.imul(j,n0)|0,_=_+Math.imul(j,o0)|0,B=B+Math.imul(V,l0)|0,i=i+Math.imul(V,E0)|0,i=i+Math.imul(A0,l0)|0,_=_+Math.imul(A0,E0)|0,B=B+Math.imul(m0,g0)|0,i=i+Math.imul(m0,v0)|0,i=i+Math.imul(p0,g0)|0,_=_+Math.imul(p0,v0)|0,B=B+Math.imul(D0,C0)|0,i=i+Math.imul(D0,w0)|0,i=i+Math.imul(h0,C0)|0,_=_+Math.imul(h0,w0)|0,B=B+Math.imul(f0,B0)|0,i=i+Math.imul(f0,_0)|0,i=i+Math.imul(e0,B0)|0,_=_+Math.imul(e0,_0)|0,B=B+Math.imul(c0,I0)|0,i=i+Math.imul(c0,S0)|0,i=i+Math.imul(t0,I0)|0,_=_+Math.imul(t0,S0)|0,B=B+Math.imul(W,T0)|0,i=i+Math.imul(W,N0)|0,i=i+Math.imul(K,T0)|0,_=_+Math.imul(K,N0)|0,B=B+Math.imul(J,P0)|0,i=i+Math.imul(J,M0)|0,i=i+Math.imul(q,P0)|0,_=_+Math.imul(q,M0)|0;var p1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(p1>>>26)|0,p1&=67108863,B=Math.imul(Q,r0),i=Math.imul(Q,i0),i=i+Math.imul(d0,r0)|0,_=Math.imul(d0,i0),B=B+Math.imul(Z,n0)|0,i=i+Math.imul(Z,o0)|0,i=i+Math.imul(Y,n0)|0,_=_+Math.imul(Y,o0)|0,B=B+Math.imul($,l0)|0,i=i+Math.imul($,E0)|0,i=i+Math.imul(j,l0)|0,_=_+Math.imul(j,E0)|0,B=B+Math.imul(V,g0)|0,i=i+Math.imul(V,v0)|0,i=i+Math.imul(A0,g0)|0,_=_+Math.imul(A0,v0)|0,B=B+Math.imul(m0,C0)|0,i=i+Math.imul(m0,w0)|0,i=i+Math.imul(p0,C0)|0,_=_+Math.imul(p0,w0)|0,B=B+Math.imul(D0,B0)|0,i=i+Math.imul(D0,_0)|0,i=i+Math.imul(h0,B0)|0,_=_+Math.imul(h0,_0)|0,B=B+Math.imul(f0,I0)|0,i=i+Math.imul(f0,S0)|0,i=i+Math.imul(e0,I0)|0,_=_+Math.imul(e0,S0)|0,B=B+Math.imul(c0,T0)|0,i=i+Math.imul(c0,N0)|0,i=i+Math.imul(t0,T0)|0,_=_+Math.imul(t0,N0)|0,B=B+Math.imul(W,P0)|0,i=i+Math.imul(W,M0)|0,i=i+Math.imul(K,P0)|0,_=_+Math.imul(K,M0)|0,B=B+Math.imul(J,O0)|0,i=i+Math.imul(J,k0)|0,i=i+Math.imul(q,O0)|0,_=_+Math.imul(q,k0)|0;var E1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(E1>>>26)|0,E1&=67108863,B=Math.imul(Q,n0),i=Math.imul(Q,o0),i=i+Math.imul(d0,n0)|0,_=Math.imul(d0,o0),B=B+Math.imul(Z,l0)|0,i=i+Math.imul(Z,E0)|0,i=i+Math.imul(Y,l0)|0,_=_+Math.imul(Y,E0)|0,B=B+Math.imul($,g0)|0,i=i+Math.imul($,v0)|0,i=i+Math.imul(j,g0)|0,_=_+Math.imul(j,v0)|0,B=B+Math.imul(V,C0)|0,i=i+Math.imul(V,w0)|0,i=i+Math.imul(A0,C0)|0,_=_+Math.imul(A0,w0)|0,B=B+Math.imul(m0,B0)|0,i=i+Math.imul(m0,_0)|0,i=i+Math.imul(p0,B0)|0,_=_+Math.imul(p0,_0)|0,B=B+Math.imul(D0,I0)|0,i=i+Math.imul(D0,S0)|0,i=i+Math.imul(h0,I0)|0,_=_+Math.imul(h0,S0)|0,B=B+Math.imul(f0,T0)|0,i=i+Math.imul(f0,N0)|0,i=i+Math.imul(e0,T0)|0,_=_+Math.imul(e0,N0)|0,B=B+Math.imul(c0,P0)|0,i=i+Math.imul(c0,M0)|0,i=i+Math.imul(t0,P0)|0,_=_+Math.imul(t0,M0)|0,B=B+Math.imul(W,O0)|0,i=i+Math.imul(W,k0)|0,i=i+Math.imul(K,O0)|0,_=_+Math.imul(K,k0)|0;var A1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(A1>>>26)|0,A1&=67108863,B=Math.imul(Q,l0),i=Math.imul(Q,E0),i=i+Math.imul(d0,l0)|0,_=Math.imul(d0,E0),B=B+Math.imul(Z,g0)|0,i=i+Math.imul(Z,v0)|0,i=i+Math.imul(Y,g0)|0,_=_+Math.imul(Y,v0)|0,B=B+Math.imul($,C0)|0,i=i+Math.imul($,w0)|0,i=i+Math.imul(j,C0)|0,_=_+Math.imul(j,w0)|0,B=B+Math.imul(V,B0)|0,i=i+Math.imul(V,_0)|0,i=i+Math.imul(A0,B0)|0,_=_+Math.imul(A0,_0)|0,B=B+Math.imul(m0,I0)|0,i=i+Math.imul(m0,S0)|0,i=i+Math.imul(p0,I0)|0,_=_+Math.imul(p0,S0)|0,B=B+Math.imul(D0,T0)|0,i=i+Math.imul(D0,N0)|0,i=i+Math.imul(h0,T0)|0,_=_+Math.imul(h0,N0)|0,B=B+Math.imul(f0,P0)|0,i=i+Math.imul(f0,M0)|0,i=i+Math.imul(e0,P0)|0,_=_+Math.imul(e0,M0)|0,B=B+Math.imul(c0,O0)|0,i=i+Math.imul(c0,k0)|0,i=i+Math.imul(t0,O0)|0,_=_+Math.imul(t0,k0)|0;var F1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(F1>>>26)|0,F1&=67108863,B=Math.imul(Q,g0),i=Math.imul(Q,v0),i=i+Math.imul(d0,g0)|0,_=Math.imul(d0,v0),B=B+Math.imul(Z,C0)|0,i=i+Math.imul(Z,w0)|0,i=i+Math.imul(Y,C0)|0,_=_+Math.imul(Y,w0)|0,B=B+Math.imul($,B0)|0,i=i+Math.imul($,_0)|0,i=i+Math.imul(j,B0)|0,_=_+Math.imul(j,_0)|0,B=B+Math.imul(V,I0)|0,i=i+Math.imul(V,S0)|0,i=i+Math.imul(A0,I0)|0,_=_+Math.imul(A0,S0)|0,B=B+Math.imul(m0,T0)|0,i=i+Math.imul(m0,N0)|0,i=i+Math.imul(p0,T0)|0,_=_+Math.imul(p0,N0)|0,B=B+Math.imul(D0,P0)|0,i=i+Math.imul(D0,M0)|0,i=i+Math.imul(h0,P0)|0,_=_+Math.imul(h0,M0)|0,B=B+Math.imul(f0,O0)|0,i=i+Math.imul(f0,k0)|0,i=i+Math.imul(e0,O0)|0,_=_+Math.imul(e0,k0)|0;var y1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(y1>>>26)|0,y1&=67108863,B=Math.imul(Q,C0),i=Math.imul(Q,w0),i=i+Math.imul(d0,C0)|0,_=Math.imul(d0,w0),B=B+Math.imul(Z,B0)|0,i=i+Math.imul(Z,_0)|0,i=i+Math.imul(Y,B0)|0,_=_+Math.imul(Y,_0)|0,B=B+Math.imul($,I0)|0,i=i+Math.imul($,S0)|0,i=i+Math.imul(j,I0)|0,_=_+Math.imul(j,S0)|0,B=B+Math.imul(V,T0)|0,i=i+Math.imul(V,N0)|0,i=i+Math.imul(A0,T0)|0,_=_+Math.imul(A0,N0)|0,B=B+Math.imul(m0,P0)|0,i=i+Math.imul(m0,M0)|0,i=i+Math.imul(p0,P0)|0,_=_+Math.imul(p0,M0)|0,B=B+Math.imul(D0,O0)|0,i=i+Math.imul(D0,k0)|0,i=i+Math.imul(h0,O0)|0,_=_+Math.imul(h0,k0)|0;var g1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(g1>>>26)|0,g1&=67108863,B=Math.imul(Q,B0),i=Math.imul(Q,_0),i=i+Math.imul(d0,B0)|0,_=Math.imul(d0,_0),B=B+Math.imul(Z,I0)|0,i=i+Math.imul(Z,S0)|0,i=i+Math.imul(Y,I0)|0,_=_+Math.imul(Y,S0)|0,B=B+Math.imul($,T0)|0,i=i+Math.imul($,N0)|0,i=i+Math.imul(j,T0)|0,_=_+Math.imul(j,N0)|0,B=B+Math.imul(V,P0)|0,i=i+Math.imul(V,M0)|0,i=i+Math.imul(A0,P0)|0,_=_+Math.imul(A0,M0)|0,B=B+Math.imul(m0,O0)|0,i=i+Math.imul(m0,k0)|0,i=i+Math.imul(p0,O0)|0,_=_+Math.imul(p0,k0)|0;var v1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(v1>>>26)|0,v1&=67108863,B=Math.imul(Q,I0),i=Math.imul(Q,S0),i=i+Math.imul(d0,I0)|0,_=Math.imul(d0,S0),B=B+Math.imul(Z,T0)|0,i=i+Math.imul(Z,N0)|0,i=i+Math.imul(Y,T0)|0,_=_+Math.imul(Y,N0)|0,B=B+Math.imul($,P0)|0,i=i+Math.imul($,M0)|0,i=i+Math.imul(j,P0)|0,_=_+Math.imul(j,M0)|0,B=B+Math.imul(V,O0)|0,i=i+Math.imul(V,k0)|0,i=i+Math.imul(A0,O0)|0,_=_+Math.imul(A0,k0)|0;var C1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(C1>>>26)|0,C1&=67108863,B=Math.imul(Q,T0),i=Math.imul(Q,N0),i=i+Math.imul(d0,T0)|0,_=Math.imul(d0,N0),B=B+Math.imul(Z,P0)|0,i=i+Math.imul(Z,M0)|0,i=i+Math.imul(Y,P0)|0,_=_+Math.imul(Y,M0)|0,B=B+Math.imul($,O0)|0,i=i+Math.imul($,k0)|0,i=i+Math.imul(j,O0)|0,_=_+Math.imul(j,k0)|0;var w1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(w1>>>26)|0,w1&=67108863,B=Math.imul(Q,P0),i=Math.imul(Q,M0),i=i+Math.imul(d0,P0)|0,_=Math.imul(d0,M0),B=B+Math.imul(Z,O0)|0,i=i+Math.imul(Z,k0)|0,i=i+Math.imul(Y,O0)|0,_=_+Math.imul(Y,k0)|0;var B1=(O+B|0)+((i&8191)<<13)|0;O=(_+(i>>>13)|0)+(B1>>>26)|0,B1&=67108863,B=Math.imul(Q,O0),i=Math.imul(Q,k0),i=i+Math.imul(d0,O0)|0,_=Math.imul(d0,k0);var _1=(O+B|0)+((i&8191)<<13)|0;return O=(_+(i>>>13)|0)+(_1>>>26)|0,_1&=67108863,P[0]=Ue,P[1]=Le,P[2]=Re,P[3]=Ge,P[4]=$e,P[5]=je,P[6]=He,P[7]=m1,P[8]=p1,P[9]=E1,P[10]=A1,P[11]=F1,P[12]=y1,P[13]=g1,P[14]=v1,P[15]=C1,P[16]=w1,P[17]=B1,P[18]=_1,O!==0&&(P[19]=O,E.length++),E};Math.imul||(x=D);function o(C,u,s){s.negative=u.negative^C.negative,s.length=C.length+u.length;for(var E=0,y=0,I=0;I<s.length-1;I++){var P=y;y=0;for(var O=E&67108863,B=Math.min(I,u.length-1),i=Math.max(0,I-C.length+1);i<=B;i++){var _=I-i,H=C.words[_]|0,J=u.words[i]|0,q=H*J,M=q&67108863;P=P+(q/67108864|0)|0,M=M+O|0,O=M&67108863,P=P+(M>>>26)|0,y+=P>>>26,P&=67108863}s.words[I]=O,E=P,P=y}return E!==0?s.words[I]=E:s.length--,s.strip()}function A(C,u,s){var E=new g;return E.mulp(C,u,s)}t.prototype.mulTo=function(u,s){var E,y=this.length+u.length;return this.length===10&&u.length===10?E=x(this,u,s):y<63?E=D(this,u,s):y<1024?E=o(this,u,s):E=A(this,u,s),E};function g(C,u){this.x=C,this.y=u}g.prototype.makeRBT=function(u){for(var s=new Array(u),E=t.prototype._countBits(u)-1,y=0;y<u;y++)s[y]=this.revBin(y,E,u);return s},g.prototype.revBin=function(u,s,E){if(u===0||u===E-1)return u;for(var y=0,I=0;I<s;I++)y|=(u&1)<<s-I-1,u>>=1;return y},g.prototype.permute=function(u,s,E,y,I,P){for(var O=0;O<P;O++)y[O]=s[u[O]],I[O]=E[u[O]]},g.prototype.transform=function(u,s,E,y,I,P){this.permute(P,u,s,E,y,I);for(var O=1;O<I;O<<=1)for(var B=O<<1,i=Math.cos(2*Math.PI/B),_=Math.sin(2*Math.PI/B),H=0;H<I;H+=B)for(var J=i,q=_,M=0;M<O;M++){var W=E[H+M],K=y[H+M],u0=E[H+M+O],c0=y[H+M+O],t0=J*u0-q*c0;c0=J*c0+q*u0,u0=t0,E[H+M]=W+u0,y[H+M]=K+c0,E[H+M+O]=W-u0,y[H+M+O]=K-c0,M!==B&&(t0=i*J-_*q,q=i*q+_*J,J=t0)}},g.prototype.guessLen13b=function(u,s){var E=Math.max(s,u)|1,y=E&1,I=0;for(E=E/2|0;E;E=E>>>1)I++;return 1<<I+1+y},g.prototype.conjugate=function(u,s,E){if(!(E<=1))for(var y=0;y<E/2;y++){var I=u[y];u[y]=u[E-y-1],u[E-y-1]=I,I=s[y],s[y]=-s[E-y-1],s[E-y-1]=-I}},g.prototype.normalize13b=function(u,s){for(var E=0,y=0;y<s/2;y++){var I=Math.round(u[2*y+1]/s)*8192+Math.round(u[2*y]/s)+E;u[y]=I&67108863,I<67108864?E=0:E=I/67108864|0}return u},g.prototype.convert13b=function(u,s,E,y){for(var I=0,P=0;P<s;P++)I=I+(u[P]|0),E[2*P]=I&8191,I=I>>>13,E[2*P+1]=I&8191,I=I>>>13;for(P=2*s;P<y;++P)E[P]=0;d(I===0),d((I&-8192)===0)},g.prototype.stub=function(u){for(var s=new Array(u),E=0;E<u;E++)s[E]=0;return s},g.prototype.mulp=function(u,s,E){var y=2*this.guessLen13b(u.length,s.length),I=this.makeRBT(y),P=this.stub(y),O=new Array(y),B=new Array(y),i=new Array(y),_=new Array(y),H=new Array(y),J=new Array(y),q=E.words;q.length=y,this.convert13b(u.words,u.length,O,y),this.convert13b(s.words,s.length,_,y),this.transform(O,P,B,i,y,I),this.transform(_,P,H,J,y,I);for(var M=0;M<y;M++){var W=B[M]*H[M]-i[M]*J[M];i[M]=B[M]*J[M]+i[M]*H[M],B[M]=W}return this.conjugate(B,i,y),this.transform(B,i,q,P,y,I),this.conjugate(q,P,y),this.normalize13b(q,y),E.negative=u.negative^s.negative,E.length=u.length+s.length,E.strip()},t.prototype.mul=function(u){var s=new t(null);return s.words=new Array(this.length+u.length),this.mulTo(u,s)},t.prototype.mulf=function(u){var s=new t(null);return s.words=new Array(this.length+u.length),A(this,u,s)},t.prototype.imul=function(u){return this.clone().mulTo(u,this)},t.prototype.imuln=function(u){d(typeof u=="number"),d(u<67108864);for(var s=0,E=0;E<this.length;E++){var y=(this.words[E]|0)*u,I=(y&67108863)+(s&67108863);s>>=26,s+=y/67108864|0,s+=I>>>26,this.words[E]=I&67108863}return s!==0&&(this.words[E]=s,this.length++),this},t.prototype.muln=function(u){return this.clone().imuln(u)},t.prototype.sqr=function(){return this.mul(this)},t.prototype.isqr=function(){return this.imul(this.clone())},t.prototype.pow=function(u){var s=m(u);if(s.length===0)return new t(1);for(var E=this,y=0;y<s.length&&s[y]===0;y++,E=E.sqr());if(++y<s.length)for(var I=E.sqr();y<s.length;y++,I=I.sqr())s[y]!==0&&(E=E.mul(I));return E},t.prototype.iushln=function(u){d(typeof u=="number"&&u>=0);var s=u%26,E=(u-s)/26,y=67108863>>>26-s<<26-s,I;if(s!==0){var P=0;for(I=0;I<this.length;I++){var O=this.words[I]&y,B=(this.words[I]|0)-O<<s;this.words[I]=B|P,P=O>>>26-s}P&&(this.words[I]=P,this.length++)}if(E!==0){for(I=this.length-1;I>=0;I--)this.words[I+E]=this.words[I];for(I=0;I<E;I++)this.words[I]=0;this.length+=E}return this.strip()},t.prototype.ishln=function(u){return d(this.negative===0),this.iushln(u)},t.prototype.iushrn=function(u,s,E){d(typeof u=="number"&&u>=0);var y;s?y=(s-s%26)/26:y=0;var I=u%26,P=Math.min((u-I)/26,this.length),O=67108863^67108863>>>I<<I,B=E;if(y-=P,y=Math.max(0,y),B){for(var i=0;i<P;i++)B.words[i]=this.words[i];B.length=P}if(P!==0)if(this.length>P)for(this.length-=P,i=0;i<this.length;i++)this.words[i]=this.words[i+P];else this.words[0]=0,this.length=1;var _=0;for(i=this.length-1;i>=0&&(_!==0||i>=y);i--){var H=this.words[i]|0;this.words[i]=_<<26-I|H>>>I,_=H&O}return B&&_!==0&&(B.words[B.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},t.prototype.ishrn=function(u,s,E){return d(this.negative===0),this.iushrn(u,s,E)},t.prototype.shln=function(u){return this.clone().ishln(u)},t.prototype.ushln=function(u){return this.clone().iushln(u)},t.prototype.shrn=function(u){return this.clone().ishrn(u)},t.prototype.ushrn=function(u){return this.clone().iushrn(u)},t.prototype.testn=function(u){d(typeof u=="number"&&u>=0);var s=u%26,E=(u-s)/26,y=1<<s;if(this.length<=E)return!1;var I=this.words[E];return!!(I&y)},t.prototype.imaskn=function(u){d(typeof u=="number"&&u>=0);var s=u%26,E=(u-s)/26;if(d(this.negative===0,"imaskn works only with positive numbers"),this.length<=E)return this;if(s!==0&&E++,this.length=Math.min(E,this.length),s!==0){var y=67108863^67108863>>>s<<s;this.words[this.length-1]&=y}return this.strip()},t.prototype.maskn=function(u){return this.clone().imaskn(u)},t.prototype.iaddn=function(u){return d(typeof u=="number"),d(u<67108864),u<0?this.isubn(-u):this.negative!==0?this.length===1&&(this.words[0]|0)<u?(this.words[0]=u-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(u),this.negative=1,this):this._iaddn(u)},t.prototype._iaddn=function(u){this.words[0]+=u;for(var s=0;s<this.length&&this.words[s]>=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},t.prototype.isubn=function(u){if(d(typeof u=="number"),d(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s<this.length&&this.words[s]<0;s++)this.words[s]+=67108864,this.words[s+1]-=1;return this.strip()},t.prototype.addn=function(u){return this.clone().iaddn(u)},t.prototype.subn=function(u){return this.clone().isubn(u)},t.prototype.iabs=function(){return this.negative=0,this},t.prototype.abs=function(){return this.clone().iabs()},t.prototype._ishlnsubmul=function(u,s,E){var y=u.length+E,I;this._expand(y);var P,O=0;for(I=0;I<u.length;I++){P=(this.words[I+E]|0)+O;var B=(u.words[I]|0)*s;P-=B&67108863,O=(P>>26)-(B/67108864|0),this.words[I+E]=P&67108863}for(;I<this.length-E;I++)P=(this.words[I+E]|0)+O,O=P>>26,this.words[I+E]=P&67108863;if(O===0)return this.strip();for(d(O===-1),O=0,I=0;I<this.length;I++)P=-(this.words[I]|0)+O,O=P>>26,this.words[I]=P&67108863;return this.negative=1,this.strip()},t.prototype._wordDiv=function(u,s){var E=this.length-u.length,y=this.clone(),I=u,P=I.words[I.length-1]|0,O=this._countBits(P);E=26-O,E!==0&&(I=I.ushln(E),y.iushln(E),P=I.words[I.length-1]|0);var B=y.length-I.length,i;if(s!=="mod"){i=new t(null),i.length=B+1,i.words=new Array(i.length);for(var _=0;_<i.length;_++)i.words[_]=0}var H=y.clone()._ishlnsubmul(I,1,B);H.negative===0&&(y=H,i&&(i.words[B]=1));for(var J=B-1;J>=0;J--){var q=(y.words[I.length+J]|0)*67108864+(y.words[I.length+J-1]|0);for(q=Math.min(q/P|0,67108863),y._ishlnsubmul(I,q,J);y.negative!==0;)q--,y.negative=0,y._ishlnsubmul(I,1,J),y.isZero()||(y.negative^=1);i&&(i.words[J]=q)}return i&&i.strip(),y.strip(),s!=="div"&&E!==0&&y.iushrn(E),{div:i||null,mod:y}},t.prototype.divmod=function(u,s,E){if(d(!u.isZero()),this.isZero())return{div:new t(0),mod:new t(0)};var y,I,P;return this.negative!==0&&u.negative===0?(P=this.neg().divmod(u,s),s!=="mod"&&(y=P.div.neg()),s!=="div"&&(I=P.mod.neg(),E&&I.negative!==0&&I.iadd(u)),{div:y,mod:I}):this.negative===0&&u.negative!==0?(P=this.divmod(u.neg(),s),s!=="mod"&&(y=P.div.neg()),{div:y,mod:P.mod}):this.negative&u.negative?(P=this.neg().divmod(u.neg(),s),s!=="div"&&(I=P.mod.neg(),E&&I.negative!==0&&I.isub(u)),{div:P.div,mod:I}):u.length>this.length||this.cmp(u)<0?{div:new t(0),mod:this}:u.length===1?s==="div"?{div:this.divn(u.words[0]),mod:null}:s==="mod"?{div:null,mod:new t(this.modn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new t(this.modn(u.words[0]))}:this._wordDiv(u,s)},t.prototype.div=function(u){return this.divmod(u,"div",!1).div},t.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},t.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},t.prototype.divRound=function(u){var s=this.divmod(u);if(s.mod.isZero())return s.div;var E=s.div.negative!==0?s.mod.isub(u):s.mod,y=u.ushrn(1),I=u.andln(1),P=E.cmp(y);return P<0||I===1&&P===0?s.div:s.div.negative!==0?s.div.isubn(1):s.div.iaddn(1)},t.prototype.modn=function(u){d(u<=67108863);for(var s=(1<<26)%u,E=0,y=this.length-1;y>=0;y--)E=(s*E+(this.words[y]|0))%u;return E},t.prototype.idivn=function(u){d(u<=67108863);for(var s=0,E=this.length-1;E>=0;E--){var y=(this.words[E]|0)+s*67108864;this.words[E]=y/u|0,s=y%u}return this.strip()},t.prototype.divn=function(u){return this.clone().idivn(u)},t.prototype.egcd=function(u){d(u.negative===0),d(!u.isZero());var s=this,E=u.clone();s.negative!==0?s=s.umod(u):s=s.clone();for(var y=new t(1),I=new t(0),P=new t(0),O=new t(1),B=0;s.isEven()&&E.isEven();)s.iushrn(1),E.iushrn(1),++B;for(var i=E.clone(),_=s.clone();!s.isZero();){for(var H=0,J=1;!(s.words[0]&J)&&H<26;++H,J<<=1);if(H>0)for(s.iushrn(H);H-- >0;)(y.isOdd()||I.isOdd())&&(y.iadd(i),I.isub(_)),y.iushrn(1),I.iushrn(1);for(var q=0,M=1;!(E.words[0]&M)&&q<26;++q,M<<=1);if(q>0)for(E.iushrn(q);q-- >0;)(P.isOdd()||O.isOdd())&&(P.iadd(i),O.isub(_)),P.iushrn(1),O.iushrn(1);s.cmp(E)>=0?(s.isub(E),y.isub(P),I.isub(O)):(E.isub(s),P.isub(y),O.isub(I))}return{a:P,b:O,gcd:E.iushln(B)}},t.prototype._invmp=function(u){d(u.negative===0),d(!u.isZero());var s=this,E=u.clone();s.negative!==0?s=s.umod(u):s=s.clone();for(var y=new t(1),I=new t(0),P=E.clone();s.cmpn(1)>0&&E.cmpn(1)>0;){for(var O=0,B=1;!(s.words[0]&B)&&O<26;++O,B<<=1);if(O>0)for(s.iushrn(O);O-- >0;)y.isOdd()&&y.iadd(P),y.iushrn(1);for(var i=0,_=1;!(E.words[0]&_)&&i<26;++i,_<<=1);if(i>0)for(E.iushrn(i);i-- >0;)I.isOdd()&&I.iadd(P),I.iushrn(1);s.cmp(E)>=0?(s.isub(E),y.isub(I)):(E.isub(s),I.isub(y))}var H;return s.cmpn(1)===0?H=y:H=I,H.cmpn(0)<0&&H.iadd(u),H},t.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var s=this.clone(),E=u.clone();s.negative=0,E.negative=0;for(var y=0;s.isEven()&&E.isEven();y++)s.iushrn(1),E.iushrn(1);do{for(;s.isEven();)s.iushrn(1);for(;E.isEven();)E.iushrn(1);var I=s.cmp(E);if(I<0){var P=s;s=E,E=P}else if(I===0||E.cmpn(1)===0)break;s.isub(E)}while(!0);return E.iushln(y)},t.prototype.invm=function(u){return this.egcd(u).a.umod(u)},t.prototype.isEven=function(){return(this.words[0]&1)===0},t.prototype.isOdd=function(){return(this.words[0]&1)===1},t.prototype.andln=function(u){return this.words[0]&u},t.prototype.bincn=function(u){d(typeof u=="number");var s=u%26,E=(u-s)/26,y=1<<s;if(this.length<=E)return this._expand(E+1),this.words[E]|=y,this;for(var I=y,P=E;I!==0&&P<this.length;P++){var O=this.words[P]|0;O+=I,I=O>>>26,O&=67108863,this.words[P]=O}return I!==0&&(this.words[P]=I,this.length++),this},t.prototype.isZero=function(){return this.length===1&&this.words[0]===0},t.prototype.cmpn=function(u){var s=u<0;if(this.negative!==0&&!s)return-1;if(this.negative===0&&s)return 1;this.strip();var E;if(this.length>1)E=1;else{s&&(u=-u),d(u<=67108863,"Number is too big");var y=this.words[0]|0;E=y===u?0:y<u?-1:1}return this.negative!==0?-E|0:E},t.prototype.cmp=function(u){if(this.negative!==0&&u.negative===0)return-1;if(this.negative===0&&u.negative!==0)return 1;var s=this.ucmp(u);return this.negative!==0?-s|0:s},t.prototype.ucmp=function(u){if(this.length>u.length)return 1;if(this.length<u.length)return-1;for(var s=0,E=this.length-1;E>=0;E--){var y=this.words[E]|0,I=u.words[E]|0;if(y!==I){y<I?s=-1:y>I&&(s=1);break}}return s},t.prototype.gtn=function(u){return this.cmpn(u)===1},t.prototype.gt=function(u){return this.cmp(u)===1},t.prototype.gten=function(u){return this.cmpn(u)>=0},t.prototype.gte=function(u){return this.cmp(u)>=0},t.prototype.ltn=function(u){return this.cmpn(u)===-1},t.prototype.lt=function(u){return this.cmp(u)===-1},t.prototype.lten=function(u){return this.cmpn(u)<=0},t.prototype.lte=function(u){return this.cmp(u)<=0},t.prototype.eqn=function(u){return this.cmpn(u)===0},t.prototype.eq=function(u){return this.cmp(u)===0},t.red=function(u){return new L(u)},t.prototype.toRed=function(u){return d(!this.red,"Already a number in reduction context"),d(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},t.prototype.fromRed=function(){return d(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},t.prototype._forceRed=function(u){return this.red=u,this},t.prototype.forceRed=function(u){return d(!this.red,"Already a number in reduction context"),this._forceRed(u)},t.prototype.redAdd=function(u){return d(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},t.prototype.redIAdd=function(u){return d(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},t.prototype.redSub=function(u){return d(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},t.prototype.redISub=function(u){return d(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},t.prototype.redShl=function(u){return d(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},t.prototype.redMul=function(u){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},t.prototype.redIMul=function(u){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},t.prototype.redSqr=function(){return d(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},t.prototype.redISqr=function(){return d(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},t.prototype.redSqrt=function(){return d(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},t.prototype.redInvm=function(){return d(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},t.prototype.redNeg=function(){return d(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},t.prototype.redPow=function(u){return d(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var N={k256:null,p224:null,p192:null,p25519:null};function n(C,u){this.name=C,this.p=new t(u,16),this.n=this.p.bitLength(),this.k=new t(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}n.prototype._tmp=function(){var u=new t(null);return u.words=new Array(Math.ceil(this.n/13)),u},n.prototype.ireduce=function(u){var s=u,E;do this.split(s,this.tmp),s=this.imulK(s),s=s.iadd(this.tmp),E=s.bitLength();while(E>this.n);var y=E<this.n?-1:s.ucmp(this.p);return y===0?(s.words[0]=0,s.length=1):y>0?s.isub(this.p):s.strip!==void 0?s.strip():s._strip(),s},n.prototype.split=function(u,s){u.iushrn(this.n,0,s)},n.prototype.imulK=function(u){return u.imul(this.k)};function h(){n.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(h,n),h.prototype.split=function(u,s){for(var E=4194303,y=Math.min(u.length,9),I=0;I<y;I++)s.words[I]=u.words[I];if(s.length=y,u.length<=9){u.words[0]=0,u.length=1;return}var P=u.words[9];for(s.words[s.length++]=P&E,I=10;I<u.length;I++){var O=u.words[I]|0;u.words[I-10]=(O&E)<<4|P>>>22,P=O}P>>>=22,u.words[I-10]=P,P===0&&u.length>10?u.length-=10:u.length-=9},h.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var s=0,E=0;E<u.length;E++){var y=u.words[E]|0;s+=y*977,u.words[E]=s&67108863,s=y*64+(s/67108864|0)}return u.words[u.length-1]===0&&(u.length--,u.words[u.length-1]===0&&u.length--),u};function v(){n.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}f(v,n);function R(){n.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}f(R,n);function k(){n.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}f(k,n),k.prototype.imulK=function(u){for(var s=0,E=0;E<u.length;E++){var y=(u.words[E]|0)*19+s,I=y&67108863;y>>>=26,u.words[E]=I,s=y}return s!==0&&(u.words[u.length++]=s),u},t._prime=function(u){if(N[u])return N[u];var s;if(u==="k256")s=new h;else if(u==="p224")s=new v;else if(u==="p192")s=new R;else if(u==="p25519")s=new k;else throw new Error("Unknown prime "+u);return N[u]=s,s};function L(C){if(typeof C=="string"){var u=t._prime(C);this.m=u.p,this.prime=u}else d(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}L.prototype._verify1=function(u){d(u.negative===0,"red works only with positives"),d(u.red,"red works only with red numbers")},L.prototype._verify2=function(u,s){d((u.negative|s.negative)===0,"red works only with positives"),d(u.red&&u.red===s.red,"red works only with red numbers")},L.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):u.umod(this.m)._forceRed(this)},L.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},L.prototype.add=function(u,s){this._verify2(u,s);var E=u.add(s);return E.cmp(this.m)>=0&&E.isub(this.m),E._forceRed(this)},L.prototype.iadd=function(u,s){this._verify2(u,s);var E=u.iadd(s);return E.cmp(this.m)>=0&&E.isub(this.m),E},L.prototype.sub=function(u,s){this._verify2(u,s);var E=u.sub(s);return E.cmpn(0)<0&&E.iadd(this.m),E._forceRed(this)},L.prototype.isub=function(u,s){this._verify2(u,s);var E=u.isub(s);return E.cmpn(0)<0&&E.iadd(this.m),E},L.prototype.shl=function(u,s){return this._verify1(u),this.imod(u.ushln(s))},L.prototype.imul=function(u,s){return this._verify2(u,s),this.imod(u.imul(s))},L.prototype.mul=function(u,s){return this._verify2(u,s),this.imod(u.mul(s))},L.prototype.isqr=function(u){return this.imul(u,u.clone())},L.prototype.sqr=function(u){return this.mul(u,u)},L.prototype.sqrt=function(u){if(u.isZero())return u.clone();var s=this.m.andln(3);if(d(s%2===1),s===3){var E=this.m.add(new t(1)).iushrn(2);return this.pow(u,E)}for(var y=this.m.subn(1),I=0;!y.isZero()&&y.andln(1)===0;)I++,y.iushrn(1);d(!y.isZero());var P=new t(1).toRed(this),O=P.redNeg(),B=this.m.subn(1).iushrn(1),i=this.m.bitLength();for(i=new t(2*i*i).toRed(this);this.pow(i,B).cmp(O)!==0;)i.redIAdd(O);for(var _=this.pow(i,y),H=this.pow(u,y.addn(1).iushrn(1)),J=this.pow(u,y),q=I;J.cmp(P)!==0;){for(var M=J,W=0;M.cmp(P)!==0;W++)M=M.redSqr();d(W<q);var K=this.pow(_,new t(1).iushln(q-W-1));H=H.redMul(K),_=K.redSqr(),J=J.redMul(_),q=W}return H},L.prototype.invm=function(u){var s=u._invmp(this.m);return s.negative!==0?(s.negative=0,this.imod(s).redNeg()):this.imod(s)},L.prototype.pow=function(u,s){if(s.isZero())return new t(1).toRed(this);if(s.cmpn(1)===0)return u.clone();var E=4,y=new Array(1<<E);y[0]=new t(1).toRed(this),y[1]=u;for(var I=2;I<y.length;I++)y[I]=this.mul(y[I-1],u);var P=y[0],O=0,B=0,i=s.bitLength()%26;for(i===0&&(i=26),I=s.length-1;I>=0;I--){for(var _=s.words[I],H=i-1;H>=0;H--){var J=_>>H&1;if(P!==y[0]&&(P=this.sqr(P)),J===0&&O===0){B=0;continue}O<<=1,O|=J,B++,!(B!==E&&(I!==0||H!==0))&&(P=this.mul(P,y[O]),B=0,O=0)}i=26}return P},L.prototype.convertTo=function(u){var s=u.umod(this.m);return s===u?s.clone():s},L.prototype.convertFrom=function(u){var s=u.clone();return s.red=null,s},t.mont=function(u){return new z(u)};function z(C){L.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new t(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}f(z,L),z.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},z.prototype.convertFrom=function(u){var s=this.imod(u.mul(this.rinv));return s.red=null,s},z.prototype.imul=function(u,s){if(u.isZero()||s.isZero())return u.words[0]=0,u.length=1,u;var E=u.imul(s),y=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=E.isub(y).iushrn(this.shift),P=I;return I.cmp(this.m)>=0?P=I.isub(this.m):I.cmpn(0)<0&&(P=I.iadd(this.m)),P._forceRed(this)},z.prototype.mul=function(u,s){if(u.isZero()||s.isZero())return new t(0)._forceRed(this);var E=u.mul(s),y=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=E.isub(y).iushrn(this.shift),P=I;return I.cmp(this.m)>=0?P=I.isub(this.m):I.cmpn(0)<0&&(P=I.iadd(this.m)),P._forceRed(this)},z.prototype.invm=function(u){var s=this.imod(u._invmp(this.m).mul(this.r2));return s._forceRed(this)}})(e,b.commonjsGlobal)})(xf);var l6=xf.exports;Object.defineProperty(x6,"__esModule",{value:!0});var R1=l6,$r=b.requireElliptic().ec,lf=new $r("secp256k1"),W2=lf.curve;x6.privateKeyExport=function(e,a){a===void 0&&(a=!0);var c=new R1(e);if(c.ucmp(W2.n)>=0)throw new Error("couldn't export to DER format");var d=lf.g.mul(c);return qt(d.getX(),d.getY(),a)};x6.privateKeyModInverse=function(e){var a=new R1(e);if(a.ucmp(W2.n)>=0||a.isZero())throw new Error("private key range is invalid");return a.invm(W2.n).toArrayLike(b.dist.Buffer,"be",32)};x6.signatureImport=function(e){var a=new R1(e.r);a.ucmp(W2.n)>=0&&(a=new R1(0));var c=new R1(e.s);return c.ucmp(W2.n)>=0&&(c=new R1(0)),b.dist.Buffer.concat([a.toArrayLike(b.dist.Buffer,"be",32),c.toArrayLike(b.dist.Buffer,"be",32)])};x6.ecdhUnsafe=function(e,a,c){c===void 0&&(c=!0);var d=lf.keyFromPublic(e),f=new R1(a);if(f.ucmp(W2.n)>=0||f.isZero())throw new Error("scalar was invalid (zero or overflow)");var t=d.pub.mul(f);return qt(t.getX(),t.getY(),c)};var qt=function(e,a,c){var d;return c?(d=b.dist.Buffer.alloc(33),d[0]=a.isOdd()?3:2,e.toArrayLike(b.dist.Buffer,"be",32).copy(d,1)):(d=b.dist.Buffer.alloc(65),d[0]=4,e.toArrayLike(b.dist.Buffer,"be",32).copy(d,1),a.toArrayLike(b.dist.Buffer,"be",32).copy(d,33)),d},t8={};Object.defineProperty(t8,"__esModule",{value:!0});var jr=b.dist.Buffer.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Hr=b.dist.Buffer.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t8.privateKeyExport=function(e,a,c){c===void 0&&(c=!0);var d=b.dist.Buffer.from(c?jr:Hr);return e.copy(d,c?8:9),a.copy(d,c?181:214),d};t8.privateKeyImport=function(e){var a=e.length,c=0;if(a<c+1||e[c]!==48||(c+=1,a<c+1||!(e[c]&128)))return null;var d=e[c]&127;if(c+=1,d<1||d>2||a<c+d)return null;var f=e[c+d-1]|(d>1?e[c+d-2]<<8:0);return c+=d,a<c+f||a<c+3||e[c]!==2||e[c+1]!==1||e[c+2]!==1||(c+=3,a<c+2||e[c]!==4||e[c+1]>32||a<c+2+e[c+1])?null:e.slice(c+2,c+2+e[c+1])};t8.signatureImportLax=function(e){var a=b.dist.Buffer.alloc(32,0),c=b.dist.Buffer.alloc(32,0),d=e.length,f=0;if(e[f++]!==48)return null;var t=e[f++];if(t&128&&(f+=t-128,f>d)||e[f++]!==2)return null;var r=e[f++];if(r&128){if(t=r-128,f+t>d)return null;for(;t>0&&e[f]===0;f+=1,t-=1);for(r=0;t>0;f+=1,t-=1)r=(r<<8)+e[f]}if(r>d-f)return null;var l=f;if(f+=r,e[f++]!==2)return null;var p=e[f++];if(p&128){if(t=p-128,f+t>d)return null;for(;t>0&&e[f]===0;f+=1,t-=1);for(p=0;t>0;f+=1,t-=1)p=(p<<8)+e[f]}if(p>d-f)return null;var F=f;for(f+=p;r>0&&e[l]===0;r-=1,l+=1);if(r>32)return null;var S=e.slice(l,l+r);for(S.copy(a,32-S.length);p>0&&e[F]===0;p-=1,F+=1);if(p>32)return null;var T=e.slice(F,F+p);return T.copy(c,32-T.length),{r:a,s:c}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ecdhUnsafe=e.ecdh=e.recover=e.verify=e.sign=e.signatureImportLax=e.signatureImport=e.signatureExport=e.signatureNormalize=e.publicKeyCombine=e.publicKeyTweakMul=e.publicKeyTweakAdd=e.publicKeyVerify=e.publicKeyConvert=e.publicKeyCreate=e.privateKeyTweakMul=e.privateKeyTweakAdd=e.privateKeyModInverse=e.privateKeyNegate=e.privateKeyImport=e.privateKeyExport=e.privateKeyVerify=void 0;var a=Jt,c=x6,d=t8;e.privateKeyVerify=function(f){return f.length!==32?!1:a.privateKeyVerify(Uint8Array.from(f))},e.privateKeyExport=function(f,t){if(f.length!==32)throw new RangeError("private key length is invalid");var r=c.privateKeyExport(f,t);return d.privateKeyExport(f,r,t)},e.privateKeyImport=function(f){if(f=d.privateKeyImport(f),f!==null&&f.length===32&&e.privateKeyVerify(f))return f;throw new Error("couldn't import from DER format")},e.privateKeyNegate=function(f){return b.dist.Buffer.from(a.privateKeyNegate(Uint8Array.from(f)))},e.privateKeyModInverse=function(f){if(f.length!==32)throw new Error("private key length is invalid");return b.dist.Buffer.from(c.privateKeyModInverse(Uint8Array.from(f)))},e.privateKeyTweakAdd=function(f,t){return b.dist.Buffer.from(a.privateKeyTweakAdd(Uint8Array.from(f),t))},e.privateKeyTweakMul=function(f,t){return b.dist.Buffer.from(a.privateKeyTweakMul(Uint8Array.from(f),Uint8Array.from(t)))},e.publicKeyCreate=function(f,t){return b.dist.Buffer.from(a.publicKeyCreate(Uint8Array.from(f),t))},e.publicKeyConvert=function(f,t){return b.dist.Buffer.from(a.publicKeyConvert(Uint8Array.from(f),t))},e.publicKeyVerify=function(f){return f.length!==33&&f.length!==65?!1:a.publicKeyVerify(Uint8Array.from(f))},e.publicKeyTweakAdd=function(f,t,r){return b.dist.Buffer.from(a.publicKeyTweakAdd(Uint8Array.from(f),Uint8Array.from(t),r))},e.publicKeyTweakMul=function(f,t,r){return b.dist.Buffer.from(a.publicKeyTweakMul(Uint8Array.from(f),Uint8Array.from(t),r))},e.publicKeyCombine=function(f,t){var r=[];return f.forEach(function(l){r.push(Uint8Array.from(l))}),b.dist.Buffer.from(a.publicKeyCombine(r,t))},e.signatureNormalize=function(f){return b.dist.Buffer.from(a.signatureNormalize(Uint8Array.from(f)))},e.signatureExport=function(f){return b.dist.Buffer.from(a.signatureExport(Uint8Array.from(f)))},e.signatureImport=function(f){return b.dist.Buffer.from(a.signatureImport(Uint8Array.from(f)))},e.signatureImportLax=function(f){if(f.length===0)throw new RangeError("signature length is invalid");var t=d.signatureImportLax(f);if(t===null)throw new Error("couldn't parse DER signature");return c.signatureImport(t)},e.sign=function(f,t,r){if(r===null)throw new TypeError("options should be an Object");var l=void 0;if(r){if(l={},r.data===null)throw new TypeError("options.data should be a Buffer");if(r.data){if(r.data.length!=32)throw new RangeError("options.data length is invalid");l.data=new Uint8Array(r.data)}if(r.noncefn===null)throw new TypeError("options.noncefn should be a Function");r.noncefn&&(l.noncefn=function(F,S,T,w,m){var D=T!=null?b.dist.Buffer.from(T):null,x=w!=null?b.dist.Buffer.from(w):null,o=b.dist.Buffer.from("");return r.noncefn&&(o=r.noncefn(b.dist.Buffer.from(F),b.dist.Buffer.from(S),D,x,m)),new Uint8Array(o)})}var p=a.ecdsaSign(Uint8Array.from(f),Uint8Array.from(t),l);return{signature:b.dist.Buffer.from(p.signature),recovery:p.recid}},e.verify=function(f,t,r){return a.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(f),r)},e.recover=function(f,t,r,l){return b.dist.Buffer.from(a.ecdsaRecover(Uint8Array.from(t),r,Uint8Array.from(f),l))},e.ecdh=function(f,t){return b.dist.Buffer.from(a.ecdh(Uint8Array.from(f),Uint8Array.from(t),{}))},e.ecdhUnsafe=function(f,t,r){if(f.length!==33&&f.length!==65)throw new RangeError("public key length is invalid");if(t.length!==32)throw new RangeError("private key length is invalid");return b.dist.Buffer.from(c.ecdhUnsafe(Uint8Array.from(f),Uint8Array.from(t),r))}})(o9);var Kt=function(a){if(typeof a!="string")throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof a+", while checking isHexPrefixed.");return a.slice(0,2)==="0x"},zr=Kt,Jr=function(a){return typeof a!="string"?a:zr(a)?a.slice(2):a},Wr=Kt,Yt=Jr;function x9(e){var a=e;if(typeof a!="string")throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof a+", while padToEven.");return a.length%2&&(a="0"+a),a}function Vt(e){var a=e.toString(16);return"0x"+a}function qr(e){var a=Vt(e);return new b.dist.Buffer(x9(a.slice(2)),"hex")}function Kr(e){if(typeof e!="string")throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return b.dist.Buffer.byteLength(e,"utf8")}function Yr(e,a,c){if(Array.isArray(e)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(Array.isArray(a)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof a+"'");return a[!!c&&"some"||"every"](function(d){return e.indexOf(d)>=0})}function Vr(e){var a=new b.dist.Buffer(x9(Yt(e).replace(/^0+|0+$/g,"")),"hex");return a.toString("utf8")}function Zr(e){var a="",c=0,d=e.length;for(e.substring(0,2)==="0x"&&(c=2);c<d;c+=2){var f=parseInt(e.substr(c,2),16);a+=String.fromCharCode(f)}return a}function Qr(e){var a=new b.dist.Buffer(e,"utf8");return"0x"+x9(a.toString("hex")).replace(/^0+|0+$/g,"")}function Xr(e){for(var a="",c=0;c<e.length;c++){var d=e.charCodeAt(c),f=d.toString(16);a+=f.length<2?"0"+f:f}return"0x"+a}function ei(e,a,c){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if(typeof a!="string")throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof a+"'.");for(var d=[],f=0;f<e.length;f++){var t=e[f][a];if(c&&!t)t="";else if(typeof t!="string")throw new Error("invalid abi");d.push(t)}return d}function ai(e,a){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||a&&e.length!==2+2*a)}var na={arrayContainsArray:Yr,intToBuffer:qr,getBinarySize:Kr,isHexPrefixed:Wr,stripHexPrefix:Yt,padToEven:x9,intToHex:Vt,fromAscii:Xr,fromUtf8:Qr,toAscii:Zr,toUtf8:Vr,getKeys:ei,isHexString:ai},Zt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=void 0;var a=l6;e.MAX_INTEGER=new a("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new a("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=b.dist.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=b.dist.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=b.dist.Buffer.from(e.KECCAK256_RLP_S,"hex")})(Zt);var Qt={},D6={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.baToJSON=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.stripZeros=e.unpad=e.setLengthRight=e.setLength=e.setLengthLeft=e.zeros=void 0;var a=na,c=l6;e.zeros=function(d){return b.dist.Buffer.allocUnsafe(d).fill(0)},e.setLengthLeft=function(d,f,t){t===void 0&&(t=!1);var r=e.zeros(f);return d=e.toBuffer(d),t?d.length<f?(d.copy(r),r):d.slice(0,f):d.length<f?(d.copy(r,f-d.length),r):d.slice(-f)},e.setLength=e.setLengthLeft,e.setLengthRight=function(d,f){return e.setLength(d,f,!0)},e.unpad=function(d){d=a.stripHexPrefix(d);for(var f=d[0];d.length>0&&f.toString()==="0";)d=d.slice(1),f=d[0];return d},e.stripZeros=e.unpad,e.toBuffer=function(d){if(!b.dist.Buffer.isBuffer(d))if(Array.isArray(d))d=b.dist.Buffer.from(d);else if(typeof d=="string")if(a.isHexString(d))d=b.dist.Buffer.from(a.padToEven(a.stripHexPrefix(d)),"hex");else throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+d);else if(typeof d=="number")d=a.intToBuffer(d);else if(d==null)d=b.dist.Buffer.allocUnsafe(0);else if(c.isBN(d))d=d.toArrayLike(b.dist.Buffer);else if(d.toArray)d=b.dist.Buffer.from(d.toArray());else throw new Error("invalid type");return d},e.bufferToInt=function(d){return new c(e.toBuffer(d)).toNumber()},e.bufferToHex=function(d){return d=e.toBuffer(d),"0x"+d.toString("hex")},e.fromSigned=function(d){return new c(d).fromTwos(256)},e.toUnsigned=function(d){return b.dist.Buffer.from(d.toTwos(256).toArray())},e.addHexPrefix=function(d){return typeof d!="string"||a.isHexPrefixed(d)?d:"0x"+d},e.baToJSON=function(d){if(b.dist.Buffer.isBuffer(d))return"0x"+d.toString("hex");if(d instanceof Array){for(var f=[],t=0;t<d.length;t++)f.push(e.baToJSON(d[t]));return f}}})(D6);var l9={},h6={},Df={};Object.defineProperty(Df,"__esModule",{value:!0});function ci(e){return function(a){var c=e();return c.update(a),b.dist.Buffer.from(c.digest())}}Df.createHashFunction=ci;Object.defineProperty(h6,"__esModule",{value:!0});var D9=Df,h9=b.js;h6.keccak224=D9.createHashFunction(function(){return h9("keccak224")});h6.keccak256=D9.createHashFunction(function(){return h9("keccak256")});h6.keccak384=D9.createHashFunction(function(){return h9("keccak384")});h6.keccak512=D9.createHashFunction(function(){return h9("keccak512")});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160=e.sha256=e.keccak256=e.keccak=void 0;var a=h6,c=a.keccak224,d=a.keccak384,f=a.keccak256,t=a.keccak512,r=b.requireBrowser$1(),l=na,p=b.dist_browser,F=D6;e.keccak=function(S,T){switch(T===void 0&&(T=256),typeof S=="string"&&!l.isHexString(S)?S=b.dist.Buffer.from(S,"utf8"):S=F.toBuffer(S),T||(T=256),T){case 224:return c(S);case 256:return f(S);case 384:return d(S);case 512:return t(S);default:throw new Error("Invald algorithm: keccak"+T)}},e.keccak256=function(S){return e.keccak(S)},e.sha256=function(S){return S=F.toBuffer(S),r("sha256").update(S).digest()},e.ripemd160=function(S,T){S=F.toBuffer(S);var w=r("rmd160").update(S).digest();return T===!0?F.setLength(w,32):w},e.rlphash=function(S){return e.keccak(p.encode(S))}})(l9);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.importPublic=e.privateToPublic=e.privateToAddress=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.isPrecompiled=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isZeroAddress=e.isValidAddress=e.zeroAddress=void 0;var a=b.requireAssert(),c=na,d=o9,f=l6,t=D6,r=l9;e.zeroAddress=function(){var l=20,p=t.zeros(l);return t.bufferToHex(p)},e.isValidAddress=function(l){return/^0x[0-9a-fA-F]{40}$/.test(l)},e.isZeroAddress=function(l){var p=e.zeroAddress();return p===t.addHexPrefix(l)},e.toChecksumAddress=function(l,p){l=c.stripHexPrefix(l).toLowerCase();for(var F=p!==void 0?p.toString()+"0x":"",S=r.keccak(F+l).toString("hex"),T="0x",w=0;w<l.length;w++)parseInt(S[w],16)>=8?T+=l[w].toUpperCase():T+=l[w];return T},e.isValidChecksumAddress=function(l,p){return e.isValidAddress(l)&&e.toChecksumAddress(l,p)===l},e.generateAddress=function(l,p){l=t.toBuffer(l);var F=new f(p);return F.isZero()?r.rlphash([l,null]).slice(-20):r.rlphash([l,b.dist.Buffer.from(F.toArray())]).slice(-20)},e.generateAddress2=function(l,p,F){var S=t.toBuffer(l),T=t.toBuffer(p),w=t.toBuffer(F);a(S.length===20),a(T.length===32);var m=r.keccak256(b.dist.Buffer.concat([b.dist.Buffer.from("ff","hex"),S,T,r.keccak256(w)]));return m.slice(-20)},e.isPrecompiled=function(l){var p=t.unpad(l);return p.length===1&&p[0]>=1&&p[0]<=8},e.isValidPrivate=function(l){return d.privateKeyVerify(l)},e.isValidPublic=function(l,p){return p===void 0&&(p=!1),l.length===64?d.publicKeyVerify(b.dist.Buffer.concat([b.dist.Buffer.from([4]),l])):p?d.publicKeyVerify(l):!1},e.pubToAddress=function(l,p){return p===void 0&&(p=!1),l=t.toBuffer(l),p&&l.length!==64&&(l=d.publicKeyConvert(l,!1).slice(1)),a(l.length===64),r.keccak(l).slice(-20)},e.publicToAddress=e.pubToAddress,e.privateToAddress=function(l){return e.publicToAddress(e.privateToPublic(l))},e.privateToPublic=function(l){return l=t.toBuffer(l),d.publicKeyCreate(l,!1).slice(1)},e.importPublic=function(l){return l=t.toBuffer(l),l.length!==64&&(l=d.publicKeyConvert(l,!1).slice(1)),l}})(Qt);var ve={};Object.defineProperty(ve,"__esModule",{value:!0});ve.hashPersonalMessage=ve.isValidSignature=ve.fromRpcSig=ve.toRpcSig=ve.ecrecover=ve.ecsign=void 0;var od=o9,A8=l6,G1=D6,di=l9;ve.ecsign=function(e,a,c){var d=od.sign(e,a),f=d.recovery,t={r:d.signature.slice(0,32),s:d.signature.slice(32,64),v:c?f+(c*2+35):f+27};return t};ve.ecrecover=function(e,a,c,d,f){var t=b.dist.Buffer.concat([G1.setLength(c,32),G1.setLength(d,32)],64),r=hf(a,f);if(!mf(r))throw new Error("Invalid signature v value");var l=od.recover(e,t,r);return od.publicKeyConvert(l,!1).slice(1)};ve.toRpcSig=function(e,a,c,d){var f=hf(e,d);if(!mf(f))throw new Error("Invalid signature v value");return G1.bufferToHex(b.dist.Buffer.concat([G1.setLengthLeft(a,32),G1.setLengthLeft(c,32),G1.toBuffer(e)]))};ve.fromRpcSig=function(e){var a=G1.toBuffer(e);if(a.length!==65)throw new Error("Invalid signature length");var c=a[64];return c<27&&(c+=27),{v:c,r:a.slice(0,32),s:a.slice(32,64)}};ve.isValidSignature=function(e,a,c,d,f){d===void 0&&(d=!0);var t=new A8("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),r=new A8("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(a.length!==32||c.length!==32||!mf(hf(e,f)))return!1;var l=new A8(a),p=new A8(c);return!(l.isZero()||l.gt(r)||p.isZero()||p.gt(r)||d&&p.cmp(t)===1)};ve.hashPersonalMessage=function(e){var a=b.dist.Buffer.from(`Ethereum Signed Message:
@@ -1,9 +1,9 @@
1
1
  var kr = Object.defineProperty;
2
2
  var Ur = (e, a, c) => a in e ? kr(e, a, { enumerable: !0, configurable: !0, writable: !0, value: c }) : e[a] = c;
3
3
  var Ce = (e, a, c) => (Ur(e, typeof a != "symbol" ? a + "" : a, c), c);
4
- import { p as tb, g as bb, q as G, r as x8, s as vf, t as Cf, u as ub, v as a9, w as m6, d as T, x as nb, y as E6, z as E9, A as Rr, D as wf, E as m1, F as Lr, G as Bf, H as If, I as rb, J as $r, W as Gr, K as Hr, c as z8, f as xc, B as jr, L as zr, M as sc, O as Jr, P as q4, _ as N, Q as R, R as Z1, S as Wr, T as qr, U as Kr, V as Yr, X as Vr, Y as Zr, Z as Qr, $ as Xr, a0 as ei, a1 as ib, a2 as ai, a3 as ci, a4 as ob, a5 as di, a6 as fi, a7 as ti, o as lc, a8 as bi } from "./index-V79r3Hop.mjs";
5
- import { s as ui, h as ni, u as ri } from "./index-OP4jJbqa.mjs";
6
- import { r as ii } from "./libsodium-wrappers-O5eUBP2B.mjs";
4
+ import { p as tb, g as bb, q as G, r as x8, s as vf, t as Cf, u as ub, v as a9, w as m6, d as T, x as nb, y as E6, z as E9, A as Rr, D as wf, E as m1, F as Lr, G as Bf, H as If, I as rb, J as $r, W as Gr, K as Hr, c as z8, f as xc, B as jr, L as zr, M as sc, O as Jr, P as q4, _ as N, Q as R, R as Z1, S as Wr, T as qr, U as Kr, V as Yr, X as Vr, Y as Zr, Z as Qr, $ as Xr, a0 as ei, a1 as ib, a2 as ai, a3 as ci, a4 as ob, a5 as di, a6 as fi, a7 as ti, o as lc, a8 as bi } from "./index-oliZI3Bw.mjs";
5
+ import { s as ui, h as ni, u as ri } from "./index-MoMbeAKz.mjs";
6
+ import { r as ii } from "./libsodium-wrappers-t-G4VebW.mjs";
7
7
  import "react";
8
8
  import "react-dom";
9
9
  var V2 = function() {