@multiversx/sdk-dapp 2.9.2 → 2.9.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 (202) hide show
  1. package/README.md +68 -2
  2. package/UI/DappModal/hooks/index.js +1 -1
  3. package/UI/DappModal/hooks/useDappModal.js +1 -1
  4. package/UI/DappModal/index.js +1 -1
  5. package/UI/ModalContainer/ModalContainer.js +1 -1
  6. package/UI/ModalContainer/index.js +1 -1
  7. package/UI/NotificationModal/index.js +1 -1
  8. package/UI/SignTransactionsModals/SignTransactionsModals.js +1 -1
  9. package/UI/SignTransactionsModals/SignWithDeviceModal/SignStep.js +1 -1
  10. package/UI/SignTransactionsModals/SignWithDeviceModal/index.js +1 -1
  11. package/UI/SignTransactionsModals/SignWithExtensionModal/index.js +1 -1
  12. package/UI/SignTransactionsModals/SignWithLedgerModal/index.js +1 -1
  13. package/UI/SignTransactionsModals/SignWithOperaModal/index.js +1 -1
  14. package/UI/SignTransactionsModals/SignWithWalletConnectModal/index.js +1 -1
  15. package/UI/SignTransactionsModals/components/ConfirmationScreen.js +1 -1
  16. package/UI/SignTransactionsModals/components/DeviceConfirmationScreen.js +1 -1
  17. package/UI/SignTransactionsModals/components/index.js +1 -1
  18. package/UI/SignTransactionsModals/index.js +1 -1
  19. package/UI/TransactionInfo/TransactionInfo.js +1 -1
  20. package/UI/TransactionInfo/components/NonceMessage/NonceMessage.js +1 -1
  21. package/UI/TransactionInfo/components/NonceMessage/index.js +1 -1
  22. package/UI/TransactionInfo/components/index.js +1 -1
  23. package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/TransactionInfoNonce.js +1 -1
  24. package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/index.js +1 -1
  25. package/UI/TransactionInfo/components/transactionInfoFields/index.js +1 -1
  26. package/UI/TransactionInfo/index.js +1 -1
  27. package/UI/TransactionsTable/TransactionsTable.js +1 -1
  28. package/UI/TransactionsTable/index.js +1 -1
  29. package/UI/TransactionsToastList/TransactionsToastList.js +1 -1
  30. package/UI/TransactionsToastList/components/TransactionToast/TransactionToast.js +1 -1
  31. package/UI/TransactionsToastList/components/TransactionToast/hooks/useTransactionToast.js +1 -1
  32. package/UI/TransactionsToastList/components/TransactionToast/index.js +1 -1
  33. package/UI/TransactionsToastList/components/TransactionToastGuard.js +1 -1
  34. package/UI/TransactionsToastList/components/index.js +1 -1
  35. package/UI/TransactionsToastList/index.js +1 -1
  36. package/UI/extension/ExtensionLoginButton/index.js +1 -1
  37. package/UI/index.js +1 -1
  38. package/UI/ledger/LedgerLoginButton/index.js +1 -1
  39. package/UI/ledger/LedgerLoginContainer/ConfirmAddress.js +1 -1
  40. package/UI/ledger/LedgerLoginContainer/index.js +1 -1
  41. package/UI/ledger/index.js +1 -1
  42. package/UI/operaWallet/OperaWalletLoginButton/index.js +1 -1
  43. package/UI/pages/UnlockPage/index.js +1 -1
  44. package/UI/pages/index.js +1 -1
  45. package/UI/walletConnect/WalletConnectLoginButton/index.js +1 -1
  46. package/UI/walletConnect/WalletConnectLoginContainer/index.js +1 -1
  47. package/UI/walletConnect/index.js +1 -1
  48. package/UI/webWallet/WebWalletLoginButton/index.js +1 -1
  49. package/__chunks__/{chunk-ORFIRFRT.js → chunk-2WCENO6D.js} +2 -2
  50. package/__chunks__/{chunk-FAYB33HW.js → chunk-3Q7OTNFY.js} +2 -2
  51. package/__chunks__/{chunk-54ESJ5XJ.js → chunk-43MYPOBW.js} +2 -2
  52. package/__chunks__/chunk-7AMV6USN.js +2 -0
  53. package/__chunks__/{chunk-2V6RP4S6.js → chunk-ACFBL4A7.js} +2 -2
  54. package/__chunks__/{chunk-GI4F6FXB.js → chunk-B4AJMI3T.js} +2 -2
  55. package/__chunks__/chunk-B4D6WVTB.js +2 -0
  56. package/__chunks__/{chunk-AWTANQPZ.js → chunk-CB3TM7NC.js} +2 -2
  57. package/__chunks__/{chunk-EU7ANT3I.js → chunk-DEO64IOA.js} +2 -2
  58. package/__chunks__/chunk-EZOGNXLH.js +2 -0
  59. package/__chunks__/{chunk-CR2ZQPXH.js → chunk-GZYBS3RX.js} +2 -2
  60. package/__chunks__/{chunk-6I5BQVPS.js → chunk-IJJ232SS.js} +2 -2
  61. package/__chunks__/{chunk-DHOVEDJX.js → chunk-KU6GMEDW.js} +2 -2
  62. package/__chunks__/{chunk-DS3SOYTD.js → chunk-L4CGB34M.js} +2 -2
  63. package/__chunks__/{chunk-747N7G3G.js → chunk-NDKKNO3E.js} +2 -2
  64. package/__chunks__/chunk-P44CM6L4.js +2 -0
  65. package/__chunks__/{chunk-KD43VNMQ.js → chunk-PEA6B2ZZ.js} +2 -2
  66. package/__chunks__/chunk-R7ADKYKL.js +2 -0
  67. package/__chunks__/{chunk-EC5YBO7X.js → chunk-TRBGUYRQ.js} +2 -2
  68. package/__chunks__/{chunk-YKCDU3WR.js → chunk-U2XXWBAJ.js} +2 -2
  69. package/__chunks__/{chunk-LRTL63X3.js → chunk-V2L6I47E.js} +2 -2
  70. package/__chunks__/{chunk-FW23LZL5.js → chunk-ZETCVO2R.js} +2 -2
  71. package/__chunks__/{chunk-4FSOV5T6.js → chunk-ZUKUDAXO.js} +2 -2
  72. package/__commonjs/UI/DappModal/hooks/index.js +1 -1
  73. package/__commonjs/UI/DappModal/hooks/useDappModal.js +1 -1
  74. package/__commonjs/UI/DappModal/index.js +2 -2
  75. package/__commonjs/UI/ModalContainer/ModalContainer.js +2 -2
  76. package/__commonjs/UI/ModalContainer/index.js +2 -2
  77. package/__commonjs/UI/NotificationModal/index.js +4 -4
  78. package/__commonjs/UI/SignTransactionsModals/SignTransactionsModals.js +22 -22
  79. package/__commonjs/UI/SignTransactionsModals/SignWithDeviceModal/SignStep.js +5 -5
  80. package/__commonjs/UI/SignTransactionsModals/SignWithDeviceModal/index.js +7 -7
  81. package/__commonjs/UI/SignTransactionsModals/SignWithExtensionModal/index.js +5 -5
  82. package/__commonjs/UI/SignTransactionsModals/SignWithLedgerModal/index.js +7 -7
  83. package/__commonjs/UI/SignTransactionsModals/SignWithOperaModal/index.js +5 -5
  84. package/__commonjs/UI/SignTransactionsModals/SignWithWalletConnectModal/index.js +5 -5
  85. package/__commonjs/UI/SignTransactionsModals/components/ConfirmationScreen.js +14 -14
  86. package/__commonjs/UI/SignTransactionsModals/components/DeviceConfirmationScreen.js +14 -14
  87. package/__commonjs/UI/SignTransactionsModals/components/index.js +14 -14
  88. package/__commonjs/UI/SignTransactionsModals/index.js +22 -22
  89. package/__commonjs/UI/TransactionInfo/TransactionInfo.js +26 -26
  90. package/__commonjs/UI/TransactionInfo/components/NonceMessage/NonceMessage.js +2 -2
  91. package/__commonjs/UI/TransactionInfo/components/NonceMessage/index.js +2 -2
  92. package/__commonjs/UI/TransactionInfo/components/index.js +27 -27
  93. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/TransactionInfoNonce.js +2 -2
  94. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/index.js +2 -2
  95. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/index.js +12 -12
  96. package/__commonjs/UI/TransactionInfo/index.js +27 -27
  97. package/__commonjs/UI/TransactionsTable/TransactionsTable.js +10 -10
  98. package/__commonjs/UI/TransactionsTable/index.js +5 -5
  99. package/__commonjs/UI/TransactionsToastList/TransactionsToastList.js +14 -14
  100. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/TransactionToast.js +8 -8
  101. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/hooks/useTransactionToast.js +2 -2
  102. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/index.js +8 -8
  103. package/__commonjs/UI/TransactionsToastList/components/TransactionToastGuard.js +4 -4
  104. package/__commonjs/UI/TransactionsToastList/components/index.js +9 -9
  105. package/__commonjs/UI/TransactionsToastList/index.js +14 -14
  106. package/__commonjs/UI/extension/ExtensionLoginButton/index.js +4 -4
  107. package/__commonjs/UI/index.js +65 -65
  108. package/__commonjs/UI/ledger/LedgerLoginButton/index.js +16 -16
  109. package/__commonjs/UI/ledger/LedgerLoginContainer/ConfirmAddress.js +2 -2
  110. package/__commonjs/UI/ledger/LedgerLoginContainer/index.js +15 -15
  111. package/__commonjs/UI/ledger/index.js +16 -16
  112. package/__commonjs/UI/operaWallet/OperaWalletLoginButton/index.js +3 -3
  113. package/__commonjs/UI/pages/UnlockPage/index.js +19 -19
  114. package/__commonjs/UI/pages/index.js +19 -19
  115. package/__commonjs/UI/walletConnect/WalletConnectLoginButton/index.js +7 -7
  116. package/__commonjs/UI/walletConnect/WalletConnectLoginContainer/index.js +6 -6
  117. package/__commonjs/UI/walletConnect/index.js +7 -7
  118. package/__commonjs/UI/webWallet/WebWalletLoginButton/index.js +3 -3
  119. package/__commonjs/__mocks__/index.js +1 -1
  120. package/__commonjs/__mocks__/utils/index.js +1 -1
  121. package/__commonjs/__mocks__/utils/renderWithProvider.js +1 -1
  122. package/__commonjs/components/LogoutListener/LogoutListener.js +1 -1
  123. package/__commonjs/components/LogoutListener/helpers/index.js +1 -1
  124. package/__commonjs/components/LogoutListener/helpers/useLogoutFromMultipleTabs.js +1 -1
  125. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogout.js +1 -1
  126. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogoutWarning/index.js +1 -1
  127. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogoutWarning/useNativeAuthLogoutWarning.js +1 -1
  128. package/__commonjs/components/LogoutListener/index.js +1 -1
  129. package/__commonjs/components/ProviderInitializer.js +1 -1
  130. package/__commonjs/components/TransactionsTracker/TransactionTracker.js +1 -1
  131. package/__commonjs/components/TransactionsTracker/index.js +1 -1
  132. package/__commonjs/components/TransactionsTracker/useTransactionsTracker.js +1 -1
  133. package/__commonjs/hooks/index.js +1 -1
  134. package/__commonjs/hooks/login/index.js +1 -1
  135. package/__commonjs/hooks/login/useExtensionLogin.js +1 -1
  136. package/__commonjs/hooks/login/useLedgerLogin.js +1 -1
  137. package/__commonjs/hooks/login/useLoginService.js +1 -1
  138. package/__commonjs/hooks/login/useOperaLogin.js +1 -1
  139. package/__commonjs/hooks/login/useWalletConnectLogin.js +1 -1
  140. package/__commonjs/hooks/login/useWalletConnectV2Login.js +1 -1
  141. package/__commonjs/hooks/login/useWebWalletLogin.js +1 -1
  142. package/__commonjs/hooks/transactions/index.js +1 -1
  143. package/__commonjs/hooks/transactions/useTrackTransactionStatus.js +1 -1
  144. package/__commonjs/providers/webviewProvider/index.js +1 -1
  145. package/__commonjs/providers/webviewProvider/requestMethods.js +1 -1
  146. package/__commonjs/providers/webviewProvider/webviewProvider.js +1 -1
  147. package/__commonjs/services/index.js +1 -1
  148. package/__commonjs/services/nativeAuth/helpers/getLatestBlockHash.js +1 -1
  149. package/__commonjs/services/nativeAuth/helpers/index.js +1 -1
  150. package/__commonjs/services/nativeAuth/index.js +1 -1
  151. package/__commonjs/services/nativeAuth/methods/getToken.js +1 -1
  152. package/__commonjs/services/nativeAuth/methods/index.js +1 -1
  153. package/__commonjs/services/nativeAuth/nativeAuth.js +1 -1
  154. package/__commonjs/utils/platform/detectCurrentPlatform.js +1 -1
  155. package/__commonjs/wrappers/DappProvider/CustomComponents.js +1 -1
  156. package/__commonjs/wrappers/DappProvider/index.js +1 -1
  157. package/__commonjs/wrappers/index.js +1 -1
  158. package/__mocks__/index.js +1 -1
  159. package/__mocks__/utils/index.js +1 -1
  160. package/__mocks__/utils/renderWithProvider.js +1 -1
  161. package/components/LogoutListener/LogoutListener.js +1 -1
  162. package/components/LogoutListener/helpers/index.js +1 -1
  163. package/components/LogoutListener/helpers/useLogoutFromMultipleTabs.js +1 -1
  164. package/components/LogoutListener/helpers/useNativeAuthLogout.js +1 -1
  165. package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/index.js +1 -1
  166. package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/useNativeAuthLogoutWarning.js +1 -1
  167. package/components/LogoutListener/index.js +1 -1
  168. package/components/ProviderInitializer.js +1 -1
  169. package/components/TransactionsTracker/TransactionTracker.js +1 -1
  170. package/components/TransactionsTracker/index.js +1 -1
  171. package/components/TransactionsTracker/useTransactionsTracker.js +1 -1
  172. package/hooks/index.js +1 -1
  173. package/hooks/login/index.js +1 -1
  174. package/hooks/login/useExtensionLogin.js +1 -1
  175. package/hooks/login/useLedgerLogin.js +1 -1
  176. package/hooks/login/useLoginService.js +1 -1
  177. package/hooks/login/useOperaLogin.js +1 -1
  178. package/hooks/login/useWalletConnectLogin.js +1 -1
  179. package/hooks/login/useWalletConnectV2Login.js +1 -1
  180. package/hooks/login/useWebWalletLogin.js +1 -1
  181. package/hooks/transactions/index.js +1 -1
  182. package/hooks/transactions/useTrackTransactionStatus.js +1 -1
  183. package/package.json +1 -1
  184. package/providers/webviewProvider/index.js +1 -1
  185. package/providers/webviewProvider/requestMethods.js +1 -1
  186. package/providers/webviewProvider/webviewProvider.js +1 -1
  187. package/services/index.js +1 -1
  188. package/services/nativeAuth/helpers/getLatestBlockHash.js +1 -1
  189. package/services/nativeAuth/helpers/index.js +1 -1
  190. package/services/nativeAuth/index.js +1 -1
  191. package/services/nativeAuth/methods/getToken.js +1 -1
  192. package/services/nativeAuth/methods/index.js +1 -1
  193. package/services/nativeAuth/nativeAuth.js +1 -1
  194. package/utils/platform/detectCurrentPlatform.js +1 -1
  195. package/wrappers/DappProvider/CustomComponents.js +1 -1
  196. package/wrappers/DappProvider/index.js +1 -1
  197. package/wrappers/index.js +1 -1
  198. package/__chunks__/chunk-2G5LLTGO.js +0 -2
  199. package/__chunks__/chunk-6YPL2NXM.js +0 -2
  200. package/__chunks__/chunk-J3Q7UDAZ.js +0 -2
  201. package/__chunks__/chunk-KLNK7RJQ.js +0 -2
  202. package/__chunks__/chunk-WOES4HAT.js +0 -2
@@ -1,4 +1,4 @@
1
- "use strict";var Or=Object.create;var H=Object.defineProperty;var Rr=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var kr=Object.getPrototypeOf,Mr=Object.prototype.hasOwnProperty;var Pr=(e,r)=>()=>(e&&(r=e(e=0)),r);var W=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Hr=(e,r)=>{for(var t in r)H(e,t,{get:r[t],enumerable:!0})},or=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of br(r))!Mr.call(e,i)&&i!==t&&H(e,i,{get:()=>r[i],enumerable:!(n=Rr(r,i))||n.enumerable});return e};var J=(e,r,t)=>(t=e!=null?Or(kr(e)):{},or(r||!e||!e.__esModule?H(t,"default",{value:e,enumerable:!0}):t,e)),Wr=e=>or(H({},"__esModule",{value:!0}),e);var N=(e,r,t)=>new Promise((n,i)=>{var o=c=>{try{f(t.next(c))}catch(h){i(h)}},u=c=>{try{f(t.throw(c))}catch(h){i(h)}},f=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,u);f((t=t.apply(e,r)).next())});var cr=W(K=>{"use strict";s();K.byteLength=qr;K.toByteArray=Yr;K.fromByteArray=Xr;var I=[],B=[],Kr=typeof Uint8Array!="undefined"?Uint8Array:Array,X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(_=0,ur=X.length;_<ur;++_)I[_]=X[_],B[X.charCodeAt(_)]=_;var _,ur;B["-".charCodeAt(0)]=62;B["_".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 qr(e){var r=ar(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Gr(e,r,t){return(r+t)*3/4-t}function Yr(e){var r,t=ar(e),n=t[0],i=t[1],o=new Kr(Gr(e,n,i)),u=0,f=i>0?n-4:n,c;for(c=0;c<f;c+=4)r=B[e.charCodeAt(c)]<<18|B[e.charCodeAt(c+1)]<<12|B[e.charCodeAt(c+2)]<<6|B[e.charCodeAt(c+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=B[e.charCodeAt(c)]<<2|B[e.charCodeAt(c+1)]>>4,o[u++]=r&255),i===1&&(r=B[e.charCodeAt(c)]<<10|B[e.charCodeAt(c+1)]<<4|B[e.charCodeAt(c+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Vr(e){return I[e>>18&63]+I[e>>12&63]+I[e>>6&63]+I[e&63]}function Jr(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(Vr(n));return i.join("")}function Xr(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,f=t-n;u<f;u+=o)i.push(Jr(e,u,u+o>f?f:u+o));return n===1?(r=e[t-1],i.push(I[r>>2]+I[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(I[r>>10]+I[r>>4&63]+I[r<<2&63]+"=")),i.join("")}});var fr=W(z=>{s();z.read=function(e,r,t,n,i){var o,u,f=i*8-n-1,c=(1<<f)-1,h=c>>1,l=-7,p=t?i-1:0,g=t?-1:1,F=e[r+p];for(p+=g,o=F&(1<<-l)-1,F>>=-l,l+=f;l>0;o=o*256+e[r+p],p+=g,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+p],p+=g,l-=8);if(o===0)o=1-h;else{if(o===c)return u?NaN:(F?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(F?-1:1)*u*Math.pow(2,o-n)};z.write=function(e,r,t,n,i,o){var u,f,c,h=o*8-i-1,l=(1<<h)-1,p=l>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=n?0:o-1,O=n?1:-1,Lr=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=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+p>=1?r+=g/c:r+=g*Math.pow(2,1-p),r*c>=2&&(u++,c/=2),u+p>=l?(f=0,u=l):u+p>=1?(f=(r*c-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+F]=f&255,F+=O,f/=256,i-=8);for(u=u<<i|f,h+=i;h>0;e[t+F]=u&255,F+=O,u/=256,h-=8);e[t+F-O]|=Lr*128}});var Br=W(b=>{"use strict";s();var $=cr(),R=fr(),hr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;b.Buffer=a;b.SlowBuffer=rt;b.INSPECT_MAX_BYTES=50;var q=2147483647;b.kMaxLength=q;a.TYPED_ARRAY_SUPPORT=zr();!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 zr(){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 U(e){if(e>q)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 rr(e)}return lr(e,r,t)}a.poolSize=8192;function lr(e,r,t){if(typeof e=="string")return Qr(e,r);if(ArrayBuffer.isView(e))return Zr(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(d(e,ArrayBuffer)||e&&d(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(d(e,SharedArrayBuffer)||e&&d(e.buffer,SharedArrayBuffer)))return Z(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=jr(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 yr(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 $r(e,r,t){return yr(e),e<=0?U(e):r!==void 0?typeof t=="string"?U(e).fill(r,t):U(e).fill(r):U(e)}a.alloc=function(e,r,t){return $r(e,r,t)};function rr(e){return yr(e),U(e<0?0:tr(e)|0)}a.allocUnsafe=function(e){return rr(e)};a.allocUnsafeSlow=function(e){return rr(e)};function Qr(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=U(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function Q(e){for(var r=e.length<0?0:tr(e.length)|0,t=U(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Zr(e){if(d(e,Uint8Array)){var r=new Uint8Array(e);return Z(r.buffer,r.byteOffset,r.byteLength)}return Q(e)}function Z(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 jr(e){if(a.isBuffer(e)){var r=tr(e.length)|0,t=U(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||er(e.length)?U(0):Q(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Q(e.data)}function tr(e){if(e>=q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+q.toString(16)+" bytes");return e|0}function rt(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(d(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),d(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(d(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)||d(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 Fr(e).length;default:if(i)return n?-1:j(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=xr;function tt(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 pt(this,r,t);case"utf8":case"utf-8":return mr(this,r,t);case"ascii":return ft(this,r,t);case"latin1":case"binary":return ht(this,r,t);case"base64":return at(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(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?mr(this,0,r):tt.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=b.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};hr&&(a.prototype[hr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(d(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,c=Math.min(u,f),h=this.slice(i,o),l=r.slice(t,n),p=0;p<c;++p)if(h[p]!==l[p]){u=h[p],f=l[p];break}return u<f?-1:f<u?1:0};function wr(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,er(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 c(F,O){return o===1?F[O]:F.readUInt16BE(O*o)}var h;if(i){var l=-1;for(h=t;h<u;h++)if(c(e,h)===c(r,l===-1?0:h-l)){if(l===-1&&(l=h),h-l+1===f)return l*o}else l!==-1&&(h-=h-l),l=-1}else for(t+f>u&&(t=u-f),h=t;h>=0;h--){for(var p=!0,g=0;g<f;g++)if(c(e,h+g)!==c(r,g)){p=!1;break}if(p)return h}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return wr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return wr(this,r,t,n,!1)};function et(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(er(f))return u;e[t+u]=f}return u}function nt(e,r,t,n){return G(j(r,e.length-t),e,t,n)}function it(e,r,t,n){return G(xt(r),e,t,n)}function ot(e,r,t,n){return G(Fr(r),e,t,n)}function ut(e,r,t,n){return G(wt(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 et(this,r,t,n);case"utf8":case"utf-8":return nt(this,r,t,n);case"ascii":case"latin1":case"binary":return it(this,r,t,n);case"base64":return ot(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(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 at(e,r,t){return r===0&&t===e.length?$.fromByteArray(e):$.fromByteArray(e.slice(r,t))}function mr(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 c,h,l,p;switch(f){case 1:o<128&&(u=o);break;case 2:c=e[i+1],(c&192)===128&&(p=(o&31)<<6|c&63,p>127&&(u=p));break;case 3:c=e[i+1],h=e[i+2],(c&192)===128&&(h&192)===128&&(p=(o&15)<<12|(c&63)<<6|h&63,p>2047&&(p<55296||p>57343)&&(u=p));break;case 4:c=e[i+1],h=e[i+2],l=e[i+3],(c&192)===128&&(h&192)===128&&(l&192)===128&&(p=(o&15)<<18|(c&63)<<12|(h&63)<<6|l&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 ct(n)}var sr=4096;function ct(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 ft(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 ht(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 pt(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+=mt[e[o]];return i}function st(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 m(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||m(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||m(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||m(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||m(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||m(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||m(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||m(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||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||m(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||m(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||m(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||m(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||m(r,4,this.length),R.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||m(r,4,this.length),R.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||m(r,8,this.length),R.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||m(r,8,this.length),R.read(this,r,!1,52,8)};function T(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;T(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;T(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||T(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||T(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||T(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||T(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||T(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);T(this,r,t,n,o-1,-o)}var u=0,f=1,c=0;for(this[t]=r&255;++u<n&&(f*=256);)r<0&&c===0&&this[t+u-1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&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);T(this,r,t,n,o-1,-o)}var u=n-1,f=1,c=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&c===0&&this[t+u+1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||T(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||T(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||T(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||T(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||T(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 Er(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 gr(e,r,t,n,i){return r=+r,t=t>>>0,i||Er(e,r,t,4,34028234663852886e22,-34028234663852886e22),R.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return gr(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return gr(this,r,t,!1,n)};function Tr(e,r,t,n,i){return r=+r,t=t>>>0,i||Er(e,r,t,8,17976931348623157e292,-17976931348623157e292),R.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return Tr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return Tr(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),c=f.length;if(c===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=f[u%c]}return this};var lt=/[^+/0-9A-Za-z-_]/g;function yt(e){if(e=e.split("=")[0],e=e.trim().replace(lt,""),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 xt(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function wt(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 $.toByteArray(yt(e))}function G(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 d(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function er(e){return e!==e}var mt=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 Nr=W((Dt,vr)=>{s();var y=vr.exports={},A,v;function nr(){throw new Error("setTimeout has not been defined")}function ir(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?A=setTimeout:A=nr}catch(e){A=nr}try{typeof clearTimeout=="function"?v=clearTimeout:v=ir}catch(e){v=ir}})();function Ir(e){if(A===setTimeout)return setTimeout(e,0);if((A===nr||!A)&&setTimeout)return A=setTimeout,setTimeout(e,0);try{return A(e,0)}catch(r){try{return A.call(null,e,0)}catch(t){return A.call(this,e,0)}}}function Et(e){if(v===clearTimeout)return clearTimeout(e);if((v===ir||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var S=[],k=!1,L,Y=-1;function gt(){!k||!L||(k=!1,L.length?S=L.concat(S):Y=-1,S.length&&dr())}function dr(){if(!k){var e=Ir(gt);k=!0;for(var r=S.length;r;){for(L=S,S=[];++Y<r;)L&&L[Y].run();Y=-1,r=S.length}L=null,k=!1,Et(e)}}y.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];S.push(new Ar(e,r)),S.length===1&&!k&&Ir(dr)};function Ar(e,r){this.fun=e,this.array=r}Ar.prototype.run=function(){this.fun.apply(null,this.array)};y.title="browser";y.browser=!0;y.env={};y.argv=[];y.version="";y.versions={};function C(){}y.on=C;y.addListener=C;y.once=C;y.off=C;y.removeListener=C;y.removeAllListeners=C;y.emit=C;y.prependListener=C;y.prependOnceListener=C;y.listeners=function(e){return[]};y.binding=function(e){throw new Error("process.binding is not supported")};y.cwd=function(){return"/"};y.chdir=function(e){throw new Error("process.chdir is not supported")};y.umask=function(){return 0}});var x,w,Lt,s=Pr(()=>{x=J(Br()),w=J(Nr()),Lt=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 Nt={};Hr(Nt,{decodeNativeAuthToken:()=>vt,encodeValue:()=>Ft,getLatestBlockHash:()=>dt});module.exports=Wr(Nt);s();s();var Tt=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),Ft=e=>Tt(x.Buffer.from(e,"utf8").toString("base64"));s();var Dr=J(require("axios"));s();var Ur="blocks";s();s();s();function Sr(e){return N(this,null,function*(){return yield new Promise(r=>{setTimeout(()=>r(),e)})})}s();var Cr=(e,r,t,n=0)=>N(void 0,null,function*(){try{return yield e(...t)}catch(i){return n<r.retries?((r==null?void 0:r.delay)!=null&&(yield Sr(r.delay)),yield Cr(e,r,t,n+1)):null}}),_r=(e,r={retries:5,delay:500})=>(...t)=>N(void 0,null,function*(){return yield Cr(e,r,t)});var Bt=3e4,V={current:null},M={current:null},It=_r((e,r)=>N(void 0,null,function*(){let{data:t}=yield Dr.default.get(`${e}/${Ur}?from=3&size=1&fields=hash,timestamp${r?"&shard="+r:""}`),[n]=t;return n}));function dt(e,r){return N(this,null,function*(){if(e==null)throw new Error("missing api url");if(V.current!=null&&V.current.timestamp-Date.now()>0)return V.current;if(M.current!=null)return yield M.current;M.current=It(e,r);let t=yield M.current;if(t==null)throw M.current,new Error("could not get block hash");return V.current={hash:t.hash,timestamp:t.timestamp*1e3+Bt},M.current=null,t})}s();s();s();function P(e){return atob(e)}s();s();s();function At(e){return Object.prototype.toString.call(e)==="[object String]"}var vt=e=>{if(!e||!At(e))return null;try{let[r,t,n]=e.split("."),i=P(r),o=P(t),[u,f,c,h]=o.split("."),l=JSON.parse(P(h)),p=P(u),g={ttl:Number(c),address:i,extraInfo:l,host:p,signature:n,blockHash:f,body:o};return h==="e30"&&delete g.extraInfo,g}catch(r){return null}};0&&(module.exports={decodeNativeAuthToken,encodeValue,getLatestBlockHash});
1
+ "use strict";var Or=Object.create;var H=Object.defineProperty;var Rr=Object.getOwnPropertyDescriptor;var kr=Object.getOwnPropertyNames;var br=Object.getPrototypeOf,Mr=Object.prototype.hasOwnProperty;var Pr=(e,r)=>()=>(e&&(r=e(e=0)),r);var W=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Hr=(e,r)=>{for(var t in r)H(e,t,{get:r[t],enumerable:!0})},or=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of kr(r))!Mr.call(e,i)&&i!==t&&H(e,i,{get:()=>r[i],enumerable:!(n=Rr(r,i))||n.enumerable});return e};var J=(e,r,t)=>(t=e!=null?Or(br(e)):{},or(r||!e||!e.__esModule?H(t,"default",{value:e,enumerable:!0}):t,e)),Wr=e=>or(H({},"__esModule",{value:!0}),e);var N=(e,r,t)=>new Promise((n,i)=>{var o=c=>{try{f(t.next(c))}catch(h){i(h)}},u=c=>{try{f(t.throw(c))}catch(h){i(h)}},f=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,u);f((t=t.apply(e,r)).next())});var cr=W(K=>{"use strict";s();K.byteLength=qr;K.toByteArray=Yr;K.fromByteArray=Xr;var I=[],B=[],Kr=typeof Uint8Array!="undefined"?Uint8Array:Array,X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(_=0,ur=X.length;_<ur;++_)I[_]=X[_],B[X.charCodeAt(_)]=_;var _,ur;B["-".charCodeAt(0)]=62;B["_".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 qr(e){var r=ar(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Gr(e,r,t){return(r+t)*3/4-t}function Yr(e){var r,t=ar(e),n=t[0],i=t[1],o=new Kr(Gr(e,n,i)),u=0,f=i>0?n-4:n,c;for(c=0;c<f;c+=4)r=B[e.charCodeAt(c)]<<18|B[e.charCodeAt(c+1)]<<12|B[e.charCodeAt(c+2)]<<6|B[e.charCodeAt(c+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=B[e.charCodeAt(c)]<<2|B[e.charCodeAt(c+1)]>>4,o[u++]=r&255),i===1&&(r=B[e.charCodeAt(c)]<<10|B[e.charCodeAt(c+1)]<<4|B[e.charCodeAt(c+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Vr(e){return I[e>>18&63]+I[e>>12&63]+I[e>>6&63]+I[e&63]}function Jr(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(Vr(n));return i.join("")}function Xr(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,f=t-n;u<f;u+=o)i.push(Jr(e,u,u+o>f?f:u+o));return n===1?(r=e[t-1],i.push(I[r>>2]+I[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(I[r>>10]+I[r>>4&63]+I[r<<2&63]+"=")),i.join("")}});var fr=W($=>{s();$.read=function(e,r,t,n,i){var o,u,f=i*8-n-1,c=(1<<f)-1,h=c>>1,l=-7,p=t?i-1:0,g=t?-1:1,F=e[r+p];for(p+=g,o=F&(1<<-l)-1,F>>=-l,l+=f;l>0;o=o*256+e[r+p],p+=g,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+p],p+=g,l-=8);if(o===0)o=1-h;else{if(o===c)return u?NaN:(F?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(F?-1:1)*u*Math.pow(2,o-n)};$.write=function(e,r,t,n,i,o){var u,f,c,h=o*8-i-1,l=(1<<h)-1,p=l>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=n?0:o-1,R=n?1:-1,Lr=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=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+p>=1?r+=g/c:r+=g*Math.pow(2,1-p),r*c>=2&&(u++,c/=2),u+p>=l?(f=0,u=l):u+p>=1?(f=(r*c-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+F]=f&255,F+=R,f/=256,i-=8);for(u=u<<i|f,h+=i;h>0;e[t+F]=u&255,F+=R,u/=256,h-=8);e[t+F-R]|=Lr*128}});var Br=W(b=>{"use strict";s();var z=cr(),k=fr(),hr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;b.Buffer=a;b.SlowBuffer=rt;b.INSPECT_MAX_BYTES=50;var q=2147483647;b.kMaxLength=q;a.TYPED_ARRAY_SUPPORT=$r();!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 $r(){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 U(e){if(e>q)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 rr(e)}return lr(e,r,t)}a.poolSize=8192;function lr(e,r,t){if(typeof e=="string")return Qr(e,r);if(ArrayBuffer.isView(e))return Zr(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(d(e,ArrayBuffer)||e&&d(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(d(e,SharedArrayBuffer)||e&&d(e.buffer,SharedArrayBuffer)))return Z(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=jr(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 yr(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 zr(e,r,t){return yr(e),e<=0?U(e):r!==void 0?typeof t=="string"?U(e).fill(r,t):U(e).fill(r):U(e)}a.alloc=function(e,r,t){return zr(e,r,t)};function rr(e){return yr(e),U(e<0?0:tr(e)|0)}a.allocUnsafe=function(e){return rr(e)};a.allocUnsafeSlow=function(e){return rr(e)};function Qr(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=U(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function Q(e){for(var r=e.length<0?0:tr(e.length)|0,t=U(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Zr(e){if(d(e,Uint8Array)){var r=new Uint8Array(e);return Z(r.buffer,r.byteOffset,r.byteLength)}return Q(e)}function Z(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 jr(e){if(a.isBuffer(e)){var r=tr(e.length)|0,t=U(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||er(e.length)?U(0):Q(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Q(e.data)}function tr(e){if(e>=q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+q.toString(16)+" bytes");return e|0}function rt(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(d(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),d(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(d(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)||d(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 Fr(e).length;default:if(i)return n?-1:j(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=xr;function tt(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 pt(this,r,t);case"utf8":case"utf-8":return mr(this,r,t);case"ascii":return ft(this,r,t);case"latin1":case"binary":return ht(this,r,t);case"base64":return at(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(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?mr(this,0,r):tt.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=b.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};hr&&(a.prototype[hr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(d(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,c=Math.min(u,f),h=this.slice(i,o),l=r.slice(t,n),p=0;p<c;++p)if(h[p]!==l[p]){u=h[p],f=l[p];break}return u<f?-1:f<u?1:0};function wr(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,er(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 c(F,R){return o===1?F[R]:F.readUInt16BE(R*o)}var h;if(i){var l=-1;for(h=t;h<u;h++)if(c(e,h)===c(r,l===-1?0:h-l)){if(l===-1&&(l=h),h-l+1===f)return l*o}else l!==-1&&(h-=h-l),l=-1}else for(t+f>u&&(t=u-f),h=t;h>=0;h--){for(var p=!0,g=0;g<f;g++)if(c(e,h+g)!==c(r,g)){p=!1;break}if(p)return h}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return wr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return wr(this,r,t,n,!1)};function et(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(er(f))return u;e[t+u]=f}return u}function nt(e,r,t,n){return G(j(r,e.length-t),e,t,n)}function it(e,r,t,n){return G(xt(r),e,t,n)}function ot(e,r,t,n){return G(Fr(r),e,t,n)}function ut(e,r,t,n){return G(wt(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 et(this,r,t,n);case"utf8":case"utf-8":return nt(this,r,t,n);case"ascii":case"latin1":case"binary":return it(this,r,t,n);case"base64":return ot(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(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 at(e,r,t){return r===0&&t===e.length?z.fromByteArray(e):z.fromByteArray(e.slice(r,t))}function mr(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 c,h,l,p;switch(f){case 1:o<128&&(u=o);break;case 2:c=e[i+1],(c&192)===128&&(p=(o&31)<<6|c&63,p>127&&(u=p));break;case 3:c=e[i+1],h=e[i+2],(c&192)===128&&(h&192)===128&&(p=(o&15)<<12|(c&63)<<6|h&63,p>2047&&(p<55296||p>57343)&&(u=p));break;case 4:c=e[i+1],h=e[i+2],l=e[i+3],(c&192)===128&&(h&192)===128&&(l&192)===128&&(p=(o&15)<<18|(c&63)<<12|(h&63)<<6|l&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 ct(n)}var sr=4096;function ct(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 ft(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 ht(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 pt(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+=mt[e[o]];return i}function st(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 m(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||m(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||m(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||m(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||m(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||m(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||m(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||m(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||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||m(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||m(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||m(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||m(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||m(r,4,this.length),k.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||m(r,4,this.length),k.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||m(r,8,this.length),k.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||m(r,8,this.length),k.read(this,r,!1,52,8)};function T(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;T(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;T(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||T(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||T(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||T(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||T(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||T(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);T(this,r,t,n,o-1,-o)}var u=0,f=1,c=0;for(this[t]=r&255;++u<n&&(f*=256);)r<0&&c===0&&this[t+u-1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&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);T(this,r,t,n,o-1,-o)}var u=n-1,f=1,c=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&c===0&&this[t+u+1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||T(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||T(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||T(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||T(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||T(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 Er(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 gr(e,r,t,n,i){return r=+r,t=t>>>0,i||Er(e,r,t,4,34028234663852886e22,-34028234663852886e22),k.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return gr(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return gr(this,r,t,!1,n)};function Tr(e,r,t,n,i){return r=+r,t=t>>>0,i||Er(e,r,t,8,17976931348623157e292,-17976931348623157e292),k.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return Tr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return Tr(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),c=f.length;if(c===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=f[u%c]}return this};var lt=/[^+/0-9A-Za-z-_]/g;function yt(e){if(e=e.split("=")[0],e=e.trim().replace(lt,""),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 xt(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function wt(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(yt(e))}function G(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 d(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function er(e){return e!==e}var mt=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 Nr=W((Lt,vr)=>{s();var y=vr.exports={},A,v;function nr(){throw new Error("setTimeout has not been defined")}function ir(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?A=setTimeout:A=nr}catch(e){A=nr}try{typeof clearTimeout=="function"?v=clearTimeout:v=ir}catch(e){v=ir}})();function Ir(e){if(A===setTimeout)return setTimeout(e,0);if((A===nr||!A)&&setTimeout)return A=setTimeout,setTimeout(e,0);try{return A(e,0)}catch(r){try{return A.call(null,e,0)}catch(t){return A.call(this,e,0)}}}function Et(e){if(v===clearTimeout)return clearTimeout(e);if((v===ir||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var S=[],M=!1,L,Y=-1;function gt(){!M||!L||(M=!1,L.length?S=L.concat(S):Y=-1,S.length&&dr())}function dr(){if(!M){var e=Ir(gt);M=!0;for(var r=S.length;r;){for(L=S,S=[];++Y<r;)L&&L[Y].run();Y=-1,r=S.length}L=null,M=!1,Et(e)}}y.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];S.push(new Ar(e,r)),S.length===1&&!M&&Ir(dr)};function Ar(e,r){this.fun=e,this.array=r}Ar.prototype.run=function(){this.fun.apply(null,this.array)};y.title="browser";y.browser=!0;y.env={};y.argv=[];y.version="";y.versions={};function C(){}y.on=C;y.addListener=C;y.once=C;y.off=C;y.removeListener=C;y.removeAllListeners=C;y.emit=C;y.prependListener=C;y.prependOnceListener=C;y.listeners=function(e){return[]};y.binding=function(e){throw new Error("process.binding is not supported")};y.cwd=function(){return"/"};y.chdir=function(e){throw new Error("process.chdir is not supported")};y.umask=function(){return 0}});var x,w,Ot,s=Pr(()=>{x=J(Br()),w=J(Nr()),Ot=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 Ut={};Hr(Ut,{decodeNativeAuthToken:()=>Nt,encodeValue:()=>Ft,getLatestBlockHash:()=>At});module.exports=Wr(Ut);s();s();var Tt=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),Ft=e=>Tt(x.Buffer.from(e,"utf8").toString("base64"));s();var Dr=J(require("axios"));s();var Ur="blocks";s();s();s();function Sr(e){return N(this,null,function*(){return yield new Promise(r=>{setTimeout(()=>r(),e)})})}s();var Cr=(e,r,t,n=0)=>N(void 0,null,function*(){try{return yield e(...t)}catch(i){return n<r.retries?((r==null?void 0:r.delay)!=null&&(yield Sr(r.delay)),yield Cr(e,r,t,n+1)):null}}),_r=(e,r={retries:5,delay:500})=>(...t)=>N(void 0,null,function*(){return yield Cr(e,r,t)});var Bt=4,It=3e4,V={current:null},O={current:null},dt=_r((e,r)=>N(void 0,null,function*(){let{data:t}=yield Dr.default.get(`${e}/${Ur}?from=${Bt}&size=1&fields=hash,timestamp${r?"&shard="+r:""}`),[n]=t;return n}));function At(e,r){return N(this,null,function*(){if(e==null)throw new Error("missing api url");if(V.current!=null&&Date.now()<V.current.timestamp*1e3+It)return V.current;if(O.current!=null)return yield O.current;O.current=dt(e,r);try{let t=yield O.current;if(t==null)throw O.current=null,new Error("could not get block hash");return V.current={hash:t.hash,timestamp:t.timestamp},O.current=null,t}catch(t){return O.current=null,null}})}s();s();s();function P(e){return atob(e)}s();s();s();function vt(e){return Object.prototype.toString.call(e)==="[object String]"}var Nt=e=>{if(!e||!vt(e))return null;try{let[r,t,n]=e.split("."),i=P(r),o=P(t),[u,f,c,h]=o.split("."),l=JSON.parse(P(h)),p=P(u),g={ttl:Number(c),address:i,extraInfo:l,host:p,signature:n,blockHash:f,body:o};return h==="e30"&&delete g.extraInfo,g}catch(r){return null}};0&&(module.exports={decodeNativeAuthToken,encodeValue,getLatestBlockHash});
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
@@ -1,4 +1,4 @@
1
- "use strict";var Yr=Object.create;var H=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var Jr=Object.getOwnPropertyNames,pr=Object.getOwnPropertySymbols,Xr=Object.getPrototypeOf,hr=Object.prototype.hasOwnProperty,Qr=Object.prototype.propertyIsEnumerable;var cr=(e,r,t)=>r in e?H(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,J=(e,r)=>{for(var t in r||(r={}))hr.call(r,t)&&cr(e,t,r[t]);if(pr)for(var t of pr(r))Qr.call(r,t)&&cr(e,t,r[t]);return e};var Zr=(e,r)=>()=>(e&&(r=e(e=0)),r);var G=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),jr=(e,r)=>{for(var t in r)H(e,t,{get:r[t],enumerable:!0})},fr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Jr(r))!hr.call(e,i)&&i!==t&&H(e,i,{get:()=>r[i],enumerable:!(n=zr(r,i))||n.enumerable});return e};var X=(e,r,t)=>(t=e!=null?Yr(Xr(e)):{},fr(r||!e||!e.__esModule?H(t,"default",{value:e,enumerable:!0}):t,e)),rt=e=>fr(H({},"__esModule",{value:!0}),e);var F=(e,r,t)=>new Promise((n,i)=>{var o=p=>{try{s(t.next(p))}catch(h){i(h)}},u=p=>{try{s(t.throw(p))}catch(h){i(h)}},s=p=>p.done?n(p.value):Promise.resolve(p.value).then(o,u);s((t=t.apply(e,r)).next())});var yr=G(K=>{"use strict";c();K.byteLength=et;K.toByteArray=it;K.fromByteArray=at;var B=[],A=[],tt=typeof Uint8Array!="undefined"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(_=0,lr=Q.length;_<lr;++_)B[_]=Q[_],A[Q.charCodeAt(_)]=_;var _,lr;A["-".charCodeAt(0)]=62;A["_".charCodeAt(0)]=63;function xr(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 et(e){var r=xr(e),t=r[0],n=r[1];return(t+n)*3/4-n}function nt(e,r,t){return(r+t)*3/4-t}function it(e){var r,t=xr(e),n=t[0],i=t[1],o=new tt(nt(e,n,i)),u=0,s=i>0?n-4:n,p;for(p=0;p<s;p+=4)r=A[e.charCodeAt(p)]<<18|A[e.charCodeAt(p+1)]<<12|A[e.charCodeAt(p+2)]<<6|A[e.charCodeAt(p+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=A[e.charCodeAt(p)]<<2|A[e.charCodeAt(p+1)]>>4,o[u++]=r&255),i===1&&(r=A[e.charCodeAt(p)]<<10|A[e.charCodeAt(p+1)]<<4|A[e.charCodeAt(p+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function ot(e){return B[e>>18&63]+B[e>>12&63]+B[e>>6&63]+B[e&63]}function ut(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(ot(n));return i.join("")}function at(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,s=t-n;u<s;u+=o)i.push(ut(e,u,u+o>s?s:u+o));return n===1?(r=e[t-1],i.push(B[r>>2]+B[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(B[r>>10]+B[r>>4&63]+B[r<<2&63]+"=")),i.join("")}});var mr=G(Z=>{c();Z.read=function(e,r,t,n,i){var o,u,s=i*8-n-1,p=(1<<s)-1,h=p>>1,l=-7,f=t?i-1:0,d=t?-1:1,g=e[r+f];for(f+=d,o=g&(1<<-l)-1,g>>=-l,l+=s;l>0;o=o*256+e[r+f],f+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+f],f+=d,l-=8);if(o===0)o=1-h;else{if(o===p)return u?NaN:(g?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(g?-1:1)*u*Math.pow(2,o-n)};Z.write=function(e,r,t,n,i,o){var u,s,p,h=o*8-i-1,l=(1<<h)-1,f=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:o-1,L=n?1:-1,qr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-u))<1&&(u--,p*=2),u+f>=1?r+=d/p:r+=d*Math.pow(2,1-f),r*p>=2&&(u++,p/=2),u+f>=l?(s=0,u=l):u+f>=1?(s=(r*p-1)*Math.pow(2,i),u=u+f):(s=r*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;e[t+g]=s&255,g+=L,s/=256,i-=8);for(u=u<<i|s,h+=i;h>0;e[t+g]=u&255,g+=L,u/=256,h-=8);e[t+g-L]|=qr*128}});var Sr=G(b=>{"use strict";c();var j=yr(),O=mr(),wr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;b.Buffer=a;b.SlowBuffer=lt;b.INSPECT_MAX_BYTES=50;var V=2147483647;b.kMaxLength=V;a.TYPED_ARRAY_SUPPORT=st();!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 st(){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 U(e){if(e>V)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 nr(e)}return Tr(e,r,t)}a.poolSize=8192;function Tr(e,r,t){if(typeof e=="string")return ct(e,r);if(ArrayBuffer.isView(e))return ht(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 tr(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=ft(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 Tr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function gr(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 pt(e,r,t){return gr(e),e<=0?U(e):r!==void 0?typeof t=="string"?U(e).fill(r,t):U(e).fill(r):U(e)}a.alloc=function(e,r,t){return pt(e,r,t)};function nr(e){return gr(e),U(e<0?0:ir(e)|0)}a.allocUnsafe=function(e){return nr(e)};a.allocUnsafeSlow=function(e){return nr(e)};function ct(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=Ar(e,r)|0,n=U(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function rr(e){for(var r=e.length<0?0:ir(e.length)|0,t=U(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function ht(e){if(v(e,Uint8Array)){var r=new Uint8Array(e);return tr(r.buffer,r.byteOffset,r.byteLength)}return rr(e)}function tr(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 ft(e){if(a.isBuffer(e)){var r=ir(e.length)|0,t=U(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||or(e.length)?U(0):rr(e);if(e.type==="Buffer"&&Array.isArray(e.data))return rr(e.data)}function ir(e){if(e>=V)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+V.toString(16)+" bytes");return e|0}function lt(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(v(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),v(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(v(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 Ar(e,r){if(a.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 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 er(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ur(e).length;default:if(i)return n?-1:er(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=Ar;function xt(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 Bt(this,r,t);case"utf8":case"utf-8":return Br(this,r,t);case"ascii":return At(this,r,t);case"latin1":case"binary":return Ft(this,r,t);case"base64":return Tt(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function k(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)k(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)k(this,t,t+3),k(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)k(this,t,t+7),k(this,t+1,t+6),k(this,t+2,t+5),k(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?Br(this,0,r):xt.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=b.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};wr&&(a.prototype[wr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(v(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,s=n-t,p=Math.min(u,s),h=this.slice(i,o),l=r.slice(t,n),f=0;f<p;++f)if(h[f]!==l[f]){u=h[f],s=l[f];break}return u<s?-1:s<u?1:0};function Fr(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,or(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:Er(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):Er(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Er(e,r,t,n,i){var o=1,u=e.length,s=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,s/=2,t/=2}function p(g,L){return o===1?g[L]:g.readUInt16BE(L*o)}var h;if(i){var l=-1;for(h=t;h<u;h++)if(p(e,h)===p(r,l===-1?0:h-l)){if(l===-1&&(l=h),h-l+1===s)return l*o}else l!==-1&&(h-=h-l),l=-1}else for(t+s>u&&(t=u-s),h=t;h>=0;h--){for(var f=!0,d=0;d<s;d++)if(p(e,h+d)!==p(r,d)){f=!1;break}if(f)return h}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return Fr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return Fr(this,r,t,n,!1)};function yt(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 s=parseInt(r.substr(u*2,2),16);if(or(s))return u;e[t+u]=s}return u}function mt(e,r,t,n){return q(er(r,e.length-t),e,t,n)}function wt(e,r,t,n){return q(Ut(r),e,t,n)}function Et(e,r,t,n){return q(Ur(r),e,t,n)}function dt(e,r,t,n){return q(St(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 yt(this,r,t,n);case"utf8":case"utf-8":return mt(this,r,t,n);case"ascii":case"latin1":case"binary":return wt(this,r,t,n);case"base64":return Et(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(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?j.fromByteArray(e):j.fromByteArray(e.slice(r,t))}function Br(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=t){var p,h,l,f;switch(s){case 1:o<128&&(u=o);break;case 2:p=e[i+1],(p&192)===128&&(f=(o&31)<<6|p&63,f>127&&(u=f));break;case 3:p=e[i+1],h=e[i+2],(p&192)===128&&(h&192)===128&&(f=(o&15)<<12|(p&63)<<6|h&63,f>2047&&(f<55296||f>57343)&&(u=f));break;case 4:p=e[i+1],h=e[i+2],l=e[i+3],(p&192)===128&&(h&192)===128&&(l&192)===128&&(f=(o&15)<<18|(p&63)<<12|(h&63)<<6|l&63,f>65535&&f<1114112&&(u=f))}}u===null?(u=65533,s=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=s}return gt(n)}var dr=4096;function gt(e){var r=e.length;if(r<=dr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=dr));return t}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]&127);return n}function Ft(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 Bt(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 vt(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 E(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||E(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||E(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||E(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,4,this.length),O.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||E(r,4,this.length),O.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||E(r,8,this.length),O.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||E(r,8,this.length),O.read(this,r,!1,52,8)};function T(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;T(this,r,t,n,o,0)}var u=1,s=0;for(this[t]=r&255;++s<n&&(u*=256);)this[t+s]=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;T(this,r,t,n,o,0)}var u=n-1,s=1;for(this[t+u]=r&255;--u>=0&&(s*=256);)this[t+u]=r/s&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||T(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||T(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||T(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||T(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||T(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);T(this,r,t,n,o-1,-o)}var u=0,s=1,p=0;for(this[t]=r&255;++u<n&&(s*=256);)r<0&&p===0&&this[t+u-1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&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);T(this,r,t,n,o-1,-o)}var u=n-1,s=1,p=0;for(this[t+u]=r&255;--u>=0&&(s*=256);)r<0&&p===0&&this[t+u+1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||T(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||T(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||T(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||T(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||T(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 vr(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 Ir(e,r,t,n,i){return r=+r,t=t>>>0,i||vr(e,r,t,4,34028234663852886e22,-34028234663852886e22),O.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return Ir(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return Ir(this,r,t,!1,n)};function Nr(e,r,t,n,i){return r=+r,t=t>>>0,i||vr(e,r,t,8,17976931348623157e292,-17976931348623157e292),O.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return Nr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return Nr(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 s=a.isBuffer(r)?r:a.from(r,i),p=s.length;if(p===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=s[u%p]}return this};var It=/[^+/0-9A-Za-z-_]/g;function Nt(e){if(e=e.split("=")[0],e=e.trim().replace(It,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function er(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 Ut(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function St(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 Ur(e){return j.toByteArray(Nt(e))}function q(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 v(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function or(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 Lr=G((Gt,Dr)=>{c();var w=Dr.exports={},I,N;function ur(){throw new Error("setTimeout has not been defined")}function ar(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?I=setTimeout:I=ur}catch(e){I=ur}try{typeof clearTimeout=="function"?N=clearTimeout:N=ar}catch(e){N=ar}})();function Cr(e){if(I===setTimeout)return setTimeout(e,0);if((I===ur||!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 _t(e){if(N===clearTimeout)return clearTimeout(e);if((N===ar||!N)&&clearTimeout)return N=clearTimeout,clearTimeout(e);try{return N(e)}catch(r){try{return N.call(null,e)}catch(t){return N.call(this,e)}}}var S=[],R=!1,D,Y=-1;function kt(){!R||!D||(R=!1,D.length?S=D.concat(S):Y=-1,S.length&&_r())}function _r(){if(!R){var e=Cr(kt);R=!0;for(var r=S.length;r;){for(D=S,S=[];++Y<r;)D&&D[Y].run();Y=-1,r=S.length}D=null,R=!1,_t(e)}}w.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];S.push(new kr(e,r)),S.length===1&&!R&&Cr(_r)};function kr(e,r){this.fun=e,this.array=r}kr.prototype.run=function(){this.fun.apply(null,this.array)};w.title="browser";w.browser=!0;w.env={};w.argv=[];w.version="";w.versions={};function C(){}w.on=C;w.addListener=C;w.once=C;w.off=C;w.removeListener=C;w.removeAllListeners=C;w.emit=C;w.prependListener=C;w.prependOnceListener=C;w.listeners=function(e){return[]};w.binding=function(e){throw new Error("process.binding is not supported")};w.cwd=function(){return"/"};w.chdir=function(e){throw new Error("process.chdir is not supported")};w.umask=function(){return 0}});var x,y,Kt,c=Zr(()=>{x=X(Sr()),y=X(Lr()),Kt=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 Mt={};jr(Mt,{nativeAuth:()=>Rt});module.exports=rt(Mt);c();c();c();c();var Dt=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),M=e=>Dt(x.Buffer.from(e,"utf8").toString("base64"));c();var Pr=X(require("axios"));c();var Or="blocks";c();c();c();function br(e){return F(this,null,function*(){return yield new Promise(r=>{setTimeout(()=>r(),e)})})}c();var Rr=(e,r,t,n=0)=>F(void 0,null,function*(){try{return yield e(...t)}catch(i){return n<r.retries?((r==null?void 0:r.delay)!=null&&(yield br(r.delay)),yield Rr(e,r,t,n+1)):null}}),Mr=(e,r={retries:5,delay:500})=>(...t)=>F(void 0,null,function*(){return yield Rr(e,r,t)});var Lt=3e4,z={current:null},P={current:null},Ot=Mr((e,r)=>F(void 0,null,function*(){let{data:t}=yield Pr.default.get(`${e}/${Or}?from=3&size=1&fields=hash,timestamp${r?"&shard="+r:""}`),[n]=t;return n}));function Hr(e,r){return F(this,null,function*(){if(e==null)throw new Error("missing api url");if(z.current!=null&&z.current.timestamp-Date.now()>0)return z.current;if(P.current!=null)return yield P.current;P.current=Ot(e,r);let t=yield P.current;if(t==null)throw P.current,new Error("could not get block hash");return z.current={hash:t.hash,timestamp:t.timestamp*1e3+Lt},P.current=null,t})}c();c();c();function W(e){return atob(e)}c();c();c();function bt(e){return Object.prototype.toString.call(e)==="[object String]"}var Wr=e=>{if(!e||!bt(e))return null;try{let[r,t,n]=e.split("."),i=W(r),o=W(t),[u,s,p,h]=o.split("."),l=JSON.parse(W(h)),f=W(u),d={ttl:Number(p),address:i,extraInfo:l,host:f,signature:n,blockHash:s,body:o};return h==="e30"&&delete d.extraInfo,d}catch(r){return null}};c();c();c();var $r=()=>Date.now()/1e3;var Gr=e=>{let r=Wr(e);if(!r)return{isExpired:!1};let t=$r(),{ttl:n,extraInfo:i}=r,o=i.timestamp;if(!o)return{isExpired:!1};let u=o+n,s=t>u,p=u-t;return{isExpired:s,expiresAt:u,secondsUntilExpires:p}};c();var Kr,$={hostname:typeof window!="undefined"?(Kr=window==null?void 0:window.location)==null?void 0:Kr.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},sr=e=>{var t,n,i,o,u;return e===!0?$:{hostname:(t=e==null?void 0:e.hostname)!=null?t:$.hostname,blockHashShard:(n=e==null?void 0:e.blockHashShard)!=null?n:null,expirySeconds:(i=e==null?void 0:e.expirySeconds)!=null?i:$.expirySeconds,apiAddress:(o=e==null?void 0:e.apiAddress)!=null?o:$.apiAddress,tokenExpirationToastWarningSeconds:(u=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?u:$.tokenExpirationToastWarningSeconds}};c();var Vr=({address:e,token:r,signature:t})=>{let n=M(e),i=M(r);return`${n}.${i}.${t}`};var Rt=e=>{let{hostname:r,apiAddress:t,expirySeconds:n,blockHashShard:i}=sr(e);return{getNativeAuthConfig:sr,initialize:(...p)=>F(void 0,[...p],function*(u={},s){if(!t||!r)return"";let{hash:h,timestamp:l}=s!=null?s:yield Hr(t,i),f=M(JSON.stringify(J(J({},u),l?{timestamp:l}:{})));return`${M(r)}.${h}.${n}.${f}`}),getToken:Vr,getTokenExpiration:Gr}};0&&(module.exports={nativeAuth});
1
+ "use strict";var Yr=Object.create;var H=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var Jr=Object.getOwnPropertyNames,pr=Object.getOwnPropertySymbols,Xr=Object.getPrototypeOf,hr=Object.prototype.hasOwnProperty,Qr=Object.prototype.propertyIsEnumerable;var cr=(e,r,t)=>r in e?H(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,J=(e,r)=>{for(var t in r||(r={}))hr.call(r,t)&&cr(e,t,r[t]);if(pr)for(var t of pr(r))Qr.call(r,t)&&cr(e,t,r[t]);return e};var Zr=(e,r)=>()=>(e&&(r=e(e=0)),r);var G=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),jr=(e,r)=>{for(var t in r)H(e,t,{get:r[t],enumerable:!0})},fr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Jr(r))!hr.call(e,i)&&i!==t&&H(e,i,{get:()=>r[i],enumerable:!(n=zr(r,i))||n.enumerable});return e};var X=(e,r,t)=>(t=e!=null?Yr(Xr(e)):{},fr(r||!e||!e.__esModule?H(t,"default",{value:e,enumerable:!0}):t,e)),rt=e=>fr(H({},"__esModule",{value:!0}),e);var F=(e,r,t)=>new Promise((n,i)=>{var o=p=>{try{s(t.next(p))}catch(h){i(h)}},u=p=>{try{s(t.throw(p))}catch(h){i(h)}},s=p=>p.done?n(p.value):Promise.resolve(p.value).then(o,u);s((t=t.apply(e,r)).next())});var yr=G(K=>{"use strict";c();K.byteLength=et;K.toByteArray=it;K.fromByteArray=at;var B=[],A=[],tt=typeof Uint8Array!="undefined"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(_=0,lr=Q.length;_<lr;++_)B[_]=Q[_],A[Q.charCodeAt(_)]=_;var _,lr;A["-".charCodeAt(0)]=62;A["_".charCodeAt(0)]=63;function xr(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 et(e){var r=xr(e),t=r[0],n=r[1];return(t+n)*3/4-n}function nt(e,r,t){return(r+t)*3/4-t}function it(e){var r,t=xr(e),n=t[0],i=t[1],o=new tt(nt(e,n,i)),u=0,s=i>0?n-4:n,p;for(p=0;p<s;p+=4)r=A[e.charCodeAt(p)]<<18|A[e.charCodeAt(p+1)]<<12|A[e.charCodeAt(p+2)]<<6|A[e.charCodeAt(p+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=A[e.charCodeAt(p)]<<2|A[e.charCodeAt(p+1)]>>4,o[u++]=r&255),i===1&&(r=A[e.charCodeAt(p)]<<10|A[e.charCodeAt(p+1)]<<4|A[e.charCodeAt(p+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function ot(e){return B[e>>18&63]+B[e>>12&63]+B[e>>6&63]+B[e&63]}function ut(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(ot(n));return i.join("")}function at(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,s=t-n;u<s;u+=o)i.push(ut(e,u,u+o>s?s:u+o));return n===1?(r=e[t-1],i.push(B[r>>2]+B[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(B[r>>10]+B[r>>4&63]+B[r<<2&63]+"=")),i.join("")}});var mr=G(Z=>{c();Z.read=function(e,r,t,n,i){var o,u,s=i*8-n-1,p=(1<<s)-1,h=p>>1,l=-7,f=t?i-1:0,d=t?-1:1,T=e[r+f];for(f+=d,o=T&(1<<-l)-1,T>>=-l,l+=s;l>0;o=o*256+e[r+f],f+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+f],f+=d,l-=8);if(o===0)o=1-h;else{if(o===p)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(T?-1:1)*u*Math.pow(2,o-n)};Z.write=function(e,r,t,n,i,o){var u,s,p,h=o*8-i-1,l=(1<<h)-1,f=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,O=n?1:-1,qr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-u))<1&&(u--,p*=2),u+f>=1?r+=d/p:r+=d*Math.pow(2,1-f),r*p>=2&&(u++,p/=2),u+f>=l?(s=0,u=l):u+f>=1?(s=(r*p-1)*Math.pow(2,i),u=u+f):(s=r*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;e[t+T]=s&255,T+=O,s/=256,i-=8);for(u=u<<i|s,h+=i;h>0;e[t+T]=u&255,T+=O,u/=256,h-=8);e[t+T-O]|=qr*128}});var Sr=G(R=>{"use strict";c();var j=yr(),b=mr(),wr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=a;R.SlowBuffer=lt;R.INSPECT_MAX_BYTES=50;var V=2147483647;R.kMaxLength=V;a.TYPED_ARRAY_SUPPORT=st();!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 st(){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 U(e){if(e>V)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 nr(e)}return Tr(e,r,t)}a.poolSize=8192;function Tr(e,r,t){if(typeof e=="string")return ct(e,r);if(ArrayBuffer.isView(e))return ht(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 tr(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=ft(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 Tr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function gr(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 pt(e,r,t){return gr(e),e<=0?U(e):r!==void 0?typeof t=="string"?U(e).fill(r,t):U(e).fill(r):U(e)}a.alloc=function(e,r,t){return pt(e,r,t)};function nr(e){return gr(e),U(e<0?0:ir(e)|0)}a.allocUnsafe=function(e){return nr(e)};a.allocUnsafeSlow=function(e){return nr(e)};function ct(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=Ar(e,r)|0,n=U(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function rr(e){for(var r=e.length<0?0:ir(e.length)|0,t=U(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function ht(e){if(v(e,Uint8Array)){var r=new Uint8Array(e);return tr(r.buffer,r.byteOffset,r.byteLength)}return rr(e)}function tr(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 ft(e){if(a.isBuffer(e)){var r=ir(e.length)|0,t=U(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||or(e.length)?U(0):rr(e);if(e.type==="Buffer"&&Array.isArray(e.data))return rr(e.data)}function ir(e){if(e>=V)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+V.toString(16)+" bytes");return e|0}function lt(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(v(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),v(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(v(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 Ar(e,r){if(a.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 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 er(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ur(e).length;default:if(i)return n?-1:er(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=Ar;function xt(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 Bt(this,r,t);case"utf8":case"utf-8":return Br(this,r,t);case"ascii":return At(this,r,t);case"latin1":case"binary":return Ft(this,r,t);case"base64":return Tt(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function k(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)k(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)k(this,t,t+3),k(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)k(this,t,t+7),k(this,t+1,t+6),k(this,t+2,t+5),k(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?Br(this,0,r):xt.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+">"};wr&&(a.prototype[wr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(v(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,s=n-t,p=Math.min(u,s),h=this.slice(i,o),l=r.slice(t,n),f=0;f<p;++f)if(h[f]!==l[f]){u=h[f],s=l[f];break}return u<s?-1:s<u?1:0};function Fr(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,or(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:Er(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):Er(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Er(e,r,t,n,i){var o=1,u=e.length,s=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,s/=2,t/=2}function p(T,O){return o===1?T[O]:T.readUInt16BE(O*o)}var h;if(i){var l=-1;for(h=t;h<u;h++)if(p(e,h)===p(r,l===-1?0:h-l)){if(l===-1&&(l=h),h-l+1===s)return l*o}else l!==-1&&(h-=h-l),l=-1}else for(t+s>u&&(t=u-s),h=t;h>=0;h--){for(var f=!0,d=0;d<s;d++)if(p(e,h+d)!==p(r,d)){f=!1;break}if(f)return h}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return Fr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return Fr(this,r,t,n,!1)};function yt(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 s=parseInt(r.substr(u*2,2),16);if(or(s))return u;e[t+u]=s}return u}function mt(e,r,t,n){return q(er(r,e.length-t),e,t,n)}function wt(e,r,t,n){return q(Ut(r),e,t,n)}function Et(e,r,t,n){return q(Ur(r),e,t,n)}function dt(e,r,t,n){return q(St(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 yt(this,r,t,n);case"utf8":case"utf-8":return mt(this,r,t,n);case"ascii":case"latin1":case"binary":return wt(this,r,t,n);case"base64":return Et(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(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?j.fromByteArray(e):j.fromByteArray(e.slice(r,t))}function Br(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=t){var p,h,l,f;switch(s){case 1:o<128&&(u=o);break;case 2:p=e[i+1],(p&192)===128&&(f=(o&31)<<6|p&63,f>127&&(u=f));break;case 3:p=e[i+1],h=e[i+2],(p&192)===128&&(h&192)===128&&(f=(o&15)<<12|(p&63)<<6|h&63,f>2047&&(f<55296||f>57343)&&(u=f));break;case 4:p=e[i+1],h=e[i+2],l=e[i+3],(p&192)===128&&(h&192)===128&&(l&192)===128&&(f=(o&15)<<18|(p&63)<<12|(h&63)<<6|l&63,f>65535&&f<1114112&&(u=f))}}u===null?(u=65533,s=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=s}return gt(n)}var dr=4096;function gt(e){var r=e.length;if(r<=dr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=dr));return t}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]&127);return n}function Ft(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 Bt(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 vt(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 E(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||E(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||E(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||E(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,4,this.length),b.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||E(r,4,this.length),b.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||E(r,8,this.length),b.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||E(r,8,this.length),b.read(this,r,!1,52,8)};function g(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;g(this,r,t,n,o,0)}var u=1,s=0;for(this[t]=r&255;++s<n&&(u*=256);)this[t+s]=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;g(this,r,t,n,o,0)}var u=n-1,s=1;for(this[t+u]=r&255;--u>=0&&(s*=256);)this[t+u]=r/s&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(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||g(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||g(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||g(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||g(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);g(this,r,t,n,o-1,-o)}var u=0,s=1,p=0;for(this[t]=r&255;++u<n&&(s*=256);)r<0&&p===0&&this[t+u-1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&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);g(this,r,t,n,o-1,-o)}var u=n-1,s=1,p=0;for(this[t+u]=r&255;--u>=0&&(s*=256);)r<0&&p===0&&this[t+u+1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(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||g(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||g(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||g(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||g(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 vr(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 Ir(e,r,t,n,i){return r=+r,t=t>>>0,i||vr(e,r,t,4,34028234663852886e22,-34028234663852886e22),b.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return Ir(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return Ir(this,r,t,!1,n)};function Nr(e,r,t,n,i){return r=+r,t=t>>>0,i||vr(e,r,t,8,17976931348623157e292,-17976931348623157e292),b.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return Nr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return Nr(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 s=a.isBuffer(r)?r:a.from(r,i),p=s.length;if(p===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=s[u%p]}return this};var It=/[^+/0-9A-Za-z-_]/g;function Nt(e){if(e=e.split("=")[0],e=e.trim().replace(It,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function er(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 Ut(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function St(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 Ur(e){return j.toByteArray(Nt(e))}function q(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 v(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function or(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 Lr=G((Kt,Dr)=>{c();var w=Dr.exports={},I,N;function ur(){throw new Error("setTimeout has not been defined")}function ar(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?I=setTimeout:I=ur}catch(e){I=ur}try{typeof clearTimeout=="function"?N=clearTimeout:N=ar}catch(e){N=ar}})();function Cr(e){if(I===setTimeout)return setTimeout(e,0);if((I===ur||!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 _t(e){if(N===clearTimeout)return clearTimeout(e);if((N===ar||!N)&&clearTimeout)return N=clearTimeout,clearTimeout(e);try{return N(e)}catch(r){try{return N.call(null,e)}catch(t){return N.call(this,e)}}}var S=[],M=!1,D,Y=-1;function kt(){!M||!D||(M=!1,D.length?S=D.concat(S):Y=-1,S.length&&_r())}function _r(){if(!M){var e=Cr(kt);M=!0;for(var r=S.length;r;){for(D=S,S=[];++Y<r;)D&&D[Y].run();Y=-1,r=S.length}D=null,M=!1,_t(e)}}w.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];S.push(new kr(e,r)),S.length===1&&!M&&Cr(_r)};function kr(e,r){this.fun=e,this.array=r}kr.prototype.run=function(){this.fun.apply(null,this.array)};w.title="browser";w.browser=!0;w.env={};w.argv=[];w.version="";w.versions={};function C(){}w.on=C;w.addListener=C;w.once=C;w.off=C;w.removeListener=C;w.removeAllListeners=C;w.emit=C;w.prependListener=C;w.prependOnceListener=C;w.listeners=function(e){return[]};w.binding=function(e){throw new Error("process.binding is not supported")};w.cwd=function(){return"/"};w.chdir=function(e){throw new Error("process.chdir is not supported")};w.umask=function(){return 0}});var x,y,Vt,c=Zr(()=>{x=X(Sr()),y=X(Lr()),Vt=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 Pt={};jr(Pt,{nativeAuth:()=>Mt});module.exports=rt(Pt);c();c();c();c();var Dt=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),P=e=>Dt(x.Buffer.from(e,"utf8").toString("base64"));c();var Pr=X(require("axios"));c();var Or="blocks";c();c();c();function br(e){return F(this,null,function*(){return yield new Promise(r=>{setTimeout(()=>r(),e)})})}c();var Rr=(e,r,t,n=0)=>F(void 0,null,function*(){try{return yield e(...t)}catch(i){return n<r.retries?((r==null?void 0:r.delay)!=null&&(yield br(r.delay)),yield Rr(e,r,t,n+1)):null}}),Mr=(e,r={retries:5,delay:500})=>(...t)=>F(void 0,null,function*(){return yield Rr(e,r,t)});var Lt=4,Ot=3e4,z={current:null},L={current:null},bt=Mr((e,r)=>F(void 0,null,function*(){let{data:t}=yield Pr.default.get(`${e}/${Or}?from=${Lt}&size=1&fields=hash,timestamp${r?"&shard="+r:""}`),[n]=t;return n}));function Hr(e,r){return F(this,null,function*(){if(e==null)throw new Error("missing api url");if(z.current!=null&&Date.now()<z.current.timestamp*1e3+Ot)return z.current;if(L.current!=null)return yield L.current;L.current=bt(e,r);try{let t=yield L.current;if(t==null)throw L.current=null,new Error("could not get block hash");return z.current={hash:t.hash,timestamp:t.timestamp},L.current=null,t}catch(t){return L.current=null,null}})}c();c();c();function W(e){return atob(e)}c();c();c();function Rt(e){return Object.prototype.toString.call(e)==="[object String]"}var Wr=e=>{if(!e||!Rt(e))return null;try{let[r,t,n]=e.split("."),i=W(r),o=W(t),[u,s,p,h]=o.split("."),l=JSON.parse(W(h)),f=W(u),d={ttl:Number(p),address:i,extraInfo:l,host:f,signature:n,blockHash:s,body:o};return h==="e30"&&delete d.extraInfo,d}catch(r){return null}};c();c();c();var $r=()=>Date.now()/1e3;var Gr=e=>{let r=Wr(e);if(!r)return{isExpired:!1};let t=$r(),{ttl:n,extraInfo:i}=r,o=i.timestamp;if(!o)return{isExpired:!1};let u=o+n,s=t>u,p=u-t;return{isExpired:s,expiresAt:u,secondsUntilExpires:p}};c();var Kr,$={hostname:typeof window!="undefined"?(Kr=window==null?void 0:window.location)==null?void 0:Kr.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},sr=e=>{var t,n,i,o,u;return e===!0?$:{hostname:(t=e==null?void 0:e.hostname)!=null?t:$.hostname,blockHashShard:(n=e==null?void 0:e.blockHashShard)!=null?n:null,expirySeconds:(i=e==null?void 0:e.expirySeconds)!=null?i:$.expirySeconds,apiAddress:(o=e==null?void 0:e.apiAddress)!=null?o:$.apiAddress,tokenExpirationToastWarningSeconds:(u=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?u:$.tokenExpirationToastWarningSeconds}};c();var Vr=({address:e,token:r,signature:t})=>{let n=P(e),i=P(r);return`${n}.${i}.${t}`};var Mt=e=>{let{hostname:r,apiAddress:t,expirySeconds:n,blockHashShard:i}=sr(e);return{getNativeAuthConfig:sr,initialize:(...p)=>F(void 0,[...p],function*(u={},s){if(!t||!r)return"";let h=s!=null?s:yield Hr(t,i),{hash:l,timestamp:f}=h,d=P(JSON.stringify(J(J({},u),f?{timestamp:f}:{})));return`${P(r)}.${l}.${n}.${d}`}),getToken:Vr,getTokenExpiration:Gr}};0&&(module.exports={nativeAuth});
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 Lr=Object.getOwnPropertyDescriptor;var Or=Object.getOwnPropertyNames;var kr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty;var br=(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)M(e,t,{get:r[t],enumerable:!0})},nr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Or(r))!Rr.call(e,i)&&i!==t&&M(e,i,{get:()=>r[i],enumerable:!(n=Lr(r,i))||n.enumerable});return e};var G=(e,r,t)=>(t=e!=null?Dr(kr(e)):{},nr(r||!e||!e.__esModule?M(t,"default",{value:e,enumerable:!0}):t,e)),Pr=e=>nr(M({},"__esModule",{value:!0}),e);var C=(e,r,t)=>new Promise((n,i)=>{var o=c=>{try{f(t.next(c))}catch(h){i(h)}},u=c=>{try{f(t.throw(c))}catch(h){i(h)}},f=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,u);f((t=t.apply(e,r)).next())});var ur=P(H=>{"use strict";s();H.byteLength=Wr;H.toByteArray=qr;H.fromByteArray=Yr;var B=[],F=[],Hr=typeof Uint8Array!="undefined"?Uint8Array:Array,V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(_=0,ir=V.length;_<ir;++_)B[_]=V[_],F[V.charCodeAt(_)]=_;var _,ir;F["-".charCodeAt(0)]=62;F["_".charCodeAt(0)]=63;function or(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 Wr(e){var r=or(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Kr(e,r,t){return(r+t)*3/4-t}function qr(e){var r,t=or(e),n=t[0],i=t[1],o=new Hr(Kr(e,n,i)),u=0,f=i>0?n-4:n,c;for(c=0;c<f;c+=4)r=F[e.charCodeAt(c)]<<18|F[e.charCodeAt(c+1)]<<12|F[e.charCodeAt(c+2)]<<6|F[e.charCodeAt(c+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=F[e.charCodeAt(c)]<<2|F[e.charCodeAt(c+1)]>>4,o[u++]=r&255),i===1&&(r=F[e.charCodeAt(c)]<<10|F[e.charCodeAt(c+1)]<<4|F[e.charCodeAt(c+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Gr(e){return B[e>>18&63]+B[e>>12&63]+B[e>>6&63]+B[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(Gr(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(B[r>>2]+B[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(B[r>>10]+B[r>>4&63]+B[r<<2&63]+"=")),i.join("")}});var ar=P(Y=>{s();Y.read=function(e,r,t,n,i){var o,u,f=i*8-n-1,c=(1<<f)-1,h=c>>1,l=-7,p=t?i-1:0,d=t?-1:1,T=e[r+p];for(p+=d,o=T&(1<<-l)-1,T>>=-l,l+=f;l>0;o=o*256+e[r+p],p+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+p],p+=d,l-=8);if(o===0)o=1-h;else{if(o===c)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(T?-1:1)*u*Math.pow(2,o-n)};Y.write=function(e,r,t,n,i,o){var u,f,c,h=o*8-i-1,l=(1<<h)-1,p=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,O=n?1:-1,_r=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=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+p>=1?r+=d/c:r+=d*Math.pow(2,1-p),r*c>=2&&(u++,c/=2),u+p>=l?(f=0,u=l):u+p>=1?(f=(r*c-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+T]=f&255,T+=O,f/=256,i-=8);for(u=u<<i|f,h+=i;h>0;e[t+T]=u&255,T+=O,u/=256,h-=8);e[t+T-O]|=_r*128}});var Tr=P(R=>{"use strict";s();var $=ur(),k=ar(),cr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=a;R.SlowBuffer=Zr;R.INSPECT_MAX_BYTES=50;var W=2147483647;R.kMaxLength=W;a.TYPED_ARRAY_SUPPORT=$r();!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 $r(){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 N(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 hr(e,r,t)}a.poolSize=8192;function hr(e,r,t){if(typeof e=="string")return Xr(e,r);if(ArrayBuffer.isView(e))return zr(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(A(e,ArrayBuffer)||e&&A(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(A(e,SharedArrayBuffer)||e&&A(e.buffer,SharedArrayBuffer)))return X(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 hr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function pr(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 Jr(e,r,t){return pr(e),e<=0?N(e):r!==void 0?typeof t=="string"?N(e).fill(r,t):N(e).fill(r):N(e)}a.alloc=function(e,r,t){return Jr(e,r,t)};function Q(e){return pr(e),N(e<0?0:Z(e)|0)}a.allocUnsafe=function(e){return Q(e)};a.allocUnsafeSlow=function(e){return Q(e)};function Xr(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=lr(e,r)|0,n=N(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:Z(e.length)|0,t=N(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function zr(e){if(A(e,Uint8Array)){var r=new Uint8Array(e);return X(r.buffer,r.byteOffset,r.byteLength)}return J(e)}function X(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=Z(e.length)|0,t=N(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||j(e.length)?N(0):J(e);if(e.type==="Buffer"&&Array.isArray(e.data))return J(e.data)}function Z(e){if(e>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return e|0}function Zr(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(A(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),A(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(A(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 lr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||A(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 z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return gr(e).length;default:if(i)return n?-1:z(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=lr;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 ft(this,r,t);case"utf8":case"utf-8":return yr(this,r,t);case"ascii":return at(this,r,t);case"latin1":case"binary":return ct(this,r,t);case"base64":return ot(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(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?yr(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+">"};cr&&(a.prototype[cr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(A(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,c=Math.min(u,f),h=this.slice(i,o),l=r.slice(t,n),p=0;p<c;++p)if(h[p]!==l[p]){u=h[p],f=l[p];break}return u<f?-1:f<u?1:0};function xr(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,j(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:fr(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):fr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function fr(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 c(T,O){return o===1?T[O]:T.readUInt16BE(O*o)}var h;if(i){var l=-1;for(h=t;h<u;h++)if(c(e,h)===c(r,l===-1?0:h-l)){if(l===-1&&(l=h),h-l+1===f)return l*o}else l!==-1&&(h-=h-l),l=-1}else for(t+f>u&&(t=u-f),h=t;h>=0;h--){for(var p=!0,d=0;d<f;d++)if(c(e,h+d)!==c(r,d)){p=!1;break}if(p)return h}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return xr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return xr(this,r,t,n,!1)};function rt(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(j(f))return u;e[t+u]=f}return u}function tt(e,r,t,n){return K(z(r,e.length-t),e,t,n)}function et(e,r,t,n){return K(lt(r),e,t,n)}function nt(e,r,t,n){return K(gr(r),e,t,n)}function it(e,r,t,n){return K(xt(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 rt(this,r,t,n);case"utf8":case"utf-8":return tt(this,r,t,n);case"ascii":case"latin1":case"binary":return et(this,r,t,n);case"base64":return nt(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return it(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 ot(e,r,t){return r===0&&t===e.length?$.fromByteArray(e):$.fromByteArray(e.slice(r,t))}function yr(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 c,h,l,p;switch(f){case 1:o<128&&(u=o);break;case 2:c=e[i+1],(c&192)===128&&(p=(o&31)<<6|c&63,p>127&&(u=p));break;case 3:c=e[i+1],h=e[i+2],(c&192)===128&&(h&192)===128&&(p=(o&15)<<12|(c&63)<<6|h&63,p>2047&&(p<55296||p>57343)&&(u=p));break;case 4:c=e[i+1],h=e[i+2],l=e[i+3],(c&192)===128&&(h&192)===128&&(l&192)===128&&(p=(o&15)<<18|(c&63)<<12|(h&63)<<6|l&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 ut(n)}var sr=4096;function ut(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 at(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 ct(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 ft(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+=yt[e[o]];return i}function st(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 E(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||E(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||E(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||E(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,4,this.length),k.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||E(r,4,this.length),k.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||E(r,8,this.length),k.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||E(r,8,this.length),k.read(this,r,!1,52,8)};function g(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;g(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;g(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||g(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||g(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||g(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||g(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||g(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);g(this,r,t,n,o-1,-o)}var u=0,f=1,c=0;for(this[t]=r&255;++u<n&&(f*=256);)r<0&&c===0&&this[t+u-1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&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);g(this,r,t,n,o-1,-o)}var u=n-1,f=1,c=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&c===0&&this[t+u+1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(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||g(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||g(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||g(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||g(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 mr(e,r,t,n,i){return r=+r,t=t>>>0,i||wr(e,r,t,4,34028234663852886e22,-34028234663852886e22),k.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return mr(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return mr(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),k.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),c=f.length;if(c===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=f[u%c]}return this};var ht=/[^+/0-9A-Za-z-_]/g;function pt(e){if(e=e.split("=")[0],e=e.trim().replace(ht,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function z(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 lt(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function xt(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 gr(e){return $.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 A(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function j(e){return e!==e}var yt=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 Ir=P((It,Ar)=>{s();var x=Ar.exports={},I,v;function rr(){throw new Error("setTimeout has not been defined")}function tr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?I=setTimeout:I=rr}catch(e){I=rr}try{typeof clearTimeout=="function"?v=clearTimeout:v=tr}catch(e){v=tr}})();function Fr(e){if(I===setTimeout)return setTimeout(e,0);if((I===rr||!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 wt(e){if(v===clearTimeout)return clearTimeout(e);if((v===tr||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var U=[],b=!1,L,q=-1;function mt(){!b||!L||(b=!1,L.length?U=L.concat(U):q=-1,U.length&&dr())}function dr(){if(!b){var e=Fr(mt);b=!0;for(var r=U.length;r;){for(L=U,U=[];++q<r;)L&&L[q].run();q=-1,r=U.length}L=null,b=!1,wt(e)}}x.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];U.push(new Br(e,r)),U.length===1&&!b&&Fr(dr)};function Br(e,r){this.fun=e,this.array=r}Br.prototype.run=function(){this.fun.apply(null,this.array)};x.title="browser";x.browser=!0;x.env={};x.argv=[];x.version="";x.versions={};function S(){}x.on=S;x.addListener=S;x.once=S;x.off=S;x.removeListener=S;x.removeAllListeners=S;x.emit=S;x.prependListener=S;x.prependOnceListener=S;x.listeners=function(e){return[]};x.binding=function(e){throw new Error("process.binding is not supported")};x.cwd=function(){return"/"};x.chdir=function(e){throw new Error("process.chdir is not supported")};x.umask=function(){return 0}});var y,w,vt,s=br(()=>{y=G(Tr()),w=G(Ir()),vt=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 Tt={};Mr(Tt,{getToken:()=>gt});module.exports=Pr(Tt);s();s();s();var Et=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),er=e=>Et(y.Buffer.from(e,"utf8").toString("base64"));s();var Cr=G(require("axios"));s();var vr="blocks";s();s();s();function Nr(e){return C(this,null,function*(){return yield new Promise(r=>{setTimeout(()=>r(),e)})})}s();var Ur=(e,r,t,n=0)=>C(void 0,null,function*(){try{return yield e(...t)}catch(i){return n<r.retries?((r==null?void 0:r.delay)!=null&&(yield Nr(r.delay)),yield Ur(e,r,t,n+1)):null}}),Sr=(e,r={retries:5,delay:500})=>(...t)=>C(void 0,null,function*(){return yield Ur(e,r,t)});var Pt=Sr((e,r)=>C(void 0,null,function*(){let{data:t}=yield Cr.default.get(`${e}/${vr}?from=3&size=1&fields=hash,timestamp${r?"&shard="+r:""}`),[n]=t;return n}));s();s();s();s();s();s();var gt=({address:e,token:r,signature:t})=>{let n=er(e),i=er(r);return`${n}.${i}.${t}`};0&&(module.exports={getToken});
1
+ "use strict";var Dr=Object.create;var M=Object.defineProperty;var Lr=Object.getOwnPropertyDescriptor;var Or=Object.getOwnPropertyNames;var kr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty;var br=(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)M(e,t,{get:r[t],enumerable:!0})},nr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Or(r))!Rr.call(e,i)&&i!==t&&M(e,i,{get:()=>r[i],enumerable:!(n=Lr(r,i))||n.enumerable});return e};var q=(e,r,t)=>(t=e!=null?Dr(kr(e)):{},nr(r||!e||!e.__esModule?M(t,"default",{value:e,enumerable:!0}):t,e)),Pr=e=>nr(M({},"__esModule",{value:!0}),e);var C=(e,r,t)=>new Promise((n,i)=>{var o=c=>{try{f(t.next(c))}catch(h){i(h)}},u=c=>{try{f(t.throw(c))}catch(h){i(h)}},f=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,u);f((t=t.apply(e,r)).next())});var ur=P(H=>{"use strict";s();H.byteLength=Wr;H.toByteArray=$r;H.fromByteArray=Vr;var B=[],F=[],Hr=typeof Uint8Array!="undefined"?Uint8Array:Array,G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(_=0,ir=G.length;_<ir;++_)B[_]=G[_],F[G.charCodeAt(_)]=_;var _,ir;F["-".charCodeAt(0)]=62;F["_".charCodeAt(0)]=63;function or(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 Wr(e){var r=or(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Kr(e,r,t){return(r+t)*3/4-t}function $r(e){var r,t=or(e),n=t[0],i=t[1],o=new Hr(Kr(e,n,i)),u=0,f=i>0?n-4:n,c;for(c=0;c<f;c+=4)r=F[e.charCodeAt(c)]<<18|F[e.charCodeAt(c+1)]<<12|F[e.charCodeAt(c+2)]<<6|F[e.charCodeAt(c+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=F[e.charCodeAt(c)]<<2|F[e.charCodeAt(c+1)]>>4,o[u++]=r&255),i===1&&(r=F[e.charCodeAt(c)]<<10|F[e.charCodeAt(c+1)]<<4|F[e.charCodeAt(c+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function qr(e){return B[e>>18&63]+B[e>>12&63]+B[e>>6&63]+B[e&63]}function Gr(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(qr(n));return i.join("")}function Vr(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,f=t-n;u<f;u+=o)i.push(Gr(e,u,u+o>f?f:u+o));return n===1?(r=e[t-1],i.push(B[r>>2]+B[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(B[r>>10]+B[r>>4&63]+B[r<<2&63]+"=")),i.join("")}});var ar=P(V=>{s();V.read=function(e,r,t,n,i){var o,u,f=i*8-n-1,c=(1<<f)-1,h=c>>1,l=-7,p=t?i-1:0,d=t?-1:1,T=e[r+p];for(p+=d,o=T&(1<<-l)-1,T>>=-l,l+=f;l>0;o=o*256+e[r+p],p+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+p],p+=d,l-=8);if(o===0)o=1-h;else{if(o===c)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(T?-1:1)*u*Math.pow(2,o-n)};V.write=function(e,r,t,n,i,o){var u,f,c,h=o*8-i-1,l=(1<<h)-1,p=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,O=n?1:-1,_r=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=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+p>=1?r+=d/c:r+=d*Math.pow(2,1-p),r*c>=2&&(u++,c/=2),u+p>=l?(f=0,u=l):u+p>=1?(f=(r*c-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+T]=f&255,T+=O,f/=256,i-=8);for(u=u<<i|f,h+=i;h>0;e[t+T]=u&255,T+=O,u/=256,h-=8);e[t+T-O]|=_r*128}});var Tr=P(R=>{"use strict";s();var Y=ur(),k=ar(),cr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=a;R.SlowBuffer=Zr;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 N(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 hr(e,r,t)}a.poolSize=8192;function hr(e,r,t){if(typeof e=="string")return Xr(e,r);if(ArrayBuffer.isView(e))return zr(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(A(e,ArrayBuffer)||e&&A(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(A(e,SharedArrayBuffer)||e&&A(e.buffer,SharedArrayBuffer)))return X(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 hr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function pr(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 Jr(e,r,t){return pr(e),e<=0?N(e):r!==void 0?typeof t=="string"?N(e).fill(r,t):N(e).fill(r):N(e)}a.alloc=function(e,r,t){return Jr(e,r,t)};function Q(e){return pr(e),N(e<0?0:Z(e)|0)}a.allocUnsafe=function(e){return Q(e)};a.allocUnsafeSlow=function(e){return Q(e)};function Xr(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=lr(e,r)|0,n=N(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:Z(e.length)|0,t=N(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function zr(e){if(A(e,Uint8Array)){var r=new Uint8Array(e);return X(r.buffer,r.byteOffset,r.byteLength)}return J(e)}function X(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=Z(e.length)|0,t=N(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||j(e.length)?N(0):J(e);if(e.type==="Buffer"&&Array.isArray(e.data))return J(e.data)}function Z(e){if(e>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return e|0}function Zr(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(A(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),A(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(A(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 lr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||A(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 z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return gr(e).length;default:if(i)return n?-1:z(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=lr;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 ft(this,r,t);case"utf8":case"utf-8":return xr(this,r,t);case"ascii":return at(this,r,t);case"latin1":case"binary":return ct(this,r,t);case"base64":return ot(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(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+">"};cr&&(a.prototype[cr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(A(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,c=Math.min(u,f),h=this.slice(i,o),l=r.slice(t,n),p=0;p<c;++p)if(h[p]!==l[p]){u=h[p],f=l[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,j(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:fr(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):fr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function fr(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 c(T,O){return o===1?T[O]:T.readUInt16BE(O*o)}var h;if(i){var l=-1;for(h=t;h<u;h++)if(c(e,h)===c(r,l===-1?0:h-l)){if(l===-1&&(l=h),h-l+1===f)return l*o}else l!==-1&&(h-=h-l),l=-1}else for(t+f>u&&(t=u-f),h=t;h>=0;h--){for(var p=!0,d=0;d<f;d++)if(c(e,h+d)!==c(r,d)){p=!1;break}if(p)return h}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 rt(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(j(f))return u;e[t+u]=f}return u}function tt(e,r,t,n){return K(z(r,e.length-t),e,t,n)}function et(e,r,t,n){return K(lt(r),e,t,n)}function nt(e,r,t,n){return K(gr(r),e,t,n)}function it(e,r,t,n){return K(yt(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 rt(this,r,t,n);case"utf8":case"utf-8":return tt(this,r,t,n);case"ascii":case"latin1":case"binary":return et(this,r,t,n);case"base64":return nt(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return it(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 ot(e,r,t){return r===0&&t===e.length?Y.fromByteArray(e):Y.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 c,h,l,p;switch(f){case 1:o<128&&(u=o);break;case 2:c=e[i+1],(c&192)===128&&(p=(o&31)<<6|c&63,p>127&&(u=p));break;case 3:c=e[i+1],h=e[i+2],(c&192)===128&&(h&192)===128&&(p=(o&15)<<12|(c&63)<<6|h&63,p>2047&&(p<55296||p>57343)&&(u=p));break;case 4:c=e[i+1],h=e[i+2],l=e[i+3],(c&192)===128&&(h&192)===128&&(l&192)===128&&(p=(o&15)<<18|(c&63)<<12|(h&63)<<6|l&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 ut(n)}var sr=4096;function ut(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 at(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 ct(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 ft(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+=xt[e[o]];return i}function st(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 E(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||E(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||E(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||E(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||E(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||E(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||E(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||E(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||E(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||E(r,4,this.length),k.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||E(r,4,this.length),k.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||E(r,8,this.length),k.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||E(r,8,this.length),k.read(this,r,!1,52,8)};function g(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;g(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;g(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||g(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||g(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||g(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||g(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||g(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);g(this,r,t,n,o-1,-o)}var u=0,f=1,c=0;for(this[t]=r&255;++u<n&&(f*=256);)r<0&&c===0&&this[t+u-1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&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);g(this,r,t,n,o-1,-o)}var u=n-1,f=1,c=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&c===0&&this[t+u+1]!==0&&(c=1),this[t+u]=(r/f>>0)-c&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(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||g(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||g(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||g(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||g(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 mr(e,r,t,n,i){return r=+r,t=t>>>0,i||wr(e,r,t,4,34028234663852886e22,-34028234663852886e22),k.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return mr(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return mr(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),k.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),c=f.length;if(c===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=f[u%c]}return this};var ht=/[^+/0-9A-Za-z-_]/g;function pt(e){if(e=e.split("=")[0],e=e.trim().replace(ht,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function z(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 lt(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function yt(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 gr(e){return Y.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 A(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function j(e){return e!==e}var xt=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 Ir=P((vt,Ar)=>{s();var y=Ar.exports={},I,v;function rr(){throw new Error("setTimeout has not been defined")}function tr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?I=setTimeout:I=rr}catch(e){I=rr}try{typeof clearTimeout=="function"?v=clearTimeout:v=tr}catch(e){v=tr}})();function Fr(e){if(I===setTimeout)return setTimeout(e,0);if((I===rr||!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 wt(e){if(v===clearTimeout)return clearTimeout(e);if((v===tr||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var U=[],b=!1,L,$=-1;function mt(){!b||!L||(b=!1,L.length?U=L.concat(U):$=-1,U.length&&dr())}function dr(){if(!b){var e=Fr(mt);b=!0;for(var r=U.length;r;){for(L=U,U=[];++$<r;)L&&L[$].run();$=-1,r=U.length}L=null,b=!1,wt(e)}}y.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];U.push(new Br(e,r)),U.length===1&&!b&&Fr(dr)};function Br(e,r){this.fun=e,this.array=r}Br.prototype.run=function(){this.fun.apply(null,this.array)};y.title="browser";y.browser=!0;y.env={};y.argv=[];y.version="";y.versions={};function S(){}y.on=S;y.addListener=S;y.once=S;y.off=S;y.removeListener=S;y.removeAllListeners=S;y.emit=S;y.prependListener=S;y.prependOnceListener=S;y.listeners=function(e){return[]};y.binding=function(e){throw new Error("process.binding is not supported")};y.cwd=function(){return"/"};y.chdir=function(e){throw new Error("process.chdir is not supported")};y.umask=function(){return 0}});var x,w,Nt,s=br(()=>{x=q(Tr()),w=q(Ir()),Nt=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,{getToken:()=>Tt});module.exports=Pr(Ft);s();s();s();var Et=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),er=e=>Et(x.Buffer.from(e,"utf8").toString("base64"));s();var Cr=q(require("axios"));s();var vr="blocks";s();s();s();function Nr(e){return C(this,null,function*(){return yield new Promise(r=>{setTimeout(()=>r(),e)})})}s();var Ur=(e,r,t,n=0)=>C(void 0,null,function*(){try{return yield e(...t)}catch(i){return n<r.retries?((r==null?void 0:r.delay)!=null&&(yield Nr(r.delay)),yield Ur(e,r,t,n+1)):null}}),Sr=(e,r={retries:5,delay:500})=>(...t)=>C(void 0,null,function*(){return yield Ur(e,r,t)});var gt=4;var Ht=Sr((e,r)=>C(void 0,null,function*(){let{data:t}=yield Cr.default.get(`${e}/${vr}?from=${gt}&size=1&fields=hash,timestamp${r?"&shard="+r:""}`),[n]=t;return n}));s();s();s();s();s();s();var Tt=({address:e,token:r,signature:t})=>{let n=er(e),i=er(r);return`${n}.${i}.${t}`};0&&(module.exports={getToken});
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *