@multiversx/sdk-dapp 2.6.2 → 2.6.3

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 (190) hide show
  1. package/UI/DappModal/hooks/index.js +1 -1
  2. package/UI/DappModal/hooks/useDappModal.js +1 -1
  3. package/UI/DappModal/index.js +1 -1
  4. package/UI/ModalContainer/ModalContainer.js +1 -1
  5. package/UI/ModalContainer/index.js +1 -1
  6. package/UI/NotificationModal/index.js +1 -1
  7. package/UI/SignTransactionsModals/SignTransactionsModals.js +1 -1
  8. package/UI/SignTransactionsModals/SignWithDeviceModal/SignStep.js +1 -1
  9. package/UI/SignTransactionsModals/SignWithDeviceModal/index.js +1 -1
  10. package/UI/SignTransactionsModals/SignWithExtensionModal/index.js +1 -1
  11. package/UI/SignTransactionsModals/SignWithLedgerModal/index.js +1 -1
  12. package/UI/SignTransactionsModals/SignWithOperaModal/index.js +1 -1
  13. package/UI/SignTransactionsModals/SignWithWalletConnectModal/index.js +1 -1
  14. package/UI/SignTransactionsModals/components/ConfirmationScreen.js +1 -1
  15. package/UI/SignTransactionsModals/components/DeviceConfirmationScreen.js +1 -1
  16. package/UI/SignTransactionsModals/components/index.js +1 -1
  17. package/UI/SignTransactionsModals/index.js +1 -1
  18. package/UI/TransactionInfo/TransactionInfo.js +1 -1
  19. package/UI/TransactionInfo/components/NonceMessage/NonceMessage.js +1 -1
  20. package/UI/TransactionInfo/components/NonceMessage/index.js +1 -1
  21. package/UI/TransactionInfo/components/index.js +1 -1
  22. package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/TransactionInfoNonce.js +1 -1
  23. package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/index.js +1 -1
  24. package/UI/TransactionInfo/components/transactionInfoFields/index.js +1 -1
  25. package/UI/TransactionInfo/index.js +1 -1
  26. package/UI/TransactionsTable/TransactionsTable.js +1 -1
  27. package/UI/TransactionsTable/index.js +1 -1
  28. package/UI/TransactionsToastList/TransactionsToastList.js +1 -1
  29. package/UI/TransactionsToastList/components/TransactionToast/TransactionToast.js +1 -1
  30. package/UI/TransactionsToastList/components/TransactionToast/hooks/useTransactionToast.js +1 -1
  31. package/UI/TransactionsToastList/components/TransactionToast/index.js +1 -1
  32. package/UI/TransactionsToastList/components/TransactionToastGuard.js +1 -1
  33. package/UI/TransactionsToastList/components/index.js +1 -1
  34. package/UI/TransactionsToastList/index.js +1 -1
  35. package/UI/extension/ExtensionLoginButton/index.js +1 -1
  36. package/UI/index.js +1 -1
  37. package/UI/ledger/LedgerLoginButton/index.js +1 -1
  38. package/UI/ledger/LedgerLoginContainer/ConfirmAddress.js +1 -1
  39. package/UI/ledger/LedgerLoginContainer/index.js +1 -1
  40. package/UI/ledger/index.js +1 -1
  41. package/UI/operaWallet/OperaWalletLoginButton/index.js +1 -1
  42. package/UI/pages/UnlockPage/index.js +1 -1
  43. package/UI/pages/index.js +1 -1
  44. package/UI/walletConnect/WalletConnectLoginButton/index.js +1 -1
  45. package/UI/walletConnect/WalletConnectLoginContainer/index.js +1 -1
  46. package/UI/walletConnect/index.js +1 -1
  47. package/UI/webWallet/WebWalletLoginButton/index.js +1 -1
  48. package/__chunks__/{chunk-ONXXXCCF.js → chunk-3SKYCSWV.js} +2 -2
  49. package/__chunks__/chunk-3SRVL7NW.js +2 -0
  50. package/__chunks__/chunk-5RGNESSR.js +2 -0
  51. package/__chunks__/{chunk-UHLFOFON.js → chunk-626QJNRP.js} +2 -2
  52. package/__chunks__/{chunk-WP4VSJLM.js → chunk-7XM2INU5.js} +2 -2
  53. package/__chunks__/{chunk-DKCOAZU7.js → chunk-BIJQ4KPR.js} +2 -2
  54. package/__chunks__/{chunk-M6XJNYK2.js → chunk-BVLG73TU.js} +2 -2
  55. package/__chunks__/{chunk-453MDZQF.js → chunk-CUOTDMV5.js} +2 -2
  56. package/__chunks__/{chunk-Z7WX5JMQ.js → chunk-DCGZA3FL.js} +2 -2
  57. package/__chunks__/{chunk-FTKQZDLX.js → chunk-FZX45LTX.js} +2 -2
  58. package/__chunks__/{chunk-EOQ4GBQT.js → chunk-HARAYXLU.js} +2 -2
  59. package/__chunks__/{chunk-KI2QJGAZ.js → chunk-HN6A4EU5.js} +2 -2
  60. package/__chunks__/{chunk-LR2EWIF5.js → chunk-KIRNHCVW.js} +2 -2
  61. package/__chunks__/{chunk-M5A6L4R7.js → chunk-KZDQY4JZ.js} +2 -2
  62. package/__chunks__/{chunk-UZBMRAWK.js → chunk-LEIZK3SB.js} +2 -2
  63. package/__chunks__/{chunk-YYIAF5XK.js → chunk-PR2H2LZF.js} +2 -2
  64. package/__chunks__/chunk-QE4AERN4.js +2 -0
  65. package/__chunks__/{chunk-NVREM3LI.js → chunk-TGBCGOC7.js} +2 -2
  66. package/__chunks__/{chunk-ZXXRMWLI.js → chunk-UYR62LTI.js} +2 -2
  67. package/__chunks__/{chunk-5TOXE3UO.js → chunk-XYOGQJMR.js} +2 -2
  68. package/__chunks__/{chunk-R7TIYVAO.js → chunk-YI2C5YZP.js} +2 -2
  69. package/__commonjs/UI/DappModal/hooks/index.js +1 -1
  70. package/__commonjs/UI/DappModal/hooks/useDappModal.js +1 -1
  71. package/__commonjs/UI/DappModal/index.js +3 -3
  72. package/__commonjs/UI/ModalContainer/ModalContainer.js +1 -1
  73. package/__commonjs/UI/ModalContainer/index.js +1 -1
  74. package/__commonjs/UI/NotificationModal/index.js +1 -1
  75. package/__commonjs/UI/SignTransactionsModals/SignTransactionsModals.js +1 -1
  76. package/__commonjs/UI/SignTransactionsModals/SignWithDeviceModal/SignStep.js +1 -1
  77. package/__commonjs/UI/SignTransactionsModals/SignWithDeviceModal/index.js +5 -5
  78. package/__commonjs/UI/SignTransactionsModals/SignWithExtensionModal/index.js +1 -1
  79. package/__commonjs/UI/SignTransactionsModals/SignWithLedgerModal/index.js +6 -6
  80. package/__commonjs/UI/SignTransactionsModals/SignWithOperaModal/index.js +1 -1
  81. package/__commonjs/UI/SignTransactionsModals/SignWithWalletConnectModal/index.js +1 -1
  82. package/__commonjs/UI/SignTransactionsModals/components/ConfirmationScreen.js +1 -1
  83. package/__commonjs/UI/SignTransactionsModals/components/DeviceConfirmationScreen.js +1 -1
  84. package/__commonjs/UI/SignTransactionsModals/components/index.js +1 -1
  85. package/__commonjs/UI/SignTransactionsModals/index.js +1 -1
  86. package/__commonjs/UI/TransactionInfo/TransactionInfo.js +1 -1
  87. package/__commonjs/UI/TransactionInfo/components/NonceMessage/NonceMessage.js +1 -1
  88. package/__commonjs/UI/TransactionInfo/components/NonceMessage/index.js +1 -1
  89. package/__commonjs/UI/TransactionInfo/components/index.js +1 -1
  90. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/TransactionInfoNonce.js +2 -2
  91. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/index.js +2 -2
  92. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/index.js +1 -1
  93. package/__commonjs/UI/TransactionInfo/index.js +1 -1
  94. package/__commonjs/UI/TransactionsTable/TransactionsTable.js +1 -1
  95. package/__commonjs/UI/TransactionsTable/index.js +1 -1
  96. package/__commonjs/UI/TransactionsToastList/TransactionsToastList.js +1 -1
  97. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/TransactionToast.js +1 -1
  98. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/hooks/useTransactionToast.js +1 -1
  99. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/index.js +1 -1
  100. package/__commonjs/UI/TransactionsToastList/components/TransactionToastGuard.js +8 -8
  101. package/__commonjs/UI/TransactionsToastList/components/index.js +1 -1
  102. package/__commonjs/UI/TransactionsToastList/index.js +1 -1
  103. package/__commonjs/UI/extension/ExtensionLoginButton/index.js +4 -4
  104. package/__commonjs/UI/index.js +67 -67
  105. package/__commonjs/UI/ledger/LedgerLoginButton/index.js +14 -14
  106. package/__commonjs/UI/ledger/LedgerLoginContainer/ConfirmAddress.js +1 -1
  107. package/__commonjs/UI/ledger/LedgerLoginContainer/index.js +13 -13
  108. package/__commonjs/UI/ledger/index.js +14 -14
  109. package/__commonjs/UI/operaWallet/OperaWalletLoginButton/index.js +3 -3
  110. package/__commonjs/UI/pages/UnlockPage/index.js +17 -17
  111. package/__commonjs/UI/pages/index.js +17 -17
  112. package/__commonjs/UI/walletConnect/WalletConnectLoginButton/index.js +6 -6
  113. package/__commonjs/UI/walletConnect/WalletConnectLoginContainer/index.js +5 -5
  114. package/__commonjs/UI/walletConnect/index.js +6 -6
  115. package/__commonjs/UI/webWallet/WebWalletLoginButton/index.js +3 -3
  116. package/__commonjs/__mocks__/index.js +1 -1
  117. package/__commonjs/__mocks__/utils/index.js +1 -1
  118. package/__commonjs/__mocks__/utils/renderWithProvider.js +1 -1
  119. package/__commonjs/components/LogoutListener/LogoutListener.js +1 -1
  120. package/__commonjs/components/LogoutListener/helpers/index.js +1 -1
  121. package/__commonjs/components/LogoutListener/helpers/useLogoutFromMultipleTabs.js +1 -1
  122. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogout.js +1 -1
  123. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogoutWarning/index.js +1 -1
  124. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogoutWarning/useNativeAuthLogoutWarning.js +1 -1
  125. package/__commonjs/components/LogoutListener/index.js +1 -1
  126. package/__commonjs/components/ProviderInitializer.js +1 -1
  127. package/__commonjs/components/TransactionsTracker/TransactionTracker.js +1 -1
  128. package/__commonjs/components/TransactionsTracker/index.js +1 -1
  129. package/__commonjs/components/TransactionsTracker/useTransactionsTracker.js +1 -1
  130. package/__commonjs/hooks/index.js +1 -1
  131. package/__commonjs/hooks/login/index.js +1 -1
  132. package/__commonjs/hooks/login/useExtensionLogin.js +1 -1
  133. package/__commonjs/hooks/login/useLedgerLogin.js +1 -1
  134. package/__commonjs/hooks/login/useLoginService.js +1 -1
  135. package/__commonjs/hooks/login/useOperaLogin.js +1 -1
  136. package/__commonjs/hooks/login/useWalletConnectLogin.js +1 -1
  137. package/__commonjs/hooks/login/useWalletConnectV2Login.js +1 -1
  138. package/__commonjs/hooks/login/useWebWalletLogin.js +1 -1
  139. package/__commonjs/hooks/transactions/index.js +1 -1
  140. package/__commonjs/hooks/transactions/useTrackTransactionStatus.js +1 -1
  141. package/__commonjs/services/index.js +1 -1
  142. package/__commonjs/services/nativeAuth/helpers/getLatestBlockHash.js +1 -1
  143. package/__commonjs/services/nativeAuth/helpers/index.js +1 -1
  144. package/__commonjs/services/nativeAuth/index.js +1 -1
  145. package/__commonjs/services/nativeAuth/methods/getToken.js +1 -1
  146. package/__commonjs/services/nativeAuth/methods/index.js +1 -1
  147. package/__commonjs/services/nativeAuth/nativeAuth.js +1 -1
  148. package/__commonjs/wrappers/DappProvider/CustomComponents.js +1 -1
  149. package/__commonjs/wrappers/DappProvider/index.js +1 -1
  150. package/__commonjs/wrappers/index.js +1 -1
  151. package/__mocks__/index.js +1 -1
  152. package/__mocks__/utils/index.js +1 -1
  153. package/__mocks__/utils/renderWithProvider.js +1 -1
  154. package/components/LogoutListener/LogoutListener.js +1 -1
  155. package/components/LogoutListener/helpers/index.js +1 -1
  156. package/components/LogoutListener/helpers/useLogoutFromMultipleTabs.js +1 -1
  157. package/components/LogoutListener/helpers/useNativeAuthLogout.js +1 -1
  158. package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/index.js +1 -1
  159. package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/useNativeAuthLogoutWarning.js +1 -1
  160. package/components/LogoutListener/index.js +1 -1
  161. package/components/ProviderInitializer.js +1 -1
  162. package/components/TransactionsTracker/TransactionTracker.js +1 -1
  163. package/components/TransactionsTracker/index.js +1 -1
  164. package/components/TransactionsTracker/useTransactionsTracker.js +1 -1
  165. package/hooks/index.js +1 -1
  166. package/hooks/login/index.js +1 -1
  167. package/hooks/login/useExtensionLogin.js +1 -1
  168. package/hooks/login/useLedgerLogin.js +1 -1
  169. package/hooks/login/useLoginService.js +1 -1
  170. package/hooks/login/useOperaLogin.js +1 -1
  171. package/hooks/login/useWalletConnectLogin.js +1 -1
  172. package/hooks/login/useWalletConnectV2Login.js +1 -1
  173. package/hooks/login/useWebWalletLogin.js +1 -1
  174. package/hooks/transactions/index.js +1 -1
  175. package/hooks/transactions/useTrackTransactionStatus.js +1 -1
  176. package/package.json +1 -1
  177. package/services/index.js +1 -1
  178. package/services/nativeAuth/helpers/getLatestBlockHash.d.ts +4 -2
  179. package/services/nativeAuth/helpers/getLatestBlockHash.js +1 -1
  180. package/services/nativeAuth/helpers/index.js +1 -1
  181. package/services/nativeAuth/index.js +1 -1
  182. package/services/nativeAuth/methods/getToken.js +1 -1
  183. package/services/nativeAuth/methods/index.js +1 -1
  184. package/services/nativeAuth/nativeAuth.js +1 -1
  185. package/wrappers/DappProvider/CustomComponents.js +1 -1
  186. package/wrappers/DappProvider/index.js +1 -1
  187. package/wrappers/index.js +1 -1
  188. package/__chunks__/chunk-AOKD6R54.js +0 -2
  189. package/__chunks__/chunk-RBBOONZU.js +0 -2
  190. package/__chunks__/chunk-XZ2PVEHF.js +0 -2
@@ -1,4 +1,4 @@
1
- "use strict";var ci=Object.create;var he=Object.defineProperty,li=Object.defineProperties,pi=Object.getOwnPropertyDescriptor,ui=Object.getOwnPropertyDescriptors,di=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,mi=Object.getPrototypeOf,lt=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable;var mr=(e,t,r)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))lt.call(t,r)&&mr(e,r,t[r]);if(Le)for(var r of Le(t))gr.call(t,r)&&mr(e,r,t[r]);return e},k=(e,t)=>li(e,ui(t));var fr=(e,t)=>{var r={};for(var n in e)lt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Le)for(var n of Le(e))t.indexOf(n)<0&&gr.call(e,n)&&(r[n]=e[n]);return r};var h=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ne=(e,t)=>{for(var r in t)he(e,r,{get:t[r],enumerable:!0})},Tr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of di(t))!lt.call(e,i)&&i!==r&&he(e,i,{get:()=>t[i],enumerable:!(n=pi(t,i))||n.enumerable});return e};var w=(e,t,r)=>(r=e!=null?ci(mi(e)):{},Tr(t||!e||!e.__esModule?he(r,"default",{value:e,enumerable:!0}):r,e)),xe=e=>Tr(he({},"__esModule",{value:!0}),e);var D=(e,t,r)=>new Promise((n,i)=>{var l=d=>{try{m(r.next(d))}catch(g){i(g)}},p=d=>{try{m(r.throw(d))}catch(g){i(g)}},m=d=>d.done?n(d.value):Promise.resolve(d.value).then(l,p);m((r=r.apply(e,t)).next())});var xr=Ne(De=>{"use strict";o();De.byteLength=fi;De.toByteArray=yi;De.fromByteArray=Si;var U=[],M=[],gi=typeof Uint8Array!="undefined"?Uint8Array:Array,pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(oe=0,yr=pt.length;oe<yr;++oe)U[oe]=pt[oe],M[pt.charCodeAt(oe)]=oe;var oe,yr;M["-".charCodeAt(0)]=62;M["_".charCodeAt(0)]=63;function hr(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function fi(e){var t=hr(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Ti(e,t,r){return(t+r)*3/4-r}function yi(e){var t,r=hr(e),n=r[0],i=r[1],l=new gi(Ti(e,n,i)),p=0,m=i>0?n-4:n,d;for(d=0;d<m;d+=4)t=M[e.charCodeAt(d)]<<18|M[e.charCodeAt(d+1)]<<12|M[e.charCodeAt(d+2)]<<6|M[e.charCodeAt(d+3)],l[p++]=t>>16&255,l[p++]=t>>8&255,l[p++]=t&255;return i===2&&(t=M[e.charCodeAt(d)]<<2|M[e.charCodeAt(d+1)]>>4,l[p++]=t&255),i===1&&(t=M[e.charCodeAt(d)]<<10|M[e.charCodeAt(d+1)]<<4|M[e.charCodeAt(d+2)]>>2,l[p++]=t>>8&255,l[p++]=t&255),l}function hi(e){return U[e>>18&63]+U[e>>12&63]+U[e>>6&63]+U[e&63]}function xi(e,t,r){for(var n,i=[],l=t;l<r;l+=3)n=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),i.push(hi(n));return i.join("")}function Si(e){for(var t,r=e.length,n=r%3,i=[],l=16383,p=0,m=r-n;p<m;p+=l)i.push(xi(e,p,p+l>m?m:p+l));return n===1?(t=e[r-1],i.push(U[t>>2]+U[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(U[t>>10]+U[t>>4&63]+U[t<<2&63]+"=")),i.join("")}});var Sr=Ne(ut=>{o();ut.read=function(e,t,r,n,i){var l,p,m=i*8-n-1,d=(1<<m)-1,g=d>>1,y=-7,T=r?i-1:0,S=r?-1:1,v=e[t+T];for(T+=S,l=v&(1<<-y)-1,v>>=-y,y+=m;y>0;l=l*256+e[t+T],T+=S,y-=8);for(p=l&(1<<-y)-1,l>>=-y,y+=n;y>0;p=p*256+e[t+T],T+=S,y-=8);if(l===0)l=1-g;else{if(l===d)return p?NaN:(v?-1:1)*(1/0);p=p+Math.pow(2,n),l=l-g}return(v?-1:1)*p*Math.pow(2,l-n)};ut.write=function(e,t,r,n,i,l){var p,m,d,g=l*8-i-1,y=(1<<g)-1,T=y>>1,S=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:l-1,C=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(m=isNaN(t)?1:0,p=y):(p=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-p))<1&&(p--,d*=2),p+T>=1?t+=S/d:t+=S*Math.pow(2,1-T),t*d>=2&&(p++,d/=2),p+T>=y?(m=0,p=y):p+T>=1?(m=(t*d-1)*Math.pow(2,i),p=p+T):(m=t*Math.pow(2,T-1)*Math.pow(2,i),p=0));i>=8;e[r+v]=m&255,v+=C,m/=256,i-=8);for(p=p<<i|m,g+=i;g>0;e[r+v]=p&255,v+=C,p/=256,g-=8);e[r+v-C]|=_*128}});var _r=Ne(pe=>{"use strict";o();var dt=xr(),le=Sr(),wr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pe.Buffer=u;pe.SlowBuffer=ki;pe.INSPECT_MAX_BYTES=50;var Re=2147483647;pe.kMaxLength=Re;u.TYPED_ARRAY_SUPPORT=wi();!u.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function wi(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(r){return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(!!u.isBuffer(this))return this.buffer}});Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(!!u.isBuffer(this))return this.byteOffset}});function j(e){if(e>Re)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Tt(e)}return Ir(e,t,r)}u.poolSize=8192;function Ir(e,t,r){if(typeof e=="string")return bi(e,t);if(ArrayBuffer.isView(e))return Ii(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return gt(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return u.from(n,t,r);var i=vi(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}u.from=function(e,t,r){return Ir(e,t,r)};Object.setPrototypeOf(u.prototype,Uint8Array.prototype);Object.setPrototypeOf(u,Uint8Array);function vr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ai(e,t,r){return vr(e),e<=0?j(e):t!==void 0?typeof r=="string"?j(e).fill(t,r):j(e).fill(t):j(e)}u.alloc=function(e,t,r){return Ai(e,t,r)};function Tt(e){return vr(e),j(e<0?0:yt(e)|0)}u.allocUnsafe=function(e){return Tt(e)};u.allocUnsafeSlow=function(e){return Tt(e)};function bi(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=kr(e,t)|0,n=j(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function mt(e){for(var t=e.length<0?0:yt(e.length)|0,r=j(t),n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Ii(e){if(V(e,Uint8Array)){var t=new Uint8Array(e);return gt(t.buffer,t.byteOffset,t.byteLength)}return mt(e)}function gt(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function vi(e){if(u.isBuffer(e)){var t=yt(e.length)|0,r=j(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||ht(e.length)?j(0):mt(e);if(e.type==="Buffer"&&Array.isArray(e.data))return mt(e.data)}function yt(e){if(e>=Re)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Re.toString(16)+" bytes");return e|0}function ki(e){return+e!=e&&(e=0),u.alloc(+e)}u.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==u.prototype};u.compare=function(t,r){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),V(r,Uint8Array)&&(r=u.from(r,r.offset,r.byteLength)),!u.isBuffer(t)||!u.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,i=r.length,l=0,p=Math.min(n,i);l<p;++l)if(t[l]!==r[l]){n=t[l],i=r[l];break}return n<i?-1:i<n?1:0};u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};u.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return u.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var i=u.allocUnsafe(r),l=0;for(n=0;n<t.length;++n){var p=t[n];if(V(p,Uint8Array))l+p.length>i.length?u.from(p).copy(i,l):Uint8Array.prototype.set.call(i,p,l);else if(u.isBuffer(p))p.copy(i,l);else throw new TypeError('"list" argument must be an Array of Buffers');l+=p.length}return i};function kr(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ft(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Cr(e).length;default:if(i)return n?-1:ft(e).length;t=(""+t).toLowerCase(),i=!0}}u.byteLength=kr;function Ei(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Fi(this,t,r);case"utf8":case"utf-8":return Lr(this,t,r);case"ascii":return Mi(this,t,r);case"latin1":case"binary":return Oi(this,t,r);case"base64":return _i(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bi(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function ie(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)ie(this,r,r+1);return this};u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)ie(this,r,r+3),ie(this,r+1,r+2);return this};u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)ie(this,r,r+7),ie(this,r+1,r+6),ie(this,r+2,r+5),ie(this,r+3,r+4);return this};u.prototype.toString=function(){var t=this.length;return t===0?"":arguments.length===0?Lr(this,0,t):Ei.apply(this,arguments)};u.prototype.toLocaleString=u.prototype.toString;u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:u.compare(this,t)===0};u.prototype.inspect=function(){var t="",r=pe.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};wr&&(u.prototype[wr]=u.prototype.inspect);u.prototype.compare=function(t,r,n,i,l){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),l===void 0&&(l=this.length),r<0||n>t.length||i<0||l>this.length)throw new RangeError("out of range index");if(i>=l&&r>=n)return 0;if(i>=l)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,l>>>=0,this===t)return 0;for(var p=l-i,m=n-r,d=Math.min(p,m),g=this.slice(i,l),y=t.slice(r,n),T=0;T<d;++T)if(g[T]!==y[T]){p=g[T],m=y[T];break}return p<m?-1:m<p?1:0};function Er(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ht(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=u.from(t,n)),u.isBuffer(t))return t.length===0?-1:Ar(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ar(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Ar(e,t,r,n,i){var l=1,p=e.length,m=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;l=2,p/=2,m/=2,r/=2}function d(v,C){return l===1?v[C]:v.readUInt16BE(C*l)}var g;if(i){var y=-1;for(g=r;g<p;g++)if(d(e,g)===d(t,y===-1?0:g-y)){if(y===-1&&(y=g),g-y+1===m)return y*l}else y!==-1&&(g-=g-y),y=-1}else for(r+m>p&&(r=p-m),g=r;g>=0;g--){for(var T=!0,S=0;S<m;S++)if(d(e,g+S)!==d(t,S)){T=!1;break}if(T)return g}return-1}u.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};u.prototype.indexOf=function(t,r,n){return Er(this,t,r,n,!0)};u.prototype.lastIndexOf=function(t,r,n){return Er(this,t,r,n,!1)};function Li(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var l=t.length;n>l/2&&(n=l/2);for(var p=0;p<n;++p){var m=parseInt(t.substr(p*2,2),16);if(ht(m))return p;e[r+p]=m}return p}function Ni(e,t,r,n){return Ce(ft(t,e.length-r),e,r,n)}function Di(e,t,r,n){return Ce($i(t),e,r,n)}function Ri(e,t,r,n){return Ce(Cr(t),e,r,n)}function Ci(e,t,r,n){return Ce(Gi(t,e.length-r),e,r,n)}u.prototype.write=function(t,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var l=this.length-r;if((n===void 0||n>l)&&(n=l),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return Li(this,t,r,n);case"utf8":case"utf-8":return Ni(this,t,r,n);case"ascii":case"latin1":case"binary":return Di(this,t,r,n);case"base64":return Ri(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ci(this,t,r,n);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _i(e,t,r){return t===0&&r===e.length?dt.fromByteArray(e):dt.fromByteArray(e.slice(t,r))}function Lr(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var l=e[i],p=null,m=l>239?4:l>223?3:l>191?2:1;if(i+m<=r){var d,g,y,T;switch(m){case 1:l<128&&(p=l);break;case 2:d=e[i+1],(d&192)===128&&(T=(l&31)<<6|d&63,T>127&&(p=T));break;case 3:d=e[i+1],g=e[i+2],(d&192)===128&&(g&192)===128&&(T=(l&15)<<12|(d&63)<<6|g&63,T>2047&&(T<55296||T>57343)&&(p=T));break;case 4:d=e[i+1],g=e[i+2],y=e[i+3],(d&192)===128&&(g&192)===128&&(y&192)===128&&(T=(l&15)<<18|(d&63)<<12|(g&63)<<6|y&63,T>65535&&T<1114112&&(p=T))}}p===null?(p=65533,m=1):p>65535&&(p-=65536,n.push(p>>>10&1023|55296),p=56320|p&1023),n.push(p),i+=m}return Pi(n)}var br=4096;function Pi(e){var t=e.length;if(t<=br)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=br));return r}function Mi(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function Oi(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function Fi(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",l=t;l<r;++l)i+=Hi[e[l]];return i}function Bi(e,t,r){for(var n=e.slice(t,r),i="",l=0;l<n.length-1;l+=2)i+=String.fromCharCode(n[l]+n[l+1]*256);return i}u.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);var i=this.subarray(t,r);return Object.setPrototypeOf(i,u.prototype),i};function E(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return i};u.prototype.readUintBE=u.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=this[t+--r],l=1;r>0&&(l*=256);)i+=this[t+--r]*l;return i};u.prototype.readUint8=u.prototype.readUInt8=function(t,r){return t=t>>>0,r||E(t,1,this.length),this[t]};u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||E(t,2,this.length),this[t]|this[t+1]<<8};u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||E(t,2,this.length),this[t]<<8|this[t+1]};u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||E(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};u.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return l*=128,i>=l&&(i-=Math.pow(2,8*r)),i};u.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=r,l=1,p=this[t+--i];i>0&&(l*=256);)p+=this[t+--i]*l;return l*=128,p>=l&&(p-=Math.pow(2,8*r)),p};u.prototype.readInt8=function(t,r){return t=t>>>0,r||E(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};u.prototype.readInt16LE=function(t,r){t=t>>>0,r||E(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(t,r){t=t>>>0,r||E(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(t,r){return t=t>>>0,r||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};u.prototype.readInt32BE=function(t,r){return t=t>>>0,r||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};u.prototype.readFloatLE=function(t,r){return t=t>>>0,r||E(t,4,this.length),le.read(this,t,!0,23,4)};u.prototype.readFloatBE=function(t,r){return t=t>>>0,r||E(t,4,this.length),le.read(this,t,!1,23,4)};u.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||E(t,8,this.length),le.read(this,t,!0,52,8)};u.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||E(t,8,this.length),le.read(this,t,!1,52,8)};function R(e,t,r,n,i,l){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<l)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){var l=Math.pow(2,8*n)-1;R(this,t,r,n,l,0)}var p=1,m=0;for(this[r]=t&255;++m<n&&(p*=256);)this[r+m]=t/p&255;return r+n};u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){var l=Math.pow(2,8*n)-1;R(this,t,r,n,l,0)}var p=n-1,m=1;for(this[r+p]=t&255;--p>=0&&(m*=256);)this[r+p]=t/m&255;return r+n};u.prototype.writeUint8=u.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,1,255,0),this[r]=t&255,r+1};u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};u.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*n-1);R(this,t,r,n,l-1,-l)}var p=0,m=1,d=0;for(this[r]=t&255;++p<n&&(m*=256);)t<0&&d===0&&this[r+p-1]!==0&&(d=1),this[r+p]=(t/m>>0)-d&255;return r+n};u.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*n-1);R(this,t,r,n,l-1,-l)}var p=n-1,m=1,d=0;for(this[r+p]=t&255;--p>=0&&(m*=256);)t<0&&d===0&&this[r+p+1]!==0&&(d=1),this[r+p]=(t/m>>0)-d&255;return r+n};u.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};u.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};u.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};u.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};u.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Nr(e,t,r,n,i,l){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Dr(e,t,r,n,i){return t=+t,r=r>>>0,i||Nr(e,t,r,4,34028234663852886e22,-34028234663852886e22),le.write(e,t,r,n,23,4),r+4}u.prototype.writeFloatLE=function(t,r,n){return Dr(this,t,r,!0,n)};u.prototype.writeFloatBE=function(t,r,n){return Dr(this,t,r,!1,n)};function Rr(e,t,r,n,i){return t=+t,r=r>>>0,i||Nr(e,t,r,8,17976931348623157e292,-17976931348623157e292),le.write(e,t,r,n,52,8),r+8}u.prototype.writeDoubleLE=function(t,r,n){return Rr(this,t,r,!0,n)};u.prototype.writeDoubleBE=function(t,r,n){return Rr(this,t,r,!1,n)};u.prototype.copy=function(t,r,n,i){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var l=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),l};u.prototype.fill=function(t,r,n,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){var l=t.charCodeAt(0);(i==="utf8"&&l<128||i==="latin1")&&(t=l)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var p;if(typeof t=="number")for(p=r;p<n;++p)this[p]=t;else{var m=u.isBuffer(t)?t:u.from(t,i),d=m.length;if(d===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(p=0;p<n-r;++p)this[p+r]=m[p%d]}return this};var Ui=/[^+/0-9A-Za-z-_]/g;function Vi(e){if(e=e.split("=")[0],e=e.trim().replace(Ui,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ft(e,t){t=t||1/0;for(var r,n=e.length,i=null,l=[],p=0;p<n;++p){if(r=e.charCodeAt(p),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&l.push(239,191,189);continue}else if(p+1===n){(t-=3)>-1&&l.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&l.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&l.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;l.push(r)}else if(r<2048){if((t-=2)<0)break;l.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;l.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;l.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return l}function $i(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function Gi(e,t){for(var r,n,i,l=[],p=0;p<e.length&&!((t-=2)<0);++p)r=e.charCodeAt(p),n=r>>8,i=r%256,l.push(i),l.push(n);return l}function Cr(e){return dt.toByteArray(Vi(e))}function Ce(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function V(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ht(e){return e!==e}var Hi=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=r*16,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()});var Br=Ne((Ss,Fr)=>{o();var I=Fr.exports={},$,G;function xt(){throw new Error("setTimeout has not been defined")}function St(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?$=setTimeout:$=xt}catch(e){$=xt}try{typeof clearTimeout=="function"?G=clearTimeout:G=St}catch(e){G=St}})();function Pr(e){if($===setTimeout)return setTimeout(e,0);if(($===xt||!$)&&setTimeout)return $=setTimeout,setTimeout(e,0);try{return $(e,0)}catch(t){try{return $.call(null,e,0)}catch(r){return $.call(this,e,0)}}}function Wi(e){if(G===clearTimeout)return clearTimeout(e);if((G===St||!G)&&clearTimeout)return G=clearTimeout,clearTimeout(e);try{return G(e)}catch(t){try{return G.call(null,e)}catch(r){return G.call(this,e)}}}var z=[],ue=!1,ae,_e=-1;function qi(){!ue||!ae||(ue=!1,ae.length?z=ae.concat(z):_e=-1,z.length&&Mr())}function Mr(){if(!ue){var e=Pr(qi);ue=!0;for(var t=z.length;t;){for(ae=z,z=[];++_e<t;)ae&&ae[_e].run();_e=-1,t=z.length}ae=null,ue=!1,Wi(e)}}I.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];z.push(new Or(e,t)),z.length===1&&!ue&&Pr(Mr)};function Or(e,t){this.fun=e,this.array=t}Or.prototype.run=function(){this.fun.apply(null,this.array)};I.title="browser";I.browser=!0;I.env={};I.argv=[];I.version="";I.versions={};function K(){}I.on=K;I.addListener=K;I.once=K;I.off=K;I.removeListener=K;I.removeAllListeners=K;I.emit=K;I.prependListener=K;I.prependOnceListener=K;I.listeners=function(e){return[]};I.binding=function(e){throw new Error("process.binding is not supported")};I.cwd=function(){return"/"};I.chdir=function(e){throw new Error("process.chdir is not supported")};I.umask=function(){return 0}});var a,s,ws,o=h(()=>{a=w(_r()),s=w(Br()),ws=function(e){function t(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return t();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t});var r=__magic__;return r}(Object)});var Ur=h(()=>{"use strict";o()});var Vr=h(()=>{"use strict";o()});var $r=h(()=>{"use strict";o()});var Gr=h(()=>{"use strict";o()});var H=h(()=>{"use strict";o()});var Hr=h(()=>{"use strict";o()});var Wr=h(()=>{"use strict";o()});var N=h(()=>{"use strict";o()});var qr=h(()=>{"use strict";o()});var jr=h(()=>{"use strict";o()});var F=h(()=>{"use strict";o();Vr();$r();Gr();H();Hr();Wr();N();qr();jr()});var wt,zr,Vs,Kr,$s,Yr,Gs,Hs,Ws,Zr=h(()=>{"use strict";o();F();wt={devnet:{id:"devnet",chainId:"D",name:"Devnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://devnet-wallet.multiversx.com",apiAddress:"https://devnet-api.multiversx.com",explorerAddress:"http://devnet-explorer.multiversx.com",apiTimeout:"4000"},testnet:{id:"testnet",chainId:"T",name:"Testnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://testnet-wallet.multiversx.com",apiAddress:"https://testnet-api.multiversx.com",explorerAddress:"http://testnet-explorer.multiversx.com",apiTimeout:"4000"},mainnet:{id:"mainnet",chainId:"1",name:"Mainnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://wallet.multiversx.com",apiAddress:"https://api.multiversx.com",explorerAddress:"https://explorer.multiversx.com",apiTimeout:"4000"}},{chainId:zr,egldLabel:Vs}=wt["devnet"],{chainId:Kr,egldLabel:$s}=wt["testnet"],{chainId:Yr,egldLabel:Gs}=wt["mainnet"],Hs={["devnet"]:zr,["testnet"]:Kr,["mainnet"]:Yr},Ws={[zr]:"devnet",[Kr]:"testnet",[Yr]:"mainnet"}});var At=h(()=>{"use strict";o()});var Xr=h(()=>{"use strict";o()});var Jr,bt=h(()=>{"use strict";o();Jr="transaction-status-toast-id"});var W,Qr=h(()=>{"use strict";o();W=require("@multiversx/sdk-web-wallet-provider")});var en,Pe,X,de,tn,It,Me,rn,J,b=h(()=>{"use strict";o();Ur();Zr();At();Xr();bt();Qr();en=.01,Pe=1500,X=5e4,de=1e9,tn=1,It=4294967295,Me="logout",rn="login",J="0"});var me,Oe=h(()=>{"use strict";o();me=()=>Date.now()/1e3});var nn=h(()=>{"use strict";o()});var on=h(()=>{"use strict";o()});var an=h(()=>{"use strict";o();Oe();nn();on()});var kt={};ne(kt,{getItem:()=>zi,localStorageKeys:()=>se,removeItem:()=>Ki,setItem:()=>ji});var se,vt,ji,zi,Ki,Se=h(()=>{"use strict";o();an();se={loginExpiresAt:"sdk-dapp-login-expires-at",logoutEvent:"sdk-dapp-logout-event"},vt=typeof localStorage!="undefined",ji=({key:e,data:t,expires:r})=>{!vt||localStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},zi=e=>{if(!vt)return;let t=localStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:me()>=r.expires?(localStorage.removeItem(String(e)),null):r.data},Ki=e=>{!vt||localStorage.removeItem(String(e))}});var Et={};ne(Et,{clear:()=>pn,getItem:()=>cn,removeItem:()=>ln,setItem:()=>sn,storage:()=>Yi});var sn,cn,ln,pn,Yi,un=h(()=>{"use strict";o();sn=({key:e,data:t,expires:r})=>{sessionStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},cn=e=>{let t=sessionStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:Date.now()>=r.expires?(sessionStorage.removeItem(String(e)),null):r.data},ln=e=>sessionStorage.removeItem(String(e)),pn=()=>sessionStorage.clear(),Yi={setItem:sn,getItem:cn,removeItem:ln,clear:pn}});var ge,Fe=h(()=>{"use strict";o();Se();un();ge={session:Et,local:kt}});var Lt,L,Be,Y=h(()=>{"use strict";o();Lt=require("@reduxjs/toolkit");b();L=(0,Lt.createAction)(Me),Be=(0,Lt.createAction)(rn,e=>({payload:e}))});var Dt,dn,mn,Ue,Nt,gn,fn,Sc,Tn,wc,Ac,bc,Ic,vc,kc,Ec,yn,Rt=h(()=>{"use strict";o();Dt=require("@multiversx/sdk-core"),dn=require("@reduxjs/toolkit"),mn=require("redux-persist");b();Fe();Se();Y();Ue={balance:"...",address:"",nonce:0,txCount:0,scrCount:0,claimableRewards:J},Nt={address:"",websocketEvent:null,accounts:{"":Ue},ledgerAccount:null,publicKey:"",walletConnectAccount:null,isAccountLoading:!0,accountLoadingError:null},gn=(0,dn.createSlice)({name:"accountInfoSlice",initialState:Nt,reducers:{setAddress:(e,t)=>{let r=t.payload;e.address=r,e.publicKey=new Dt.Address(r).hex()},setAccount:(e,t)=>{let r=e.address===t.payload.address;e.accounts={[e.address]:r?t.payload:Ue},e.shard=t.payload.shard,e.isAccountLoading=!1,e.accountLoadingError=null},setAccountNonce:(e,t)=>{let{address:r}=e;e.accounts[r].nonce=t.payload},setAccountShard:(e,t)=>{e.shard=t.payload},setLedgerAccount:(e,t)=>{e.ledgerAccount=t.payload},updateLedgerAccount:(e,t)=>{e.ledgerAccount!=null&&(e.ledgerAccount.index=t.payload.index,e.ledgerAccount.address=t.payload.address)},setWalletConnectAccount:(e,t)=>{e.walletConnectAccount=t.payload},setIsAccountLoading:(e,t)=>{e.isAccountLoading=t.payload,e.accountLoadingError=null},setAccountLoadingError:(e,t)=>{e.accountLoadingError=t.payload,e.isAccountLoading=!1},setWebsocketEvent:(e,t)=>{e.websocketEvent={timestamp:Date.now(),message:t.payload}}},extraReducers:e=>{e.addCase(L,()=>(ge.local.removeItem(se.loginExpiresAt),Nt)),e.addCase(Be,(t,r)=>{let{address:n}=r.payload;t.address=n,t.publicKey=new Dt.Address(n).hex()}),e.addCase(mn.REHYDRATE,(t,r)=>{var g;if(!((g=r.payload)!=null&&g.account))return;let{account:n}=r.payload,{address:i,shard:l,accounts:p,publicKey:m}=n;t.address=i,t.shard=l;let d=p&&i in p;t.accounts=d?p:Nt.accounts,t.publicKey=m})}}),{setAccount:fn,setAddress:Sc,setAccountNonce:Tn,setAccountShard:wc,setLedgerAccount:Ac,updateLedgerAccount:bc,setWalletConnectAccount:Ic,setIsAccountLoading:vc,setAccountLoadingError:kc,setWebsocketEvent:Ec}=gn.actions,yn=gn.reducer});function we(){return new Date().setHours(new Date().getHours()+24)}function Ae(e){ge.local.setItem({key:se.loginExpiresAt,data:e,expires:e})}var Ct=h(()=>{"use strict";o();Fe();Se()});var xn,hn,Sn,Fc,Bc,Uc,Vc,$c,Gc,wn,Hc,An,_t=h(()=>{"use strict";o();xn=require("@reduxjs/toolkit");Ct();H();Y();hn={loginMethod:"",walletConnectLogin:null,ledgerLogin:null,tokenLogin:null,walletLogin:null,extensionLogin:null,operaLogin:null,isLoginSessionInvalid:!1},Sn=(0,xn.createSlice)({name:"loginInfoSlice",initialState:hn,reducers:{setLoginMethod:(e,t)=>{e.loginMethod=t.payload},setTokenLogin:(e,t)=>{e.tokenLogin=t.payload},setTokenLoginSignature:(e,t)=>{(e==null?void 0:e.tokenLogin)!=null&&(e.tokenLogin.signature=t.payload)},setWalletLogin:(e,t)=>{e.walletLogin=t.payload},setWalletConnectLogin:(e,t)=>{e.walletConnectLogin=t.payload},setLedgerLogin:(e,t)=>{e.ledgerLogin=t.payload},invalidateLoginSession:e=>{e.isLoginSessionInvalid=!0},setLogoutRoute:(e,t)=>{e.logoutRoute=t.payload}},extraReducers:e=>{e.addCase(L,()=>hn),e.addCase(Be,(t,r)=>{t.loginMethod=r.payload.loginMethod,Ae(we())})}}),{setLoginMethod:Fc,setWalletConnectLogin:Bc,setLedgerLogin:Uc,setTokenLogin:Vc,setTokenLoginSignature:$c,setWalletLogin:Gc,invalidateLoginSession:wn,setLogoutRoute:Hc}=Sn.actions,An=Sn.reducer});var In,bn,vn,zc,Pt,Kc,Yc,kn,Mt=h(()=>{"use strict";o();In=require("@reduxjs/toolkit");Y();bn={},vn=(0,In.createSlice)({name:"modalsSlice",initialState:bn,reducers:{setTxSubmittedModal:(e,t)=>{e.txSubmittedModal=t.payload},setNotificationModal:(e,t)=>{e.notificationModal=t.payload},clearTxSubmittedModal:e=>{e.txSubmittedModal=void 0},clearNotificationModal:e=>{e.notificationModal=void 0}},extraReducers:e=>{e.addCase(L,()=>bn)}}),{setTxSubmittedModal:zc,setNotificationModal:Pt,clearTxSubmittedModal:Kc,clearNotificationModal:Yc}=vn.actions,kn=vn.reducer});var En=h(()=>{"use strict";o()});var Ln=h(()=>{"use strict";o();En()});function Ot(e){return e[Math.floor(Math.random()*e.length)]}var Nn=h(()=>{"use strict";o()});var Dn=h(()=>{"use strict";o();At()});var Rn=h(()=>{"use strict";o();Ln();Nn();Dn()});var Cn,_n,Ft,Xi,Pn,ul,dl,Mn,Bt=h(()=>{"use strict";o();Cn=require("@reduxjs/toolkit"),_n=w(require("lodash.omit"));Rn();Ft={id:"not-configured",chainId:"",name:"NOT CONFIGURED",egldLabel:"",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"",walletConnectBridgeAddress:"",walletConnectV2RelayAddress:"",walletConnectV2ProjectId:"",walletConnectV2Options:{},walletAddress:"",apiAddress:"",explorerAddress:"",apiTimeout:"4000"},Xi={network:Ft,chainID:"-1"},Pn=(0,Cn.createSlice)({name:"appConfig",initialState:Xi,reducers:{initializeNetworkConfig:(e,t)=>{let r=Ot(t.payload.walletConnectBridgeAddresses),n=Ot(t.payload.walletConnectV2RelayAddresses),i=(0,_n.default)(t.payload,"walletConnectBridgeAddresses","walletConnectV2RelayAddresses");e.network=k(x(x({},e.network),i),{walletConnectBridgeAddress:r,walletConnectV2RelayAddress:n})},setChainID:(e,t)=>{e.chainID=t.payload}}}),{initializeNetworkConfig:ul,setChainID:dl}=Pn.actions,Mn=Pn.reducer});var On,Ut,Fn,hl,xl,Sl,Ve,$e=h(()=>{"use strict";o();On=require("@reduxjs/toolkit");F();Y();Ut={isSigning:!1,signedSessions:{}},Fn=(0,On.createSlice)({name:"signedMessageInfoSliceState",initialState:Ut,reducers:{setSignSession:(e,t)=>{let{sessionId:r,signedSession:n,errorMessage:i}=t.payload;return k(x({},e),{errorMessage:i!=null?i:e.errorMessage,isSigning:n.status==="pending",signedSessions:k(x({},e.signedSessions),{[r]:n})})},setSignSessionState:(e,t)=>x(x({},e),t.payload),clearSignedMessageInfo:()=>Ut},extraReducers:e=>{e.addCase(L,()=>Ut)}}),{setSignSession:hl,clearSignedMessageInfo:xl,setSignSessionState:Sl}=Fn.actions,Ve=Fn.reducer});var Un,Vn,Bn,$n,Ll,Nl,Dl,Rl,Cl,_l,Ge,He=h(()=>{"use strict";o();Un=require("@reduxjs/toolkit"),Vn=require("redux-persist");bt();F();Oe();Y();Bn={customToasts:[],transactionToasts:[],failTransactionToast:null},$n=(0,Un.createSlice)({name:"toastsSlice",initialState:Bn,reducers:{addCustomToast:(e,t)=>{e.customToasts.push(k(x({},t.payload),{type:"custom",toastId:t.payload.toastId||`custom-toast-${e.customToasts.length+1}`}))},removeCustomToast:(e,t)=>{e.customToasts=e.customToasts.filter(r=>r.toastId!==t.payload)},addTransactionToast:(e,t)=>{e.transactionToasts.push({type:"transaction",startTimestamp:me(),toastId:t.payload||`custom-toast-${e.transactionToasts.length+1}`})},removeTransactionToast:(e,t)=>{e.transactionToasts=e.transactionToasts.filter(r=>r.toastId!==t.payload)},addFailTransactionToast:(e,t)=>{e.failTransactionToast=k(x({},t.payload),{toastId:Jr})},removeFailTransactionToast:e=>{e.failTransactionToast=null}},extraReducers:e=>{e.addCase(L,()=>Bn),e.addCase(Vn.REHYDRATE,(t,r)=>{var i,l;let n=(l=(i=r.customToasts)==null?void 0:i.filter(p=>!("component"in p)))!=null?l:[];t.customToasts=n})}}),{addCustomToast:Ll,removeCustomToast:Nl,addTransactionToast:Dl,removeTransactionToast:Rl,addFailTransactionToast:Cl,removeFailTransactionToast:_l}=$n.actions,Ge=$n.reducer});var Gn,$t,Gt,Ht,Ji,Vt,Hn,Fl,Wn,Bl,We,qe=h(()=>{"use strict";o();Gn=require("@reduxjs/toolkit");Y();$t="Transaction failed",Gt="Transaction successful",Ht="Processing transaction",Ji="Transaction submitted",Vt={},Hn=(0,Gn.createSlice)({name:"transactionsInfo",initialState:Vt,reducers:{setTransactionsDisplayInfo(e,t){let{sessionId:r,transactionsDisplayInfo:n}=t.payload;r!=null&&(e[r]={errorMessage:(n==null?void 0:n.errorMessage)||$t,successMessage:(n==null?void 0:n.successMessage)||Gt,processingMessage:(n==null?void 0:n.processingMessage)||Ht,submittedMessage:(n==null?void 0:n.submittedMessage)||Ji,transactionDuration:n==null?void 0:n.transactionDuration})},clearTransactionsInfoForSessionId(e,t){t.payload!=null&&delete e[t.payload]},clearTransactionsInfo:()=>Vt},extraReducers:e=>{e.addCase(L,()=>Vt)}}),{clearTransactionsInfo:Fl,setTransactionsDisplayInfo:Wn,clearTransactionsInfoForSessionId:Bl}=Hn.actions,We=Hn.reducer});function qn(e){return e!=null&&(sa(e)||ua(e))}function je(e){return e!=null&&(ca(e)||da(e))}function ze(e){return e!=null&&(la(e)||ma(e))}function jn(e){return e!=null&&pa(e)}function sa(e){return e!=null&&ea.includes(e)}function ca(e){return e!=null&&ta.includes(e)}function la(e){return e!=null&&ra.includes(e)}function pa(e){return e!=null&&na.includes(e)}function ua(e){return e!=null&&oa.includes(e)}function da(e){return e!=null&&ia.includes(e)}function ma(e){return e!=null&&aa.includes(e)}var ea,ta,ra,na,oa,ia,aa,qt=h(()=>{"use strict";o();H();ea=["sent"],ta=["success"],ra=["fail","cancelled","timedOut"],na=["timedOut"],oa=["pending"],ia=["success"],aa=["fail","invalid"]});var zn,Kn,be,ga,Yn,zl,Kl,Zn,Xn,Jn,jt,Yl,Zl,Qn,Xl,Ke,Ye=h(()=>{"use strict";o();zn=require("@reduxjs/toolkit"),Kn=require("redux-persist");H();qt();Y();be={signedTransactions:{},transactionsToSign:null,signTransactionsError:null,signTransactionsCancelMessage:null,customTransactionInformationForSessionId:{}},ga={signWithoutSending:!1,sessionInformation:null,redirectAfterSign:!1},Yn=(0,zn.createSlice)({name:"transactionsSlice",initialState:be,reducers:{moveTransactionsToSignedState:(e,t)=>{var d,g;let{sessionId:r,transactions:n,errorMessage:i,status:l,redirectRoute:p}=t.payload,m=((d=e.customTransactionInformationForSessionId)==null?void 0:d[r])||ga;e.signedTransactions[r]={transactions:n,status:l,errorMessage:i,redirectRoute:p,customTransactionInformation:m},((g=e==null?void 0:e.transactionsToSign)==null?void 0:g.sessionId)===r&&(e.transactionsToSign=be.transactionsToSign)},clearSignedTransaction:(e,t)=>{e.signedTransactions[t.payload]&&delete e.signedTransactions[t.payload]},clearTransactionToSign:e=>{e!=null&&e.transactionsToSign&&(e.transactionsToSign=null)},updateSignedTransaction:(e,t)=>{e.signedTransactions=x(x({},e.signedTransactions),t.payload)},updateSignedTransactions:(e,t)=>{let{sessionId:r,status:n,errorMessage:i,transactions:l}=t.payload;e.signedTransactions[r]!=null&&(e.signedTransactions[r].status=n,i!=null&&(e.signedTransactions[r].errorMessage=i),l!=null&&(e.signedTransactions[r].transactions=l))},updateSignedTransactionStatus:(e,t)=>{var m,d,g,y,T,S;let{sessionId:r,status:n,errorMessage:i,transactionHash:l}=t.payload,p=(d=(m=e.signedTransactions)==null?void 0:m[r])==null?void 0:d.transactions;if(p!=null){e.signedTransactions[r].transactions=p.map(_=>_.hash===l?k(x({},_),{status:n,errorMessage:i}):_);let v=(y=(g=e.signedTransactions[r])==null?void 0:g.transactions)==null?void 0:y.every(_=>je(_.status)),C=(S=(T=e.signedTransactions[r])==null?void 0:T.transactions)==null?void 0:S.every(_=>ze(_.status));v&&(e.signedTransactions[r].status="success"),C&&(e.signedTransactions[r].status="fail")}},setTransactionsToSign:(e,t)=>{e.transactionsToSign=t.payload;let{sessionId:r,customTransactionInformation:n}=t.payload;e.customTransactionInformationForSessionId[r]=n,e.signTransactionsError=null},clearAllTransactionsToSign:e=>{e.transactionsToSign=be.transactionsToSign,e.signTransactionsError=null},clearAllSignedTransactions:e=>{e.signedTransactions=be.signedTransactions},setSignTransactionsError:(e,t)=>{e.signTransactionsError=t.payload},setSignTransactionsCancelMessage:(e,t)=>{e.signTransactionsCancelMessage=t.payload}},extraReducers:e=>{e.addCase(L,()=>be),e.addCase(Kn.REHYDRATE,(t,r)=>{var p;if(t.signTransactionsCancelMessage=null,!((p=r.payload)!=null&&p.transactions))return;let{signedTransactions:n,customTransactionInformationForSessionId:i}=r.payload.transactions,l=Object.entries(n).reduce((m,[d,g])=>{let y=new Date(d),T=new Date;return T.setHours(T.getHours()+5),T-y>0||(m[d]=g),m},{});i!=null&&(t.customTransactionInformationForSessionId=i),n!=null&&(t.signedTransactions=l)})}}),{updateSignedTransactionStatus:zl,updateSignedTransactions:Kl,setTransactionsToSign:Zn,clearAllTransactionsToSign:Xn,clearAllSignedTransactions:Jn,clearSignedTransaction:jt,clearTransactionToSign:Yl,setSignTransactionsError:Zl,setSignTransactionsCancelMessage:Qn,moveTransactionsToSignedState:Xl}=Yn.actions,Ke=Yn.reducer});var Q=h(()=>{"use strict";o();Rt();_t();Mt();Bt();$e();He();qe();Ye()});var zt=h(()=>{"use strict";o()});var oo,no,io,wp,Ap,bp,Ip,vp,kp,ao,so=h(()=>{"use strict";o();oo=require("@reduxjs/toolkit");Y();no={visible:!1,modal:{showHeader:!0,showFooter:!1,headerText:"",footerText:""}},io=(0,oo.createSlice)({name:"dappModalsSlice",initialState:no,reducers:{setDappModalVisibility:(e,t)=>{e.visible=t.payload},setDappModalHeaderVisibility:(e,t)=>{e.modal.showHeader=t.payload},setDappModalFooterVisibility:(e,t)=>{e.modal.showFooter=t.payload},setDappModalHeaderText:(e,t)=>{e.modal.headerText=t.payload},setDappModalFooterText:(e,t)=>{e.modal.footerText=t.payload},setDappModalConfig:(e,t)=>{e.modal=x({},t.payload)}},extraReducers:e=>{e.addCase(L,()=>no)}}),{setDappModalVisibility:wp,setDappModalHeaderVisibility:Ap,setDappModalFooterVisibility:bp,setDappModalHeaderText:Ip,setDappModalFooterText:vp,setDappModalConfig:kp}=io.actions,ao=io.reducer});var co,ha,xa,fe,et=h(()=>{"use strict";o();co=require("@reduxjs/toolkit");zt();Rt();so();_t();Mt();Bt();$e();He();qe();Ye();ha={["account"]:yn,["dappModal"]:ao,["loginInfo"]:An,["modals"]:kn,["networkConfig"]:Mn,["signedMessageInfo"]:Ve,["toasts"]:Ge,["transactionsInfo"]:We,["transactions"]:Ke},xa=(e={})=>(0,co.combineReducers)(x(x({},ha),e)),fe=xa});var uo={};ne(uo,{default:()=>Ea});function tt(e,t=[]){return{key:e,version:1,storage:po.default,blacklist:t}}var ee,lo,po,Sa,wa,Aa,ba,Ia,va,ka,Ea,mo=h(()=>{"use strict";o();ee=require("redux-persist"),lo=w(require("redux-persist/lib/storage")),po=w(require("redux-persist/lib/storage/session"));et();Q();$e();He();qe();Ye();zt();Sa={2:e=>k(x({},e),{networkConfig:Ft})};wa=tt("sdk-dapp-transactionsInfo"),Aa=tt("sdk-dapp-transactions",["transactionsToSign"]),ba=tt("sdk-dapp-toasts"),Ia=tt("sdk-dapp-signedMessageInfo"),va={key:"sdk-dapp-store",version:2,storage:lo.default,whitelist:["account","loginInfo","modals","networkConfig"],migrate:(0,ee.createMigrate)(Sa,{debug:!1})},ka={["toasts"]:(0,ee.persistReducer)(ba,Ge),["transactions"]:(0,ee.persistReducer)(Aa,Ke),["transactionsInfo"]:(0,ee.persistReducer)(wa,We),["signedMessageInfo"]:(0,ee.persistReducer)(Ia,Ve)},Ea=(0,ee.persistReducer)(va,fe(ka))});var go={};ne(go,{default:()=>La});var La,fo=h(()=>{"use strict";o();et();La=fe()});var To={};ne(To,{default:()=>Da});var O,Na,Da,yo=h(()=>{"use strict";o();O=require("redux-persist"),Na=[O.FLUSH,O.REHYDRATE,O.PAUSE,O.PERSIST,O.PURGE,O.REGISTER],Da=Na});var So={};ne(So,{default:()=>xo});function xo(e){return(0,ho.persistStore)(e)}var ho,wo=h(()=>{"use strict";o();ho=require("redux-persist")});var fs={};ne(fs,{calcTotalFee:()=>Qt,isCrossShardTransaction:()=>$o,nativeAuth:()=>gs,removeAllSignedTransactions:()=>_a,removeAllTransactionsToSign:()=>Pa,removeSignedTransaction:()=>Ca,removeTransactionsToSign:()=>Ra,sendTransactions:()=>us,signTransactions:()=>er});module.exports=xe(fs);o();o();o();Q();o();var Kt=require("@reduxjs/toolkit"),vo=require("react-redux/lib/utils/Subscription");Q();o();var to=w(require("lodash.throttle"));b();o();var eo=w(require("lodash.isequal")),Ze=require("reselect");F();var f=(0,Ze.createSelectorCreator)(Ze.defaultMemoize,eo.default),Xe=(e,t)=>e!=""&&Boolean(t);Q();Ct();Fe();Se();var fa=[Me],Je=!1,Ta=(0,to.default)(()=>{Ae(we())},5e3),ro=e=>t=>r=>{var d;if(fa.includes(r.type))return t(r);let n=e.getState(),i=ge.local.getItem(se.loginExpiresAt);if(!Xe((d=n==null?void 0:n.loginInfo)==null?void 0:d.loginMethod,n==null?void 0:n.account.address))return t(r);if(i==null)return Ae(we());let p=Date.now();return i-p<0&&!Je?setTimeout(()=>{Je=!0,e.dispatch(wn())},1e3):(Je&&(Je=!1),Ta()),t(r)};o();o();function Qe(){return typeof sessionStorage!="undefined"}var Ao=Qe()?(mo(),xe(uo)).default:(fo(),xe(go)).default,bo=Qe()?(yo(),xe(To)).default:[],Io=Qe()?(wo(),xe(So)).default:e=>e;et();var A=(0,Kt.configureStore)({reducer:Ao,middleware:e=>e({serializableCheck:{ignoredActions:[...bo,Tn.type,fn.type],ignoredPaths:["payload.nonce","account.account.nonce","providers.accountProvider"]}}).concat(ro)}),Qp=(0,vo.createSubscription)(A),eu=Io(A),tu=(0,Kt.configureStore)({reducer:fe});function Ra(e){A.dispatch(jt(e))}function Ca(e){A.dispatch(jt(e))}function _a(){A.dispatch(Jn())}function Pa(){A.dispatch(Xn())}o();o();var Mo=w(require("bignumber.js"));b();o();Q();var Z=e=>e.account,Ie=f(Z,e=>e.address),Yt=f(Z,Ie,(e,t)=>t in e.accounts?e.accounts[t]:Ue),cu=f(Z,Yt,(e,t)=>{let i=e,{accounts:r}=i,n=fr(i,["accounts"]);return k(x({},n),{account:t})}),ko=f(Yt,e=>e.balance),Eo=f(Yt,e=>{var t;return((t=e==null?void 0:e.nonce)==null?void 0:t.valueOf())||0}),lu=f(Z,e=>e.shard),pu=f(Z,e=>e.ledgerAccount),uu=f(Z,e=>e.walletConnectAccount),du=f(Z,e=>e.isAccountLoading),mu=f(Z,e=>e.accountLoadingError),gu=f(Z,e=>e.websocketEvent);o();var ce=e=>e.networkConfig,rt=f(ce,e=>e.chainID),yu=f(ce,e=>e.network.walletConnectBridgeAddress),hu=f(ce,e=>e.network.walletConnectV2RelayAddress),xu=f(ce,e=>e.network.walletConnectV2ProjectId),Su=f(ce,e=>e.network.walletConnectV2Options),wu=f(ce,e=>e.network.walletConnectDeepLink),Zt=f(ce,e=>e.network),Lo=f(Zt,e=>e.apiAddress),No=f(Zt,e=>e.explorerAddress),Au=f(Zt,e=>e.egldLabel);Q();F();o();var Do=w(require("bignumber.js"));b();var nt=e=>{if(isNaN(e)||String(e).includes("Infinity"))return!1;let[t,r]=e.split(".");if(r)for(;r.charAt(r.length-1)===J;)r=r.slice(0,-1);let n=r?[t,r].join("."):t,i=new Do.default(n);return i.toString(10)===n&&i.comparedTo(0)>=0};o();var Jt=w(require("bignumber.js"));b();o();var B=require("@multiversx/sdk-core"),_o=require("@multiversx/sdk-network-providers");b();o();o();var Ro=w(require("bignumber.js")),Xt=(e,t=!0)=>{let r=String(e);if(!r.match(/^[-]?\d+$/))return!1;let n=new Ro.default(r),i=t?0:-1;return n.toString(10)===r&&n.comparedTo(0)>=i};o();b();o();var Co={from:"erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa",to:"erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa"};function Po({minGasLimit:e=String(X),gasLimit:t,gasPrice:r,data:n,gasPerDataByte:i,gasPriceModifier:l,defaultGasPrice:p=String(de),chainId:m}){let d=n||"",g=Xt(t)?t:e,y=nt(r)?r:p,T=new B.Transaction({nonce:0,value:B.TokenPayment.egldFromAmount("0"),receiver:new B.Address(Co.to),sender:new B.Address(Co.to),gasPrice:parseInt(y),gasLimit:parseInt(g),data:new B.TransactionPayload(d.trim()),chainID:m,version:new B.TransactionVersion(1)}),S=new _o.NetworkConfig;S.MinGasLimit=parseInt(e),S.GasPerDataByte=parseInt(i),S.GasPriceModifier=parseFloat(l);try{return T.computeFee(S).toString(10)}catch(v){return J}}function Qt(e,t){let r=new Jt.default(0);return e.forEach(n=>{let i=Po({gasPerDataByte:String(Pe),gasPriceModifier:String(en),minGasLimit:String(t),gasLimit:n.getGasLimit().valueOf().toString(),gasPrice:n.getGasPrice().valueOf().toString(),data:n.getData().toString(),chainId:n.getChainID().valueOf()});r=r.plus(new Jt.default(i))}),r}function er(l){return D(this,arguments,function*({transactions:e,callbackRoute:t,minGasLimit:r=X,customTransactionInformation:n,transactionsDisplayInfo:i}){let p=A.getState(),m=Date.now().toString(),d=ko(p),g=rt(p),y=Array.isArray(e)?e:[e],T=Qt(y,r);if(!new Mo.default(nt(d)?d:"0").minus(T).isGreaterThan(0)){let q={type:"warning",iconClassName:"text-warning",title:"Insufficient EGLD funds",description:"Current EGLD balance cannot cover the transaction fees."};return A.dispatch(Pt(q)),{error:"insufficient funds",sessionId:null}}if(!(y==null?void 0:y.every(q=>q.getChainID().valueOf()===g.valueOf()))){let q={type:"warning",iconClassName:"text-warning",title:"Network change detected",description:"The application tried to change the transaction network"};return A.dispatch(Pt(q)),{error:"Invalid ChainID",sessionId:null}}let _={sessionId:m,callbackRoute:t,customTransactionInformation:n,transactions:y.map(q=>q.toPlainObject())};return A.dispatch(Qn(null)),A.dispatch(Zn(_)),A.dispatch(Wn({sessionId:m,transactionsDisplayInfo:i})),{sessionId:m}})}o();var pr=require("@multiversx/sdk-core"),ur=w(require("bignumber.js"));b();o();var P=require("@multiversx/sdk-core");b();o();function tr(e){try{return a.Buffer.from(e,"base64").toString()===atob(e)}catch(t){return!1}}function Te(e){return atob(e)}function ve(e){var i,l,p;let{data:t}=e,r=tr(t!=null?t:"")?P.TransactionPayload.fromEncoded(t):new P.TransactionPayload(t),n=new P.Transaction(x({value:e.value.valueOf(),data:r,nonce:e.nonce.valueOf(),receiver:new P.Address(e.receiver),sender:new P.Address(e.sender),gasLimit:(i=e.gasLimit.valueOf())!=null?i:X,gasPrice:(l=e.gasPrice.valueOf())!=null?l:de,chainID:e.chainID.valueOf(),version:new P.TransactionVersion((p=e.version)!=null?p:tn)},e.options?{options:new P.TransactionOptions(e.options)}:{}));return n.applySignature({hex:()=>e.signature||""},new P.Address(e.sender)),n}o();o();var re=e=>e.loginInfo,id=f(re,e=>e.loginMethod),ad=f(re,Ie,(e,t)=>Xe(e.loginMethod,t)),sd=f(re,e=>e.walletConnectLogin),cd=f(re,e=>e.ledgerLogin),ld=f(re,e=>e.walletLogin),pd=f(re,e=>e.isLoginSessionInvalid),ud=f(re,e=>e.tokenLogin),dd=f(re,e=>e.logoutRoute);o();var Oo=e=>e.modals,fd=f(Oo,e=>e.txSubmittedModal),Td=f(Oo,e=>e.notificationModal);o();var rr=e=>e.signedMessageInfo,xd=f(rr,e=>e.isSigning),Sd=f(rr,e=>e.errorMessage),wd=f(rr,e=>{let t=Object.keys(e.signedSessions),r=t.length;return e.signedSessions[t[r-1]]});o();var nr=e=>e.toasts,Id=f(nr,e=>e.customToasts),vd=f(nr,e=>e.transactionToasts),kd=f(nr,e=>e.failTransactionToast);o();Q();var Fo={errorMessage:$t,successMessage:Gt,processingMessage:Ht},Ma=e=>e.transactionsInfo,Dd=f(Ma,(e,t)=>t,(e,t)=>t!=null&&(e==null?void 0:e[Number(t)])||Fo);o();o();qt();o();var Fa=w(require("bignumber.js"));F();o();o();o();o();var Ua=require("@multiversx/sdk-core"),Va=w(require("bignumber.js"));H();o();var Ba=require("@multiversx/sdk-core");o();o();o();var ir=require("@multiversx/sdk-core/out");o();b();var $a=e=>{let t=a.Buffer.from([0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);if(e.slice(0,t.length).equals(t))return!0;let n=a.Buffer.alloc(32).fill(0);return e.equals(n)},or=e=>{try{let r=parseInt("11",2),n=parseInt("01",2),i=a.Buffer.from(e,"hex"),l=i[31];if($a(i))return It;let p=l&r;return p>3-1&&(p=l&n),p}catch(t){return-1}};function $o({receiverAddress:e,senderShard:t,senderAddress:r}){try{let n=new ir.Address(e),i=or(n.pubkey());if(t==null&&r!=null){let l=new ir.Address(r);return or(l)===i}return i===t}catch(n){return!1}}o();var Go=require("@multiversx/sdk-core");F();o();o();o();o();H();o();o();o();o();o();o();o();var ar="accounts";var sr="blocks";o();o();o();o();N();o();o();N();o();o();o();var qa=w(require("bignumber.js"));b();o();var Wa=require("@multiversx/sdk-core"),cr=w(require("bignumber.js"));b();o();cr.default.config({ROUNDING_MODE:cr.default.ROUND_FLOOR});o();o();o();b();o();o();o();o();b();o();b();o();var ja=require("@multiversx/sdk-core");b();o();o();o();o();b();o();N();var Ka=["reDelegateRewards","claimRewards","unBond"],Ya=["wrapEgld","unwrapEgld"],Za=["unStake"],Xa=["unDelegate"];o();o();o();b();o();var es=w(require("bignumber.js"));o();o();o();N();o();var ts=w(require("bignumber.js"));o();o();o();o();N();o();o();o();var ns=w(require("linkifyjs"));o();b();o();var os=w(require("bignumber.js"));o();F();o();o();H();o();H();o();o();o();N();o();N();o();var is=w(require("bignumber.js"));b();N();o();N();o();var zo=require("react");F();o();o();N();o();var as=require("@multiversx/sdk-core/out"),ss=w(require("bignumber.js"));N();o();N();o();o();H();var By=[{label:"Raw",value:"raw"},{label:"Text",value:"text"},{label:"Decimal",value:"decimal"},{label:"Smart",value:"smart"}];o();var Ko=require("react");F();o();var ls=require("react");N();var qy=["create","localMint","ESDTLocalMint","addQuantity","burn","localBurn","ESDTLocalBurn","wipe","writeLog","signalError"];var st=e=>e.transactions,ke=f(st,e=>e.signedTransactions),Nh=f(st,e=>e.signTransactionsError),Dh=f(st,e=>e.signTransactionsCancelMessage),ct=e=>t=>Object.entries(t).reduce((r,[n,i])=>(e(i.status)&&(r[n]=i),r),{}),Rh=f(ke,ct(qn)),Ch=f(ke,ct(je)),_h=f(ke,ct(ze)),Ph=f(ke,ct(jn)),Mh=f(st,e=>{var t;return(e==null?void 0:e.transactionsToSign)==null?null:k(x({},e.transactionsToSign),{transactions:((t=e==null?void 0:e.transactionsToSign)==null?void 0:t.transactions.map(r=>ve(r)))||[]})}),Oh=f(ke,(e,t)=>t,(e,t)=>t!=null?(e==null?void 0:e[t])||{}:{});o();o();var Zo=w(require("axios"));o();o();var Yo=e=>{let t=e!=null?e:Lo(A.getState());return t.endsWith("/")?t.slice(0,-1):t};function Xo(e){return D(this,null,function*(){if(!e)return null;let r=`${Yo()}/${ar}/${e}`;try{let{data:n}=yield Zo.default.get(r);return n}catch(n){console.error("error fetching configuration for ",r)}return null})}function Jo(e){return D(this,null,function*(){return yield Xo(e)})}o();function Qo(e){let t=A.getState(),r=Eo(t);return e?r&&!isNaN(r)?Math.max(r,e.nonce):e.nonce:r}function ps(e){let t=new ur.default(X),r=new ur.default(Pe),n=e?r.times(a.Buffer.from(e).length):0;return t.plus(n).toString(10)}function ei(t){return D(this,arguments,function*({transactions:e}){let r=Ie(A.getState()),n=yield Jo(r),i=Qo(n);return e.map(l=>{let{value:p,receiver:m,data:d="",chainID:g,version:y=1,options:T,gasPrice:S=de,gasLimit:v=ps(l.data)}=l,C=m;try{C=new pr.Address(m).hex()}catch(si){throw"Invalid Receiver address"}let _=rt(A.getState()).valueOf().toString(),q=g||_;return ve({value:p,receiver:C,data:d,gasPrice:S,gasLimit:Number(v),nonce:Number(i.valueOf().toString()),sender:new pr.Address(r).hex(),chainID:q,version:y,options:T})})})}function us(d){return D(this,arguments,function*({transactions:e,transactionsDisplayInfo:t,redirectAfterSign:r=!0,callbackRoute:n=window.location.pathname,signWithoutSending:i,completedTransactionsDelay:l,sessionInformation:p,minGasLimit:m}){try{let g=Array.isArray(e)?e:[e],y=g.every(S=>Object.getPrototypeOf(S).toPlainObject!=null),T=g;return y||(T=yield ei({transactions:g,minGasLimit:m})),er({transactions:T,minGasLimit:m,callbackRoute:n,transactionsDisplayInfo:t,customTransactionInformation:{redirectAfterSign:r,completedTransactionsDelay:l,sessionInformation:p,signWithoutSending:i}})}catch(g){return console.error("error signing transaction",g),{error:g,sessionId:null}}})}o();o();o();var ti,Ee={hostname:typeof window!="undefined"?(ti=window==null?void 0:window.location)==null?void 0:ti.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},dr=e=>{var r,n,i,l;return e===!0?Ee:{hostname:(r=e==null?void 0:e.hostname)!=null?r:Ee.hostname,expirySeconds:(n=e==null?void 0:e.expirySeconds)!=null?n:Ee.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:Ee.apiAddress,tokenExpirationToastWarningSeconds:(l=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?l:Ee.tokenExpirationToastWarningSeconds}};o();var ds=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),ye=e=>ds(a.Buffer.from(e,"utf8").toString("base64"));o();var ri=w(require("axios"));function ni(e){return D(this,null,function*(){let{data:t}=yield ri.default.get(`${e}/${sr}?size=1&fields=hash,timestamp`),[r]=t;return r})}o();o();o();function ms(e){return Object.prototype.toString.call(e)==="[object String]"}var oi=e=>{if(!e||!ms(e))return null;try{let[t,r,n]=e.split("."),i=Te(t),l=Te(r),[p,m,d,g]=l.split("."),y=JSON.parse(Te(g)),T=Te(p),S={ttl:Number(d),address:i,extraInfo:y,host:T,signature:n,blockHash:m,body:l};return g==="e30"&&delete S.extraInfo,S}catch(t){return null}};var ii=({address:e,token:t,signature:r})=>{let n=ye(e),i=ye(t);return`${n}.${i}.${r}`};o();Oe();var ai=e=>{let t=oi(e);if(!t)return{isExpired:!1};let r=me(),{ttl:n,extraInfo:i}=t,l=i.timestamp;if(!l)return{isExpired:!1};let p=l+n,m=r>p,d=p-r;return{isExpired:m,expiresAt:p,secondsUntilExpires:d}};var gs=e=>{let{hostname:t,apiAddress:r,expirySeconds:n}=dr(e);return{getNativeAuthConfig:dr,initialize:(...p)=>D(void 0,[...p],function*(l={}){let{hash:m,timestamp:d}=yield ni(r),g=ye(JSON.stringify(x(x({},l),d?{timestamp:d}:{})));return`${ye(t)}.${m}.${n}.${g}`}),getToken:ii,getTokenExpiration:ai}};0&&(module.exports={calcTotalFee,isCrossShardTransaction,nativeAuth,removeAllSignedTransactions,removeAllTransactionsToSign,removeSignedTransaction,removeTransactionsToSign,sendTransactions,signTransactions});
1
+ "use strict";var ui=Object.create;var xe=Object.defineProperty,di=Object.defineProperties,mi=Object.getOwnPropertyDescriptor,gi=Object.getOwnPropertyDescriptors,fi=Object.getOwnPropertyNames,Ne=Object.getOwnPropertySymbols,Ti=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable;var Tr=(e,t,r)=>t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))pt.call(t,r)&&Tr(e,r,t[r]);if(Ne)for(var r of Ne(t))yr.call(t,r)&&Tr(e,r,t[r]);return e},k=(e,t)=>di(e,gi(t));var hr=(e,t)=>{var r={};for(var n in e)pt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ne)for(var n of Ne(e))t.indexOf(n)<0&&yr.call(e,n)&&(r[n]=e[n]);return r};var h=(e,t)=>()=>(e&&(t=e(e=0)),t);var De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ne=(e,t)=>{for(var r in t)xe(e,r,{get:t[r],enumerable:!0})},xr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fi(t))!pt.call(e,i)&&i!==r&&xe(e,i,{get:()=>t[i],enumerable:!(n=mi(t,i))||n.enumerable});return e};var w=(e,t,r)=>(r=e!=null?ui(Ti(e)):{},xr(t||!e||!e.__esModule?xe(r,"default",{value:e,enumerable:!0}):r,e)),Se=e=>xr(xe({},"__esModule",{value:!0}),e);var L=(e,t,r)=>new Promise((n,i)=>{var l=d=>{try{m(r.next(d))}catch(g){i(g)}},p=d=>{try{m(r.throw(d))}catch(g){i(g)}},m=d=>d.done?n(d.value):Promise.resolve(d.value).then(l,p);m((r=r.apply(e,t)).next())});var Ar=De(Re=>{"use strict";o();Re.byteLength=hi;Re.toByteArray=Si;Re.fromByteArray=bi;var U=[],M=[],yi=typeof Uint8Array!="undefined"?Uint8Array:Array,ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(oe=0,Sr=ut.length;oe<Sr;++oe)U[oe]=ut[oe],M[ut.charCodeAt(oe)]=oe;var oe,Sr;M["-".charCodeAt(0)]=62;M["_".charCodeAt(0)]=63;function wr(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function hi(e){var t=wr(e),r=t[0],n=t[1];return(r+n)*3/4-n}function xi(e,t,r){return(t+r)*3/4-r}function Si(e){var t,r=wr(e),n=r[0],i=r[1],l=new yi(xi(e,n,i)),p=0,m=i>0?n-4:n,d;for(d=0;d<m;d+=4)t=M[e.charCodeAt(d)]<<18|M[e.charCodeAt(d+1)]<<12|M[e.charCodeAt(d+2)]<<6|M[e.charCodeAt(d+3)],l[p++]=t>>16&255,l[p++]=t>>8&255,l[p++]=t&255;return i===2&&(t=M[e.charCodeAt(d)]<<2|M[e.charCodeAt(d+1)]>>4,l[p++]=t&255),i===1&&(t=M[e.charCodeAt(d)]<<10|M[e.charCodeAt(d+1)]<<4|M[e.charCodeAt(d+2)]>>2,l[p++]=t>>8&255,l[p++]=t&255),l}function wi(e){return U[e>>18&63]+U[e>>12&63]+U[e>>6&63]+U[e&63]}function Ai(e,t,r){for(var n,i=[],l=t;l<r;l+=3)n=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),i.push(wi(n));return i.join("")}function bi(e){for(var t,r=e.length,n=r%3,i=[],l=16383,p=0,m=r-n;p<m;p+=l)i.push(Ai(e,p,p+l>m?m:p+l));return n===1?(t=e[r-1],i.push(U[t>>2]+U[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(U[t>>10]+U[t>>4&63]+U[t<<2&63]+"=")),i.join("")}});var br=De(dt=>{o();dt.read=function(e,t,r,n,i){var l,p,m=i*8-n-1,d=(1<<m)-1,g=d>>1,y=-7,T=r?i-1:0,S=r?-1:1,v=e[t+T];for(T+=S,l=v&(1<<-y)-1,v>>=-y,y+=m;y>0;l=l*256+e[t+T],T+=S,y-=8);for(p=l&(1<<-y)-1,l>>=-y,y+=n;y>0;p=p*256+e[t+T],T+=S,y-=8);if(l===0)l=1-g;else{if(l===d)return p?NaN:(v?-1:1)*(1/0);p=p+Math.pow(2,n),l=l-g}return(v?-1:1)*p*Math.pow(2,l-n)};dt.write=function(e,t,r,n,i,l){var p,m,d,g=l*8-i-1,y=(1<<g)-1,T=y>>1,S=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:l-1,C=n?1:-1,P=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(m=isNaN(t)?1:0,p=y):(p=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-p))<1&&(p--,d*=2),p+T>=1?t+=S/d:t+=S*Math.pow(2,1-T),t*d>=2&&(p++,d/=2),p+T>=y?(m=0,p=y):p+T>=1?(m=(t*d-1)*Math.pow(2,i),p=p+T):(m=t*Math.pow(2,T-1)*Math.pow(2,i),p=0));i>=8;e[r+v]=m&255,v+=C,m/=256,i-=8);for(p=p<<i|m,g+=i;g>0;e[r+v]=p&255,v+=C,p/=256,g-=8);e[r+v-C]|=P*128}});var Or=De(pe=>{"use strict";o();var mt=Ar(),le=br(),Ir=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pe.Buffer=u;pe.SlowBuffer=Ni;pe.INSPECT_MAX_BYTES=50;var Ce=2147483647;pe.kMaxLength=Ce;u.TYPED_ARRAY_SUPPORT=Ii();!u.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ii(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(r){return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(!!u.isBuffer(this))return this.buffer}});Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(!!u.isBuffer(this))return this.byteOffset}});function j(e){if(e>Ce)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return yt(e)}return Er(e,t,r)}u.poolSize=8192;function Er(e,t,r){if(typeof e=="string")return ki(e,t);if(ArrayBuffer.isView(e))return Ei(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return ft(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return u.from(n,t,r);var i=Li(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}u.from=function(e,t,r){return Er(e,t,r)};Object.setPrototypeOf(u.prototype,Uint8Array.prototype);Object.setPrototypeOf(u,Uint8Array);function Lr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function vi(e,t,r){return Lr(e),e<=0?j(e):t!==void 0?typeof r=="string"?j(e).fill(t,r):j(e).fill(t):j(e)}u.alloc=function(e,t,r){return vi(e,t,r)};function yt(e){return Lr(e),j(e<0?0:ht(e)|0)}u.allocUnsafe=function(e){return yt(e)};u.allocUnsafeSlow=function(e){return yt(e)};function ki(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=Nr(e,t)|0,n=j(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function gt(e){for(var t=e.length<0?0:ht(e.length)|0,r=j(t),n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Ei(e){if(V(e,Uint8Array)){var t=new Uint8Array(e);return ft(t.buffer,t.byteOffset,t.byteLength)}return gt(e)}function ft(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function Li(e){if(u.isBuffer(e)){var t=ht(e.length)|0,r=j(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||xt(e.length)?j(0):gt(e);if(e.type==="Buffer"&&Array.isArray(e.data))return gt(e.data)}function ht(e){if(e>=Ce)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce.toString(16)+" bytes");return e|0}function Ni(e){return+e!=e&&(e=0),u.alloc(+e)}u.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==u.prototype};u.compare=function(t,r){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),V(r,Uint8Array)&&(r=u.from(r,r.offset,r.byteLength)),!u.isBuffer(t)||!u.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,i=r.length,l=0,p=Math.min(n,i);l<p;++l)if(t[l]!==r[l]){n=t[l],i=r[l];break}return n<i?-1:i<n?1:0};u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};u.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return u.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var i=u.allocUnsafe(r),l=0;for(n=0;n<t.length;++n){var p=t[n];if(V(p,Uint8Array))l+p.length>i.length?u.from(p).copy(i,l):Uint8Array.prototype.set.call(i,p,l);else if(u.isBuffer(p))p.copy(i,l);else throw new TypeError('"list" argument must be an Array of Buffers');l+=p.length}return i};function Nr(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Tt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Mr(e).length;default:if(i)return n?-1:Tt(e).length;t=(""+t).toLowerCase(),i=!0}}u.byteLength=Nr;function Di(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Vi(this,t,r);case"utf8":case"utf-8":return Rr(this,t,r);case"ascii":return Bi(this,t,r);case"latin1":case"binary":return Ui(this,t,r);case"base64":return Oi(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $i(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function ie(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)ie(this,r,r+1);return this};u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)ie(this,r,r+3),ie(this,r+1,r+2);return this};u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)ie(this,r,r+7),ie(this,r+1,r+6),ie(this,r+2,r+5),ie(this,r+3,r+4);return this};u.prototype.toString=function(){var t=this.length;return t===0?"":arguments.length===0?Rr(this,0,t):Di.apply(this,arguments)};u.prototype.toLocaleString=u.prototype.toString;u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:u.compare(this,t)===0};u.prototype.inspect=function(){var t="",r=pe.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};Ir&&(u.prototype[Ir]=u.prototype.inspect);u.prototype.compare=function(t,r,n,i,l){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),l===void 0&&(l=this.length),r<0||n>t.length||i<0||l>this.length)throw new RangeError("out of range index");if(i>=l&&r>=n)return 0;if(i>=l)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,l>>>=0,this===t)return 0;for(var p=l-i,m=n-r,d=Math.min(p,m),g=this.slice(i,l),y=t.slice(r,n),T=0;T<d;++T)if(g[T]!==y[T]){p=g[T],m=y[T];break}return p<m?-1:m<p?1:0};function Dr(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,xt(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=u.from(t,n)),u.isBuffer(t))return t.length===0?-1:vr(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):vr(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function vr(e,t,r,n,i){var l=1,p=e.length,m=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;l=2,p/=2,m/=2,r/=2}function d(v,C){return l===1?v[C]:v.readUInt16BE(C*l)}var g;if(i){var y=-1;for(g=r;g<p;g++)if(d(e,g)===d(t,y===-1?0:g-y)){if(y===-1&&(y=g),g-y+1===m)return y*l}else y!==-1&&(g-=g-y),y=-1}else for(r+m>p&&(r=p-m),g=r;g>=0;g--){for(var T=!0,S=0;S<m;S++)if(d(e,g+S)!==d(t,S)){T=!1;break}if(T)return g}return-1}u.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};u.prototype.indexOf=function(t,r,n){return Dr(this,t,r,n,!0)};u.prototype.lastIndexOf=function(t,r,n){return Dr(this,t,r,n,!1)};function Ri(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var l=t.length;n>l/2&&(n=l/2);for(var p=0;p<n;++p){var m=parseInt(t.substr(p*2,2),16);if(xt(m))return p;e[r+p]=m}return p}function Ci(e,t,r,n){return Pe(Tt(t,e.length-r),e,r,n)}function Pi(e,t,r,n){return Pe(Wi(t),e,r,n)}function _i(e,t,r,n){return Pe(Mr(t),e,r,n)}function Mi(e,t,r,n){return Pe(qi(t,e.length-r),e,r,n)}u.prototype.write=function(t,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var l=this.length-r;if((n===void 0||n>l)&&(n=l),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return Ri(this,t,r,n);case"utf8":case"utf-8":return Ci(this,t,r,n);case"ascii":case"latin1":case"binary":return Pi(this,t,r,n);case"base64":return _i(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mi(this,t,r,n);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Oi(e,t,r){return t===0&&r===e.length?mt.fromByteArray(e):mt.fromByteArray(e.slice(t,r))}function Rr(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var l=e[i],p=null,m=l>239?4:l>223?3:l>191?2:1;if(i+m<=r){var d,g,y,T;switch(m){case 1:l<128&&(p=l);break;case 2:d=e[i+1],(d&192)===128&&(T=(l&31)<<6|d&63,T>127&&(p=T));break;case 3:d=e[i+1],g=e[i+2],(d&192)===128&&(g&192)===128&&(T=(l&15)<<12|(d&63)<<6|g&63,T>2047&&(T<55296||T>57343)&&(p=T));break;case 4:d=e[i+1],g=e[i+2],y=e[i+3],(d&192)===128&&(g&192)===128&&(y&192)===128&&(T=(l&15)<<18|(d&63)<<12|(g&63)<<6|y&63,T>65535&&T<1114112&&(p=T))}}p===null?(p=65533,m=1):p>65535&&(p-=65536,n.push(p>>>10&1023|55296),p=56320|p&1023),n.push(p),i+=m}return Fi(n)}var kr=4096;function Fi(e){var t=e.length;if(t<=kr)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=kr));return r}function Bi(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function Ui(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function Vi(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",l=t;l<r;++l)i+=ji[e[l]];return i}function $i(e,t,r){for(var n=e.slice(t,r),i="",l=0;l<n.length-1;l+=2)i+=String.fromCharCode(n[l]+n[l+1]*256);return i}u.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);var i=this.subarray(t,r);return Object.setPrototypeOf(i,u.prototype),i};function E(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return i};u.prototype.readUintBE=u.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=this[t+--r],l=1;r>0&&(l*=256);)i+=this[t+--r]*l;return i};u.prototype.readUint8=u.prototype.readUInt8=function(t,r){return t=t>>>0,r||E(t,1,this.length),this[t]};u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||E(t,2,this.length),this[t]|this[t+1]<<8};u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||E(t,2,this.length),this[t]<<8|this[t+1]};u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||E(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};u.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return l*=128,i>=l&&(i-=Math.pow(2,8*r)),i};u.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||E(t,r,this.length);for(var i=r,l=1,p=this[t+--i];i>0&&(l*=256);)p+=this[t+--i]*l;return l*=128,p>=l&&(p-=Math.pow(2,8*r)),p};u.prototype.readInt8=function(t,r){return t=t>>>0,r||E(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};u.prototype.readInt16LE=function(t,r){t=t>>>0,r||E(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(t,r){t=t>>>0,r||E(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(t,r){return t=t>>>0,r||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};u.prototype.readInt32BE=function(t,r){return t=t>>>0,r||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};u.prototype.readFloatLE=function(t,r){return t=t>>>0,r||E(t,4,this.length),le.read(this,t,!0,23,4)};u.prototype.readFloatBE=function(t,r){return t=t>>>0,r||E(t,4,this.length),le.read(this,t,!1,23,4)};u.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||E(t,8,this.length),le.read(this,t,!0,52,8)};u.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||E(t,8,this.length),le.read(this,t,!1,52,8)};function R(e,t,r,n,i,l){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<l)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){var l=Math.pow(2,8*n)-1;R(this,t,r,n,l,0)}var p=1,m=0;for(this[r]=t&255;++m<n&&(p*=256);)this[r+m]=t/p&255;return r+n};u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){var l=Math.pow(2,8*n)-1;R(this,t,r,n,l,0)}var p=n-1,m=1;for(this[r+p]=t&255;--p>=0&&(m*=256);)this[r+p]=t/m&255;return r+n};u.prototype.writeUint8=u.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,1,255,0),this[r]=t&255,r+1};u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};u.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*n-1);R(this,t,r,n,l-1,-l)}var p=0,m=1,d=0;for(this[r]=t&255;++p<n&&(m*=256);)t<0&&d===0&&this[r+p-1]!==0&&(d=1),this[r+p]=(t/m>>0)-d&255;return r+n};u.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*n-1);R(this,t,r,n,l-1,-l)}var p=n-1,m=1,d=0;for(this[r+p]=t&255;--p>=0&&(m*=256);)t<0&&d===0&&this[r+p+1]!==0&&(d=1),this[r+p]=(t/m>>0)-d&255;return r+n};u.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};u.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};u.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};u.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};u.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||R(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Cr(e,t,r,n,i,l){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Pr(e,t,r,n,i){return t=+t,r=r>>>0,i||Cr(e,t,r,4,34028234663852886e22,-34028234663852886e22),le.write(e,t,r,n,23,4),r+4}u.prototype.writeFloatLE=function(t,r,n){return Pr(this,t,r,!0,n)};u.prototype.writeFloatBE=function(t,r,n){return Pr(this,t,r,!1,n)};function _r(e,t,r,n,i){return t=+t,r=r>>>0,i||Cr(e,t,r,8,17976931348623157e292,-17976931348623157e292),le.write(e,t,r,n,52,8),r+8}u.prototype.writeDoubleLE=function(t,r,n){return _r(this,t,r,!0,n)};u.prototype.writeDoubleBE=function(t,r,n){return _r(this,t,r,!1,n)};u.prototype.copy=function(t,r,n,i){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var l=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),l};u.prototype.fill=function(t,r,n,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){var l=t.charCodeAt(0);(i==="utf8"&&l<128||i==="latin1")&&(t=l)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var p;if(typeof t=="number")for(p=r;p<n;++p)this[p]=t;else{var m=u.isBuffer(t)?t:u.from(t,i),d=m.length;if(d===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(p=0;p<n-r;++p)this[p+r]=m[p%d]}return this};var Gi=/[^+/0-9A-Za-z-_]/g;function Hi(e){if(e=e.split("=")[0],e=e.trim().replace(Gi,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Tt(e,t){t=t||1/0;for(var r,n=e.length,i=null,l=[],p=0;p<n;++p){if(r=e.charCodeAt(p),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&l.push(239,191,189);continue}else if(p+1===n){(t-=3)>-1&&l.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&l.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&l.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;l.push(r)}else if(r<2048){if((t-=2)<0)break;l.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;l.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;l.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return l}function Wi(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function qi(e,t){for(var r,n,i,l=[],p=0;p<e.length&&!((t-=2)<0);++p)r=e.charCodeAt(p),n=r>>8,i=r%256,l.push(i),l.push(n);return l}function Mr(e){return mt.toByteArray(Hi(e))}function Pe(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function V(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function xt(e){return e!==e}var ji=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=r*16,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()});var $r=De((ks,Vr)=>{o();var I=Vr.exports={},$,G;function St(){throw new Error("setTimeout has not been defined")}function wt(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?$=setTimeout:$=St}catch(e){$=St}try{typeof clearTimeout=="function"?G=clearTimeout:G=wt}catch(e){G=wt}})();function Fr(e){if($===setTimeout)return setTimeout(e,0);if(($===St||!$)&&setTimeout)return $=setTimeout,setTimeout(e,0);try{return $(e,0)}catch(t){try{return $.call(null,e,0)}catch(r){return $.call(this,e,0)}}}function zi(e){if(G===clearTimeout)return clearTimeout(e);if((G===wt||!G)&&clearTimeout)return G=clearTimeout,clearTimeout(e);try{return G(e)}catch(t){try{return G.call(null,e)}catch(r){return G.call(this,e)}}}var z=[],ue=!1,ae,_e=-1;function Ki(){!ue||!ae||(ue=!1,ae.length?z=ae.concat(z):_e=-1,z.length&&Br())}function Br(){if(!ue){var e=Fr(Ki);ue=!0;for(var t=z.length;t;){for(ae=z,z=[];++_e<t;)ae&&ae[_e].run();_e=-1,t=z.length}ae=null,ue=!1,zi(e)}}I.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];z.push(new Ur(e,t)),z.length===1&&!ue&&Fr(Br)};function Ur(e,t){this.fun=e,this.array=t}Ur.prototype.run=function(){this.fun.apply(null,this.array)};I.title="browser";I.browser=!0;I.env={};I.argv=[];I.version="";I.versions={};function K(){}I.on=K;I.addListener=K;I.once=K;I.off=K;I.removeListener=K;I.removeAllListeners=K;I.emit=K;I.prependListener=K;I.prependOnceListener=K;I.listeners=function(e){return[]};I.binding=function(e){throw new Error("process.binding is not supported")};I.cwd=function(){return"/"};I.chdir=function(e){throw new Error("process.chdir is not supported")};I.umask=function(){return 0}});var a,s,Es,o=h(()=>{a=w(Or()),s=w($r()),Es=function(e){function t(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return t();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t});var r=__magic__;return r}(Object)});var Gr=h(()=>{"use strict";o()});var Hr=h(()=>{"use strict";o()});var Wr=h(()=>{"use strict";o()});var qr=h(()=>{"use strict";o()});var H=h(()=>{"use strict";o()});var jr=h(()=>{"use strict";o()});var zr=h(()=>{"use strict";o()});var D=h(()=>{"use strict";o()});var Kr=h(()=>{"use strict";o()});var Yr=h(()=>{"use strict";o()});var F=h(()=>{"use strict";o();Hr();Wr();qr();H();jr();zr();D();Kr();Yr()});var At,Zr,js,Xr,zs,Jr,Ks,Ys,Zs,Qr=h(()=>{"use strict";o();F();At={devnet:{id:"devnet",chainId:"D",name:"Devnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://devnet-wallet.multiversx.com",apiAddress:"https://devnet-api.multiversx.com",explorerAddress:"http://devnet-explorer.multiversx.com",apiTimeout:"4000"},testnet:{id:"testnet",chainId:"T",name:"Testnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://testnet-wallet.multiversx.com",apiAddress:"https://testnet-api.multiversx.com",explorerAddress:"http://testnet-explorer.multiversx.com",apiTimeout:"4000"},mainnet:{id:"mainnet",chainId:"1",name:"Mainnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://wallet.multiversx.com",apiAddress:"https://api.multiversx.com",explorerAddress:"https://explorer.multiversx.com",apiTimeout:"4000"}},{chainId:Zr,egldLabel:js}=At["devnet"],{chainId:Xr,egldLabel:zs}=At["testnet"],{chainId:Jr,egldLabel:Ks}=At["mainnet"],Ys={["devnet"]:Zr,["testnet"]:Xr,["mainnet"]:Jr},Zs={[Zr]:"devnet",[Xr]:"testnet",[Jr]:"mainnet"}});var bt=h(()=>{"use strict";o()});var en=h(()=>{"use strict";o()});var tn,It=h(()=>{"use strict";o();tn="transaction-status-toast-id"});var W,rn=h(()=>{"use strict";o();W=require("@multiversx/sdk-web-wallet-provider")});var nn,Me,X,de,on,vt,Oe,an,J,b=h(()=>{"use strict";o();Gr();Qr();bt();en();It();rn();nn=.01,Me=1500,X=5e4,de=1e9,on=1,vt=4294967295,Oe="logout",an="login",J="0"});var me,Fe=h(()=>{"use strict";o();me=()=>Date.now()/1e3});var sn=h(()=>{"use strict";o()});var cn=h(()=>{"use strict";o()});var ln=h(()=>{"use strict";o();Fe();sn();cn()});var Et={};ne(Et,{getItem:()=>Zi,localStorageKeys:()=>se,removeItem:()=>Xi,setItem:()=>Yi});var se,kt,Yi,Zi,Xi,we=h(()=>{"use strict";o();ln();se={loginExpiresAt:"sdk-dapp-login-expires-at",logoutEvent:"sdk-dapp-logout-event"},kt=typeof localStorage!="undefined",Yi=({key:e,data:t,expires:r})=>{!kt||localStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},Zi=e=>{if(!kt)return;let t=localStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:me()>=r.expires?(localStorage.removeItem(String(e)),null):r.data},Xi=e=>{!kt||localStorage.removeItem(String(e))}});var Lt={};ne(Lt,{clear:()=>mn,getItem:()=>un,removeItem:()=>dn,setItem:()=>pn,storage:()=>Ji});var pn,un,dn,mn,Ji,gn=h(()=>{"use strict";o();pn=({key:e,data:t,expires:r})=>{sessionStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},un=e=>{let t=sessionStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:Date.now()>=r.expires?(sessionStorage.removeItem(String(e)),null):r.data},dn=e=>sessionStorage.removeItem(String(e)),mn=()=>sessionStorage.clear(),Ji={setItem:pn,getItem:un,removeItem:dn,clear:mn}});var ge,Be=h(()=>{"use strict";o();we();gn();ge={session:Lt,local:Et}});var Nt,N,Ue,Y=h(()=>{"use strict";o();Nt=require("@reduxjs/toolkit");b();N=(0,Nt.createAction)(Oe),Ue=(0,Nt.createAction)(an,e=>({payload:e}))});var Rt,fn,Tn,Ve,Dt,yn,hn,kc,xn,Ec,Lc,Nc,Dc,Rc,Cc,Pc,Sn,Ct=h(()=>{"use strict";o();Rt=require("@multiversx/sdk-core"),fn=require("@reduxjs/toolkit"),Tn=require("redux-persist");b();Be();we();Y();Ve={balance:"...",address:"",nonce:0,txCount:0,scrCount:0,claimableRewards:J},Dt={address:"",websocketEvent:null,accounts:{"":Ve},ledgerAccount:null,publicKey:"",walletConnectAccount:null,isAccountLoading:!0,accountLoadingError:null},yn=(0,fn.createSlice)({name:"accountInfoSlice",initialState:Dt,reducers:{setAddress:(e,t)=>{let r=t.payload;e.address=r,e.publicKey=new Rt.Address(r).hex()},setAccount:(e,t)=>{let r=e.address===t.payload.address;e.accounts={[e.address]:r?t.payload:Ve},e.shard=t.payload.shard,e.isAccountLoading=!1,e.accountLoadingError=null},setAccountNonce:(e,t)=>{let{address:r}=e;e.accounts[r].nonce=t.payload},setAccountShard:(e,t)=>{e.shard=t.payload},setLedgerAccount:(e,t)=>{e.ledgerAccount=t.payload},updateLedgerAccount:(e,t)=>{e.ledgerAccount!=null&&(e.ledgerAccount.index=t.payload.index,e.ledgerAccount.address=t.payload.address)},setWalletConnectAccount:(e,t)=>{e.walletConnectAccount=t.payload},setIsAccountLoading:(e,t)=>{e.isAccountLoading=t.payload,e.accountLoadingError=null},setAccountLoadingError:(e,t)=>{e.accountLoadingError=t.payload,e.isAccountLoading=!1},setWebsocketEvent:(e,t)=>{e.websocketEvent={timestamp:Date.now(),message:t.payload}}},extraReducers:e=>{e.addCase(N,()=>(ge.local.removeItem(se.loginExpiresAt),Dt)),e.addCase(Ue,(t,r)=>{let{address:n}=r.payload;t.address=n,t.publicKey=new Rt.Address(n).hex()}),e.addCase(Tn.REHYDRATE,(t,r)=>{var g;if(!((g=r.payload)!=null&&g.account))return;let{account:n}=r.payload,{address:i,shard:l,accounts:p,publicKey:m}=n;t.address=i,t.shard=l;let d=p&&i in p;t.accounts=d?p:Dt.accounts,t.publicKey=m})}}),{setAccount:hn,setAddress:kc,setAccountNonce:xn,setAccountShard:Ec,setLedgerAccount:Lc,updateLedgerAccount:Nc,setWalletConnectAccount:Dc,setIsAccountLoading:Rc,setAccountLoadingError:Cc,setWebsocketEvent:Pc}=yn.actions,Sn=yn.reducer});function Ae(){return new Date().setHours(new Date().getHours()+24)}function be(e){ge.local.setItem({key:se.loginExpiresAt,data:e,expires:e})}var Pt=h(()=>{"use strict";o();Be();we()});var An,wn,bn,Hc,Wc,qc,jc,zc,Kc,In,Yc,vn,_t=h(()=>{"use strict";o();An=require("@reduxjs/toolkit");Pt();H();Y();wn={loginMethod:"",walletConnectLogin:null,ledgerLogin:null,tokenLogin:null,walletLogin:null,extensionLogin:null,operaLogin:null,isLoginSessionInvalid:!1},bn=(0,An.createSlice)({name:"loginInfoSlice",initialState:wn,reducers:{setLoginMethod:(e,t)=>{e.loginMethod=t.payload},setTokenLogin:(e,t)=>{e.tokenLogin=t.payload},setTokenLoginSignature:(e,t)=>{(e==null?void 0:e.tokenLogin)!=null&&(e.tokenLogin.signature=t.payload)},setWalletLogin:(e,t)=>{e.walletLogin=t.payload},setWalletConnectLogin:(e,t)=>{e.walletConnectLogin=t.payload},setLedgerLogin:(e,t)=>{e.ledgerLogin=t.payload},invalidateLoginSession:e=>{e.isLoginSessionInvalid=!0},setLogoutRoute:(e,t)=>{e.logoutRoute=t.payload}},extraReducers:e=>{e.addCase(N,()=>wn),e.addCase(Ue,(t,r)=>{t.loginMethod=r.payload.loginMethod,be(Ae())})}}),{setLoginMethod:Hc,setWalletConnectLogin:Wc,setLedgerLogin:qc,setTokenLogin:jc,setTokenLoginSignature:zc,setWalletLogin:Kc,invalidateLoginSession:In,setLogoutRoute:Yc}=bn.actions,vn=bn.reducer});var En,kn,Ln,Qc,Mt,el,tl,Nn,Ot=h(()=>{"use strict";o();En=require("@reduxjs/toolkit");Y();kn={},Ln=(0,En.createSlice)({name:"modalsSlice",initialState:kn,reducers:{setTxSubmittedModal:(e,t)=>{e.txSubmittedModal=t.payload},setNotificationModal:(e,t)=>{e.notificationModal=t.payload},clearTxSubmittedModal:e=>{e.txSubmittedModal=void 0},clearNotificationModal:e=>{e.notificationModal=void 0}},extraReducers:e=>{e.addCase(N,()=>kn)}}),{setTxSubmittedModal:Qc,setNotificationModal:Mt,clearTxSubmittedModal:el,clearNotificationModal:tl}=Ln.actions,Nn=Ln.reducer});var Dn=h(()=>{"use strict";o()});var Rn=h(()=>{"use strict";o();Dn()});function Ft(e){return e[Math.floor(Math.random()*e.length)]}var Cn=h(()=>{"use strict";o()});var Pn=h(()=>{"use strict";o();bt()});var _n=h(()=>{"use strict";o();Rn();Cn();Pn()});var Mn,On,Bt,ea,Fn,yl,hl,Bn,Ut=h(()=>{"use strict";o();Mn=require("@reduxjs/toolkit"),On=w(require("lodash.omit"));_n();Bt={id:"not-configured",chainId:"",name:"NOT CONFIGURED",egldLabel:"",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"",walletConnectBridgeAddress:"",walletConnectV2RelayAddress:"",walletConnectV2ProjectId:"",walletConnectV2Options:{},walletAddress:"",apiAddress:"",explorerAddress:"",apiTimeout:"4000"},ea={network:Bt,chainID:"-1"},Fn=(0,Mn.createSlice)({name:"appConfig",initialState:ea,reducers:{initializeNetworkConfig:(e,t)=>{let r=Ft(t.payload.walletConnectBridgeAddresses),n=Ft(t.payload.walletConnectV2RelayAddresses),i=(0,On.default)(t.payload,"walletConnectBridgeAddresses","walletConnectV2RelayAddresses");e.network=k(x(x({},e.network),i),{walletConnectBridgeAddress:r,walletConnectV2RelayAddress:n})},setChainID:(e,t)=>{e.chainID=t.payload}}}),{initializeNetworkConfig:yl,setChainID:hl}=Fn.actions,Bn=Fn.reducer});var Un,Vt,Vn,Il,vl,kl,$e,Ge=h(()=>{"use strict";o();Un=require("@reduxjs/toolkit");F();Y();Vt={isSigning:!1,signedSessions:{}},Vn=(0,Un.createSlice)({name:"signedMessageInfoSliceState",initialState:Vt,reducers:{setSignSession:(e,t)=>{let{sessionId:r,signedSession:n,errorMessage:i}=t.payload;return k(x({},e),{errorMessage:i!=null?i:e.errorMessage,isSigning:n.status==="pending",signedSessions:k(x({},e.signedSessions),{[r]:n})})},setSignSessionState:(e,t)=>x(x({},e),t.payload),clearSignedMessageInfo:()=>Vt},extraReducers:e=>{e.addCase(N,()=>Vt)}}),{setSignSession:Il,clearSignedMessageInfo:vl,setSignSessionState:kl}=Vn.actions,$e=Vn.reducer});var Gn,Hn,$n,Wn,_l,Ml,Ol,Fl,Bl,Ul,He,We=h(()=>{"use strict";o();Gn=require("@reduxjs/toolkit"),Hn=require("redux-persist");It();F();Fe();Y();$n={customToasts:[],transactionToasts:[],failTransactionToast:null},Wn=(0,Gn.createSlice)({name:"toastsSlice",initialState:$n,reducers:{addCustomToast:(e,t)=>{e.customToasts.push(k(x({},t.payload),{type:"custom",toastId:t.payload.toastId||`custom-toast-${e.customToasts.length+1}`}))},removeCustomToast:(e,t)=>{e.customToasts=e.customToasts.filter(r=>r.toastId!==t.payload)},addTransactionToast:(e,t)=>{e.transactionToasts.push({type:"transaction",startTimestamp:me(),toastId:t.payload||`custom-toast-${e.transactionToasts.length+1}`})},removeTransactionToast:(e,t)=>{e.transactionToasts=e.transactionToasts.filter(r=>r.toastId!==t.payload)},addFailTransactionToast:(e,t)=>{e.failTransactionToast=k(x({},t.payload),{toastId:tn})},removeFailTransactionToast:e=>{e.failTransactionToast=null}},extraReducers:e=>{e.addCase(N,()=>$n),e.addCase(Hn.REHYDRATE,(t,r)=>{var i,l;let n=(l=(i=r.customToasts)==null?void 0:i.filter(p=>!("component"in p)))!=null?l:[];t.customToasts=n})}}),{addCustomToast:_l,removeCustomToast:Ml,addTransactionToast:Ol,removeTransactionToast:Fl,addFailTransactionToast:Bl,removeFailTransactionToast:Ul}=Wn.actions,He=Wn.reducer});var qn,Gt,Ht,Wt,ta,$t,jn,Hl,zn,Wl,qe,je=h(()=>{"use strict";o();qn=require("@reduxjs/toolkit");Y();Gt="Transaction failed",Ht="Transaction successful",Wt="Processing transaction",ta="Transaction submitted",$t={},jn=(0,qn.createSlice)({name:"transactionsInfo",initialState:$t,reducers:{setTransactionsDisplayInfo(e,t){let{sessionId:r,transactionsDisplayInfo:n}=t.payload;r!=null&&(e[r]={errorMessage:(n==null?void 0:n.errorMessage)||Gt,successMessage:(n==null?void 0:n.successMessage)||Ht,processingMessage:(n==null?void 0:n.processingMessage)||Wt,submittedMessage:(n==null?void 0:n.submittedMessage)||ta,transactionDuration:n==null?void 0:n.transactionDuration})},clearTransactionsInfoForSessionId(e,t){t.payload!=null&&delete e[t.payload]},clearTransactionsInfo:()=>$t},extraReducers:e=>{e.addCase(N,()=>$t)}}),{clearTransactionsInfo:Hl,setTransactionsDisplayInfo:zn,clearTransactionsInfoForSessionId:Wl}=jn.actions,qe=jn.reducer});function Kn(e){return e!=null&&(pa(e)||ga(e))}function ze(e){return e!=null&&(ua(e)||fa(e))}function Ke(e){return e!=null&&(da(e)||Ta(e))}function Yn(e){return e!=null&&ma(e)}function pa(e){return e!=null&&na.includes(e)}function ua(e){return e!=null&&oa.includes(e)}function da(e){return e!=null&&ia.includes(e)}function ma(e){return e!=null&&aa.includes(e)}function ga(e){return e!=null&&sa.includes(e)}function fa(e){return e!=null&&ca.includes(e)}function Ta(e){return e!=null&&la.includes(e)}var na,oa,ia,aa,sa,ca,la,jt=h(()=>{"use strict";o();H();na=["sent"],oa=["success"],ia=["fail","cancelled","timedOut"],aa=["timedOut"],sa=["pending"],ca=["success"],la=["fail","invalid"]});var Zn,Xn,Ie,ya,Jn,Ql,ep,Qn,eo,to,zt,tp,rp,ro,np,Ye,Ze=h(()=>{"use strict";o();Zn=require("@reduxjs/toolkit"),Xn=require("redux-persist");H();jt();Y();Ie={signedTransactions:{},transactionsToSign:null,signTransactionsError:null,signTransactionsCancelMessage:null,customTransactionInformationForSessionId:{}},ya={signWithoutSending:!1,sessionInformation:null,redirectAfterSign:!1},Jn=(0,Zn.createSlice)({name:"transactionsSlice",initialState:Ie,reducers:{moveTransactionsToSignedState:(e,t)=>{var d,g;let{sessionId:r,transactions:n,errorMessage:i,status:l,redirectRoute:p}=t.payload,m=((d=e.customTransactionInformationForSessionId)==null?void 0:d[r])||ya;e.signedTransactions[r]={transactions:n,status:l,errorMessage:i,redirectRoute:p,customTransactionInformation:m},((g=e==null?void 0:e.transactionsToSign)==null?void 0:g.sessionId)===r&&(e.transactionsToSign=Ie.transactionsToSign)},clearSignedTransaction:(e,t)=>{e.signedTransactions[t.payload]&&delete e.signedTransactions[t.payload]},clearTransactionToSign:e=>{e!=null&&e.transactionsToSign&&(e.transactionsToSign=null)},updateSignedTransaction:(e,t)=>{e.signedTransactions=x(x({},e.signedTransactions),t.payload)},updateSignedTransactions:(e,t)=>{let{sessionId:r,status:n,errorMessage:i,transactions:l}=t.payload;e.signedTransactions[r]!=null&&(e.signedTransactions[r].status=n,i!=null&&(e.signedTransactions[r].errorMessage=i),l!=null&&(e.signedTransactions[r].transactions=l))},updateSignedTransactionStatus:(e,t)=>{var m,d,g,y,T,S;let{sessionId:r,status:n,errorMessage:i,transactionHash:l}=t.payload,p=(d=(m=e.signedTransactions)==null?void 0:m[r])==null?void 0:d.transactions;if(p!=null){e.signedTransactions[r].transactions=p.map(P=>P.hash===l?k(x({},P),{status:n,errorMessage:i}):P);let v=(y=(g=e.signedTransactions[r])==null?void 0:g.transactions)==null?void 0:y.every(P=>ze(P.status)),C=(S=(T=e.signedTransactions[r])==null?void 0:T.transactions)==null?void 0:S.every(P=>Ke(P.status));v&&(e.signedTransactions[r].status="success"),C&&(e.signedTransactions[r].status="fail")}},setTransactionsToSign:(e,t)=>{e.transactionsToSign=t.payload;let{sessionId:r,customTransactionInformation:n}=t.payload;e.customTransactionInformationForSessionId[r]=n,e.signTransactionsError=null},clearAllTransactionsToSign:e=>{e.transactionsToSign=Ie.transactionsToSign,e.signTransactionsError=null},clearAllSignedTransactions:e=>{e.signedTransactions=Ie.signedTransactions},setSignTransactionsError:(e,t)=>{e.signTransactionsError=t.payload},setSignTransactionsCancelMessage:(e,t)=>{e.signTransactionsCancelMessage=t.payload}},extraReducers:e=>{e.addCase(N,()=>Ie),e.addCase(Xn.REHYDRATE,(t,r)=>{var p;if(t.signTransactionsCancelMessage=null,!((p=r.payload)!=null&&p.transactions))return;let{signedTransactions:n,customTransactionInformationForSessionId:i}=r.payload.transactions,l=Object.entries(n).reduce((m,[d,g])=>{let y=new Date(d),T=new Date;return T.setHours(T.getHours()+5),T-y>0||(m[d]=g),m},{});i!=null&&(t.customTransactionInformationForSessionId=i),n!=null&&(t.signedTransactions=l)})}}),{updateSignedTransactionStatus:Ql,updateSignedTransactions:ep,setTransactionsToSign:Qn,clearAllTransactionsToSign:eo,clearAllSignedTransactions:to,clearSignedTransaction:zt,clearTransactionToSign:tp,setSignTransactionsError:rp,setSignTransactionsCancelMessage:ro,moveTransactionsToSignedState:np}=Jn.actions,Ye=Jn.reducer});var Q=h(()=>{"use strict";o();Ct();_t();Ot();Ut();Ge();We();je();Ze()});var Kt=h(()=>{"use strict";o()});var so,ao,co,Ep,Lp,Np,Dp,Rp,Cp,lo,po=h(()=>{"use strict";o();so=require("@reduxjs/toolkit");Y();ao={visible:!1,modal:{showHeader:!0,showFooter:!1,headerText:"",footerText:""}},co=(0,so.createSlice)({name:"dappModalsSlice",initialState:ao,reducers:{setDappModalVisibility:(e,t)=>{e.visible=t.payload},setDappModalHeaderVisibility:(e,t)=>{e.modal.showHeader=t.payload},setDappModalFooterVisibility:(e,t)=>{e.modal.showFooter=t.payload},setDappModalHeaderText:(e,t)=>{e.modal.headerText=t.payload},setDappModalFooterText:(e,t)=>{e.modal.footerText=t.payload},setDappModalConfig:(e,t)=>{e.modal=x({},t.payload)}},extraReducers:e=>{e.addCase(N,()=>ao)}}),{setDappModalVisibility:Ep,setDappModalHeaderVisibility:Lp,setDappModalFooterVisibility:Np,setDappModalHeaderText:Dp,setDappModalFooterText:Rp,setDappModalConfig:Cp}=co.actions,lo=co.reducer});var uo,wa,Aa,fe,tt=h(()=>{"use strict";o();uo=require("@reduxjs/toolkit");Kt();Ct();po();_t();Ot();Ut();Ge();We();je();Ze();wa={["account"]:Sn,["dappModal"]:lo,["loginInfo"]:vn,["modals"]:Nn,["networkConfig"]:Bn,["signedMessageInfo"]:$e,["toasts"]:He,["transactionsInfo"]:qe,["transactions"]:Ye},Aa=(e={})=>(0,uo.combineReducers)(x(x({},wa),e)),fe=Aa});var fo={};ne(fo,{default:()=>Da});function rt(e,t=[]){return{key:e,version:1,storage:go.default,blacklist:t}}var ee,mo,go,ba,Ia,va,ka,Ea,La,Na,Da,To=h(()=>{"use strict";o();ee=require("redux-persist"),mo=w(require("redux-persist/lib/storage")),go=w(require("redux-persist/lib/storage/session"));tt();Q();Ge();We();je();Ze();Kt();ba={2:e=>k(x({},e),{networkConfig:Bt})};Ia=rt("sdk-dapp-transactionsInfo"),va=rt("sdk-dapp-transactions",["transactionsToSign"]),ka=rt("sdk-dapp-toasts"),Ea=rt("sdk-dapp-signedMessageInfo"),La={key:"sdk-dapp-store",version:2,storage:mo.default,whitelist:["account","loginInfo","modals","networkConfig"],migrate:(0,ee.createMigrate)(ba,{debug:!1})},Na={["toasts"]:(0,ee.persistReducer)(ka,He),["transactions"]:(0,ee.persistReducer)(va,Ye),["transactionsInfo"]:(0,ee.persistReducer)(Ia,qe),["signedMessageInfo"]:(0,ee.persistReducer)(Ea,$e)},Da=(0,ee.persistReducer)(La,fe(Na))});var yo={};ne(yo,{default:()=>Ra});var Ra,ho=h(()=>{"use strict";o();tt();Ra=fe()});var xo={};ne(xo,{default:()=>Pa});var O,Ca,Pa,So=h(()=>{"use strict";o();O=require("redux-persist"),Ca=[O.FLUSH,O.REHYDRATE,O.PAUSE,O.PERSIST,O.PURGE,O.REGISTER],Pa=Ca});var bo={};ne(bo,{default:()=>Ao});function Ao(e){return(0,wo.persistStore)(e)}var wo,Io=h(()=>{"use strict";o();wo=require("redux-persist")});var ws={};ne(ws,{calcTotalFee:()=>er,isCrossShardTransaction:()=>Wo,nativeAuth:()=>Ss,removeAllSignedTransactions:()=>Oa,removeAllTransactionsToSign:()=>Fa,removeSignedTransaction:()=>Ma,removeTransactionsToSign:()=>_a,sendTransactions:()=>gs,signTransactions:()=>tr});module.exports=Se(ws);o();o();o();Q();o();var Yt=require("@reduxjs/toolkit"),Lo=require("react-redux/lib/utils/Subscription");Q();o();var oo=w(require("lodash.throttle"));b();o();var no=w(require("lodash.isequal")),Xe=require("reselect");F();var f=(0,Xe.createSelectorCreator)(Xe.defaultMemoize,no.default),Je=(e,t)=>e!=""&&Boolean(t);Q();Pt();Be();we();var ha=[Oe],Qe=!1,xa=(0,oo.default)(()=>{be(Ae())},5e3),io=e=>t=>r=>{var d;if(ha.includes(r.type))return t(r);let n=e.getState(),i=ge.local.getItem(se.loginExpiresAt);if(!Je((d=n==null?void 0:n.loginInfo)==null?void 0:d.loginMethod,n==null?void 0:n.account.address))return t(r);if(i==null)return be(Ae());let p=Date.now();return i-p<0&&!Qe?setTimeout(()=>{Qe=!0,e.dispatch(In())},1e3):(Qe&&(Qe=!1),xa()),t(r)};o();o();function et(){return typeof sessionStorage!="undefined"}var vo=et()?(To(),Se(fo)).default:(ho(),Se(yo)).default,ko=et()?(So(),Se(xo)).default:[],Eo=et()?(Io(),Se(bo)).default:e=>e;tt();var A=(0,Yt.configureStore)({reducer:vo,middleware:e=>e({serializableCheck:{ignoredActions:[...ko,xn.type,hn.type],ignoredPaths:["payload.nonce","account.account.nonce","providers.accountProvider"]}}).concat(io)}),iu=(0,Lo.createSubscription)(A),au=Eo(A),su=(0,Yt.configureStore)({reducer:fe});function _a(e){A.dispatch(zt(e))}function Ma(e){A.dispatch(zt(e))}function Oa(){A.dispatch(to())}function Fa(){A.dispatch(eo())}o();o();var Bo=w(require("bignumber.js"));b();o();Q();var Z=e=>e.account,ve=f(Z,e=>e.address),Zt=f(Z,ve,(e,t)=>t in e.accounts?e.accounts[t]:Ve),gu=f(Z,Zt,(e,t)=>{let i=e,{accounts:r}=i,n=hr(i,["accounts"]);return k(x({},n),{account:t})}),No=f(Zt,e=>e.balance),Do=f(Zt,e=>{var t;return((t=e==null?void 0:e.nonce)==null?void 0:t.valueOf())||0}),fu=f(Z,e=>e.shard),Tu=f(Z,e=>e.ledgerAccount),yu=f(Z,e=>e.walletConnectAccount),hu=f(Z,e=>e.isAccountLoading),xu=f(Z,e=>e.accountLoadingError),Su=f(Z,e=>e.websocketEvent);o();var ce=e=>e.networkConfig,nt=f(ce,e=>e.chainID),bu=f(ce,e=>e.network.walletConnectBridgeAddress),Iu=f(ce,e=>e.network.walletConnectV2RelayAddress),vu=f(ce,e=>e.network.walletConnectV2ProjectId),ku=f(ce,e=>e.network.walletConnectV2Options),Eu=f(ce,e=>e.network.walletConnectDeepLink),Xt=f(ce,e=>e.network),Ro=f(Xt,e=>e.apiAddress),Co=f(Xt,e=>e.explorerAddress),Lu=f(Xt,e=>e.egldLabel);Q();F();o();var Po=w(require("bignumber.js"));b();var ot=e=>{if(isNaN(e)||String(e).includes("Infinity"))return!1;let[t,r]=e.split(".");if(r)for(;r.charAt(r.length-1)===J;)r=r.slice(0,-1);let n=r?[t,r].join("."):t,i=new Po.default(n);return i.toString(10)===n&&i.comparedTo(0)>=0};o();var Qt=w(require("bignumber.js"));b();o();var B=require("@multiversx/sdk-core"),Oo=require("@multiversx/sdk-network-providers");b();o();o();var _o=w(require("bignumber.js")),Jt=(e,t=!0)=>{let r=String(e);if(!r.match(/^[-]?\d+$/))return!1;let n=new _o.default(r),i=t?0:-1;return n.toString(10)===r&&n.comparedTo(0)>=i};o();b();o();var Mo={from:"erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa",to:"erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa"};function Fo({minGasLimit:e=String(X),gasLimit:t,gasPrice:r,data:n,gasPerDataByte:i,gasPriceModifier:l,defaultGasPrice:p=String(de),chainId:m}){let d=n||"",g=Jt(t)?t:e,y=ot(r)?r:p,T=new B.Transaction({nonce:0,value:B.TokenPayment.egldFromAmount("0"),receiver:new B.Address(Mo.to),sender:new B.Address(Mo.to),gasPrice:parseInt(y),gasLimit:parseInt(g),data:new B.TransactionPayload(d.trim()),chainID:m,version:new B.TransactionVersion(1)}),S=new Oo.NetworkConfig;S.MinGasLimit=parseInt(e),S.GasPerDataByte=parseInt(i),S.GasPriceModifier=parseFloat(l);try{return T.computeFee(S).toString(10)}catch(v){return J}}function er(e,t){let r=new Qt.default(0);return e.forEach(n=>{let i=Fo({gasPerDataByte:String(Me),gasPriceModifier:String(nn),minGasLimit:String(t),gasLimit:n.getGasLimit().valueOf().toString(),gasPrice:n.getGasPrice().valueOf().toString(),data:n.getData().toString(),chainId:n.getChainID().valueOf()});r=r.plus(new Qt.default(i))}),r}function tr(l){return L(this,arguments,function*({transactions:e,callbackRoute:t,minGasLimit:r=X,customTransactionInformation:n,transactionsDisplayInfo:i}){let p=A.getState(),m=Date.now().toString(),d=No(p),g=nt(p),y=Array.isArray(e)?e:[e],T=er(y,r);if(!new Bo.default(ot(d)?d:"0").minus(T).isGreaterThan(0)){let q={type:"warning",iconClassName:"text-warning",title:"Insufficient EGLD funds",description:"Current EGLD balance cannot cover the transaction fees."};return A.dispatch(Mt(q)),{error:"insufficient funds",sessionId:null}}if(!(y==null?void 0:y.every(q=>q.getChainID().valueOf()===g.valueOf()))){let q={type:"warning",iconClassName:"text-warning",title:"Network change detected",description:"The application tried to change the transaction network"};return A.dispatch(Mt(q)),{error:"Invalid ChainID",sessionId:null}}let P={sessionId:m,callbackRoute:t,customTransactionInformation:n,transactions:y.map(q=>q.toPlainObject())};return A.dispatch(ro(null)),A.dispatch(Qn(P)),A.dispatch(zn({sessionId:m,transactionsDisplayInfo:i})),{sessionId:m}})}o();var ur=require("@multiversx/sdk-core"),dr=w(require("bignumber.js"));b();o();var _=require("@multiversx/sdk-core");b();o();function rr(e){try{return a.Buffer.from(e,"base64").toString()===atob(e)}catch(t){return!1}}function Te(e){return atob(e)}function ke(e){var i,l,p;let{data:t}=e,r=rr(t!=null?t:"")?_.TransactionPayload.fromEncoded(t):new _.TransactionPayload(t),n=new _.Transaction(x({value:e.value.valueOf(),data:r,nonce:e.nonce.valueOf(),receiver:new _.Address(e.receiver),sender:new _.Address(e.sender),gasLimit:(i=e.gasLimit.valueOf())!=null?i:X,gasPrice:(l=e.gasPrice.valueOf())!=null?l:de,chainID:e.chainID.valueOf(),version:new _.TransactionVersion((p=e.version)!=null?p:on)},e.options?{options:new _.TransactionOptions(e.options)}:{}));return n.applySignature({hex:()=>e.signature||""},new _.Address(e.sender)),n}o();o();var re=e=>e.loginInfo,ud=f(re,e=>e.loginMethod),dd=f(re,ve,(e,t)=>Je(e.loginMethod,t)),md=f(re,e=>e.walletConnectLogin),gd=f(re,e=>e.ledgerLogin),fd=f(re,e=>e.walletLogin),Td=f(re,e=>e.isLoginSessionInvalid),yd=f(re,e=>e.tokenLogin),hd=f(re,e=>e.logoutRoute);o();var Uo=e=>e.modals,wd=f(Uo,e=>e.txSubmittedModal),Ad=f(Uo,e=>e.notificationModal);o();var nr=e=>e.signedMessageInfo,vd=f(nr,e=>e.isSigning),kd=f(nr,e=>e.errorMessage),Ed=f(nr,e=>{let t=Object.keys(e.signedSessions),r=t.length;return e.signedSessions[t[r-1]]});o();var or=e=>e.toasts,Dd=f(or,e=>e.customToasts),Rd=f(or,e=>e.transactionToasts),Cd=f(or,e=>e.failTransactionToast);o();Q();var Vo={errorMessage:Gt,successMessage:Ht,processingMessage:Wt},Ba=e=>e.transactionsInfo,Od=f(Ba,(e,t)=>t,(e,t)=>t!=null&&(e==null?void 0:e[Number(t)])||Vo);o();o();jt();o();var Va=w(require("bignumber.js"));F();o();o();o();o();var Ga=require("@multiversx/sdk-core"),Ha=w(require("bignumber.js"));H();o();var $a=require("@multiversx/sdk-core");o();o();o();var ar=require("@multiversx/sdk-core/out");o();b();var Wa=e=>{let t=a.Buffer.from([0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);if(e.slice(0,t.length).equals(t))return!0;let n=a.Buffer.alloc(32).fill(0);return e.equals(n)},ir=e=>{try{let r=parseInt("11",2),n=parseInt("01",2),i=a.Buffer.from(e,"hex"),l=i[31];if(Wa(i))return vt;let p=l&r;return p>3-1&&(p=l&n),p}catch(t){return-1}};function Wo({receiverAddress:e,senderShard:t,senderAddress:r}){try{let n=new ar.Address(e),i=ir(n.pubkey());if(t==null&&r!=null){let l=new ar.Address(r);return ir(l)===i}return i===t}catch(n){return!1}}o();var qo=require("@multiversx/sdk-core");F();o();o();o();o();H();o();o();o();o();o();o();o();var sr="accounts";var cr="blocks";o();o();o();o();D();o();o();D();o();o();o();var Ka=w(require("bignumber.js"));b();o();var za=require("@multiversx/sdk-core"),lr=w(require("bignumber.js"));b();o();lr.default.config({ROUNDING_MODE:lr.default.ROUND_FLOOR});o();o();o();b();o();o();o();o();b();o();b();o();var Ya=require("@multiversx/sdk-core");b();o();o();o();o();b();o();D();var Xa=["reDelegateRewards","claimRewards","unBond"],Ja=["wrapEgld","unwrapEgld"],Qa=["unStake"],es=["unDelegate"];o();o();o();b();o();var ns=w(require("bignumber.js"));o();o();o();D();o();var os=w(require("bignumber.js"));o();o();o();o();D();o();o();o();var as=w(require("linkifyjs"));o();b();o();var ss=w(require("bignumber.js"));o();F();o();o();H();o();H();o();o();o();D();o();D();o();var cs=w(require("bignumber.js"));b();D();o();D();o();var Zo=require("react");F();o();o();D();o();var ls=require("@multiversx/sdk-core/out"),ps=w(require("bignumber.js"));D();o();D();o();o();H();var Wy=[{label:"Raw",value:"raw"},{label:"Text",value:"text"},{label:"Decimal",value:"decimal"},{label:"Smart",value:"smart"}];o();var Xo=require("react");F();o();var ds=require("react");D();var Xy=["create","localMint","ESDTLocalMint","addQuantity","burn","localBurn","ESDTLocalBurn","wipe","writeLog","signalError"];var ct=e=>e.transactions,Ee=f(ct,e=>e.signedTransactions),Mh=f(ct,e=>e.signTransactionsError),Oh=f(ct,e=>e.signTransactionsCancelMessage),lt=e=>t=>Object.entries(t).reduce((r,[n,i])=>(e(i.status)&&(r[n]=i),r),{}),Fh=f(Ee,lt(Kn)),Bh=f(Ee,lt(ze)),Uh=f(Ee,lt(Ke)),Vh=f(Ee,lt(Yn)),$h=f(ct,e=>{var t;return(e==null?void 0:e.transactionsToSign)==null?null:k(x({},e.transactionsToSign),{transactions:((t=e==null?void 0:e.transactionsToSign)==null?void 0:t.transactions.map(r=>ke(r)))||[]})}),Gh=f(Ee,(e,t)=>t,(e,t)=>t!=null?(e==null?void 0:e[t])||{}:{});o();o();var Qo=w(require("axios"));o();o();var Jo=e=>{let t=e!=null?e:Ro(A.getState());return t.endsWith("/")?t.slice(0,-1):t};function ei(e){return L(this,null,function*(){if(!e)return null;let r=`${Jo()}/${sr}/${e}`;try{let{data:n}=yield Qo.default.get(r);return n}catch(n){console.error("error fetching configuration for ",r)}return null})}function ti(e){return L(this,null,function*(){return yield ei(e)})}o();function ri(e){let t=A.getState(),r=Do(t);return e?r&&!isNaN(r)?Math.max(r,e.nonce):e.nonce:r}function ms(e){let t=new dr.default(X),r=new dr.default(Me),n=e?r.times(a.Buffer.from(e).length):0;return t.plus(n).toString(10)}function ni(t){return L(this,arguments,function*({transactions:e}){let r=ve(A.getState()),n=yield ti(r),i=ri(n);return e.map(l=>{let{value:p,receiver:m,data:d="",chainID:g,version:y=1,options:T,gasPrice:S=de,gasLimit:v=ms(l.data)}=l,C=m;try{C=new ur.Address(m).hex()}catch(pi){throw"Invalid Receiver address"}let P=nt(A.getState()).valueOf().toString(),q=g||P;return ke({value:p,receiver:C,data:d,gasPrice:S,gasLimit:Number(v),nonce:Number(i.valueOf().toString()),sender:new ur.Address(r).hex(),chainID:q,version:y,options:T})})})}function gs(d){return L(this,arguments,function*({transactions:e,transactionsDisplayInfo:t,redirectAfterSign:r=!0,callbackRoute:n=window.location.pathname,signWithoutSending:i,completedTransactionsDelay:l,sessionInformation:p,minGasLimit:m}){try{let g=Array.isArray(e)?e:[e],y=g.every(S=>Object.getPrototypeOf(S).toPlainObject!=null),T=g;return y||(T=yield ni({transactions:g,minGasLimit:m})),tr({transactions:T,minGasLimit:m,callbackRoute:n,transactionsDisplayInfo:t,customTransactionInformation:{redirectAfterSign:r,completedTransactionsDelay:l,sessionInformation:p,signWithoutSending:i}})}catch(g){return console.error("error signing transaction",g),{error:g,sessionId:null}}})}o();o();o();var fs=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),ye=e=>fs(a.Buffer.from(e,"utf8").toString("base64"));o();var oi=w(require("axios"));var Ts=5e4,mr=null,he={current:null},gr=!1;function ii(e){return L(this,null,function*(){if(e==null)throw new Error("missing api url");if(mr!=null&&Date.now()<mr&&he.current!=null)return he.current;{if(gr)return yield hs();gr=!0,he.current=null;let r=yield ys(e);return he.current=r,mr=Date.now()+Ts,gr=!1,r}})}function ys(e){return L(this,null,function*(){let{data:t}=yield oi.default.get(`${e}/${cr}?size=1&fields=hash,timestamp`),[r]=t;return r})}function hs(){return L(this,null,function*(){return new Promise((e,t)=>{let r,n=setInterval(()=>{he.current!=null&&(e(he.current),clearInterval(n),clearTimeout(r))},50);r=setTimeout(()=>{clearInterval(n),t("could not generate new token")},5e3)})})}o();var ai,Le={hostname:typeof window!="undefined"?(ai=window==null?void 0:window.location)==null?void 0:ai.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},fr=e=>{var r,n,i,l;return e===!0?Le:{hostname:(r=e==null?void 0:e.hostname)!=null?r:Le.hostname,expirySeconds:(n=e==null?void 0:e.expirySeconds)!=null?n:Le.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:Le.apiAddress,tokenExpirationToastWarningSeconds:(l=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?l:Le.tokenExpirationToastWarningSeconds}};o();o();o();function xs(e){return Object.prototype.toString.call(e)==="[object String]"}var si=e=>{if(!e||!xs(e))return null;try{let[t,r,n]=e.split("."),i=Te(t),l=Te(r),[p,m,d,g]=l.split("."),y=JSON.parse(Te(g)),T=Te(p),S={ttl:Number(d),address:i,extraInfo:y,host:T,signature:n,blockHash:m,body:l};return g==="e30"&&delete S.extraInfo,S}catch(t){return null}};var ci=({address:e,token:t,signature:r})=>{let n=ye(e),i=ye(t);return`${n}.${i}.${r}`};o();Fe();var li=e=>{let t=si(e);if(!t)return{isExpired:!1};let r=me(),{ttl:n,extraInfo:i}=t,l=i.timestamp;if(!l)return{isExpired:!1};let p=l+n,m=r>p,d=p-r;return{isExpired:m,expiresAt:p,secondsUntilExpires:d}};var Ss=e=>{let{hostname:t,apiAddress:r,expirySeconds:n}=fr(e);return{getNativeAuthConfig:fr,initialize:(...p)=>L(void 0,[...p],function*(l={}){let{hash:m,timestamp:d}=yield ii(r),g=ye(JSON.stringify(x(x({},l),d?{timestamp:d}:{})));return`${ye(t)}.${m}.${n}.${g}`}),getToken:ci,getTokenExpiration:li}};0&&(module.exports={calcTotalFee,isCrossShardTransaction,nativeAuth,removeAllSignedTransactions,removeAllTransactionsToSign,removeSignedTransaction,removeTransactionsToSign,sendTransactions,signTransactions});
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
@@ -1,4 +1,4 @@
1
- "use strict";var dr=Object.create;var M=Object.defineProperty;var Cr=Object.getOwnPropertyDescriptor;var Sr=Object.getOwnPropertyNames;var _r=Object.getPrototypeOf,Dr=Object.prototype.hasOwnProperty;var Lr=(e,r)=>()=>(e&&(r=e(e=0)),r);var b=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Rr=(e,r)=>{for(var t in r)M(e,t,{get:r[t],enumerable:!0})},tr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Sr(r))!Dr.call(e,i)&&i!==t&&M(e,i,{get:()=>r[i],enumerable:!(n=Cr(r,i))||n.enumerable});return e};var Y=(e,r,t)=>(t=e!=null?dr(_r(e)):{},tr(r||!e||!e.__esModule?M(t,"default",{value:e,enumerable:!0}):t,e)),Or=e=>tr(M({},"__esModule",{value:!0}),e);var er=(e,r,t)=>new Promise((n,i)=>{var o=h=>{try{f(t.next(h))}catch(p){i(p)}},u=h=>{try{f(t.throw(h))}catch(p){i(p)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(o,u);f((t=t.apply(e,r)).next())});var or=b(P=>{"use strict";E();P.byteLength=Mr;P.toByteArray=Pr;P.fromByteArray=Gr;var T=[],m=[],kr=typeof Uint8Array!="undefined"?Uint8Array:Array,q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(N=0,nr=q.length;N<nr;++N)T[N]=q[N],m[q.charCodeAt(N)]=N;var N,nr;m["-".charCodeAt(0)]=62;m["_".charCodeAt(0)]=63;function ir(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Mr(e){var r=ir(e),t=r[0],n=r[1];return(t+n)*3/4-n}function br(e,r,t){return(r+t)*3/4-t}function Pr(e){var r,t=ir(e),n=t[0],i=t[1],o=new kr(br(e,n,i)),u=0,f=i>0?n-4:n,h;for(h=0;h<f;h+=4)r=m[e.charCodeAt(h)]<<18|m[e.charCodeAt(h+1)]<<12|m[e.charCodeAt(h+2)]<<6|m[e.charCodeAt(h+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=m[e.charCodeAt(h)]<<2|m[e.charCodeAt(h+1)]>>4,o[u++]=r&255),i===1&&(r=m[e.charCodeAt(h)]<<10|m[e.charCodeAt(h+1)]<<4|m[e.charCodeAt(h+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Wr(e){return T[e>>18&63]+T[e>>12&63]+T[e>>6&63]+T[e&63]}function Kr(e,r,t){for(var n,i=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(Wr(n));return i.join("")}function Gr(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,f=t-n;u<f;u+=o)i.push(Kr(e,u,u+o>f?f:u+o));return n===1?(r=e[t-1],i.push(T[r>>2]+T[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(T[r>>10]+T[r>>4&63]+T[r<<2&63]+"=")),i.join("")}});var ur=b(H=>{E();H.read=function(e,r,t,n,i){var o,u,f=i*8-n-1,h=(1<<f)-1,p=h>>1,s=-7,c=t?i-1:0,F=t?-1:1,y=e[r+c];for(c+=F,o=y&(1<<-s)-1,y>>=-s,s+=f;s>0;o=o*256+e[r+c],c+=F,s-=8);for(u=o&(1<<-s)-1,o>>=-s,s+=n;s>0;u=u*256+e[r+c],c+=F,s-=8);if(o===0)o=1-p;else{if(o===h)return u?NaN:(y?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-p}return(y?-1:1)*u*Math.pow(2,o-n)};H.write=function(e,r,t,n,i,o){var u,f,h,p=o*8-i-1,s=(1<<p)-1,c=s>>1,F=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:o-1,S=n?1:-1,Nr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=s):(u=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+c>=1?r+=F/h:r+=F*Math.pow(2,1-c),r*h>=2&&(u++,h/=2),u+c>=s?(f=0,u=s):u+c>=1?(f=(r*h-1)*Math.pow(2,i),u=u+c):(f=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;e[t+y]=f&255,y+=S,f/=256,i-=8);for(u=u<<i|f,p+=i;p>0;e[t+y]=u&255,y+=S,u/=256,p-=8);e[t+y-S]|=Nr*128}});var Fr=b(R=>{"use strict";E();var X=or(),L=ur(),ar=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=a;R.SlowBuffer=Vr;R.INSPECT_MAX_BYTES=50;var W=2147483647;R.kMaxLength=W;a.TYPED_ARRAY_SUPPORT=Yr();!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Yr(){try{var e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(t){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function B(e){if(e>W)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,a.prototype),r}function a(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Q(e)}return pr(e,r,t)}a.poolSize=8192;function pr(e,r,t){if(typeof e=="string")return Hr(e,r);if(ArrayBuffer.isView(e))return Xr(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(g(e,ArrayBuffer)||e&&g(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(g(e,SharedArrayBuffer)||e&&g(e.buffer,SharedArrayBuffer)))return V(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return a.from(n,r,t);var i=zr(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return a.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}a.from=function(e,r,t){return pr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function cr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function qr(e,r,t){return cr(e),e<=0?B(e):r!==void 0?typeof t=="string"?B(e).fill(r,t):B(e).fill(r):B(e)}a.alloc=function(e,r,t){return qr(e,r,t)};function Q(e){return cr(e),B(e<0?0:$(e)|0)}a.allocUnsafe=function(e){return Q(e)};a.allocUnsafeSlow=function(e){return Q(e)};function Hr(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=sr(e,r)|0,n=B(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function z(e){for(var r=e.length<0?0:$(e.length)|0,t=B(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Xr(e){if(g(e,Uint8Array)){var r=new Uint8Array(e);return V(r.buffer,r.byteOffset,r.byteLength)}return z(e)}function V(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,a.prototype),n}function zr(e){if(a.isBuffer(e)){var r=$(e.length)|0,t=B(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||Z(e.length)?B(0):z(e);if(e.type==="Buffer"&&Array.isArray(e.data))return z(e.data)}function $(e){if(e>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return e|0}function Vr(e){return+e!=e&&(e=0),a.alloc(+e)}a.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==a.prototype};a.compare=function(r,t){if(g(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),g(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(r)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var n=r.length,i=t.length,o=0,u=Math.min(n,i);o<u;++o)if(r[o]!==t[o]){n=r[o],i=t[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var i=a.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){var u=r[n];if(g(u,Uint8Array))o+u.length>i.length?a.from(u).copy(i,o):Uint8Array.prototype.set.call(i,u,o);else if(a.isBuffer(u))u.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return i};function sr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||g(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return mr(e).length;default:if(i)return n?-1:J(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=sr;function Jr(e,r,t){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return ot(this,r,t);case"utf8":case"utf-8":return xr(this,r,t);case"ascii":return nt(this,r,t);case"latin1":case"binary":return it(this,r,t);case"base64":return tt(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function d(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)d(this,t,t+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)d(this,t,t+3),d(this,t+1,t+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?xr(this,0,r):Jr.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(r){if(!a.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",t=R.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};ar&&(a.prototype[ar]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(g(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var u=o-i,f=n-t,h=Math.min(u,f),p=this.slice(i,o),s=r.slice(t,n),c=0;c<h;++c)if(p[c]!==s[c]){u=p[c],f=s[c];break}return u<f?-1:f<u?1:0};function lr(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Z(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),a.isBuffer(r))return r.length===0?-1:hr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):hr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function hr(e,r,t,n,i){var o=1,u=e.length,f=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,f/=2,t/=2}function h(y,S){return o===1?y[S]:y.readUInt16BE(S*o)}var p;if(i){var s=-1;for(p=t;p<u;p++)if(h(e,p)===h(r,s===-1?0:p-s)){if(s===-1&&(s=p),p-s+1===f)return s*o}else s!==-1&&(p-=p-s),s=-1}else for(t+f>u&&(t=u-f),p=t;p>=0;p--){for(var c=!0,F=0;F<f;F++)if(h(e,p+F)!==h(r,F)){c=!1;break}if(c)return p}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return lr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return lr(this,r,t,n,!1)};function Qr(e,r,t,n){t=Number(t)||0;var i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(u*2,2),16);if(Z(f))return u;e[t+u]=f}return u}function $r(e,r,t,n){return K(J(r,e.length-t),e,t,n)}function Zr(e,r,t,n){return K(ft(r),e,t,n)}function jr(e,r,t,n){return K(mr(r),e,t,n)}function rt(e,r,t,n){return K(pt(r,e.length-t),e,t,n)}a.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return Qr(this,r,t,n);case"utf8":case"utf-8":return $r(this,r,t,n);case"ascii":case"latin1":case"binary":return Zr(this,r,t,n);case"base64":return jr(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,r,t,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function tt(e,r,t){return r===0&&t===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(r,t))}function xr(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,f=o>239?4:o>223?3:o>191?2:1;if(i+f<=t){var h,p,s,c;switch(f){case 1:o<128&&(u=o);break;case 2:h=e[i+1],(h&192)===128&&(c=(o&31)<<6|h&63,c>127&&(u=c));break;case 3:h=e[i+1],p=e[i+2],(h&192)===128&&(p&192)===128&&(c=(o&15)<<12|(h&63)<<6|p&63,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:h=e[i+1],p=e[i+2],s=e[i+3],(h&192)===128&&(p&192)===128&&(s&192)===128&&(c=(o&15)<<18|(h&63)<<12|(p&63)<<6|s&63,c>65535&&c<1114112&&(u=c))}}u===null?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=f}return et(n)}var fr=4096;function et(e){var r=e.length;if(r<=fr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=fr));return t}function nt(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function it(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function ot(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=r;o<t;++o)i+=ct[e[o]];return i}function ut(e,r,t){for(var n=e.slice(r,t),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,t){var n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);var i=this.subarray(r,t);return Object.setPrototypeOf(i,a.prototype),i};function x(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||x(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||x(r,t,this.length);for(var i=this[r+--t],o=1;t>0&&(o*=256);)i+=this[r+--t]*o;return i};a.prototype.readUint8=a.prototype.readUInt8=function(r,t){return r=r>>>0,t||x(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||x(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||x(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||x(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||x(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||x(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};a.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||x(r,t,this.length);for(var i=t,o=1,u=this[r+--i];i>0&&(o*=256);)u+=this[r+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};a.prototype.readInt8=function(r,t){return r=r>>>0,t||x(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||x(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,t){r=r>>>0,t||x(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,t){return r=r>>>0,t||x(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,t){return r=r>>>0,t||x(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,t){return r=r>>>0,t||x(r,4,this.length),L.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||x(r,4,this.length),L.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||x(r,8,this.length),L.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||x(r,8,this.length),L.read(this,r,!1,52,8)};function w(e,r,t,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;w(this,r,t,n,o,0)}var u=1,f=0;for(this[t]=r&255;++f<n&&(u*=256);)this[t+f]=r/u&255;return t+n};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;w(this,r,t,n,o,0)}var u=n-1,f=1;for(this[t+u]=r&255;--u>=0&&(f*=256);)this[t+u]=r/f&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,1,255,0),this[t]=r&255,t+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};a.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);w(this,r,t,n,o-1,-o)}var u=0,f=1,h=0;for(this[t]=r&255;++u<n&&(f*=256);)r<0&&h===0&&this[t+u-1]!==0&&(h=1),this[t+u]=(r/f>>0)-h&255;return t+n};a.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);w(this,r,t,n,o-1,-o)}var u=n-1,f=1,h=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&h===0&&this[t+u+1]!==0&&(h=1),this[t+u]=(r/f>>0)-h&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};a.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};a.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function wr(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function yr(e,r,t,n,i){return r=+r,t=t>>>0,i||wr(e,r,t,4,34028234663852886e22,-34028234663852886e22),L.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return yr(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return yr(this,r,t,!1,n)};function Er(e,r,t,n,i){return r=+r,t=t>>>0,i||wr(e,r,t,8,17976931348623157e292,-17976931348623157e292),L.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return Er(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return Er(this,r,t,!1,n)};a.prototype.copy=function(r,t,n,i){if(!a.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);var o=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),o};a.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){var o=r.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{var f=a.isBuffer(r)?r:a.from(r,i),h=f.length;if(h===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=f[u%h]}return this};var at=/[^+/0-9A-Za-z-_]/g;function ht(e){if(e=e.split("=")[0],e=e.trim().replace(at,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function J(e,r){r=r||1/0;for(var t,n=e.length,i=null,o=[],u=0;u<n;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function ft(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function pt(e,r){for(var t,n,i,o=[],u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function mr(e){return X.toByteArray(ht(e))}function K(e,r,t,n){for(var i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function g(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function Z(e){return e!==e}var ct=function(){for(var e="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)r[n+i]=e[t]+e[i];return r}()});var Br=b((Tt,Ar)=>{E();var l=Ar.exports={},I,A;function j(){throw new Error("setTimeout has not been defined")}function rr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?I=setTimeout:I=j}catch(e){I=j}try{typeof clearTimeout=="function"?A=clearTimeout:A=rr}catch(e){A=rr}})();function Tr(e){if(I===setTimeout)return setTimeout(e,0);if((I===j||!I)&&setTimeout)return I=setTimeout,setTimeout(e,0);try{return I(e,0)}catch(r){try{return I.call(null,e,0)}catch(t){return I.call(this,e,0)}}}function st(e){if(A===clearTimeout)return clearTimeout(e);if((A===rr||!A)&&clearTimeout)return A=clearTimeout,clearTimeout(e);try{return A(e)}catch(r){try{return A.call(null,e)}catch(t){return A.call(this,e)}}}var v=[],O=!1,C,G=-1;function lt(){!O||!C||(O=!1,C.length?v=C.concat(v):G=-1,v.length&&gr())}function gr(){if(!O){var e=Tr(lt);O=!0;for(var r=v.length;r;){for(C=v,v=[];++G<r;)C&&C[G].run();G=-1,r=v.length}C=null,O=!1,st(e)}}l.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];v.push(new Ir(e,r)),v.length===1&&!O&&Tr(gr)};function Ir(e,r){this.fun=e,this.array=r}Ir.prototype.run=function(){this.fun.apply(null,this.array)};l.title="browser";l.browser=!0;l.env={};l.argv=[];l.version="";l.versions={};function U(){}l.on=U;l.addListener=U;l.once=U;l.off=U;l.removeListener=U;l.removeAllListeners=U;l.emit=U;l.prependListener=U;l.prependOnceListener=U;l.listeners=function(e){return[]};l.binding=function(e){throw new Error("process.binding is not supported")};l.cwd=function(){return"/"};l.chdir=function(e){throw new Error("process.chdir is not supported")};l.umask=function(){return 0}});var _,D,gt,E=Lr(()=>{_=Y(Fr()),D=Y(Br()),gt=function(e){function r(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:r});var t=__magic__;return t}(Object)});var wt={};Rr(wt,{getLatestBlockHash:()=>xt});module.exports=Or(wt);E();var Ur=Y(require("axios"));E();var vr="blocks";function xt(e){return er(this,null,function*(){let{data:r}=yield Ur.default.get(`${e}/${vr}?size=1&fields=hash,timestamp`),[t]=r;return t})}0&&(module.exports={getLatestBlockHash});
1
+ "use strict";var _r=Object.create;var b=Object.defineProperty;var Dr=Object.getOwnPropertyDescriptor;var Lr=Object.getOwnPropertyNames;var Rr=Object.getPrototypeOf,kr=Object.prototype.hasOwnProperty;var Or=(e,r)=>()=>(e&&(r=e(e=0)),r);var P=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Mr=(e,r)=>{for(var t in r)b(e,t,{get:r[t],enumerable:!0})},or=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Lr(r))!kr.call(e,i)&&i!==t&&b(e,i,{get:()=>r[i],enumerable:!(n=Dr(r,i))||n.enumerable});return e};var Y=(e,r,t)=>(t=e!=null?_r(Rr(e)):{},or(r||!e||!e.__esModule?b(t,"default",{value:e,enumerable:!0}):t,e)),br=e=>or(b({},"__esModule",{value:!0}),e);var G=(e,r,t)=>new Promise((n,i)=>{var o=h=>{try{f(t.next(h))}catch(c){i(c)}},u=h=>{try{f(t.throw(h))}catch(c){i(c)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(o,u);f((t=t.apply(e,r)).next())});var hr=P(H=>{"use strict";E();H.byteLength=Gr;H.toByteArray=Wr;H.fromByteArray=Yr;var g=[],m=[],Pr=typeof Uint8Array!="undefined"?Uint8Array:Array,q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(d=0,ur=q.length;d<ur;++d)g[d]=q[d],m[q.charCodeAt(d)]=d;var d,ur;m["-".charCodeAt(0)]=62;m["_".charCodeAt(0)]=63;function ar(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Gr(e){var r=ar(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Hr(e,r,t){return(r+t)*3/4-t}function Wr(e){var r,t=ar(e),n=t[0],i=t[1],o=new Pr(Hr(e,n,i)),u=0,f=i>0?n-4:n,h;for(h=0;h<f;h+=4)r=m[e.charCodeAt(h)]<<18|m[e.charCodeAt(h+1)]<<12|m[e.charCodeAt(h+2)]<<6|m[e.charCodeAt(h+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=m[e.charCodeAt(h)]<<2|m[e.charCodeAt(h+1)]>>4,o[u++]=r&255),i===1&&(r=m[e.charCodeAt(h)]<<10|m[e.charCodeAt(h+1)]<<4|m[e.charCodeAt(h+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Kr(e){return g[e>>18&63]+g[e>>12&63]+g[e>>6&63]+g[e&63]}function Vr(e,r,t){for(var n,i=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(Kr(n));return i.join("")}function Yr(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,f=t-n;u<f;u+=o)i.push(Vr(e,u,u+o>f?f:u+o));return n===1?(r=e[t-1],i.push(g[r>>2]+g[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(g[r>>10]+g[r>>4&63]+g[r<<2&63]+"=")),i.join("")}});var fr=P(X=>{E();X.read=function(e,r,t,n,i){var o,u,f=i*8-n-1,h=(1<<f)-1,c=h>>1,s=-7,p=t?i-1:0,T=t?-1:1,y=e[r+p];for(p+=T,o=y&(1<<-s)-1,y>>=-s,s+=f;s>0;o=o*256+e[r+p],p+=T,s-=8);for(u=o&(1<<-s)-1,o>>=-s,s+=n;s>0;u=u*256+e[r+p],p+=T,s-=8);if(o===0)o=1-c;else{if(o===h)return u?NaN:(y?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-c}return(y?-1:1)*u*Math.pow(2,o-n)};X.write=function(e,r,t,n,i,o){var u,f,h,c=o*8-i-1,s=(1<<c)-1,p=s>>1,T=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:o-1,S=n?1:-1,Sr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=s):(u=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+p>=1?r+=T/h:r+=T*Math.pow(2,1-p),r*h>=2&&(u++,h/=2),u+p>=s?(f=0,u=s):u+p>=1?(f=(r*h-1)*Math.pow(2,i),u=u+p):(f=r*Math.pow(2,p-1)*Math.pow(2,i),u=0));i>=8;e[t+y]=f&255,y+=S,f/=256,i-=8);for(u=u<<i|f,c+=i;c>0;e[t+y]=u&255,y+=S,u/=256,c-=8);e[t+y-S]|=Sr*128}});var Br=P(R=>{"use strict";E();var z=hr(),L=fr(),cr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=a;R.SlowBuffer=$r;R.INSPECT_MAX_BYTES=50;var W=2147483647;R.kMaxLength=W;a.TYPED_ARRAY_SUPPORT=qr();!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function qr(){try{var e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(t){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function A(e){if(e>W)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,a.prototype),r}function a(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(e)}return lr(e,r,t)}a.poolSize=8192;function lr(e,r,t){if(typeof e=="string")return zr(e,r);if(ArrayBuffer.isView(e))return Jr(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return Q(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return a.from(n,r,t);var i=Qr(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return a.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}a.from=function(e,r,t){return lr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function wr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Xr(e,r,t){return wr(e),e<=0?A(e):r!==void 0?typeof t=="string"?A(e).fill(r,t):A(e).fill(r):A(e)}a.alloc=function(e,r,t){return Xr(e,r,t)};function Z(e){return wr(e),A(e<0?0:j(e)|0)}a.allocUnsafe=function(e){return Z(e)};a.allocUnsafeSlow=function(e){return Z(e)};function zr(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=xr(e,r)|0,n=A(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function J(e){for(var r=e.length<0?0:j(e.length)|0,t=A(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Jr(e){if(F(e,Uint8Array)){var r=new Uint8Array(e);return Q(r.buffer,r.byteOffset,r.byteLength)}return J(e)}function Q(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,a.prototype),n}function Qr(e){if(a.isBuffer(e)){var r=j(e.length)|0,t=A(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||rr(e.length)?A(0):J(e);if(e.type==="Buffer"&&Array.isArray(e.data))return J(e.data)}function j(e){if(e>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return e|0}function $r(e){return+e!=e&&(e=0),a.alloc(+e)}a.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==a.prototype};a.compare=function(r,t){if(F(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),F(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(r)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var n=r.length,i=t.length,o=0,u=Math.min(n,i);o<u;++o)if(r[o]!==t[o]){n=r[o],i=t[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var i=a.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){var u=r[n];if(F(u,Uint8Array))o+u.length>i.length?a.from(u).copy(i,o):Uint8Array.prototype.set.call(i,u,o);else if(a.isBuffer(u))u.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return i};function xr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Fr(e).length;default:if(i)return n?-1:$(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=xr;function Zr(e,r,t){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return ht(this,r,t);case"utf8":case"utf-8":return Er(this,r,t);case"ascii":return ut(this,r,t);case"latin1":case"binary":return at(this,r,t);case"base64":return it(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function U(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)U(this,t,t+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)U(this,t,t+3),U(this,t+1,t+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)U(this,t,t+7),U(this,t+1,t+6),U(this,t+2,t+5),U(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?Er(this,0,r):Zr.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(r){if(!a.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",t=R.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};cr&&(a.prototype[cr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(F(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var u=o-i,f=n-t,h=Math.min(u,f),c=this.slice(i,o),s=r.slice(t,n),p=0;p<h;++p)if(c[p]!==s[p]){u=c[p],f=s[p];break}return u<f?-1:f<u?1:0};function yr(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,rr(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),a.isBuffer(r))return r.length===0?-1:pr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):pr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function pr(e,r,t,n,i){var o=1,u=e.length,f=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,f/=2,t/=2}function h(y,S){return o===1?y[S]:y.readUInt16BE(S*o)}var c;if(i){var s=-1;for(c=t;c<u;c++)if(h(e,c)===h(r,s===-1?0:c-s)){if(s===-1&&(s=c),c-s+1===f)return s*o}else s!==-1&&(c-=c-s),s=-1}else for(t+f>u&&(t=u-f),c=t;c>=0;c--){for(var p=!0,T=0;T<f;T++)if(h(e,c+T)!==h(r,T)){p=!1;break}if(p)return c}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return yr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return yr(this,r,t,n,!1)};function jr(e,r,t,n){t=Number(t)||0;var i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(u*2,2),16);if(rr(f))return u;e[t+u]=f}return u}function rt(e,r,t,n){return K($(r,e.length-t),e,t,n)}function tt(e,r,t,n){return K(st(r),e,t,n)}function et(e,r,t,n){return K(Fr(r),e,t,n)}function nt(e,r,t,n){return K(lt(r,e.length-t),e,t,n)}a.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return jr(this,r,t,n);case"utf8":case"utf-8":return rt(this,r,t,n);case"ascii":case"latin1":case"binary":return tt(this,r,t,n);case"base64":return et(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,r,t,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(e,r,t){return r===0&&t===e.length?z.fromByteArray(e):z.fromByteArray(e.slice(r,t))}function Er(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,f=o>239?4:o>223?3:o>191?2:1;if(i+f<=t){var h,c,s,p;switch(f){case 1:o<128&&(u=o);break;case 2:h=e[i+1],(h&192)===128&&(p=(o&31)<<6|h&63,p>127&&(u=p));break;case 3:h=e[i+1],c=e[i+2],(h&192)===128&&(c&192)===128&&(p=(o&15)<<12|(h&63)<<6|c&63,p>2047&&(p<55296||p>57343)&&(u=p));break;case 4:h=e[i+1],c=e[i+2],s=e[i+3],(h&192)===128&&(c&192)===128&&(s&192)===128&&(p=(o&15)<<18|(h&63)<<12|(c&63)<<6|s&63,p>65535&&p<1114112&&(u=p))}}u===null?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=f}return ot(n)}var sr=4096;function ot(e){var r=e.length;if(r<=sr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=sr));return t}function ut(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function at(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function ht(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=r;o<t;++o)i+=wt[e[o]];return i}function ft(e,r,t){for(var n=e.slice(r,t),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,t){var n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);var i=this.subarray(r,t);return Object.setPrototypeOf(i,a.prototype),i};function w(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||w(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||w(r,t,this.length);for(var i=this[r+--t],o=1;t>0&&(o*=256);)i+=this[r+--t]*o;return i};a.prototype.readUint8=a.prototype.readUInt8=function(r,t){return r=r>>>0,t||w(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||w(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||w(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||w(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||w(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};a.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||w(r,t,this.length);for(var i=t,o=1,u=this[r+--i];i>0&&(o*=256);)u+=this[r+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};a.prototype.readInt8=function(r,t){return r=r>>>0,t||w(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||w(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,t){r=r>>>0,t||w(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,t){return r=r>>>0,t||w(r,4,this.length),L.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||w(r,4,this.length),L.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||w(r,8,this.length),L.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||w(r,8,this.length),L.read(this,r,!1,52,8)};function x(e,r,t,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;x(this,r,t,n,o,0)}var u=1,f=0;for(this[t]=r&255;++f<n&&(u*=256);)this[t+f]=r/u&255;return t+n};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;x(this,r,t,n,o,0)}var u=n-1,f=1;for(this[t+u]=r&255;--u>=0&&(f*=256);)this[t+u]=r/f&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,1,255,0),this[t]=r&255,t+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};a.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);x(this,r,t,n,o-1,-o)}var u=0,f=1,h=0;for(this[t]=r&255;++u<n&&(f*=256);)r<0&&h===0&&this[t+u-1]!==0&&(h=1),this[t+u]=(r/f>>0)-h&255;return t+n};a.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);x(this,r,t,n,o-1,-o)}var u=n-1,f=1,h=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&h===0&&this[t+u+1]!==0&&(h=1),this[t+u]=(r/f>>0)-h&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};a.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};a.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||x(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function mr(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Tr(e,r,t,n,i){return r=+r,t=t>>>0,i||mr(e,r,t,4,34028234663852886e22,-34028234663852886e22),L.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return Tr(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return Tr(this,r,t,!1,n)};function gr(e,r,t,n,i){return r=+r,t=t>>>0,i||mr(e,r,t,8,17976931348623157e292,-17976931348623157e292),L.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return gr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return gr(this,r,t,!1,n)};a.prototype.copy=function(r,t,n,i){if(!a.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);var o=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),o};a.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){var o=r.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{var f=a.isBuffer(r)?r:a.from(r,i),h=f.length;if(h===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=f[u%h]}return this};var ct=/[^+/0-9A-Za-z-_]/g;function pt(e){if(e=e.split("=")[0],e=e.trim().replace(ct,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function $(e,r){r=r||1/0;for(var t,n=e.length,i=null,o=[],u=0;u<n;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function st(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function lt(e,r){for(var t,n,i,o=[],u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function Fr(e){return z.toByteArray(pt(e))}function K(e,r,t,n){for(var i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function F(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function rr(e){return e!==e}var wt=function(){for(var e="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)r[n+i]=e[t]+e[i];return r}()});var dr=P((Nt,Nr)=>{E();var l=Nr.exports={},B,I;function tr(){throw new Error("setTimeout has not been defined")}function er(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?B=setTimeout:B=tr}catch(e){B=tr}try{typeof clearTimeout=="function"?I=clearTimeout:I=er}catch(e){I=er}})();function Ir(e){if(B===setTimeout)return setTimeout(e,0);if((B===tr||!B)&&setTimeout)return B=setTimeout,setTimeout(e,0);try{return B(e,0)}catch(r){try{return B.call(null,e,0)}catch(t){return B.call(this,e,0)}}}function xt(e){if(I===clearTimeout)return clearTimeout(e);if((I===er||!I)&&clearTimeout)return I=clearTimeout,clearTimeout(e);try{return I(e)}catch(r){try{return I.call(null,e)}catch(t){return I.call(this,e)}}}var v=[],k=!1,C,V=-1;function yt(){!k||!C||(k=!1,C.length?v=C.concat(v):V=-1,v.length&&Ar())}function Ar(){if(!k){var e=Ir(yt);k=!0;for(var r=v.length;r;){for(C=v,v=[];++V<r;)C&&C[V].run();V=-1,r=v.length}C=null,k=!1,xt(e)}}l.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];v.push(new vr(e,r)),v.length===1&&!k&&Ir(Ar)};function vr(e,r){this.fun=e,this.array=r}vr.prototype.run=function(){this.fun.apply(null,this.array)};l.title="browser";l.browser=!0;l.env={};l.argv=[];l.version="";l.versions={};function N(){}l.on=N;l.addListener=N;l.once=N;l.off=N;l.removeListener=N;l.removeAllListeners=N;l.emit=N;l.prependListener=N;l.prependOnceListener=N;l.listeners=function(e){return[]};l.binding=function(e){throw new Error("process.binding is not supported")};l.cwd=function(){return"/"};l.chdir=function(e){throw new Error("process.chdir is not supported")};l.umask=function(){return 0}});var _,D,dt,E=Or(()=>{_=Y(Br()),D=Y(dr()),dt=function(e){function r(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:r});var t=__magic__;return t}(Object)});var Ft={};Mr(Ft,{getLatestBlockHash:()=>mt});module.exports=br(Ft);E();var Cr=Y(require("axios"));E();var Ur="blocks";var Et=5e4,nr=null,O={current:null},ir=!1;function mt(e){return G(this,null,function*(){if(e==null)throw new Error("missing api url");if(nr!=null&&Date.now()<nr&&O.current!=null)return O.current;{if(ir)return yield gt();ir=!0,O.current=null;let t=yield Tt(e);return O.current=t,nr=Date.now()+Et,ir=!1,t}})}function Tt(e){return G(this,null,function*(){let{data:r}=yield Cr.default.get(`${e}/${Ur}?size=1&fields=hash,timestamp`),[t]=r;return t})}function gt(){return G(this,null,function*(){return new Promise((e,r)=>{let t,n=setInterval(()=>{O.current!=null&&(e(O.current),clearInterval(n),clearTimeout(t))},50);t=setTimeout(()=>{clearInterval(n),r("could not generate new token")},5e3)})})}0&&(module.exports={getLatestBlockHash});
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *