@dodoex/wallet-web3 0.0.39 → 0.0.40-2

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 (140) hide show
  1. package/dist/{DefaultJsonRpcProvider-b209b363.js → DefaultJsonRpcProvider-364a16a2.js} +1 -1
  2. package/dist/__node-resolve_empty-483b15e9.js +1 -0
  3. package/dist/__tslib-52669014.js +1 -0
  4. package/dist/alchemy-provider-5870b6fa-8fbacf61.js +1 -0
  5. package/dist/alchemy-websocket-provider-213da986-0121b03d.js +1 -0
  6. package/dist/{blocto-f6a840d9.js → blocto-34243ed4.js} +1 -1
  7. package/dist/bn-b7624e9d.js +1 -0
  8. package/dist/{browser-ponyfill-de0251b8.js → browser-ponyfill-3b79f0e4.js} +1 -1
  9. package/dist/ccip-016a1f59.js +1 -0
  10. package/dist/cjs/{DefaultJsonRpcProvider-8bce2192.cjs → DefaultJsonRpcProvider-a94708b3.cjs} +1 -1
  11. package/dist/cjs/{__node-resolve_empty-512c4419.cjs → __node-resolve_empty-26284176.cjs} +1 -1
  12. package/dist/cjs/__tslib-25766973.cjs +1 -0
  13. package/dist/cjs/alchemy-provider-5870b6fa-b4296005.cjs +1 -0
  14. package/dist/cjs/alchemy-websocket-provider-213da986-a6830135.cjs +1 -0
  15. package/dist/cjs/{blocto-0f866f66.cjs → blocto-1d0d2893.cjs} +1 -1
  16. package/dist/cjs/bn-f89c8fd2.cjs +1 -0
  17. package/dist/cjs/{browser-ponyfill-964e208d.cjs → browser-ponyfill-d62ef4bf.cjs} +1 -1
  18. package/dist/cjs/ccip-b4e734fd.cjs +1 -0
  19. package/dist/cjs/core/index.d.ts +2 -2
  20. package/dist/cjs/{draggabilly-11e9f17d.cjs → draggabilly-57e73b82.cjs} +1 -1
  21. package/dist/cjs/ethers-772b1cf3.cjs +1 -0
  22. package/dist/cjs/id-80cf99a8.cjs +1 -0
  23. package/dist/cjs/{index-eb09e54d.cjs → index-35edc6a0.cjs} +1 -1
  24. package/dist/cjs/{index-36bffd07.cjs → index-3b1c3d83.cjs} +1 -1
  25. package/dist/cjs/{index-17a2671d.cjs → index-3ec270bc.cjs} +1 -1
  26. package/dist/cjs/{index-f115b378.cjs → index-4925f240.cjs} +1 -1
  27. package/dist/cjs/index-495da4ae.cjs +1 -0
  28. package/dist/cjs/index-88f00c83.cjs +1 -0
  29. package/dist/cjs/{index-df8e5839.cjs → index-9f2a69d5.cjs} +1 -1
  30. package/dist/cjs/index-a5d1fc7d.cjs +1 -0
  31. package/dist/cjs/index-a5ded8c9.cjs +6 -0
  32. package/dist/cjs/index-a60557e5.cjs +20 -0
  33. package/dist/cjs/{index-35469e5f.cjs → index-a61f4ed4.cjs} +1 -1
  34. package/dist/cjs/{index-7d1c28e2.cjs → index-ba947a0e.cjs} +3 -3
  35. package/dist/cjs/index-dd3eb942.cjs +1 -0
  36. package/dist/cjs/index-ddb7482e.cjs +15 -0
  37. package/dist/cjs/index-e373c760.cjs +1 -0
  38. package/dist/cjs/index-f56317c4.cjs +9 -0
  39. package/dist/cjs/index.cjs +1 -1
  40. package/dist/cjs/{index.es-1119fc19.cjs → index.es-6457f876.cjs} +2 -2
  41. package/dist/cjs/{interface-2f383f06.cjs → interface-a86a59a0.cjs} +1 -1
  42. package/dist/cjs/{lib-typedarrays-1565c568.cjs → lib-typedarrays-73f7411c.cjs} +1 -1
  43. package/dist/cjs/{portis-8b65b135.cjs → portis-ccffc275.cjs} +1 -1
  44. package/dist/cjs/{provider-3dff174b.cjs → provider-62b688fe.cjs} +1 -1
  45. package/dist/cjs/providers/connector/alchemy/index.d.ts +135 -0
  46. package/dist/cjs/providers/connector/alchemy/provider.d.ts +140 -0
  47. package/dist/cjs/providers/connector/alchemy/signer.d.ts +23 -0
  48. package/dist/cjs/providers/connector/index.d.ts +175 -43
  49. package/dist/cjs/providers/connector/injected.d.ts +1 -1
  50. package/dist/cjs/providers/connector/ledgerUSB/index.d.ts +43 -43
  51. package/dist/cjs/providers/connector/ledgerUSB/provider.d.ts +10 -10
  52. package/dist/cjs/providers/connector/types.d.ts +7 -0
  53. package/dist/cjs/providers/connector/uniPass/index.d.ts +43 -43
  54. package/dist/cjs/providers/connector/uniPass/provider.d.ts +10 -10
  55. package/dist/cjs/providers/wallets/index.d.ts +7 -2
  56. package/dist/cjs/providers/wallets/standalone.d.ts +1 -0
  57. package/dist/cjs/providers/wallets/types.d.ts +2 -0
  58. package/dist/cjs/{rainbow-ee1956f4.cjs → rainbow-d4b2160c.cjs} +1 -1
  59. package/dist/cjs/{sha224-41fccb8d.cjs → sha224-59d7c2f4.cjs} +1 -1
  60. package/dist/cjs/{sha256-7bc023ad.cjs → sha256-583ac6ee.cjs} +1 -1
  61. package/dist/cjs/state.d.ts +2 -2
  62. package/dist/cjs/uAuth-e3b2e493.cjs +1 -0
  63. package/dist/cjs/walletConnect-d7cad7d8.cjs +1 -0
  64. package/dist/cjs/walletLink-84b36969.cjs +3 -0
  65. package/dist/core/index.d.ts +2 -2
  66. package/dist/{draggabilly-0f337a89.js → draggabilly-d415e35d.js} +1 -1
  67. package/dist/ethers-1ae3e4fa.js +1 -0
  68. package/dist/id-6feb8a9a.js +1 -0
  69. package/dist/index-1c4edfc7.js +1 -0
  70. package/dist/{index-0491993b.js → index-24cfd57b.js} +1 -1
  71. package/dist/index-33028157.js +9 -0
  72. package/dist/index-4bb05276.js +1 -0
  73. package/dist/index-515f54ab.js +20 -0
  74. package/dist/index-5b79ce49.js +1 -0
  75. package/dist/{index-0ee5ef8d.js → index-65d96278.js} +1 -1
  76. package/dist/index-846c4ffa.js +6 -0
  77. package/dist/{index-785b4226.js → index-85ba09c2.js} +1 -1
  78. package/dist/index-8bd78414.js +1 -0
  79. package/dist/index-9f927876.js +1 -0
  80. package/dist/{index-7fa6d592.js → index-b271e5c1.js} +1 -1
  81. package/dist/index-bf6567c3.js +1 -0
  82. package/dist/index-ca6d18a2.js +15 -0
  83. package/dist/{index-cf6a4f06.js → index-ee62f708.js} +3 -3
  84. package/dist/{index-e0d3617a.js → index-f08d6a6b.js} +1 -1
  85. package/dist/{index.es-f7c42091.js → index.es-aded1b18.js} +2 -2
  86. package/dist/index.js +1 -1
  87. package/dist/{interface-ef19e104.js → interface-1e8541e5.js} +1 -1
  88. package/dist/{lib-typedarrays-b72096b8.js → lib-typedarrays-633d9f0c.js} +1 -1
  89. package/dist/{portis-51d1903b.js → portis-9a642930.js} +1 -1
  90. package/dist/{provider-969f9173.js → provider-f66474d9.js} +1 -1
  91. package/dist/providers/connector/alchemy/index.d.ts +135 -0
  92. package/dist/providers/connector/alchemy/provider.d.ts +140 -0
  93. package/dist/providers/connector/alchemy/signer.d.ts +23 -0
  94. package/dist/providers/connector/index.d.ts +175 -43
  95. package/dist/providers/connector/injected.d.ts +1 -1
  96. package/dist/providers/connector/ledgerUSB/index.d.ts +43 -43
  97. package/dist/providers/connector/ledgerUSB/provider.d.ts +10 -10
  98. package/dist/providers/connector/types.d.ts +7 -0
  99. package/dist/providers/connector/uniPass/index.d.ts +43 -43
  100. package/dist/providers/connector/uniPass/provider.d.ts +10 -10
  101. package/dist/providers/wallets/index.d.ts +7 -2
  102. package/dist/providers/wallets/standalone.d.ts +1 -0
  103. package/dist/providers/wallets/types.d.ts +2 -0
  104. package/dist/{rainbow-aae28da7.js → rainbow-ee8fcc0b.js} +1 -1
  105. package/dist/sha224-4e5611c9.js +1 -0
  106. package/dist/{sha256-89f79242.js → sha256-6dd71d49.js} +1 -1
  107. package/dist/state.d.ts +2 -2
  108. package/dist/uAuth-15130e34.js +1 -0
  109. package/dist/walletConnect-7bb7a1f1.js +1 -0
  110. package/dist/walletLink-15c06b7d.js +3 -0
  111. package/package.json +11 -3
  112. package/dist/__node-resolve_empty-31cae3c6.js +0 -1
  113. package/dist/__tslib-496bf518.js +0 -1
  114. package/dist/bn-614f43b4.js +0 -1
  115. package/dist/cjs/__tslib-d36f90b8.cjs +0 -1
  116. package/dist/cjs/bn-80019716.cjs +0 -1
  117. package/dist/cjs/ethers-8354b904.cjs +0 -1
  118. package/dist/cjs/id-d616b7a6.cjs +0 -1
  119. package/dist/cjs/index-190d3dfb.cjs +0 -9
  120. package/dist/cjs/index-208e8946.cjs +0 -15
  121. package/dist/cjs/index-314e9aa1.cjs +0 -1
  122. package/dist/cjs/index-67cf6ec5.cjs +0 -6
  123. package/dist/cjs/index-680e18da.cjs +0 -1
  124. package/dist/cjs/index-be49928f.cjs +0 -1
  125. package/dist/cjs/uAuth-f82d1aa2.cjs +0 -1
  126. package/dist/cjs/walletConnect-59874229.cjs +0 -1
  127. package/dist/cjs/walletLink-4cde6df3.cjs +0 -3
  128. package/dist/ethers-b02dada4.js +0 -1
  129. package/dist/id-cbf6d6f2.js +0 -1
  130. package/dist/index-193069ba.js +0 -1
  131. package/dist/index-2cc3faed.js +0 -9
  132. package/dist/index-395e6cb2.js +0 -1
  133. package/dist/index-7f7582b3.js +0 -1
  134. package/dist/index-85889592.js +0 -6
  135. package/dist/index-958d0aaf.js +0 -1
  136. package/dist/index-d4c91343.js +0 -15
  137. package/dist/sha224-8a16ee3c.js +0 -1
  138. package/dist/uAuth-b9fd2df4.js +0 -1
  139. package/dist/walletConnect-b1282bf6.js +0 -1
  140. package/dist/walletLink-9008e85f.js +0 -3
@@ -0,0 +1 @@
1
+ "use strict";var t=require("./index-f56317c4.cjs"),i=require("./__node-resolve_empty-26284176.cjs"),r={exports:{}};!function(t,r){function h(t,i){if(!t)throw new Error(i||"Assertion failed")}function n(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function e(t,i,r){if(e.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==i&&"be"!==i||(r=i,i=10),this._init(t||0,i||10,r||"be"))}var o;"object"==typeof t?t.exports=e:r.BN=e,e.BN=e,e.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i.require$$1.Buffer}catch(t){}function s(t,i){var r=t.charCodeAt(i);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void h(!1,"Invalid character in "+t)}function u(t,i,r){var h=s(t,r);return r-1>=i&&(h|=s(t,r-1)<<4),h}function l(t,i,r,n){for(var e=0,o=0,s=Math.min(t.length,r),u=i;u<s;u++){var l=t.charCodeAt(u)-48;e*=n,o=l>=49?l-49+10:l>=17?l-17+10:l,h(l>=0&&o<n,"Invalid character"),e+=o}return e}function a(t,i){t.words=i.words,t.length=i.length,t.negative=i.negative,t.red=i.red}if(e.isBN=function(t){return t instanceof e||null!==t&&"object"==typeof t&&t.constructor.wordSize===e.wordSize&&Array.isArray(t.words)},e.max=function(t,i){return t.cmp(i)>0?t:i},e.min=function(t,i){return t.cmp(i)<0?t:i},e.prototype._init=function(t,i,r){if("number"==typeof t)return this._initNumber(t,i,r);if("object"==typeof t)return this._initArray(t,i,r);"hex"===i&&(i=16),h(i===(0|i)&&i>=2&&i<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===i?this._parseHex(t,n,r):(this._parseBase(t,i,n),"le"===r&&this._initArray(this.toArray(),i,r)))},e.prototype._initNumber=function(t,i,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(h(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),i,r)},e.prototype._initArray=function(t,i,r){if(h("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var e,o,s=0;if("be"===r)for(n=t.length-1,e=0;n>=0;n-=3)o=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);else if("le"===r)for(n=0,e=0;n<t.length;n+=3)o=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);return this._strip()},e.prototype._parseHex=function(t,i,r){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var h=0;h<this.length;h++)this.words[h]=0;var n,e=0,o=0;if("be"===r)for(h=t.length-1;h>=i;h-=2)n=u(t,i,h)<<e,this.words[o]|=67108863&n,e>=18?(e-=18,o+=1,this.words[o]|=n>>>26):e+=8;else for(h=(t.length-i)%2==0?i+1:i;h<t.length;h+=2)n=u(t,i,h)<<e,this.words[o]|=67108863&n,e>=18?(e-=18,o+=1,this.words[o]|=n>>>26):e+=8;this._strip()},e.prototype._parseBase=function(t,i,r){this.words=[0],this.length=1;for(var h=0,n=1;n<=67108863;n*=i)h++;h--,n=n/i|0;for(var e=t.length-r,o=e%h,s=Math.min(e,e-o)+r,u=0,a=r;a<s;a+=h)u=l(t,a,a+h,i),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var m=1;for(u=l(t,a,t.length,i),a=0;a<o;a++)m*=i;this.imuln(m),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},e.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},e.prototype._move=function(t){a(t,this)},e.prototype.clone=function(){var t=new e(null);return this.copy(t),t},e.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},e.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},e.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{e.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch(t){e.prototype.inspect=m}else e.prototype.inspect=m;function m(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","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"],d=[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],p=[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];function M(t,i,r){r.negative=i.negative^t.negative;var h=t.length+i.length|0;r.length=h,h=h-1|0;var n=0|t.words[0],e=0|i.words[0],o=n*e,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var l=1;l<h;l++){for(var a=u>>>26,m=67108863&u,f=Math.min(l,i.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;a+=(o=(n=0|t.words[p])*(e=0|i.words[d])+m)/67108864|0,m=67108863&o}r.words[l]=0|m,u=0|a}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}e.prototype.toString=function(t,i){var r;if(i=0|i||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,e=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<n|e)).toString(16);e=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==e||o!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==e&&(r=e.toString(16)+r);r.length%i!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=d[t],a=p[t];r="";var m=this.clone();for(m.negative=0;!m.isZero();){var M=m.modrn(a).toString(t);r=(m=m.idivn(a)).isZero()?M+r:f[l-M.length]+M+r}for(this.isZero()&&(r="0"+r);r.length%i!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}h(!1,"Base should be between 2 and 36")},e.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},e.prototype.toJSON=function(){return this.toString(16,2)},o&&(e.prototype.toBuffer=function(t,i){return this.toArrayLike(o,t,i)}),e.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},e.prototype.toArrayLike=function(t,i,r){this._strip();var n=this.byteLength(),e=r||Math.max(1,n);h(n<=e,"byte array longer than desired length"),h(e>0,"Requested array length <= 0");var o=function(t,i){return t.allocUnsafe?t.allocUnsafe(i):new t(i)}(t,e);return this["_toArrayLike"+("le"===i?"LE":"BE")](o,n),o},e.prototype._toArrayLikeLE=function(t,i){for(var r=0,h=0,n=0,e=0;n<this.length;n++){var o=this.words[n]<<e|h;t[r++]=255&o,r<t.length&&(t[r++]=o>>8&255),r<t.length&&(t[r++]=o>>16&255),6===e?(r<t.length&&(t[r++]=o>>24&255),h=0,e=0):(h=o>>>24,e+=2)}if(r<t.length)for(t[r++]=h;r<t.length;)t[r++]=0},e.prototype._toArrayLikeBE=function(t,i){for(var r=t.length-1,h=0,n=0,e=0;n<this.length;n++){var o=this.words[n]<<e|h;t[r--]=255&o,r>=0&&(t[r--]=o>>8&255),r>=0&&(t[r--]=o>>16&255),6===e?(r>=0&&(t[r--]=o>>24&255),h=0,e=0):(h=o>>>24,e+=2)}if(r>=0)for(t[r--]=h;r>=0;)t[r--]=0},Math.clz32?e.prototype._countBits=function(t){return 32-Math.clz32(t)}:e.prototype._countBits=function(t){var i=t,r=0;return i>=4096&&(r+=13,i>>>=13),i>=64&&(r+=7,i>>>=7),i>=8&&(r+=4,i>>>=4),i>=2&&(r+=2,i>>>=2),r+i},e.prototype._zeroBits=function(t){if(0===t)return 26;var i=t,r=0;return 0==(8191&i)&&(r+=13,i>>>=13),0==(127&i)&&(r+=7,i>>>=7),0==(15&i)&&(r+=4,i>>>=4),0==(3&i)&&(r+=2,i>>>=2),0==(1&i)&&r++,r},e.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return 26*(this.length-1)+i},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var r=this._zeroBits(this.words[i]);if(t+=r,26!==r)break}return t},e.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},e.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},e.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},e.prototype.isNeg=function(){return 0!==this.negative},e.prototype.neg=function(){return this.clone().ineg()},e.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},e.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this._strip()},e.prototype.ior=function(t){return h(0==(this.negative|t.negative)),this.iuor(t)},e.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},e.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},e.prototype.iuand=function(t){var i;i=this.length>t.length?t:this;for(var r=0;r<i.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=i.length,this._strip()},e.prototype.iand=function(t){return h(0==(this.negative|t.negative)),this.iuand(t)},e.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},e.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},e.prototype.iuxor=function(t){var i,r;this.length>t.length?(i=this,r=t):(i=t,r=this);for(var h=0;h<r.length;h++)this.words[h]=i.words[h]^r.words[h];if(this!==i)for(;h<i.length;h++)this.words[h]=i.words[h];return this.length=i.length,this._strip()},e.prototype.ixor=function(t){return h(0==(this.negative|t.negative)),this.iuxor(t)},e.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},e.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},e.prototype.inotn=function(t){h("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),r=t%26;this._expand(i),r>0&&i--;for(var n=0;n<i;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},e.prototype.notn=function(t){return this.clone().inotn(t)},e.prototype.setn=function(t,i){h("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=i?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},e.prototype.iadd=function(t){var i,r,h;if(0!==this.negative&&0===t.negative)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();this.length>t.length?(r=this,h=t):(r=t,h=this);for(var n=0,e=0;e<h.length;e++)i=(0|r.words[e])+(0|h.words[e])+n,this.words[e]=67108863&i,n=i>>>26;for(;0!==n&&e<r.length;e++)i=(0|r.words[e])+n,this.words[e]=67108863&i,n=i>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;e<r.length;e++)this.words[e]=r.words[e];return this},e.prototype.add=function(t){var i;return 0!==t.negative&&0===this.negative?(t.negative=0,i=this.sub(t),t.negative^=1,i):0===t.negative&&0!==this.negative?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},e.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,h,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,h=t):(r=t,h=this);for(var e=0,o=0;o<h.length;o++)e=(i=(0|r.words[o])-(0|h.words[o])+e)>>26,this.words[o]=67108863&i;for(;0!==e&&o<r.length;o++)e=(i=(0|r.words[o])+e)>>26,this.words[o]=67108863&i;if(0===e&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},e.prototype.sub=function(t){return this.clone().isub(t)};var v=function(t,i,r){var h,n,e,o=t.words,s=i.words,u=r.words,l=0,a=0|o[0],m=8191&a,f=a>>>13,d=0|o[1],p=8191&d,M=d>>>13,v=0|o[2],g=8191&v,c=v>>>13,w=0|o[3],y=8191&w,b=w>>>13,_=0|o[4],k=8191&_,A=_>>>13,x=0|o[5],S=8191&x,q=x>>>13,Z=0|o[6],B=8191&Z,R=Z>>>13,N=0|o[7],L=8191&N,E=N>>>13,I=0|o[8],z=8191&I,O=I>>>13,T=0|o[9],j=8191&T,K=T>>>13,F=0|s[0],U=8191&F,C=F>>>13,D=0|s[1],H=8191&D,P=D>>>13,$=0|s[2],G=8191&$,J=$>>>13,Q=0|s[3],V=8191&Q,W=Q>>>13,X=0|s[4],Y=8191&X,tt=X>>>13,it=0|s[5],rt=8191&it,ht=it>>>13,nt=0|s[6],et=8191&nt,ot=nt>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,at=0|s[8],mt=8191&at,ft=at>>>13,dt=0|s[9],pt=8191&dt,Mt=dt>>>13;r.negative=t.negative^i.negative,r.length=19;var vt=(l+(h=Math.imul(m,U))|0)+((8191&(n=(n=Math.imul(m,C))+Math.imul(f,U)|0))<<13)|0;l=((e=Math.imul(f,C))+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,h=Math.imul(p,U),n=(n=Math.imul(p,C))+Math.imul(M,U)|0,e=Math.imul(M,C);var gt=(l+(h=h+Math.imul(m,H)|0)|0)+((8191&(n=(n=n+Math.imul(m,P)|0)+Math.imul(f,H)|0))<<13)|0;l=((e=e+Math.imul(f,P)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,h=Math.imul(g,U),n=(n=Math.imul(g,C))+Math.imul(c,U)|0,e=Math.imul(c,C),h=h+Math.imul(p,H)|0,n=(n=n+Math.imul(p,P)|0)+Math.imul(M,H)|0,e=e+Math.imul(M,P)|0;var ct=(l+(h=h+Math.imul(m,G)|0)|0)+((8191&(n=(n=n+Math.imul(m,J)|0)+Math.imul(f,G)|0))<<13)|0;l=((e=e+Math.imul(f,J)|0)+(n>>>13)|0)+(ct>>>26)|0,ct&=67108863,h=Math.imul(y,U),n=(n=Math.imul(y,C))+Math.imul(b,U)|0,e=Math.imul(b,C),h=h+Math.imul(g,H)|0,n=(n=n+Math.imul(g,P)|0)+Math.imul(c,H)|0,e=e+Math.imul(c,P)|0,h=h+Math.imul(p,G)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(M,G)|0,e=e+Math.imul(M,J)|0;var wt=(l+(h=h+Math.imul(m,V)|0)|0)+((8191&(n=(n=n+Math.imul(m,W)|0)+Math.imul(f,V)|0))<<13)|0;l=((e=e+Math.imul(f,W)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,h=Math.imul(k,U),n=(n=Math.imul(k,C))+Math.imul(A,U)|0,e=Math.imul(A,C),h=h+Math.imul(y,H)|0,n=(n=n+Math.imul(y,P)|0)+Math.imul(b,H)|0,e=e+Math.imul(b,P)|0,h=h+Math.imul(g,G)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(c,G)|0,e=e+Math.imul(c,J)|0,h=h+Math.imul(p,V)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(M,V)|0,e=e+Math.imul(M,W)|0;var yt=(l+(h=h+Math.imul(m,Y)|0)|0)+((8191&(n=(n=n+Math.imul(m,tt)|0)+Math.imul(f,Y)|0))<<13)|0;l=((e=e+Math.imul(f,tt)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,h=Math.imul(S,U),n=(n=Math.imul(S,C))+Math.imul(q,U)|0,e=Math.imul(q,C),h=h+Math.imul(k,H)|0,n=(n=n+Math.imul(k,P)|0)+Math.imul(A,H)|0,e=e+Math.imul(A,P)|0,h=h+Math.imul(y,G)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(b,G)|0,e=e+Math.imul(b,J)|0,h=h+Math.imul(g,V)|0,n=(n=n+Math.imul(g,W)|0)+Math.imul(c,V)|0,e=e+Math.imul(c,W)|0,h=h+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(M,Y)|0,e=e+Math.imul(M,tt)|0;var bt=(l+(h=h+Math.imul(m,rt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ht)|0)+Math.imul(f,rt)|0))<<13)|0;l=((e=e+Math.imul(f,ht)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,h=Math.imul(B,U),n=(n=Math.imul(B,C))+Math.imul(R,U)|0,e=Math.imul(R,C),h=h+Math.imul(S,H)|0,n=(n=n+Math.imul(S,P)|0)+Math.imul(q,H)|0,e=e+Math.imul(q,P)|0,h=h+Math.imul(k,G)|0,n=(n=n+Math.imul(k,J)|0)+Math.imul(A,G)|0,e=e+Math.imul(A,J)|0,h=h+Math.imul(y,V)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(b,V)|0,e=e+Math.imul(b,W)|0,h=h+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(c,Y)|0,e=e+Math.imul(c,tt)|0,h=h+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(M,rt)|0,e=e+Math.imul(M,ht)|0;var _t=(l+(h=h+Math.imul(m,et)|0)|0)+((8191&(n=(n=n+Math.imul(m,ot)|0)+Math.imul(f,et)|0))<<13)|0;l=((e=e+Math.imul(f,ot)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(L,U),n=(n=Math.imul(L,C))+Math.imul(E,U)|0,e=Math.imul(E,C),h=h+Math.imul(B,H)|0,n=(n=n+Math.imul(B,P)|0)+Math.imul(R,H)|0,e=e+Math.imul(R,P)|0,h=h+Math.imul(S,G)|0,n=(n=n+Math.imul(S,J)|0)+Math.imul(q,G)|0,e=e+Math.imul(q,J)|0,h=h+Math.imul(k,V)|0,n=(n=n+Math.imul(k,W)|0)+Math.imul(A,V)|0,e=e+Math.imul(A,W)|0,h=h+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,Y)|0,e=e+Math.imul(b,tt)|0,h=h+Math.imul(g,rt)|0,n=(n=n+Math.imul(g,ht)|0)+Math.imul(c,rt)|0,e=e+Math.imul(c,ht)|0,h=h+Math.imul(p,et)|0,n=(n=n+Math.imul(p,ot)|0)+Math.imul(M,et)|0,e=e+Math.imul(M,ot)|0;var kt=(l+(h=h+Math.imul(m,ut)|0)|0)+((8191&(n=(n=n+Math.imul(m,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((e=e+Math.imul(f,lt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,h=Math.imul(z,U),n=(n=Math.imul(z,C))+Math.imul(O,U)|0,e=Math.imul(O,C),h=h+Math.imul(L,H)|0,n=(n=n+Math.imul(L,P)|0)+Math.imul(E,H)|0,e=e+Math.imul(E,P)|0,h=h+Math.imul(B,G)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(R,G)|0,e=e+Math.imul(R,J)|0,h=h+Math.imul(S,V)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(q,V)|0,e=e+Math.imul(q,W)|0,h=h+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(A,Y)|0,e=e+Math.imul(A,tt)|0,h=h+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,ht)|0)+Math.imul(b,rt)|0,e=e+Math.imul(b,ht)|0,h=h+Math.imul(g,et)|0,n=(n=n+Math.imul(g,ot)|0)+Math.imul(c,et)|0,e=e+Math.imul(c,ot)|0,h=h+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(M,ut)|0,e=e+Math.imul(M,lt)|0;var At=(l+(h=h+Math.imul(m,mt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ft)|0)+Math.imul(f,mt)|0))<<13)|0;l=((e=e+Math.imul(f,ft)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,h=Math.imul(j,U),n=(n=Math.imul(j,C))+Math.imul(K,U)|0,e=Math.imul(K,C),h=h+Math.imul(z,H)|0,n=(n=n+Math.imul(z,P)|0)+Math.imul(O,H)|0,e=e+Math.imul(O,P)|0,h=h+Math.imul(L,G)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(E,G)|0,e=e+Math.imul(E,J)|0,h=h+Math.imul(B,V)|0,n=(n=n+Math.imul(B,W)|0)+Math.imul(R,V)|0,e=e+Math.imul(R,W)|0,h=h+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(q,Y)|0,e=e+Math.imul(q,tt)|0,h=h+Math.imul(k,rt)|0,n=(n=n+Math.imul(k,ht)|0)+Math.imul(A,rt)|0,e=e+Math.imul(A,ht)|0,h=h+Math.imul(y,et)|0,n=(n=n+Math.imul(y,ot)|0)+Math.imul(b,et)|0,e=e+Math.imul(b,ot)|0,h=h+Math.imul(g,ut)|0,n=(n=n+Math.imul(g,lt)|0)+Math.imul(c,ut)|0,e=e+Math.imul(c,lt)|0,h=h+Math.imul(p,mt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(M,mt)|0,e=e+Math.imul(M,ft)|0;var xt=(l+(h=h+Math.imul(m,pt)|0)|0)+((8191&(n=(n=n+Math.imul(m,Mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((e=e+Math.imul(f,Mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h=Math.imul(j,H),n=(n=Math.imul(j,P))+Math.imul(K,H)|0,e=Math.imul(K,P),h=h+Math.imul(z,G)|0,n=(n=n+Math.imul(z,J)|0)+Math.imul(O,G)|0,e=e+Math.imul(O,J)|0,h=h+Math.imul(L,V)|0,n=(n=n+Math.imul(L,W)|0)+Math.imul(E,V)|0,e=e+Math.imul(E,W)|0,h=h+Math.imul(B,Y)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(R,Y)|0,e=e+Math.imul(R,tt)|0,h=h+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,ht)|0)+Math.imul(q,rt)|0,e=e+Math.imul(q,ht)|0,h=h+Math.imul(k,et)|0,n=(n=n+Math.imul(k,ot)|0)+Math.imul(A,et)|0,e=e+Math.imul(A,ot)|0,h=h+Math.imul(y,ut)|0,n=(n=n+Math.imul(y,lt)|0)+Math.imul(b,ut)|0,e=e+Math.imul(b,lt)|0,h=h+Math.imul(g,mt)|0,n=(n=n+Math.imul(g,ft)|0)+Math.imul(c,mt)|0,e=e+Math.imul(c,ft)|0;var St=(l+(h=h+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,Mt)|0)+Math.imul(M,pt)|0))<<13)|0;l=((e=e+Math.imul(M,Mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,h=Math.imul(j,G),n=(n=Math.imul(j,J))+Math.imul(K,G)|0,e=Math.imul(K,J),h=h+Math.imul(z,V)|0,n=(n=n+Math.imul(z,W)|0)+Math.imul(O,V)|0,e=e+Math.imul(O,W)|0,h=h+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(E,Y)|0,e=e+Math.imul(E,tt)|0,h=h+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(R,rt)|0,e=e+Math.imul(R,ht)|0,h=h+Math.imul(S,et)|0,n=(n=n+Math.imul(S,ot)|0)+Math.imul(q,et)|0,e=e+Math.imul(q,ot)|0,h=h+Math.imul(k,ut)|0,n=(n=n+Math.imul(k,lt)|0)+Math.imul(A,ut)|0,e=e+Math.imul(A,lt)|0,h=h+Math.imul(y,mt)|0,n=(n=n+Math.imul(y,ft)|0)+Math.imul(b,mt)|0,e=e+Math.imul(b,ft)|0;var qt=(l+(h=h+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,Mt)|0)+Math.imul(c,pt)|0))<<13)|0;l=((e=e+Math.imul(c,Mt)|0)+(n>>>13)|0)+(qt>>>26)|0,qt&=67108863,h=Math.imul(j,V),n=(n=Math.imul(j,W))+Math.imul(K,V)|0,e=Math.imul(K,W),h=h+Math.imul(z,Y)|0,n=(n=n+Math.imul(z,tt)|0)+Math.imul(O,Y)|0,e=e+Math.imul(O,tt)|0,h=h+Math.imul(L,rt)|0,n=(n=n+Math.imul(L,ht)|0)+Math.imul(E,rt)|0,e=e+Math.imul(E,ht)|0,h=h+Math.imul(B,et)|0,n=(n=n+Math.imul(B,ot)|0)+Math.imul(R,et)|0,e=e+Math.imul(R,ot)|0,h=h+Math.imul(S,ut)|0,n=(n=n+Math.imul(S,lt)|0)+Math.imul(q,ut)|0,e=e+Math.imul(q,lt)|0,h=h+Math.imul(k,mt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(A,mt)|0,e=e+Math.imul(A,ft)|0;var Zt=(l+(h=h+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,Mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((e=e+Math.imul(b,Mt)|0)+(n>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,h=Math.imul(j,Y),n=(n=Math.imul(j,tt))+Math.imul(K,Y)|0,e=Math.imul(K,tt),h=h+Math.imul(z,rt)|0,n=(n=n+Math.imul(z,ht)|0)+Math.imul(O,rt)|0,e=e+Math.imul(O,ht)|0,h=h+Math.imul(L,et)|0,n=(n=n+Math.imul(L,ot)|0)+Math.imul(E,et)|0,e=e+Math.imul(E,ot)|0,h=h+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(R,ut)|0,e=e+Math.imul(R,lt)|0,h=h+Math.imul(S,mt)|0,n=(n=n+Math.imul(S,ft)|0)+Math.imul(q,mt)|0,e=e+Math.imul(q,ft)|0;var Bt=(l+(h=h+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,Mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((e=e+Math.imul(A,Mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(j,rt),n=(n=Math.imul(j,ht))+Math.imul(K,rt)|0,e=Math.imul(K,ht),h=h+Math.imul(z,et)|0,n=(n=n+Math.imul(z,ot)|0)+Math.imul(O,et)|0,e=e+Math.imul(O,ot)|0,h=h+Math.imul(L,ut)|0,n=(n=n+Math.imul(L,lt)|0)+Math.imul(E,ut)|0,e=e+Math.imul(E,lt)|0,h=h+Math.imul(B,mt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(R,mt)|0,e=e+Math.imul(R,ft)|0;var Rt=(l+(h=h+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,Mt)|0)+Math.imul(q,pt)|0))<<13)|0;l=((e=e+Math.imul(q,Mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,h=Math.imul(j,et),n=(n=Math.imul(j,ot))+Math.imul(K,et)|0,e=Math.imul(K,ot),h=h+Math.imul(z,ut)|0,n=(n=n+Math.imul(z,lt)|0)+Math.imul(O,ut)|0,e=e+Math.imul(O,lt)|0,h=h+Math.imul(L,mt)|0,n=(n=n+Math.imul(L,ft)|0)+Math.imul(E,mt)|0,e=e+Math.imul(E,ft)|0;var Nt=(l+(h=h+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,Mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((e=e+Math.imul(R,Mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h=Math.imul(j,ut),n=(n=Math.imul(j,lt))+Math.imul(K,ut)|0,e=Math.imul(K,lt),h=h+Math.imul(z,mt)|0,n=(n=n+Math.imul(z,ft)|0)+Math.imul(O,mt)|0,e=e+Math.imul(O,ft)|0;var Lt=(l+(h=h+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,Mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((e=e+Math.imul(E,Mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,h=Math.imul(j,mt),n=(n=Math.imul(j,ft))+Math.imul(K,mt)|0,e=Math.imul(K,ft);var Et=(l+(h=h+Math.imul(z,pt)|0)|0)+((8191&(n=(n=n+Math.imul(z,Mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((e=e+Math.imul(O,Mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863;var It=(l+(h=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,Mt))+Math.imul(K,pt)|0))<<13)|0;return l=((e=Math.imul(K,Mt))+(n>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=vt,u[1]=gt,u[2]=ct,u[3]=wt,u[4]=yt,u[5]=bt,u[6]=_t,u[7]=kt,u[8]=At,u[9]=xt,u[10]=St,u[11]=qt,u[12]=Zt,u[13]=Bt,u[14]=Rt,u[15]=Nt,u[16]=Lt,u[17]=Et,u[18]=It,0!==l&&(u[19]=l,r.length++),r};function g(t,i,r){r.negative=i.negative^t.negative,r.length=t.length+i.length;for(var h=0,n=0,e=0;e<r.length-1;e++){var o=n;n=0;for(var s=67108863&h,u=Math.min(e,i.length-1),l=Math.max(0,e-t.length+1);l<=u;l++){var a=e-l,m=(0|t.words[a])*(0|i.words[l]),f=67108863&m;s=67108863&(f=f+s|0),n+=(o=(o=o+(m/67108864|0)|0)+(f>>>26)|0)>>>26,o&=67108863}r.words[e]=s,h=o,o=n}return 0!==h?r.words[e]=h:r.length--,r._strip()}function c(t,i,r){return g(t,i,r)}Math.imul||(v=M),e.prototype.mulTo=function(t,i){var r=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,i):r<63?M(this,t,i):r<1024?g(this,t,i):c(this,t,i)},e.prototype.mul=function(t){var i=new e(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},e.prototype.mulf=function(t){var i=new e(null);return i.words=new Array(this.length+t.length),c(this,t,i)},e.prototype.imul=function(t){return this.clone().mulTo(t,this)},e.prototype.imuln=function(t){var i=t<0;i&&(t=-t),h("number"==typeof t),h(t<67108864);for(var r=0,n=0;n<this.length;n++){var e=(0|this.words[n])*t,o=(67108863&e)+(67108863&r);r>>=26,r+=e/67108864|0,r+=o>>>26,this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),i?this.ineg():this},e.prototype.muln=function(t){return this.clone().imuln(t)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),r=0;r<i.length;r++){var h=r/26|0,n=r%26;i[r]=t.words[h]>>>n&1}return i}(t);if(0===i.length)return new e(1);for(var r=this,h=0;h<i.length&&0===i[h];h++,r=r.sqr());if(++h<i.length)for(var n=r.sqr();h<i.length;h++,n=n.sqr())0!==i[h]&&(r=r.mul(n));return r},e.prototype.iushln=function(t){h("number"==typeof t&&t>=0);var i,r=t%26,n=(t-r)/26,e=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(i=0;i<this.length;i++){var s=this.words[i]&e,u=(0|this.words[i])-s<<r;this.words[i]=u|o,o=s>>>26-r}o&&(this.words[i]=o,this.length++)}if(0!==n){for(i=this.length-1;i>=0;i--)this.words[i+n]=this.words[i];for(i=0;i<n;i++)this.words[i]=0;this.length+=n}return this._strip()},e.prototype.ishln=function(t){return h(0===this.negative),this.iushln(t)},e.prototype.iushrn=function(t,i,r){var n;h("number"==typeof t&&t>=0),n=i?(i-i%26)/26:0;var e=t%26,o=Math.min((t-e)/26,this.length),s=67108863^67108863>>>e<<e,u=r;if(n-=o,n=Math.max(0,n),u){for(var l=0;l<o;l++)u.words[l]=this.words[l];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var a=0;for(l=this.length-1;l>=0&&(0!==a||l>=n);l--){var m=0|this.words[l];this.words[l]=a<<26-e|m>>>e,a=m&s}return u&&0!==a&&(u.words[u.length++]=a),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},e.prototype.ishrn=function(t,i,r){return h(0===this.negative),this.iushrn(t,i,r)},e.prototype.shln=function(t){return this.clone().ishln(t)},e.prototype.ushln=function(t){return this.clone().iushln(t)},e.prototype.shrn=function(t){return this.clone().ishrn(t)},e.prototype.ushrn=function(t){return this.clone().iushrn(t)},e.prototype.testn=function(t){h("number"==typeof t&&t>=0);var i=t%26,r=(t-i)/26,n=1<<i;return!(this.length<=r||!(this.words[r]&n))},e.prototype.imaskn=function(t){h("number"==typeof t&&t>=0);var i=t%26,r=(t-i)/26;if(h(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==i&&r++,this.length=Math.min(r,this.length),0!==i){var n=67108863^67108863>>>i<<i;this.words[this.length-1]&=n}return this._strip()},e.prototype.maskn=function(t){return this.clone().imaskn(t)},e.prototype.iaddn=function(t){return h("number"==typeof t),h(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},e.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},e.prototype.isubn=function(t){if(h("number"==typeof t),h(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},e.prototype.addn=function(t){return this.clone().iaddn(t)},e.prototype.subn=function(t){return this.clone().isubn(t)},e.prototype.iabs=function(){return this.negative=0,this},e.prototype.abs=function(){return this.clone().iabs()},e.prototype._ishlnsubmul=function(t,i,r){var n,e,o=t.length+r;this._expand(o);var s=0;for(n=0;n<t.length;n++){e=(0|this.words[n+r])+s;var u=(0|t.words[n])*i;s=((e-=67108863&u)>>26)-(u/67108864|0),this.words[n+r]=67108863&e}for(;n<this.length-r;n++)s=(e=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&e;if(0===s)return this._strip();for(h(-1===s),s=0,n=0;n<this.length;n++)s=(e=-(0|this.words[n])+s)>>26,this.words[n]=67108863&e;return this.negative=1,this._strip()},e.prototype._wordDiv=function(t,i){var r=(this.length,t.length),h=this.clone(),n=t,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),h.iushln(r),o=0|n.words[n.length-1]);var s,u=h.length-n.length;if("mod"!==i){(s=new e(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var a=h.clone()._ishlnsubmul(n,1,u);0===a.negative&&(h=a,s&&(s.words[u]=1));for(var m=u-1;m>=0;m--){var f=67108864*(0|h.words[n.length+m])+(0|h.words[n.length+m-1]);for(f=Math.min(f/o|0,67108863),h._ishlnsubmul(n,f,m);0!==h.negative;)f--,h.negative=0,h._ishlnsubmul(n,1,m),h.isZero()||(h.negative^=1);s&&(s.words[m]=f)}return s&&s._strip(),h._strip(),"div"!==i&&0!==r&&h.iushrn(r),{div:s||null,mod:h}},e.prototype.divmod=function(t,i,r){return h(!t.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,i),"mod"!==i&&(n=s.div.neg()),"div"!==i&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:n,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),i),"mod"!==i&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),i),"div"!==i&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new e(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new e(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new e(this.modrn(t.words[0]))}:this._wordDiv(t,i);var n,o,s},e.prototype.div=function(t){return this.divmod(t,"div",!1).div},e.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},e.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},e.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var r=0!==i.div.negative?i.mod.isub(t):i.mod,h=t.ushrn(1),n=t.andln(1),e=r.cmp(h);return e<0||1===n&&0===e?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},e.prototype.modrn=function(t){var i=t<0;i&&(t=-t),h(t<=67108863);for(var r=(1<<26)%t,n=0,e=this.length-1;e>=0;e--)n=(r*n+(0|this.words[e]))%t;return i?-n:n},e.prototype.modn=function(t){return this.modrn(t)},e.prototype.idivn=function(t){var i=t<0;i&&(t=-t),h(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var e=(0|this.words[n])+67108864*r;this.words[n]=e/t|0,r=e%t}return this._strip(),i?this.ineg():this},e.prototype.divn=function(t){return this.clone().idivn(t)},e.prototype.egcd=function(t){h(0===t.negative),h(!t.isZero());var i=this,r=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var n=new e(1),o=new e(0),s=new e(0),u=new e(1),l=0;i.isEven()&&r.isEven();)i.iushrn(1),r.iushrn(1),++l;for(var a=r.clone(),m=i.clone();!i.isZero();){for(var f=0,d=1;0==(i.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(i.iushrn(f);f-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(a),o.isub(m)),n.iushrn(1),o.iushrn(1);for(var p=0,M=1;0==(r.words[0]&M)&&p<26;++p,M<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(a),u.isub(m)),s.iushrn(1),u.iushrn(1);i.cmp(r)>=0?(i.isub(r),n.isub(s),o.isub(u)):(r.isub(i),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(l)}},e.prototype._invmp=function(t){h(0===t.negative),h(!t.isZero());var i=this,r=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var n,o=new e(1),s=new e(0),u=r.clone();i.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,a=1;0==(i.words[0]&a)&&l<26;++l,a<<=1);if(l>0)for(i.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var m=0,f=1;0==(r.words[0]&f)&&m<26;++m,f<<=1);if(m>0)for(r.iushrn(m);m-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(r)>=0?(i.isub(r),o.isub(s)):(r.isub(i),s.isub(o))}return(n=0===i.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(t),n},e.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),r=t.clone();i.negative=0,r.negative=0;for(var h=0;i.isEven()&&r.isEven();h++)i.iushrn(1),r.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=i.cmp(r);if(n<0){var e=i;i=r,r=e}else if(0===n||0===r.cmpn(1))break;i.isub(r)}return r.iushln(h)},e.prototype.invm=function(t){return this.egcd(t).a.umod(t)},e.prototype.isEven=function(){return 0==(1&this.words[0])},e.prototype.isOdd=function(){return 1==(1&this.words[0])},e.prototype.andln=function(t){return this.words[0]&t},e.prototype.bincn=function(t){h("number"==typeof t);var i=t%26,r=(t-i)/26,n=1<<i;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var e=n,o=r;0!==e&&o<this.length;o++){var s=0|this.words[o];e=(s+=e)>>>26,s&=67108863,this.words[o]=s}return 0!==e&&(this.words[o]=e,this.length++),this},e.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},e.prototype.cmpn=function(t){var i,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)i=1;else{r&&(t=-t),h(t<=67108863,"Number is too big");var n=0|this.words[0];i=n===t?0:n<t?-1:1}return 0!==this.negative?0|-i:i},e.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var i=this.ucmp(t);return 0!==this.negative?0|-i:i},e.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,r=this.length-1;r>=0;r--){var h=0|this.words[r],n=0|t.words[r];if(h!==n){h<n?i=-1:h>n&&(i=1);break}}return i},e.prototype.gtn=function(t){return 1===this.cmpn(t)},e.prototype.gt=function(t){return 1===this.cmp(t)},e.prototype.gten=function(t){return this.cmpn(t)>=0},e.prototype.gte=function(t){return this.cmp(t)>=0},e.prototype.ltn=function(t){return-1===this.cmpn(t)},e.prototype.lt=function(t){return-1===this.cmp(t)},e.prototype.lten=function(t){return this.cmpn(t)<=0},e.prototype.lte=function(t){return this.cmp(t)<=0},e.prototype.eqn=function(t){return 0===this.cmpn(t)},e.prototype.eq=function(t){return 0===this.cmp(t)},e.red=function(t){return new x(t)},e.prototype.toRed=function(t){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},e.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(t){return this.red=t,this},e.prototype.forceRed=function(t){return h(!this.red,"Already a number in reduction context"),this._forceRed(t)},e.prototype.redAdd=function(t){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},e.prototype.redIAdd=function(t){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},e.prototype.redSub=function(t){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},e.prototype.redISub=function(t){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},e.prototype.redShl=function(t){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},e.prototype.redMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},e.prototype.redIMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},e.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(t){return h(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function y(t,i){this.name=t,this.p=new e(i,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var i=e._prime(t);this.m=i.p,this.prime=i}else h(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(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)}y.prototype._tmp=function(){var t=new e(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var i,r=t;do{this.split(r,this.tmp),i=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(i>this.n);var h=i<this.n?-1:r.ucmp(this.p);return 0===h?(r.words[0]=0,r.length=1):h>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,i){t.iushrn(this.n,0,i)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,i){for(var r=4194303,h=Math.min(t.length,9),n=0;n<h;n++)i.words[n]=t.words[n];if(i.length=h,t.length<=9)return t.words[0]=0,void(t.length=1);var e=t.words[9];for(i.words[i.length++]=e&r,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(o&r)<<4|e>>>22,e=o}e>>>=22,t.words[n-10]=e,0===e&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,r=0;r<t.length;r++){var h=0|t.words[r];i+=977*h,t.words[r]=67108863&i,i=64*h+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(k,y),n(A,y),A.prototype.imulK=function(t){for(var i=0,r=0;r<t.length;r++){var h=19*(0|t.words[r])+i,n=67108863&h;h>>>=26,t.words[r]=n,i=h}return 0!==i&&(t.words[t.length++]=i),t},e._prime=function(t){if(w[t])return w[t];var i;if("k256"===t)i=new b;else if("p224"===t)i=new _;else if("p192"===t)i=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new A}return w[t]=i,i},x.prototype._verify1=function(t){h(0===t.negative,"red works only with positives"),h(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,i){h(0==(t.negative|i.negative),"red works only with positives"),h(t.red&&t.red===i.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(a(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,i){this._verify2(t,i);var r=t.add(i);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,i){this._verify2(t,i);var r=t.iadd(i);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,i){this._verify2(t,i);var r=t.sub(i);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,i){this._verify2(t,i);var r=t.isub(i);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},x.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},x.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(h(i%2==1),3===i){var r=this.m.add(new e(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);h(!n.isZero());var s=new e(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new e(2*a*a).toRed(this);0!==this.pow(a,l).cmp(u);)a.redIAdd(u);for(var m=this.pow(a,n),f=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=o;0!==d.cmp(s);){for(var M=d,v=0;0!==M.cmp(s);v++)M=M.redSqr();h(v<p);var g=this.pow(m,new e(1).iushln(p-v-1));f=f.redMul(g),m=g.redSqr(),d=d.redMul(m),p=v}return f},x.prototype.invm=function(t){var i=t._invmp(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},x.prototype.pow=function(t,i){if(i.isZero())return new e(1).toRed(this);if(0===i.cmpn(1))return t.clone();var r=new Array(16);r[0]=new e(1).toRed(this),r[1]=t;for(var h=2;h<r.length;h++)r[h]=this.mul(r[h-1],t);var n=r[0],o=0,s=0,u=i.bitLength()%26;for(0===u&&(u=26),h=i.length-1;h>=0;h--){for(var l=i.words[h],a=u-1;a>=0;a--){var m=l>>a&1;n!==r[0]&&(n=this.sqr(n)),0!==m||0!==o?(o<<=1,o|=m,(4==++s||0===h&&0===a)&&(n=this.mul(n,r[o]),s=0,o=0)):s=0}u=26}return n},x.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},x.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},e.mont=function(t){return new S(t)},n(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},S.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(h).iushrn(this.shift),e=n;return n.cmp(this.m)>=0?e=n.isub(this.m):n.cmpn(0)<0&&(e=n.iadd(this.m)),e._forceRed(this)},S.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new e(0)._forceRed(this);var r=t.mul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(h).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(r,t.commonjsGlobal);var h=r.exports;exports.BN=h,exports.bn=r;
@@ -1 +1 @@
1
- "use strict";var t=require("./index-190d3dfb.cjs"),e={exports:{}};!function(e,r){var o="undefined"!=typeof self?self:t.commonjsGlobal,n=function(){function t(){this.fetch=!1,this.DOMException=o.DOMException}return t.prototype=o,new t}();!function(t){!function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function i(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r.iterable&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function u(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function c(t){var e=new FileReader,r=f(e);return e.readAsArrayBuffer(t),r}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:r.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:r.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():r.arrayBuffer&&r.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||n(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var t=u(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var t,e,r,o=u(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=f(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=i(t),e=s(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[i(t)]},h.prototype.get=function(t){return t=i(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(i(t))},h.prototype.set=function(t,e){this.map[i(t)]=s(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),a(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),a(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),a(t)},r.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function l(t,e){var r,o,n=(e=e||{}).body;if(t instanceof l){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(r=e.method||this.method||"GET",o=r.toUpperCase(),y.indexOf(o)>-1?o:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}})),e}function m(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},p.call(l.prototype),p.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];m.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,o){return new Promise((function(n,i){var s=new l(t,o);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();e.append(o,n)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new m(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r.blob&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=h,t.Request=l,t.Response=m),e.Headers=h,e.Request=l,e.Response=m,e.fetch=v,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(r=i.fetch).default=i.fetch,r.fetch=i.fetch,r.Headers=i.Headers,r.Request=i.Request,r.Response=i.Response,e.exports=r}(e,e.exports);var r=t.getDefaultExportFromCjs(e.exports);exports.browserPonyfill=e,exports.c=r;
1
+ "use strict";var t=require("./index-f56317c4.cjs"),e={exports:{}};!function(e,r){var o="undefined"!=typeof self?self:t.commonjsGlobal,n=function(){function t(){this.fetch=!1,this.DOMException=o.DOMException}return t.prototype=o,new t}();!function(t){!function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function i(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r.iterable&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function u(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function c(t){var e=new FileReader,r=f(e);return e.readAsArrayBuffer(t),r}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:r.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:r.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():r.arrayBuffer&&r.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||n(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var t=u(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var t,e,r,o=u(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=f(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=i(t),e=s(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[i(t)]},h.prototype.get=function(t){return t=i(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(i(t))},h.prototype.set=function(t,e){this.map[i(t)]=s(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),a(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),a(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),a(t)},r.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function l(t,e){var r,o,n=(e=e||{}).body;if(t instanceof l){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(r=e.method||this.method||"GET",o=r.toUpperCase(),y.indexOf(o)>-1?o:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}})),e}function m(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},p.call(l.prototype),p.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];m.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,o){return new Promise((function(n,i){var s=new l(t,o);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();e.append(o,n)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new m(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r.blob&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=h,t.Request=l,t.Response=m),e.Headers=h,e.Request=l,e.Response=m,e.fetch=v,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(r=i.fetch).default=i.fetch,r.fetch=i.fetch,r.Headers=i.Headers,r.Request=i.Request,r.Response=i.Response,e.exports=r}(e,e.exports);var r=t.getDefaultExportFromCjs(e.exports);exports.browserPonyfill=e,exports.c=r;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./index-a60557e5.cjs");require("./index-f56317c4.cjs"),require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/address"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes"),require("@ethersproject/abstract-provider"),require("./index-a5d1fc7d.cjs"),require("@ethersproject/abstract-signer"),require("./id-80cf99a8.cjs"),require("./bn-f89c8fd2.cjs"),require("./__node-resolve_empty-26284176.cjs"),require("./index-4925f240.cjs"),require("./hash-7ce6fed5.cjs"),require("./inherits_browser-50deae74.cjs"),require("@ethersproject/json-wallets"),require("./DefaultJsonRpcProvider-a94708b3.cjs"),require("./browser-ponyfill-d62ef4bf.cjs"),require("buffer"),require("./index-e373c760.cjs");class r extends e.BaseError{constructor({callbackSelector:r,cause:t,data:s,extraData:a,sender:o,urls:n}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",n&&[" Gateway URL(s):",...n.map((r=>` ${e.getUrl(r)}`))],` Sender: ${o}`,` Data: ${s}`,` Callback selector: ${r}`,` Extra data: ${a}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class t extends e.BaseError{constructor({result:r,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(r)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class s extends e.BaseError{constructor({sender:e,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}const a={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function o({data:r,sender:s,urls:a}){let o=new Error("An unknown error occurred.");for(let n=0;n<a.length;n++){const c=a[n],i=c.includes("{data}")?"GET":"POST",d="POST"===i?{data:r,sender:s}:void 0;try{const a=await fetch(c.replace("{sender}",s).replace("{data}",r),{body:JSON.stringify(d),method:i});let n;if(n=a.headers.get("Content-Type")?.startsWith("application/json")?(await a.json()).data:await a.text(),!a.ok){o=new e.HttpRequestError({body:d,details:n?.error?e.stringify(n.error):a.statusText,headers:a.headers,status:a.status,url:c});continue}if(!e.isHex(n)){o=new t({result:n,url:c});continue}return n}catch(r){o=new e.HttpRequestError({body:d,details:r.message,url:c})}}throw o}exports.ccipFetch=o,exports.offchainLookup=async function(t,{blockNumber:n,blockTag:c,data:i,to:d}){const{args:u}=e.decodeErrorResult({data:i,abi:[a]}),[l,f,p,h,b]=u;try{if(!function(r,t){if(!e.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});if(!e.isAddress(t,{strict:!1}))throw new e.InvalidAddressError({address:t});return r.toLowerCase()===t.toLowerCase()}(d,l))throw new s({sender:l,to:d});const r=await o({data:p,sender:l,urls:f}),{data:a}=await e.call(t,{blockNumber:n,blockTag:c,data:e.concat([h,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[r,b])]),to:d});return a}catch(e){throw new r({callbackSelector:h,cause:e,data:i,extraData:b,sender:l,urls:f})}},exports.offchainLookupAbiItem=a,exports.offchainLookupSignature="0x556f1830";
@@ -17,12 +17,12 @@ export default class Core {
17
17
  setWalletListConfig(walletListConfig?: WalletListParams): void;
18
18
  autoConnect(walletListConfig?: WalletListParams): Promise<import("@ethersproject/providers").JsonRpcProvider | undefined>;
19
19
  setRpcUrl(url: string): void;
20
- getWalletList(chainId: number, walletListConfig?: WalletListParams): Wallet[];
20
+ getWalletList(chainId?: number, walletListConfig?: WalletListParams): Wallet[];
21
21
  connectToWallet(wallet: Wallet, providerConfig?: Partial<ConnectorParams>, params?: {
22
22
  isAutoConnect?: boolean;
23
23
  }): Promise<import("@ethersproject/providers").JsonRpcProvider | undefined>;
24
24
  getConnectedWallet(): Promise<Wallet | undefined>;
25
25
  disconnectWallet(): Promise<void>;
26
26
  connectWalletBefore(wallet: Wallet): boolean;
27
- clickWallet(wallet: Wallet, providerConfig?: Partial<ConnectorParams>): void;
27
+ clickWallet(wallet: Wallet, providerConfig?: Partial<ConnectorParams>): Promise<import("@ethersproject/providers").JsonRpcProvider | undefined> | undefined;
28
28
  }
@@ -1,4 +1,4 @@
1
- "use strict";var t=require("./index-190d3dfb.cjs");function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return i[e]}})}}))})),Object.freeze(t)}var e,n={exports:{}},o={exports:{}};function s(){return e||(e=1,t=o,function(i,e){t.exports?t.exports=e():i.getSize=e()}(window,(function(){function t(t){let i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}let i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];return function(e){if("string"==typeof e&&(e=document.querySelector(e)),!e||"object"!=typeof e||!e.nodeType)return;let n=getComputedStyle(e);if("none"==n.display)return function(){let t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return i.forEach((i=>{t[i]=0})),t}();let o={};o.width=e.offsetWidth,o.height=e.offsetHeight;let s=o.isBorderBox="border-box"==n.boxSizing;i.forEach((t=>{let i=n[t],e=parseFloat(i);o[t]=isNaN(e)?0:e}));let r=o.paddingLeft+o.paddingRight,h=o.paddingTop+o.paddingBottom,a=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,l=o.borderLeftWidth+o.borderRightWidth,c=o.borderTopWidth+o.borderBottomWidth,u=t(n.width);!1!==u&&(o.width=u+(s?0:r+l));let p=t(n.height);return!1!==p&&(o.height=p+(s?0:h+c)),o.innerWidth=o.width-(r+l),o.innerHeight=o.height-(h+c),o.outerWidth=o.width+a,o.outerHeight=o.height+d,o}}))),o.exports;var t}var r,h,a,d={exports:{}},l={exports:{}};function c(){return r||(r=1,i=l,e="undefined"!=typeof window?window:t.commonjsGlobal,n=function(){function t(){}let i=t.prototype;return i.on=function(t,i){if(!t||!i)return this;let e=this._events=this._events||{},n=e[t]=e[t]||[];return n.includes(i)||n.push(i),this},i.once=function(t,i){if(!t||!i)return this;this.on(t,i);let e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this},i.off=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;let n=e.indexOf(i);return-1!=n&&e.splice(n,1),this},i.emitEvent=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;e=e.slice(0),i=i||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of e)n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i);return this},i.allOff=function(){return delete this._events,delete this._onceEvents,this},t},i.exports?i.exports=n():e.EvEmitter=n()),l.exports;var i,e,n}
1
+ "use strict";var t=require("./index-f56317c4.cjs");function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return i[e]}})}}))})),Object.freeze(t)}var e,n={exports:{}},o={exports:{}};function s(){return e||(e=1,t=o,function(i,e){t.exports?t.exports=e():i.getSize=e()}(window,(function(){function t(t){let i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}let i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];return function(e){if("string"==typeof e&&(e=document.querySelector(e)),!e||"object"!=typeof e||!e.nodeType)return;let n=getComputedStyle(e);if("none"==n.display)return function(){let t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return i.forEach((i=>{t[i]=0})),t}();let o={};o.width=e.offsetWidth,o.height=e.offsetHeight;let s=o.isBorderBox="border-box"==n.boxSizing;i.forEach((t=>{let i=n[t],e=parseFloat(i);o[t]=isNaN(e)?0:e}));let r=o.paddingLeft+o.paddingRight,h=o.paddingTop+o.paddingBottom,a=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,l=o.borderLeftWidth+o.borderRightWidth,c=o.borderTopWidth+o.borderBottomWidth,u=t(n.width);!1!==u&&(o.width=u+(s?0:r+l));let p=t(n.height);return!1!==p&&(o.height=p+(s?0:h+c)),o.innerWidth=o.width-(r+l),o.innerHeight=o.height-(h+c),o.outerWidth=o.width+a,o.outerHeight=o.height+d,o}}))),o.exports;var t}var r,h,a,d={exports:{}},l={exports:{}};function c(){return r||(r=1,i=l,e="undefined"!=typeof window?window:t.commonjsGlobal,n=function(){function t(){}let i=t.prototype;return i.on=function(t,i){if(!t||!i)return this;let e=this._events=this._events||{},n=e[t]=e[t]||[];return n.includes(i)||n.push(i),this},i.once=function(t,i){if(!t||!i)return this;this.on(t,i);let e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this},i.off=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;let n=e.indexOf(i);return-1!=n&&e.splice(n,1),this},i.emitEvent=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;e=e.slice(0),i=i||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of e)n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i);return this},i.allOff=function(){return delete this._events,delete this._onceEvents,this},t},i.exports?i.exports=n():e.EvEmitter=n()),l.exports;var i,e,n}
2
2
  /*!
3
3
  * Unidragger v3.0.1
4
4
  * Draggable base class
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@ethersproject/contracts"),A=require("@ethersproject/abstract-signer"),r=require("./index-a5d1fc7d.cjs"),t=require("@ethersproject/constants"),n=require("@ethersproject/providers"),o=require("./interface-a86a59a0.cjs"),s=require("@ethersproject/address"),i=require("./index-4925f240.cjs"),a=require("@ethersproject/bytes"),f=require("./id-80cf99a8.cjs"),c=require("./index-f56317c4.cjs"),g=require("@ethersproject/json-wallets"),l=require("@ethersproject/properties"),B=require("./index-3b1c3d83.cjs"),d=require("@ethersproject/transactions");function u(e){if(e&&e.__esModule)return e;var A=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(A,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}})),A.default=e,Object.freeze(A)}var h=u(t),C=u(n);function w(e){const A=f.toUtf8Bytes(e);if(A.length>31)throw new Error("bytes32 string must be less than 32 bytes");return a.hexlify(a.concat([A,t.HashZero]).slice(0,32))}function p(e){const A=a.arrayify(e);if(32!==A.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==A[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===A[r-1];)r--;return f.toUtf8String(A.slice(0,r))}function E(e,A){A||(A=function(e){return[parseInt(e,16)]});let r=0,t={};return e.split(",").forEach((e=>{let n=e.split(":");r+=parseInt(n[0],16),t[r]=A(n[1])})),t}function D(e){let A=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let t=A+parseInt(r[0],16);return A=parseInt(r[1],16),{l:t,h:A}}))}function F(e,A){let r=0;for(let t=0;t<A.length;t++){let n=A[t];if(r+=n.l,e>=r&&e<=r+n.h&&(e-r)%(n.d||1)==0){if(n.e&&-1!==n.e.indexOf(e-r))continue;return n}}return null}const m=D("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Q="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),y=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],b=E("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),I=E("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),U=E("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let A=[];for(let r=0;r<e.length;r+=4)A.push(parseInt(e.substring(r,r+4),16));return A})),S=D("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function M(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let A=f.toUtf8CodePoints(e);var r;r=A.map((e=>{if(Q.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let A=function(e){let A=F(e,y);if(A)return[e+A.s];let r=b[e];if(r)return r;let t=I[e];return t?[e+t[0]]:U[e]||null}(e);return A||[e]})),A=r.reduce(((e,A)=>(A.forEach((A=>{e.push(A)})),e)),[]),A=f.toUtf8CodePoints(f._toUtf8String(A),f.UnicodeNormalizationForm.NFKC),A.forEach((e=>{if(F(e,S))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),A.forEach((e=>{if(F(e,m))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let t=f._toUtf8String(A);if("-"===t.substring(0,1)||"--"===t.substring(2,4)||"-"===t.substring(t.length-1))throw new Error("invalid hyphen");return t}var Y=Object.freeze({__proto__:null,decode:i.decode,encode:i.encode});function T(e,A){null==A&&(A=1);const r=[],t=r.forEach,n=function(e,A){t.call(e,(function(e){A>0&&Array.isArray(e)?n(e,A-1):r.push(e)}))};return n(e,A),r}function H(e){return function(e){let A=0;return()=>e[A++]}(function(e){let A=0;function r(){return e[A++]<<8|e[A++]}let t=r(),n=1,o=[0,1];for(let e=1;e<t;e++)o.push(n+=r());let s=r(),i=A;A+=s;let a=0,f=0;function c(){return 0==a&&(f=f<<8|e[A++],a=8),f>>--a&1}const g=Math.pow(2,31),l=g>>>1,B=l>>1,d=g-1;let u=0;for(let e=0;e<31;e++)u=u<<1|c();let h=[],C=0,w=g;for(;;){let e=Math.floor(((u-C+1)*n-1)/w),A=0,r=t;for(;r-A>1;){let t=A+r>>>1;e<o[t]?r=t:A=t}if(0==A)break;h.push(A);let s=C+Math.floor(w*o[A]/n),i=C+Math.floor(w*o[A+1]/n)-1;for(;0==((s^i)&l);)u=u<<1&d|c(),s=s<<1&d,i=i<<1&d|1;for(;s&~i&B;)u=u&l|u<<1&d>>>1|c(),s=s<<1^l,i=(i^l)<<1|l|1;C=s,w=1+i-s}let p=t-4;return h.map((A=>{switch(A-p){case 3:return p+65792+(e[i++]<<16|e[i++]<<8|e[i++]);case 2:return p+256+(e[i++]<<8|e[i++]);case 1:return p+e[i++];default:return A-1}}))}(e))}function N(e){return 1&e?~e>>1:e>>1}function v(e,A){let r=Array(e);for(let t=0,n=-1;t<e;t++)r[t]=n+=1+A();return r}function k(e,A){let r=Array(e);for(let t=0,n=0;t<e;t++)r[t]=n+=N(A());return r}function K(e,A){let r=v(e(),e),t=e(),n=v(t,e),o=function(e,A){let r=Array(e);for(let t=0;t<e;t++)r[t]=1+A();return r}(t,e);for(let e=0;e<t;e++)for(let A=0;A<o[e];A++)r.push(n[e]+A);return A?r.map((e=>A[e])):r}function J(e,A,r){let t=Array(e).fill(void 0).map((()=>[]));for(let n=0;n<A;n++)k(e,r).forEach(((e,A)=>t[A].push(e)));return t}function x(e,A){let r=1+A(),t=A(),n=function(e){let A=[];for(;;){let r=e();if(0==r)break;A.push(r)}return A}(A);return T(J(n.length,1+e,A).map(((e,A)=>{const o=e[0],s=e.slice(1);return Array(n[A]).fill(void 0).map(((e,A)=>{let n=A*t;return[o+A*r,s.map((e=>e+n))]}))})))}function q(e,A){return J(1+A(),1+e,A).map((e=>[e[0],e.slice(1)]))}const P=H(i.decode("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYA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PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),G=new Set(K(P)),O=new Set(K(P)),R=function(e){let A=[];for(;;){let r=e();if(0==r)break;A.push(x(r,e))}for(;;){let r=e()-1;if(r<0)break;A.push(q(r,e))}return function(e){const A={};for(let r=0;r<e.length;r++){const t=e[r];A[t[0]]=t[1]}return A}(T(A))}(P),z=function(e){let A=K(e).sort(((e,A)=>e-A));return function r(){let t=[];for(;;){let n=K(e,A);if(0==n.length)break;t.push({set:new Set(n),node:r()})}t.sort(((e,A)=>A.set.size-e.set.size));let n=e(),o=n%3;n=n/3|0;let s=!!(1&n);return n>>=1,{branches:t,valid:o,fe0f:s,save:1==n,check:2==n}}()}(P),L=45,X=95;function W(e){return f.toUtf8CodePoints(e)}function Z(e){return e.filter((e=>65039!=e))}function j(e){for(let A of e.split(".")){let e=W(A);try{for(let A=e.lastIndexOf(X)-1;A>=0;A--)if(e[A]!==X)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===L&&e[3]===L)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${A}": ${e.message}`)}}return e}function V(e){return j(function(e,A){let r=W(e).reverse(),t=[];for(;r.length;){let e=_(r);if(e){t.push(...A(e));continue}let n=r.pop();if(G.has(n)){t.push(n);continue}if(O.has(n))continue;let o=R[n];if(!o)throw new Error(`Disallowed codepoint: 0x${n.toString(16).toUpperCase()}`);t.push(...o)}return j((n=String.fromCodePoint(...t),n.normalize("NFC")));var n}(e,Z))}function _(e,A){var r;let t,n,o=z,s=[],i=e.length;for(A&&(A.length=0);i;){let a=e[--i];if(o=null===(r=o.branches.find((e=>e.set.has(a))))||void 0===r?void 0:r.node,!o)break;if(o.save)n=a;else if(o.check&&a===n)break;s.push(a),o.fe0f&&(s.push(65039),i>0&&65039==e[i-1]&&i--),o.valid&&(t=s.slice(),2==o.valid&&t.splice(1,1),A&&A.push(...e.slice(i).reverse()),e.length=i)}return t}const $=new f.Logger(i.version),ee=new Uint8Array(32);function Ae(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function re(e){const A=f.toUtf8Bytes(V(e)),r=[];if(0===e.length)return r;let t=0;for(let e=0;e<A.length;e++){46===A[e]&&(r.push(Ae(A.slice(t,e))),t=e+1)}if(t>=A.length)throw new Error("invalid ENS name; empty component");return r.push(Ae(A.slice(t))),r}function te(e){try{return 0!==re(e).length}catch(e){}return!1}function ne(e){"string"!=typeof e&&$.throwArgumentError("invalid ENS name; not a string","name",e);let A=ee;const r=re(e);for(;r.length;)A=c.keccak256(a.concat([A,c.keccak256(r.pop())]));return a.hexlify(A)}function oe(e){return a.hexlify(a.concat(re(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const A=new Uint8Array(e.length+1);return A.set(e,1),A[0]=A.length-1,A}))))+"00"}function se(e){for(let A=(e=e.slice()).length-1;A>0;A--){const r=Math.floor(Math.random()*(A+1)),t=e[A];e[A]=e[r],e[r]=t}return e}ee.fill(0);const ie=new RegExp("^bytes([0-9]+)$"),ae=new RegExp("^(u?int)([0-9]*)$"),fe=new RegExp("^(.*)\\[([0-9]*)\\]$"),ce="0000000000000000000000000000000000000000000000000000000000000000",ge=new f.Logger("solidity/5.7.0");function le(e,A,r){switch(e){case"address":return r?a.zeroPad(A,32):a.arrayify(A);case"string":return f.toUtf8Bytes(A);case"bytes":return a.arrayify(A);case"bool":return A=A?"0x01":"0x00",r?a.zeroPad(A,32):a.arrayify(A)}let t=e.match(ae);if(t){let n=parseInt(t[2]||"256");return(t[2]&&String(n)!==t[2]||n%8!=0||0===n||n>256)&&ge.throwArgumentError("invalid number type","type",e),r&&(n=256),A=f.BigNumber.from(A).toTwos(n),a.zeroPad(A,n/8)}if(t=e.match(ie),t){const n=parseInt(t[1]);return(String(n)!==t[1]||0===n||n>32)&&ge.throwArgumentError("invalid bytes type","type",e),a.arrayify(A).byteLength!==n&&ge.throwArgumentError(`invalid value for ${e}`,"value",A),r?a.arrayify((A+ce).substring(0,66)):A}if(t=e.match(fe),t&&Array.isArray(A)){const r=t[1];parseInt(t[2]||String(A.length))!=A.length&&ge.throwArgumentError(`invalid array length for ${e}`,"value",A);const n=[];return A.forEach((function(e){n.push(le(r,e,!0))})),a.concat(n)}return ge.throwArgumentError("invalid type","type",e)}function Be(e,A){e.length!=A.length&&ge.throwArgumentError("wrong number of values; expected ${ types.length }","values",A);const r=[];return e.forEach((function(e,t){r.push(le(e,A[t]))})),a.hexlify(a.concat(r))}function de(e,A){return c.keccak256(Be(e,A))}function ue(e,A){return r.sha256(Be(e,A))}var he=Object.freeze({__proto__:null,pack:Be,keccak256:de,sha256:ue}),Ce=Object.freeze({__proto__:null,AbiCoder:o.AbiCoder,defaultAbiCoder:o.defaultAbiCoder,Fragment:o.Fragment,ConstructorFragment:o.ConstructorFragment,ErrorFragment:o.ErrorFragment,EventFragment:o.EventFragment,FunctionFragment:o.FunctionFragment,ParamType:o.ParamType,FormatTypes:o.FormatTypes,checkResultErrors:o.checkResultErrors,Logger:f.Logger,RLP:B.lib_esm,_fetchData:i._fetchData,fetchJson:i.fetchJson,poll:i.poll,checkProperties:l.checkProperties,deepCopy:l.deepCopy,defineReadOnly:l.defineReadOnly,getStatic:l.getStatic,resolveProperties:l.resolveProperties,shallowCopy:l.shallowCopy,arrayify:a.arrayify,concat:a.concat,stripZeros:a.stripZeros,zeroPad:a.zeroPad,isBytes:a.isBytes,isBytesLike:a.isBytesLike,defaultPath:r.defaultPath,HDNode:r.HDNode,SigningKey:r.SigningKey,Interface:o.Interface,LogDescription:o.LogDescription,TransactionDescription:o.TransactionDescription,base58:r.Base58,base64:Y,hexlify:a.hexlify,isHexString:a.isHexString,hexConcat:a.hexConcat,hexStripZeros:a.hexStripZeros,hexValue:a.hexValue,hexZeroPad:a.hexZeroPad,hexDataLength:a.hexDataLength,hexDataSlice:a.hexDataSlice,nameprep:M,_toEscapedUtf8String:f._toEscapedUtf8String,toUtf8Bytes:f.toUtf8Bytes,toUtf8CodePoints:f.toUtf8CodePoints,toUtf8String:f.toUtf8String,Utf8ErrorFuncs:f.Utf8ErrorFuncs,formatBytes32String:w,parseBytes32String:p,dnsEncode:oe,hashMessage:r.hashMessage,namehash:ne,isValidName:te,id:f.id,_TypedDataEncoder:i.TypedDataEncoder,getAddress:s.getAddress,getIcapAddress:s.getIcapAddress,getContractAddress:s.getContractAddress,getCreate2Address:s.getCreate2Address,isAddress:s.isAddress,formatEther:r.formatEther,parseEther:r.parseEther,formatUnits:r.formatUnits,parseUnits:r.parseUnits,commify:r.commify,computeHmac:r.computeHmac,keccak256:c.keccak256,ripemd160:r.ripemd160,sha256:r.sha256,sha512:r.sha512,randomBytes:r.randomBytes,shuffled:se,solidityPack:Be,solidityKeccak256:de,soliditySha256:ue,splitSignature:a.splitSignature,joinSignature:a.joinSignature,accessListify:d.accessListify,parseTransaction:d.parse,serializeTransaction:d.serialize,TransactionTypes:d.TransactionTypes,getJsonWalletAddress:g.getJsonWalletAddress,computeAddress:d.computeAddress,recoverAddress:d.recoverAddress,computePublicKey:r.computePublicKey,recoverPublicKey:r.recoverPublicKey,verifyMessage:r.verifyMessage,verifyTypedData:r.verifyTypedData,getAccountPath:r.getAccountPath,mnemonicToEntropy:r.mnemonicToEntropy,entropyToMnemonic:r.entropyToMnemonic,isValidMnemonic:r.isValidMnemonic,mnemonicToSeed:r.mnemonicToSeed,get SupportedAlgorithm(){return r.SupportedAlgorithm},get UnicodeNormalizationForm(){return f.UnicodeNormalizationForm},get Utf8ErrorReason(){return f.Utf8ErrorReason},Indexed:o.Indexed});const we="ethers/5.7.2",pe=new f.Logger(we);var Ee=Object.freeze({__proto__:null,Signer:A.Signer,Wallet:r.Wallet,VoidSigner:A.VoidSigner,getDefaultProvider:n.getDefaultProvider,providers:C,BaseContract:e.BaseContract,Contract:e.Contract,ContractFactory:e.ContractFactory,BigNumber:f.BigNumber,FixedNumber:r.FixedNumber,constants:h,get errors(){return f.ErrorCode},logger:pe,utils:Ce,wordlists:r.wordlists,version:we,Wordlist:r.Wordlist});exports.dnsEncode=oe,exports.ensNormalize=function(e){return re(e).map((e=>f.toUtf8String(e))).join(".")},exports.ethers=Ee,exports.formatBytes32String=w,exports.isValidName=te,exports.lib_esm=Y,exports.lib_esm$1=he,exports.logger=pe,exports.namehash=ne,exports.nameprep=M,exports.parseBytes32String=p,exports.shuffled=se,exports.utils=Ce,exports.version=we;
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./bn-f89c8fd2.cjs"),e=require("@ethersproject/bytes"),t=require("./index-f56317c4.cjs");let o=!1,n=!1;const s={debug:1,default:2,info:2,warning:3,error:4,off:5};let i=s.default,u=null;const a=function(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(t){r.push(e)}})),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}();var E,N;!function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"}(E||(E={})),exports.ErrorCode=void 0,(N=exports.ErrorCode||(exports.ErrorCode={})).UNKNOWN_ERROR="UNKNOWN_ERROR",N.NOT_IMPLEMENTED="NOT_IMPLEMENTED",N.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",N.NETWORK_ERROR="NETWORK_ERROR",N.SERVER_ERROR="SERVER_ERROR",N.TIMEOUT="TIMEOUT",N.BUFFER_OVERRUN="BUFFER_OVERRUN",N.NUMERIC_FAULT="NUMERIC_FAULT",N.MISSING_NEW="MISSING_NEW",N.INVALID_ARGUMENT="INVALID_ARGUMENT",N.MISSING_ARGUMENT="MISSING_ARGUMENT",N.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",N.CALL_EXCEPTION="CALL_EXCEPTION",N.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",N.NONCE_EXPIRED="NONCE_EXPIRED",N.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",N.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",N.TRANSACTION_REPLACED="TRANSACTION_REPLACED",N.ACTION_REJECTED="ACTION_REJECTED";const c="0123456789abcdef";class h{constructor(r){Object.defineProperty(this,"version",{enumerable:!0,value:r,writable:!1})}_log(r,e){const t=r.toLowerCase();null==s[t]&&this.throwArgumentError("invalid log level name","logLevel",r),i>s[t]||console.log.apply(console,e)}debug(...r){this._log(h.levels.DEBUG,r)}info(...r){this._log(h.levels.INFO,r)}warn(...r){this._log(h.levels.WARNING,r)}makeError(r,e,t){if(n)return this.makeError("censored error",e,{});e||(e=h.errors.UNKNOWN_ERROR),t||(t={});const o=[];Object.keys(t).forEach((r=>{const e=t[r];try{if(e instanceof Uint8Array){let t="";for(let r=0;r<e.length;r++)t+=c[e[r]>>4],t+=c[15&e[r]];o.push(r+"=Uint8Array(0x"+t+")")}else o.push(r+"="+JSON.stringify(e))}catch(e){o.push(r+"="+JSON.stringify(t[r].toString()))}})),o.push(`code=${e}`),o.push(`version=${this.version}`);const s=r;let i="";switch(e){case exports.ErrorCode.NUMERIC_FAULT:{i="NUMERIC_FAULT";const e=r;switch(e){case"overflow":case"underflow":case"division-by-zero":i+="-"+e;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case exports.ErrorCode.CALL_EXCEPTION:case exports.ErrorCode.INSUFFICIENT_FUNDS:case exports.ErrorCode.MISSING_NEW:case exports.ErrorCode.NONCE_EXPIRED:case exports.ErrorCode.REPLACEMENT_UNDERPRICED:case exports.ErrorCode.TRANSACTION_REPLACED:case exports.ErrorCode.UNPREDICTABLE_GAS_LIMIT:i=e}i&&(r+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),o.length&&(r+=" ("+o.join(", ")+")");const u=new Error(r);return u.reason=s,u.code=e,Object.keys(t).forEach((function(r){u[r]=t[r]})),u}throwError(r,e,t){throw this.makeError(r,e,t)}throwArgumentError(r,e,t){return this.throwError(r,h.errors.INVALID_ARGUMENT,{argument:e,value:t})}assert(r,e,t,o){r||this.throwError(e,t,o)}assertArgument(r,e,t,o){r||this.throwArgumentError(e,t,o)}checkNormalize(r){a&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:a})}checkSafeUint53(r,e){"number"==typeof r&&(null==e&&(e="value not safe"),(r<0||r>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:r}),r%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:r}))}checkArgumentCount(r,e,t){t=t?": "+t:"",r<e&&this.throwError("missing argument"+t,h.errors.MISSING_ARGUMENT,{count:r,expectedCount:e}),r>e&&this.throwError("too many arguments"+t,h.errors.UNEXPECTED_ARGUMENT,{count:r,expectedCount:e})}checkNew(r,e){r!==Object&&null!=r||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}checkAbstract(r,e){r===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:r.name,operation:"new"}):r!==Object&&null!=r||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return u||(u=new h("logger/5.7.0")),u}static setCensorship(r,e){if(!r&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!r)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}n=!!r,o=!!e}static setLogLevel(r){const e=s[r.toLowerCase()];null!=e?i=e:h.globalLogger().warn("invalid log level - "+r)}static from(r){return new h(r)}}h.errors=exports.ErrorCode,h.levels=E;var l=Object.freeze({__proto__:null,get LogLevel(){return E},get ErrorCode(){return exports.ErrorCode},Logger:h});const g="bignumber/5.7.0";var f=r.BN.BN;const p=new h(g),R={},m=9007199254740991;let U=!1;class _{constructor(r,e){r!==R&&p.throwError("cannot call constructor directly; use BigNumber.from",h.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(r){return d(T(this).fromTwos(r))}toTwos(r){return d(T(this).toTwos(r))}abs(){return"-"===this._hex[0]?_.from(this._hex.substring(1)):this}add(r){return d(T(this).add(T(r)))}sub(r){return d(T(this).sub(T(r)))}div(r){return _.from(r).isZero()&&C("division-by-zero","div"),d(T(this).div(T(r)))}mul(r){return d(T(this).mul(T(r)))}mod(r){const e=T(r);return e.isNeg()&&C("division-by-zero","mod"),d(T(this).umod(e))}pow(r){const e=T(r);return e.isNeg()&&C("negative-power","pow"),d(T(this).pow(e))}and(r){const e=T(r);return(this.isNegative()||e.isNeg())&&C("unbound-bitwise-result","and"),d(T(this).and(e))}or(r){const e=T(r);return(this.isNegative()||e.isNeg())&&C("unbound-bitwise-result","or"),d(T(this).or(e))}xor(r){const e=T(r);return(this.isNegative()||e.isNeg())&&C("unbound-bitwise-result","xor"),d(T(this).xor(e))}mask(r){return(this.isNegative()||r<0)&&C("negative-width","mask"),d(T(this).maskn(r))}shl(r){return(this.isNegative()||r<0)&&C("negative-width","shl"),d(T(this).shln(r))}shr(r){return(this.isNegative()||r<0)&&C("negative-width","shr"),d(T(this).shrn(r))}eq(r){return T(this).eq(T(r))}lt(r){return T(this).lt(T(r))}lte(r){return T(this).lte(T(r))}gt(r){return T(this).gt(T(r))}gte(r){return T(this).gte(T(r))}isNegative(){return"-"===this._hex[0]}isZero(){return T(this).isZero()}toNumber(){try{return T(this).toNumber()}catch(r){C("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(r){}return p.throwError("this platform does not support BigInt",h.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?U||(U=!0,p.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?p.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",h.errors.UNEXPECTED_ARGUMENT,{}):p.throwError("BigNumber.toString does not accept parameters",h.errors.UNEXPECTED_ARGUMENT,{})),T(this).toString(10)}toHexString(){return this._hex}toJSON(r){return{type:"BigNumber",hex:this.toHexString()}}static from(r){if(r instanceof _)return r;if("string"==typeof r)return r.match(/^-?0x[0-9a-f]+$/i)?new _(R,I(r)):r.match(/^-?[0-9]+$/)?new _(R,I(new f(r))):p.throwArgumentError("invalid BigNumber string","value",r);if("number"==typeof r)return r%1&&C("underflow","BigNumber.from",r),(r>=m||r<=-m)&&C("overflow","BigNumber.from",r),_.from(String(r));const t=r;if("bigint"==typeof t)return _.from(t.toString());if(e.isBytes(t))return _.from(e.hexlify(t));if(t)if(t.toHexString){const r=t.toHexString();if("string"==typeof r)return _.from(r)}else{let r=t._hex;if(null==r&&"BigNumber"===t.type&&(r=t.hex),"string"==typeof r&&(e.isHexString(r)||"-"===r[0]&&e.isHexString(r.substring(1))))return _.from(r)}return p.throwArgumentError("invalid BigNumber value","value",r)}static isBigNumber(r){return!(!r||!r._isBigNumber)}}function I(r){if("string"!=typeof r)return I(r.toString(16));if("-"===r[0])return"-"===(r=r.substring(1))[0]&&p.throwArgumentError("invalid hex","value",r),"0x00"===(r=I(r))?r:"-"+r;if("0x"!==r.substring(0,2)&&(r="0x"+r),"0x"===r)return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&"0x00"===r.substring(0,4);)r="0x"+r.substring(4);return r}function d(r){return _.from(I(r))}function T(r){const e=_.from(r).toHexString();return"-"===e[0]?new f("-"+e.substring(3),16):new f(e.substring(2),16)}function C(r,e,t){const o={fault:r,operation:e};return null!=t&&(o.value=t),p.throwError(r,h.errors.NUMERIC_FAULT,o)}const O=new h("strings/5.7.0");var b,S;function x(r,e,t,o,n){if(r===exports.Utf8ErrorReason.BAD_PREFIX||r===exports.Utf8ErrorReason.UNEXPECTED_CONTINUE){let r=0;for(let o=e+1;o<t.length&&t[o]>>6==2;o++)r++;return r}return r===exports.Utf8ErrorReason.OVERRUN?t.length-e-1:0}exports.UnicodeNormalizationForm=void 0,(b=exports.UnicodeNormalizationForm||(exports.UnicodeNormalizationForm={})).current="",b.NFC="NFC",b.NFD="NFD",b.NFKC="NFKC",b.NFKD="NFKD",exports.Utf8ErrorReason=void 0,(S=exports.Utf8ErrorReason||(exports.Utf8ErrorReason={})).UNEXPECTED_CONTINUE="unexpected continuation byte",S.BAD_PREFIX="bad codepoint prefix",S.OVERRUN="string overrun",S.MISSING_CONTINUE="missing continuation byte",S.OUT_OF_RANGE="out of UTF-8 range",S.UTF16_SURROGATE="UTF-16 surrogate",S.OVERLONG="overlong representation";const w=Object.freeze({error:function(r,e,t,o,n){return O.throwArgumentError(`invalid codepoint at offset ${e}; ${r}`,"bytes",t)},ignore:x,replace:function(r,e,t,o,n){return r===exports.Utf8ErrorReason.OVERLONG?(o.push(n),0):(o.push(65533),x(r,e,t))}});function A(r,t){null==t&&(t=w.error),r=e.arrayify(r);const o=[];let n=0;for(;n<r.length;){const e=r[n++];if(e>>7==0){o.push(e);continue}let s=null,i=null;if(192==(224&e))s=1,i=127;else if(224==(240&e))s=2,i=2047;else{if(240!=(248&e)){n+=t(128==(192&e)?exports.Utf8ErrorReason.UNEXPECTED_CONTINUE:exports.Utf8ErrorReason.BAD_PREFIX,n-1,r,o);continue}s=3,i=65535}if(n-1+s>=r.length){n+=t(exports.Utf8ErrorReason.OVERRUN,n-1,r,o);continue}let u=e&(1<<8-s-1)-1;for(let e=0;e<s;e++){let e=r[n];if(128!=(192&e)){n+=t(exports.Utf8ErrorReason.MISSING_CONTINUE,n,r,o),u=null;break}u=u<<6|63&e,n++}null!==u&&(u>1114111?n+=t(exports.Utf8ErrorReason.OUT_OF_RANGE,n-1-s,r,o,u):u>=55296&&u<=57343?n+=t(exports.Utf8ErrorReason.UTF16_SURROGATE,n-1-s,r,o,u):u<=i?n+=t(exports.Utf8ErrorReason.OVERLONG,n-1-s,r,o,u):o.push(u))}return o}function v(r,t=exports.UnicodeNormalizationForm.current){t!=exports.UnicodeNormalizationForm.current&&(O.checkNormalize(),r=r.normalize(t));let o=[];for(let e=0;e<r.length;e++){const t=r.charCodeAt(e);if(t<128)o.push(t);else if(t<2048)o.push(t>>6|192),o.push(63&t|128);else if(55296==(64512&t)){e++;const n=r.charCodeAt(e);if(e>=r.length||56320!=(64512&n))throw new Error("invalid utf-8 string");const s=65536+((1023&t)<<10)+(1023&n);o.push(s>>18|240),o.push(s>>12&63|128),o.push(s>>6&63|128),o.push(63&s|128)}else o.push(t>>12|224),o.push(t>>6&63|128),o.push(63&t|128)}return e.arrayify(o)}function P(r){const e="0000"+r.toString(16);return"\\u"+e.substring(e.length-4)}function F(r){return r.map((r=>r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode(55296+(r>>10&1023),56320+(1023&r))))).join("")}exports.BigNumber=_,exports.Logger=h,exports.Utf8ErrorFuncs=w,exports._toEscapedUtf8String=function(r,e){return'"'+A(r,e).map((r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?P(r):P(55296+((r-=65536)>>10&1023))+P(56320+(1023&r))})).join("")+'"'},exports._toUtf8String=F,exports.id=function(r){return t.keccak256(v(r))},exports.isBigNumberish=function(r){return null!=r&&(_.isBigNumber(r)||"number"==typeof r&&r%1==0||"string"==typeof r&&!!r.match(/^-?[0-9]+$/)||e.isHexString(r)||"bigint"==typeof r||e.isBytes(r))},exports.lib_esm=l,exports.toUtf8Bytes=v,exports.toUtf8CodePoints=function(r,e=exports.UnicodeNormalizationForm.current){return A(v(r,e))},exports.toUtf8String=function(r,e){return F(A(r,e))},exports.version=g;
@@ -1,4 +1,4 @@
1
- "use strict";var t=require("./index-df8e5839.cjs");
1
+ "use strict";var t=require("./index-9f2a69d5.cjs");
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
@@ -1 +1 @@
1
- "use strict";var r=require("@ethersproject/bytes"),t=require("./id-d616b7a6.cjs");const o=new t.Logger("rlp/5.7.0");function e(r){const t=[];for(;r;)t.unshift(255&r),r>>=8;return t}function n(r,t,o){let e=0;for(let n=0;n<o;n++)e=256*e+r[t+n];return e}function s(t){if(Array.isArray(t)){let r=[];if(t.forEach((function(t){r=r.concat(s(t))})),r.length<=55)return r.unshift(192+r.length),r;const o=e(r.length);return o.unshift(247+o.length),o.concat(r)}r.isBytesLike(t)||o.throwArgumentError("RLP object must be BytesLike","object",t);const n=Array.prototype.slice.call(r.arrayify(t));if(1===n.length&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;const c=e(n.length);return c.unshift(183+c.length),c.concat(n)}function c(t){return r.hexlify(s(t))}function h(r,e,n,s){const c=[];for(;n<e+1+s;){const h=u(r,n);c.push(h.result),(n+=h.consumed)>e+1+s&&o.throwError("child data too short",t.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+s,result:c}}function u(e,s){if(0===e.length&&o.throwError("data too short",t.Logger.errors.BUFFER_OVERRUN,{}),e[s]>=248){const r=e[s]-247;s+1+r>e.length&&o.throwError("data short segment too short",t.Logger.errors.BUFFER_OVERRUN,{});const c=n(e,s+1,r);return s+1+r+c>e.length&&o.throwError("data long segment too short",t.Logger.errors.BUFFER_OVERRUN,{}),h(e,s,s+1+r,r+c)}if(e[s]>=192){const r=e[s]-192;return s+1+r>e.length&&o.throwError("data array too short",t.Logger.errors.BUFFER_OVERRUN,{}),h(e,s,s+1,r)}if(e[s]>=184){const c=e[s]-183;s+1+c>e.length&&o.throwError("data array too short",t.Logger.errors.BUFFER_OVERRUN,{});const h=n(e,s+1,c);s+1+c+h>e.length&&o.throwError("data array too short",t.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+c+h,result:r.hexlify(e.slice(s+1+c,s+1+c+h))}}if(e[s]>=128){const n=e[s]-128;s+1+n>e.length&&o.throwError("data too short",t.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+n,result:r.hexlify(e.slice(s+1,s+1+n))}}return{consumed:1,result:r.hexlify(e[s])}}function l(t){const e=r.arrayify(t),n=u(e,0);return n.consumed!==e.length&&o.throwArgumentError("invalid rlp data","data",t),n.result}var a=Object.freeze({__proto__:null,encode:c,decode:l});exports.decode=l,exports.encode=c,exports.lib_esm=a;
1
+ "use strict";var r=require("@ethersproject/bytes"),t=require("./id-80cf99a8.cjs");const o=new t.Logger("rlp/5.7.0");function e(r){const t=[];for(;r;)t.unshift(255&r),r>>=8;return t}function n(r,t,o){let e=0;for(let n=0;n<o;n++)e=256*e+r[t+n];return e}function s(t){if(Array.isArray(t)){let r=[];if(t.forEach((function(t){r=r.concat(s(t))})),r.length<=55)return r.unshift(192+r.length),r;const o=e(r.length);return o.unshift(247+o.length),o.concat(r)}r.isBytesLike(t)||o.throwArgumentError("RLP object must be BytesLike","object",t);const n=Array.prototype.slice.call(r.arrayify(t));if(1===n.length&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;const c=e(n.length);return c.unshift(183+c.length),c.concat(n)}function c(t){return r.hexlify(s(t))}function h(r,e,n,s){const c=[];for(;n<e+1+s;){const h=u(r,n);c.push(h.result),(n+=h.consumed)>e+1+s&&o.throwError("child data too short",t.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+s,result:c}}function u(e,s){if(0===e.length&&o.throwError("data too short",t.Logger.errors.BUFFER_OVERRUN,{}),e[s]>=248){const r=e[s]-247;s+1+r>e.length&&o.throwError("data short segment too short",t.Logger.errors.BUFFER_OVERRUN,{});const c=n(e,s+1,r);return s+1+r+c>e.length&&o.throwError("data long segment too short",t.Logger.errors.BUFFER_OVERRUN,{}),h(e,s,s+1+r,r+c)}if(e[s]>=192){const r=e[s]-192;return s+1+r>e.length&&o.throwError("data array too short",t.Logger.errors.BUFFER_OVERRUN,{}),h(e,s,s+1,r)}if(e[s]>=184){const c=e[s]-183;s+1+c>e.length&&o.throwError("data array too short",t.Logger.errors.BUFFER_OVERRUN,{});const h=n(e,s+1,c);s+1+c+h>e.length&&o.throwError("data array too short",t.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+c+h,result:r.hexlify(e.slice(s+1+c,s+1+c+h))}}if(e[s]>=128){const n=e[s]-128;s+1+n>e.length&&o.throwError("data too short",t.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+n,result:r.hexlify(e.slice(s+1,s+1+n))}}return{consumed:1,result:r.hexlify(e[s])}}function l(t){const e=r.arrayify(t),n=u(e,0);return n.consumed!==e.length&&o.throwArgumentError("invalid rlp data","data",t),n.result}var a=Object.freeze({__proto__:null,encode:c,decode:l});exports.decode=l,exports.encode=c,exports.lib_esm=a;
@@ -1 +1 @@
1
- "use strict";var e=require("./index-190d3dfb.cjs"),r=require("./interface-2f383f06.cjs"),t=Object.freeze({__proto__:null,ConstructorFragment:r.ConstructorFragment,ErrorFragment:r.ErrorFragment,EventFragment:r.EventFragment,Fragment:r.Fragment,FunctionFragment:r.FunctionFragment,ParamType:r.ParamType,FormatTypes:r.FormatTypes,AbiCoder:r.AbiCoder,defaultAbiCoder:r.defaultAbiCoder,Interface:r.Interface,Indexed:r.Indexed,checkResultErrors:r.checkResultErrors,LogDescription:r.LogDescription,TransactionDescription:r.TransactionDescription}),n=e.getAugmentedNamespace(t);exports.require$$0=n;
1
+ "use strict";var e=require("./index-f56317c4.cjs"),r=require("./interface-a86a59a0.cjs"),t=Object.freeze({__proto__:null,ConstructorFragment:r.ConstructorFragment,ErrorFragment:r.ErrorFragment,EventFragment:r.EventFragment,Fragment:r.Fragment,FunctionFragment:r.FunctionFragment,ParamType:r.ParamType,FormatTypes:r.FormatTypes,AbiCoder:r.AbiCoder,defaultAbiCoder:r.defaultAbiCoder,Interface:r.Interface,Indexed:r.Indexed,checkResultErrors:r.checkResultErrors,LogDescription:r.LogDescription,TransactionDescription:r.TransactionDescription}),n=e.getAugmentedNamespace(t);exports.require$$0=n;
@@ -1 +1 @@
1
- "use strict";var t=require("@ethersproject/address"),e=require("@ethersproject/bytes"),r=require("./index-190d3dfb.cjs"),n=require("@ethersproject/properties"),o=require("./id-d616b7a6.cjs");const i="hash/5.7.0";function s(t){t=atob(t);const r=[];for(let e=0;e<t.length;e++)r.push(t.charCodeAt(e));return e.arrayify(r)}function a(t){t=e.arrayify(t);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}var c=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};const u=new o.Logger(i),l=new Uint8Array(32);l.fill(0);const f=o.BigNumber.from(-1),h=o.BigNumber.from(0),d=o.BigNumber.from(1),y=o.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const p=e.hexZeroPad(d.toHexString(),32),m=e.hexZeroPad(h.toHexString(),32),g={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},v=["name","version","chainId","verifyingContract","salt"];function w(t){return function(e){return"string"!=typeof e&&u.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const E={name:w("name"),version:w("version"),chainId:function(t){try{return o.BigNumber.from(t).toString()}catch(t){}return u.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(e){try{return t.getAddress(e).toLowerCase()}catch(t){}return u.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(t){try{const r=e.arrayify(t);if(32!==r.length)throw new Error("bad length");return e.hexlify(r)}catch(t){}return u.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function b(n){{const t=n.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],i=parseInt(t[2]||"256");(i%8!=0||i>256||t[2]&&t[2]!==String(i))&&u.throwArgumentError("invalid numeric width","type",n);const s=y.mask(r?i-1:i),a=r?s.add(d).mul(f):h;return function(t){const r=o.BigNumber.from(t);return(r.lt(a)||r.gt(s))&&u.throwArgumentError(`value out-of-bounds for ${n}`,"value",t),e.hexZeroPad(r.toTwos(256).toHexString(),32)}}}{const t=n.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&u.throwArgumentError("invalid bytes width","type",n),function(t){return e.arrayify(t).length!==r&&u.throwArgumentError(`invalid length for ${n}`,"value",t),function(t){const r=e.arrayify(t),n=r.length%32;return n?e.hexConcat([r,l.slice(n)]):e.hexlify(r)}(t)}}}switch(n){case"address":return function(r){return e.hexZeroPad(t.getAddress(r),32)};case"bool":return function(t){return t?p:m};case"bytes":return function(t){return r.keccak256(t)};case"string":return function(t){return o.id(t)}}return null}function x(t,e){return`${t}(${e.map((({name:t,type:e})=>e+" "+t)).join(",")})`}class C{constructor(t){n.defineReadOnly(this,"types",Object.freeze(n.deepCopy(t))),n.defineReadOnly(this,"_encoderCache",{}),n.defineReadOnly(this,"_types",{});const e={},r={},o={};Object.keys(t).forEach((t=>{e[t]={},r[t]=[],o[t]={}}));for(const n in t){const o={};t[n].forEach((i=>{o[i.name]&&u.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",t),o[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===n&&u.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",t);b(s)||(r[s]||u.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",t),r[s].push(n),e[n][s]=!0)}))}const i=Object.keys(r).filter((t=>0===r[t].length));0===i.length?u.throwArgumentError("missing primary type","types",t):i.length>1&&u.throwArgumentError(`ambiguous primary types or unused types: ${i.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),n.defineReadOnly(this,"primaryType",i[0]),function n(i,s){s[i]&&u.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",t),s[i]=!0,Object.keys(e[i]).forEach((t=>{r[t]&&(n(t,s),Object.keys(s).forEach((e=>{o[e][t]=!0})))})),delete s[i]}(this.primaryType,{});for(const e in o){const r=Object.keys(o[e]);r.sort(),this._types[e]=x(e,t[e])+r.map((e=>x(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=b(t);if(e)return e}const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],o=this.getEncoder(t),i=parseInt(n[3]);return n=>{i>=0&&n.length!==i&&u.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",n);let s=n.map(o);return this._types[t]&&(s=s.map(r.keccak256)),r.keccak256(e.hexConcat(s))}}const i=this.types[t];if(i){const n=o.id(this._types[t]);return t=>{const o=i.map((({name:e,type:n})=>{const o=this.getEncoder(n)(t[e]);return this._types[n]?r.keccak256(o):o}));return o.unshift(n),e.hexConcat(o)}}return u.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const e=this._types[t];return e||u.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return r.keccak256(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(b(t))return r(t,e);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],o=parseInt(n[3]);return o>=0&&e.length!==o&&u.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,r)))}const o=this.types[t];return o?o.reduce(((t,{name:n,type:o})=>(t[n]=this._visit(o,e[n],r),t)),{}):u.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new C(t)}static getPrimaryType(t){return C.from(t).primaryType}static hashStruct(t,e,r){return C.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){const n=g[r];n||u.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:n})}return e.sort(((t,e)=>v.indexOf(t.name)-v.indexOf(e.name))),C.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,r,n){return e.hexConcat(["0x1901",C.hashDomain(t),C.from(r).hash(n)])}static hash(t,e,n){return r.keccak256(C.encode(t,e,n))}static resolveNames(t,r,o,i){return c(this,void 0,void 0,(function*(){t=n.shallowCopy(t);const s={};t.verifyingContract&&!e.isHexString(t.verifyingContract,20)&&(s[t.verifyingContract]="0x");const a=C.from(r);a.visit(o,((t,r)=>("address"!==t||e.isHexString(r,20)||(s[r]="0x"),r)));for(const t in s)s[t]=yield i(t);return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),o=a.visit(o,((t,e)=>"address"===t&&s[e]?s[e]:e)),{domain:t,value:o}}))}static getPayload(t,r,i){C.hashDomain(t);const s={},a=[];v.forEach((e=>{const r=t[e];null!=r&&(s[e]=E[e](r),a.push({name:e,type:g[e]}))}));const c=C.from(r),l=n.shallowCopy(r);return l.EIP712Domain?u.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):l.EIP712Domain=a,c.encode(i),{types:l,domain:s,primaryType:c.primaryType,message:c.visit(i,((t,r)=>{if(t.match(/^bytes(\d*)/))return e.hexlify(e.arrayify(r));if(t.match(/^u?int/))return o.BigNumber.from(r).toString();switch(t){case"address":return r.toLowerCase();case"bool":return!!r;case"string":return"string"!=typeof r&&u.throwArgumentError("invalid string","value",r),r}return u.throwArgumentError("unsupported type","type",t)}))}}}var S=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};function k(t,r){return S(this,void 0,void 0,(function*(){null==r&&(r={});const n={method:r.method||"GET",headers:r.headers||{},body:r.body||void 0};if(!0!==r.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),null!=r.fetchOptions){const t=r.fetchOptions;t.mode&&(n.mode=t.mode),t.cache&&(n.cache=t.cache),t.credentials&&(n.credentials=t.credentials),t.redirect&&(n.redirect=t.redirect),t.referrer&&(n.referrer=t.referrer)}const o=yield fetch(t,n),i=yield o.arrayBuffer(),s={};return o.headers.forEach?o.headers.forEach(((t,e)=>{s[e.toLowerCase()]=t})):o.headers.keys().forEach((t=>{s[t.toLowerCase()]=o.headers.get(t)})),{headers:s,statusCode:o.status,statusMessage:o.statusText,body:e.arrayify(new Uint8Array(i))}}))}var O=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};const R=new o.Logger("web/5.7.1");function A(t){return new Promise((e=>{setTimeout(e,t)}))}function T(t,r){if(null==t)return null;if("string"==typeof t)return t;if(e.isBytesLike(t)){if(r&&("text"===r.split("/")[0]||"application/json"===r.split(";")[0].trim()))try{return o.toUtf8String(t)}catch(t){}return e.hexlify(t)}return t}function _(t,e,r){const i="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;R.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const c="object"==typeof t?t.throttleCallback:null,u="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;R.assertArgument(u>0&&u%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",u);const l="object"==typeof t&&!!t.errorPassThrough,f={};let h=null;const d={method:"GET"};let y=!1,p=12e4;if("string"==typeof t)h=t;else if("object"==typeof t){if(null!=t&&null!=t.url||R.throwArgumentError("missing URL","connection.url",t),h=t.url,"number"==typeof t.timeout&&t.timeout>0&&(p=t.timeout),t.headers)for(const e in t.headers)f[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(y=!0);if(d.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==h.substring(0,6)&&!0!==t.allowInsecureAuthentication&&R.throwError("basic authentication requires a secure https url",o.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:h,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;f.authorization={key:"Authorization",value:"Basic "+a(o.toUtf8Bytes(e))}}null!=t.skipFetchSetup&&(d.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(d.fetchOptions=n.shallowCopy(t.fetchOptions))}const m=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),g=h?h.match(m):null;if(g)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":g[1]||"text/plain"},body:g[2]?s(g[3]):(v=g[3],o.toUtf8Bytes(v.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(t){R.throwError("processing response error",o.Logger.errors.SERVER_ERROR,{body:T(g[1],g[2]),error:t,requestBody:null,requestMethod:"GET",url:h})}var v;e&&(d.method="POST",d.body=e,null==f["content-type"]&&(f["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==f["content-length"]&&(f["content-length"]={key:"Content-Length",value:String(e.length)}));const w={};Object.keys(f).forEach((t=>{const e=f[t];w[e.key]=e.value})),d.headers=w;const E=function(){let t=null;return{promise:new Promise((function(e,r){p&&(t=setTimeout((()=>{null!=t&&(t=null,r(R.makeError("timeout",o.Logger.errors.TIMEOUT,{requestBody:T(d.body,w["content-type"]),requestMethod:d.method,timeout:p,url:h})))}),p))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),b=function(){return O(this,void 0,void 0,(function*(){for(let t=0;t<i;t++){let e=null;try{if(e=yield k(h,d),t<i)if(301===e.statusCode||302===e.statusCode){const t=e.headers.location||"";if("GET"===d.method&&t.match(/^https:/)){h=e.headers.location;continue}}else if(429===e.statusCode){let r=!0;if(c&&(r=yield c(t,h)),r){let r=0;const n=e.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):u*parseInt(String(Math.random()*Math.pow(2,t))),yield A(r);continue}}}catch(t){e=t.response,null==e&&(E.cancel(),R.throwError("missing response",o.Logger.errors.SERVER_ERROR,{requestBody:T(d.body,w["content-type"]),requestMethod:d.method,serverError:t,url:h}))}let n=e.body;if(y&&304===e.statusCode?n=null:!l&&(e.statusCode<200||e.statusCode>=300)&&(E.cancel(),R.throwError("bad response",o.Logger.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:T(n,e.headers?e.headers["content-type"]:null),requestBody:T(d.body,w["content-type"]),requestMethod:d.method,url:h})),r)try{const t=yield r(n,e);return E.cancel(),t}catch(r){if(r.throttleRetry&&t<i){let e=!0;if(c&&(e=yield c(t,h)),e){const e=u*parseInt(String(Math.random()*Math.pow(2,t)));yield A(e);continue}}E.cancel(),R.throwError("processing response error",o.Logger.errors.SERVER_ERROR,{body:T(n,e.headers?e.headers["content-type"]:null),error:r,requestBody:T(d.body,w["content-type"]),requestMethod:d.method,url:h})}return E.cancel(),n}return R.throwError("failed response",o.Logger.errors.SERVER_ERROR,{requestBody:T(d.body,w["content-type"]),requestMethod:d.method,url:h})}))}();return Promise.race([E.promise,b])}function I(t,e,r){let i=null;if(null!=e){i=o.toUtf8Bytes(e);const r="string"==typeof t?{url:t}:n.shallowCopy(t);if(r.headers){0!==Object.keys(r.headers).filter((t=>"content-type"===t.toLowerCase())).length||(r.headers=n.shallowCopy(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return _(t,i,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse(o.toUtf8String(t))}catch(e){R.throwError("invalid JSON",o.Logger.errors.SERVER_ERROR,{body:t,error:e})}return r&&(n=r(n,e)),n}))}function L(t,e){return e||(e={}),null==(e=n.shallowCopy(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let o=null,i=!1;const s=()=>!i&&(i=!0,o&&clearTimeout(o),!0);e.timeout&&(o=setTimeout((()=>{s()&&n(new Error("timeout"))}),e.timeout));const a=e.retryLimit;let c=0;!function o(){return t().then((function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",o);else if(e.onceBlock)e.onceBlock.once("block",o);else if(!i){if(c++,c>a)return void(s()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,c)));t<e.floor&&(t=e.floor),t>e.ceiling&&(t=e.ceiling),setTimeout(o,t)}return null}),(function(t){s()&&n(t)}))}()}))}var j=Object.freeze({__proto__:null,_fetchData:_,fetchJson:I,poll:L});exports.TypedDataEncoder=C,exports._fetchData=_,exports.decode=s,exports.encode=a,exports.fetchJson=I,exports.lib_esm=j,exports.poll=L,exports.version=i;
1
+ "use strict";var t=require("@ethersproject/address"),e=require("@ethersproject/bytes"),r=require("./index-f56317c4.cjs"),n=require("@ethersproject/properties"),o=require("./id-80cf99a8.cjs");const i="hash/5.7.0";function s(t){t=atob(t);const r=[];for(let e=0;e<t.length;e++)r.push(t.charCodeAt(e));return e.arrayify(r)}function a(t){t=e.arrayify(t);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}var c=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};const u=new o.Logger(i),l=new Uint8Array(32);l.fill(0);const f=o.BigNumber.from(-1),h=o.BigNumber.from(0),d=o.BigNumber.from(1),y=o.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const p=e.hexZeroPad(d.toHexString(),32),m=e.hexZeroPad(h.toHexString(),32),g={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},v=["name","version","chainId","verifyingContract","salt"];function w(t){return function(e){return"string"!=typeof e&&u.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const E={name:w("name"),version:w("version"),chainId:function(t){try{return o.BigNumber.from(t).toString()}catch(t){}return u.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(e){try{return t.getAddress(e).toLowerCase()}catch(t){}return u.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(t){try{const r=e.arrayify(t);if(32!==r.length)throw new Error("bad length");return e.hexlify(r)}catch(t){}return u.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function b(n){{const t=n.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],i=parseInt(t[2]||"256");(i%8!=0||i>256||t[2]&&t[2]!==String(i))&&u.throwArgumentError("invalid numeric width","type",n);const s=y.mask(r?i-1:i),a=r?s.add(d).mul(f):h;return function(t){const r=o.BigNumber.from(t);return(r.lt(a)||r.gt(s))&&u.throwArgumentError(`value out-of-bounds for ${n}`,"value",t),e.hexZeroPad(r.toTwos(256).toHexString(),32)}}}{const t=n.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&u.throwArgumentError("invalid bytes width","type",n),function(t){return e.arrayify(t).length!==r&&u.throwArgumentError(`invalid length for ${n}`,"value",t),function(t){const r=e.arrayify(t),n=r.length%32;return n?e.hexConcat([r,l.slice(n)]):e.hexlify(r)}(t)}}}switch(n){case"address":return function(r){return e.hexZeroPad(t.getAddress(r),32)};case"bool":return function(t){return t?p:m};case"bytes":return function(t){return r.keccak256(t)};case"string":return function(t){return o.id(t)}}return null}function x(t,e){return`${t}(${e.map((({name:t,type:e})=>e+" "+t)).join(",")})`}class C{constructor(t){n.defineReadOnly(this,"types",Object.freeze(n.deepCopy(t))),n.defineReadOnly(this,"_encoderCache",{}),n.defineReadOnly(this,"_types",{});const e={},r={},o={};Object.keys(t).forEach((t=>{e[t]={},r[t]=[],o[t]={}}));for(const n in t){const o={};t[n].forEach((i=>{o[i.name]&&u.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",t),o[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===n&&u.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",t);b(s)||(r[s]||u.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",t),r[s].push(n),e[n][s]=!0)}))}const i=Object.keys(r).filter((t=>0===r[t].length));0===i.length?u.throwArgumentError("missing primary type","types",t):i.length>1&&u.throwArgumentError(`ambiguous primary types or unused types: ${i.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),n.defineReadOnly(this,"primaryType",i[0]),function n(i,s){s[i]&&u.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",t),s[i]=!0,Object.keys(e[i]).forEach((t=>{r[t]&&(n(t,s),Object.keys(s).forEach((e=>{o[e][t]=!0})))})),delete s[i]}(this.primaryType,{});for(const e in o){const r=Object.keys(o[e]);r.sort(),this._types[e]=x(e,t[e])+r.map((e=>x(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=b(t);if(e)return e}const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],o=this.getEncoder(t),i=parseInt(n[3]);return n=>{i>=0&&n.length!==i&&u.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",n);let s=n.map(o);return this._types[t]&&(s=s.map(r.keccak256)),r.keccak256(e.hexConcat(s))}}const i=this.types[t];if(i){const n=o.id(this._types[t]);return t=>{const o=i.map((({name:e,type:n})=>{const o=this.getEncoder(n)(t[e]);return this._types[n]?r.keccak256(o):o}));return o.unshift(n),e.hexConcat(o)}}return u.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const e=this._types[t];return e||u.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return r.keccak256(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(b(t))return r(t,e);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],o=parseInt(n[3]);return o>=0&&e.length!==o&&u.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,r)))}const o=this.types[t];return o?o.reduce(((t,{name:n,type:o})=>(t[n]=this._visit(o,e[n],r),t)),{}):u.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new C(t)}static getPrimaryType(t){return C.from(t).primaryType}static hashStruct(t,e,r){return C.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){const n=g[r];n||u.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:n})}return e.sort(((t,e)=>v.indexOf(t.name)-v.indexOf(e.name))),C.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,r,n){return e.hexConcat(["0x1901",C.hashDomain(t),C.from(r).hash(n)])}static hash(t,e,n){return r.keccak256(C.encode(t,e,n))}static resolveNames(t,r,o,i){return c(this,void 0,void 0,(function*(){t=n.shallowCopy(t);const s={};t.verifyingContract&&!e.isHexString(t.verifyingContract,20)&&(s[t.verifyingContract]="0x");const a=C.from(r);a.visit(o,((t,r)=>("address"!==t||e.isHexString(r,20)||(s[r]="0x"),r)));for(const t in s)s[t]=yield i(t);return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),o=a.visit(o,((t,e)=>"address"===t&&s[e]?s[e]:e)),{domain:t,value:o}}))}static getPayload(t,r,i){C.hashDomain(t);const s={},a=[];v.forEach((e=>{const r=t[e];null!=r&&(s[e]=E[e](r),a.push({name:e,type:g[e]}))}));const c=C.from(r),l=n.shallowCopy(r);return l.EIP712Domain?u.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):l.EIP712Domain=a,c.encode(i),{types:l,domain:s,primaryType:c.primaryType,message:c.visit(i,((t,r)=>{if(t.match(/^bytes(\d*)/))return e.hexlify(e.arrayify(r));if(t.match(/^u?int/))return o.BigNumber.from(r).toString();switch(t){case"address":return r.toLowerCase();case"bool":return!!r;case"string":return"string"!=typeof r&&u.throwArgumentError("invalid string","value",r),r}return u.throwArgumentError("unsupported type","type",t)}))}}}var S=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};function k(t,r){return S(this,void 0,void 0,(function*(){null==r&&(r={});const n={method:r.method||"GET",headers:r.headers||{},body:r.body||void 0};if(!0!==r.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),null!=r.fetchOptions){const t=r.fetchOptions;t.mode&&(n.mode=t.mode),t.cache&&(n.cache=t.cache),t.credentials&&(n.credentials=t.credentials),t.redirect&&(n.redirect=t.redirect),t.referrer&&(n.referrer=t.referrer)}const o=yield fetch(t,n),i=yield o.arrayBuffer(),s={};return o.headers.forEach?o.headers.forEach(((t,e)=>{s[e.toLowerCase()]=t})):o.headers.keys().forEach((t=>{s[t.toLowerCase()]=o.headers.get(t)})),{headers:s,statusCode:o.status,statusMessage:o.statusText,body:e.arrayify(new Uint8Array(i))}}))}var O=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};const R=new o.Logger("web/5.7.1");function A(t){return new Promise((e=>{setTimeout(e,t)}))}function T(t,r){if(null==t)return null;if("string"==typeof t)return t;if(e.isBytesLike(t)){if(r&&("text"===r.split("/")[0]||"application/json"===r.split(";")[0].trim()))try{return o.toUtf8String(t)}catch(t){}return e.hexlify(t)}return t}function _(t,e,r){const i="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;R.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const c="object"==typeof t?t.throttleCallback:null,u="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;R.assertArgument(u>0&&u%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",u);const l="object"==typeof t&&!!t.errorPassThrough,f={};let h=null;const d={method:"GET"};let y=!1,p=12e4;if("string"==typeof t)h=t;else if("object"==typeof t){if(null!=t&&null!=t.url||R.throwArgumentError("missing URL","connection.url",t),h=t.url,"number"==typeof t.timeout&&t.timeout>0&&(p=t.timeout),t.headers)for(const e in t.headers)f[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(y=!0);if(d.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==h.substring(0,6)&&!0!==t.allowInsecureAuthentication&&R.throwError("basic authentication requires a secure https url",o.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:h,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;f.authorization={key:"Authorization",value:"Basic "+a(o.toUtf8Bytes(e))}}null!=t.skipFetchSetup&&(d.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(d.fetchOptions=n.shallowCopy(t.fetchOptions))}const m=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),g=h?h.match(m):null;if(g)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":g[1]||"text/plain"},body:g[2]?s(g[3]):(v=g[3],o.toUtf8Bytes(v.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(t){R.throwError("processing response error",o.Logger.errors.SERVER_ERROR,{body:T(g[1],g[2]),error:t,requestBody:null,requestMethod:"GET",url:h})}var v;e&&(d.method="POST",d.body=e,null==f["content-type"]&&(f["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==f["content-length"]&&(f["content-length"]={key:"Content-Length",value:String(e.length)}));const w={};Object.keys(f).forEach((t=>{const e=f[t];w[e.key]=e.value})),d.headers=w;const E=function(){let t=null;return{promise:new Promise((function(e,r){p&&(t=setTimeout((()=>{null!=t&&(t=null,r(R.makeError("timeout",o.Logger.errors.TIMEOUT,{requestBody:T(d.body,w["content-type"]),requestMethod:d.method,timeout:p,url:h})))}),p))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),b=function(){return O(this,void 0,void 0,(function*(){for(let t=0;t<i;t++){let e=null;try{if(e=yield k(h,d),t<i)if(301===e.statusCode||302===e.statusCode){const t=e.headers.location||"";if("GET"===d.method&&t.match(/^https:/)){h=e.headers.location;continue}}else if(429===e.statusCode){let r=!0;if(c&&(r=yield c(t,h)),r){let r=0;const n=e.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):u*parseInt(String(Math.random()*Math.pow(2,t))),yield A(r);continue}}}catch(t){e=t.response,null==e&&(E.cancel(),R.throwError("missing response",o.Logger.errors.SERVER_ERROR,{requestBody:T(d.body,w["content-type"]),requestMethod:d.method,serverError:t,url:h}))}let n=e.body;if(y&&304===e.statusCode?n=null:!l&&(e.statusCode<200||e.statusCode>=300)&&(E.cancel(),R.throwError("bad response",o.Logger.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:T(n,e.headers?e.headers["content-type"]:null),requestBody:T(d.body,w["content-type"]),requestMethod:d.method,url:h})),r)try{const t=yield r(n,e);return E.cancel(),t}catch(r){if(r.throttleRetry&&t<i){let e=!0;if(c&&(e=yield c(t,h)),e){const e=u*parseInt(String(Math.random()*Math.pow(2,t)));yield A(e);continue}}E.cancel(),R.throwError("processing response error",o.Logger.errors.SERVER_ERROR,{body:T(n,e.headers?e.headers["content-type"]:null),error:r,requestBody:T(d.body,w["content-type"]),requestMethod:d.method,url:h})}return E.cancel(),n}return R.throwError("failed response",o.Logger.errors.SERVER_ERROR,{requestBody:T(d.body,w["content-type"]),requestMethod:d.method,url:h})}))}();return Promise.race([E.promise,b])}function I(t,e,r){let i=null;if(null!=e){i=o.toUtf8Bytes(e);const r="string"==typeof t?{url:t}:n.shallowCopy(t);if(r.headers){0!==Object.keys(r.headers).filter((t=>"content-type"===t.toLowerCase())).length||(r.headers=n.shallowCopy(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return _(t,i,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse(o.toUtf8String(t))}catch(e){R.throwError("invalid JSON",o.Logger.errors.SERVER_ERROR,{body:t,error:e})}return r&&(n=r(n,e)),n}))}function L(t,e){return e||(e={}),null==(e=n.shallowCopy(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let o=null,i=!1;const s=()=>!i&&(i=!0,o&&clearTimeout(o),!0);e.timeout&&(o=setTimeout((()=>{s()&&n(new Error("timeout"))}),e.timeout));const a=e.retryLimit;let c=0;!function o(){return t().then((function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",o);else if(e.onceBlock)e.onceBlock.once("block",o);else if(!i){if(c++,c>a)return void(s()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,c)));t<e.floor&&(t=e.floor),t>e.ceiling&&(t=e.ceiling),setTimeout(o,t)}return null}),(function(t){s()&&n(t)}))}()}))}var j=Object.freeze({__proto__:null,_fetchData:_,fetchJson:I,poll:L});exports.TypedDataEncoder=C,exports._fetchData=_,exports.decode=s,exports.encode=a,exports.fetchJson=I,exports.lib_esm=j,exports.poll=L,exports.version=i;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./index-f56317c4.cjs"),r=require("@ethersproject/address");require("events");var t=require("@ethersproject/bytes"),n=require("./id-80cf99a8.cjs"),i=require("./index-4925f240.cjs"),o=require("@ethersproject/abstract-signer"),s=require("./DefaultJsonRpcProvider-a94708b3.cjs"),a=require("@ethersproject/properties");require("@ethersproject/providers"),require("zustand"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/transactions"),require("./bn-f89c8fd2.cjs"),require("./__node-resolve_empty-26284176.cjs");class d extends o.Signer{constructor(e,r,t,n){super(),this._address=r,this._index=null!=t?t:0,this.provider=e,this.app=n}_legacySignMessage(e){throw new Error("Method not implemented.")}sendUncheckedTransaction(e){throw new Error("Method not implemented.")}unlock(e){throw new Error("Method not implemented.")}getAddress(){return e.__awaiter(this,void 0,void 0,(function*(){return Promise.resolve(r.getAddress(this._address))}))}signMessage(r){return e.__awaiter(this,void 0,void 0,(function*(){const i=e.getOwnerProvider(),o="string"==typeof r?n.toUtf8Bytes(r):r,s=yield this.getAddress();return yield i.send("personal_sign",[t.hexlify(o),s.toLowerCase()])}))}_signTypedData(r,t,n){var o,s;return e.__awaiter(this,void 0,void 0,(function*(){const a=e.getOwnerProvider(),d=yield i.TypedDataEncoder.resolveNames(r,t,n,(r=>e.__awaiter(this,void 0,void 0,(function*(){return yield a.resolveName(r)})))),c=null!==(s=null===(o=e.getCyberAccount())||void 0===o?void 0:o.ownerAddress)&&void 0!==s?s:"";return yield a.send("eth_signTypedData_v4",[c.toLowerCase(),JSON.stringify(i.TypedDataEncoder.getPayload(d.domain,t,d.value))])}))}signTransaction(r){return e.__awaiter(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}sendTransaction(r){return e.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getChainId(),n=e.getCyberChain(this.app,t);return{hash:yield n.sendTransaction({to:r.to,value:r.value,data:r.data}).catch((r=>{if(r.name===e.ErrorType.SendTransactionError&&(console.error(r.shortMessage),r.shortMessage))throw new Error(r.shortMessage);throw r}))}}))}connect(e){return new d(null!=e?e:this.provider,this._address,this._index,this.app)}connectUnchecked(){return new d(this.provider,this._address,this._index,this.app)}}exports.getIsCyber=e.getIsCyber,exports.default=function(t,n){return e.__awaiter(this,void 0,void 0,(function*(){const i=yield function({appName:t,appLogoUrl:n,rpcUrl:i,rpc:o,chainId:c,cyberParams:u,JsonRpcProvider:h=s.DefaultJsonRpcProvider}){return e.__awaiter(this,void 0,void 0,(function*(){if(!t||!n)throw new Error("appName and appLogoUrl is required.");if(!(null==u?void 0:u.appId))throw new Error("cyberParams.appId and appLogoUrl is required.");const{app:s,cyberAccount:p}=yield e.connect({appName:t,appLogoUrl:n,appId:null==u?void 0:u.appId});if(!p)throw new Error("cyberAccount is not valid.");const l=p.address,v=new class extends h{constructor(r,t){super(r,t),this.updateUpWalletConfig=r=>{const t=null==o?void 0:o[r];if(!e.supportChains.includes(r))throw new Error(`chainId ${r} not supported`);if("object"==typeof this.network)this.network.chainId=r;else{const e={chainId:r,name:"unknown"};a.defineReadOnly(this,"_network",e),this.emit("network",e,null)}return this.rpcUrl=t,this.emit("chainChanged",`0x${r.toString(16)}`),{result:!0}}}getSigner(){return new d(v,l,0,s)}listAccounts(){return e.__awaiter(this,void 0,void 0,(function*(){return[l]}))}getAddress(){return Promise.resolve(r.getAddress(l))}}(i,c);return v}))}(t);return i.on("connect",n.connect),i.on("disconnect",n.disconnect),i.on("accountsChanged",n.accountsChanged),i.on("chainChanged",n.chainChanged),i.on("message",n.message),i}))},exports.switchChain=function(r){var t;const n=r.addChainParameters.chainId,i="string"==typeof n&&(null==n?void 0:n.startsWith("0x"))?parseInt(n,16):Number(n);if(!e.supportChains.includes(i))throw new Error(`chainId ${i} not supported`);return null===(t=e.useWalletStore.getState().provider)||void 0===t?void 0:t.updateUpWalletConfig(i)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./index-f56317c4.cjs"),t=require("./browser-ponyfill-d62ef4bf.cjs"),s=require("./ethers-772b1cf3.cjs"),a=require("@ethersproject/abstract-signer"),r=require("./index-a5d1fc7d.cjs"),n=require("@ethersproject/providers"),o=require("@ethersproject/contracts"),i=require("./id-80cf99a8.cjs"),d=require("@ethersproject/constants"),c=require("events");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}require("zustand"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes"),require("./interface-a86a59a0.cjs"),require("./index-4925f240.cjs"),require("@ethersproject/json-wallets"),require("./index-3b1c3d83.cjs"),require("@ethersproject/abstract-provider"),require("./bn-f89c8fd2.cjs"),require("./__node-resolve_empty-26284176.cjs"),require("./hash-7ce6fed5.cjs"),require("./inherits_browser-50deae74.cjs");var f=u(n),h=u(d),g=l(c),p={},m={},_={},E={},v={},T={name:"@safe-global/safe-apps-sdk",version:"7.10.1",description:"SDK developed to integrate third-party apps with Safe app.",main:"dist/src/index.js",typings:"dist/src/index.d.ts",_files:["dist/**/*","src/**/*","CHANGELOG.md","README.md"],keywords:["Safe","sdk","apps"],scripts:{test:"jest","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json",build:"yarn rimraf dist && tsc && yarn format-dist"},author:"Safe (https://safe.global)",license:"MIT",dependencies:{"@safe-global/safe-gateway-typescript-sdk":"^3.5.3",ethers:"^5.7.2"},devDependencies:{rimraf:"^3.0.2"},repository:{type:"git",url:"git+https://github.com/safe-global/safe-apps-sdk.git"},bugs:{url:"https://github.com/safe-global/safe-apps-sdk/issues"},homepage:"https://github.com/safe-global/safe-apps-sdk#readme",publishConfig:{access:"public"}},y=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(v,"__esModule",{value:!0}),v.getSDKVersion=void 0;const w=y(T);v.getSDKVersion=()=>w.default.version.split("-")[0];var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.generateRequestId=void 0;const S=e=>e.toString(16).padStart(2,"0");b.generateRequestId=()=>"undefined"!=typeof window?(e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,S).join("")})(10):(new Date).getTime().toString(36),Object.defineProperty(E,"__esModule",{value:!0}),E.MessageFormatter=void 0;const I=v,A=b;class P{}E.MessageFormatter=P,P.makeRequest=(e,t)=>({id:(0,A.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,I.getSDKVersion)()}}),P.makeResponse=(e,t,s)=>({id:e,success:!0,version:s,data:t}),P.makeErrorResponse=(e,t,s)=>({id:e,success:!1,error:t,version:s});var O={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RestrictedMethods=e.Methods=void 0,(t=e.Methods||(e.Methods={})).sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions",(e.RestrictedMethods||(e.RestrictedMethods={})).requestAddressBook="requestAddressBook"}(O),function(t){var s=e.commonjsGlobal&&e.commonjsGlobal.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,a,r)}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),a=e.commonjsGlobal&&e.commonjsGlobal.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||s(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0});const r=E;t.default=class{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"==typeof window,this.isValidMessage=({origin:e,data:t,source:s})=>{const a=!t,r=!this.isServer&&s===window.parent,n=(void 0!==t.version&&parseInt(t.version.split(".")[0]))>=1;let o=!0;return Array.isArray(this.allowedOrigins)&&(o=void 0!==this.allowedOrigins.find((t=>t.test(e)))),!a&&r&&n&&o},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{const{id:t}=e,s=this.callbacks.get(t);s&&(s(e),this.callbacks.delete(t))},this.send=(e,t)=>{const s=r.MessageFormatter.makeRequest(e,t);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(s,"*"),new Promise(((e,t)=>{this.callbacks.set(s.id,(s=>{s.success?e(s):t(new Error(s.error))}))}))},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}},a(O,t)}(_);var C={},M={},j={};Object.defineProperty(j,"__esModule",{value:!0}),j.isObjectEIP712TypedData=void 0;j.isObjectEIP712TypedData=e=>"object"==typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e;var R={};Object.defineProperty(R,"__esModule",{value:!0});var N={},L={},D={},x={},G=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,s,a){return new(s||(s=Promise))((function(r,n){function o(e){try{d(a.next(e))}catch(e){n(e)}}function i(e){try{d(a.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,i)}d((a=a.apply(e,t||[])).next())}))},H=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(x,"__esModule",{value:!0}),x.fetchData=x.stringifyQuery=x.insertParams=void 0;const B=H(t.browserPonyfill.exports);x.insertParams=function(e,t){return t?Object.keys(t).reduce(((e,s)=>function(e,t,s){return e.replace(new RegExp(`\\{${t}\\}`,"g"),s)}(e,s,String(t[s]))),e):e},x.stringifyQuery=function(e){if(!e)return"";const t=new URLSearchParams;Object.keys(e).forEach((s=>{null!=e[s]&&t.append(s,String(e[s]))}));const s=t.toString();return s?`?${s}`:""},x.fetchData=function(e,t){return G(this,void 0,void 0,(function*(){let s;null!=t&&(s={method:"POST",body:"string"==typeof t?t:JSON.stringify(t),headers:{"Content-Type":"application/json"}});const a=yield(0,B.default)(e,s);let r;try{r=yield a.json()}catch(e){if(a.headers&&"0"!==a.headers.get("content-length"))throw new Error(`Invalid response content: ${a.statusText}`)}if(!a.ok){const e="object"==typeof(n=r)&&null!==n&&"code"in n&&"message"in n?`${r.code}: ${r.message}`:a.statusText;throw new Error(e)}var n;return r}))},Object.defineProperty(D,"__esModule",{value:!0}),D.getEndpoint=D.postEndpoint=void 0;const q=x;function k(e,t,s,a){return`${e}${(0,q.insertParams)(t,s)}${(0,q.stringifyQuery)(a)}`}D.postEndpoint=function(e,t,s){const a=k(e,t,null==s?void 0:s.path,null==s?void 0:s.query);return(0,q.fetchData)(a,null==s?void 0:s.body)},D.getEndpoint=function(e,t,s,a){if(a)return(0,q.fetchData)(a);const r=k(e,t,null==s?void 0:s.path,null==s?void 0:s.query);return(0,q.fetchData)(r)};var U={};Object.defineProperty(U,"__esModule",{value:!0}),U.DEFAULT_BASE_URL=void 0,U.DEFAULT_BASE_URL="https://safe-client.safe.global";var $={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,(t=e.ImplementationVersionState||(e.ImplementationVersionState={})).UP_TO_DATE="UP_TO_DATE",t.OUTDATED="OUTDATED",t.UNKNOWN="UNKNOWN"}($);var F={};!function(e){var t,s;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,(t=e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})).NoRestrictions="NO_RESTRICTIONS",t.DomainAllowlist="DOMAIN_ALLOWLIST",(e.SafeAppFeatures||(e.SafeAppFeatures={})).BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS",(s=e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={})).TWITTER="TWITTER",s.GITHUB="GITHUB",s.DISCORD="DISCORD"}(F);var W={};!function(e){var t,s,a,r,n,o,i,d,c,l;Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,(t=e.Operation||(e.Operation={}))[t.CALL=0]="CALL",t[t.DELEGATE=1]="DELEGATE",(s=e.TransactionStatus||(e.TransactionStatus={})).AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",s.AWAITING_EXECUTION="AWAITING_EXECUTION",s.CANCELLED="CANCELLED",s.FAILED="FAILED",s.SUCCESS="SUCCESS",(a=e.TransferDirection||(e.TransferDirection={})).INCOMING="INCOMING",a.OUTGOING="OUTGOING",a.UNKNOWN="UNKNOWN",(r=e.TransactionTokenType||(e.TransactionTokenType={})).ERC20="ERC20",r.ERC721="ERC721",r.NATIVE_COIN="NATIVE_COIN",(n=e.SettingsInfoType||(e.SettingsInfoType={})).SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",n.ADD_OWNER="ADD_OWNER",n.REMOVE_OWNER="REMOVE_OWNER",n.SWAP_OWNER="SWAP_OWNER",n.CHANGE_THRESHOLD="CHANGE_THRESHOLD",n.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",n.ENABLE_MODULE="ENABLE_MODULE",n.DISABLE_MODULE="DISABLE_MODULE",n.SET_GUARD="SET_GUARD",n.DELETE_GUARD="DELETE_GUARD",(o=e.TransactionInfoType||(e.TransactionInfoType={})).TRANSFER="Transfer",o.SETTINGS_CHANGE="SettingsChange",o.CUSTOM="Custom",o.CREATION="Creation",(i=e.ConflictType||(e.ConflictType={})).NONE="None",i.HAS_NEXT="HasNext",i.END="End",(d=e.TransactionListItemType||(e.TransactionListItemType={})).TRANSACTION="TRANSACTION",d.LABEL="LABEL",d.CONFLICT_HEADER="CONFLICT_HEADER",d.DATE_LABEL="DATE_LABEL",(c=e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})).MULTISIG="MULTISIG",c.MODULE="MODULE",(l=e.LabelValue||(e.LabelValue={})).Queued="Queued",l.Next="Next"}(W);var V={};!function(e){var t,s,a;Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,(t=e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})).API_KEY_PATH="API_KEY_PATH",t.NO_AUTHENTICATION="NO_AUTHENTICATION",t.UNKNOWN="UNKNOWN",(s=e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})).ORACLE="ORACLE",s.FIXED="FIXED",s.UNKNOWN="UNKNOWN",(a=e.FEATURES||(e.FEATURES={})).ERC721="ERC721",a.SAFE_APPS="SAFE_APPS",a.CONTRACT_INTERACTION="CONTRACT_INTERACTION",a.DOMAIN_LOOKUP="DOMAIN_LOOKUP",a.SPENDING_LIMIT="SPENDING_LIMIT",a.EIP1559="EIP1559",a.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",a.TX_SIMULATION="TX_SIMULATION",a.EIP1271="EIP1271"}(V);var K={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,(t=e.TokenType||(e.TokenType={})).ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_TOKEN="NATIVE_TOKEN"}(K);var Q={};Object.defineProperty(Q,"__esModule",{value:!0});var X={};Object.defineProperty(X,"__esModule",{value:!0});var Y={};!function(e){var t,s;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,(t=e.SafeMessageListItemType||(e.SafeMessageListItemType={})).DATE_LABEL="DATE_LABEL",t.MESSAGE="MESSAGE",(s=e.SafeMessageStatus||(e.SafeMessageStatus={})).NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",s.CONFIRMED="CONFIRMED"}(Y),function(t){var s=e.commonjsGlobal&&e.commonjsGlobal.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,a,r)}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),a=e.commonjsGlobal&&e.commonjsGlobal.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||s(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.confirmSafeMessage=t.proposeSafeMessage=t.getSafeMessage=t.getSafeMessages=t.getDecodedData=t.getMasterCopies=t.getSafeApps=t.getChainConfig=t.getChainsConfig=t.proposeTransaction=t.postSafeGasEstimation=t.getTransactionDetails=t.getTransactionQueue=t.getTransactionHistory=t.getCollectiblesPage=t.getCollectibles=t.getOwnedSafes=t.getFiatCurrencies=t.getBalances=t.getMultisigTransactions=t.getModuleTransactions=t.getIncomingTransfers=t.getSafeInfo=t.setBaseUrl=void 0;const r=D,n=U;a($,t),a(F,t),a(W,t),a(V,t),a(K,t),a(Q,t),a(X,t),a(Y,t);let o=n.DEFAULT_BASE_URL;t.setBaseUrl=e=>{o=e},t.getSafeInfo=function(e,t){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},t.getIncomingTransfers=function(e,t,s,a){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:s},a)},t.getModuleTransactions=function(e,t,s,a){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:s},a)},t.getMultisigTransactions=function(e,t,s,a){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:s},a)},t.getBalances=function(e,t,s="usd",a={}){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:s},query:a})},t.getFiatCurrencies=function(){return(0,r.getEndpoint)(o,"/v1/balances/supported-fiat-codes")},t.getOwnedSafes=function(e,t){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},t.getCollectibles=function(e,t,s={}){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:s})},t.getCollectiblesPage=function(e,t,s={},a){return(0,r.getEndpoint)(o,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:s},a)},t.getTransactionHistory=function(e,t,s){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:{}},s)},t.getTransactionQueue=function(e,t,s,a){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:{trusted:a}},s)},t.getTransactionDetails=function(e,t){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},t.postSafeGasEstimation=function(e,t,s){return(0,r.postEndpoint)(o,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:s})},t.proposeTransaction=function(e,t,s){return(0,r.postEndpoint)(o,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:s})},t.getChainsConfig=function(e){return(0,r.getEndpoint)(o,"/v1/chains",{query:e})},t.getChainConfig=function(e){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}",{path:{chainId:e}})},t.getSafeApps=function(e,t={}){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},t.getMasterCopies=function(e){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},t.getDecodedData=function(e,t){return(0,r.postEndpoint)(o,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{data:t}})},t.getSafeMessages=function(e,t,s){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},s)},t.getSafeMessage=function(e,t){return(0,r.getEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},t.proposeSafeMessage=function(e,t,s){return(0,r.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:s})},t.confirmSafeMessage=function(e,t,s){return(0,r.postEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:s})}}(L),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=L;Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return t.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return t.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return t.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return t.TransferDirection}})}(N);var J={};Object.defineProperty(J,"__esModule",{value:!0}),function(t){var s=e.commonjsGlobal&&e.commonjsGlobal.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,a,r)}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),a=e.commonjsGlobal&&e.commonjsGlobal.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||s(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),a(j,t),a(R,t),a(N,t),a(J,t)}(M),Object.defineProperty(C,"__esModule",{value:!0}),C.TXs=void 0;const z=O,Z=M;C.TXs=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(z.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const t={message:e};return(await this.communicator.send(z.Methods.signMessage,t)).data}async signTypedMessage(e){if(!(0,Z.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(z.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw new Error("No transactions were passed");const s={txs:e,params:t};return(await this.communicator.send(z.Methods.sendTransactions,s)).data}};var ee={},te={};Object.defineProperty(te,"__esModule",{value:!0}),te.RPC_CALLS=void 0,te.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},Object.defineProperty(ee,"__esModule",{value:!0}),ee.Eth=void 0;const se=te,ae=O,re={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};ee.Eth=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:se.RPC_CALLS.eth_call,formatters:[null,re.defaultBlockParam]}),this.getBalance=this.buildRequest({call:se.RPC_CALLS.eth_getBalance,formatters:[null,re.defaultBlockParam]}),this.getCode=this.buildRequest({call:se.RPC_CALLS.eth_getCode,formatters:[null,re.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:se.RPC_CALLS.eth_getStorageAt,formatters:[null,re.blockNumberToHex,re.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:se.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:se.RPC_CALLS.eth_getBlockByHash,formatters:[null,re.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:se.RPC_CALLS.eth_getBlockByNumber,formatters:[re.blockNumberToHex,re.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:se.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:se.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:se.RPC_CALLS.eth_getTransactionCount,formatters:[null,re.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:se.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:se.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:se.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:t,formatters:s}=e;return async e=>{s&&Array.isArray(e)&&s.forEach(((t,s)=>{t&&(e[s]=t(e[s]))}));const a={call:t,params:e||[]};return(await this.communicator.send(ae.Methods.rpcCall,a)).data}}};var ne={};try{const e=window;null==e._ethers&&(e._ethers=s.ethers)}catch(e){}var oe=Object.freeze({__proto__:null,ethers:s.ethers,Signer:a.Signer,Wallet:r.Wallet,VoidSigner:a.VoidSigner,getDefaultProvider:n.getDefaultProvider,providers:f,BaseContract:o.BaseContract,Contract:o.Contract,ContractFactory:o.ContractFactory,BigNumber:i.BigNumber,FixedNumber:r.FixedNumber,constants:h,get errors(){return i.ErrorCode},logger:s.logger,utils:s.utils,wordlists:r.wordlists,version:s.version,Wordlist:r.Wordlist}),ie=e.getAugmentedNamespace(oe),de={};Object.defineProperty(de,"__esModule",{value:!0}),de.MAGIC_VALUE_BYTES=de.MAGIC_VALUE=de.EIP_1271_BYTES_INTERFACE=de.EIP_1271_INTERFACE=void 0;const ce=ie;de.MAGIC_VALUE="0x1626ba7e";de.MAGIC_VALUE_BYTES="0x20c13b0b";const le=new ce.ethers.utils.Interface(["function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view"]);de.EIP_1271_INTERFACE=le;const ue=new ce.ethers.utils.Interface(["function isValidSignature(bytes calldata _data, bytes calldata _signature) public view"]);de.EIP_1271_BYTES_INTERFACE=ue;var fe={},he={},ge={};Object.defineProperty(ge,"__esModule",{value:!0}),ge.PermissionsError=ge.PERMISSIONS_REQUEST_REJECTED=void 0,ge.PERMISSIONS_REQUEST_REJECTED=4001;class pe extends Error{constructor(e,t,s){super(e),this.code=t,this.data=s,Object.setPrototypeOf(this,pe.prototype)}}ge.PermissionsError=pe,Object.defineProperty(he,"__esModule",{value:!0}),he.Wallet=void 0;const me=O,_e=ge;he.Wallet=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(me.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new _e.PermissionsError("Permissions request is invalid",_e.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(me.Methods.wallet_requestPermissions,e)).data}catch(e){throw new _e.PermissionsError("Permissions rejected",_e.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every((e=>"object"==typeof e&&Object.keys(e).every((e=>!!Object.values(me.RestrictedMethods).includes(e)))))}},Object.defineProperty(fe,"__esModule",{value:!0});const Ee=he,ve=ge,Te=(e,t)=>t.some((t=>t.parentCapability===e));fe.default=()=>(e,t,s)=>{const a=s.value;return s.value=async function(){const e=new Ee.Wallet(this.communicator);let s=await e.getPermissions();if(Te(t,s)||(s=await e.requestPermissions([{[t]:{}}])),!Te(t,s))throw new ve.PermissionsError("Permissions rejected",ve.PERMISSIONS_REQUEST_REJECTED);return a.apply(this)},s};var ye=e.commonjsGlobal&&e.commonjsGlobal.__decorate||function(e,t,s,a){var r,n=arguments.length,o=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,a);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(o=(n<3?r(o):n>3?r(t,s,o):r(t,s))||o);return n>3&&o&&Object.defineProperty(t,s,o),o},we=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ne,"__esModule",{value:!0}),ne.Safe=void 0;const be=ie,Se=de,Ie=O,Ae=te,Pe=M,Oe=we(fe);class Ce{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(Ie.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(Ie.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(Ie.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){const s=await this.getInfo(),a=Se.EIP_1271_INTERFACE.encodeFunctionData("isValidSignature",[e,t]),r={call:Ae.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:a},"latest"]};try{return(await this.communicator.send(Ie.Methods.rpcCall,r)).data.slice(0,10).toLowerCase()===Se.MAGIC_VALUE}catch(e){return!1}}async check1271SignatureBytes(e,t="0x"){const s=await this.getInfo(),a=be.ethers.utils.arrayify(e),r=Se.EIP_1271_BYTES_INTERFACE.encodeFunctionData("isValidSignature",[a,t]),n={call:Ae.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(Ie.Methods.rpcCall,n)).data.slice(0,10).toLowerCase()===Se.MAGIC_VALUE_BYTES}catch(e){return!1}}calculateMessageHash(e){return be.ethers.utils.hashMessage(e)}calculateTypedMessageHash(e){return be.ethers.utils._TypedDataEncoder.hash(e.domain,e.types,e.message)}async getOffChainSignature(e){return(await this.communicator.send(Ie.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let s;if("string"==typeof e&&(s=async()=>{const s=this.calculateMessageHash(e);return await this.isMessageHashSigned(s,t)}),(0,Pe.isObjectEIP712TypedData)(e)&&(s=async()=>{const s=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(s,t)}),s){return await s()}throw new Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){const s=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const a of s){if(await a(e,t))return!0}return!1}async getEnvironmentInfo(){return(await this.communicator.send(Ie.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(Ie.Methods.requestAddressBook,void 0)).data}}ye([(0,Oe.default)()],Ce.prototype,"requestAddressBook",null),ne.Safe=Ce;var Me=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(m,"__esModule",{value:!0});const je=Me(_),Re=C,Ne=ee,Le=ne,De=he;m.default=class{constructor(e={}){const{allowedDomains:t=null,debug:s=!1}=e;this.communicator=new je.default(t,s),this.eth=new Ne.Eth(this.communicator),this.txs=new Re.TXs(this.communicator),this.safe=new Le.Safe(this.communicator),this.wallet=new De.Wallet(this.communicator)}},function(t){var s=e.commonjsGlobal&&e.commonjsGlobal.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,a,r)}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),a=e.commonjsGlobal&&e.commonjsGlobal.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||s(t,e,a)},r=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const n=r(m);t.default=n.default,a(m,t),a(M,t),a(O,t),a(E,t);var o=v;Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return o.getSDKVersion}})}(p);var xe=e.getDefaultExportFromCjs(p),Ge={},He={},Be={};Object.defineProperty(Be,"__esModule",{value:!0}),Be.getLowerCase=void 0,Be.getLowerCase=function(e){return e?e.toLowerCase():e},Object.defineProperty(He,"__esModule",{value:!0}),He.SafeAppProvider=void 0;const qe=g.default,ke=Be;class Ue extends qe.EventEmitter{constructor(e,t){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=t}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){const{method:t,params:s=[]}=e;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[e,t]=s;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address or message hash is invalid");return await this.sdk.txs.signMessage(e),"0x"}case"eth_sign":{const[e,t]=s;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase()||!t.startsWith("0x"))throw new Error("The address or message hash is invalid");return await this.sdk.txs.signMessage(t),"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[e,t]=s,a="string"==typeof t?JSON.parse(t):t;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase())throw new Error("The address is invalid");return await this.sdk.txs.signTypedMessage(a),"0x"}case"eth_sendTransaction":const t=Object.assign({value:"0",data:"0x"},s[0]);"string"==typeof t.gas&&t.gas.startsWith("0x")&&(t.gas=parseInt(t.gas,16));const a=await this.sdk.txs.send({txs:[t],params:{safeTxGas:t.gas}});return this.submittedTxs.set(a.safeTxHash,{from:this.safe.safeAddress,hash:a.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:t.data,value:t.value,to:t.to,blockHash:null,blockNumber:null,transactionIndex:null}),a.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,ke.getLowerCase)(s[0]),s[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,ke.getLowerCase)(s[0]),s[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,ke.getLowerCase)(s[0]),s[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,ke.getLowerCase)(s[0]),s[1],s[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([s[0],s[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([s[0],s[1]]);case"eth_getTransactionByHash":let r=s[0];try{r=(await this.sdk.txs.getBySafeTxHash(r)).txHash||r}catch(e){}return this.submittedTxs.has(r)?this.submittedTxs.get(r):this.sdk.eth.getTransactionByHash([r]).then((e=>(e&&(e.hash=s[0]),e)));case"eth_getTransactionReceipt":{let e=s[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(e){}return this.sdk.eth.getTransactionReceipt([e]).then((e=>(e&&(e.transactionHash=s[0]),e)))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(s[0]);case"eth_call":return this.sdk.eth.call([s[0],s[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([s[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(s[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([s[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then((s=>t(null,{jsonrpc:"2.0",id:e.id,result:s}))).catch((e=>t(e,null)))}}let $e,Fe;function We(){return e.__awaiter(this,void 0,void 0,(function*(){return Fe||(Fe=new xe),void 0===$e&&($e=yield Promise.race([Fe.safe.getInfo(),new Promise((e=>setTimeout(e,200)))])),$e}))}He.SafeAppProvider=Ue,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=He;Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return t.SafeAppProvider}})}(Ge);var Ve={},Ke={},Qe={};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.getTxServiceBaseUrl=void 0,Qe.getTxServiceBaseUrl=function(e){return`${e}/api`};var Xe={},Ye={exports:{}};!function(t,s){var a=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e.commonjsGlobal)return e.commonjsGlobal;throw new Error("unable to locate global object")}();t.exports=s=a.fetch,a.fetch&&(s.default=a.fetch.bind(a)),s.Headers=a.Headers,s.Request=a.Request,s.Response=a.Response}(Ye,Ye.exports),function(t){var s=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendRequest=t.HttpMethod=void 0;const a=s(Ye.exports);var r;(r=t.HttpMethod||(t.HttpMethod={})).Get="get",r.Post="post",r.Delete="delete",t.sendRequest=async function({url:e,method:t,body:s}){const r=await(0,a.default)(e,{method:t,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)});let n;try{n=await r.json()}catch(e){if(!r.ok)throw new Error(r.statusText)}if(r.ok)return n;if(n.data)throw new Error(n.data);if(n.detail)throw new Error(n.detail);if(n.message)throw new Error(n.message);if(n.nonFieldErrors)throw new Error(n.nonFieldErrors);if(n.delegate)throw new Error(n.delegate);if(n.safe)throw new Error(n.safe);if(n.delegator)throw new Error(n.delegator);throw new Error(r.statusText)}}(Xe);var Je,ze,Ze=e.commonjsGlobal&&e.commonjsGlobal.__classPrivateFieldSet||function(e,t,s,a,r){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?r.call(e,s):r?r.value=s:t.set(e,s),s},et=e.commonjsGlobal&&e.commonjsGlobal.__classPrivateFieldGet||function(e,t,s,a){if("a"===s&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(e):a?a.value:t.get(e)};Object.defineProperty(Ke,"__esModule",{value:!0});const tt=Qe,st=Xe;Je=new WeakMap,ze=new WeakMap,Ke.default=class{constructor({txServiceUrl:e,ethAdapter:t}){Je.set(this,void 0),ze.set(this,void 0),Ze(this,Je,(0,tt.getTxServiceBaseUrl)(e),"f"),Ze(this,ze,t,"f")}async getServiceInfo(){return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/about`,method:st.HttpMethod.Get})}async getServiceMasterCopiesInfo(){return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/about/master-copies`,method:st.HttpMethod.Get})}async decodeData(e){if(""===e)throw new Error("Invalid data");return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/data-decoder/`,method:st.HttpMethod.Post,body:{data:e}})}async getSafesByOwner(e){if(""===e)throw new Error("Invalid owner address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/owners/${t}/safes/`,method:st.HttpMethod.Get})}async getSafesByModule(e){if(""===e)throw new Error("Invalid module address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/modules/${t}/safes/`,method:st.HttpMethod.Get})}async getTransaction(e){if(""===e)throw new Error("Invalid safeTxHash");return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/multisig-transactions/${e}/`,method:st.HttpMethod.Get})}async getTransactionConfirmations(e){if(""===e)throw new Error("Invalid safeTxHash");return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/multisig-transactions/${e}/confirmations/`,method:st.HttpMethod.Get})}async confirmTransaction(e,t){if(""===e)throw new Error("Invalid safeTxHash");if(""===t)throw new Error("Invalid signature");return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/multisig-transactions/${e}/confirmations/`,method:st.HttpMethod.Post,body:{signature:t}})}async getSafeInfo(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${t}/`,method:st.HttpMethod.Get})}async getSafeDelegates({safeAddress:e,delegateAddress:t,delegatorAddress:s,label:a,limit:r,offset:n}){const o=new URL(`${et(this,Je,"f")}/v1/delegates`);if(e){const{address:t}=await et(this,ze,"f").getEip3770Address(e);o.searchParams.set("safe",t)}if(t){const{address:e}=await et(this,ze,"f").getEip3770Address(t);o.searchParams.set("delegate",e)}if(s){const{address:e}=await et(this,ze,"f").getEip3770Address(s);o.searchParams.set("delegator",e)}return a&&o.searchParams.set("label",a),r&&o.searchParams.set("limit",r),n&&o.searchParams.set("offset",n),(0,st.sendRequest)({url:o.toString(),method:st.HttpMethod.Get})}async addSafeDelegate({safeAddress:e,delegateAddress:t,delegatorAddress:s,label:a,signer:r}){if(""===t)throw new Error("Invalid Safe delegate address");if(""===s)throw new Error("Invalid Safe delegator address");if(""===a)throw new Error("Invalid label");const{address:n}=await et(this,ze,"f").getEip3770Address(t),{address:o}=await et(this,ze,"f").getEip3770Address(s),i=n+Math.floor(Date.now()/1e3/3600),d=await r.signMessage(i),c={safe:e?(await et(this,ze,"f").getEip3770Address(e)).address:null,delegate:n,delegator:o,label:a,signature:d};return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/delegates/`,method:st.HttpMethod.Post,body:c})}async removeSafeDelegate({delegateAddress:e,delegatorAddress:t,signer:s}){if(""===e)throw new Error("Invalid Safe delegate address");if(""===t)throw new Error("Invalid Safe delegator address");const{address:a}=await et(this,ze,"f").getEip3770Address(e),{address:r}=await et(this,ze,"f").getEip3770Address(t),n=a+Math.floor(Date.now()/1e3/3600),o=await s.signMessage(n);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/delegates/${a}`,method:st.HttpMethod.Delete,body:{delegate:a,delegator:r,signature:o}})}async getSafeCreationInfo(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${t}/creation/`,method:st.HttpMethod.Get})}async estimateSafeTransaction(e,t){if(""===e)throw new Error("Invalid Safe address");const{address:s}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${s}/multisig-transactions/estimations/`,method:st.HttpMethod.Post,body:t})}async proposeTransaction({safeAddress:e,safeTransactionData:t,safeTxHash:s,senderAddress:a,senderSignature:r,origin:n}){if(""===e)throw new Error("Invalid Safe address");const{address:o}=await et(this,ze,"f").getEip3770Address(e),{address:i}=await et(this,ze,"f").getEip3770Address(a);if(""===s)throw new Error("Invalid safeTxHash");return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${o}/multisig-transactions/`,method:st.HttpMethod.Post,body:{...t,contractTransactionHash:s,sender:i,signature:r,origin:n}})}async getIncomingTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${t}/incoming-transfers?executed=true`,method:st.HttpMethod.Get})}async getModuleTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${t}/module-transactions/`,method:st.HttpMethod.Get})}async getMultisigTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${t}/multisig-transactions/`,method:st.HttpMethod.Get})}async getPendingTransactions(e,t){if(""===e)throw new Error("Invalid Safe address");const{address:s}=await et(this,ze,"f").getEip3770Address(e),a=t||(await this.getSafeInfo(s)).nonce;return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/safes/${s}/multisig-transactions/?executed=false&nonce__gte=${a}`,method:st.HttpMethod.Get})}async getAllTransactions(e,t){var s,a,r;if(""===e)throw new Error("Invalid Safe address");const{address:n}=await et(this,ze,"f").getEip3770Address(e),o=new URL(`${et(this,Je,"f")}/v1/safes/${n}/all-transactions/`),i=(null===(s=null==t?void 0:t.trusted)||void 0===s?void 0:s.toString())||"true";o.searchParams.set("trusted",i);const d=(null===(a=null==t?void 0:t.queued)||void 0===a?void 0:a.toString())||"true";o.searchParams.set("queued",d);const c=(null===(r=null==t?void 0:t.executed)||void 0===r?void 0:r.toString())||"false";return o.searchParams.set("executed",c),(0,st.sendRequest)({url:o.toString(),method:st.HttpMethod.Get})}async getNextNonce(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await et(this,ze,"f").getEip3770Address(e),s=await this.getPendingTransactions(t);if(s.results.length>0){const e=s.results.map((e=>e.nonce));return Math.max(...e)+1}return(await this.getSafeInfo(t)).nonce}async getTokenList(){return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/tokens/`,method:st.HttpMethod.Get})}async getToken(e){if(""===e)throw new Error("Invalid token address");const{address:t}=await et(this,ze,"f").getEip3770Address(e);return(0,st.sendRequest)({url:`${et(this,Je,"f")}/v1/tokens/${t}/`,method:st.HttpMethod.Get})}};var at={};Object.defineProperty(at,"__esModule",{value:!0}),function(t){var s=e.commonjsGlobal&&e.commonjsGlobal.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,a,r)}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),a=e.commonjsGlobal&&e.commonjsGlobal.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||s(t,e,a)},r=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Ke);a(at,t),t.default=n.default}(Ve);var rt=e.getDefaultExportFromCjs(Ve);const nt={1:"https://safe-transaction-mainnet.safe.global/",5:"https://safe-transaction-goerli.safe.global/",42161:"https://safe-transaction-arbitrum.safe.global/",43114:"https://safe-transaction-avalanche.safe.global/",1313161554:"https://safe-transaction-aurora.safe.global/",56:"https://safe-transaction-bsc.safe.global/",10:"https://safe-transaction-optimism.safe.global/",137:"https://safe-transaction-polygon.safe.global/"};let ot;function it(t){return e.__awaiter(this,void 0,void 0,(function*(){if((null==ot?void 0:ot.chainId)===t)return ot.safeService;if(!e.useWalletStore.getState().provider)throw new Error("provider is undefined");const s=function(){return{getEip3770Address:t=>e.__awaiter(this,void 0,void 0,(function*(){const{address:e,prefix:s}=function(e){const t=e.split(":"),s=t.length>1?t[1]:t[0];return{prefix:t.length>1?t[0]:"",address:s}}(t);return{address:e,prefix:s}}))}}(),a=nt[t];if(!a)return;const r=new rt({txServiceUrl:a,ethAdapter:s});return ot={safeService:r,chainId:t},ot.safeService}))}exports.default=function(t){return e.__awaiter(this,void 0,void 0,(function*(){const s=yield We();if(!s)throw Error("Could not load Safe information");const a=new Ge.SafeAppProvider(s,Fe);return a.on("connect",t.connect),a.on("disconnect",t.disconnect),a.on("accountsChanged",t.accountsChanged),a.on("chainChanged",t.chainChanged),a.on("message",t.message),e.convertWeb3Provider(a)}))},exports.getAccountIsSafe=function(t,s){return e.__awaiter(this,void 0,void 0,(function*(){if(!s)return!1;const e=yield it(t);if(!e)return!1;try{return!!(yield e.getSafeInfo(s))}catch(e){return console.error(e),!1}}))},exports.getConnectedSafe=We,exports.getIsSafe=function(){return e.__awaiter(this,void 0,void 0,(function*(){return!!(yield We())}))},exports.getSafeHashDetailUrl=function(e,t,s){const a={1:"eth",5:"gor",137:"matic",56:"bnb",42161:"arb1",10:"oeth",43114:"avax",1313161554:"aurora"}[t];if(!a)throw new Error(`Not Supported network: ${t}`);return`https://app.safe.global/transactions/tx?id=multisig_${s}_${e}&safe=${a}%3A${s}`},exports.getSafeTxHash=function(t,s,a){return e.__awaiter(this,void 0,void 0,(function*(){const e=yield it(t);if(!e)return console.error(`chainId: ${t} is not supported safe`),a;if(a!==s)return a;const r=yield e.getMultisigTransactions(a),[n]=r.results;return n.safeTxHash}))},exports.getSafeTxStatus=function(t,s,a){return e.__awaiter(this,void 0,void 0,(function*(){const e=yield it(t);if(!e)throw new Error(`chainId: ${t} is not supported safe`);try{const{results:t}=yield e.getMultisigTransactions(a),r=t.find((e=>e.safeTxHash.toLocaleLowerCase()===s.toLocaleLowerCase()));if(!r)return null;if(t.some((e=>!(e.nonce!==r.nonce||e.safeTxHash.toLocaleLowerCase()===s.toLocaleLowerCase()||!e.isExecuted||!e.isSuccessful))))return"rejected";if(null===r.isExecuted||null===r.isSuccessful)return null;return{status:r.isExecuted&&r.isSuccessful||!1,transactionHash:r.transactionHash,blockNumber:r.blockNumber||null}}catch(e){throw console.error(e),new Error(`safeTxHash: ${s} is not valid.`)}}))};