@dev.sail.money/sailor 1.3.0-98 → 1.4.0-244

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 (233) hide show
  1. package/AGENTS.md +7 -7
  2. package/LICENSE +1 -1
  3. package/README.md +64 -472
  4. package/package.json +5 -6
  5. package/packages/cli/README.md +1 -1
  6. package/packages/cli/dist/index.cjs +1481 -463
  7. package/packages/cli/dist/server.cjs +16088 -17900
  8. package/packages/sdk/README.md +1 -1
  9. package/packages/sdk/dist/abis/ConfigurablePermission.d.ts +130 -0
  10. package/packages/sdk/dist/abis/ConfigurablePermission.d.ts.map +1 -0
  11. package/packages/sdk/dist/abis/ConfigurablePermission.js +79 -0
  12. package/packages/sdk/dist/abis/ConfigurablePermission.js.map +1 -0
  13. package/packages/sdk/dist/abis/SailKernel.d.ts +42 -0
  14. package/packages/sdk/dist/abis/SailKernel.d.ts.map +1 -1
  15. package/packages/sdk/dist/abis/SailKernel.js +34 -0
  16. package/packages/sdk/dist/abis/SailKernel.js.map +1 -1
  17. package/packages/sdk/dist/abis/index.d.ts +1 -0
  18. package/packages/sdk/dist/abis/index.d.ts.map +1 -1
  19. package/packages/sdk/dist/abis/index.js +1 -0
  20. package/packages/sdk/dist/abis/index.js.map +1 -1
  21. package/packages/sdk/dist/chains.d.ts +9 -7
  22. package/packages/sdk/dist/chains.d.ts.map +1 -1
  23. package/packages/sdk/dist/chains.js +103 -32
  24. package/packages/sdk/dist/chains.js.map +1 -1
  25. package/packages/sdk/dist/client.d.ts +1 -1
  26. package/packages/sdk/dist/client.d.ts.map +1 -1
  27. package/packages/sdk/dist/client.js +137 -16
  28. package/packages/sdk/dist/client.js.map +1 -1
  29. package/packages/sdk/dist/deployments.d.ts +6 -4
  30. package/packages/sdk/dist/deployments.d.ts.map +1 -1
  31. package/packages/sdk/dist/deployments.js +120 -118
  32. package/packages/sdk/dist/deployments.js.map +1 -1
  33. package/packages/sdk/dist/eip712.d.ts +84 -0
  34. package/packages/sdk/dist/eip712.d.ts.map +1 -1
  35. package/packages/sdk/dist/eip712.js +148 -0
  36. package/packages/sdk/dist/eip712.js.map +1 -1
  37. package/packages/sdk/dist/fees.d.ts +2 -1
  38. package/packages/sdk/dist/fees.d.ts.map +1 -1
  39. package/packages/sdk/dist/fees.js +2 -1
  40. package/packages/sdk/dist/fees.js.map +1 -1
  41. package/packages/sdk/dist/index.d.ts +4 -3
  42. package/packages/sdk/dist/index.d.ts.map +1 -1
  43. package/packages/sdk/dist/index.js +4 -3
  44. package/packages/sdk/dist/index.js.map +1 -1
  45. package/packages/sdk/dist/intelligence.d.ts +1 -1
  46. package/packages/sdk/dist/intelligence.js +1 -1
  47. package/packages/sdk/dist/safe.d.ts +49 -0
  48. package/packages/sdk/dist/safe.d.ts.map +1 -1
  49. package/packages/sdk/dist/safe.js +74 -0
  50. package/packages/sdk/dist/safe.js.map +1 -1
  51. package/packages/sdk/dist/types.d.ts +7 -0
  52. package/packages/sdk/dist/types.d.ts.map +1 -1
  53. package/packages/sdk/package.json +6 -2
  54. package/packages/ui/dist/assets/{add-BX5reKtK.js → add-sHg4oAtj.js} +2 -2
  55. package/packages/ui/dist/assets/{all-wallets-IZ3PlVF-.js → all-wallets-BhPcqrMm.js} +2 -2
  56. package/packages/ui/dist/assets/{app-store-ARgRdMdF.js → app-store-B_PQMwCf.js} +1 -1
  57. package/packages/ui/dist/assets/{apple-VCaqsI9w.js → apple-CqAFK7Fj.js} +2 -2
  58. package/packages/ui/dist/assets/arrow-bottom-CbxIflTv.js +8 -0
  59. package/packages/ui/dist/assets/{arrow-bottom-circle-h5vFiZ2I.js → arrow-bottom-circle-BFgY35YA.js} +2 -2
  60. package/packages/ui/dist/assets/arrow-left-DCG2m2BY.js +8 -0
  61. package/packages/ui/dist/assets/arrow-right-NrPOhG6W.js +8 -0
  62. package/packages/ui/dist/assets/arrow-top-BHTmGsDP.js +8 -0
  63. package/packages/ui/dist/assets/{bank-6c28yOM9.js → bank-BqDvUazs.js} +2 -2
  64. package/packages/ui/dist/assets/{basic-CJnbTfSd.js → basic-CHFjQMod.js} +177 -177
  65. package/packages/ui/dist/assets/{browser-CDKlxM3D.js → browser-C_VdKE7p.js} +2 -2
  66. package/packages/ui/dist/assets/{card-DQdED02q.js → card-w-1brQoV.js} +2 -2
  67. package/packages/ui/dist/assets/ccip-jvDTeGaI.js +1 -0
  68. package/packages/ui/dist/assets/{checkmark-JoRNVoFV.js → checkmark-CLBmxdAF.js} +2 -2
  69. package/packages/ui/dist/assets/{checkmark-bold-B6bGHVIs.js → checkmark-bold-Ca_e1PMs.js} +2 -2
  70. package/packages/ui/dist/assets/chevron-bottom-BhvFRdSL.js +8 -0
  71. package/packages/ui/dist/assets/chevron-left-cjMaNbHC.js +8 -0
  72. package/packages/ui/dist/assets/chevron-right-CRuHR0b-.js +8 -0
  73. package/packages/ui/dist/assets/chevron-top-Bq0a2jj-.js +8 -0
  74. package/packages/ui/dist/assets/{chrome-store-D-fiJ9qJ.js → chrome-store-Cieq6j7x.js} +2 -2
  75. package/packages/ui/dist/assets/{clock-xCPkzwjj.js → clock-Dkj5WbVg.js} +2 -2
  76. package/packages/ui/dist/assets/{close-BkqmPpWG.js → close-C8eE6Dfz.js} +2 -2
  77. package/packages/ui/dist/assets/{coinPlaceholder-PIvN9oq_.js → coinPlaceholder-DndKH-8C.js} +2 -2
  78. package/packages/ui/dist/assets/{compass-CW5kWcxW.js → compass-DzoLByzm.js} +2 -2
  79. package/packages/ui/dist/assets/{copy-DUZlAQJJ.js → copy-Y7UMmVLt.js} +2 -2
  80. package/packages/ui/dist/assets/core-BkWdAWjX.js +907 -0
  81. package/packages/ui/dist/assets/cursor-BAQNxqYB.js +3 -0
  82. package/packages/ui/dist/assets/{cursor-transparent-BUAMB0G1.js → cursor-transparent-BUHY29Re.js} +2 -2
  83. package/packages/ui/dist/assets/{desktop-BxdlwV8P.js → desktop-DkZLCs5P.js} +2 -2
  84. package/packages/ui/dist/assets/{disconnect-GelNh3mn.js → disconnect-CphsO-wg.js} +2 -2
  85. package/packages/ui/dist/assets/{discord-N0jnxkzC.js → discord-CYH46bgt.js} +2 -2
  86. package/packages/ui/dist/assets/{etherscan-B41u7wF4.js → etherscan-2-3-Icbx.js} +2 -2
  87. package/packages/ui/dist/assets/events-DQ172AOg.js +1 -0
  88. package/packages/ui/dist/assets/{exclamation-triangle-BWJC56FC.js → exclamation-triangle-Bx9-1mpn.js} +2 -2
  89. package/packages/ui/dist/assets/{extension-G6I6oogw.js → extension-BuDZDNPV.js} +2 -2
  90. package/packages/ui/dist/assets/external-link-k6oTiNch.js +8 -0
  91. package/packages/ui/dist/assets/{facebook-47twy32b.js → facebook-BVB4qCju.js} +2 -2
  92. package/packages/ui/dist/assets/{farcaster-DYqnqCqs.js → farcaster-CxfWmDK3.js} +2 -2
  93. package/packages/ui/dist/assets/{filters-dF6xeJnE.js → filters-CXyIzkBz.js} +2 -2
  94. package/packages/ui/dist/assets/{github-DbW4Ihz2.js → github-Bga1HQTm.js} +2 -2
  95. package/packages/ui/dist/assets/{google-TKm7G8LF.js → google-CKLjkN5t.js} +2 -2
  96. package/packages/ui/dist/assets/{help-circle-CY3qTmsG.js → help-circle-CW4A601v.js} +1 -1
  97. package/packages/ui/dist/assets/{id-JpHW4q14.js → id-BaRFLHqy.js} +2 -2
  98. package/packages/ui/dist/assets/{image-Dip2fG98.js → image-4pE_c0pP.js} +2 -2
  99. package/packages/ui/dist/assets/index-B07bCKJ8.css +1 -0
  100. package/packages/ui/dist/assets/index-BKPTb_0U.js +1 -0
  101. package/packages/ui/dist/assets/index-BV8s6ez1.js +1 -0
  102. package/packages/ui/dist/assets/index-BaLMTrx4.js +47 -0
  103. package/packages/ui/dist/assets/index-CguqCMNp.js +16 -0
  104. package/packages/ui/dist/assets/index-RMrT9ktE.js +1780 -0
  105. package/packages/ui/dist/assets/{index-q0mGElxZ.js → index-_n5fH6AD.js} +3 -3
  106. package/packages/ui/dist/assets/index.es-rQvUXQTw.js +26 -0
  107. package/packages/ui/dist/assets/{info-B1enFsqh.js → info-UMAWEFh_.js} +2 -2
  108. package/packages/ui/dist/assets/{info-circle-D4j3FISs.js → info-circle-DuTp8NTC.js} +2 -2
  109. package/packages/ui/dist/assets/{lightbulb-DZbKr-vS.js → lightbulb-CkYYJbAa.js} +2 -2
  110. package/packages/ui/dist/assets/{mail-D-TO_uVQ.js → mail-CntZNMWz.js} +2 -2
  111. package/packages/ui/dist/assets/metamask-sdk-DIj7UxWU.js +542 -0
  112. package/packages/ui/dist/assets/{mobile-Bkmwzav2.js → mobile-DdyrzTfW.js} +2 -2
  113. package/packages/ui/dist/assets/{more-D1_I_jiB.js → more-DpZ1Bqpv.js} +2 -2
  114. package/packages/ui/dist/assets/{network-placeholder-DUaFjoXh.js → network-placeholder-B8yy8U56.js} +2 -2
  115. package/packages/ui/dist/assets/{nftPlaceholder-Cc0iUryh.js → nftPlaceholder-BXFbCJ-Z.js} +2 -2
  116. package/packages/ui/dist/assets/{off-BvX71sse.js → off-DavoQSqH.js} +2 -2
  117. package/packages/ui/dist/assets/{play-store-XzLbtbTd.js → play-store-BJeHSxBp.js} +2 -2
  118. package/packages/ui/dist/assets/{plus-B77_RmYR.js → plus-B-L3uTWl.js} +2 -2
  119. package/packages/ui/dist/assets/{qr-code-BNeIhB1d.js → qr-code-CcQBy6o3.js} +1 -1
  120. package/packages/ui/dist/assets/{recycle-horizontal-B9sX-yty.js → recycle-horizontal-BLC3_x1m.js} +2 -2
  121. package/packages/ui/dist/assets/{refresh-BWRygnjm.js → refresh-78cbzBlS.js} +2 -2
  122. package/packages/ui/dist/assets/{reown-logo-DCAEsGFm.js → reown-logo-Bx5RmN6G.js} +2 -2
  123. package/packages/ui/dist/assets/{search-ZXIqrawS.js → search-XWB8l5E2.js} +2 -2
  124. package/packages/ui/dist/assets/{secp256k1-Doz05h4g.js → secp256k1-u9EmDRXd.js} +1 -1
  125. package/packages/ui/dist/assets/{send-BQcO0jNC.js → send-BjGwACTt.js} +2 -2
  126. package/packages/ui/dist/assets/{swapHorizontal-4yZEzz2K.js → swapHorizontal-DJWcWn3A.js} +2 -2
  127. package/packages/ui/dist/assets/{swapHorizontalBold-DxBKu3sl.js → swapHorizontalBold-CG930oAl.js} +2 -2
  128. package/packages/ui/dist/assets/{swapHorizontalMedium-DAQYJ2JK.js → swapHorizontalMedium-CHIdtnCI.js} +2 -2
  129. package/packages/ui/dist/assets/{swapHorizontalRoundedBold-CUlZzFJ6.js → swapHorizontalRoundedBold-B2oGt4O4.js} +2 -2
  130. package/packages/ui/dist/assets/{swapVertical-CjWHAaDM.js → swapVertical-CnjOFXH3.js} +2 -2
  131. package/packages/ui/dist/assets/{telegram-JBeabiJP.js → telegram-BtOilYdH.js} +2 -2
  132. package/packages/ui/dist/assets/{three-dots-D3R8OjSx.js → three-dots-D_VsAJlo.js} +2 -2
  133. package/packages/ui/dist/assets/{twitch-1f9z7xVO.js → twitch-BIX3n7hL.js} +2 -2
  134. package/packages/ui/dist/assets/{twitterIcon-BW7n2xnp.js → twitterIcon-C3DDaPem.js} +2 -2
  135. package/packages/ui/dist/assets/{verify-Cs5owI38.js → verify-CtzMScZy.js} +2 -2
  136. package/packages/ui/dist/assets/{verify-filled-Ci5sx5qS.js → verify-filled-CVjdmBEW.js} +2 -2
  137. package/packages/ui/dist/assets/{w3m-modal-DnWtss8u.js → w3m-modal-BZ3BUhSD.js} +1 -1
  138. package/packages/ui/dist/assets/{wallet-MaGNqaW-.js → wallet-hURaFgJp.js} +2 -2
  139. package/packages/ui/dist/assets/{wallet-placeholder-kTOy12_L.js → wallet-placeholder-BcF2KreB.js} +2 -2
  140. package/packages/ui/dist/assets/{walletconnect-CyuP92jg.js → walletconnect-C8XCABRo.js} +3 -3
  141. package/packages/ui/dist/assets/{warning-circle-BImUCdpG.js → warning-circle-BMz6LCU4.js} +2 -2
  142. package/packages/ui/dist/assets/{x-II45JHpV.js → x-deAHZeLU.js} +2 -2
  143. package/packages/ui/dist/index.html +2 -2
  144. package/templates/default/.agents/skills/sail-mandates/SKILL.md +1 -1
  145. package/templates/default/.agents/skills/sail-mandates/references/approvals.md +3 -3
  146. package/templates/default/.agents/skills/sail-mandates/references/examples-index.md +3 -3
  147. package/templates/default/.agents/skills/sail-onboarding/SKILL.md +34 -33
  148. package/templates/default/.agents/skills/sail-servers/SKILL.md +1 -0
  149. package/templates/default/.agents/skills/sail-swap-quote/SKILL.md +76 -0
  150. package/templates/default/.agents/skills/sail-template-approve-batch/SKILL.md +98 -0
  151. package/templates/default/.agents/skills/sail-template-borrow/SKILL.md +68 -0
  152. package/templates/default/.agents/skills/sail-template-deposit/SKILL.md +61 -0
  153. package/templates/default/.agents/skills/sail-template-swap/SKILL.md +207 -0
  154. package/templates/default/.agents/skills/sail-template-swap-no-oracle/SKILL.md +100 -0
  155. package/templates/default/.agents/skills/sail-template-transfer/SKILL.md +52 -0
  156. package/templates/default/.agents/skills/sail-template-withdraw/SKILL.md +50 -0
  157. package/templates/default/.agents/skills/sail-templates/SKILL.md +142 -0
  158. package/templates/default/.agents/skills/sail-templates/catalog.mjs +200 -0
  159. package/templates/default/.agents/skills/sail-templates/deployed.json +133 -0
  160. package/templates/default/.agents/skills/sail-templates/oracles/IOracle.sol +13 -0
  161. package/templates/default/.agents/skills/sail-templates/oracles/UniV3TwapOracle.sol +114 -0
  162. package/templates/default/.agents/skills/sail-templates/oracles/libs/FullMath.sol +62 -0
  163. package/templates/default/.agents/skills/sail-templates/oracles/libs/TickMath.sol +44 -0
  164. package/templates/default/.agents/skills/sail-templates/references/config-schemas.md +139 -0
  165. package/templates/default/.agents/skills/sail-templates/references/reuse-flow.md +139 -0
  166. package/templates/default/.agents/skills/sail-token-resolve/SKILL.md +174 -0
  167. package/templates/default/.env.example +9 -0
  168. package/templates/default/AGENTS.md +107 -13
  169. package/templates/default/docs/PERMISSION_MODEL.md +2 -2
  170. package/{examples → templates/default/examples}/custom-mandate/.sail/contracts/interfaces/IPermission.sol +4 -0
  171. package/{examples → templates/default/examples}/custom-mandate/README.md +4 -1
  172. package/{examples → templates/default/examples}/permissions/interfaces/IBatchPermission.sol +2 -0
  173. package/{examples → templates/default/examples}/permissions/interfaces/IPermission.sol +4 -0
  174. package/templates/default/scripts/quote-swap.mjs +211 -0
  175. package/templates/default/scripts/resolve-token.mjs +992 -0
  176. package/templates/default/scripts/shared-template-addr.mjs +110 -0
  177. package/templates/default/test/BoundedCallPermission.t.sol +2 -1
  178. package/docs/PERMISSION_MODEL.md +0 -93
  179. package/examples/README.md +0 -24
  180. package/examples/lifi-permissions/LifiBoundedApprovePermissionCloneable.sol +0 -84
  181. package/examples/lifi-permissions/LifiDiamondSwapPermissionCloneable.sol +0 -97
  182. package/examples/lifi-permissions/README.md +0 -53
  183. package/packages/ui/dist/assets/arrow-bottom-Cwptw8fW.js +0 -8
  184. package/packages/ui/dist/assets/arrow-left-bM1TRcV9.js +0 -8
  185. package/packages/ui/dist/assets/arrow-right-BYd_N4Jr.js +0 -8
  186. package/packages/ui/dist/assets/arrow-top-CLUnwVE2.js +0 -8
  187. package/packages/ui/dist/assets/ccip-BL7RIPfY.js +0 -1
  188. package/packages/ui/dist/assets/chevron-bottom-BMCelIEu.js +0 -8
  189. package/packages/ui/dist/assets/chevron-left-ryPLhHCc.js +0 -8
  190. package/packages/ui/dist/assets/chevron-right-CdDNRv7f.js +0 -8
  191. package/packages/ui/dist/assets/chevron-top-BxWIjjGk.js +0 -8
  192. package/packages/ui/dist/assets/core-von2c1sc.js +0 -907
  193. package/packages/ui/dist/assets/cursor-BzRVY7BD.js +0 -3
  194. package/packages/ui/dist/assets/events-C9icG2YB.js +0 -1
  195. package/packages/ui/dist/assets/external-link-BPaGQf4a.js +0 -8
  196. package/packages/ui/dist/assets/fallback-BTfJeGjh.js +0 -1
  197. package/packages/ui/dist/assets/index-BGJ_8fMk.js +0 -1
  198. package/packages/ui/dist/assets/index-Bq3PAopp.js +0 -16
  199. package/packages/ui/dist/assets/index-C4_cA5XW.js +0 -1
  200. package/packages/ui/dist/assets/index-CaDN0gL4.js +0 -1
  201. package/packages/ui/dist/assets/index-DLElIcBr.js +0 -1789
  202. package/packages/ui/dist/assets/index-lhNfD4jA.css +0 -1
  203. package/packages/ui/dist/assets/index.es-BaCKS_tW.js +0 -26
  204. package/packages/ui/dist/assets/metamask-sdk-DljW3QD1.js +0 -542
  205. package/packages/ui/dist/assets/native-CJ5et6AR.js +0 -1
  206. package/packages/ui/dist/assets/parseSignature-BAS-wKoj.js +0 -1
  207. package/scripts/check-docs.mjs +0 -309
  208. package/scripts/check-init.mjs +0 -123
  209. package/scripts/check-update.mjs +0 -177
  210. package/scripts/clean.mjs +0 -17
  211. package/scripts/pack.mjs +0 -21
  212. package/templates/default/.agents/skills/sail-overview/SKILL.md +0 -100
  213. package/templates/default/.agents/skills/sail-sailor/SKILL.md +0 -190
  214. package/templates/default/.agents/skills/sail-setup/SKILL.md +0 -38
  215. package/templates/default/.gitlab-ci.yml +0 -58
  216. /package/{examples → templates/default/examples}/custom-mandate/foundry.toml +0 -0
  217. /package/{examples → templates/default/examples}/custom-mandate/mandates/BoundedCallPermission.sol +0 -0
  218. /package/{examples → templates/default/examples}/custom-mandate/mandates/README.md +0 -0
  219. /package/{examples → templates/default/examples}/custom-mandate/mandates/SailCalldata.sol +0 -0
  220. /package/{examples → templates/default/examples}/permissions/BoundedApproveAndCallBatch.sol +0 -0
  221. /package/{examples → templates/default/examples}/permissions/BoundedBorrow_AaveV3_Arbitrum.sol +0 -0
  222. /package/{examples → templates/default/examples}/permissions/BoundedLimitless_Base.sol +0 -0
  223. /package/{examples → templates/default/examples}/permissions/BoundedPerp_GMXv2_Arbitrum.sol +0 -0
  224. /package/{examples → templates/default/examples}/permissions/BoundedStake_Venice_Base.sol +0 -0
  225. /package/{examples → templates/default/examples}/permissions/BoundedSupply_AaveV3_Arbitrum.sol +0 -0
  226. /package/{examples → templates/default/examples}/permissions/BoundedSwapNative_UniswapV3_Base.sol +0 -0
  227. /package/{examples → templates/default/examples}/permissions/BoundedSwap_UniswapV3_Base.sol +0 -0
  228. /package/{examples → templates/default/examples}/permissions/BoundedSwap_UniswapV4_Unichain.sol +0 -0
  229. /package/{examples → templates/default/examples}/permissions/BoundedTransfer_ERC20_Ethereum.sol +0 -0
  230. /package/{examples → templates/default/examples}/permissions/BoundedVault_ERC4626_Base.sol +0 -0
  231. /package/{examples → templates/default/examples}/permissions/README.md +0 -0
  232. /package/{examples → templates/default/examples}/permissions/SailCalldata.sol +0 -0
  233. /package/{examples → templates/default/examples}/permissions/foundry.toml +0 -0
@@ -0,0 +1,47 @@
1
+ import{N as Ev,Q as jv}from"./index-RMrT9ktE.js";import{r as wv}from"./index-BV8s6ez1.js";import{r as Pv}from"./events-DQ172AOg.js";function Av(e,r){for(var n=0;n<r.length;n++){const t=r[n];if(typeof t!="string"&&!Array.isArray(t)){for(const o in t)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(t,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Tv(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const Sv=Tv(),Iv=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:Sv},Symbol.toStringTag,{value:"Module"}));var Td={},zn={},Ft={},rn={},Or={},Un={},Ln={},fl;function Xp(){if(fl)return Ln;fl=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.getSDKVersion=void 0;const e=()=>"9.1.0";return Ln.getSDKVersion=e,Ln}var Dn={},ll;function Rv(){if(ll)return Dn;ll=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.generateRequestId=void 0;const e=t=>t.toString(16).padStart(2,"0"),r=t=>{const o=new Uint8Array(t/2);return window.crypto.getRandomValues(o),Array.from(o,e).join("")},n=()=>typeof window<"u"?r(10):new Date().getTime().toString(36);return Dn.generateRequestId=n,Dn}var bl;function Qp(){if(bl)return Un;bl=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.MessageFormatter=void 0;const e=Xp(),r=Rv();class n{}return Un.MessageFormatter=n,n.makeRequest=(t,o)=>({id:(0,r.generateRequestId)(),method:t,params:o,env:{sdkVersion:(0,e.getSDKVersion)()}}),n.makeResponse=(t,o,s)=>({id:t,success:!0,version:s,data:o}),n.makeErrorResponse=(t,o,s)=>({id:t,success:!1,error:o,version:s}),Un}var Cr={},ml;function Vr(){if(ml)return Cr;ml=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.RestrictedMethods=Cr.Methods=void 0;var e;(function(n){n.sendTransactions="sendTransactions",n.rpcCall="rpcCall",n.getChainInfo="getChainInfo",n.getSafeInfo="getSafeInfo",n.getTxBySafeTxHash="getTxBySafeTxHash",n.getSafeBalances="getSafeBalances",n.signMessage="signMessage",n.signTypedMessage="signTypedMessage",n.getEnvironmentInfo="getEnvironmentInfo",n.getOffChainSignature="getOffChainSignature",n.requestAddressBook="requestAddressBook",n.wallet_getPermissions="wallet_getPermissions",n.wallet_requestPermissions="wallet_requestPermissions"})(e||(Cr.Methods=e={}));var r;return(function(n){n.requestAddressBook="requestAddressBook"})(r||(Cr.RestrictedMethods=r={})),Cr}var hl;function Bv(){return hl||(hl=1,(function(e){var r=Or&&Or.__createBinding||(Object.create?(function(s,i,a,c){c===void 0&&(c=a);var u=Object.getOwnPropertyDescriptor(i,a);(!u||("get"in u?!i.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(s,c,u)}):(function(s,i,a,c){c===void 0&&(c=a),s[c]=i[a]})),n=Or&&Or.__exportStar||function(s,i){for(var a in s)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,s,a)};Object.defineProperty(e,"__esModule",{value:!0});const t=Qp();class o{constructor(i=null,a=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:c,data:u,source:l})=>{const f=!u,m=!this.isServer&&l===window.parent,y=typeof u.version<"u"&&parseInt(u.version.split(".")[0]),h=typeof y=="number"&&y>=1;let b=!0;return Array.isArray(this.allowedOrigins)&&(b=this.allowedOrigins.find(v=>v.test(c))!==void 0),!f&&m&&h&&b},this.logIncomingMessage=c=>{console.info(`Safe Apps SDK v1: A message was received from origin ${c.origin}. `,c.data)},this.onParentMessage=c=>{this.isValidMessage(c)&&(this.debugMode&&this.logIncomingMessage(c),this.handleIncomingMessage(c.data))},this.handleIncomingMessage=c=>{const{id:u}=c,l=this.callbacks.get(u);l&&(l(c),this.callbacks.delete(u))},this.send=(c,u)=>{const l=t.MessageFormatter.makeRequest(c,u);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(l,"*"),new Promise((f,m)=>{this.callbacks.set(l.id,y=>{if(!y.success){m(new Error(y.error));return}f(y)})})},this.allowedOrigins=i,this.debugMode=a,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=o,n(Vr(),e)})(Or)),Or}var Gn={},xr={},Vn={},yl;function Ov(){if(yl)return Vn;yl=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.isObjectEIP712TypedData=void 0;const e=r=>typeof r=="object"&&r!=null&&"domain"in r&&"types"in r&&"message"in r;return Vn.isObjectEIP712TypedData=e,Vn}var Sd={},pl;function Cv(){return pl||(pl=1,Object.defineProperty(Sd,"__esModule",{value:!0})),Sd}var Id={},gl;function xv(){return gl||(gl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var r=wv();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})})(Id)),Id}var Rd={},_l;function qv(){return _l||(_l=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Vr()),Rd}var vl;function nf(){return vl||(vl=1,(function(e){var r=xr&&xr.__createBinding||(Object.create?(function(t,o,s,i){i===void 0&&(i=s);var a=Object.getOwnPropertyDescriptor(o,s);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(t,i,a)}):(function(t,o,s,i){i===void 0&&(i=s),t[i]=o[s]})),n=xr&&xr.__exportStar||function(t,o){for(var s in t)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ov(),e),n(Cv(),e),n(xv(),e),n(qv(),e)})(xr)),xr}var El;function Mv(){if(El)return Gn;El=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.TXs=void 0;const e=Vr(),r=nf();class n{constructor(o){this.communicator=o}async getBySafeTxHash(o){if(!o)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:o})).data}async signMessage(o){const s={message:o};return(await this.communicator.send(e.Methods.signMessage,s)).data}async signTypedMessage(o){if(!(0,r.isObjectEIP712TypedData)(o))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:o})).data}async send({txs:o,params:s}){if(!o||!o.length)throw new Error("No transactions were passed");const i={txs:o,params:s};return(await this.communicator.send(e.Methods.sendTransactions,i)).data}}return Gn.TXs=n,Gn}var Wn={},Kn={},jl;function of(){return jl||(jl=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.RPC_CALLS=void 0,Kn.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}),Kn}var wl;function kv(){if(wl)return Wn;wl=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.Eth=void 0;const e=of(),r=Vr(),n={defaultBlockParam:(o="latest")=>o,returnFullTxObjectParam:(o=!1)=>o,blockNumberToHex:o=>Number.isInteger(o)?`0x${o.toString(16)}`:o};class t{constructor(s){this.communicator=s,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,n.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,n.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,n.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,n.blockNumberToHex,n.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,n.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[n.blockNumberToHex,n.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionCount,formatters:[null,n.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=i=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([i]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(s){const{call:i,formatters:a}=s;return async c=>{a&&Array.isArray(c)&&a.forEach((f,m)=>{f&&(c[m]=f(c[m]))});const u={call:i,params:c||[]};return(await this.communicator.send(r.Methods.rpcCall,u)).data}}}return Wn.Eth=t,Wn}var Nt={},Bd={},Od={},Zn={},Jn={},Pl;function Hv(){return Pl||(Pl=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.version=void 0,Jn.version="1.2.3"),Jn}var Al;function An(){if(Al)return Zn;Al=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.BaseError=void 0;const e=Hv();class r extends Error{constructor(t,o={}){var c;const s=o.cause instanceof r?o.cause.details:(c=o.cause)!=null&&c.message?o.cause.message:o.details,i=o.cause instanceof r&&o.cause.docsPath||o.docsPath,a=[t||"An error occurred.","",...o.metaMessages?[...o.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(`
2
+ `);super(a),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),o.cause&&(this.cause=o.cause),this.details=s,this.docsPath=i,this.metaMessages=o.metaMessages,this.shortMessage=t}}return Zn.BaseError=r,Zn}var pi={},Tl;function Fv(){if(Tl)return pi;Tl=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.narrow=e;function e(r){return r}return pi}var gi={},_i={},vi={},Ei={},Ot={},Sl;function qu(){if(Sl)return Ot;Sl=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.isTupleRegex=Ot.integerRegex=Ot.bytesRegex=void 0,Ot.execTyped=e;function e(r,n){const t=r.exec(n);return t==null?void 0:t.groups}return Ot.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Ot.isTupleRegex=/^\(.+?\).*?$/,Ot}var Il;function eg(){if(Il)return Ei;Il=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.formatAbiParameter=n;const e=qu(),r=/^tuple(?<array>(\[(\d*)\])*)$/;function n(t){let o=t.type;if(r.test(t.type)&&"components"in t){o="(";const s=t.components.length;for(let a=0;a<s;a++){const c=t.components[a];o+=n(c),a<s-1&&(o+=", ")}const i=(0,e.execTyped)(r,t.type);return o+=`)${(i==null?void 0:i.array)||""}`,n({...t,type:o})}return"indexed"in t&&t.indexed&&(o=`${o} indexed`),t.name?`${o} ${t.name}`:o}return Ei}var Rl;function tg(){if(Rl)return vi;Rl=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.formatAbiParameters=r;const e=eg();function r(n){let t="";const o=n.length;for(let s=0;s<o;s++){const i=n[s];t+=(0,e.formatAbiParameter)(i),s!==o-1&&(t+=", ")}return t}return vi}var Bl;function rg(){if(Bl)return _i;Bl=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.formatAbiItem=r;const e=tg();function r(n){var t;return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${(t=n.outputs)!=null&&t.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return _i}var Ol;function Nv(){if(Ol)return gi;Ol=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.formatAbi=r;const e=rg();function r(n){const t=[],o=n.length;for(let s=0;s<o;s++){const i=n[s],a=(0,e.formatAbiItem)(i);t.push(a)}return t}return gi}var ji={},Re={},Cl;function Tn(){if(Cl)return Re;Cl=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.functionModifiers=Re.eventModifiers=Re.modifiers=void 0,Re.isErrorSignature=n,Re.execErrorSignature=t,Re.isEventSignature=s,Re.execEventSignature=i,Re.isFunctionSignature=c,Re.execFunctionSignature=u,Re.isStructSignature=f,Re.execStructSignature=m,Re.isConstructorSignature=h,Re.execConstructorSignature=b,Re.isFallbackSignature=_,Re.execFallbackSignature=g,Re.isReceiveSignature=d;const e=qu(),r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(w){return r.test(w)}function t(w){return(0,e.execTyped)(r,w)}const o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(w){return o.test(w)}function i(w){return(0,e.execTyped)(o,w)}const a=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function c(w){return a.test(w)}function u(w){return(0,e.execTyped)(a,w)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(w){return l.test(w)}function m(w){return(0,e.execTyped)(l,w)}const y=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function h(w){return y.test(w)}function b(w){return(0,e.execTyped)(y,w)}const v=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function _(w){return v.test(w)}function g(w){return(0,e.execTyped)(v,w)}const P=/^receive\(\) external payable$/;function d(w){return P.test(w)}return Re.modifiers=new Set(["memory","indexed","storage","calldata"]),Re.eventModifiers=new Set(["indexed"]),Re.functionModifiers=new Set(["calldata","memory","storage"]),Re}var wi={},$t={},xl;function Mu(){if(xl)return $t;xl=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.UnknownSolidityTypeError=$t.UnknownTypeError=$t.InvalidAbiItemError=void 0;const e=An();class r extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}$t.InvalidAbiItemError=r;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}$t.UnknownTypeError=n;class t extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return $t.UnknownSolidityTypeError=t,$t}var He={},ql;function Lo(){if(ql)return He;ql=1,Object.defineProperty(He,"__esModule",{value:!0}),He.InvalidAbiTypeParameterError=He.InvalidFunctionModifierError=He.InvalidModifierError=He.SolidityProtectedKeywordError=He.InvalidParameterError=He.InvalidAbiParametersError=He.InvalidAbiParameterError=void 0;const e=An();class r extends e.BaseError{constructor({param:u}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(u,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}He.InvalidAbiParameterError=r;class n extends e.BaseError{constructor({params:u}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(u,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}He.InvalidAbiParametersError=n;class t extends e.BaseError{constructor({param:u}){super("Invalid ABI parameter.",{details:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}He.InvalidParameterError=t;class o extends e.BaseError{constructor({param:u,name:l}){super("Invalid ABI parameter.",{details:u,metaMessages:[`"${l}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}He.SolidityProtectedKeywordError=o;class s extends e.BaseError{constructor({param:u,type:l,modifier:f}){super("Invalid ABI parameter.",{details:u,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}He.InvalidModifierError=s;class i extends e.BaseError{constructor({param:u,type:l,modifier:f}){super("Invalid ABI parameter.",{details:u,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${f}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}He.InvalidFunctionModifierError=i;class a extends e.BaseError{constructor({abiParameter:u}){super("Invalid ABI parameter.",{details:JSON.stringify(u,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return He.InvalidAbiTypeParameterError=a,He}var zt={},Ml;function af(){if(Ml)return zt;Ml=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.InvalidStructSignatureError=zt.UnknownSignatureError=zt.InvalidSignatureError=void 0;const e=An();class r extends e.BaseError{constructor({signature:s,type:i}){super(`Invalid ${i} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}zt.InvalidSignatureError=r;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}zt.UnknownSignatureError=n;class t extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return zt.InvalidStructSignatureError=t,zt}var Yn={},kl;function ng(){if(kl)return Yn;kl=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.CircularReferenceError=void 0;const e=An();class r extends e.BaseError{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return Yn.CircularReferenceError=r,Yn}var Qe={},Xn={},Hl;function og(){if(Hl)return Xn;Hl=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.InvalidParenthesisError=void 0;const e=An();class r extends e.BaseError{constructor({current:t,depth:o}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${o>0?"opening":"closing"} parentheses.`],details:`Depth "${o}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return Xn.InvalidParenthesisError=r,Xn}var nn={},Fl;function $v(){if(Fl)return nn;Fl=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.parameterCache=void 0,nn.getParameterCacheKey=e;function e(r,n,t){let o="";if(t)for(const s of Object.entries(t)){if(!s)continue;let i="";for(const a of s[1])i+=`[${a.type}${a.name?`:${a.name}`:""}]`;o+=`(${s[0]}{${i}})`}return n?`${n}:${r}${o}`:`${r}${o}`}return nn.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),nn}var Nl;function Pn(){if(Nl)return Qe;Nl=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.parseSignature=a,Qe.parseFunctionSignature=c,Qe.parseEventSignature=u,Qe.parseErrorSignature=l,Qe.parseConstructorSignature=f,Qe.parseFallbackSignature=m,Qe.parseAbiParameter=v,Qe.splitParameters=_,Qe.isSolidityType=g,Qe.isSolidityKeyword=d,Qe.isValidDataLocation=w;const e=qu(),r=Mu(),n=Lo(),t=af(),o=og(),s=$v(),i=Tn();function a(E,p={}){if((0,i.isFunctionSignature)(E))return c(E,p);if((0,i.isEventSignature)(E))return u(E,p);if((0,i.isErrorSignature)(E))return l(E,p);if((0,i.isConstructorSignature)(E))return f(E,p);if((0,i.isFallbackSignature)(E))return m(E);if((0,i.isReceiveSignature)(E))return{type:"receive",stateMutability:"payable"};throw new t.UnknownSignatureError({signature:E})}function c(E,p={}){const S=(0,i.execFunctionSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"function"});const A=_(S.parameters),T=[],C=A.length;for(let R=0;R<C;R++)T.push(v(A[R],{modifiers:i.functionModifiers,structs:p,type:"function"}));const I=[];if(S.returns){const R=_(S.returns),q=R.length;for(let F=0;F<q;F++)I.push(v(R[F],{modifiers:i.functionModifiers,structs:p,type:"function"}))}return{name:S.name,type:"function",stateMutability:S.stateMutability??"nonpayable",inputs:T,outputs:I}}function u(E,p={}){const S=(0,i.execEventSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"event"});const A=_(S.parameters),T=[],C=A.length;for(let I=0;I<C;I++)T.push(v(A[I],{modifiers:i.eventModifiers,structs:p,type:"event"}));return{name:S.name,type:"event",inputs:T}}function l(E,p={}){const S=(0,i.execErrorSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"error"});const A=_(S.parameters),T=[],C=A.length;for(let I=0;I<C;I++)T.push(v(A[I],{structs:p,type:"error"}));return{name:S.name,type:"error",inputs:T}}function f(E,p={}){const S=(0,i.execConstructorSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"constructor"});const A=_(S.parameters),T=[],C=A.length;for(let I=0;I<C;I++)T.push(v(A[I],{structs:p,type:"constructor"}));return{type:"constructor",stateMutability:S.stateMutability??"nonpayable",inputs:T}}function m(E){const p=(0,i.execFallbackSignature)(E);if(!p)throw new t.InvalidSignatureError({signature:E,type:"fallback"});return{type:"fallback",stateMutability:p.stateMutability??"nonpayable"}}const y=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b=/^u?int$/;function v(E,p){var j,k;const S=(0,s.getParameterCacheKey)(E,p==null?void 0:p.type,p==null?void 0:p.structs);if(s.parameterCache.has(S))return s.parameterCache.get(S);const A=e.isTupleRegex.test(E),T=(0,e.execTyped)(A?h:y,E);if(!T)throw new n.InvalidParameterError({param:E});if(T.name&&d(T.name))throw new n.SolidityProtectedKeywordError({param:E,name:T.name});const C=T.name?{name:T.name}:{},I=T.modifier==="indexed"?{indexed:!0}:{},R=(p==null?void 0:p.structs)??{};let q,F={};if(A){q="tuple";const B=_(T.type),O=[],x=B.length;for(let M=0;M<x;M++)O.push(v(B[M],{structs:R}));F={components:O}}else if(T.type in R)q="tuple",F={components:R[T.type]};else if(b.test(T.type))q=`${T.type}256`;else if(T.type==="address payable")q="address";else if(q=T.type,(p==null?void 0:p.type)!=="struct"&&!g(q))throw new r.UnknownSolidityTypeError({type:q});if(T.modifier){if(!((k=(j=p==null?void 0:p.modifiers)==null?void 0:j.has)!=null&&k.call(j,T.modifier)))throw new n.InvalidModifierError({param:E,type:p==null?void 0:p.type,modifier:T.modifier});if(i.functionModifiers.has(T.modifier)&&!w(q,!!T.array))throw new n.InvalidFunctionModifierError({param:E,type:p==null?void 0:p.type,modifier:T.modifier})}const H={type:`${q}${T.array??""}`,...C,...I,...F};return s.parameterCache.set(S,H),H}function _(E,p=[],S="",A=0){const T=E.trim().length;for(let C=0;C<T;C++){const I=E[C],R=E.slice(C+1);switch(I){case",":return A===0?_(R,[...p,S.trim()]):_(R,p,`${S}${I}`,A);case"(":return _(R,p,`${S}${I}`,A+1);case")":return _(R,p,`${S}${I}`,A-1);default:return _(R,p,`${S}${I}`,A)}}if(S==="")return p;if(A!==0)throw new o.InvalidParenthesisError({current:S,depth:A});return p.push(S.trim()),p}function g(E){return E==="address"||E==="bool"||E==="function"||E==="string"||e.bytesRegex.test(E)||e.integerRegex.test(E)}const P=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function d(E){return E==="address"||E==="bool"||E==="function"||E==="string"||E==="tuple"||e.bytesRegex.test(E)||e.integerRegex.test(E)||P.test(E)}function w(E,p){return p||E==="bytes"||E==="string"||E==="tuple"}return Qe}var $l;function ku(){if($l)return wi;$l=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.parseStructs=a;const e=qu(),r=Mu(),n=Lo(),t=af(),o=ng(),s=Tn(),i=Pn();function a(l){const f={},m=l.length;for(let v=0;v<m;v++){const _=l[v];if(!(0,s.isStructSignature)(_))continue;const g=(0,s.execStructSignature)(_);if(!g)throw new t.InvalidSignatureError({signature:_,type:"struct"});const P=g.properties.split(";"),d=[],w=P.length;for(let E=0;E<w;E++){const S=P[E].trim();if(!S)continue;const A=(0,i.parseAbiParameter)(S,{type:"struct"});d.push(A)}if(!d.length)throw new t.InvalidStructSignatureError({signature:_});f[g.name]=d}const y={},h=Object.entries(f),b=h.length;for(let v=0;v<b;v++){const[_,g]=h[v];y[_]=u(g,f)}return y}const c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function u(l=[],f={},m=new Set){const y=[],h=l.length;for(let b=0;b<h;b++){const v=l[b];if(e.isTupleRegex.test(v.type))y.push(v);else{const g=(0,e.execTyped)(c,v.type);if(!(g!=null&&g.type))throw new n.InvalidAbiTypeParameterError({abiParameter:v});const{array:P,type:d}=g;if(d in f){if(m.has(d))throw new o.CircularReferenceError({type:d});y.push({...v,type:`tuple${P??""}`,components:u(f[d],f,new Set([...m,d]))})}else if((0,i.isSolidityType)(d))y.push(v);else throw new r.UnknownTypeError({type:d})}}return y}return wi}var zl;function zv(){if(zl)return ji;zl=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.parseAbi=t;const e=Tn(),r=ku(),n=Pn();function t(o){const s=(0,r.parseStructs)(o),i=[],a=o.length;for(let c=0;c<a;c++){const u=o[c];(0,e.isStructSignature)(u)||i.push((0,n.parseSignature)(u,s))}return i}return ji}var Pi={},Ul;function Uv(){if(Ul)return Pi;Ul=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.parseAbiItem=o;const e=Mu(),r=Tn(),n=ku(),t=Pn();function o(s){let i;if(typeof s=="string")i=(0,t.parseSignature)(s);else{const a=(0,n.parseStructs)(s),c=s.length;for(let u=0;u<c;u++){const l=s[u];if(!(0,r.isStructSignature)(l)){i=(0,t.parseSignature)(l,a);break}}}if(!i)throw new e.InvalidAbiItemError({signature:s});return i}return Pi}var Ai={},Ll;function Lv(){if(Ll)return Ai;Ll=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.parseAbiParameter=o;const e=Lo(),r=Tn(),n=ku(),t=Pn();function o(s){let i;if(typeof s=="string")i=(0,t.parseAbiParameter)(s,{modifiers:r.modifiers});else{const a=(0,n.parseStructs)(s),c=s.length;for(let u=0;u<c;u++){const l=s[u];if(!(0,r.isStructSignature)(l)){i=(0,t.parseAbiParameter)(l,{modifiers:r.modifiers,structs:a});break}}}if(!i)throw new e.InvalidAbiParameterError({param:s});return i}return Ai}var Ti={},Dl;function Dv(){if(Dl)return Ti;Dl=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.parseAbiParameters=s;const e=Lo(),r=Tn(),n=ku(),t=Pn(),o=Pn();function s(i){const a=[];if(typeof i=="string"){const c=(0,t.splitParameters)(i),u=c.length;for(let l=0;l<u;l++)a.push((0,o.parseAbiParameter)(c[l],{modifiers:r.modifiers}))}else{const c=(0,n.parseStructs)(i),u=i.length;for(let l=0;l<u;l++){const f=i[l];if((0,r.isStructSignature)(f))continue;const m=(0,t.splitParameters)(f),y=m.length;for(let h=0;h<y;h++)a.push((0,o.parseAbiParameter)(m[h],{modifiers:r.modifiers,structs:c}))}}if(a.length===0)throw new e.InvalidAbiParametersError({params:i});return a}return Ti}var Gl;function br(){return Gl||(Gl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var r=An();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return r.BaseError}});var n=Fv();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var t=Nv();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return t.formatAbi}});var o=rg();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return o.formatAbiItem}});var s=eg();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var i=tg();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return i.formatAbiParameters}});var a=zv();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return a.parseAbi}});var c=Uv();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return c.parseAbiItem}});var u=Lv();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return u.parseAbiParameter}});var l=Dv();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return l.parseAbiParameters}});var f=Mu();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return f.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return f.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return f.UnknownSolidityTypeError}});var m=Lo();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return m.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return m.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return m.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return m.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return m.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return m.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return m.InvalidAbiParameterError}});var y=af();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return y.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return y.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return y.UnknownSignatureError}});var h=og();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var b=ng();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return b.CircularReferenceError}})})(Od)),Od}var on={},Si={},Vl;function me(){if(Vl)return Si;Vl=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.getAction=e;function e(r,n,t){const o=r[n.name];if(typeof o=="function")return o;const s=r[t];return typeof s=="function"?s:i=>n(r,i)}return Si}var Ii={},Ri={},se={},Qn={},Wl;function Qt(){if(Wl)return Qn;Wl=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.formatAbiItem=r,Qn.formatAbiParams=n;const e=Se();function r(o,{includeName:s=!1}={}){if(o.type!=="function"&&o.type!=="event"&&o.type!=="error")throw new e.InvalidDefinitionTypeError(o.type);return`${o.name}(${n(o.inputs,{includeName:s})})`}function n(o,{includeName:s=!1}={}){return o?o.map(i=>t(i,{includeName:s})).join(s?", ":","):""}function t(o,{includeName:s}){return o.type.startsWith("tuple")?`(${n(o.components,{includeName:s})})${o.type.slice(5)}`:o.type+(s&&o.name?` ${o.name}`:"")}return Qn}var Bi={},Oi={},Kl;function Ze(){if(Kl)return Oi;Kl=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.isHex=e;function e(r,{strict:n=!0}={}){return!r||typeof r!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}return Oi}var Zl;function Ue(){if(Zl)return Bi;Zl=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.size=r;const e=Ze();function r(n){return(0,e.isHex)(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}return Bi}var an={},eo={},Jl;function Gv(){return Jl||(Jl=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.version=void 0,eo.version="2.51.3"),eo}var Yl;function ue(){if(Yl)return an;Yl=1,Object.defineProperty(an,"__esModule",{value:!0}),an.BaseError=void 0,an.setErrorConfig=n;const e=Gv();let r={getDocsUrl:({docsBaseUrl:s,docsPath:i="",docsSlug:a})=>i?`${s??"https://viem.sh"}${i}${a?`#${a}`:""}`:void 0,version:`viem@${e.version}`};function n(s){r=s}class t extends Error{constructor(i,a={}){var m;const c=(()=>{var y;return a.cause instanceof t?a.cause.details:(y=a.cause)!=null&&y.message?a.cause.message:a.details})(),u=a.cause instanceof t&&a.cause.docsPath||a.docsPath,l=(m=r.getDocsUrl)==null?void 0:m.call(r,{...a,docsPath:u}),f=[i||"An error occurred.","",...a.metaMessages?[...a.metaMessages,""]:[],...l?[`Docs: ${l}`]:[],...c?[`Details: ${c}`]:[],...r.version?[`Version: ${r.version}`]:[]].join(`
3
+ `);super(f,a.cause?{cause:a.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=c,this.docsPath=u,this.metaMessages=a.metaMessages,this.name=a.name??this.name,this.shortMessage=i,this.version=e.version}walk(i){return o(this,i)}}an.BaseError=t;function o(s,i){return i!=null&&i(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?o(s.cause,i):i?null:s}return an}var Xl;function Se(){if(Xl)return se;Xl=1,Object.defineProperty(se,"__esModule",{value:!0}),se.UnsupportedPackedAbiType=se.InvalidDefinitionTypeError=se.InvalidArrayError=se.InvalidAbiDecodingTypeError=se.InvalidAbiEncodingTypeError=se.DecodeLogTopicsMismatch=se.DecodeLogDataMismatch=se.BytesSizeMismatchError=se.AbiItemAmbiguityError=se.AbiFunctionSignatureNotFoundError=se.AbiFunctionOutputsNotFoundError=se.AbiFunctionNotFoundError=se.AbiEventNotFoundError=se.AbiEventSignatureNotFoundError=se.AbiEventSignatureEmptyTopicsError=se.AbiErrorSignatureNotFoundError=se.AbiErrorNotFoundError=se.AbiErrorInputsNotFoundError=se.AbiEncodingLengthMismatchError=se.AbiEncodingBytesSizeMismatchError=se.AbiEncodingArrayLengthMismatchError=se.AbiDecodingZeroDataError=se.AbiDecodingDataSizeTooSmallError=se.AbiDecodingDataSizeInvalidError=se.AbiConstructorParamsNotFoundError=se.AbiConstructorNotFoundError=void 0;const e=Qt(),r=Ue(),n=ue();class t extends n.BaseError{constructor({docsPath:q}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
4
+ `),{docsPath:q,name:"AbiConstructorNotFoundError"})}}se.AbiConstructorNotFoundError=t;class o extends n.BaseError{constructor({docsPath:q}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
5
+ `),{docsPath:q,name:"AbiConstructorParamsNotFoundError"})}}se.AbiConstructorParamsNotFoundError=o;class s extends n.BaseError{constructor({data:q,size:F}){super([`Data size of ${F} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(`
6
+ `),{metaMessages:[`Data: ${q} (${F} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}se.AbiDecodingDataSizeInvalidError=s;class i extends n.BaseError{constructor({data:q,params:F,size:H}){super([`Data size of ${H} bytes is too small for given parameters.`].join(`
7
+ `),{metaMessages:[`Params: (${(0,e.formatAbiParams)(F,{includeName:!0})})`,`Data: ${q} (${H} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=q,this.params=F,this.size=H}}se.AbiDecodingDataSizeTooSmallError=i;class a extends n.BaseError{constructor({cause:q}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:q})}}se.AbiDecodingZeroDataError=a;class c extends n.BaseError{constructor({expectedLength:q,givenLength:F,type:H}){super([`ABI encoding array length mismatch for type ${H}.`,`Expected length: ${q}`,`Given length: ${F}`].join(`
8
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}se.AbiEncodingArrayLengthMismatchError=c;class u extends n.BaseError{constructor({expectedSize:q,value:F}){super(`Size of bytes "${F}" (bytes${(0,r.size)(F)}) does not match expected size (bytes${q}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}se.AbiEncodingBytesSizeMismatchError=u;class l extends n.BaseError{constructor({expectedLength:q,givenLength:F}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${q}`,`Given length (values): ${F}`].join(`
9
+ `),{name:"AbiEncodingLengthMismatchError"})}}se.AbiEncodingLengthMismatchError=l;class f extends n.BaseError{constructor(q,{docsPath:F}){super([`Arguments (\`args\`) were provided to "${q}", but "${q}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
10
+ `),{docsPath:F,name:"AbiErrorInputsNotFoundError"})}}se.AbiErrorInputsNotFoundError=f;class m extends n.BaseError{constructor(q,{docsPath:F}={}){super([`Error ${q?`"${q}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
11
+ `),{docsPath:F,name:"AbiErrorNotFoundError"})}}se.AbiErrorNotFoundError=m;class y extends n.BaseError{constructor(q,{docsPath:F,cause:H}){super([`Encoded error signature "${q}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${q}.`].join(`
12
+ `),{docsPath:F,name:"AbiErrorSignatureNotFoundError",cause:H}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=q}}se.AbiErrorSignatureNotFoundError=y;class h extends n.BaseError{constructor({docsPath:q}){super("Cannot extract event signature from empty topics.",{docsPath:q,name:"AbiEventSignatureEmptyTopicsError"})}}se.AbiEventSignatureEmptyTopicsError=h;class b extends n.BaseError{constructor(q,{docsPath:F}){super([`Encoded event signature "${q}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${q}.`].join(`
13
+ `),{docsPath:F,name:"AbiEventSignatureNotFoundError"})}}se.AbiEventSignatureNotFoundError=b;class v extends n.BaseError{constructor(q,{docsPath:F}={}){super([`Event ${q?`"${q}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
14
+ `),{docsPath:F,name:"AbiEventNotFoundError"})}}se.AbiEventNotFoundError=v;class _ extends n.BaseError{constructor(q,{docsPath:F}={}){super([`Function ${q?`"${q}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
15
+ `),{docsPath:F,name:"AbiFunctionNotFoundError"})}}se.AbiFunctionNotFoundError=_;class g extends n.BaseError{constructor(q,{docsPath:F}){super([`Function "${q}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
16
+ `),{docsPath:F,name:"AbiFunctionOutputsNotFoundError"})}}se.AbiFunctionOutputsNotFoundError=g;class P extends n.BaseError{constructor(q,{docsPath:F}){super([`Encoded function signature "${q}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${q}.`].join(`
17
+ `),{docsPath:F,name:"AbiFunctionSignatureNotFoundError"})}}se.AbiFunctionSignatureNotFoundError=P;class d extends n.BaseError{constructor(q,F){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${q.type}\` in \`${(0,e.formatAbiItem)(q.abiItem)}\`, and`,`\`${F.type}\` in \`${(0,e.formatAbiItem)(F.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}se.AbiItemAmbiguityError=d;class w extends n.BaseError{constructor({expectedSize:q,givenSize:F}){super(`Expected bytes${q}, got bytes${F}.`,{name:"BytesSizeMismatchError"})}}se.BytesSizeMismatchError=w;class E extends n.BaseError{constructor({abiItem:q,data:F,params:H,size:j}){super([`Data size of ${j} bytes is too small for non-indexed event parameters.`].join(`
18
+ `),{metaMessages:[`Params: (${(0,e.formatAbiParams)(H,{includeName:!0})})`,`Data: ${F} (${j} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=q,this.data=F,this.params=H,this.size=j}}se.DecodeLogDataMismatch=E;class p extends n.BaseError{constructor({abiItem:q,param:F}){super([`Expected a topic for indexed event parameter${F.name?` "${F.name}"`:""} on event "${(0,e.formatAbiItem)(q,{includeName:!0})}".`].join(`
19
+ `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=q}}se.DecodeLogTopicsMismatch=p;class S extends n.BaseError{constructor(q,{docsPath:F}){super([`Type "${q}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
20
+ `),{docsPath:F,name:"InvalidAbiEncodingType"})}}se.InvalidAbiEncodingTypeError=S;class A extends n.BaseError{constructor(q,{docsPath:F}){super([`Type "${q}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
21
+ `),{docsPath:F,name:"InvalidAbiDecodingType"})}}se.InvalidAbiDecodingTypeError=A;class T extends n.BaseError{constructor(q){super([`Value "${q}" is not a valid array.`].join(`
22
+ `),{name:"InvalidArrayError"})}}se.InvalidArrayError=T;class C extends n.BaseError{constructor(q){super([`"${q}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
23
+ `),{name:"InvalidDefinitionTypeError"})}}se.InvalidDefinitionTypeError=C;class I extends n.BaseError{constructor(q){super(`Type "${q}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}return se.UnsupportedPackedAbiType=I,se}var to={},Ql;function ig(){if(Ql)return to;Ql=1,Object.defineProperty(to,"__esModule",{value:!0}),to.FilterTypeNotSupportedError=void 0;const e=ue();class r extends e.BaseError{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}return to.FilterTypeNotSupportedError=r,to}var ir={},sn={},Ut={},e0;function Hu(){if(e0)return Ut;e0=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.InvalidBytesLengthError=Ut.SizeExceedsPaddingSizeError=Ut.SliceOffsetOutOfBoundsError=void 0;const e=ue();class r extends e.BaseError{constructor({offset:s,position:i,size:a}){super(`Slice ${i==="start"?"starting":"ending"} at offset "${s}" is out-of-bounds (size: ${a}).`,{name:"SliceOffsetOutOfBoundsError"})}}Ut.SliceOffsetOutOfBoundsError=r;class n extends e.BaseError{constructor({size:s,targetSize:i,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} size (${s}) exceeds padding size (${i}).`,{name:"SizeExceedsPaddingSizeError"})}}Ut.SizeExceedsPaddingSizeError=n;class t extends e.BaseError{constructor({size:s,targetSize:i,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} is expected to be ${i} ${a} long, but is ${s} ${a} long.`,{name:"InvalidBytesLengthError"})}}return Ut.InvalidBytesLengthError=t,Ut}var t0;function mr(){if(t0)return sn;t0=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.pad=r,sn.padHex=n,sn.padBytes=t;const e=Hu();function r(o,{dir:s,size:i=32}={}){return typeof o=="string"?n(o,{dir:s,size:i}):t(o,{dir:s,size:i})}function n(o,{dir:s,size:i=32}={}){if(i===null)return o;const a=o.replace("0x","");if(a.length>i*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(a.length/2),targetSize:i,type:"hex"});return`0x${a[s==="right"?"padEnd":"padStart"](i*2,"0")}`}function t(o,{dir:s,size:i=32}={}){if(i===null)return o;if(o.length>i)throw new e.SizeExceedsPaddingSizeError({size:o.length,targetSize:i,type:"bytes"});const a=new Uint8Array(i);for(let c=0;c<i;c++){const u=s==="right";a[u?c:i-c-1]=o[u?c:o.length-c-1]}return a}return sn}var Lt={},at={},r0;function Sn(){if(r0)return at;r0=1,Object.defineProperty(at,"__esModule",{value:!0}),at.SizeOverflowError=at.InvalidHexValueError=at.InvalidHexBooleanError=at.InvalidBytesBooleanError=at.IntegerOutOfRangeError=void 0;const e=ue();class r extends e.BaseError{constructor({max:a,min:c,signed:u,size:l,value:f}){super(`Number "${f}" is not in safe ${l?`${l*8}-bit ${u?"signed":"unsigned"} `:""}integer range ${a?`(${c} to ${a})`:`(above ${c})`}`,{name:"IntegerOutOfRangeError"})}}at.IntegerOutOfRangeError=r;class n extends e.BaseError{constructor(a){super(`Bytes value "${a}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}at.InvalidBytesBooleanError=n;class t extends e.BaseError{constructor(a){super(`Hex value "${a}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}at.InvalidHexBooleanError=t;class o extends e.BaseError{constructor(a){super(`Hex value "${a}" is an odd length (${a.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}at.InvalidHexValueError=o;class s extends e.BaseError{constructor({givenSize:a,maxSize:c}){super(`Size cannot exceed ${c} bytes. Given size: ${a} bytes.`,{name:"SizeOverflowError"})}}return at.SizeOverflowError=s,at}var Ci={},n0;function er(){if(n0)return Ci;n0=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.trim=e;function e(r,{dir:n="left"}={}){let t=typeof r=="string"?r.replace("0x",""):r,o=0;for(let s=0;s<t.length-1&&t[n==="left"?s:t.length-s-1].toString()==="0";s++)o++;return t=n==="left"?t.slice(o):t.slice(0,t.length-o),typeof r=="string"?(t.length===1&&n==="right"&&(t=`${t}0`),`0x${t.length%2===1?`0${t}`:t}`):t}return Ci}var o0;function Be(){if(o0)return Lt;o0=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.assertSize=o,Lt.fromHex=s,Lt.hexToBigInt=i,Lt.hexToBool=a,Lt.hexToNumber=c,Lt.hexToString=u;const e=Sn(),r=Ue(),n=er(),t=Ee();function o(l,{size:f}){if((0,r.size)(l)>f)throw new e.SizeOverflowError({givenSize:(0,r.size)(l),maxSize:f})}function s(l,f){const m=typeof f=="string"?{to:f}:f,y=m.to;return y==="number"?c(l,m):y==="bigint"?i(l,m):y==="string"?u(l,m):y==="boolean"?a(l,m):(0,t.hexToBytes)(l,m)}function i(l,f={}){const{signed:m}=f;f.size&&o(l,{size:f.size});const y=BigInt(l);if(!m)return y;const h=(l.length-2)/2,b=(1n<<BigInt(h)*8n-1n)-1n;return y<=b?y:y-BigInt(`0x${"f".padStart(h*2,"f")}`)-1n}function a(l,f={}){let m=l;if(f.size&&(o(m,{size:f.size}),m=(0,n.trim)(m)),(0,n.trim)(m)==="0x00")return!1;if((0,n.trim)(m)==="0x01")return!0;throw new e.InvalidHexBooleanError(m)}function c(l,f={}){const m=i(l,f),y=Number(m);if(!Number.isSafeInteger(y))throw new e.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:f.signed,size:f.size,value:`${m}n`});return y}function u(l,f={}){let m=(0,t.hexToBytes)(l);return f.size&&(o(m,{size:f.size}),m=(0,n.trim)(m,{dir:"right"})),new TextDecoder().decode(m)}return Lt}var ar={},i0;function oe(){if(i0)return ar;i0=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.toHex=o,ar.boolToHex=s,ar.bytesToHex=i,ar.numberToHex=a,ar.stringToHex=u;const e=Sn(),r=mr(),n=Be(),t=Array.from({length:256},(l,f)=>f.toString(16).padStart(2,"0"));function o(l,f={}){return typeof l=="number"||typeof l=="bigint"?a(l,f):typeof l=="string"?u(l,f):typeof l=="boolean"?s(l,f):i(l,f)}function s(l,f={}){const m=`0x${Number(l)}`;return typeof f.size=="number"?((0,n.assertSize)(m,{size:f.size}),(0,r.pad)(m,{size:f.size})):m}function i(l,f={}){let m="";for(let h=0;h<l.length;h++)m+=t[l[h]];const y=`0x${m}`;return typeof f.size=="number"?((0,n.assertSize)(y,{size:f.size}),(0,r.pad)(y,{dir:"right",size:f.size})):y}function a(l,f={}){const{signed:m,size:y}=f,h=BigInt(l);let b;y?m?b=(1n<<BigInt(y)*8n-1n)-1n:b=2n**(BigInt(y)*8n)-1n:typeof l=="number"&&(b=BigInt(Number.MAX_SAFE_INTEGER));const v=typeof b=="bigint"&&m?-b-1n:0;if(b&&h>b||h<v){const g=typeof l=="bigint"?"n":"";throw new e.IntegerOutOfRangeError({max:b?`${b}${g}`:void 0,min:`${v}${g}`,signed:m,size:y,value:`${l}${g}`})}const _=`0x${(m&&h<0?(1n<<BigInt(y*8))+BigInt(h):h).toString(16)}`;return y?(0,r.pad)(_,{size:y}):_}const c=new TextEncoder;function u(l,f={}){const m=c.encode(l);return i(m,f)}return ar}var a0;function Ee(){if(a0)return ir;a0=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.toBytes=i,ir.boolToBytes=a,ir.hexToBytes=l,ir.numberToBytes=f,ir.stringToBytes=m;const e=ue(),r=Ze(),n=mr(),t=Be(),o=oe(),s=new TextEncoder;function i(y,h={}){return typeof y=="number"||typeof y=="bigint"?f(y,h):typeof y=="boolean"?a(y,h):(0,r.isHex)(y)?l(y,h):m(y,h)}function a(y,h={}){const b=new Uint8Array(1);return b[0]=Number(y),typeof h.size=="number"?((0,t.assertSize)(b,{size:h.size}),(0,n.pad)(b,{size:h.size})):b}const c={zero:48,nine:57,A:65,F:70,a:97,f:102};function u(y){if(y>=c.zero&&y<=c.nine)return y-c.zero;if(y>=c.A&&y<=c.F)return y-(c.A-10);if(y>=c.a&&y<=c.f)return y-(c.a-10)}function l(y,h={}){let b=y;h.size&&((0,t.assertSize)(b,{size:h.size}),b=(0,n.pad)(b,{dir:"right",size:h.size}));let v=b.slice(2);v.length%2&&(v=`0${v}`);const _=v.length/2,g=new Uint8Array(_);for(let P=0,d=0;P<_;P++){const w=u(v.charCodeAt(d++)),E=u(v.charCodeAt(d++));if(w===void 0||E===void 0)throw new e.BaseError(`Invalid byte sequence ("${v[d-2]}${v[d-1]}" in "${v}").`);g[P]=w*16+E}return g}function f(y,h){const b=(0,o.numberToHex)(y,h);return l(b)}function m(y,h={}){const b=s.encode(y);return typeof h.size=="number"?((0,t.assertSize)(b,{size:h.size}),(0,n.pad)(b,{dir:"right",size:h.size})):b}return ir}var xi={},je={},de={},s0;function ag(){if(s0)return de;s0=1,Object.defineProperty(de,"__esModule",{value:!0}),de.toBig=de.shrSL=de.shrSH=de.rotrSL=de.rotrSH=de.rotrBL=de.rotrBH=de.rotr32L=de.rotr32H=de.rotlSL=de.rotlSH=de.rotlBL=de.rotlBH=de.add5L=de.add5H=de.add4L=de.add4H=de.add3L=de.add3H=void 0,de.add=_,de.fromBig=n,de.split=t;const e=BigInt(2**32-1),r=BigInt(32);function n(A,T=!1){return T?{h:Number(A&e),l:Number(A>>r&e)}:{h:Number(A>>r&e)|0,l:Number(A&e)|0}}function t(A,T=!1){const C=A.length;let I=new Uint32Array(C),R=new Uint32Array(C);for(let q=0;q<C;q++){const{h:F,l:H}=n(A[q],T);[I[q],R[q]]=[F,H]}return[I,R]}const o=(A,T)=>BigInt(A>>>0)<<r|BigInt(T>>>0);de.toBig=o;const s=(A,T,C)=>A>>>C;de.shrSH=s;const i=(A,T,C)=>A<<32-C|T>>>C;de.shrSL=i;const a=(A,T,C)=>A>>>C|T<<32-C;de.rotrSH=a;const c=(A,T,C)=>A<<32-C|T>>>C;de.rotrSL=c;const u=(A,T,C)=>A<<64-C|T>>>C-32;de.rotrBH=u;const l=(A,T,C)=>A>>>C-32|T<<64-C;de.rotrBL=l;const f=(A,T)=>T;de.rotr32H=f;const m=(A,T)=>A;de.rotr32L=m;const y=(A,T,C)=>A<<C|T>>>32-C;de.rotlSH=y;const h=(A,T,C)=>T<<C|A>>>32-C;de.rotlSL=h;const b=(A,T,C)=>T<<C-32|A>>>64-C;de.rotlBH=b;const v=(A,T,C)=>A<<C-32|T>>>64-C;de.rotlBL=v;function _(A,T,C,I){const R=(T>>>0)+(I>>>0);return{h:A+C+(R/2**32|0)|0,l:R|0}}const g=(A,T,C)=>(A>>>0)+(T>>>0)+(C>>>0);de.add3L=g;const P=(A,T,C,I)=>T+C+I+(A/2**32|0)|0;de.add3H=P;const d=(A,T,C,I)=>(A>>>0)+(T>>>0)+(C>>>0)+(I>>>0);de.add4L=d;const w=(A,T,C,I,R)=>T+C+I+R+(A/2**32|0)|0;de.add4H=w;const E=(A,T,C,I,R)=>(A>>>0)+(T>>>0)+(C>>>0)+(I>>>0)+(R>>>0);de.add5L=E;const p=(A,T,C,I,R,q)=>T+C+I+R+q+(A/2**32|0)|0;de.add5H=p;const S={fromBig:n,split:t,toBig:o,shrSH:s,shrSL:i,rotrSH:a,rotrSL:c,rotrBH:u,rotrBL:l,rotr32H:f,rotr32L:m,rotlSH:y,rotlSL:h,rotlBH:b,rotlBL:v,add:_,add3L:g,add3H:P,add4L:d,add4H:w,add5H:p,add5L:E};return de.default=S,de}var Cd={},ro={},c0;function Vv(){return c0||(c0=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.crypto=void 0,ro.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),ro}var u0;function hr(){return u0||(u0=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=t,e.abytes=o,e.ahash=s,e.aexists=i,e.aoutput=a,e.u8=c,e.u32=u,e.clean=l,e.createView=f,e.rotr=m,e.rotl=y,e.byteSwap=h,e.byteSwap32=b,e.bytesToHex=g,e.hexToBytes=w,e.asyncLoop=p,e.utf8ToBytes=S,e.bytesToUtf8=A,e.toBytes=T,e.kdfInputToBytes=C,e.concatBytes=I,e.checkOpts=R,e.createHasher=F,e.createOptHasher=H,e.createXOFer=j,e.randomBytes=k;const r=Vv();function n(B){return B instanceof Uint8Array||ArrayBuffer.isView(B)&&B.constructor.name==="Uint8Array"}function t(B){if(!Number.isSafeInteger(B)||B<0)throw new Error("positive integer expected, got "+B)}function o(B,...O){if(!n(B))throw new Error("Uint8Array expected");if(O.length>0&&!O.includes(B.length))throw new Error("Uint8Array expected of length "+O+", got length="+B.length)}function s(B){if(typeof B!="function"||typeof B.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");t(B.outputLen),t(B.blockLen)}function i(B,O=!0){if(B.destroyed)throw new Error("Hash instance has been destroyed");if(O&&B.finished)throw new Error("Hash#digest() has already been called")}function a(B,O){o(B);const x=O.outputLen;if(B.length<x)throw new Error("digestInto() expects output buffer of length at least "+x)}function c(B){return new Uint8Array(B.buffer,B.byteOffset,B.byteLength)}function u(B){return new Uint32Array(B.buffer,B.byteOffset,Math.floor(B.byteLength/4))}function l(...B){for(let O=0;O<B.length;O++)B[O].fill(0)}function f(B){return new DataView(B.buffer,B.byteOffset,B.byteLength)}function m(B,O){return B<<32-O|B>>>O}function y(B,O){return B<<O|B>>>32-O>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function h(B){return B<<24&4278190080|B<<8&16711680|B>>>8&65280|B>>>24&255}e.swap8IfBE=e.isLE?B=>B:B=>h(B),e.byteSwapIfBE=e.swap8IfBE;function b(B){for(let O=0;O<B.length;O++)B[O]=h(B[O]);return B}e.swap32IfBE=e.isLE?B=>B:b;const v=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",_=Array.from({length:256},(B,O)=>O.toString(16).padStart(2,"0"));function g(B){if(o(B),v)return B.toHex();let O="";for(let x=0;x<B.length;x++)O+=_[B[x]];return O}const P={_0:48,_9:57,A:65,F:70,a:97,f:102};function d(B){if(B>=P._0&&B<=P._9)return B-P._0;if(B>=P.A&&B<=P.F)return B-(P.A-10);if(B>=P.a&&B<=P.f)return B-(P.a-10)}function w(B){if(typeof B!="string")throw new Error("hex string expected, got "+typeof B);if(v)return Uint8Array.fromHex(B);const O=B.length,x=O/2;if(O%2)throw new Error("hex string expected, got unpadded hex of length "+O);const M=new Uint8Array(x);for(let N=0,z=0;N<x;N++,z+=2){const $=d(B.charCodeAt(z)),U=d(B.charCodeAt(z+1));if($===void 0||U===void 0){const G=B[z]+B[z+1];throw new Error('hex string expected, got non-hex character "'+G+'" at index '+z)}M[N]=$*16+U}return M}const E=async()=>{};e.nextTick=E;async function p(B,O,x){let M=Date.now();for(let N=0;N<B;N++){x(N);const z=Date.now()-M;z>=0&&z<O||(await(0,e.nextTick)(),M+=z)}}function S(B){if(typeof B!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(B))}function A(B){return new TextDecoder().decode(B)}function T(B){return typeof B=="string"&&(B=S(B)),o(B),B}function C(B){return typeof B=="string"&&(B=S(B)),o(B),B}function I(...B){let O=0;for(let M=0;M<B.length;M++){const N=B[M];o(N),O+=N.length}const x=new Uint8Array(O);for(let M=0,N=0;M<B.length;M++){const z=B[M];x.set(z,N),N+=z.length}return x}function R(B,O){if(O!==void 0&&{}.toString.call(O)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(B,O)}class q{}e.Hash=q;function F(B){const O=M=>B().update(T(M)).digest(),x=B();return O.outputLen=x.outputLen,O.blockLen=x.blockLen,O.create=()=>B(),O}function H(B){const O=(M,N)=>B(N).update(T(M)).digest(),x=B({});return O.outputLen=x.outputLen,O.blockLen=x.blockLen,O.create=M=>B(M),O}function j(B){const O=(M,N)=>B(N).update(T(M)).digest(),x=B({});return O.outputLen=x.outputLen,O.blockLen=x.blockLen,O.create=M=>B(M),O}e.wrapConstructor=F,e.wrapConstructorWithOpts=H,e.wrapXOFConstructorWithOpts=j;function k(B=32){if(r.crypto&&typeof r.crypto.getRandomValues=="function")return r.crypto.getRandomValues(new Uint8Array(B));if(r.crypto&&typeof r.crypto.randomBytes=="function")return Uint8Array.from(r.crypto.randomBytes(B));throw new Error("crypto.getRandomValues must be defined")}})(Cd)),Cd}var d0;function sg(){if(d0)return je;d0=1,Object.defineProperty(je,"__esModule",{value:!0}),je.shake256=je.shake128=je.keccak_512=je.keccak_384=je.keccak_256=je.keccak_224=je.sha3_512=je.sha3_384=je.sha3_256=je.sha3_224=je.Keccak=void 0,je.keccakP=v;const e=ag(),r=hr(),n=BigInt(0),t=BigInt(1),o=BigInt(2),s=BigInt(7),i=BigInt(256),a=BigInt(113),c=[],u=[],l=[];for(let d=0,w=t,E=1,p=0;d<24;d++){[E,p]=[p,(2*E+3*p)%5],c.push(2*(5*p+E)),u.push((d+1)*(d+2)/2%64);let S=n;for(let A=0;A<7;A++)w=(w<<t^(w>>s)*a)%i,w&o&&(S^=t<<(t<<BigInt(A))-t);l.push(S)}const f=(0,e.split)(l,!0),m=f[0],y=f[1],h=(d,w,E)=>E>32?(0,e.rotlBH)(d,w,E):(0,e.rotlSH)(d,w,E),b=(d,w,E)=>E>32?(0,e.rotlBL)(d,w,E):(0,e.rotlSL)(d,w,E);function v(d,w=24){const E=new Uint32Array(10);for(let p=24-w;p<24;p++){for(let T=0;T<10;T++)E[T]=d[T]^d[T+10]^d[T+20]^d[T+30]^d[T+40];for(let T=0;T<10;T+=2){const C=(T+8)%10,I=(T+2)%10,R=E[I],q=E[I+1],F=h(R,q,1)^E[C],H=b(R,q,1)^E[C+1];for(let j=0;j<50;j+=10)d[T+j]^=F,d[T+j+1]^=H}let S=d[2],A=d[3];for(let T=0;T<24;T++){const C=u[T],I=h(S,A,C),R=b(S,A,C),q=c[T];S=d[q],A=d[q+1],d[q]=I,d[q+1]=R}for(let T=0;T<50;T+=10){for(let C=0;C<10;C++)E[C]=d[T+C];for(let C=0;C<10;C++)d[T+C]^=~E[(C+2)%10]&E[(C+4)%10]}d[0]^=m[p],d[1]^=y[p]}(0,r.clean)(E)}class _ extends r.Hash{constructor(w,E,p,S=!1,A=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=w,this.suffix=E,this.outputLen=p,this.enableXOF=S,this.rounds=A,(0,r.anumber)(p),!(0<w&&w<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,r.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,r.swap32IfBE)(this.state32),v(this.state32,this.rounds),(0,r.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(w){(0,r.aexists)(this),w=(0,r.toBytes)(w),(0,r.abytes)(w);const{blockLen:E,state:p}=this,S=w.length;for(let A=0;A<S;){const T=Math.min(E-this.pos,S-A);for(let C=0;C<T;C++)p[this.pos++]^=w[A++];this.pos===E&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:w,suffix:E,pos:p,blockLen:S}=this;w[p]^=E,(E&128)!==0&&p===S-1&&this.keccak(),w[S-1]^=128,this.keccak()}writeInto(w){(0,r.aexists)(this,!1),(0,r.abytes)(w),this.finish();const E=this.state,{blockLen:p}=this;for(let S=0,A=w.length;S<A;){this.posOut>=p&&this.keccak();const T=Math.min(p-this.posOut,A-S);w.set(E.subarray(this.posOut,this.posOut+T),S),this.posOut+=T,S+=T}return w}xofInto(w){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(w)}xof(w){return(0,r.anumber)(w),this.xofInto(new Uint8Array(w))}digestInto(w){if((0,r.aoutput)(w,this),this.finished)throw new Error("digest() was already called");return this.writeInto(w),this.destroy(),w}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,r.clean)(this.state)}_cloneInto(w){const{blockLen:E,suffix:p,outputLen:S,rounds:A,enableXOF:T}=this;return w||(w=new _(E,p,S,T,A)),w.state32.set(this.state32),w.pos=this.pos,w.posOut=this.posOut,w.finished=this.finished,w.rounds=A,w.suffix=p,w.outputLen=S,w.enableXOF=T,w.destroyed=this.destroyed,w}}je.Keccak=_;const g=(d,w,E)=>(0,r.createHasher)(()=>new _(w,d,E));je.sha3_224=g(6,144,224/8),je.sha3_256=g(6,136,256/8),je.sha3_384=g(6,104,384/8),je.sha3_512=g(6,72,512/8),je.keccak_224=g(1,144,224/8),je.keccak_256=g(1,136,256/8),je.keccak_384=g(1,104,384/8),je.keccak_512=g(1,72,512/8);const P=(d,w,E)=>(0,r.createXOFer)((p={})=>new _(w,d,p.dkLen===void 0?E:p.dkLen,!0));return je.shake128=P(31,168,128/8),je.shake256=P(31,136,256/8),je}var f0;function tt(){if(f0)return xi;f0=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.keccak256=o;const e=sg(),r=Ze(),n=Ee(),t=oe();function o(s,i){const a=i||"hex",c=(0,e.keccak_256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return xi}var no={},qi={},Mi={},l0;function Wv(){if(l0)return Mi;l0=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.hashSignature=t;const e=Ee(),r=tt(),n=o=>(0,r.keccak256)((0,e.toBytes)(o));function t(o){return n(o)}return Mi}var oo={},ki={},b0;function Kv(){if(b0)return ki;b0=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.normalizeSignature=r;const e=ue();function r(n){let t=!0,o="",s=0,i="",a=!1;for(let c=0;c<n.length;c++){const u=n[c];if(["(",")",","].includes(u)&&(t=!0),u==="("&&s++,u===")"&&s--,!!t){if(s===0){if(u===" "&&["event","function",""].includes(i))i="";else if(i+=u,u===")"){a=!0;break}continue}if(u===" "){n[c-1]!==","&&o!==","&&o!==",("&&(o="",t=!1);continue}i+=u,o+=u}}if(!a)throw new e.BaseError("Unable to normalize signature.");return i}return ki}var m0;function sf(){if(m0)return oo;m0=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.toSignature=void 0;const e=br(),r=Kv(),n=t=>{const o=typeof t=="string"?t:(0,e.formatAbiItem)(t);return(0,r.normalizeSignature)(o)};return oo.toSignature=n,oo}var h0;function Fu(){if(h0)return qi;h0=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.toSignatureHash=n;const e=Wv(),r=sf();function n(t){return(0,e.hashSignature)((0,r.toSignature)(t))}return qi}var y0;function In(){if(y0)return no;y0=1,Object.defineProperty(no,"__esModule",{value:!0}),no.toEventSelector=void 0;const e=Fu();return no.toEventSelector=e.toSignatureHash,no}var io={},ao={},p0;function At(){if(p0)return ao;p0=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.InvalidAddressError=void 0;const e=ue();class r extends e.BaseError{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}return ao.InvalidAddressError=r,ao}var xd={},so={},g0;function Wr(){if(g0)return so;g0=1,Object.defineProperty(so,"__esModule",{value:!0}),so.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&(super.delete(n),super.set(n,t)),t}set(n,t){if(super.has(n)&&super.delete(n),super.set(n,t),this.maxSize&&this.size>this.maxSize){const o=super.keys().next().value;o!==void 0&&super.delete(o)}return this}}return so.LruMap=e,so}var co={},_0;function Je(){if(_0)return co;_0=1,Object.defineProperty(co,"__esModule",{value:!0}),co.checksumAddress=i,co.getAddress=a;const e=At(),r=Ee(),n=tt(),t=Wr(),o=rt(),s=new t.LruMap(8192);function i(c,u){if(s.has(`${c}.${u}`))return s.get(`${c}.${u}`);const l=u?`${u}${c.toLowerCase()}`:c.substring(2).toLowerCase(),f=(0,n.keccak256)((0,r.stringToBytes)(l),"bytes"),m=(u?l.substring(`${u}0x`.length):l).split("");for(let h=0;h<40;h+=2)f[h>>1]>>4>=8&&m[h]&&(m[h]=m[h].toUpperCase()),(f[h>>1]&15)>=8&&m[h+1]&&(m[h+1]=m[h+1].toUpperCase());const y=`0x${m.join("")}`;return s.set(`${c}.${u}`,y),y}function a(c,u){if(!(0,o.isAddress)(c,{strict:!1}))throw new e.InvalidAddressError({address:c});return i(c,u)}return co}var v0;function rt(){return v0||(v0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAddressCache=void 0,e.isAddress=o;const r=Wr(),n=Je(),t=/^0x[a-fA-F0-9]{40}$/;e.isAddressCache=new r.LruMap(8192);function o(s,i){const{strict:a=!0}=i??{},c=`${s}.${a}`;if(e.isAddressCache.has(c))return e.isAddressCache.get(c);const u=t.test(s)?s.toLowerCase()===s?!0:a?(0,n.checksumAddress)(s)===s:!0:!1;return e.isAddressCache.set(c,u),u}})(xd)),xd}var cn={},E0;function qe(){if(E0)return cn;E0=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.concat=e,cn.concatBytes=r,cn.concatHex=n;function e(t){return typeof t[0]=="string"?n(t):r(t)}function r(t){let o=0;for(const a of t)o+=a.length;const s=new Uint8Array(o);let i=0;for(const a of t)s.set(a,i),i+=a.length;return s}function n(t){return`0x${t.reduce((o,s)=>o+s.replace("0x",""),"")}`}return cn}var un={},j0;function ft(){if(j0)return un;j0=1,Object.defineProperty(un,"__esModule",{value:!0}),un.slice=t,un.sliceBytes=i,un.sliceHex=a;const e=Hu(),r=Ze(),n=Ue();function t(c,u,l,{strict:f}={}){return(0,r.isHex)(c,{strict:!1})?a(c,u,l,{strict:f}):i(c,u,l,{strict:f})}function o(c,u){if(typeof u=="number"&&u>0&&u>(0,n.size)(c)-1)throw new e.SliceOffsetOutOfBoundsError({offset:u,position:"start",size:(0,n.size)(c)})}function s(c,u,l){if(typeof u=="number"&&typeof l=="number"&&(0,n.size)(c)!==l-u)throw new e.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:(0,n.size)(c)})}function i(c,u,l,{strict:f}={}){o(c,u);const m=c.slice(u,l);return f&&s(m,u,l),m}function a(c,u,l,{strict:f}={}){o(c,u);const m=`0x${c.replace("0x","").slice((u??0)*2,(l??c.length)*2)}`;return f&&s(m,u,l),m}return un}var Dt={},w0;function Nu(){return w0||(w0=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.integerRegex=Dt.bytesRegex=Dt.arrayRegex=void 0,Dt.arrayRegex=/^(.*)\[([0-9]*)\]$/,Dt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Dt.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/),Dt}var P0;function Tt(){if(P0)return io;P0=1,Object.defineProperty(io,"__esModule",{value:!0}),io.encodeAbiParameters=f,io.getArrayComponents=E;const e=Se(),r=At(),n=ue(),t=Sn(),o=rt(),s=qe(),i=mr(),a=Ue(),c=ft(),u=oe(),l=Nu();function f(p,S){if(p.length!==S.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:p.length,givenLength:S.length});const A=m({params:p,values:S}),T=h(A);return T.length===0?"0x":T}function m({params:p,values:S}){const A=[];for(let T=0;T<p.length;T++)A.push(y({param:p[T],value:S[T]}));return A}function y({param:p,value:S}){const A=E(p.type);if(A){const[T,C]=A;return v(S,{length:T,param:{...p,type:C}})}if(p.type==="tuple")return w(S,{param:p});if(p.type==="address")return b(S);if(p.type==="bool")return g(S);if(p.type.startsWith("uint")||p.type.startsWith("int")){const T=p.type.startsWith("int"),[,,C="256"]=l.integerRegex.exec(p.type)??[];return P(S,{signed:T,size:Number(C)})}if(p.type.startsWith("bytes"))return _(S,{param:p});if(p.type==="string")return d(S);throw new e.InvalidAbiEncodingTypeError(p.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function h(p){let S=0;for(let I=0;I<p.length;I++){const{dynamic:R,encoded:q}=p[I];R?S+=32:S+=(0,a.size)(q)}const A=[],T=[];let C=0;for(let I=0;I<p.length;I++){const{dynamic:R,encoded:q}=p[I];R?(A.push((0,u.numberToHex)(S+C,{size:32})),T.push(q),C+=(0,a.size)(q)):A.push(q)}return(0,s.concat)([...A,...T])}function b(p){if(!(0,o.isAddress)(p))throw new r.InvalidAddressError({address:p});return{dynamic:!1,encoded:(0,i.padHex)(p.toLowerCase())}}function v(p,{length:S,param:A}){const T=S===null;if(!Array.isArray(p))throw new e.InvalidArrayError(p);if(!T&&p.length!==S)throw new e.AbiEncodingArrayLengthMismatchError({expectedLength:S,givenLength:p.length,type:`${A.type}[${S}]`});let C=!1;const I=[];for(let R=0;R<p.length;R++){const q=y({param:A,value:p[R]});q.dynamic&&(C=!0),I.push(q)}if(T||C){const R=h(I);if(T){const q=(0,u.numberToHex)(I.length,{size:32});return{dynamic:!0,encoded:I.length>0?(0,s.concat)([q,R]):q}}if(C)return{dynamic:!0,encoded:R}}return{dynamic:!1,encoded:(0,s.concat)(I.map(({encoded:R})=>R))}}function _(p,{param:S}){const[,A]=S.type.split("bytes"),T=(0,a.size)(p);if(!A){let C=p;return T%32!==0&&(C=(0,i.padHex)(C,{dir:"right",size:Math.ceil((p.length-2)/2/32)*32})),{dynamic:!0,encoded:(0,s.concat)([(0,i.padHex)((0,u.numberToHex)(T,{size:32})),C])}}if(T!==Number.parseInt(A,10))throw new e.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(A,10),value:p});return{dynamic:!1,encoded:(0,i.padHex)(p,{dir:"right"})}}function g(p){if(typeof p!="boolean")throw new n.BaseError(`Invalid boolean value: "${p}" (type: ${typeof p}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,i.padHex)((0,u.boolToHex)(p))}}function P(p,{signed:S,size:A=256}){if(typeof A=="number"){const T=2n**(BigInt(A)-(S?1n:0n))-1n,C=S?-T-1n:0n;if(p>T||p<C)throw new t.IntegerOutOfRangeError({max:T.toString(),min:C.toString(),signed:S,size:A/8,value:p.toString()})}return{dynamic:!1,encoded:(0,u.numberToHex)(p,{size:32,signed:S})}}function d(p){const S=(0,u.stringToHex)(p),A=Math.ceil((0,a.size)(S)/32),T=[];for(let C=0;C<A;C++)T.push((0,i.padHex)((0,c.slice)(S,C*32,(C+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,s.concat)([(0,i.padHex)((0,u.numberToHex)((0,a.size)(S),{size:32})),...T])}}function w(p,{param:S}){let A=!1;const T=[];for(let C=0;C<S.components.length;C++){const I=S.components[C],R=Array.isArray(p)?C:I.name,q=y({param:I,value:p[R]});T.push(q),q.dynamic&&(A=!0)}return{dynamic:A,encoded:A?h(T):(0,s.concat)(T.map(({encoded:C})=>C))}}function E(p){const S=p.match(/^(.*)\[(\d+)?\]$/);return S?[S[2]?Number(S[2]):null,S[1]]:void 0}return io}var dn={},uo={},A0;function Kr(){if(A0)return uo;A0=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.toFunctionSelector=void 0;const e=ft(),r=Fu(),n=t=>(0,e.slice)((0,r.toSignatureHash)(t),0,4);return uo.toFunctionSelector=n,uo}var T0;function tr(){if(T0)return dn;T0=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.getAbiItem=s,dn.isArgOfType=i,dn.getAmbiguousTypes=a;const e=Se(),r=Ze(),n=rt(),t=In(),o=Kr();function s(c){const{abi:u,args:l=[],name:f}=c,m=(0,r.isHex)(f,{strict:!1}),y=u.filter(b=>m?b.type==="function"?(0,o.toFunctionSelector)(b)===f:b.type==="event"?(0,t.toEventSelector)(b)===f:!1:"name"in b&&b.name===f);if(y.length===0)return;if(y.length===1)return y[0];let h;for(const b of y){if(!("inputs"in b))continue;if(!l||l.length===0){if(!b.inputs||b.inputs.length===0)return b;continue}if(!b.inputs||b.inputs.length===0||b.inputs.length!==l.length)continue;if(l.every((_,g)=>{const P="inputs"in b&&b.inputs[g];return P?i(_,P):!1})){if(h&&"inputs"in h&&h.inputs){const _=a(b.inputs,h.inputs,l);if(_)throw new e.AbiItemAmbiguityError({abiItem:b,type:_[0]},{abiItem:h,type:_[1]})}h=b}}return h||y[0]}function i(c,u){const l=typeof c,f=u.type;switch(f){case"address":return(0,n.isAddress)(c,{strict:!1});case"bool":return l==="boolean";case"function":return l==="string";case"string":return l==="string";default:return f==="tuple"&&"components"in u?Object.values(u.components).every((m,y)=>l==="object"&&i(Object.values(c)[y],m)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(f)?l==="number"||l==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(f)?l==="string"||c instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(f)?Array.isArray(c)&&c.every(m=>i(m,{...u,type:f.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function a(c,u,l){for(const f in c){const m=c[f],y=u[f];if(m.type==="tuple"&&y.type==="tuple"&&"components"in m&&"components"in y)return a(m.components,y.components,l[f]);const h=[m.type,y.type];if(h.includes("address")&&h.includes("bytes20")?!0:h.includes("address")&&h.includes("string")?(0,n.isAddress)(l[f],{strict:!1}):h.includes("address")&&h.includes("bytes")?(0,n.isAddress)(l[f],{strict:!1}):!1)return h}}return dn}var S0;function Zr(){if(S0)return Ri;S0=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.encodeEventTopics=u;const e=Se(),r=ig(),n=Ee(),t=tt(),o=In(),s=Tt(),i=Qt(),a=tr(),c="/docs/contract/encodeEventTopics";function u(f){var P;const{abi:m,eventName:y,args:h}=f;let b=m[0];if(y){const d=(0,a.getAbiItem)({abi:m,name:y});if(!d)throw new e.AbiEventNotFoundError(y,{docsPath:c});b=d}if(b.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:c});let v=[];if(h&&"inputs"in b){const d=(P=b.inputs)==null?void 0:P.filter(E=>"indexed"in E&&E.indexed),w=Array.isArray(h)?h:Object.values(h).length>0?(d==null?void 0:d.map(E=>h[E.name]))??[]:[];w.length>0&&(v=(d==null?void 0:d.map((E,p)=>Array.isArray(w[p])?w[p].map((S,A)=>l({param:E,value:w[p][A]})):typeof w[p]<"u"&&w[p]!==null?l({param:E,value:w[p]}):null))??[])}if(b.anonymous)return v;const _=(0,i.formatAbiItem)(b);return[(0,o.toEventSelector)(_),...v]}function l({param:f,value:m}){if(f.type==="string"||f.type==="bytes")return(0,t.keccak256)((0,n.toBytes)(m));if(f.type==="tuple"||f.type.match(/^(.*)\[(\d+)?\]$/))throw new r.FilterTypeNotSupportedError(f.type);return(0,s.encodeAbiParameters)([f],[m])}return Ri}var Hi={},I0;function $u(){if(I0)return Hi;I0=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.createFilterRequestScope=e;function e(r,{method:n}){var o,s;const t={};return r.transport.type==="fallback"&&((s=(o=r.transport).onResponse)==null||s.call(o,({method:i,response:a,status:c,transport:u})=>{c==="success"&&n===i&&(t[a]=u.request)})),(i=>t[i]||r.request)}return Hi}var R0;function cf(){if(R0)return Ii;R0=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.createContractEventFilter=t;const e=Zr(),r=oe(),n=$u();async function t(o,s){const{address:i,abi:a,args:c,eventName:u,fromBlock:l,strict:f,toBlock:m}=s,y=(0,n.createFilterRequestScope)(o,{method:"eth_newFilter"}),h=u?(0,e.encodeEventTopics)({abi:a,args:c,eventName:u}):void 0,b=await o.request({method:"eth_newFilter",params:[{address:i,fromBlock:typeof l=="bigint"?(0,r.numberToHex)(l):l,toBlock:typeof m=="bigint"?(0,r.numberToHex)(m):m,topics:h}]});return{abi:a,args:c,eventName:u,id:b,request:y(b),strict:!!f,type:"event"}}return Ii}var Fi={},Ni={},B0;function Ie(){if(B0)return Ni;B0=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.parseAccount=e;function e(r){return typeof r=="string"?{address:r,type:"json-rpc"}:r}return Ni}var $i={},zi={},O0;function cg(){if(O0)return zi;O0=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.prepareEncodeFunctionData=s;const e=Se(),r=Kr(),n=Qt(),t=tr(),o="/docs/contract/encodeFunctionData";function s(i){const{abi:a,args:c,functionName:u}=i;let l=a[0];if(u){const f=(0,t.getAbiItem)({abi:a,args:c,name:u});if(!f)throw new e.AbiFunctionNotFoundError(u,{docsPath:o});l=f}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:o});return{abi:[l],functionName:(0,r.toFunctionSelector)((0,n.formatAbiItem)(l))}}return zi}var C0;function Le(){if(C0)return $i;C0=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.encodeFunctionData=t;const e=qe(),r=Tt(),n=cg();function t(o){const{args:s}=o,{abi:i,functionName:a}=(()=>{var f;return o.abi.length===1&&((f=o.functionName)!=null&&f.startsWith("0x"))?o:(0,n.prepareEncodeFunctionData)(o)})(),c=i[0],u=a,l="inputs"in c&&c.inputs?(0,r.encodeAbiParameters)(c.inputs,s??[]):void 0;return(0,e.concatHex)([u,l??"0x"])}return $i}var Ui={},Ge={},Gt={},x0;function zu(){return x0||(x0=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.solidityPanic=Gt.solidityError=Gt.panicReasons=void 0,Gt.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Gt.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Gt.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),Gt}var Li={},Di={},Gi={},Vt={},q0;function ug(){if(q0)return Vt;q0=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.RecursiveReadLimitExceededError=Vt.PositionOutOfBoundsError=Vt.NegativeOffsetError=void 0;const e=ue();class r extends e.BaseError{constructor({offset:s}){super(`Offset \`${s}\` cannot be negative.`,{name:"NegativeOffsetError"})}}Vt.NegativeOffsetError=r;class n extends e.BaseError{constructor({length:s,position:i}){super(`Position \`${i}\` is out of bounds (\`0 < position < ${s}\`).`,{name:"PositionOutOfBoundsError"})}}Vt.PositionOutOfBoundsError=n;class t extends e.BaseError{constructor({count:s,limit:i}){super(`Recursive read limit of \`${i}\` exceeded (recursive read count: \`${s}\`).`,{name:"RecursiveReadLimitExceededError"})}}return Vt.RecursiveReadLimitExceededError=t,Vt}var M0;function Do(){if(M0)return Gi;M0=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.createCursor=n;const e=ug(),r={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new e.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const o=this.position-t;this.assertPosition(o),this.position=o},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const o=this.position+t;this.assertPosition(o),this.position=o},inspectByte(t){const o=t??this.position;return this.assertPosition(o),this.bytes[o]},inspectBytes(t,o){const s=o??this.position;return this.assertPosition(s+t-1),this.bytes.subarray(s,s+t)},inspectUint8(t){const o=t??this.position;return this.assertPosition(o),this.bytes[o]},inspectUint16(t){const o=t??this.position;return this.assertPosition(o+1),this.dataView.getUint16(o)},inspectUint24(t){const o=t??this.position;return this.assertPosition(o+2),(this.dataView.getUint16(o)<<8)+this.dataView.getUint8(o+2)},inspectUint32(t){const o=t??this.position;return this.assertPosition(o+3),this.dataView.getUint32(o)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,o){this.assertReadLimit(),this._touch();const s=this.inspectBytes(t);return this.position+=o??t,s},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const o=this.position;return this.assertPosition(t),this.position=t,()=>this.position=o},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function n(t,{recursiveReadLimit:o=8192}={}){const s=Object.create(r);return s.bytes=t,s.dataView=new DataView(t.buffer??t,t.byteOffset,t.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=o,s}return Gi}var sr={},k0;function uf(){if(k0)return sr;k0=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.fromBytes=o,sr.bytesToBigInt=s,sr.bytesToBool=i,sr.bytesToNumber=a,sr.bytesToString=c;const e=Sn(),r=er(),n=Be(),t=oe();function o(u,l){const f=typeof l=="string"?{to:l}:l,m=f.to;return m==="number"?a(u,f):m==="bigint"?s(u,f):m==="boolean"?i(u,f):m==="string"?c(u,f):(0,t.bytesToHex)(u,f)}function s(u,l={}){typeof l.size<"u"&&(0,n.assertSize)(u,{size:l.size});const f=(0,t.bytesToHex)(u,l);return(0,n.hexToBigInt)(f,l)}function i(u,l={}){let f=u;if(typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,r.trim)(f)),f.length>1||f[0]>1)throw new e.InvalidBytesBooleanError(f);return!!f[0]}function a(u,l={}){typeof l.size<"u"&&(0,n.assertSize)(u,{size:l.size});const f=(0,t.bytesToHex)(u,l);return(0,n.hexToNumber)(f,l)}function c(u,l={}){let f=u;return typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,r.trim)(f,{dir:"right"})),new TextDecoder().decode(f)}return sr}var H0;function yr(){if(H0)return Di;H0=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.decodeAbiParameters=l;const e=Se(),r=Je(),n=Do(),t=Ue(),o=ft(),s=er(),i=uf(),a=Ee(),c=oe(),u=Tt();function l(E,p){const S=typeof p=="string"?(0,a.hexToBytes)(p):p,A=(0,n.createCursor)(S);if((0,t.size)(S)===0&&E.length>0)throw new e.AbiDecodingZeroDataError;if((0,t.size)(p)&&(0,t.size)(p)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof p=="string"?p:(0,c.bytesToHex)(p),params:E,size:(0,t.size)(p)});let T=0;const C=[];for(let I=0;I<E.length;++I){const R=E[I];A.setPosition(T);const[q,F]=f(A,R,{staticPosition:0});T+=F,C.push(q)}return C}function f(E,p,{staticPosition:S}){const A=(0,u.getArrayComponents)(p.type);if(A){const[T,C]=A;return b(E,{...p,type:C},{length:T,staticPosition:S})}if(p.type==="tuple")return P(E,p,{staticPosition:S});if(p.type==="address")return h(E);if(p.type==="bool")return v(E);if(p.type.startsWith("bytes"))return _(E,p,{staticPosition:S});if(p.type.startsWith("uint")||p.type.startsWith("int"))return g(E,p);if(p.type==="string")return d(E,{staticPosition:S});throw new e.InvalidAbiDecodingTypeError(p.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const m=32,y=32;function h(E){const p=E.readBytes(32);return[(0,r.checksumAddress)((0,c.bytesToHex)((0,o.sliceBytes)(p,-20))),32]}function b(E,p,{length:S,staticPosition:A}){if(!S){const I=(0,i.bytesToNumber)(E.readBytes(y)),R=A+I,q=R+m;E.setPosition(R);const F=(0,i.bytesToNumber)(E.readBytes(m)),H=w(p);let j=0;const k=[];for(let B=0;B<F;++B){E.setPosition(q+(H?B*32:j));const[O,x]=f(E,p,{staticPosition:q});j+=x,k.push(O)}return E.setPosition(A+32),[k,32]}if(w(p)){const I=(0,i.bytesToNumber)(E.readBytes(y)),R=A+I,q=[];for(let F=0;F<S;++F){E.setPosition(R+F*32);const[H]=f(E,p,{staticPosition:R});q.push(H)}return E.setPosition(A+32),[q,32]}let T=0;const C=[];for(let I=0;I<S;++I){const[R,q]=f(E,p,{staticPosition:A+T});T+=q,C.push(R)}return[C,T]}function v(E){return[(0,i.bytesToBool)(E.readBytes(32),{size:32}),32]}function _(E,p,{staticPosition:S}){const[A,T]=p.type.split("bytes");if(!T){const I=(0,i.bytesToNumber)(E.readBytes(32));E.setPosition(S+I);const R=(0,i.bytesToNumber)(E.readBytes(32));if(R===0)return E.setPosition(S+32),["0x",32];const q=E.readBytes(R);return E.setPosition(S+32),[(0,c.bytesToHex)(q),32]}return[(0,c.bytesToHex)(E.readBytes(Number.parseInt(T,10),32)),32]}function g(E,p){const S=p.type.startsWith("int"),A=Number.parseInt(p.type.split("int")[1]||"256",10),T=E.readBytes(32);return[A>48?(0,i.bytesToBigInt)(T,{signed:S}):(0,i.bytesToNumber)(T,{signed:S}),32]}function P(E,p,{staticPosition:S}){const A=p.components.length===0||p.components.some(({name:I})=>!I),T=A?[]:{};let C=0;if(w(p)){const I=(0,i.bytesToNumber)(E.readBytes(y)),R=S+I;for(let q=0;q<p.components.length;++q){const F=p.components[q];E.setPosition(R+C);const[H,j]=f(E,F,{staticPosition:R});C+=j,T[A?q:F==null?void 0:F.name]=H}return E.setPosition(S+32),[T,32]}for(let I=0;I<p.components.length;++I){const R=p.components[I],[q,F]=f(E,R,{staticPosition:S});T[A?I:R==null?void 0:R.name]=q,C+=F}return[T,C]}function d(E,{staticPosition:p}){const S=(0,i.bytesToNumber)(E.readBytes(32)),A=p+S;E.setPosition(A);const T=(0,i.bytesToNumber)(E.readBytes(32));if(T===0)return E.setPosition(p+32),["",32];const C=E.readBytes(T,32),I=(0,i.bytesToString)((0,s.trim)(C));return E.setPosition(p+32),[I,32]}function w(E){var A;const{type:p}=E;if(p==="string"||p==="bytes"||p.endsWith("[]"))return!0;if(p==="tuple")return(A=E.components)==null?void 0:A.some(w);const S=(0,u.getArrayComponents)(E.type);return!!(S&&w({...E,type:S[1]}))}return Di}var F0;function Go(){if(F0)return Li;F0=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.decodeErrorResult=i;const e=zu(),r=Se(),n=ft(),t=Kr(),o=yr(),s=Qt();function i(a){const{abi:c,data:u,cause:l}=a,f=(0,n.slice)(u,0,4);if(f==="0x")throw new r.AbiDecodingZeroDataError({cause:l});const y=[...c||[],e.solidityError,e.solidityPanic].find(h=>h.type==="error"&&f===(0,t.toFunctionSelector)((0,s.formatAbiItem)(h)));if(!y)throw new r.AbiErrorSignatureNotFoundError(f,{docsPath:"/docs/contract/decodeErrorResult",cause:l});return{abiItem:y,args:"inputs"in y&&y.inputs&&y.inputs.length>0?(0,o.decodeAbiParameters)(y.inputs,(0,n.slice)(u,4)):void 0,errorName:y.name}}return Li}var Vi={},fo={},N0;function Fe(){if(N0)return fo;N0=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.stringify=void 0;const e=(r,n,t)=>JSON.stringify(r,(o,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof n=="function"?n(o,i):i},t);return fo.stringify=e,fo}var $0;function dg(){if($0)return Vi;$0=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.formatAbiItemWithArgs=r;const e=Fe();function r({abiItem:n,args:t,includeFunctionName:o=!0,includeName:s=!1}){if("name"in n&&"inputs"in n&&n.inputs)return`${o?n.name:""}(${n.inputs.map((i,a)=>`${s&&i.name?`${i.name}: `:""}${typeof t[a]=="object"?(0,e.stringify)(t[a]):t[a]}`).join(", ")})`}return Vi}var Wi={},Wt={},z0;function Vo(){return z0||(z0=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.weiUnits=Wt.gweiUnits=Wt.etherUnits=void 0,Wt.etherUnits={gwei:9,wei:18},Wt.gweiUnits={ether:-9,wei:9},Wt.weiUnits={ether:-18,gwei:-9}),Wt}var Ki={},U0;function Uu(){if(U0)return Ki;U0=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.formatUnits=e;function e(r,n){let t=r.toString();const o=t.startsWith("-");o&&(t=t.slice(1)),t=t.padStart(n,"0");let[s,i]=[t.slice(0,t.length-n),t.slice(t.length-n)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${i?`.${i}`:""}`}return Ki}var L0;function Wo(){if(L0)return Wi;L0=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.formatEther=n;const e=Vo(),r=Uu();function n(t,o="wei"){return(0,r.formatUnits)(t,e.etherUnits[o])}return Wi}var Zi={},D0;function Jr(){if(D0)return Zi;D0=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.formatGwei=n;const e=Vo(),r=Uu();function n(t,o="wei"){return(0,r.formatUnits)(t,e.gweiUnits[o])}return Zi}var Kt={},G0;function df(){if(G0)return Kt;G0=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.StateAssignmentConflictError=Kt.AccountStateConflictError=void 0,Kt.prettyStateMapping=t,Kt.prettyStateOverride=o;const e=ue();class r extends e.BaseError{constructor({address:i}){super(`State for account "${i}" is set multiple times.`,{name:"AccountStateConflictError"})}}Kt.AccountStateConflictError=r;class n extends e.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}Kt.StateAssignmentConflictError=n;function t(s){return s.reduce((i,{slot:a,value:c})=>`${i} ${a}: ${c}
24
+ `,"")}function o(s){return s.reduce((i,{address:a,...c})=>{let u=`${i} ${a}:
25
+ `;return c.nonce&&(u+=` nonce: ${c.nonce}
26
+ `),c.balance&&(u+=` balance: ${c.balance}
27
+ `),c.code&&(u+=` code: ${c.code}
28
+ `),c.state&&(u+=` state:
29
+ `,u+=t(c.state)),c.stateDiff&&(u+=` stateDiff:
30
+ `,u+=t(c.stateDiff)),u},` State Override:
31
+ `).slice(0,-1)}return Kt}var we={},V0;function nt(){if(V0)return we;V0=1,Object.defineProperty(we,"__esModule",{value:!0}),we.WaitForTransactionReceiptTimeoutError=we.TransactionReceiptRevertedError=we.TransactionReceiptNotFoundError=we.TransactionNotFoundError=we.TransactionExecutionError=we.InvalidStorageKeySizeError=we.InvalidSerializedTransactionError=we.InvalidSerializedTransactionTypeError=we.InvalidSerializableTransactionError=we.InvalidLegacyVError=we.FeeConflictError=void 0,we.prettyPrint=t;const e=Wo(),r=Jr(),n=ue();function t(b){const v=Object.entries(b).map(([g,P])=>P===void 0||P===!1?null:[g,P]).filter(Boolean),_=v.reduce((g,[P])=>Math.max(g,P.length),0);return v.map(([g,P])=>` ${`${g}:`.padEnd(_+1)} ${P}`).join(`
32
+ `)}class o extends n.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
33
+ `),{name:"FeeConflictError"})}}we.FeeConflictError=o;class s extends n.BaseError{constructor({v}){super(`Invalid \`v\` value "${v}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}we.InvalidLegacyVError=s;class i extends n.BaseError{constructor({transaction:v}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",t(v),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}we.InvalidSerializableTransactionError=i;class a extends n.BaseError{constructor({serializedType:v}){super(`Serialized transaction type "${v}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=v}}we.InvalidSerializedTransactionTypeError=a;class c extends n.BaseError{constructor({attributes:v,serializedTransaction:_,type:g}){const P=Object.entries(v).map(([d,w])=>typeof w>"u"?d:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${g}" was provided.`,{metaMessages:[`Serialized Transaction: "${_}"`,P.length>0?`Missing Attributes: ${P.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=_,this.type=g}}we.InvalidSerializedTransactionError=c;class u extends n.BaseError{constructor({storageKey:v}){super(`Size for storage key "${v}" is invalid. Expected 32 bytes. Got ${Math.floor((v.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}we.InvalidStorageKeySizeError=u;class l extends n.BaseError{constructor(v,{account:_,docsPath:g,chain:P,data:d,gas:w,gasPrice:E,maxFeePerGas:p,maxPriorityFeePerGas:S,nonce:A,to:T,value:C}){var R;const I=t({chain:P&&`${P==null?void 0:P.name} (id: ${P==null?void 0:P.id})`,from:_==null?void 0:_.address,to:T,value:typeof C<"u"&&`${(0,e.formatEther)(C)} ${((R=P==null?void 0:P.nativeCurrency)==null?void 0:R.symbol)||"ETH"}`,data:d,gas:w,gasPrice:typeof E<"u"&&`${(0,r.formatGwei)(E)} gwei`,maxFeePerGas:typeof p<"u"&&`${(0,r.formatGwei)(p)} gwei`,maxPriorityFeePerGas:typeof S<"u"&&`${(0,r.formatGwei)(S)} gwei`,nonce:A});super(v.shortMessage,{cause:v,docsPath:g,metaMessages:[...v.metaMessages?[...v.metaMessages," "]:[],"Request Arguments:",I].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=v}}we.TransactionExecutionError=l;class f extends n.BaseError{constructor({blockHash:v,blockNumber:_,blockTag:g,hash:P,index:d}){let w="Transaction";g&&d!==void 0&&(w=`Transaction at block time "${g}" at index "${d}"`),v&&d!==void 0&&(w=`Transaction at block hash "${v}" at index "${d}"`),_&&d!==void 0&&(w=`Transaction at block number "${_}" at index "${d}"`),P&&(w=`Transaction with hash "${P}"`),super(`${w} could not be found.`,{name:"TransactionNotFoundError"})}}we.TransactionNotFoundError=f;class m extends n.BaseError{constructor({hash:v}){super(`Transaction receipt with hash "${v}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}we.TransactionReceiptNotFoundError=m;class y extends n.BaseError{constructor({receipt:v}){super(`Transaction with hash "${v.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=v}}we.TransactionReceiptRevertedError=y;class h extends n.BaseError{constructor({hash:v}){super(`Timed out while waiting for transaction with hash "${v}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}return we.WaitForTransactionReceiptTimeoutError=h,we}var Zt={},W0;function xt(){if(W0)return Zt;W0=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.getUrl=Zt.getContractAddress=void 0,Zt.getAbortError=r,Zt.isAbortError=n;const e=o=>o;Zt.getContractAddress=e;function r(o){if(o!=null&&o.reason)return o.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");const s=new Error("This operation was aborted");return s.name="AbortError",s}function n(o){return typeof o=="object"&&o!==null&&"name"in o&&o.name==="AbortError"}const t=o=>{try{const s=new URL(o);return!s.username&&!s.password?o:(s.username="",s.password="",s.toString())}catch{return o}};return Zt.getUrl=t,Zt}var K0;function pr(){if(K0)return Ge;K0=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.RawContractError=Ge.CounterfactualDeploymentFailedError=Ge.ContractFunctionZeroDataError=Ge.ContractFunctionRevertedError=Ge.ContractFunctionExecutionError=Ge.CallExecutionError=void 0;const e=Ie(),r=zu(),n=Go(),t=Qt(),o=dg(),s=tr(),i=Wo(),a=Jr(),c=Se(),u=ue(),l=df(),f=nt(),m=xt();class y extends u.BaseError{constructor(d,{account:w,docsPath:E,chain:p,data:S,gas:A,gasPrice:T,maxFeePerGas:C,maxPriorityFeePerGas:I,nonce:R,to:q,value:F,stateOverride:H}){var B;const j=w?(0,e.parseAccount)(w):void 0;let k=(0,f.prettyPrint)({from:j==null?void 0:j.address,to:q,value:typeof F<"u"&&`${(0,i.formatEther)(F)} ${((B=p==null?void 0:p.nativeCurrency)==null?void 0:B.symbol)||"ETH"}`,data:S,gas:A,gasPrice:typeof T<"u"&&`${(0,a.formatGwei)(T)} gwei`,maxFeePerGas:typeof C<"u"&&`${(0,a.formatGwei)(C)} gwei`,maxPriorityFeePerGas:typeof I<"u"&&`${(0,a.formatGwei)(I)} gwei`,nonce:R});H&&(k+=`
34
+ ${(0,l.prettyStateOverride)(H)}`),super(d.shortMessage,{cause:d,docsPath:E,metaMessages:[...d.metaMessages?[...d.metaMessages," "]:[],"Raw Call Arguments:",k].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=d}}Ge.CallExecutionError=y;class h extends u.BaseError{constructor(d,{abi:w,args:E,contractAddress:p,docsPath:S,functionName:A,sender:T}){const C=(0,s.getAbiItem)({abi:w,args:E,name:A}),I=C?(0,o.formatAbiItemWithArgs)({abiItem:C,args:E,includeFunctionName:!1,includeName:!1}):void 0,R=C?(0,t.formatAbiItem)(C,{includeName:!0}):void 0,q=(0,f.prettyPrint)({address:p&&(0,m.getContractAddress)(p),function:R,args:I&&I!=="()"&&`${[...Array((A==null?void 0:A.length)??0).keys()].map(()=>" ").join("")}${I}`,sender:T});super(d.shortMessage||`An unknown error occurred while executing the contract function "${A}".`,{cause:d,docsPath:S,metaMessages:[...d.metaMessages?[...d.metaMessages," "]:[],q&&"Contract Call:",q].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=w,this.args=E,this.cause=d,this.contractAddress=p,this.functionName=A,this.sender=T}}Ge.ContractFunctionExecutionError=h;class b extends u.BaseError{constructor({abi:d,data:w,functionName:E,message:p,cause:S}){let A,T,C,I;if(w&&w!=="0x")try{T=(0,n.decodeErrorResult)({abi:d,data:w,cause:S});const{abiItem:q,errorName:F,args:H}=T;if(F==="Error")I=H[0];else if(F==="Panic"){const[j]=H;I=r.panicReasons[j]}else{const j=q?(0,t.formatAbiItem)(q,{includeName:!0}):void 0,k=q&&H?(0,o.formatAbiItemWithArgs)({abiItem:q,args:H,includeFunctionName:!1,includeName:!1}):void 0;C=[j?`Error: ${j}`:"",k&&k!=="()"?` ${[...Array((F==null?void 0:F.length)??0).keys()].map(()=>" ").join("")}${k}`:""]}}catch(q){A=q}else p&&(I=p);let R;A instanceof c.AbiErrorSignatureNotFoundError&&(R=A.signature,C=[`Unable to decode signature "${R}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${R}.`]),super(I&&I!=="execution reverted"||R?[`The contract function "${E}" reverted with the following ${R?"signature":"reason"}:`,I||R].join(`
35
+ `):`The contract function "${E}" reverted.`,{cause:A??S,metaMessages:C,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=T,this.raw=w,this.reason=I,this.signature=R}}Ge.ContractFunctionRevertedError=b;class v extends u.BaseError{constructor({functionName:d,cause:w}){super(`The contract function "${d}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${d}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:w})}}Ge.ContractFunctionZeroDataError=v;class _ extends u.BaseError{constructor({factory:d}){super(`Deployment for counterfactual contract call failed${d?` for factory "${d}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}Ge.CounterfactualDeploymentFailedError=_;class g extends u.BaseError{constructor({data:d,message:w}){super(w||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=d}}return Ge.RawContractError=g,Ge}var st={},Z0;function pt(){if(Z0)return st;Z0=1,Object.defineProperty(st,"__esModule",{value:!0}),st.TimeoutError=st.SocketClosedError=st.RpcRequestError=st.WebSocketRequestError=st.HttpRequestError=void 0;const e=Fe(),r=ue(),n=xt();class t extends r.BaseError{constructor({body:u,cause:l,details:f,headers:m,status:y,url:h}){super("HTTP request failed.",{cause:l,details:f,metaMessages:[y&&`Status: ${y}`,`URL: ${(0,n.getUrl)(h)}`,u&&`Request body: ${(0,e.stringify)(u)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=u,this.headers=m,this.status=y,this.url=h}}st.HttpRequestError=t;class o extends r.BaseError{constructor({body:u,cause:l,details:f,url:m}){super("WebSocket request failed.",{cause:l,details:f,metaMessages:[`URL: ${(0,n.getUrl)(m)}`,u&&`Request body: ${(0,e.stringify)(u)}`].filter(Boolean),name:"WebSocketRequestError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=m}}st.WebSocketRequestError=o;class s extends r.BaseError{constructor({body:u,error:l,url:f}){super("RPC Request failed.",{cause:l,details:l.message,metaMessages:[`URL: ${(0,n.getUrl)(f)}`,`Request body: ${(0,e.stringify)(u)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=l.code,this.data=l.data,this.url=f}}st.RpcRequestError=s;class i extends r.BaseError{constructor({url:u}={}){super("The socket has been closed.",{metaMessages:[u&&`URL: ${(0,n.getUrl)(u)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=u}}st.SocketClosedError=i;class a extends r.BaseError{constructor({body:u,url:l}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,n.getUrl)(l)}`,`Request body: ${(0,e.stringify)(u)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=l}}return st.TimeoutError=a,st}var ie={},J0;function gr(){if(J0)return ie;J0=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.UnknownRpcError=ie.WalletConnectSessionSettlementError=ie.AtomicityNotSupportedError=ie.AtomicReadyWalletRejectedUpgradeError=ie.BundleTooLargeError=ie.UnknownBundleIdError=ie.DuplicateIdError=ie.UnsupportedChainIdError=ie.UnsupportedNonOptionalCapabilityError=ie.SwitchChainError=ie.ChainDisconnectedError=ie.ProviderDisconnectedError=ie.UnsupportedProviderMethodError=ie.UnauthorizedProviderError=ie.UserRejectedRequestError=ie.JsonRpcVersionUnsupportedError=ie.LimitExceededRpcError=ie.MethodNotSupportedRpcError=ie.TransactionRejectedRpcError=ie.ResourceUnavailableRpcError=ie.ResourceNotFoundRpcError=ie.InvalidInputRpcError=ie.InternalRpcError=ie.InvalidParamsRpcError=ie.MethodNotFoundRpcError=ie.InvalidRequestRpcError=ie.ParseRpcError=ie.ProviderRpcError=ie.RpcError=void 0;const e=ue(),r=pt(),n=-1;class t extends e.BaseError{constructor(j,{code:k,docsPath:B,metaMessages:O,name:x,shortMessage:M}){super(M,{cause:j,docsPath:B,metaMessages:O||(j==null?void 0:j.metaMessages),name:x||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=x||j.name,this.code=j instanceof r.RpcRequestError?j.code:k??n}}ie.RpcError=t;class o extends t{constructor(j,k){super(j,k),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=k.data}}ie.ProviderRpcError=o;class s extends t{constructor(j){super(j,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}ie.ParseRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class i extends t{constructor(j){super(j,{code:i.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}ie.InvalidRequestRpcError=i,Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class a extends t{constructor(j,{method:k}={}){super(j,{code:a.code,name:"MethodNotFoundRpcError",shortMessage:`The method${k?` "${k}"`:""} does not exist / is not available.`})}}ie.MethodNotFoundRpcError=a,Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class c extends t{constructor(j){super(j,{code:c.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
36
+ `)})}}ie.InvalidParamsRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class u extends t{constructor(j){super(j,{code:u.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}ie.InternalRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class l extends t{constructor(j){super(j,{code:l.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
37
+ `)})}}ie.InvalidInputRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends t{constructor(j){super(j,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}ie.ResourceNotFoundRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class m extends t{constructor(j){super(j,{code:m.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}ie.ResourceUnavailableRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class y extends t{constructor(j){super(j,{code:y.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}ie.TransactionRejectedRpcError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class h extends t{constructor(j,{method:k}={}){super(j,{code:h.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${k?` "${k}"`:""} is not supported.`})}}ie.MethodNotSupportedRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class b extends t{constructor(j){super(j,{code:b.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}ie.LimitExceededRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class v extends t{constructor(j){super(j,{code:v.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}ie.JsonRpcVersionUnsupportedError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class _ extends o{constructor(j){super(j,{code:_.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}ie.UserRejectedRequestError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class g extends o{constructor(j){super(j,{code:g.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}ie.UnauthorizedProviderError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class P extends o{constructor(j,{method:k}={}){super(j,{code:P.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${k?` " ${k}"`:""}.`})}}ie.UnsupportedProviderMethodError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class d extends o{constructor(j){super(j,{code:d.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}ie.ProviderDisconnectedError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class w extends o{constructor(j){super(j,{code:w.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}ie.ChainDisconnectedError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class E extends o{constructor(j){super(j,{code:E.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}ie.SwitchChainError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class p extends o{constructor(j){super(j,{code:p.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}ie.UnsupportedNonOptionalCapabilityError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class S extends o{constructor(j){super(j,{code:S.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}ie.UnsupportedChainIdError=S,Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class A extends o{constructor(j){super(j,{code:A.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}ie.DuplicateIdError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class T extends o{constructor(j){super(j,{code:T.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}ie.UnknownBundleIdError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class C extends o{constructor(j){super(j,{code:C.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}ie.BundleTooLargeError=C,Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class I extends o{constructor(j){super(j,{code:I.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}ie.AtomicReadyWalletRejectedUpgradeError=I,Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class R extends o{constructor(j){super(j,{code:R.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}ie.AtomicityNotSupportedError=R,Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class q extends o{constructor(j){super(j,{code:q.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}ie.WalletConnectSessionSettlementError=q,Object.defineProperty(q,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class F extends t{constructor(j){super(j,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}return ie.UnknownRpcError=F,ie}var Y0;function _r(){if(Y0)return Ui;Y0=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.getContractError=i;const e=Se(),r=ue(),n=pr(),t=pt(),o=gr(),s=3;function i(a,{abi:c,address:u,args:l,docsPath:f,functionName:m,sender:y}){const h=a instanceof n.RawContractError?a:a instanceof r.BaseError?a.walk(w=>"data"in w)||a.walk():{},{code:b,data:v,details:_,message:g,shortMessage:P}=h,d=a instanceof e.AbiDecodingZeroDataError?new n.ContractFunctionZeroDataError({functionName:m,cause:a}):[s,o.InternalRpcError.code].includes(b)&&(v||_||g||P)||b===o.InvalidInputRpcError.code&&_==="execution reverted"&&v?new n.ContractFunctionRevertedError({abi:c,data:typeof v=="object"?v.data:v,functionName:m,message:h instanceof t.RpcRequestError?_:P??g,cause:a}):a;return new n.ContractFunctionExecutionError(d,{abi:c,args:l,contractAddress:u,docsPath:f,functionName:m,sender:y})}return Ui}var Ji={},Yi={},Xi={},Qi={},X0;function fg(){if(X0)return Qi;X0=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.publicKeyToAddress=n;const e=Je(),r=tt();function n(t){const o=(0,r.keccak256)(`0x${t.substring(4)}`).substring(26);return(0,e.checksumAddress)(`0x${o}`)}return Qi}var ea={},qd={},_e={},ze={},Q0;function lg(){if(Q0)return ze;Q0=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.SHA512_IV=ze.SHA384_IV=ze.SHA224_IV=ze.SHA256_IV=ze.HashMD=void 0,ze.setBigUint64=r,ze.Chi=n,ze.Maj=t;const e=hr();function r(s,i,a,c){if(typeof s.setBigUint64=="function")return s.setBigUint64(i,a,c);const u=BigInt(32),l=BigInt(4294967295),f=Number(a>>u&l),m=Number(a&l),y=c?4:0,h=c?0:4;s.setUint32(i+y,f,c),s.setUint32(i+h,m,c)}function n(s,i,a){return s&i^~s&a}function t(s,i,a){return s&i^s&a^i&a}class o extends e.Hash{constructor(i,a,c,u){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=i,this.outputLen=a,this.padOffset=c,this.isLE=u,this.buffer=new Uint8Array(i),this.view=(0,e.createView)(this.buffer)}update(i){(0,e.aexists)(this),i=(0,e.toBytes)(i),(0,e.abytes)(i);const{view:a,buffer:c,blockLen:u}=this,l=i.length;for(let f=0;f<l;){const m=Math.min(u-this.pos,l-f);if(m===u){const y=(0,e.createView)(i);for(;u<=l-f;f+=u)this.process(y,f);continue}c.set(i.subarray(f,f+m),this.pos),this.pos+=m,f+=m,this.pos===u&&(this.process(a,0),this.pos=0)}return this.length+=i.length,this.roundClean(),this}digestInto(i){(0,e.aexists)(this),(0,e.aoutput)(i,this),this.finished=!0;const{buffer:a,view:c,blockLen:u,isLE:l}=this;let{pos:f}=this;a[f++]=128,(0,e.clean)(this.buffer.subarray(f)),this.padOffset>u-f&&(this.process(c,0),f=0);for(let v=f;v<u;v++)a[v]=0;r(c,u-8,BigInt(this.length*8),l),this.process(c,0);const m=(0,e.createView)(i),y=this.outputLen;if(y%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=y/4,b=this.get();if(h>b.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;v<h;v++)m.setUint32(4*v,b[v],l)}digest(){const{buffer:i,outputLen:a}=this;this.digestInto(i);const c=i.slice(0,a);return this.destroy(),c}_cloneInto(i){i||(i=new this.constructor),i.set(...this.get());const{blockLen:a,buffer:c,length:u,finished:l,destroyed:f,pos:m}=this;return i.destroyed=f,i.finished=l,i.length=u,i.pos=m,u%a&&i.buffer.set(c),i}clone(){return this._cloneInto()}}return ze.HashMD=o,ze.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ze.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),ze.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ze.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),ze}var e1;function bg(){if(e1)return _e;e1=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.sha512_224=_e.sha512_256=_e.sha384=_e.sha512=_e.sha224=_e.sha256=_e.SHA512_256=_e.SHA512_224=_e.SHA384=_e.SHA512=_e.SHA224=_e.SHA256=void 0;const e=lg(),r=ag(),n=hr(),t=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),o=new Uint32Array(64);class s extends e.HashMD{constructor(P=32){super(64,P,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:P,B:d,C:w,D:E,E:p,F:S,G:A,H:T}=this;return[P,d,w,E,p,S,A,T]}set(P,d,w,E,p,S,A,T){this.A=P|0,this.B=d|0,this.C=w|0,this.D=E|0,this.E=p|0,this.F=S|0,this.G=A|0,this.H=T|0}process(P,d){for(let R=0;R<16;R++,d+=4)o[R]=P.getUint32(d,!1);for(let R=16;R<64;R++){const q=o[R-15],F=o[R-2],H=(0,n.rotr)(q,7)^(0,n.rotr)(q,18)^q>>>3,j=(0,n.rotr)(F,17)^(0,n.rotr)(F,19)^F>>>10;o[R]=j+o[R-7]+H+o[R-16]|0}let{A:w,B:E,C:p,D:S,E:A,F:T,G:C,H:I}=this;for(let R=0;R<64;R++){const q=(0,n.rotr)(A,6)^(0,n.rotr)(A,11)^(0,n.rotr)(A,25),F=I+q+(0,e.Chi)(A,T,C)+t[R]+o[R]|0,j=((0,n.rotr)(w,2)^(0,n.rotr)(w,13)^(0,n.rotr)(w,22))+(0,e.Maj)(w,E,p)|0;I=C,C=T,T=A,A=S+F|0,S=p,p=E,E=w,w=F+j|0}w=w+this.A|0,E=E+this.B|0,p=p+this.C|0,S=S+this.D|0,A=A+this.E|0,T=T+this.F|0,C=C+this.G|0,I=I+this.H|0,this.set(w,E,p,S,A,T,C,I)}roundClean(){(0,n.clean)(o)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.clean)(this.buffer)}}_e.SHA256=s;class i extends s{constructor(){super(28),this.A=e.SHA224_IV[0]|0,this.B=e.SHA224_IV[1]|0,this.C=e.SHA224_IV[2]|0,this.D=e.SHA224_IV[3]|0,this.E=e.SHA224_IV[4]|0,this.F=e.SHA224_IV[5]|0,this.G=e.SHA224_IV[6]|0,this.H=e.SHA224_IV[7]|0}}_e.SHA224=i;const a=r.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(g=>BigInt(g))),c=a[0],u=a[1],l=new Uint32Array(80),f=new Uint32Array(80);class m extends e.HashMD{constructor(P=64){super(128,P,16,!1),this.Ah=e.SHA512_IV[0]|0,this.Al=e.SHA512_IV[1]|0,this.Bh=e.SHA512_IV[2]|0,this.Bl=e.SHA512_IV[3]|0,this.Ch=e.SHA512_IV[4]|0,this.Cl=e.SHA512_IV[5]|0,this.Dh=e.SHA512_IV[6]|0,this.Dl=e.SHA512_IV[7]|0,this.Eh=e.SHA512_IV[8]|0,this.El=e.SHA512_IV[9]|0,this.Fh=e.SHA512_IV[10]|0,this.Fl=e.SHA512_IV[11]|0,this.Gh=e.SHA512_IV[12]|0,this.Gl=e.SHA512_IV[13]|0,this.Hh=e.SHA512_IV[14]|0,this.Hl=e.SHA512_IV[15]|0}get(){const{Ah:P,Al:d,Bh:w,Bl:E,Ch:p,Cl:S,Dh:A,Dl:T,Eh:C,El:I,Fh:R,Fl:q,Gh:F,Gl:H,Hh:j,Hl:k}=this;return[P,d,w,E,p,S,A,T,C,I,R,q,F,H,j,k]}set(P,d,w,E,p,S,A,T,C,I,R,q,F,H,j,k){this.Ah=P|0,this.Al=d|0,this.Bh=w|0,this.Bl=E|0,this.Ch=p|0,this.Cl=S|0,this.Dh=A|0,this.Dl=T|0,this.Eh=C|0,this.El=I|0,this.Fh=R|0,this.Fl=q|0,this.Gh=F|0,this.Gl=H|0,this.Hh=j|0,this.Hl=k|0}process(P,d){for(let x=0;x<16;x++,d+=4)l[x]=P.getUint32(d),f[x]=P.getUint32(d+=4);for(let x=16;x<80;x++){const M=l[x-15]|0,N=f[x-15]|0,z=r.rotrSH(M,N,1)^r.rotrSH(M,N,8)^r.shrSH(M,N,7),$=r.rotrSL(M,N,1)^r.rotrSL(M,N,8)^r.shrSL(M,N,7),U=l[x-2]|0,G=f[x-2]|0,J=r.rotrSH(U,G,19)^r.rotrBH(U,G,61)^r.shrSH(U,G,6),K=r.rotrSL(U,G,19)^r.rotrBL(U,G,61)^r.shrSL(U,G,6),V=r.add4L($,K,f[x-7],f[x-16]),Y=r.add4H(V,z,J,l[x-7],l[x-16]);l[x]=Y|0,f[x]=V|0}let{Ah:w,Al:E,Bh:p,Bl:S,Ch:A,Cl:T,Dh:C,Dl:I,Eh:R,El:q,Fh:F,Fl:H,Gh:j,Gl:k,Hh:B,Hl:O}=this;for(let x=0;x<80;x++){const M=r.rotrSH(R,q,14)^r.rotrSH(R,q,18)^r.rotrBH(R,q,41),N=r.rotrSL(R,q,14)^r.rotrSL(R,q,18)^r.rotrBL(R,q,41),z=R&F^~R&j,$=q&H^~q&k,U=r.add5L(O,N,$,u[x],f[x]),G=r.add5H(U,B,M,z,c[x],l[x]),J=U|0,K=r.rotrSH(w,E,28)^r.rotrBH(w,E,34)^r.rotrBH(w,E,39),V=r.rotrSL(w,E,28)^r.rotrBL(w,E,34)^r.rotrBL(w,E,39),Y=w&p^w&A^p&A,te=E&S^E&T^S&T;B=j|0,O=k|0,j=F|0,k=H|0,F=R|0,H=q|0,{h:R,l:q}=r.add(C|0,I|0,G|0,J|0),C=A|0,I=T|0,A=p|0,T=S|0,p=w|0,S=E|0;const Z=r.add3L(J,V,te);w=r.add3H(Z,G,K,Y),E=Z|0}({h:w,l:E}=r.add(this.Ah|0,this.Al|0,w|0,E|0)),{h:p,l:S}=r.add(this.Bh|0,this.Bl|0,p|0,S|0),{h:A,l:T}=r.add(this.Ch|0,this.Cl|0,A|0,T|0),{h:C,l:I}=r.add(this.Dh|0,this.Dl|0,C|0,I|0),{h:R,l:q}=r.add(this.Eh|0,this.El|0,R|0,q|0),{h:F,l:H}=r.add(this.Fh|0,this.Fl|0,F|0,H|0),{h:j,l:k}=r.add(this.Gh|0,this.Gl|0,j|0,k|0),{h:B,l:O}=r.add(this.Hh|0,this.Hl|0,B|0,O|0),this.set(w,E,p,S,A,T,C,I,R,q,F,H,j,k,B,O)}roundClean(){(0,n.clean)(l,f)}destroy(){(0,n.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}_e.SHA512=m;class y extends m{constructor(){super(48),this.Ah=e.SHA384_IV[0]|0,this.Al=e.SHA384_IV[1]|0,this.Bh=e.SHA384_IV[2]|0,this.Bl=e.SHA384_IV[3]|0,this.Ch=e.SHA384_IV[4]|0,this.Cl=e.SHA384_IV[5]|0,this.Dh=e.SHA384_IV[6]|0,this.Dl=e.SHA384_IV[7]|0,this.Eh=e.SHA384_IV[8]|0,this.El=e.SHA384_IV[9]|0,this.Fh=e.SHA384_IV[10]|0,this.Fl=e.SHA384_IV[11]|0,this.Gh=e.SHA384_IV[12]|0,this.Gl=e.SHA384_IV[13]|0,this.Hh=e.SHA384_IV[14]|0,this.Hl=e.SHA384_IV[15]|0}}_e.SHA384=y;const h=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),b=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class v extends m{constructor(){super(28),this.Ah=h[0]|0,this.Al=h[1]|0,this.Bh=h[2]|0,this.Bl=h[3]|0,this.Ch=h[4]|0,this.Cl=h[5]|0,this.Dh=h[6]|0,this.Dl=h[7]|0,this.Eh=h[8]|0,this.El=h[9]|0,this.Fh=h[10]|0,this.Fl=h[11]|0,this.Gh=h[12]|0,this.Gl=h[13]|0,this.Hh=h[14]|0,this.Hl=h[15]|0}}_e.SHA512_224=v;class _ extends m{constructor(){super(32),this.Ah=b[0]|0,this.Al=b[1]|0,this.Bh=b[2]|0,this.Bl=b[3]|0,this.Ch=b[4]|0,this.Cl=b[5]|0,this.Dh=b[6]|0,this.Dl=b[7]|0,this.Eh=b[8]|0,this.El=b[9]|0,this.Fh=b[10]|0,this.Fl=b[11]|0,this.Gh=b[12]|0,this.Gl=b[13]|0,this.Hh=b[14]|0,this.Hl=b[15]|0}}return _e.SHA512_256=_,_e.sha256=(0,n.createHasher)(()=>new s),_e.sha224=(0,n.createHasher)(()=>new i),_e.sha512=(0,n.createHasher)(()=>new m),_e.sha384=(0,n.createHasher)(()=>new y),_e.sha512_256=(0,n.createHasher)(()=>new _),_e.sha512_224=(0,n.createHasher)(()=>new v),_e}var lo={},Md={},t1;function mg(){return t1||(t1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const r=hr();class n extends r.Hash{constructor(s,i){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(s);const a=(0,r.toBytes)(i);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const c=this.blockLen,u=new Uint8Array(c);u.set(a.length>c?s.create().update(a).digest():a);for(let l=0;l<u.length;l++)u[l]^=54;this.iHash.update(u),this.oHash=s.create();for(let l=0;l<u.length;l++)u[l]^=106;this.oHash.update(u),(0,r.clean)(u)}update(s){return(0,r.aexists)(this),this.iHash.update(s),this}digestInto(s){(0,r.aexists)(this),(0,r.abytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:i,iHash:a,finished:c,destroyed:u,blockLen:l,outputLen:f}=this;return s=s,s.finished=c,s.destroyed=u,s.blockLen=l,s.outputLen=f,s.oHash=i._cloneInto(s.oHash),s.iHash=a._cloneInto(s.iHash),s}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const t=(o,s,i)=>new n(o,s).update(i).digest();e.hmac=t,e.hmac.create=(o,s)=>new n(o,s)})(Md)),Md}var kd={},qr={},Pe={},ye={},r1;function Yr(){if(r1)return ye;r1=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ye,"__esModule",{value:!0}),ye.notImplemented=ye.bitMask=void 0,ye.isBytes=n,ye.abytes=t,ye.abool=o,ye.numberToHexUnpadded=s,ye.hexToNumber=i,ye.bytesToHex=u,ye.hexToBytes=m,ye.bytesToNumberBE=y,ye.bytesToNumberLE=h,ye.numberToBytesBE=b,ye.numberToBytesLE=v,ye.numberToVarBytesBE=_,ye.ensureBytes=g,ye.concatBytes=P,ye.equalBytes=d,ye.utf8ToBytes=w,ye.inRange=p,ye.aInRange=S,ye.bitLen=A,ye.bitGet=T,ye.bitSet=C,ye.createHmacDrbg=F,ye.validateObject=j,ye.memoized=B;const e=BigInt(0),r=BigInt(1);function n(O){return O instanceof Uint8Array||ArrayBuffer.isView(O)&&O.constructor.name==="Uint8Array"}function t(O){if(!n(O))throw new Error("Uint8Array expected")}function o(O,x){if(typeof x!="boolean")throw new Error(O+" boolean expected, got "+x)}function s(O){const x=O.toString(16);return x.length&1?"0"+x:x}function i(O){if(typeof O!="string")throw new Error("hex string expected, got "+typeof O);return O===""?e:BigInt("0x"+O)}const a=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",c=Array.from({length:256},(O,x)=>x.toString(16).padStart(2,"0"));function u(O){if(t(O),a)return O.toHex();let x="";for(let M=0;M<O.length;M++)x+=c[O[M]];return x}const l={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(O){if(O>=l._0&&O<=l._9)return O-l._0;if(O>=l.A&&O<=l.F)return O-(l.A-10);if(O>=l.a&&O<=l.f)return O-(l.a-10)}function m(O){if(typeof O!="string")throw new Error("hex string expected, got "+typeof O);if(a)return Uint8Array.fromHex(O);const x=O.length,M=x/2;if(x%2)throw new Error("hex string expected, got unpadded hex of length "+x);const N=new Uint8Array(M);for(let z=0,$=0;z<M;z++,$+=2){const U=f(O.charCodeAt($)),G=f(O.charCodeAt($+1));if(U===void 0||G===void 0){const J=O[$]+O[$+1];throw new Error('hex string expected, got non-hex character "'+J+'" at index '+$)}N[z]=U*16+G}return N}function y(O){return i(u(O))}function h(O){return t(O),i(u(Uint8Array.from(O).reverse()))}function b(O,x){return m(O.toString(16).padStart(x*2,"0"))}function v(O,x){return b(O,x).reverse()}function _(O){return m(s(O))}function g(O,x,M){let N;if(typeof x=="string")try{N=m(x)}catch($){throw new Error(O+" must be hex string or Uint8Array, cause: "+$)}else if(n(x))N=Uint8Array.from(x);else throw new Error(O+" must be hex string or Uint8Array");const z=N.length;if(typeof M=="number"&&z!==M)throw new Error(O+" of length "+M+" expected, got "+z);return N}function P(...O){let x=0;for(let N=0;N<O.length;N++){const z=O[N];t(z),x+=z.length}const M=new Uint8Array(x);for(let N=0,z=0;N<O.length;N++){const $=O[N];M.set($,z),z+=$.length}return M}function d(O,x){if(O.length!==x.length)return!1;let M=0;for(let N=0;N<O.length;N++)M|=O[N]^x[N];return M===0}function w(O){if(typeof O!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(O))}const E=O=>typeof O=="bigint"&&e<=O;function p(O,x,M){return E(O)&&E(x)&&E(M)&&x<=O&&O<M}function S(O,x,M,N){if(!p(x,M,N))throw new Error("expected valid "+O+": "+M+" <= n < "+N+", got "+x)}function A(O){let x;for(x=0;O>e;O>>=r,x+=1);return x}function T(O,x){return O>>BigInt(x)&r}function C(O,x,M){return O|(M?r:e)<<BigInt(x)}const I=O=>(r<<BigInt(O))-r;ye.bitMask=I;const R=O=>new Uint8Array(O),q=O=>Uint8Array.from(O);function F(O,x,M){if(typeof O!="number"||O<2)throw new Error("hashLen must be a number");if(typeof x!="number"||x<2)throw new Error("qByteLen must be a number");if(typeof M!="function")throw new Error("hmacFn must be a function");let N=R(O),z=R(O),$=0;const U=()=>{N.fill(1),z.fill(0),$=0},G=(...Y)=>M(z,N,...Y),J=(Y=R(0))=>{z=G(q([0]),Y),N=G(),Y.length!==0&&(z=G(q([1]),Y),N=G())},K=()=>{if($++>=1e3)throw new Error("drbg: tried 1000 values");let Y=0;const te=[];for(;Y<x;){N=G();const Z=N.slice();te.push(Z),Y+=N.length}return P(...te)};return(Y,te)=>{U(),J(Y);let Z;for(;!(Z=te(K()));)J();return U(),Z}}const H={bigint:O=>typeof O=="bigint",function:O=>typeof O=="function",boolean:O=>typeof O=="boolean",string:O=>typeof O=="string",stringOrUint8Array:O=>typeof O=="string"||n(O),isSafeInteger:O=>Number.isSafeInteger(O),array:O=>Array.isArray(O),field:(O,x)=>x.Fp.isValid(O),hash:O=>typeof O=="function"&&Number.isSafeInteger(O.outputLen)};function j(O,x,M={}){const N=(z,$,U)=>{const G=H[$];if(typeof G!="function")throw new Error("invalid validator function");const J=O[z];if(!(U&&J===void 0)&&!G(J,O))throw new Error("param "+String(z)+" is invalid. Expected "+$+", got "+J)};for(const[z,$]of Object.entries(x))N(z,$,!1);for(const[z,$]of Object.entries(M))N(z,$,!0);return O}const k=()=>{throw new Error("not implemented")};ye.notImplemented=k;function B(O){const x=new WeakMap;return(M,...N)=>{const z=x.get(M);if(z!==void 0)return z;const $=O(M,...N);return x.set(M,$),$}}return ye}var n1;function Lu(){if(n1)return Pe;n1=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.isNegativeLE=void 0,Pe.mod=u,Pe.pow=l,Pe.pow2=f,Pe.invert=m,Pe.tonelliShanks=b,Pe.FpSqrt=v,Pe.validateField=P,Pe.FpPow=d,Pe.FpInvertBatch=w,Pe.FpDiv=E,Pe.FpLegendre=p,Pe.FpIsSquare=S,Pe.nLength=A,Pe.Field=T,Pe.FpSqrtOdd=C,Pe.FpSqrtEven=I,Pe.hashToPrivateScalar=R,Pe.getFieldBytesLength=q,Pe.getMinHashLength=F,Pe.mapHashToField=H;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=hr(),r=Yr(),n=BigInt(0),t=BigInt(1),o=BigInt(2),s=BigInt(3),i=BigInt(4),a=BigInt(5),c=BigInt(8);function u(j,k){const B=j%k;return B>=n?B:k+B}function l(j,k,B){return d(T(B),j,k)}function f(j,k,B){let O=j;for(;k-- >n;)O*=O,O%=B;return O}function m(j,k){if(j===n)throw new Error("invert: expected non-zero number");if(k<=n)throw new Error("invert: expected positive modulus, got "+k);let B=u(j,k),O=k,x=n,M=t;for(;B!==n;){const z=O/B,$=O%B,U=x-M*z;O=B,B=$,x=M,M=U}if(O!==t)throw new Error("invert: does not exist");return u(x,k)}function y(j,k){const B=(j.ORDER+t)/i,O=j.pow(k,B);if(!j.eql(j.sqr(O),k))throw new Error("Cannot find square root");return O}function h(j,k){const B=(j.ORDER-a)/c,O=j.mul(k,o),x=j.pow(O,B),M=j.mul(k,x),N=j.mul(j.mul(M,o),x),z=j.mul(M,j.sub(N,j.ONE));if(!j.eql(j.sqr(z),k))throw new Error("Cannot find square root");return z}function b(j){if(j<BigInt(3))throw new Error("sqrt is not defined for small field");let k=j-t,B=0;for(;k%o===n;)k/=o,B++;let O=o;const x=T(j);for(;p(x,O)===1;)if(O++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(B===1)return y;let M=x.pow(O,k);const N=(k+t)/o;return function($,U){if($.is0(U))return U;if(p($,U)!==1)throw new Error("Cannot find square root");let G=B,J=$.mul($.ONE,M),K=$.pow(U,k),V=$.pow(U,N);for(;!$.eql(K,$.ONE);){if($.is0(K))return $.ZERO;let Y=1,te=$.sqr(K);for(;!$.eql(te,$.ONE);)if(Y++,te=$.sqr(te),Y===G)throw new Error("Cannot find square root");const Z=t<<BigInt(G-Y-1),X=$.pow(J,Z);G=Y,J=$.sqr(X),K=$.mul(K,J),V=$.mul(V,X)}return V}}function v(j){return j%i===s?y:j%c===a?h:b(j)}const _=(j,k)=>(u(j,k)&t)===t;Pe.isNegativeLE=_;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function P(j){const k={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},B=g.reduce((O,x)=>(O[x]="function",O),k);return(0,r.validateObject)(j,B)}function d(j,k,B){if(B<n)throw new Error("invalid exponent, negatives unsupported");if(B===n)return j.ONE;if(B===t)return k;let O=j.ONE,x=k;for(;B>n;)B&t&&(O=j.mul(O,x)),x=j.sqr(x),B>>=t;return O}function w(j,k,B=!1){const O=new Array(k.length).fill(B?j.ZERO:void 0),x=k.reduce((N,z,$)=>j.is0(z)?N:(O[$]=N,j.mul(N,z)),j.ONE),M=j.inv(x);return k.reduceRight((N,z,$)=>j.is0(z)?N:(O[$]=j.mul(N,O[$]),j.mul(N,z)),M),O}function E(j,k,B){return j.mul(k,typeof B=="bigint"?m(B,j.ORDER):j.inv(B))}function p(j,k){const B=(j.ORDER-t)/o,O=j.pow(k,B),x=j.eql(O,j.ONE),M=j.eql(O,j.ZERO),N=j.eql(O,j.neg(j.ONE));if(!x&&!M&&!N)throw new Error("invalid Legendre symbol result");return x?1:M?0:-1}function S(j,k){return p(j,k)===1}function A(j,k){k!==void 0&&(0,e.anumber)(k);const B=k!==void 0?k:j.toString(2).length,O=Math.ceil(B/8);return{nBitLength:B,nByteLength:O}}function T(j,k,B=!1,O={}){if(j<=n)throw new Error("invalid field: expected ORDER > 0, got "+j);const{nBitLength:x,nByteLength:M}=A(j,k);if(M>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let N;const z=Object.freeze({ORDER:j,isLE:B,BITS:x,BYTES:M,MASK:(0,r.bitMask)(x),ZERO:n,ONE:t,create:$=>u($,j),isValid:$=>{if(typeof $!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof $);return n<=$&&$<j},is0:$=>$===n,isOdd:$=>($&t)===t,neg:$=>u(-$,j),eql:($,U)=>$===U,sqr:$=>u($*$,j),add:($,U)=>u($+U,j),sub:($,U)=>u($-U,j),mul:($,U)=>u($*U,j),pow:($,U)=>d(z,$,U),div:($,U)=>u($*m(U,j),j),sqrN:$=>$*$,addN:($,U)=>$+U,subN:($,U)=>$-U,mulN:($,U)=>$*U,inv:$=>m($,j),sqrt:O.sqrt||($=>(N||(N=v(j)),N(z,$))),toBytes:$=>B?(0,r.numberToBytesLE)($,M):(0,r.numberToBytesBE)($,M),fromBytes:$=>{if($.length!==M)throw new Error("Field.fromBytes: expected "+M+" bytes, got "+$.length);return B?(0,r.bytesToNumberLE)($):(0,r.bytesToNumberBE)($)},invertBatch:$=>w(z,$),cmov:($,U,G)=>G?U:$});return Object.freeze(z)}function C(j,k){if(!j.isOdd)throw new Error("Field doesn't have isOdd");const B=j.sqrt(k);return j.isOdd(B)?B:j.neg(B)}function I(j,k){if(!j.isOdd)throw new Error("Field doesn't have isOdd");const B=j.sqrt(k);return j.isOdd(B)?j.neg(B):B}function R(j,k,B=!1){j=(0,r.ensureBytes)("privateHash",j);const O=j.length,x=A(k).nByteLength+8;if(x<24||O<x||O>1024)throw new Error("hashToPrivateScalar: expected "+x+"-1024 bytes of input, got "+O);const M=B?(0,r.bytesToNumberLE)(j):(0,r.bytesToNumberBE)(j);return u(M,k-t)+t}function q(j){if(typeof j!="bigint")throw new Error("field order must be bigint");const k=j.toString(2).length;return Math.ceil(k/8)}function F(j){const k=q(j);return k+Math.ceil(k/2)}function H(j,k,B=!1){const O=j.length,x=q(k),M=F(k);if(O<16||O<M||O>1024)throw new Error("expected "+M+"-1024 bytes of input, got "+O);const N=B?(0,r.bytesToNumberLE)(j):(0,r.bytesToNumberBE)(j),z=u(N,k-t)+t;return B?(0,r.numberToBytesLE)(z,x):(0,r.numberToBytesBE)(z,x)}return Pe}var o1;function Zv(){if(o1)return qr;o1=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.wNAF=y,qr.pippenger=h,qr.precomputeMSMUnsafe=b,qr.validateBasic=v;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Lu(),r=Yr(),n=BigInt(0),t=BigInt(1);function o(_,g){const P=g.negate();return _?P:g}function s(_,g){if(!Number.isSafeInteger(_)||_<=0||_>g)throw new Error("invalid window size, expected [1.."+g+"], got W="+_)}function i(_,g){s(_,g);const P=Math.ceil(g/_)+1,d=2**(_-1),w=2**_,E=(0,r.bitMask)(_),p=BigInt(_);return{windows:P,windowSize:d,mask:E,maxNumber:w,shiftBy:p}}function a(_,g,P){const{windowSize:d,mask:w,maxNumber:E,shiftBy:p}=P;let S=Number(_&w),A=_>>p;S>d&&(S-=E,A+=t);const T=g*d,C=T+Math.abs(S)-1,I=S===0,R=S<0,q=g%2!==0;return{nextN:A,offset:C,isZero:I,isNeg:R,isNegF:q,offsetF:T}}function c(_,g){if(!Array.isArray(_))throw new Error("array expected");_.forEach((P,d)=>{if(!(P instanceof g))throw new Error("invalid point at index "+d)})}function u(_,g){if(!Array.isArray(_))throw new Error("array of scalars expected");_.forEach((P,d)=>{if(!g.isValid(P))throw new Error("invalid scalar at index "+d)})}const l=new WeakMap,f=new WeakMap;function m(_){return f.get(_)||1}function y(_,g){return{constTimeNegate:o,hasPrecomputes(P){return m(P)!==1},unsafeLadder(P,d,w=_.ZERO){let E=P;for(;d>n;)d&t&&(w=w.add(E)),E=E.double(),d>>=t;return w},precomputeWindow(P,d){const{windows:w,windowSize:E}=i(d,g),p=[];let S=P,A=S;for(let T=0;T<w;T++){A=S,p.push(A);for(let C=1;C<E;C++)A=A.add(S),p.push(A);S=A.double()}return p},wNAF(P,d,w){let E=_.ZERO,p=_.BASE;const S=i(P,g);for(let A=0;A<S.windows;A++){const{nextN:T,offset:C,isZero:I,isNeg:R,isNegF:q,offsetF:F}=a(w,A,S);w=T,I?p=p.add(o(q,d[F])):E=E.add(o(R,d[C]))}return{p:E,f:p}},wNAFUnsafe(P,d,w,E=_.ZERO){const p=i(P,g);for(let S=0;S<p.windows&&w!==n;S++){const{nextN:A,offset:T,isZero:C,isNeg:I}=a(w,S,p);if(w=A,!C){const R=d[T];E=E.add(I?R.negate():R)}}return E},getPrecomputes(P,d,w){let E=l.get(d);return E||(E=this.precomputeWindow(d,P),P!==1&&l.set(d,w(E))),E},wNAFCached(P,d,w){const E=m(P);return this.wNAF(E,this.getPrecomputes(E,P,w),d)},wNAFCachedUnsafe(P,d,w,E){const p=m(P);return p===1?this.unsafeLadder(P,d,E):this.wNAFUnsafe(p,this.getPrecomputes(p,P,w),d,E)},setWindowSize(P,d){s(d,g),f.set(P,d),l.delete(P)}}}function h(_,g,P,d){c(P,_),u(d,g);const w=P.length,E=d.length;if(w!==E)throw new Error("arrays of points and scalars must have equal length");const p=_.ZERO,S=(0,r.bitLen)(BigInt(w));let A=1;S>12?A=S-3:S>4?A=S-2:S>0&&(A=2);const T=(0,r.bitMask)(A),C=new Array(Number(T)+1).fill(p),I=Math.floor((g.BITS-1)/A)*A;let R=p;for(let q=I;q>=0;q-=A){C.fill(p);for(let H=0;H<E;H++){const j=d[H],k=Number(j>>BigInt(q)&T);C[k]=C[k].add(P[H])}let F=p;for(let H=C.length-1,j=p;H>0;H--)j=j.add(C[H]),F=F.add(j);if(R=R.add(F),q!==0)for(let H=0;H<A;H++)R=R.double()}return R}function b(_,g,P,d){s(d,g.BITS),c(P,_);const w=_.ZERO,E=2**d-1,p=Math.ceil(g.BITS/d),S=(0,r.bitMask)(d),A=P.map(T=>{const C=[];for(let I=0,R=T;I<E;I++)C.push(R),R=R.add(T);return C});return T=>{if(u(T,g),T.length>P.length)throw new Error("array of scalars must be smaller than array of points");let C=w;for(let I=0;I<p;I++){if(C!==w)for(let q=0;q<d;q++)C=C.double();const R=BigInt(p*d-(I+1)*d);for(let q=0;q<T.length;q++){const F=T[q],H=Number(F>>R&S);H&&(C=C.add(A[q][H-1]))}}return C}}function v(_){return(0,e.validateField)(_.Fp),(0,r.validateObject)(_,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(_.n,_.nBitLength),..._,p:_.Fp.ORDER})}return qr}var i1;function hg(){return i1||(i1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e.weierstrassPoints=y,e.weierstrass=b,e.SWUFpSqrtRatio=v,e.mapToCurveSimpleSWU=_;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=Zv(),n=Lu(),t=Yr();function o(g){g.lowS!==void 0&&(0,t.abool)("lowS",g.lowS),g.prehash!==void 0&&(0,t.abool)("prehash",g.prehash)}function s(g){const P=(0,r.validateBasic)(g);(0,t.validateObject)(P,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:d,Fp:w,a:E}=P;if(d){if(!w.eql(E,w.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof d!="object"||typeof d.beta!="bigint"||typeof d.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...P})}class i extends Error{constructor(P=""){super(P)}}e.DERErr=i,e.DER={Err:i,_tlv:{encode:(g,P)=>{const{Err:d}=e.DER;if(g<0||g>256)throw new d("tlv.encode: wrong tag");if(P.length&1)throw new d("tlv.encode: unpadded data");const w=P.length/2,E=(0,t.numberToHexUnpadded)(w);if(E.length/2&128)throw new d("tlv.encode: long form length too big");const p=w>127?(0,t.numberToHexUnpadded)(E.length/2|128):"";return(0,t.numberToHexUnpadded)(g)+p+E+P},decode(g,P){const{Err:d}=e.DER;let w=0;if(g<0||g>256)throw new d("tlv.encode: wrong tag");if(P.length<2||P[w++]!==g)throw new d("tlv.decode: wrong tlv");const E=P[w++],p=!!(E&128);let S=0;if(!p)S=E;else{const T=E&127;if(!T)throw new d("tlv.decode(long): indefinite length not supported");if(T>4)throw new d("tlv.decode(long): byte length is too big");const C=P.subarray(w,w+T);if(C.length!==T)throw new d("tlv.decode: length bytes not complete");if(C[0]===0)throw new d("tlv.decode(long): zero leftmost byte");for(const I of C)S=S<<8|I;if(w+=T,S<128)throw new d("tlv.decode(long): not minimal encoding")}const A=P.subarray(w,w+S);if(A.length!==S)throw new d("tlv.decode: wrong value length");return{v:A,l:P.subarray(w+S)}}},_int:{encode(g){const{Err:P}=e.DER;if(g<c)throw new P("integer: negative integers are not allowed");let d=(0,t.numberToHexUnpadded)(g);if(Number.parseInt(d[0],16)&8&&(d="00"+d),d.length&1)throw new P("unexpected DER parsing assertion: unpadded hex");return d},decode(g){const{Err:P}=e.DER;if(g[0]&128)throw new P("invalid signature integer: negative");if(g[0]===0&&!(g[1]&128))throw new P("invalid signature integer: unnecessary leading zero");return(0,t.bytesToNumberBE)(g)}},toSig(g){const{Err:P,_int:d,_tlv:w}=e.DER,E=(0,t.ensureBytes)("signature",g),{v:p,l:S}=w.decode(48,E);if(S.length)throw new P("invalid signature: left bytes after parsing");const{v:A,l:T}=w.decode(2,p),{v:C,l:I}=w.decode(2,T);if(I.length)throw new P("invalid signature: left bytes after parsing");return{r:d.decode(A),s:d.decode(C)}},hexFromSig(g){const{_tlv:P,_int:d}=e.DER,w=P.encode(2,d.encode(g.r)),E=P.encode(2,d.encode(g.s)),p=w+E;return P.encode(48,p)}};function a(g,P){return(0,t.bytesToHex)((0,t.numberToBytesBE)(g,P))}const c=BigInt(0),u=BigInt(1),l=BigInt(2),f=BigInt(3),m=BigInt(4);function y(g){const P=s(g),{Fp:d}=P,w=(0,n.Field)(P.n,P.nBitLength),E=P.toBytes||((x,M,N)=>{const z=M.toAffine();return(0,t.concatBytes)(Uint8Array.from([4]),d.toBytes(z.x),d.toBytes(z.y))}),p=P.fromBytes||(x=>{const M=x.subarray(1),N=d.fromBytes(M.subarray(0,d.BYTES)),z=d.fromBytes(M.subarray(d.BYTES,2*d.BYTES));return{x:N,y:z}});function S(x){const{a:M,b:N}=P,z=d.sqr(x),$=d.mul(z,x);return d.add(d.add($,d.mul(x,M)),N)}function A(x,M){const N=d.sqr(M),z=S(x);return d.eql(N,z)}if(!A(P.Gx,P.Gy))throw new Error("bad curve params: generator point");const T=d.mul(d.pow(P.a,f),m),C=d.mul(d.sqr(P.b),BigInt(27));if(d.is0(d.add(T,C)))throw new Error("bad curve params: a or b");function I(x){return(0,t.inRange)(x,u,P.n)}function R(x){const{allowedPrivateKeyLengths:M,nByteLength:N,wrapPrivateKey:z,n:$}=P;if(M&&typeof x!="bigint"){if((0,t.isBytes)(x)&&(x=(0,t.bytesToHex)(x)),typeof x!="string"||!M.includes(x.length))throw new Error("invalid private key");x=x.padStart(N*2,"0")}let U;try{U=typeof x=="bigint"?x:(0,t.bytesToNumberBE)((0,t.ensureBytes)("private key",x,N))}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof x)}return z&&(U=(0,n.mod)(U,$)),(0,t.aInRange)("private key",U,u,$),U}function q(x){if(!(x instanceof j))throw new Error("ProjectivePoint expected")}const F=(0,t.memoized)((x,M)=>{const{px:N,py:z,pz:$}=x;if(d.eql($,d.ONE))return{x:N,y:z};const U=x.is0();M==null&&(M=U?d.ONE:d.inv($));const G=d.mul(N,M),J=d.mul(z,M),K=d.mul($,M);if(U)return{x:d.ZERO,y:d.ZERO};if(!d.eql(K,d.ONE))throw new Error("invZ was invalid");return{x:G,y:J}}),H=(0,t.memoized)(x=>{if(x.is0()){if(P.allowInfinityPoint&&!d.is0(x.py))return;throw new Error("bad point: ZERO")}const{x:M,y:N}=x.toAffine();if(!d.isValid(M)||!d.isValid(N))throw new Error("bad point: x or y not FE");if(!A(M,N))throw new Error("bad point: equation left != right");if(!x.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class j{constructor(M,N,z){if(M==null||!d.isValid(M))throw new Error("x required");if(N==null||!d.isValid(N)||d.is0(N))throw new Error("y required");if(z==null||!d.isValid(z))throw new Error("z required");this.px=M,this.py=N,this.pz=z,Object.freeze(this)}static fromAffine(M){const{x:N,y:z}=M||{};if(!M||!d.isValid(N)||!d.isValid(z))throw new Error("invalid affine point");if(M instanceof j)throw new Error("projective point not allowed");const $=U=>d.eql(U,d.ZERO);return $(N)&&$(z)?j.ZERO:new j(N,z,d.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){const N=(0,n.FpInvertBatch)(d,M.map(z=>z.pz));return M.map((z,$)=>z.toAffine(N[$])).map(j.fromAffine)}static fromHex(M){const N=j.fromAffine(p((0,t.ensureBytes)("pointHex",M)));return N.assertValidity(),N}static fromPrivateKey(M){return j.BASE.multiply(R(M))}static msm(M,N){return(0,r.pippenger)(j,w,M,N)}_setWindowSize(M){O.setWindowSize(this,M)}assertValidity(){H(this)}hasEvenY(){const{y:M}=this.toAffine();if(d.isOdd)return!d.isOdd(M);throw new Error("Field doesn't support isOdd")}equals(M){q(M);const{px:N,py:z,pz:$}=this,{px:U,py:G,pz:J}=M,K=d.eql(d.mul(N,J),d.mul(U,$)),V=d.eql(d.mul(z,J),d.mul(G,$));return K&&V}negate(){return new j(this.px,d.neg(this.py),this.pz)}double(){const{a:M,b:N}=P,z=d.mul(N,f),{px:$,py:U,pz:G}=this;let J=d.ZERO,K=d.ZERO,V=d.ZERO,Y=d.mul($,$),te=d.mul(U,U),Z=d.mul(G,G),X=d.mul($,U);return X=d.add(X,X),V=d.mul($,G),V=d.add(V,V),J=d.mul(M,V),K=d.mul(z,Z),K=d.add(J,K),J=d.sub(te,K),K=d.add(te,K),K=d.mul(J,K),J=d.mul(X,J),V=d.mul(z,V),Z=d.mul(M,Z),X=d.sub(Y,Z),X=d.mul(M,X),X=d.add(X,V),V=d.add(Y,Y),Y=d.add(V,Y),Y=d.add(Y,Z),Y=d.mul(Y,X),K=d.add(K,Y),Z=d.mul(U,G),Z=d.add(Z,Z),Y=d.mul(Z,X),J=d.sub(J,Y),V=d.mul(Z,te),V=d.add(V,V),V=d.add(V,V),new j(J,K,V)}add(M){q(M);const{px:N,py:z,pz:$}=this,{px:U,py:G,pz:J}=M;let K=d.ZERO,V=d.ZERO,Y=d.ZERO;const te=P.a,Z=d.mul(P.b,f);let X=d.mul(N,U),Q=d.mul(z,G),ne=d.mul($,J),re=d.add(N,z),ae=d.add(U,G);re=d.mul(re,ae),ae=d.add(X,Q),re=d.sub(re,ae),ae=d.add(N,$);let ce=d.add(U,J);return ae=d.mul(ae,ce),ce=d.add(X,ne),ae=d.sub(ae,ce),ce=d.add(z,$),K=d.add(G,J),ce=d.mul(ce,K),K=d.add(Q,ne),ce=d.sub(ce,K),Y=d.mul(te,ae),K=d.mul(Z,ne),Y=d.add(K,Y),K=d.sub(Q,Y),Y=d.add(Q,Y),V=d.mul(K,Y),Q=d.add(X,X),Q=d.add(Q,X),ne=d.mul(te,ne),ae=d.mul(Z,ae),Q=d.add(Q,ne),ne=d.sub(X,ne),ne=d.mul(te,ne),ae=d.add(ae,ne),X=d.mul(Q,ae),V=d.add(V,X),X=d.mul(ce,ae),K=d.mul(re,K),K=d.sub(K,X),X=d.mul(re,Q),Y=d.mul(ce,Y),Y=d.add(Y,X),new j(K,V,Y)}subtract(M){return this.add(M.negate())}is0(){return this.equals(j.ZERO)}wNAF(M){return O.wNAFCached(this,M,j.normalizeZ)}multiplyUnsafe(M){const{endo:N,n:z}=P;(0,t.aInRange)("scalar",M,c,z);const $=j.ZERO;if(M===c)return $;if(this.is0()||M===u)return this;if(!N||O.hasPrecomputes(this))return O.wNAFCachedUnsafe(this,M,j.normalizeZ);let{k1neg:U,k1:G,k2neg:J,k2:K}=N.splitScalar(M),V=$,Y=$,te=this;for(;G>c||K>c;)G&u&&(V=V.add(te)),K&u&&(Y=Y.add(te)),te=te.double(),G>>=u,K>>=u;return U&&(V=V.negate()),J&&(Y=Y.negate()),Y=new j(d.mul(Y.px,N.beta),Y.py,Y.pz),V.add(Y)}multiply(M){const{endo:N,n:z}=P;(0,t.aInRange)("scalar",M,u,z);let $,U;if(N){const{k1neg:G,k1:J,k2neg:K,k2:V}=N.splitScalar(M);let{p:Y,f:te}=this.wNAF(J),{p:Z,f:X}=this.wNAF(V);Y=O.constTimeNegate(G,Y),Z=O.constTimeNegate(K,Z),Z=new j(d.mul(Z.px,N.beta),Z.py,Z.pz),$=Y.add(Z),U=te.add(X)}else{const{p:G,f:J}=this.wNAF(M);$=G,U=J}return j.normalizeZ([$,U])[0]}multiplyAndAddUnsafe(M,N,z){const $=j.BASE,U=(J,K)=>K===c||K===u||!J.equals($)?J.multiplyUnsafe(K):J.multiply(K),G=U(this,N).add(U(M,z));return G.is0()?void 0:G}toAffine(M){return F(this,M)}isTorsionFree(){const{h:M,isTorsionFree:N}=P;if(M===u)return!0;if(N)return N(j,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:M,clearCofactor:N}=P;return M===u?this:N?N(j,this):this.multiplyUnsafe(P.h)}toRawBytes(M=!0){return(0,t.abool)("isCompressed",M),this.assertValidity(),E(j,this,M)}toHex(M=!0){return(0,t.abool)("isCompressed",M),(0,t.bytesToHex)(this.toRawBytes(M))}}j.BASE=new j(P.Gx,P.Gy,d.ONE),j.ZERO=new j(d.ZERO,d.ONE,d.ZERO);const{endo:k,nBitLength:B}=P,O=(0,r.wNAF)(j,k?Math.ceil(B/2):B);return{CURVE:P,ProjectivePoint:j,normPrivateKeyToScalar:R,weierstrassEquation:S,isWithinCurveOrder:I}}function h(g){const P=(0,r.validateBasic)(g);return(0,t.validateObject)(P,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...P})}function b(g){const P=h(g),{Fp:d,n:w,nByteLength:E,nBitLength:p}=P,S=d.BYTES+1,A=2*d.BYTES+1;function T(Z){return(0,n.mod)(Z,w)}function C(Z){return(0,n.invert)(Z,w)}const{ProjectivePoint:I,normPrivateKeyToScalar:R,weierstrassEquation:q,isWithinCurveOrder:F}=y({...P,toBytes(Z,X,Q){const ne=X.toAffine(),re=d.toBytes(ne.x),ae=t.concatBytes;return(0,t.abool)("isCompressed",Q),Q?ae(Uint8Array.from([X.hasEvenY()?2:3]),re):ae(Uint8Array.from([4]),re,d.toBytes(ne.y))},fromBytes(Z){const X=Z.length,Q=Z[0],ne=Z.subarray(1);if(X===S&&(Q===2||Q===3)){const re=(0,t.bytesToNumberBE)(ne);if(!(0,t.inRange)(re,u,d.ORDER))throw new Error("Point is not on curve");const ae=q(re);let ce;try{ce=d.sqrt(ae)}catch(ee){const W=ee instanceof Error?": "+ee.message:"";throw new Error("Point is not on curve"+W)}const he=(ce&u)===u;return(Q&1)===1!==he&&(ce=d.neg(ce)),{x:re,y:ce}}else if(X===A&&Q===4){const re=d.fromBytes(ne.subarray(0,d.BYTES)),ae=d.fromBytes(ne.subarray(d.BYTES,2*d.BYTES));return{x:re,y:ae}}else{const re=S,ae=A;throw new Error("invalid Point, expected length of "+re+", or uncompressed "+ae+", got "+X)}}});function H(Z){const X=w>>u;return Z>X}function j(Z){return H(Z)?T(-Z):Z}const k=(Z,X,Q)=>(0,t.bytesToNumberBE)(Z.slice(X,Q));class B{constructor(X,Q,ne){(0,t.aInRange)("r",X,u,w),(0,t.aInRange)("s",Q,u,w),this.r=X,this.s=Q,ne!=null&&(this.recovery=ne),Object.freeze(this)}static fromCompact(X){const Q=E;return X=(0,t.ensureBytes)("compactSignature",X,Q*2),new B(k(X,0,Q),k(X,Q,2*Q))}static fromDER(X){const{r:Q,s:ne}=e.DER.toSig((0,t.ensureBytes)("DER",X));return new B(Q,ne)}assertValidity(){}addRecoveryBit(X){return new B(this.r,this.s,X)}recoverPublicKey(X){const{r:Q,s:ne,recovery:re}=this,ae=$((0,t.ensureBytes)("msgHash",X));if(re==null||![0,1,2,3].includes(re))throw new Error("recovery id invalid");const ce=re===2||re===3?Q+P.n:Q;if(ce>=d.ORDER)throw new Error("recovery id 2 or 3 invalid");const he=(re&1)===0?"02":"03",ge=I.fromHex(he+a(ce,d.BYTES)),ee=C(ce),W=T(-ae*ee),Ce=T(ne*ee),xe=I.BASE.multiplyAndAddUnsafe(ge,W,Ce);if(!xe)throw new Error("point at infinify");return xe.assertValidity(),xe}hasHighS(){return H(this.s)}normalizeS(){return this.hasHighS()?new B(this.r,T(-this.s),this.recovery):this}toDERRawBytes(){return(0,t.hexToBytes)(this.toDERHex())}toDERHex(){return e.DER.hexFromSig(this)}toCompactRawBytes(){return(0,t.hexToBytes)(this.toCompactHex())}toCompactHex(){const X=E;return a(this.r,X)+a(this.s,X)}}const O={isValidPrivateKey(Z){try{return R(Z),!0}catch{return!1}},normPrivateKeyToScalar:R,randomPrivateKey:()=>{const Z=(0,n.getMinHashLength)(P.n);return(0,n.mapHashToField)(P.randomBytes(Z),P.n)},precompute(Z=8,X=I.BASE){return X._setWindowSize(Z),X.multiply(BigInt(3)),X}};function x(Z,X=!0){return I.fromPrivateKey(Z).toRawBytes(X)}function M(Z){if(typeof Z=="bigint")return!1;if(Z instanceof I)return!0;const Q=(0,t.ensureBytes)("key",Z).length,ne=d.BYTES,re=ne+1,ae=2*ne+1;if(!(P.allowedPrivateKeyLengths||E===re))return Q===re||Q===ae}function N(Z,X,Q=!0){if(M(Z)===!0)throw new Error("first arg must be private key");if(M(X)===!1)throw new Error("second arg must be public key");return I.fromHex(X).multiply(R(Z)).toRawBytes(Q)}const z=P.bits2int||function(Z){if(Z.length>8192)throw new Error("input is too large");const X=(0,t.bytesToNumberBE)(Z),Q=Z.length*8-p;return Q>0?X>>BigInt(Q):X},$=P.bits2int_modN||function(Z){return T(z(Z))},U=(0,t.bitMask)(p);function G(Z){return(0,t.aInRange)("num < 2^"+p,Z,c,U),(0,t.numberToBytesBE)(Z,E)}function J(Z,X,Q=K){if(["recovered","canonical"].some(Ye=>Ye in Q))throw new Error("sign() legacy options not supported");const{hash:ne,randomBytes:re}=P;let{lowS:ae,prehash:ce,extraEntropy:he}=Q;ae==null&&(ae=!0),Z=(0,t.ensureBytes)("msgHash",Z),o(Q),ce&&(Z=(0,t.ensureBytes)("prehashed msgHash",ne(Z)));const ge=$(Z),ee=R(X),W=[G(ee),G(ge)];if(he!=null&&he!==!1){const Ye=he===!0?re(d.BYTES):he;W.push((0,t.ensureBytes)("extraEntropy",Ye))}const Ce=(0,t.concatBytes)(...W),xe=ge;function bt(Ye){const mt=z(Ye);if(!F(mt))return;const Bt=C(mt),ot=I.BASE.multiply(mt).toAffine(),De=T(ot.x);if(De===c)return;const ht=T(Bt*T(xe+De*ee));if(ht===c)return;let it=(ot.x===De?0:2)|Number(ot.y&u),Xe=ht;return ae&&H(ht)&&(Xe=j(ht),it^=1),new B(De,Xe,it)}return{seed:Ce,k2sig:bt}}const K={lowS:P.lowS,prehash:!1},V={lowS:P.lowS,prehash:!1};function Y(Z,X,Q=K){const{seed:ne,k2sig:re}=J(Z,X,Q),ae=P;return(0,t.createHmacDrbg)(ae.hash.outputLen,ae.nByteLength,ae.hmac)(ne,re)}I.BASE._setWindowSize(8);function te(Z,X,Q,ne=V){var it;const re=Z;X=(0,t.ensureBytes)("msgHash",X),Q=(0,t.ensureBytes)("publicKey",Q);const{lowS:ae,prehash:ce,format:he}=ne;if(o(ne),"strict"in ne)throw new Error("options.strict was renamed to lowS");if(he!==void 0&&he!=="compact"&&he!=="der")throw new Error("format must be compact or der");const ge=typeof re=="string"||(0,t.isBytes)(re),ee=!ge&&!he&&typeof re=="object"&&re!==null&&typeof re.r=="bigint"&&typeof re.s=="bigint";if(!ge&&!ee)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let W,Ce;try{if(ee&&(W=new B(re.r,re.s)),ge){try{he!=="compact"&&(W=B.fromDER(re))}catch(Xe){if(!(Xe instanceof e.DER.Err))throw Xe}!W&&he!=="der"&&(W=B.fromCompact(re))}Ce=I.fromHex(Q)}catch{return!1}if(!W||ae&&W.hasHighS())return!1;ce&&(X=P.hash(X));const{r:xe,s:bt}=W,Ye=$(X),mt=C(bt),Bt=T(Ye*mt),ot=T(xe*mt),De=(it=I.BASE.multiplyAndAddUnsafe(Ce,Bt,ot))==null?void 0:it.toAffine();return De?T(De.x)===xe:!1}return{CURVE:P,getPublicKey:x,getSharedSecret:N,sign:Y,verify:te,ProjectivePoint:I,Signature:B,utils:O}}function v(g,P){const d=g.ORDER;let w=c;for(let H=d-u;H%l===c;H/=l)w+=u;const E=w,p=l<<E-u-u,S=p*l,A=(d-u)/S,T=(A-u)/l,C=S-u,I=p,R=g.pow(P,A),q=g.pow(P,(A+u)/l);let F=(H,j)=>{let k=R,B=g.pow(j,C),O=g.sqr(B);O=g.mul(O,j);let x=g.mul(H,O);x=g.pow(x,T),x=g.mul(x,B),B=g.mul(x,j),O=g.mul(x,H);let M=g.mul(O,B);x=g.pow(M,I);let N=g.eql(x,g.ONE);B=g.mul(O,q),x=g.mul(M,k),O=g.cmov(B,O,N),M=g.cmov(x,M,N);for(let z=E;z>u;z--){let $=z-l;$=l<<$-u;let U=g.pow(M,$);const G=g.eql(U,g.ONE);B=g.mul(O,k),k=g.mul(k,k),U=g.mul(M,k),O=g.cmov(B,O,G),M=g.cmov(U,M,G)}return{isValid:N,value:O}};if(g.ORDER%m===f){const H=(g.ORDER-f)/m,j=g.sqrt(g.neg(P));F=(k,B)=>{let O=g.sqr(B);const x=g.mul(k,B);O=g.mul(O,x);let M=g.pow(O,H);M=g.mul(M,x);const N=g.mul(M,j),z=g.mul(g.sqr(M),B),$=g.eql(z,k);let U=g.cmov(N,M,$);return{isValid:$,value:U}}}return F}function _(g,P){if((0,n.validateField)(g),!g.isValid(P.A)||!g.isValid(P.B)||!g.isValid(P.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const d=v(g,P.Z);if(!g.isOdd)throw new Error("Fp.isOdd is not implemented!");return w=>{let E,p,S,A,T,C,I,R;E=g.sqr(w),E=g.mul(E,P.Z),p=g.sqr(E),p=g.add(p,E),S=g.add(p,g.ONE),S=g.mul(S,P.B),A=g.cmov(P.Z,g.neg(p),!g.eql(p,g.ZERO)),A=g.mul(A,P.A),p=g.sqr(S),C=g.sqr(A),T=g.mul(C,P.A),p=g.add(p,T),p=g.mul(p,S),C=g.mul(C,A),T=g.mul(C,P.B),p=g.add(p,T),I=g.mul(E,S);const{isValid:q,value:F}=d(p,C);R=g.mul(E,w),R=g.mul(R,F),I=g.cmov(I,S,q),R=g.cmov(R,F,q);const H=g.isOdd(w)===g.isOdd(R);R=g.cmov(g.neg(R),R,H);const j=(0,n.FpInvertBatch)(g,[A],!0)[0];return I=g.mul(I,j),{x:I,y:R}}}})(kd)),kd}var a1;function Jv(){if(a1)return lo;a1=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.getHash=t,lo.createCurve=o;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=mg(),r=hr(),n=hg();function t(s){return{hash:s,hmac:(i,...a)=>(0,e.hmac)(s,i,(0,r.concatBytes)(...a)),randomBytes:r.randomBytes}}function o(s,i){const a=c=>(0,n.weierstrass)({...s,...t(c)});return{...a(i),create:a}}return lo}var cr={},s1;function Yv(){if(s1)return cr;s1=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.expand_message_xmd=i,cr.expand_message_xof=a,cr.hash_to_field=c,cr.isogenyMap=u,cr.createHasher=l;const e=Lu(),r=Yr(),n=r.bytesToNumberBE;function t(f,m){if(s(f),s(m),f<0||f>=1<<8*m)throw new Error("invalid I2OSP input: "+f);const y=Array.from({length:m}).fill(0);for(let h=m-1;h>=0;h--)y[h]=f&255,f>>>=8;return new Uint8Array(y)}function o(f,m){const y=new Uint8Array(f.length);for(let h=0;h<f.length;h++)y[h]=f[h]^m[h];return y}function s(f){if(!Number.isSafeInteger(f))throw new Error("number expected")}function i(f,m,y,h){(0,r.abytes)(f),(0,r.abytes)(m),s(y),m.length>255&&(m=h((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),m)));const{outputLen:b,blockLen:v}=h,_=Math.ceil(y/b);if(y>65535||_>255)throw new Error("expand_message_xmd: invalid lenInBytes");const g=(0,r.concatBytes)(m,t(m.length,1)),P=t(0,v),d=t(y,2),w=new Array(_),E=h((0,r.concatBytes)(P,f,d,t(0,1),g));w[0]=h((0,r.concatBytes)(E,t(1,1),g));for(let S=1;S<=_;S++){const A=[o(E,w[S-1]),t(S+1,1),g];w[S]=h((0,r.concatBytes)(...A))}return(0,r.concatBytes)(...w).slice(0,y)}function a(f,m,y,h,b){if((0,r.abytes)(f),(0,r.abytes)(m),s(y),m.length>255){const v=Math.ceil(2*h/8);m=b.create({dkLen:v}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(m).digest()}if(y>65535||m.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return b.create({dkLen:y}).update(f).update(t(y,2)).update(m).update(t(m.length,1)).digest()}function c(f,m,y){(0,r.validateObject)(y,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:h,k:b,m:v,hash:_,expand:g,DST:P}=y;(0,r.abytes)(f),s(m);const d=typeof P=="string"?(0,r.utf8ToBytes)(P):P,w=h.toString(2).length,E=Math.ceil((w+b)/8),p=m*v*E;let S;if(g==="xmd")S=i(f,d,p,_);else if(g==="xof")S=a(f,d,p,b,_);else if(g==="_internal_pass")S=f;else throw new Error('expand must be "xmd" or "xof"');const A=new Array(m);for(let T=0;T<m;T++){const C=new Array(v);for(let I=0;I<v;I++){const R=E*(I+T*v),q=S.subarray(R,R+E);C[I]=(0,e.mod)(n(q),h)}A[T]=C}return A}function u(f,m){const y=m.map(h=>Array.from(h).reverse());return(h,b)=>{const[v,_,g,P]=y.map(E=>E.reduce((p,S)=>f.add(f.mul(p,h),S))),[d,w]=(0,e.FpInvertBatch)(f,[_,P],!0);return h=f.mul(v,d),b=f.mul(b,f.mul(g,w)),{x:h,y:b}}}function l(f,m,y){if(typeof m!="function")throw new Error("mapToCurve() must be defined");function h(v){return f.fromAffine(m(v))}function b(v){const _=v.clearCofactor();return _.equals(f.ZERO)?f.ZERO:(_.assertValidity(),_)}return{defaults:y,hashToCurve(v,_){const g=c(v,2,{...y,DST:y.DST,..._}),P=h(g[0]),d=h(g[1]);return b(P.add(d))},encodeToCurve(v,_){const g=c(v,1,{...y,DST:y.encodeDST,..._});return b(h(g[0]))},mapToCurve(v){if(!Array.isArray(v))throw new Error("expected array of bigints");for(const _ of v)if(typeof _!="bigint")throw new Error("expected array of bigints");return b(h(v))}}}return cr}var c1;function Xr(){return c1||(c1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.secp256k1_hasher=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=bg(),n=hr(),t=Jv(),o=Yv(),s=Lu(),i=Yr(),a=hg(),c=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),u=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l=BigInt(0),f=BigInt(1),m=BigInt(2),y=(j,k)=>(j+k/m)/k;function h(j){const k=c,B=BigInt(3),O=BigInt(6),x=BigInt(11),M=BigInt(22),N=BigInt(23),z=BigInt(44),$=BigInt(88),U=j*j*j%k,G=U*U*j%k,J=(0,s.pow2)(G,B,k)*G%k,K=(0,s.pow2)(J,B,k)*G%k,V=(0,s.pow2)(K,m,k)*U%k,Y=(0,s.pow2)(V,x,k)*V%k,te=(0,s.pow2)(Y,M,k)*Y%k,Z=(0,s.pow2)(te,z,k)*te%k,X=(0,s.pow2)(Z,$,k)*Z%k,Q=(0,s.pow2)(X,z,k)*te%k,ne=(0,s.pow2)(Q,B,k)*G%k,re=(0,s.pow2)(ne,N,k)*Y%k,ae=(0,s.pow2)(re,O,k)*U%k,ce=(0,s.pow2)(ae,m,k);if(!b.eql(b.sqr(ce),j))throw new Error("Cannot find square root");return ce}const b=(0,s.Field)(c,void 0,void 0,{sqrt:h});e.secp256k1=(0,t.createCurve)({a:l,b:BigInt(7),Fp:b,n:u,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:j=>{const k=u,B=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),O=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),x=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),M=B,N=BigInt("0x100000000000000000000000000000000"),z=y(M*j,k),$=y(-O*j,k);let U=(0,s.mod)(j-z*B-$*x,k),G=(0,s.mod)(-z*O-$*M,k);const J=U>N,K=G>N;if(J&&(U=k-U),K&&(G=k-G),U>N||G>N)throw new Error("splitScalar: Endomorphism failed, k="+j);return{k1neg:J,k1:U,k2neg:K,k2:G}}}},r.sha256);const v={};function _(j,...k){let B=v[j];if(B===void 0){const O=(0,r.sha256)(Uint8Array.from(j,x=>x.charCodeAt(0)));B=(0,i.concatBytes)(O,O),v[j]=B}return(0,r.sha256)((0,i.concatBytes)(B,...k))}const g=j=>j.toRawBytes(!0).slice(1),P=j=>(0,i.numberToBytesBE)(j,32),d=j=>(0,s.mod)(j,c),w=j=>(0,s.mod)(j,u),E=e.secp256k1.ProjectivePoint,p=(j,k,B)=>E.BASE.multiplyAndAddUnsafe(j,k,B);function S(j){let k=e.secp256k1.utils.normPrivateKeyToScalar(j),B=E.fromPrivateKey(k);return{scalar:B.hasEvenY()?k:w(-k),bytes:g(B)}}function A(j){(0,i.aInRange)("x",j,f,c);const k=d(j*j),B=d(k*j+BigInt(7));let O=h(B);O%m!==l&&(O=d(-O));const x=new E(j,O,f);return x.assertValidity(),x}const T=i.bytesToNumberBE;function C(...j){return w(T(_("BIP0340/challenge",...j)))}function I(j){return S(j).bytes}function R(j,k,B=(0,n.randomBytes)(32)){const O=(0,i.ensureBytes)("message",j),{bytes:x,scalar:M}=S(k),N=(0,i.ensureBytes)("auxRand",B,32),z=P(M^T(_("BIP0340/aux",N))),$=_("BIP0340/nonce",z,x,O),U=w(T($));if(U===l)throw new Error("sign failed: k is zero");const{bytes:G,scalar:J}=S(U),K=C(G,x,O),V=new Uint8Array(64);if(V.set(G,0),V.set(P(w(J+K*M)),32),!q(V,O,x))throw new Error("sign: Invalid signature produced");return V}function q(j,k,B){const O=(0,i.ensureBytes)("signature",j,64),x=(0,i.ensureBytes)("message",k),M=(0,i.ensureBytes)("publicKey",B,32);try{const N=A(T(M)),z=T(O.subarray(0,32));if(!(0,i.inRange)(z,f,c))return!1;const $=T(O.subarray(32,64));if(!(0,i.inRange)($,f,u))return!1;const U=C(P(z),g(N),x),G=p(N,$,w(-U));return!(!G||!G.hasEvenY()||G.toAffine().x!==z)}catch{return!1}}e.schnorr={getPublicKey:I,sign:R,verify:q,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:A,pointToBytes:g,numberToBytesBE:i.numberToBytesBE,bytesToNumberBE:i.bytesToNumberBE,taggedHash:_,mod:s.mod}};const F=(0,o.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(j=>j.map(k=>BigInt(k)))),H=(0,a.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))});e.secp256k1_hasher=(0,o.createHasher)(e.secp256k1.ProjectivePoint,j=>{const{x:k,y:B}=H(b.create(j[0]));return F(k,B)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}),e.hashToCurve=e.secp256k1_hasher.hashToCurve,e.encodeToCurve=e.secp256k1_hasher.encodeToCurve})(qd)),qd}var u1;function ff(){if(u1)return ea;u1=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.recoverPublicKey=o;const e=Ze(),r=Ue(),n=Be(),t=oe();async function o({hash:i,signature:a}){const c=(0,e.isHex)(i)?i:(0,t.toHex)(i),{secp256k1:u}=await Promise.resolve().then(()=>Xr());return`0x${(()=>{if(typeof a=="object"&&"r"in a&&"s"in a){const{r:b,s:v,v:_,yParity:g}=a,P=Number(g??_),d=s(P);return new u.Signature((0,n.hexToBigInt)(b),(0,n.hexToBigInt)(v)).addRecoveryBit(d)}const m=(0,e.isHex)(a)?a:(0,t.toHex)(a);if((0,r.size)(m)!==65)throw new Error("invalid signature length");const y=(0,n.hexToNumber)(`0x${m.slice(130)}`),h=s(y);return u.Signature.fromCompact(m.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(c.substring(2)).toHex(!1)}`}function s(i){if(i===0||i===1)return i;if(i===27)return 0;if(i===28)return 1;throw new Error("Invalid yParityOrV value")}return ea}var d1;function vr(){if(d1)return Xi;d1=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.recoverAddress=n;const e=fg(),r=ff();async function n({hash:t,signature:o}){return(0,e.publicKeyToAddress)(await(0,r.recoverPublicKey)({hash:t,signature:o}))}return Xi}var ta={},fn={},f1;function Ko(){if(f1)return fn;f1=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.toRlp=o,fn.bytesToRlp=s,fn.hexToRlp=i;const e=ue(),r=Do(),n=Ee(),t=oe();function o(f,m="hex"){const y=a(f),h=(0,r.createCursor)(new Uint8Array(y.length));return y.encode(h),m==="hex"?(0,t.bytesToHex)(h.bytes):h.bytes}function s(f,m="bytes"){return o(f,m)}function i(f,m="hex"){return o(f,m)}function a(f){return Array.isArray(f)?c(f.map(m=>a(m))):u(f)}function c(f){const m=f.reduce((b,v)=>b+v.length,0),y=l(m);return{length:m<=55?1+m:1+y+m,encode(b){m<=55?b.pushByte(192+m):(b.pushByte(247+y),y===1?b.pushUint8(m):y===2?b.pushUint16(m):y===3?b.pushUint24(m):b.pushUint32(m));for(const{encode:v}of f)v(b)}}}function u(f){const m=typeof f=="string"?(0,n.hexToBytes)(f):f,y=l(m.length);return{length:m.length===1&&m[0]<128?1:m.length<=55?1+m.length:1+y+m.length,encode(b){m.length===1&&m[0]<128?b.pushBytes(m):m.length<=55?(b.pushByte(128+m.length),b.pushBytes(m)):(b.pushByte(183+y),y===1?b.pushUint8(m.length):y===2?b.pushUint16(m.length):y===3?b.pushUint24(m.length):b.pushUint32(m.length),b.pushBytes(m))}}}function l(f){if(f<2**8)return 1;if(f<2**16)return 2;if(f<2**24)return 3;if(f<2**32)return 4;throw new e.BaseError("Length is too large.")}return fn}var l1;function yg(){if(l1)return ta;l1=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.hashAuthorization=s;const e=qe(),r=Ee(),n=oe(),t=Ko(),o=tt();function s(i){const{chainId:a,nonce:c,to:u}=i,l=i.contractAddress??i.address,f=(0,o.keccak256)((0,e.concatHex)(["0x05",(0,t.toRlp)([a?(0,n.numberToHex)(a):"0x",l,c?(0,n.numberToHex)(c):"0x"])]));return u==="bytes"?(0,r.hexToBytes)(f):f}return ta}var b1;function Zo(){if(b1)return Yi;b1=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.recoverAuthorizationAddress=n;const e=vr(),r=yg();async function n(t){const{authorization:o,signature:s}=t;return(0,e.recoverAddress)({hash:(0,r.hashAuthorization)(o),signature:s??o})}return Yi}var ra={},bo={},m1;function pg(){if(m1)return bo;m1=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.EstimateGasExecutionError=void 0;const e=Wo(),r=Jr(),n=ue(),t=nt();class o extends n.BaseError{constructor(i,{account:a,docsPath:c,chain:u,data:l,gas:f,gasPrice:m,maxFeePerGas:y,maxPriorityFeePerGas:h,nonce:b,to:v,value:_}){var P;const g=(0,t.prettyPrint)({from:a==null?void 0:a.address,to:v,value:typeof _<"u"&&`${(0,e.formatEther)(_)} ${((P=u==null?void 0:u.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:l,gas:f,gasPrice:typeof m<"u"&&`${(0,r.formatGwei)(m)} gwei`,maxFeePerGas:typeof y<"u"&&`${(0,r.formatGwei)(y)} gwei`,maxPriorityFeePerGas:typeof h<"u"&&`${(0,r.formatGwei)(h)} gwei`,nonce:b});super(i.shortMessage,{cause:i,docsPath:c,metaMessages:[...i.metaMessages?[...i.metaMessages," "]:[],"Estimate Gas Arguments:",g].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=i}}return bo.EstimateGasExecutionError=o,bo}var ve={},h1;function rr(){if(h1)return ve;h1=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.UnknownNodeError=ve.TipAboveFeeCapError=ve.TransactionTypeNotSupportedError=ve.IntrinsicGasTooLowError=ve.IntrinsicGasTooHighError=ve.InsufficientFundsError=ve.NonceMaxValueError=ve.NonceTooLowError=ve.NonceTooHighError=ve.FeeCapTooLowError=ve.FeeCapTooHighError=ve.ExecutionRevertedError=void 0;const e=Jr(),r=ue();class n extends r.BaseError{constructor({cause:b,message:v}={}){var g;const _=(g=v==null?void 0:v.replace("execution reverted: ",""))==null?void 0:g.replace("execution reverted","");super(`Execution reverted ${_?`with reason: ${_}`:"for an unknown reason"}.`,{cause:b,name:"ExecutionRevertedError"})}}ve.ExecutionRevertedError=n,Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class t extends r.BaseError{constructor({cause:b,maxFeePerGas:v}={}){super(`The fee cap (\`maxFeePerGas\`${v?` = ${(0,e.formatGwei)(v)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:b,name:"FeeCapTooHighError"})}}ve.FeeCapTooHighError=t,Object.defineProperty(t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends r.BaseError{constructor({cause:b,maxFeePerGas:v}={}){super(`The fee cap (\`maxFeePerGas\`${v?` = ${(0,e.formatGwei)(v)}`:""} gwei) cannot be lower than the block base fee.`,{cause:b,name:"FeeCapTooLowError"})}}ve.FeeCapTooLowError=o,Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class s extends r.BaseError{constructor({cause:b,nonce:v}={}){super(`Nonce provided for the transaction ${v?`(${v}) `:""}is higher than the next one expected.`,{cause:b,name:"NonceTooHighError"})}}ve.NonceTooHighError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class i extends r.BaseError{constructor({cause:b,nonce:v}={}){super([`Nonce provided for the transaction ${v?`(${v}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
38
+ `),{cause:b,name:"NonceTooLowError"})}}ve.NonceTooLowError=i,Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class a extends r.BaseError{constructor({cause:b,nonce:v}={}){super(`Nonce provided for the transaction ${v?`(${v}) `:""}exceeds the maximum allowed nonce.`,{cause:b,name:"NonceMaxValueError"})}}ve.NonceMaxValueError=a,Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class c extends r.BaseError{constructor({cause:b}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
39
+ `),{cause:b,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}ve.InsufficientFundsError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class u extends r.BaseError{constructor({cause:b,gas:v}={}){super(`The amount of gas ${v?`(${v}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:b,name:"IntrinsicGasTooHighError"})}}ve.IntrinsicGasTooHighError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class l extends r.BaseError{constructor({cause:b,gas:v}={}){super(`The amount of gas ${v?`(${v}) `:""}provided for the transaction is too low.`,{cause:b,name:"IntrinsicGasTooLowError"})}}ve.IntrinsicGasTooLowError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends r.BaseError{constructor({cause:b}){super("The transaction type is not supported for this chain.",{cause:b,name:"TransactionTypeNotSupportedError"})}}ve.TransactionTypeNotSupportedError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends r.BaseError{constructor({cause:b,maxPriorityFeePerGas:v,maxFeePerGas:_}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${v?` = ${(0,e.formatGwei)(v)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${_?` = ${(0,e.formatGwei)(_)} gwei`:""}).`].join(`
40
+ `),{cause:b,name:"TipAboveFeeCapError"})}}ve.TipAboveFeeCapError=m,Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class y extends r.BaseError{constructor({cause:b}){super(`An error occurred while executing: ${b==null?void 0:b.shortMessage}`,{cause:b,name:"UnknownNodeError"})}}return ve.UnknownNodeError=y,ve}var mo={},y1;function Jo(){if(y1)return mo;y1=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.containsNodeError=o,mo.getNodeError=s;const e=ue(),r=rr(),n=pt(),t=gr();function o(i){return i instanceof t.TransactionRejectedRpcError||i instanceof t.InvalidInputRpcError||i instanceof n.RpcRequestError&&i.code===r.ExecutionRevertedError.code}function s(i,a){const c=(i.details||"").toLowerCase(),u=i instanceof e.BaseError?i.walk(l=>(l==null?void 0:l.code)===r.ExecutionRevertedError.code):i;return u instanceof e.BaseError?new r.ExecutionRevertedError({cause:i,message:u.details}):r.ExecutionRevertedError.nodeMessage.test(c)?new r.ExecutionRevertedError({cause:i,message:i.details}):r.FeeCapTooHighError.nodeMessage.test(c)?new r.FeeCapTooHighError({cause:i,maxFeePerGas:a==null?void 0:a.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(c)?new r.FeeCapTooLowError({cause:i,maxFeePerGas:a==null?void 0:a.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(c)?new r.NonceTooHighError({cause:i,nonce:a==null?void 0:a.nonce}):r.NonceTooLowError.nodeMessage.test(c)?new r.NonceTooLowError({cause:i,nonce:a==null?void 0:a.nonce}):r.NonceMaxValueError.nodeMessage.test(c)?new r.NonceMaxValueError({cause:i,nonce:a==null?void 0:a.nonce}):r.InsufficientFundsError.nodeMessage.test(c)?new r.InsufficientFundsError({cause:i}):r.IntrinsicGasTooHighError.nodeMessage.test(c)?new r.IntrinsicGasTooHighError({cause:i,gas:a==null?void 0:a.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(c)?new r.IntrinsicGasTooLowError({cause:i,gas:a==null?void 0:a.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(c)?new r.TransactionTypeNotSupportedError({cause:i}):r.TipAboveFeeCapError.nodeMessage.test(c)?new r.TipAboveFeeCapError({cause:i,maxFeePerGas:a==null?void 0:a.maxFeePerGas,maxPriorityFeePerGas:a==null?void 0:a.maxPriorityFeePerGas}):new r.UnknownNodeError({cause:i})}return mo}var p1;function gg(){if(p1)return ra;p1=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.getEstimateGasError=t;const e=pg(),r=rr(),n=Jo();function t(o,{docsPath:s,...i}){const a=(()=>{const c=(0,n.getNodeError)(o,i);return c instanceof r.UnknownNodeError?o:c})();return new e.EstimateGasExecutionError(a,{docsPath:s,...i})}return ra}var na={},g1;function Er(){if(g1)return na;g1=1,Object.defineProperty(na,"__esModule",{value:!0}),na.extract=e;function e(r,{format:n}){if(!n)return{};const t={};function o(i){const a=Object.keys(i);for(const c of a)c in r&&(t[c]=r[c]),i[c]&&typeof i[c]=="object"&&!Array.isArray(i[c])&&o(i[c])}const s=n(r||{});return o(s),t}return na}var Hd={},oa={},_1;function Yo(){if(_1)return oa;_1=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.defineFormatter=e;function e(r,n){return({exclude:t,format:o})=>({exclude:t,format:(s,i)=>{const a=n(s,i);if(t)for(const c of t)delete a[c];return{...a,...o(s,i)}},type:r})}return oa}var v1;function St(){return v1||(v1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.rpcTransactionType=void 0,e.formatTransactionRequest=t;const r=oe(),n=Yo();e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function t(s,i){const a={};return typeof s.authorizationList<"u"&&(a.authorizationList=o(s.authorizationList)),typeof s.accessList<"u"&&(a.accessList=s.accessList),typeof s.blobVersionedHashes<"u"&&(a.blobVersionedHashes=s.blobVersionedHashes),typeof s.blobs<"u"&&(typeof s.blobs[0]!="string"?a.blobs=s.blobs.map(c=>(0,r.bytesToHex)(c)):a.blobs=s.blobs),typeof s.data<"u"&&(a.data=s.data),s.account&&(a.from=s.account.address),typeof s.from<"u"&&(a.from=s.from),typeof s.gas<"u"&&(a.gas=(0,r.numberToHex)(s.gas)),typeof s.gasPrice<"u"&&(a.gasPrice=(0,r.numberToHex)(s.gasPrice)),typeof s.maxFeePerBlobGas<"u"&&(a.maxFeePerBlobGas=(0,r.numberToHex)(s.maxFeePerBlobGas)),typeof s.maxFeePerGas<"u"&&(a.maxFeePerGas=(0,r.numberToHex)(s.maxFeePerGas)),typeof s.maxPriorityFeePerGas<"u"&&(a.maxPriorityFeePerGas=(0,r.numberToHex)(s.maxPriorityFeePerGas)),typeof s.nonce<"u"&&(a.nonce=(0,r.numberToHex)(s.nonce)),typeof s.to<"u"&&(a.to=s.to),typeof s.type<"u"&&(a.type=e.rpcTransactionType[s.type]),typeof s.value<"u"&&(a.value=(0,r.numberToHex)(s.value)),a}e.defineTransactionRequest=(0,n.defineFormatter)("transactionRequest",t);function o(s){return s.map(i=>({address:i.address,r:i.r?(0,r.numberToHex)(BigInt(i.r)):i.r,s:i.s?(0,r.numberToHex)(BigInt(i.s)):i.s,chainId:(0,r.numberToHex)(i.chainId),nonce:(0,r.numberToHex)(i.nonce),...typeof i.yParity<"u"?{yParity:(0,r.numberToHex)(i.yParity)}:{},...typeof i.v<"u"&&typeof i.yParity>"u"?{v:(0,r.numberToHex)(i.v)}:{}}))}})(Hd)),Hd}var ln={},E1;function lf(){if(E1)return ln;E1=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.serializeStateMapping=s,ln.serializeAccountStateOverride=i,ln.serializeStateOverride=a;const e=At(),r=Hu(),n=df(),t=rt(),o=oe();function s(c){if(!(!c||c.length===0))return c.reduce((u,{slot:l,value:f})=>{if(l.length!==66)throw new r.InvalidBytesLengthError({size:l.length,targetSize:66,type:"hex"});if(f.length!==66)throw new r.InvalidBytesLengthError({size:f.length,targetSize:66,type:"hex"});return u[l]=f,u},{})}function i(c){const{balance:u,nonce:l,state:f,stateDiff:m,code:y}=c,h={};if(y!==void 0&&(h.code=y),u!==void 0&&(h.balance=(0,o.numberToHex)(u)),l!==void 0&&(h.nonce=(0,o.numberToHex)(l)),f!==void 0&&(h.state=s(f)),m!==void 0){if(h.state)throw new n.StateAssignmentConflictError;h.stateDiff=s(m)}return h}function a(c){if(!c)return;const u={};for(const{address:l,...f}of c){if(!(0,t.isAddress)(l,{strict:!1}))throw new e.InvalidAddressError({address:l});if(u[l])throw new n.AccountStateConflictError({address:l});u[l]=i(f)}return u}return ln}var ia={},D={},j1;function bf(){return j1||(j1=1,Object.defineProperty(D,"__esModule",{value:!0}),D.minInt144=D.minInt136=D.minInt128=D.minInt120=D.minInt112=D.minInt104=D.minInt96=D.minInt88=D.minInt80=D.minInt72=D.minInt64=D.minInt56=D.minInt48=D.minInt40=D.minInt32=D.minInt24=D.minInt16=D.minInt8=D.maxInt256=D.maxInt248=D.maxInt240=D.maxInt232=D.maxInt224=D.maxInt216=D.maxInt208=D.maxInt200=D.maxInt192=D.maxInt184=D.maxInt176=D.maxInt168=D.maxInt160=D.maxInt152=D.maxInt144=D.maxInt136=D.maxInt128=D.maxInt120=D.maxInt112=D.maxInt104=D.maxInt96=D.maxInt88=D.maxInt80=D.maxInt72=D.maxInt64=D.maxInt56=D.maxInt48=D.maxInt40=D.maxInt32=D.maxInt24=D.maxInt16=D.maxInt8=void 0,D.maxUint256=D.maxUint248=D.maxUint240=D.maxUint232=D.maxUint224=D.maxUint216=D.maxUint208=D.maxUint200=D.maxUint192=D.maxUint184=D.maxUint176=D.maxUint168=D.maxUint160=D.maxUint152=D.maxUint144=D.maxUint136=D.maxUint128=D.maxUint120=D.maxUint112=D.maxUint104=D.maxUint96=D.maxUint88=D.maxUint80=D.maxUint72=D.maxUint64=D.maxUint56=D.maxUint48=D.maxUint40=D.maxUint32=D.maxUint24=D.maxUint16=D.maxUint8=D.minInt256=D.minInt248=D.minInt240=D.minInt232=D.minInt224=D.minInt216=D.minInt208=D.minInt200=D.minInt192=D.minInt184=D.minInt176=D.minInt168=D.minInt160=D.minInt152=void 0,D.maxInt8=2n**(8n-1n)-1n,D.maxInt16=2n**(16n-1n)-1n,D.maxInt24=2n**(24n-1n)-1n,D.maxInt32=2n**(32n-1n)-1n,D.maxInt40=2n**(40n-1n)-1n,D.maxInt48=2n**(48n-1n)-1n,D.maxInt56=2n**(56n-1n)-1n,D.maxInt64=2n**(64n-1n)-1n,D.maxInt72=2n**(72n-1n)-1n,D.maxInt80=2n**(80n-1n)-1n,D.maxInt88=2n**(88n-1n)-1n,D.maxInt96=2n**(96n-1n)-1n,D.maxInt104=2n**(104n-1n)-1n,D.maxInt112=2n**(112n-1n)-1n,D.maxInt120=2n**(120n-1n)-1n,D.maxInt128=2n**(128n-1n)-1n,D.maxInt136=2n**(136n-1n)-1n,D.maxInt144=2n**(144n-1n)-1n,D.maxInt152=2n**(152n-1n)-1n,D.maxInt160=2n**(160n-1n)-1n,D.maxInt168=2n**(168n-1n)-1n,D.maxInt176=2n**(176n-1n)-1n,D.maxInt184=2n**(184n-1n)-1n,D.maxInt192=2n**(192n-1n)-1n,D.maxInt200=2n**(200n-1n)-1n,D.maxInt208=2n**(208n-1n)-1n,D.maxInt216=2n**(216n-1n)-1n,D.maxInt224=2n**(224n-1n)-1n,D.maxInt232=2n**(232n-1n)-1n,D.maxInt240=2n**(240n-1n)-1n,D.maxInt248=2n**(248n-1n)-1n,D.maxInt256=2n**(256n-1n)-1n,D.minInt8=-(2n**(8n-1n)),D.minInt16=-(2n**(16n-1n)),D.minInt24=-(2n**(24n-1n)),D.minInt32=-(2n**(32n-1n)),D.minInt40=-(2n**(40n-1n)),D.minInt48=-(2n**(48n-1n)),D.minInt56=-(2n**(56n-1n)),D.minInt64=-(2n**(64n-1n)),D.minInt72=-(2n**(72n-1n)),D.minInt80=-(2n**(80n-1n)),D.minInt88=-(2n**(88n-1n)),D.minInt96=-(2n**(96n-1n)),D.minInt104=-(2n**(104n-1n)),D.minInt112=-(2n**(112n-1n)),D.minInt120=-(2n**(120n-1n)),D.minInt128=-(2n**(128n-1n)),D.minInt136=-(2n**(136n-1n)),D.minInt144=-(2n**(144n-1n)),D.minInt152=-(2n**(152n-1n)),D.minInt160=-(2n**(160n-1n)),D.minInt168=-(2n**(168n-1n)),D.minInt176=-(2n**(176n-1n)),D.minInt184=-(2n**(184n-1n)),D.minInt192=-(2n**(192n-1n)),D.minInt200=-(2n**(200n-1n)),D.minInt208=-(2n**(208n-1n)),D.minInt216=-(2n**(216n-1n)),D.minInt224=-(2n**(224n-1n)),D.minInt232=-(2n**(232n-1n)),D.minInt240=-(2n**(240n-1n)),D.minInt248=-(2n**(248n-1n)),D.minInt256=-(2n**(256n-1n)),D.maxUint8=2n**8n-1n,D.maxUint16=2n**16n-1n,D.maxUint24=2n**24n-1n,D.maxUint32=2n**32n-1n,D.maxUint40=2n**40n-1n,D.maxUint48=2n**48n-1n,D.maxUint56=2n**56n-1n,D.maxUint64=2n**64n-1n,D.maxUint72=2n**72n-1n,D.maxUint80=2n**80n-1n,D.maxUint88=2n**88n-1n,D.maxUint96=2n**96n-1n,D.maxUint104=2n**104n-1n,D.maxUint112=2n**112n-1n,D.maxUint120=2n**120n-1n,D.maxUint128=2n**128n-1n,D.maxUint136=2n**136n-1n,D.maxUint144=2n**144n-1n,D.maxUint152=2n**152n-1n,D.maxUint160=2n**160n-1n,D.maxUint168=2n**168n-1n,D.maxUint176=2n**176n-1n,D.maxUint184=2n**184n-1n,D.maxUint192=2n**192n-1n,D.maxUint200=2n**200n-1n,D.maxUint208=2n**208n-1n,D.maxUint216=2n**216n-1n,D.maxUint224=2n**224n-1n,D.maxUint232=2n**232n-1n,D.maxUint240=2n**240n-1n,D.maxUint248=2n**248n-1n,D.maxUint256=2n**256n-1n),D}var w1;function It(){if(w1)return ia;w1=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.assertRequest=s;const e=Ie(),r=bf(),n=At(),t=rr(),o=rt();function s(i){const{account:a,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=i,f=a?(0,e.parseAccount)(a):void 0;if(f&&!(0,o.isAddress)(f.address))throw new n.InvalidAddressError({address:f.address});if(l&&!(0,o.isAddress)(l))throw new n.InvalidAddressError({address:l});if(c&&c>r.maxUint256)throw new t.FeeCapTooHighError({maxFeePerGas:c});if(u&&c&&u>c)throw new t.TipAboveFeeCapError({maxFeePerGas:c,maxPriorityFeePerGas:u})}return ia}var Fd={},ho={},Jt={},P1;function Xo(){if(P1)return Jt;P1=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.MaxFeePerGasTooLowError=Jt.Eip1559FeesNotSupportedError=Jt.BaseFeeScalarError=void 0;const e=Jr(),r=ue();class n extends r.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}Jt.BaseFeeScalarError=n;class t extends r.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}Jt.Eip1559FeesNotSupportedError=t;class o extends r.BaseError{constructor({maxPriorityFeePerGas:i}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,e.formatGwei)(i)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}return Jt.MaxFeePerGasTooLowError=o,Jt}var yo={},aa={},po={},A1;function Du(){if(A1)return po;A1=1,Object.defineProperty(po,"__esModule",{value:!0}),po.BlockNotFoundError=void 0;const e=ue();class r extends e.BaseError{constructor({blockHash:t,blockNumber:o}){let s="Block";t&&(s=`Block at hash "${t}"`),o&&(s=`Block at number "${o}"`),super(`${s} could not be found.`,{name:"BlockNotFoundError"})}}return po.BlockNotFoundError=r,po}var bn={},Nd={},T1;function Rn(){return T1||(T1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.transactionType=void 0,e.formatTransaction=t;const r=Be(),n=Yo();e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function t(s,i){const a={...s,blockHash:s.blockHash?s.blockHash:null,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,...s.blockTimestamp!=null&&{blockTimestamp:BigInt(s.blockTimestamp)},chainId:s.chainId?(0,r.hexToNumber)(s.chainId):void 0,gas:s.gas?BigInt(s.gas):void 0,gasPrice:s.gasPrice?BigInt(s.gasPrice):void 0,maxFeePerBlobGas:s.maxFeePerBlobGas?BigInt(s.maxFeePerBlobGas):void 0,maxFeePerGas:s.maxFeePerGas?BigInt(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?BigInt(s.maxPriorityFeePerGas):void 0,nonce:s.nonce?(0,r.hexToNumber)(s.nonce):void 0,to:s.to?s.to:null,transactionIndex:s.transactionIndex?Number(s.transactionIndex):null,type:s.type?e.transactionType[s.type]:void 0,typeHex:s.type?s.type:void 0,value:s.value?BigInt(s.value):void 0,v:s.v?BigInt(s.v):void 0};return s.authorizationList&&(a.authorizationList=o(s.authorizationList)),a.yParity=(()=>{if(s.yParity)return Number(s.yParity);if(typeof a.v=="bigint"){if(a.v===0n||a.v===27n)return 0;if(a.v===1n||a.v===28n)return 1;if(a.v>=35n)return a.v%2n===0n?1:0}})(),a.type==="legacy"&&(delete a.accessList,delete a.maxFeePerBlobGas,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas,delete a.yParity),a.type==="eip2930"&&(delete a.maxFeePerBlobGas,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas),a.type==="eip1559"&&delete a.maxFeePerBlobGas,a}e.defineTransaction=(0,n.defineFormatter)("transaction",t);function o(s){return s.map(i=>({address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:i.r,s:i.s,yParity:Number(i.yParity)}))}})(Nd)),Nd}var S1;function Gu(){if(S1)return bn;S1=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.defineBlock=void 0,bn.formatBlock=n;const e=Yo(),r=Rn();function n(t,o){const s=(t.transactions??[]).map(i=>typeof i=="string"?i:(0,r.formatTransaction)(i));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:s,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}return bn.defineBlock=(0,e.defineFormatter)("block",n),bn}var I1;function Qr(){if(I1)return aa;I1=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.getBlock=t;const e=Du(),r=oe(),n=Gu();async function t(o,{blockHash:s,blockNumber:i,blockTag:a=o.experimental_blockTag??"latest",includeTransactions:c}={}){var y,h,b;const u=c??!1,l=i!==void 0?(0,r.numberToHex)(i):void 0;let f=null;if(s?f=await o.request({method:"eth_getBlockByHash",params:[s,u]},{dedupe:!0}):f=await o.request({method:"eth_getBlockByNumber",params:[l||a,u]},{dedupe:!!l}),!f)throw new e.BlockNotFoundError({blockHash:s,blockNumber:i});return(((b=(h=(y=o.chain)==null?void 0:y.formatters)==null?void 0:h.block)==null?void 0:b.format)||n.formatBlock)(f,"getBlock")}return aa}var sa={},R1;function mf(){if(R1)return sa;R1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.getGasPrice=e;async function e(r){const n=await r.request({method:"eth_gasPrice"});return BigInt(n)}return sa}var B1;function _g(){if(B1)return yo;B1=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.estimateMaxPriorityFeePerGas=s,yo.internal_estimateMaxPriorityFeePerGas=i;const e=Xo(),r=Be(),n=me(),t=Qr(),o=mf();async function s(a,c){return i(a,c)}async function i(a,c){var m,y;const{block:u,chain:l=a.chain,request:f}=c||{};try{const h=((m=l==null?void 0:l.fees)==null?void 0:m.maxPriorityFeePerGas)??((y=l==null?void 0:l.fees)==null?void 0:y.defaultPriorityFee);if(typeof h=="function"){const v=u||await(0,n.getAction)(a,t.getBlock,"getBlock")({}),_=await h({block:v,client:a,request:f});if(_===null)throw new Error;return _}if(typeof h<"u")return h;const b=await a.request({method:"eth_maxPriorityFeePerGas"});return(0,r.hexToBigInt)(b)}catch{const[h,b]=await Promise.all([u?Promise.resolve(u):(0,n.getAction)(a,t.getBlock,"getBlock")({}),(0,n.getAction)(a,o.getGasPrice,"getGasPrice")({})]);if(typeof h.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const v=b-h.baseFeePerGas;return v<0n?0n:v}}return yo}var O1;function vg(){if(O1)return ho;O1=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.estimateFeesPerGas=s,ho.internal_estimateFeesPerGas=i;const e=Xo(),r=me(),n=_g(),t=Qr(),o=mf();async function s(a,c){return i(a,c)}async function i(a,c){var P,d;const{block:u,chain:l=a.chain,request:f,type:m="eip1559"}=c||{},y=await(async()=>{var w,E;return typeof((w=l==null?void 0:l.fees)==null?void 0:w.baseFeeMultiplier)=="function"?l.fees.baseFeeMultiplier({block:u,client:a,request:f}):((E=l==null?void 0:l.fees)==null?void 0:E.baseFeeMultiplier)??1.2})();if(y<1)throw new e.BaseFeeScalarError;const b=10**(((P=y.toString().split(".")[1])==null?void 0:P.length)??0),v=w=>w*BigInt(Math.ceil(y*b))/BigInt(b),_=u||await(0,r.getAction)(a,t.getBlock,"getBlock")({});if(typeof((d=l==null?void 0:l.fees)==null?void 0:d.estimateFeesPerGas)=="function"){const w=await l.fees.estimateFeesPerGas({block:u,client:a,multiply:v,request:f,type:m});if(w!==null)return w}if(m==="eip1559"){if(typeof _.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const w=typeof(f==null?void 0:f.maxPriorityFeePerGas)=="bigint"?f.maxPriorityFeePerGas:await(0,n.internal_estimateMaxPriorityFeePerGas)(a,{block:_,chain:l,request:f}),E=v(_.baseFeePerGas);return{maxFeePerGas:(f==null?void 0:f.maxFeePerGas)??E+w,maxPriorityFeePerGas:w}}return{gasPrice:(f==null?void 0:f.gasPrice)??v(await(0,r.getAction)(a,o.getGasPrice,"getGasPrice")({}))}}return ho}var ca={},ua={},C1;function Bn(){if(C1)return ua;C1=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.formatBlockParameter=n;const e=ue(),r=oe();function n(t){const{blockHash:o,blockNumber:s,blockTag:i,requireCanonical:a}=t;if(a!==void 0&&!o)throw new e.BaseError("`requireCanonical` can only be provided when `blockHash` is set.");return o?a?{blockHash:o,requireCanonical:a}:{blockHash:o}:typeof s=="bigint"?(0,r.numberToHex)(s):i??"latest"}return ua}var x1;function Vu(){if(x1)return ca;x1=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.getTransactionCount=n;const e=Bn(),r=Be();async function n(t,{address:o,blockHash:s,blockNumber:i,blockTag:a="latest",requireCanonical:c}){const u=(0,e.formatBlockParameter)({blockHash:s,blockNumber:i,blockTag:a,requireCanonical:c}),l=await t.request({method:"eth_getTransactionCount",params:[o,u]},{dedupe:typeof i=="bigint"||s!==void 0});return(0,r.hexToNumber)(l)}return ca}var da={},q1;function Wu(){if(q1)return da;q1=1,Object.defineProperty(da,"__esModule",{value:!0}),da.blobsToCommitments=n;const e=Ee(),r=oe();function n(t){const{kzg:o}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),i=typeof t.blobs[0]=="string"?t.blobs.map(c=>(0,e.hexToBytes)(c)):t.blobs,a=[];for(const c of i)a.push(Uint8Array.from(o.blobToKzgCommitment(c)));return s==="bytes"?a:a.map(c=>(0,r.bytesToHex)(c))}return da}var fa={},M1;function Ku(){if(M1)return fa;M1=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.blobsToProofs=n;const e=Ee(),r=oe();function n(t){const{kzg:o}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),i=typeof t.blobs[0]=="string"?t.blobs.map(u=>(0,e.hexToBytes)(u)):t.blobs,a=typeof t.commitments[0]=="string"?t.commitments.map(u=>(0,e.hexToBytes)(u)):t.commitments,c=[];for(let u=0;u<i.length;u++){const l=i[u],f=a[u];c.push(Uint8Array.from(o.computeBlobKzgProof(l,f)))}return s==="bytes"?c:c.map(u=>(0,r.bytesToHex)(u))}return fa}var la={},ba={},ma={},vt={},k1;function Eg(){if(k1)return vt;k1=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.sha224=vt.SHA224=vt.sha256=vt.SHA256=void 0;const e=bg();return vt.SHA256=e.SHA256,vt.sha256=e.sha256,vt.SHA224=e.SHA224,vt.sha224=e.sha224,vt}var H1;function hf(){if(H1)return ma;H1=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.sha256=o;const e=Eg(),r=Ze(),n=Ee(),t=oe();function o(s,i){const a=i||"hex",c=(0,e.sha256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return ma}var F1;function yf(){if(F1)return ba;F1=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.commitmentToVersionedHash=n;const e=oe(),r=hf();function n(t){const{commitment:o,version:s=1}=t,i=t.to??(typeof o=="string"?"hex":"bytes"),a=(0,r.sha256)(o,"bytes");return a.set([s],0),i==="bytes"?a:(0,e.bytesToHex)(a)}return ba}var N1;function pf(){if(N1)return la;N1=1,Object.defineProperty(la,"__esModule",{value:!0}),la.commitmentsToVersionedHashes=r;const e=yf();function r(n){const{commitments:t,version:o}=n,s=n.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const a of t)i.push((0,e.commitmentToVersionedHash)({commitment:a,to:s,version:o}));return i}return la}var ha={},ya={},$d={},$1;function Xv(){return $1||($1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxBytesPerTransaction=e.bytesPerBlob=e.fieldElementsPerBlob=e.bytesPerFieldElement=void 0;const r=6;e.bytesPerFieldElement=32,e.fieldElementsPerBlob=4096,e.bytesPerBlob=e.bytesPerFieldElement*e.fieldElementsPerBlob,e.maxBytesPerTransaction=e.bytesPerBlob*r-1-1*e.fieldElementsPerBlob*r})($d)),$d}var Et={},go={},z1;function jg(){return z1||(z1=1,Object.defineProperty(go,"__esModule",{value:!0}),go.versionedHashVersionKzg=void 0,go.versionedHashVersionKzg=1),go}var U1;function wg(){if(U1)return Et;U1=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.InvalidVersionedHashVersionError=Et.InvalidVersionedHashSizeError=Et.EmptyBlobError=Et.BlobSizeTooLargeError=void 0;const e=jg(),r=ue();class n extends r.BaseError{constructor({maxSize:a,size:c}){super("Blob size is too large.",{metaMessages:[`Max: ${a} bytes`,`Given: ${c} bytes`],name:"BlobSizeTooLargeError"})}}Et.BlobSizeTooLargeError=n;class t extends r.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}Et.EmptyBlobError=t;class o extends r.BaseError{constructor({hash:a,size:c}){super(`Versioned hash "${a}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${c}`],name:"InvalidVersionedHashSizeError"})}}Et.InvalidVersionedHashSizeError=o;class s extends r.BaseError{constructor({hash:a,version:c}){super(`Versioned hash "${a}" version is invalid.`,{metaMessages:[`Expected: ${e.versionedHashVersionKzg}`,`Received: ${c}`],name:"InvalidVersionedHashVersionError"})}}return Et.InvalidVersionedHashVersionError=s,Et}var L1;function Pg(){if(L1)return ya;L1=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.toBlobs=i;const e=Xv(),r=wg(),n=Do(),t=Ue(),o=Ee(),s=oe();function i(a){const c=a.to??(typeof a.data=="string"?"hex":"bytes"),u=typeof a.data=="string"?(0,o.hexToBytes)(a.data):a.data,l=(0,t.size)(u);if(!l)throw new r.EmptyBlobError;if(l>e.maxBytesPerTransaction)throw new r.BlobSizeTooLargeError({maxSize:e.maxBytesPerTransaction,size:l});const f=[];let m=!0,y=0;for(;m;){const h=(0,n.createCursor)(new Uint8Array(e.bytesPerBlob));let b=0;for(;b<e.fieldElementsPerBlob;){const v=u.slice(y,y+(e.bytesPerFieldElement-1));if(h.pushByte(0),h.pushBytes(v),v.length<31){h.pushByte(128),m=!1;break}b++,y+=31}f.push(h)}return c==="bytes"?f.map(h=>h.bytes):f.map(h=>(0,s.bytesToHex)(h.bytes))}return ya}var D1;function Zu(){if(D1)return ha;D1=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.toBlobSidecars=t;const e=Wu(),r=Ku(),n=Pg();function t(o){const{data:s,kzg:i,to:a}=o,c=o.blobs??(0,n.toBlobs)({data:s,to:a}),u=o.commitments??(0,e.blobsToCommitments)({blobs:c,kzg:i,to:a}),l=o.proofs??(0,r.blobsToProofs)({blobs:c,commitments:u,kzg:i,to:a}),f=[];for(let m=0;m<c.length;m++)f.push({blob:c[m],commitment:u[m],proof:l[m]});return f}return ha}var pa={},G1;function Ju(){if(G1)return pa;G1=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.getTransactionType=r;const e=nt();function r(n){if(n.type)return n.type;if(typeof n.authorizationList<"u")return"eip7702";if(typeof n.blobs<"u"||typeof n.blobVersionedHashes<"u"||typeof n.maxFeePerBlobGas<"u"||typeof n.sidecars<"u")return"eip4844";if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")return"eip1559";if(typeof n.gasPrice<"u")return typeof n.accessList<"u"?"eip2930":"legacy";throw new e.InvalidSerializableTransactionError({transaction:n})}return pa}var ga={},_a={},V1;function Qo(){if(V1)return _a;V1=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.getTransactionError=t;const e=rr(),r=nt(),n=Jo();function t(o,{docsPath:s,...i}){const a=(()=>{const c=(0,n.getNodeError)(o,i);return c instanceof e.UnknownNodeError?o:c})();return new r.TransactionExecutionError(a,{docsPath:s,...i})}return _a}var va={},W1;function jr(){if(W1)return va;W1=1,Object.defineProperty(va,"__esModule",{value:!0}),va.getChainId=r;const e=Be();async function r(n){const t=await n.request({method:"eth_chainId"},{dedupe:!0});return(0,e.hexToNumber)(t)}return va}var K1;function gf(){if(K1)return ga;K1=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.fillTransaction=l;const e=Ie(),r=Xo(),n=Qo(),t=Er(),o=Rn(),s=St(),i=me(),a=It(),c=Qr(),u=jr();async function l(f,m){var B,O,x,M,N;const{account:y=f.account,accessList:h,authorizationList:b,chain:v=f.chain,blobVersionedHashes:_,blobs:g,data:P,gas:d,gasPrice:w,maxFeePerBlobGas:E,maxFeePerGas:p,maxPriorityFeePerGas:S,nonce:A,nonceManager:T,to:C,type:I,value:R,...q}=m,F=await(async()=>{if(!y||!T||typeof A<"u")return A;const z=(0,e.parseAccount)(y),$=v?v.id:await(0,i.getAction)(f,u.getChainId,"getChainId")({});return await T.consume({address:z.address,chainId:$,client:f})})();(0,a.assertRequest)(m);const H=(O=(B=v==null?void 0:v.formatters)==null?void 0:B.transactionRequest)==null?void 0:O.format,k=(H||s.formatTransactionRequest)({...(0,t.extract)(q,{format:H}),account:y?(0,e.parseAccount)(y):void 0,accessList:h,authorizationList:b,blobs:g,blobVersionedHashes:_,data:P,gas:d,gasPrice:w,maxFeePerBlobGas:E,maxFeePerGas:p,maxPriorityFeePerGas:S,nonce:F,to:C,type:I,value:R},"fillTransaction");try{const z=await f.request({method:"eth_fillTransaction",params:[k]}),U=(((M=(x=v==null?void 0:v.formatters)==null?void 0:x.transaction)==null?void 0:M.format)||o.formatTransaction)(z.tx);delete U.blockHash,delete U.blockNumber,delete U.r,delete U.s,delete U.transactionIndex,delete U.v,delete U.yParity,U.data=U.input,U.gas&&(U.gas=m.gas??U.gas),U.gasPrice&&(U.gasPrice=m.gasPrice??U.gasPrice),U.maxFeePerBlobGas&&(U.maxFeePerBlobGas=m.maxFeePerBlobGas??U.maxFeePerBlobGas),U.maxFeePerGas&&(U.maxFeePerGas=m.maxFeePerGas??U.maxFeePerGas),U.maxPriorityFeePerGas&&(U.maxPriorityFeePerGas=m.maxPriorityFeePerGas??U.maxPriorityFeePerGas),typeof U.nonce<"u"&&(U.nonce=m.nonce??U.nonce);const G=await(async()=>{var Y,te;if(typeof((Y=v==null?void 0:v.fees)==null?void 0:Y.baseFeeMultiplier)=="function"){const Z=await(0,i.getAction)(f,c.getBlock,"getBlock")({});return v.fees.baseFeeMultiplier({block:Z,client:f,request:m})}return((te=v==null?void 0:v.fees)==null?void 0:te.baseFeeMultiplier)??1.2})();if(G<1)throw new r.BaseFeeScalarError;const K=10**(((N=G.toString().split(".")[1])==null?void 0:N.length)??0),V=Y=>Y*BigInt(Math.ceil(G*K))/BigInt(K);return U.feePayerSignature||(U.maxFeePerGas&&!m.maxFeePerGas&&(U.maxFeePerGas=V(U.maxFeePerGas)),U.gasPrice&&!m.gasPrice&&(U.gasPrice=V(U.gasPrice))),{raw:z.raw,transaction:{from:k.from,...U},...z.capabilities?{capabilities:z.capabilities}:{}}}catch(z){throw(0,n.getTransactionError)(z,{...m,chain:f.chain})}}return ga}var Z1;function ei(){return Z1||(Z1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.supportsFillTransaction=e.eip1559NetworkCache=e.defaultParameters=void 0,e.prepareTransactionRequest=_;const r=Ie(),n=vg(),t=_f(),o=Qr(),s=Vu(),i=Xo(),a=Wu(),c=Ku(),u=pf(),l=Zu(),f=me(),m=Wr(),y=It(),h=Ju(),b=gf(),v=jr();e.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"],e.eip1559NetworkCache=new Map,e.supportsFillTransaction=new m.LruMap(128);async function _(g,P){var M,N,z;let d=P;d.account??(d.account=g.account),d.parameters??(d.parameters=e.defaultParameters);const{account:w,chain:E=g.chain,nonceManager:p,parameters:S}=d,A=(()=>{if(typeof(E==null?void 0:E.prepareTransactionRequest)=="function")return{fn:E.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(E==null?void 0:E.prepareTransactionRequest))return{fn:E.prepareTransactionRequest[0],runAt:E.prepareTransactionRequest[1].runAt}})();let T;async function C(){return T||(typeof d.chainId<"u"?d.chainId:E?E.id:(T=await(0,f.getAction)(g,v.getChainId,"getChainId")({}),T))}const I=w&&(0,r.parseAccount)(w);let R=d.nonce;if(S.includes("nonce")&&typeof R>"u"&&I&&p){const $=await C();R=await p.consume({address:I.address,chainId:$,client:g})}A!=null&&A.fn&&((M=A.runAt)!=null&&M.includes("beforeFillTransaction"))&&(d=await A.fn({...d,chain:E},{client:g,phase:"beforeFillTransaction"}),R??(R=d.nonce));const F=((S.includes("blobVersionedHashes")||S.includes("sidecars"))&&d.kzg&&d.blobs||e.supportsFillTransaction.get(g.uid)===!1||!["fees","gas"].some(U=>S.includes(U))?!1:!!(S.includes("chainId")&&typeof d.chainId!="number"||S.includes("nonce")&&typeof R!="number"||S.includes("fees")&&typeof d.gasPrice!="bigint"&&(typeof d.maxFeePerGas!="bigint"||typeof d.maxPriorityFeePerGas!="bigint")||S.includes("gas")&&typeof d.gas!="bigint"))?await(0,f.getAction)(g,b.fillTransaction,"fillTransaction")({...d,nonce:R}).then($=>{const{chainId:U,from:G,gas:J,gasPrice:K,nonce:V,maxFeePerBlobGas:Y,maxFeePerGas:te,maxPriorityFeePerGas:Z,type:X,...Q}=$.transaction;return e.supportsFillTransaction.set(g.uid,!0),{...d,...G?{from:G}:{},...X&&!d.type?{type:X}:{},...typeof U<"u"?{chainId:U}:{},...typeof J<"u"?{gas:J}:{},...typeof K<"u"?{gasPrice:K}:{},...typeof V<"u"?{nonce:V}:{},...typeof Y<"u"&&d.type!=="legacy"&&d.type!=="eip2930"?{maxFeePerBlobGas:Y}:{},...typeof te<"u"&&d.type!=="legacy"&&d.type!=="eip2930"?{maxFeePerGas:te}:{},...typeof Z<"u"&&d.type!=="legacy"&&d.type!=="eip2930"?{maxPriorityFeePerGas:Z}:{},..."nonceKey"in Q&&typeof Q.nonceKey<"u"?{nonceKey:Q.nonceKey}:{},..."keyAuthorization"in Q&&typeof Q.keyAuthorization<"u"&&Q.keyAuthorization!==null&&!("keyAuthorization"in d)?{keyAuthorization:Q.keyAuthorization}:{},..."feePayerSignature"in Q&&typeof Q.feePayerSignature<"u"&&Q.feePayerSignature!==null?{feePayerSignature:Q.feePayerSignature}:{},..."feeToken"in Q&&typeof Q.feeToken<"u"&&Q.feeToken!==null&&!("feeToken"in d)?{feeToken:Q.feeToken}:{},...$.capabilities?{_capabilities:$.capabilities}:{}}}).catch($=>{var K,V;const U=$;if(U.name!=="TransactionExecutionError")return d;if((K=U.walk)==null?void 0:K.call(U,Y=>Y.name==="ExecutionRevertedError"))throw $;return((V=U.walk)==null?void 0:V.call(U,Y=>{var Z;const te=Y;return te.name==="MethodNotFoundRpcError"||te.name==="MethodNotSupportedRpcError"||((Z=te.message)==null?void 0:Z.includes("eth_fillTransaction is not available"))}))&&e.supportsFillTransaction.set(g.uid,!1),d}):d;R??(R=F.nonce),d={...F,...I?{from:I==null?void 0:I.address}:{},...typeof R<"u"?{nonce:R}:{}};const{blobs:H,gas:j,kzg:k,type:B}=d;A!=null&&A.fn&&((N=A.runAt)!=null&&N.includes("beforeFillParameters"))&&(d=await A.fn({...d,chain:E},{client:g,phase:"beforeFillParameters"}));let O;async function x(){return O||(O=await(0,f.getAction)(g,o.getBlock,"getBlock")({blockTag:"latest"}),O)}if(S.includes("nonce")&&typeof R>"u"&&I&&!p&&(d.nonce=await(0,f.getAction)(g,s.getTransactionCount,"getTransactionCount")({address:I.address,blockTag:"pending"})),(S.includes("blobVersionedHashes")||S.includes("sidecars"))&&H&&k){const $=(0,a.blobsToCommitments)({blobs:H,kzg:k});if(S.includes("blobVersionedHashes")){const U=(0,u.commitmentsToVersionedHashes)({commitments:$,to:"hex"});d.blobVersionedHashes=U}if(S.includes("sidecars")){const U=(0,c.blobsToProofs)({blobs:H,commitments:$,kzg:k}),G=(0,l.toBlobSidecars)({blobs:H,commitments:$,proofs:U,to:"hex"});d.sidecars=G}}if(S.includes("chainId")&&(d.chainId=await C()),(S.includes("fees")||S.includes("type"))&&typeof B>"u")try{d.type=(0,h.getTransactionType)(d)}catch{let $=e.eip1559NetworkCache.get(g.uid);if(typeof $>"u"){const U=await x();$=typeof(U==null?void 0:U.baseFeePerGas)=="bigint",e.eip1559NetworkCache.set(g.uid,$)}d.type=$?"eip1559":"legacy"}if(S.includes("fees"))if(d.type!=="legacy"&&d.type!=="eip2930"){if(typeof d.maxFeePerGas>"u"||typeof d.maxPriorityFeePerGas>"u"){const $=await x(),{maxFeePerGas:U,maxPriorityFeePerGas:G}=await(0,n.internal_estimateFeesPerGas)(g,{block:$,chain:E,request:d});if(typeof d.maxPriorityFeePerGas>"u"&&d.maxFeePerGas&&d.maxFeePerGas<G)throw new i.MaxFeePerGasTooLowError({maxPriorityFeePerGas:G});d.maxPriorityFeePerGas=G,d.maxFeePerGas=U}}else{if(typeof d.maxFeePerGas<"u"||typeof d.maxPriorityFeePerGas<"u")throw new i.Eip1559FeesNotSupportedError;if(typeof d.gasPrice>"u"){const $=await x(),{gasPrice:U}=await(0,n.internal_estimateFeesPerGas)(g,{block:$,chain:E,request:d,type:"legacy"});d.gasPrice=U}}return S.includes("gas")&&typeof j>"u"&&(d.gas=await(0,f.getAction)(g,t.estimateGas,"estimateGas")({...d,account:I,prepare:(I==null?void 0:I.type)==="local"?[]:["blobVersionedHashes"]})),A!=null&&A.fn&&((z=A.runAt)!=null&&z.includes("afterFillParameters"))&&(d=await A.fn({...d,chain:E},{client:g,phase:"afterFillParameters"})),(0,y.assertRequest)(d),delete d.parameters,d}})(Fd)),Fd}var J1;function _f(){if(J1)return Ji;J1=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.estimateGas=l;const e=Ie(),r=ue(),n=Zo(),t=oe(),o=gg(),s=Er(),i=St(),a=lf(),c=It(),u=ei();async function l(f,m){var _,g,P;const{account:y=f.account,prepare:h=!0}=m,b=y?(0,e.parseAccount)(y):void 0,v=(()=>{if(Array.isArray(h))return h;if((b==null?void 0:b.type)!=="local")return["blobVersionedHashes"]})();try{const d=await(async()=>{if(m.to)return m.to;if(m.authorizationList&&m.authorizationList.length>0)return await(0,n.recoverAuthorizationAddress)({authorization:m.authorizationList[0]}).catch(()=>{throw new r.BaseError("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:w,authorizationList:E,blobs:p,blobVersionedHashes:S,blockNumber:A,blockTag:T,data:C,gas:I,gasPrice:R,maxFeePerBlobGas:q,maxFeePerGas:F,maxPriorityFeePerGas:H,nonce:j,value:k,stateOverride:B,...O}=h?await(0,u.prepareTransactionRequest)(f,{...m,parameters:v,to:d}):m;if(I&&m.gas!==I)return I;const M=(typeof A=="bigint"?(0,t.numberToHex)(A):void 0)||T,N=(0,a.serializeStateOverride)(B);(0,c.assertRequest)(m);const z=(P=(g=(_=f.chain)==null?void 0:_.formatters)==null?void 0:g.transactionRequest)==null?void 0:P.format,U=(z||i.formatTransactionRequest)({...(0,s.extract)(O,{format:z}),account:b,accessList:w,authorizationList:E,blobs:p,blobVersionedHashes:S,data:C,gasPrice:R,maxFeePerBlobGas:q,maxFeePerGas:F,maxPriorityFeePerGas:H,nonce:j,to:d,value:k},"estimateGas");return BigInt(await f.request({method:"eth_estimateGas",params:N?[U,M??f.experimental_blockTag??"latest",N]:M?[U,M]:[U]}))}catch(d){throw(0,o.getEstimateGasError)(d,{...m,account:b,chain:f.chain})}}return Ji}var Y1;function Ag(){if(Y1)return Fi;Y1=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.estimateContractGas=s;const e=Ie(),r=Le(),n=_r(),t=me(),o=_f();async function s(i,a){var b;const{abi:c,address:u,args:l,functionName:f,dataSuffix:m=typeof i.dataSuffix=="string"?i.dataSuffix:(b=i.dataSuffix)==null?void 0:b.value,...y}=a,h=(0,r.encodeFunctionData)({abi:c,args:l,functionName:f});try{return await(0,t.getAction)(i,o.estimateGas,"estimateGas")({data:`${h}${m?m.replace("0x",""):""}`,to:u,...y})}catch(v){const _=y.account?(0,e.parseAccount)(y.account):void 0;throw(0,n.getContractError)(v,{abi:c,address:u,args:l,docsPath:"/docs/contract/estimateContractGas",functionName:f,sender:_==null?void 0:_.address})}}return Fi}var Ea={},ja={},wa={},Pa={},X1;function gt(){if(X1)return Pa;X1=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.isAddressEqual=n;const e=At(),r=rt();function n(t,o){if(!(0,r.isAddress)(t,{strict:!1}))throw new e.InvalidAddressError({address:t});if(!(0,r.isAddress)(o,{strict:!1}))throw new e.InvalidAddressError({address:o});return t.toLowerCase()===o.toLowerCase()}return Pa}var Aa={},Q1;function qt(){if(Q1)return Aa;Q1=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.formatLog=e;function e(r,{args:n,eventName:t}={}){return{...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,blockTimestamp:r.blockTimestamp?BigInt(r.blockTimestamp):r.blockTimestamp===null?null:void 0,logIndex:r.logIndex?Number(r.logIndex):null,transactionHash:r.transactionHash?r.transactionHash:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,...t?{args:n,eventName:t}:{}}}return Aa}var Ta={},eb;function ti(){if(eb)return Ta;eb=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.decodeEventLog=a;const e=Se(),r=ug(),n=Ue(),t=In(),o=yr(),s=Qt(),i="/docs/contract/decodeEventLog";function a(u){const{abi:l,data:f,strict:m,topics:y}=u,h=m??!0,[b,...v]=y;if(!b)throw new e.AbiEventSignatureEmptyTopicsError({docsPath:i});const _=l.find(T=>T.type==="event"&&b===(0,t.toEventSelector)((0,s.formatAbiItem)(T)));if(!(_&&"name"in _)||_.type!=="event")throw new e.AbiEventSignatureNotFoundError(b,{docsPath:i});const{name:g,inputs:P}=_,d=P==null?void 0:P.some(T=>!("name"in T&&T.name)),w=d?[]:{},E=P.map((T,C)=>[T,C]).filter(([T])=>"indexed"in T&&T.indexed),p=[];for(let T=0;T<E.length;T++){const[C,I]=E[T],R=v[T];if(!R){if(h)throw new e.DecodeLogTopicsMismatch({abiItem:_,param:C});p.push([C,I]);continue}w[d?I:C.name||I]=c({param:C,value:R})}const S=P.filter(T=>!("indexed"in T&&T.indexed)),A=h?S:[...p.map(([T])=>T),...S];if(A.length>0){if(f&&f!=="0x")try{const T=(0,o.decodeAbiParameters)(A,f);if(T){let C=0;if(!h)for(const[I,R]of p)w[d?R:I.name||R]=T[C++];if(d)for(let I=0;I<P.length;I++)w[I]===void 0&&C<T.length&&(w[I]=T[C++]);else for(let I=0;I<S.length;I++)w[S[I].name]=T[C++]}}catch(T){if(h)throw T instanceof e.AbiDecodingDataSizeTooSmallError||T instanceof r.PositionOutOfBoundsError?new e.DecodeLogDataMismatch({abiItem:_,data:f,params:A,size:(0,n.size)(f)}):T}else if(h)throw new e.DecodeLogDataMismatch({abiItem:_,data:"0x",params:A,size:0})}return{eventName:g,args:Object.values(w).length>0?w:void 0}}function c({param:u,value:l}){return u.type==="string"||u.type==="bytes"||u.type==="tuple"||u.type.match(/^(.*)\[(\d+)?\]$/)?l:((0,o.decodeAbiParameters)([u],l)||[])[0]}return Ta}var tb;function ri(){if(tb)return wa;tb=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.parseEventLogs=i;const e=gt(),r=Ee(),n=qt(),t=tt(),o=In(),s=ti();function i(c){const{abi:u,args:l,logs:f,strict:m=!0}=c,y=(()=>{if(c.eventName)return Array.isArray(c.eventName)?c.eventName:[c.eventName]})(),h=u.filter(b=>b.type==="event").map(b=>({abi:b,selector:(0,o.toEventSelector)(b)}));return f.map(b=>{var d;const v=typeof b.blockNumber=="string"?(0,n.formatLog)(b):b,_=h.filter(w=>v.topics[0]===w.selector);if(_.length===0)return null;let g,P;for(const w of _)try{g=(0,s.decodeEventLog)({...v,abi:[w.abi],strict:!0}),P=w;break}catch{}if(!g&&!m){P=_[0];try{g=(0,s.decodeEventLog)({data:v.data,topics:v.topics,abi:[P.abi],strict:!1})}catch{const w=(d=P.abi.inputs)==null?void 0:d.some(E=>!("name"in E&&E.name));return{...v,args:w?[]:{},eventName:P.abi.name}}}return!g||!P||y&&!y.includes(g.eventName)||!a({args:g.args,inputs:P.abi.inputs,matchArgs:l})?null:{...g,...v}}).filter(Boolean)}function a(c){const{args:u,inputs:l,matchArgs:f}=c;if(!f)return!0;if(!u)return!1;function m(y,h,b){try{return y.type==="address"?(0,e.isAddressEqual)(h,b):y.type==="string"||y.type==="bytes"?(0,t.keccak256)((0,r.toBytes)(h))===b:h===b}catch{return!1}}return Array.isArray(u)&&Array.isArray(f)?f.every((y,h)=>{if(y==null)return!0;const b=l[h];return b?(Array.isArray(y)?y:[y]).some(_=>m(b,_,u[h])):!1}):typeof u=="object"&&!Array.isArray(u)&&typeof f=="object"&&!Array.isArray(f)?Object.entries(f).every(([y,h])=>{if(h==null)return!0;const b=l.find(_=>_.name===y);return b?(Array.isArray(h)?h:[h]).some(_=>m(b,_,u[y])):!1}):!1}return wa}var rb;function vf(){if(rb)return ja;rb=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.getLogs=o;const e=Zr(),r=ri(),n=oe(),t=qt();async function o(s,{address:i,blockHash:a,fromBlock:c,toBlock:u,event:l,events:f,args:m,strict:y}={}){const h=y??!1,b=f??(l?[l]:void 0);let v=[];b&&(v=[b.flatMap(d=>(0,e.encodeEventTopics)({abi:[d],eventName:d.name,args:f?void 0:m}))],l&&(v=v[0]));let _;a?_=await s.request({method:"eth_getLogs",params:[{address:i,topics:v,blockHash:a}]}):_=await s.request({method:"eth_getLogs",params:[{address:i,topics:v,fromBlock:typeof c=="bigint"?(0,n.numberToHex)(c):c,toBlock:typeof u=="bigint"?(0,n.numberToHex)(u):u}]});const g=_.map(P=>(0,t.formatLog)(P));return b?(0,r.parseEventLogs)({abi:b,args:m,logs:g,strict:h}):g}return ja}var nb;function Ef(){if(nb)return Ea;nb=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.getContractEvents=t;const e=tr(),r=me(),n=vf();async function t(o,s){const{abi:i,address:a,args:c,blockHash:u,eventName:l,fromBlock:f,toBlock:m,strict:y}=s,h=l?(0,e.getAbiItem)({abi:i,name:l}):void 0,b=h?void 0:i.filter(v=>v.type==="event");return(0,r.getAction)(o,n.getLogs,"getLogs")({address:a,args:c,blockHash:u,event:h,events:b,fromBlock:f,toBlock:m,strict:y})}return Ea}var Sa={},Ia={},ob;function Rt(){if(ob)return Ia;ob=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.decodeFunctionResult=o;const e=Se(),r=yr(),n=tr(),t="/docs/contract/decodeFunctionResult";function o(s){const{abi:i,args:a,functionName:c,data:u}=s;let l=i[0];if(c){const m=(0,n.getAbiItem)({abi:i,args:a,name:c});if(!m)throw new e.AbiFunctionNotFoundError(c,{docsPath:t});l=m}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!l.outputs)throw new e.AbiFunctionOutputsNotFoundError(l.name,{docsPath:t});const f=(0,r.decodeAbiParameters)(l.outputs,u);if(f&&f.length>1)return f;if(f&&f.length===1)return f[0]}return Ia}var _o={},vo={},fe={},le={},Eo={},mn={},jo={},ib;function Qv(){return ib||(ib=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.version=void 0,jo.version="0.1.1"),jo}var ab;function e6(){if(ab)return mn;ab=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.getUrl=r,mn.getVersion=n,mn.prettyPrint=t;const e=Qv();function r(o){return o}function n(){return e.version}function t(o){if(!o)return"";const s=Object.entries(o).map(([a,c])=>c===void 0||c===!1?null:[a,c]).filter(Boolean),i=s.reduce((a,[c])=>Math.max(a,c.length),0);return s.map(([a,c])=>` ${`${a}:`.padEnd(i+1)} ${c}`).join(`
41
+ `)}return mn}var sb;function lt(){if(sb)return Eo;sb=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.BaseError=void 0;const e=e6();class r extends Error{static setStaticOptions(o){r.prototype.docsOrigin=o.docsOrigin,r.prototype.showVersion=o.showVersion,r.prototype.version=o.version}constructor(o,s={}){const i=(()=>{var y;if(s.cause instanceof r){if(s.cause.details)return s.cause.details;if(s.cause.shortMessage)return s.cause.shortMessage}return s.cause&&"details"in s.cause&&typeof s.cause.details=="string"?s.cause.details:(y=s.cause)!=null&&y.message?s.cause.message:s.details})(),a=s.cause instanceof r&&s.cause.docsPath||s.docsPath,c=s.docsOrigin??r.prototype.docsOrigin,u=`${c}${a??""}`,l=!!(s.version??r.prototype.showVersion),f=s.version??r.prototype.version,m=[o||"An error occurred.",...s.metaMessages?["",...s.metaMessages]:[],...i||a||l?["",i?`Details: ${i}`:void 0,a?`See: ${u}`:void 0,l?`Version: ${f}`:void 0]:[]].filter(y=>typeof y=="string").join(`
42
+ `);super(m,s.cause?{cause:s.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=s.cause,this.details=i,this.docs=u,this.docsOrigin=c,this.docsPath=a,this.shortMessage=o,this.showVersion=l,this.version=f}walk(o){return n(this,o)}}Eo.BaseError=r,Object.defineProperty(r,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${(0,e.getVersion)()}`}}),r.setStaticOptions(r.defaultStaticOptions);function n(t,o){return o!=null&&o(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?n(t.cause,o):o?null:t}return Eo}var zd={},cb;function Tg(){return cb||(cb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeMap=void 0,e.assertSize=n,e.assertStartOffset=t,e.assertEndOffset=o,e.charCodeToBase16=s,e.pad=i,e.trim=a;const r=Mt();function n(c,u){if(r.size(c)>u)throw new r.SizeOverflowError({givenSize:r.size(c),maxSize:u})}function t(c,u){if(typeof u=="number"&&u>0&&u>r.size(c)-1)throw new r.SliceOffsetOutOfBoundsError({offset:u,position:"start",size:r.size(c)})}function o(c,u,l){if(typeof u=="number"&&typeof l=="number"&&r.size(c)!==l-u)throw new r.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:r.size(c)})}e.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102};function s(c){if(c>=e.charCodeMap.zero&&c<=e.charCodeMap.nine)return c-e.charCodeMap.zero;if(c>=e.charCodeMap.A&&c<=e.charCodeMap.F)return c-(e.charCodeMap.A-10);if(c>=e.charCodeMap.a&&c<=e.charCodeMap.f)return c-(e.charCodeMap.a-10)}function i(c,u={}){const{dir:l,size:f=32}=u;if(f===0)return c;if(c.length>f)throw new r.SizeExceedsPaddingSizeError({size:c.length,targetSize:f,type:"Bytes"});const m=new Uint8Array(f);for(let y=0;y<f;y++){const h=l==="right";m[h?y:f-y-1]=c[h?y:c.length-y-1]}return m}function a(c,u={}){const{dir:l="left"}=u;let f=c,m=0;for(let y=0;y<f.length-1&&f[l==="left"?y:f.length-y-1].toString()==="0";y++)m++;return f=l==="left"?f.slice(m):f.slice(0,f.length-m),f}})(zd)),zd}var ur={},ub;function Sg(){if(ub)return ur;ub=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.assertSize=r,ur.assertStartOffset=n,ur.assertEndOffset=t,ur.pad=o,ur.trim=s;const e=Ne();function r(i,a){if(e.size(i)>a)throw new e.SizeOverflowError({givenSize:e.size(i),maxSize:a})}function n(i,a){if(typeof a=="number"&&a>0&&a>e.size(i)-1)throw new e.SliceOffsetOutOfBoundsError({offset:a,position:"start",size:e.size(i)})}function t(i,a,c){if(typeof a=="number"&&typeof c=="number"&&e.size(i)!==c-a)throw new e.SliceOffsetOutOfBoundsError({offset:c,position:"end",size:e.size(i)})}function o(i,a={}){const{dir:c,size:u=32}=a;if(u===0)return i;const l=i.replace("0x","");if(l.length>u*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(l.length/2),targetSize:u,type:"Hex"});return`0x${l[c==="right"?"padEnd":"padStart"](u*2,"0")}`}function s(i,a={}){const{dir:c="left"}=a;let u=i.replace("0x",""),l=0;for(let f=0;f<u.length-1&&u[c==="left"?f:u.length-f-1].toString()==="0";f++)l++;return u=c==="left"?u.slice(l):u.slice(0,u.length-l),u==="0"?"0x":c==="right"&&u.length%2===1?`0x${u}0`:`0x${u}`}return ur}var hn={},db;function Yu(){if(db)return hn;db=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.canonicalize=r,hn.parse=n,hn.stringify=t;const e="#__bigint";function r(o){if(o===null||typeof o=="boolean"||typeof o=="string")return JSON.stringify(o);if(typeof o=="number"){if(!Number.isFinite(o))throw new TypeError("Cannot canonicalize non-finite number");return Object.is(o,-0)?"0":JSON.stringify(o)}if(typeof o=="bigint")throw new TypeError("Cannot canonicalize bigint");if(Array.isArray(o))return`[${o.map(s=>r(s)).join(",")}]`;if(typeof o=="object")return`{${Object.keys(o).sort().reduce((i,a)=>{const c=o[a];return c!==void 0&&i.push(`${JSON.stringify(a)}:${r(c)}`),i},[]).join(",")}}`}function n(o,s){return JSON.parse(o,(i,a)=>{const c=a;return typeof c=="string"&&c.endsWith(e)?BigInt(c.slice(0,-e.length)):typeof s=="function"?s(i,c):c})}function t(o,s,i){return JSON.stringify(o,(a,c)=>typeof s=="function"?s(a,c):typeof c=="bigint"?c.toString()+e:c,i)}return hn}var fb;function Mt(){if(fb)return le;fb=1,Object.defineProperty(le,"__esModule",{value:!0}),le.SizeExceedsPaddingSizeError=le.SliceOffsetOutOfBoundsError=le.SizeOverflowError=le.InvalidBytesTypeError=le.InvalidBytesBooleanError=void 0,le.assert=c,le.concat=u,le.from=l,le.fromArray=f,le.fromBoolean=m,le.fromHex=y,le.fromNumber=h,le.fromString=b,le.isEqual=v,le.padLeft=_,le.padRight=g,le.random=P,le.size=d,le.slice=w,le.toBigInt=E,le.toBoolean=p,le.toHex=S,le.toNumber=A,le.toString=T,le.trimLeft=C,le.trimRight=I,le.validate=R;const e=Yr(),r=lt(),n=Ne(),t=Tg(),o=Sg(),s=Yu(),i=new TextDecoder,a=new TextEncoder;function c(B){if(!(B instanceof Uint8Array)){if(!B)throw new F(B);if(typeof B!="object")throw new F(B);if(!("BYTES_PER_ELEMENT"in B))throw new F(B);if(B.BYTES_PER_ELEMENT!==1||B.constructor.name!=="Uint8Array")throw new F(B)}}function u(...B){let O=0;for(const M of B)O+=M.length;const x=new Uint8Array(O);for(let M=0,N=0;M<B.length;M++){const z=B[M];x.set(z,N),N+=z.length}return x}function l(B){return B instanceof Uint8Array?B:typeof B=="string"?y(B):f(B)}function f(B){return B instanceof Uint8Array?B:new Uint8Array(B)}function m(B,O={}){const{size:x}=O,M=new Uint8Array(1);return M[0]=Number(B),typeof x=="number"?(t.assertSize(M,x),_(M,x)):M}function y(B,O={}){const{size:x}=O;let M=B;x&&(o.assertSize(B,x),M=n.padRight(B,x));let N=M.slice(2);N.length%2&&(N=`0${N}`);const z=N.length/2,$=new Uint8Array(z);for(let U=0,G=0;U<z;U++){const J=t.charCodeToBase16(N.charCodeAt(G++)),K=t.charCodeToBase16(N.charCodeAt(G++));if(J===void 0||K===void 0)throw new r.BaseError(`Invalid byte sequence ("${N[G-2]}${N[G-1]}" in "${N}").`);$[U]=J<<4|K}return $}function h(B,O){const x=n.fromNumber(B,O);return y(x)}function b(B,O={}){const{size:x}=O,M=a.encode(B);return typeof x=="number"?(t.assertSize(M,x),g(M,x)):M}function v(B,O){return(0,e.equalBytes)(B,O)}function _(B,O){return t.pad(B,{dir:"left",size:O})}function g(B,O){return t.pad(B,{dir:"right",size:O})}function P(B){return crypto.getRandomValues(new Uint8Array(B))}function d(B){return B.length}function w(B,O,x,M={}){const{strict:N}=M;t.assertStartOffset(B,O);const z=B.slice(O,x);return N&&t.assertEndOffset(z,O,x),z}function E(B,O={}){const{size:x}=O;typeof x<"u"&&t.assertSize(B,x);const M=n.fromBytes(B,O);return n.toBigInt(M,O)}function p(B,O={}){const{size:x}=O;let M=B;if(typeof x<"u"&&(t.assertSize(M,x),M=C(M)),M.length>1||M[0]>1)throw new q(M);return!!M[0]}function S(B,O={}){return n.fromBytes(B,O)}function A(B,O={}){const{size:x}=O;typeof x<"u"&&t.assertSize(B,x);const M=n.fromBytes(B,O);return n.toNumber(M,O)}function T(B,O={}){const{size:x}=O;let M=B;return typeof x<"u"&&(t.assertSize(M,x),M=I(M)),i.decode(M)}function C(B){return t.trim(B,{dir:"left"})}function I(B){return t.trim(B,{dir:"right"})}function R(B){try{return c(B),!0}catch{return!1}}class q extends r.BaseError{constructor(O){super(`Bytes value \`${O}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}le.InvalidBytesBooleanError=q;class F extends r.BaseError{constructor(O){super(`Value \`${typeof O=="object"?s.stringify(O):O}\` of type \`${typeof O}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}le.InvalidBytesTypeError=F;class H extends r.BaseError{constructor({givenSize:O,maxSize:x}){super(`Size cannot exceed \`${x}\` bytes. Given size: \`${O}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}le.SizeOverflowError=H;class j extends r.BaseError{constructor({offset:O,position:x,size:M}){super(`Slice ${x==="start"?"starting":"ending"} at offset \`${O}\` is out-of-bounds (size: \`${M}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}le.SliceOffsetOutOfBoundsError=j;class k extends r.BaseError{constructor({size:O,targetSize:x,type:M}){super(`${M.charAt(0).toUpperCase()}${M.slice(1).toLowerCase()} size (\`${O}\`) exceeds padding size (\`${x}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}return le.SizeExceedsPaddingSizeError=k,le}var lb;function Ne(){if(lb)return fe;lb=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.SizeExceedsPaddingSizeError=fe.SliceOffsetOutOfBoundsError=fe.SizeOverflowError=fe.InvalidLengthError=fe.InvalidHexValueError=fe.InvalidHexTypeError=fe.InvalidHexBooleanError=fe.IntegerOutOfRangeError=void 0,fe.assert=c,fe.concat=u,fe.from=l,fe.fromBoolean=f,fe.fromBytes=m,fe.fromNumber=y,fe.fromString=h,fe.isEqual=b,fe.padLeft=v,fe.padRight=_,fe.random=g,fe.slice=P,fe.size=d,fe.trimLeft=w,fe.trimRight=E,fe.toBigInt=p,fe.toBoolean=S,fe.toBytes=A,fe.toNumber=T,fe.toString=C,fe.validate=I;const e=Yr(),r=Mt(),n=lt(),t=Tg(),o=Sg(),s=Yu(),i=new TextEncoder,a=Array.from({length:256},(x,M)=>M.toString(16).padStart(2,"0"));function c(x,M={}){const{strict:N=!1}=M;if(!x)throw new F(x);if(typeof x!="string")throw new F(x);if(N&&!/^0x[0-9a-fA-F]*$/.test(x))throw new H(x);if(!x.startsWith("0x"))throw new H(x)}function u(...x){return`0x${x.reduce((M,N)=>M+N.replace("0x",""),"")}`}function l(x){return x instanceof Uint8Array?m(x):Array.isArray(x)?m(new Uint8Array(x)):x}function f(x,M={}){const N=`0x${Number(x)}`;return typeof M.size=="number"?(o.assertSize(N,M.size),v(N,M.size)):N}function m(x,M={}){let N="";for(let $=0;$<x.length;$++)N+=a[x[$]];const z=`0x${N}`;return typeof M.size=="number"?(o.assertSize(z,M.size),_(z,M.size)):z}function y(x,M={}){const{signed:N,size:z}=M,$=BigInt(x);let U;z?N?U=(1n<<BigInt(z)*8n-1n)-1n:U=2n**(BigInt(z)*8n)-1n:typeof x=="number"&&(U=BigInt(Number.MAX_SAFE_INTEGER));const G=typeof U=="bigint"&&N?-U-1n:0;if(U&&$>U||$<G){const V=typeof x=="bigint"?"n":"";throw new R({max:U?`${U}${V}`:void 0,min:`${G}${V}`,signed:N,size:z,value:`${x}${V}`})}const K=`0x${(N&&$<0?BigInt.asUintN(z*8,BigInt($)):$).toString(16)}`;return z?v(K,z):K}function h(x,M={}){return m(i.encode(x),M)}function b(x,M){return(0,e.equalBytes)(r.fromHex(x),r.fromHex(M))}function v(x,M){return o.pad(x,{dir:"left",size:M})}function _(x,M){return o.pad(x,{dir:"right",size:M})}function g(x){return m(r.random(x))}function P(x,M,N,z={}){const{strict:$}=z;o.assertStartOffset(x,M);const U=`0x${x.replace("0x","").slice((M??0)*2,(N??x.length)*2)}`;return $&&o.assertEndOffset(U,M,N),U}function d(x){return Math.ceil((x.length-2)/2)}function w(x){return o.trim(x,{dir:"left"})}function E(x){return o.trim(x,{dir:"right"})}function p(x,M={}){const{signed:N}=M;M.size&&o.assertSize(x,M.size);const z=BigInt(x);if(!N)return z;const $=(x.length-2)/2,U=(1n<<BigInt($)*8n)-1n,G=U>>1n;return z<=G?z:z-U-1n}function S(x,M={}){M.size&&o.assertSize(x,M.size);const N=w(x);if(N==="0x")return!1;if(N==="0x1")return!0;throw new q(x)}function A(x,M={}){return r.fromHex(x,M)}function T(x,M={}){const{signed:N,size:z}=M;return Number(!N&&!z?x:p(x,M))}function C(x,M={}){const{size:N}=M;let z=r.fromHex(x);return N&&(t.assertSize(z,N),z=r.trimRight(z)),new TextDecoder().decode(z)}function I(x,M={}){const{strict:N=!1}=M;try{return c(x,{strict:N}),!0}catch{return!1}}class R extends n.BaseError{constructor({max:M,min:N,signed:z,size:$,value:U}){super(`Number \`${U}\` is not in safe${$?` ${$*8}-bit`:""}${z?" signed":" unsigned"} integer range ${M?`(\`${N}\` to \`${M}\`)`:`(above \`${N}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}fe.IntegerOutOfRangeError=R;class q extends n.BaseError{constructor(M){super(`Hex value \`"${M}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}fe.InvalidHexBooleanError=q;class F extends n.BaseError{constructor(M){super(`Value \`${typeof M=="object"?s.stringify(M):M}\` of type \`${typeof M}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}fe.InvalidHexTypeError=F;class H extends n.BaseError{constructor(M){super(`Value \`${M}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}fe.InvalidHexValueError=H;class j extends n.BaseError{constructor(M){super(`Hex value \`"${M}"\` is an odd length (${M.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}fe.InvalidLengthError=j;class k extends n.BaseError{constructor({givenSize:M,maxSize:N}){super(`Size cannot exceed \`${N}\` bytes. Given size: \`${M}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}fe.SizeOverflowError=k;class B extends n.BaseError{constructor({offset:M,position:N,size:z}){super(`Slice ${N==="start"?"starting":"ending"} at offset \`${M}\` is out-of-bounds (size: \`${z}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}fe.SliceOffsetOutOfBoundsError=B;class O extends n.BaseError{constructor({size:M,targetSize:N,type:z}){super(`${z.charAt(0).toUpperCase()}${z.slice(1).toLowerCase()} size (\`${M}\`) exceeds padding size (\`${N}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}return fe.SizeExceedsPaddingSizeError=O,fe}var wo={},bb;function t6(){if(bb)return wo;bb=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.fromRpc=r,wo.toRpc=n;const e=Ne();function r(t){return{...t,amount:BigInt(t.amount),index:Number(t.index),validatorIndex:Number(t.validatorIndex)}}function n(t){return{address:t.address,amount:e.fromNumber(t.amount),index:e.fromNumber(t.index),validatorIndex:e.fromNumber(t.validatorIndex)}}return wo}var mb;function Ig(){if(mb)return vo;mb=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.fromRpc=n,vo.toRpc=t;const e=Ne(),r=t6();function n(o){return{...o.baseFeePerGas&&{baseFeePerGas:BigInt(o.baseFeePerGas)},...o.blobBaseFee&&{blobBaseFee:BigInt(o.blobBaseFee)},...o.feeRecipient&&{feeRecipient:o.feeRecipient},...o.gasLimit&&{gasLimit:BigInt(o.gasLimit)},...o.number&&{number:BigInt(o.number)},...o.prevRandao&&{prevRandao:BigInt(o.prevRandao)},...o.time&&{time:BigInt(o.time)},...o.withdrawals&&{withdrawals:o.withdrawals.map(r.fromRpc)}}}function t(o){return{...typeof o.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(o.baseFeePerGas)},...typeof o.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(o.blobBaseFee)},...typeof o.feeRecipient=="string"&&{feeRecipient:o.feeRecipient},...typeof o.gasLimit=="bigint"&&{gasLimit:e.fromNumber(o.gasLimit)},...typeof o.number=="bigint"&&{number:e.fromNumber(o.number)},...typeof o.prevRandao=="bigint"&&{prevRandao:e.fromNumber(o.prevRandao)},...typeof o.time=="bigint"&&{time:e.fromNumber(o.time)},...o.withdrawals&&{withdrawals:o.withdrawals.map(r.toRpc)}}}return vo}var pe={},hb;function kt(){if(hb)return pe;hb=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.erc4626Abi=pe.erc721Abi=pe.erc1155Abi=pe.erc20Abi_bytes32=pe.erc20Abi=pe.erc6492SignatureValidatorAbi=pe.erc1271Abi=pe.addressResolverAbi=pe.textResolverAbi=pe.universalResolverReverseAbi=pe.universalResolverResolveAbi=pe.batchGatewayAbi=pe.multicall3Abi=void 0,pe.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],pe.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];const e=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];return pe.universalResolverResolveAbi=[...e,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],pe.universalResolverReverseAbi=[...e,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],pe.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],pe.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],pe.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],pe.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],pe.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],pe.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],pe.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],pe.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],pe.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],pe}var Po={},yb;function r6(){return yb||(yb=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.aggregate3Signature=void 0,Po.aggregate3Signature="0x82ad56cb"),Po}var jt={},pb;function ni(){return pb||(pb=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.multicall3Bytecode=jt.erc6492SignatureValidatorByteCode=jt.deploylessCallViaFactoryBytecode=jt.deploylessCallViaBytecodeBytecode=void 0,jt.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",jt.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",jt.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",jt.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"),jt}var ct={},gb;function oi(){if(gb)return ct;gb=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.InvalidChainIdError=ct.ClientChainNotConfiguredError=ct.ChainNotFoundError=ct.ChainMismatchError=ct.ChainDoesNotSupportContract=void 0;const e=ue();class r extends e.BaseError{constructor({blockNumber:a,chain:c,contract:u}){super(`Chain "${c.name}" does not support contract "${u.name}".`,{metaMessages:["This could be due to any of the following:",...a&&u.blockCreated&&u.blockCreated>a?[`- The contract "${u.name}" was not deployed until block ${u.blockCreated} (current block ${a}).`]:[`- The chain does not have the contract "${u.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}ct.ChainDoesNotSupportContract=r;class n extends e.BaseError{constructor({chain:a,currentChainId:c}){super(`The current chain of the wallet (id: ${c}) does not match the target chain for the transaction (id: ${a.id} – ${a.name}).`,{metaMessages:[`Current Chain ID: ${c}`,`Expected Chain ID: ${a.id} – ${a.name}`],name:"ChainMismatchError"})}}ct.ChainMismatchError=n;class t extends e.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
43
+ `),{name:"ChainNotFoundError"})}}ct.ChainNotFoundError=t;class o extends e.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}ct.ClientChainNotConfiguredError=o;class s extends e.BaseError{constructor({chainId:a}){super(typeof a=="number"?`Chain ID "${a}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}return ct.InvalidChainIdError=s,ct}var Ra={},_b;function ii(){if(_b)return Ra;_b=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.encodeDeployData=o;const e=Se(),r=qe(),n=Tt(),t="/docs/contract/encodeDeployData";function o(s){const{abi:i,args:a,bytecode:c}=s;if(!a||a.length===0)return c;const u=i.find(f=>"type"in f&&f.type==="constructor");if(!u)throw new e.AbiConstructorNotFoundError({docsPath:t});if(!("inputs"in u))throw new e.AbiConstructorParamsNotFoundError({docsPath:t});if(!u.inputs||u.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:t});const l=(0,n.encodeAbiParameters)(u.inputs,a);return(0,r.concatHex)([c,l])}return Ra}var Ba={},vb;function wr(){if(vb)return Ba;vb=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.getChainContractAddress=r;const e=oi();function r({blockNumber:n,chain:t,contract:o}){var i;const s=(i=t==null?void 0:t.contracts)==null?void 0:i[o];if(!s)throw new e.ChainDoesNotSupportContract({chain:t,contract:{name:o}});if(n&&s.blockCreated&&s.blockCreated>n)throw new e.ChainDoesNotSupportContract({blockNumber:n,chain:t,contract:{name:o,blockCreated:s.blockCreated}});return s.address}return Ba}var Oa={},Eb;function jf(){if(Eb)return Oa;Eb=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.getCallError=t;const e=pr(),r=rr(),n=Jo();function t(o,{docsPath:s,...i}){const a=(()=>{const c=(0,n.getNodeError)(o,i);return c instanceof r.UnknownNodeError?o:c})();return new e.CallExecutionError(a,{docsPath:s,...i})}return Oa}var Ca={},xa={},jb;function wf(){if(jb)return xa;jb=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.withResolvers=e;function e(){let r=()=>{},n=()=>{};return{promise:new Promise((o,s)=>{r=o,n=s}),resolve:r,reject:n}}return xa}var wb;function Pf(){if(wb)return Ca;wb=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.createBatchScheduler=n;const e=wf(),r=new Map;function n({fn:t,id:o,shouldSplitBatch:s,wait:i=0,sort:a}){const c=async()=>{const y=f();u();const h=y.map(({args:b})=>b);h.length!==0&&t(h).then(b=>{a&&Array.isArray(b)&&b.sort(a);for(let v=0;v<y.length;v++){const{resolve:_}=y[v];_==null||_([b[v],b])}}).catch(b=>{for(let v=0;v<y.length;v++){const{reject:_}=y[v];_==null||_(b)}})},u=()=>r.delete(o),l=()=>f().map(({args:y})=>y),f=()=>r.get(o)||[],m=y=>r.set(o,[...f(),y]);return{flush:u,async schedule(y){const{promise:h,resolve:b,reject:v}=(0,e.withResolvers)();return(s==null?void 0:s([...l(),y]))&&c(),f().length>0?(m({args:y,resolve:b,reject:v}),h):(m({args:y,resolve:b,reject:v}),setTimeout(c,i),h)}}}return Ca}var Ud={},Yt={},Pb;function n6(){if(Pb)return Yt;Pb=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.OffchainLookupSenderMismatchError=Yt.OffchainLookupResponseMalformedError=Yt.OffchainLookupError=void 0;const e=Fe(),r=ue(),n=xt();class t extends r.BaseError{constructor({callbackSelector:a,cause:c,data:u,extraData:l,sender:f,urls:m}){var y;super(c.shortMessage||"An error occurred while fetching for an offchain result.",{cause:c,metaMessages:[...c.metaMessages||[],(y=c.metaMessages)!=null&&y.length?"":[],"Offchain Gateway Call:",m&&[" Gateway URL(s):",...m.map(h=>` ${(0,n.getUrl)(h)}`)],` Sender: ${f}`,` Data: ${u}`,` Callback selector: ${a}`,` Extra data: ${l}`].flat(),name:"OffchainLookupError"})}}Yt.OffchainLookupError=t;class o extends r.BaseError{constructor({result:a,url:c}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,n.getUrl)(c)}`,`Response: ${(0,e.stringify)(a)}`],name:"OffchainLookupResponseMalformedError"})}}Yt.OffchainLookupResponseMalformedError=o;class s extends r.BaseError{constructor({sender:a,to:c}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${c}`,`OffchainLookup sender address: ${a}`],name:"OffchainLookupSenderMismatchError"})}}return Yt.OffchainLookupSenderMismatchError=s,Yt}var Ld={},qa={},Ab;function Af(){if(Ab)return qa;Ab=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.decodeFunctionData=s;const e=Se(),r=ft(),n=Kr(),t=yr(),o=Qt();function s(i){const{abi:a,data:c}=i,u=(0,r.slice)(c,0,4),l=a.find(f=>f.type==="function"&&u===(0,n.toFunctionSelector)((0,o.formatAbiItem)(f)));if(!l)throw new e.AbiFunctionSignatureNotFoundError(u,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:l.name,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,t.decodeAbiParameters)(l.inputs,(0,r.slice)(c,4)):void 0}}return qa}var Ma={},Tb;function Tf(){if(Tb)return Ma;Tb=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.encodeErrorResult=a;const e=Se(),r=qe(),n=Kr(),t=Tt(),o=Qt(),s=tr(),i="/docs/contract/encodeErrorResult";function a(c){const{abi:u,errorName:l,args:f}=c;let m=u[0];if(l){const v=(0,s.getAbiItem)({abi:u,args:f,name:l});if(!v)throw new e.AbiErrorNotFoundError(l,{docsPath:i});m=v}if(m.type!=="error")throw new e.AbiErrorNotFoundError(void 0,{docsPath:i});const y=(0,o.formatAbiItem)(m),h=(0,n.toFunctionSelector)(y);let b="0x";if(f&&f.length>0){if(!m.inputs)throw new e.AbiErrorInputsNotFoundError(m.name,{docsPath:i});b=(0,t.encodeAbiParameters)(m.inputs,f)}return(0,r.concatHex)([h,b])}return Ma}var ka={},Sb;function Sf(){if(Sb)return ka;Sb=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.encodeFunctionResult=o;const e=Se(),r=Tt(),n=tr(),t="/docs/contract/encodeFunctionResult";function o(s){const{abi:i,functionName:a,result:c}=s;let u=i[0];if(a){const f=(0,n.getAbiItem)({abi:i,name:a});if(!f)throw new e.AbiFunctionNotFoundError(a,{docsPath:t});u=f}if(u.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!u.outputs)throw new e.AbiFunctionOutputsNotFoundError(u.name,{docsPath:t});const l=(()=>{if(u.outputs.length===0)return[];if(u.outputs.length===1)return[c];if(Array.isArray(c))return c;throw new e.InvalidArrayError(c)})();return(0,r.encodeAbiParameters)(u.outputs,l)}return ka}var Ib;function ai(){return Ib||(Ib=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localBatchGatewayUrl=void 0,e.localBatchGatewayRequest=i;const r=kt(),n=zu(),t=Af(),o=Tf(),s=Sf();e.localBatchGatewayUrl="x-batch-gateway:true";async function i(c){const{data:u,ccipRequest:l}=c,{args:[f]}=(0,t.decodeFunctionData)({abi:r.batchGatewayAbi,data:u}),m=[],y=[];return await Promise.all(f.map(async(h,b)=>{try{y[b]=h.urls.includes(e.localBatchGatewayUrl)?await i({data:h.data,ccipRequest:l}):await l(h),m[b]=!1}catch(v){m[b]=!0,y[b]=a(v)}})),(0,s.encodeFunctionResult)({abi:r.batchGatewayAbi,functionName:"query",result:[m,y]})}function a(c){return c.name==="HttpRequestError"&&c.status?(0,o.encodeErrorResult)({abi:r.batchGatewayAbi,errorName:"HttpError",args:[c.status,c.shortMessage]}):(0,o.encodeErrorResult)({abi:[n.solidityError],errorName:"Error",args:["shortMessage"in c?c.shortMessage:c.message]})}})(Ld)),Ld}var Rb;function Xu(){return Rb||(Rb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offchainLookupAbiItem=e.offchainLookupSignature=void 0,e.offchainLookup=m,e.ccipRequest=y;const r=On(),n=n6(),t=pt(),o=xt(),s=Go(),i=Tt(),a=gt(),c=qe(),u=Ze(),l=ai(),f=Fe();e.offchainLookupSignature="0x556f1830",e.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function m(h,{blockNumber:b,blockTag:v,data:_,requestOptions:g,to:P}){var I;const{args:d}=(0,s.decodeErrorResult)({data:_,abi:[e.offchainLookupAbiItem]}),[w,E,p,S,A]=d,{ccipRead:T}=h,C=T&&typeof(T==null?void 0:T.request)=="function"?T.request:y;try{if(!(0,a.isAddressEqual)(P,w))throw new n.OffchainLookupSenderMismatchError({sender:w,to:P});const R=E.includes(l.localBatchGatewayUrl)?await(0,l.localBatchGatewayRequest)({data:p,ccipRequest:F=>C({...F,requestOptions:g})}):await C({data:p,requestOptions:g,sender:w,urls:E}),{data:q}=await(0,r.call)(h,{blockNumber:b,blockTag:v,data:(0,c.concat)([S,(0,i.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[R,A])]),requestOptions:g,to:P});return q}catch(R){throw(I=g==null?void 0:g.signal)!=null&&I.aborted?(0,o.getAbortError)(g.signal):(0,o.isAbortError)(R)?R:new n.OffchainLookupError({callbackSelector:S,cause:R,data:_,extraData:A,sender:w,urls:E})}}async function y({data:h,requestOptions:b,sender:v,urls:_}){var P,d,w;let g=new Error("An unknown error occurred.");for(let E=0;E<_.length;E++){if((P=b==null?void 0:b.signal)!=null&&P.aborted)throw(0,o.getAbortError)(b.signal);const p=_[E],S=p.includes("{data}")?"GET":"POST",A=S==="POST"?{data:h,sender:v}:void 0,T=S==="POST"?{"Content-Type":"application/json"}:{};try{const C=await fetch(p.replace("{sender}",v.toLowerCase()).replace("{data}",h),{body:JSON.stringify(A),headers:T,method:S,...b!=null&&b.signal?{signal:b.signal}:{}});let I;if((d=C.headers.get("Content-Type"))!=null&&d.startsWith("application/json")?I=(await C.json()).data:I=await C.text(),!C.ok){g=new t.HttpRequestError({body:A,details:I!=null&&I.error?(0,f.stringify)(I.error):C.statusText,headers:C.headers,status:C.status,url:p});continue}if(!(0,u.isHex)(I)){g=new n.OffchainLookupResponseMalformedError({result:I,url:p});continue}return I}catch(C){if((w=b==null?void 0:b.signal)!=null&&w.aborted)throw(0,o.getAbortError)(b.signal);if((0,o.isAbortError)(C))throw C;g=new t.HttpRequestError({body:A,details:C.message,url:p})}}throw g}})(Ud)),Ud}var Bb;function On(){if(Bb)return _o;Bb=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.call=E,_o.getRevertErrorData=H;const e=br(),r=Ig(),n=Ie(),t=kt(),o=r6(),s=ni(),i=ue(),a=oi(),c=pr(),u=xt(),l=Rt(),f=ii(),m=Le(),y=gt(),h=Bn(),b=wr(),v=jf(),_=Er(),g=St(),P=Pf(),d=lf(),w=It();async function E(j,k){var Bt,ot,De,ht,it,Xe;const{account:B=j.account,authorizationList:O,batch:x=!!((Bt=j.batch)!=null&&Bt.multicall),blockHash:M,blockNumber:N,blockTag:z=j.experimental_blockTag??"latest",requireCanonical:$,accessList:U,blobs:G,blockOverrides:J,code:K,data:V,factory:Y,factoryData:te,gas:Z,gasPrice:X,maxFeePerBlobGas:Q,maxFeePerGas:ne,maxPriorityFeePerGas:re,nonce:ae,requestOptions:ce,to:he,value:ge,stateOverride:ee,...W}=k,Ce=B?(0,n.parseAccount)(B):void 0;if(K&&(Y||te))throw new i.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(K&&he)throw new i.BaseError("Cannot provide both `code` & `to` as parameters.");const xe=K&&V,bt=Y&&te&&he&&V,Ye=xe||bt,mt=xe?q({code:K,data:V}):bt?F({data:V,factory:Y,factoryData:te,to:he}):V;try{(0,w.assertRequest)(k);const _t=(0,h.formatBlockParameter)({blockHash:M,blockNumber:N,blockTag:z,requireCanonical:$}),Me=J?r.toRpc(J):void 0,ke=(0,d.serializeStateOverride)(ee),nr=(ht=(De=(ot=j.chain)==null?void 0:ot.formatters)==null?void 0:De.transactionRequest)==null?void 0:ht.format,or=(nr||g.formatTransactionRequest)({...(0,_.extract)(W,{format:nr}),accessList:U,account:Ce,authorizationList:O,blobs:G,data:mt,gas:Z,gasPrice:X,maxFeePerBlobGas:Q,maxFeePerGas:ne,maxPriorityFeePerGas:re,nonce:ae,to:Ye?void 0:he,value:ge},"call");if(x&&p({request:or})&&!Me&&M===void 0)try{const{deployless:$e=!1}=typeof((it=j.batch)==null?void 0:it.multicall)=="object"?j.batch.multicall:{},Tr=I(j,{blockNumber:N,deployless:$e});if(!Tr||!R(ke,Tr))return await C(j,{...or,blockHash:M,blockNumber:N,blockTag:z,multicallAddress:Tr,requestOptions:ce,requireCanonical:$,rpcStateOverride:ke})}catch($e){if(!($e instanceof a.ClientChainNotConfiguredError)&&!($e instanceof a.ChainDoesNotSupportContract))throw $e}const Mn=(()=>{const $e=[or,_t];return ke&&Me?[...$e,ke,Me]:ke?[...$e,ke]:Me?[...$e,{},Me]:$e})(),Ar=await j.request({method:"eth_call",params:Mn},ce);return Ar==="0x"?{data:void 0}:{data:Ar}}catch(_t){if((Xe=ce==null?void 0:ce.signal)!=null&&Xe.aborted)throw(0,u.getAbortError)(ce.signal);if((0,u.isAbortError)(_t))throw _t;const Me=H(_t),{offchainLookup:ke,offchainLookupSignature:nr}=await Promise.resolve().then(()=>Xu());if(j.ccipRead!==!1&&(Me==null?void 0:Me.slice(0,10))===nr&&he)return{data:await ke(j,{data:Me,requestOptions:ce,to:he})};throw Ye&&(Me==null?void 0:Me.slice(0,10))==="0x101bb98d"?new c.CounterfactualDeploymentFailedError({factory:Y}):(0,v.getCallError)(_t,{...k,account:Ce,chain:j.chain})}}function p({request:j}){const{data:k,to:B,...O}=j;return!(!k||k.startsWith(o.aggregate3Signature)||!B||Object.values(O).filter(x=>typeof x<"u").length>0)}let S=0;const A=new WeakMap;function T(j){if(!j)return"default";const k=A.get(j);if(k!==void 0)return k;const B=S++;return A.set(j,B),B}async function C(j,k){var ae;const{batchSize:B=1024,deployless:O=!1,wait:x=0}=typeof((ae=j.batch)==null?void 0:ae.multicall)=="object"?j.batch.multicall:{},{blockHash:M,blockNumber:N,blockTag:z=j.experimental_blockTag??"latest",requireCanonical:$,data:U,multicallAddress:G,requestOptions:J,rpcStateOverride:K,to:V}=k,Y=G!==void 0?G:I(j,{blockNumber:N,deployless:O}),te=(0,h.formatBlockParameter)({blockHash:M,blockNumber:N,blockTag:z,requireCanonical:$}),Z=typeof te=="string"?te:JSON.stringify(te),X=K?`.${JSON.stringify(K)}`:"",{schedule:Q}=(0,P.createBatchScheduler)({id:`${j.uid}.${Z}.${T(J)}${X}`,wait:x,shouldSplitBatch(ce){return ce.reduce((ge,{data:ee})=>ge+(ee.length-2),0)>B*2},fn:async ce=>{const he=ce.map(Ce=>({allowFailure:!0,callData:Ce.data,target:Ce.to})),ge=(0,m.encodeFunctionData)({abi:t.multicall3Abi,args:[he],functionName:"aggregate3"}),ee={...Y===null?{data:q({code:s.multicall3Bytecode,data:ge})}:{to:Y,data:ge}},W=await j.request({method:"eth_call",params:K?[ee,te,K]:[ee,te]},J);return(0,l.decodeFunctionResult)({abi:t.multicall3Abi,args:[he],functionName:"aggregate3",data:W||"0x"})}}),[{returnData:ne,success:re}]=await Q({data:U,to:V});if(!re)throw new c.RawContractError({data:ne});return ne==="0x"?{data:void 0}:{data:ne}}function I(j,k){const{blockNumber:B,deployless:O}=k;if(O)return null;if(j.chain)return(0,b.getChainContractAddress)({blockNumber:B,chain:j.chain,contract:"multicall3"});throw new a.ClientChainNotConfiguredError}function R(j,k){return j?Object.keys(j).some(B=>(0,y.isAddressEqual)(B,k)):!1}function q(j){const{code:k,data:B}=j;return(0,f.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(bytes, bytes)"]),bytecode:s.deploylessCallViaBytecodeBytecode,args:[k,B]})}function F(j){const{data:k,factory:B,factoryData:O,to:x}=j;return(0,f.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:s.deploylessCallViaFactoryBytecode,args:[x,k,B,O]})}function H(j){var B;if(!(j instanceof i.BaseError))return;const k=j.walk();return typeof(k==null?void 0:k.data)=="object"?(B=k.data)==null?void 0:B.data:k.data}return _o}var Ob;function Ht(){if(Ob)return Sa;Ob=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.readContract=s;const e=Rt(),r=Le(),n=_r(),t=me(),o=On();async function s(i,a){const{abi:c,address:u,args:l,functionName:f,...m}=a,y=(0,r.encodeFunctionData)({abi:c,args:l,functionName:f});try{const{data:h}=await(0,t.getAction)(i,o.call,"call")({...m,data:y,to:u});return(0,e.decodeFunctionResult)({abi:c,args:l,functionName:f,data:h||"0x"})}catch(h){throw(0,n.getContractError)(h,{abi:c,address:u,args:l,docsPath:"/docs/contract/readContract",functionName:f})}}return Sa}var Ha={},Cb;function Rg(){if(Cb)return Ha;Cb=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.simulateContract=i;const e=Ie(),r=Rt(),n=Le(),t=_r(),o=me(),s=On();async function i(a,c){var _;const{abi:u,address:l,args:f,functionName:m,dataSuffix:y=typeof a.dataSuffix=="string"?a.dataSuffix:(_=a.dataSuffix)==null?void 0:_.value,...h}=c,b=h.account?(0,e.parseAccount)(h.account):a.account,v=(0,n.encodeFunctionData)({abi:u,args:f,functionName:m});try{const{data:g}=await(0,o.getAction)(a,s.call,"call")({batch:!1,data:`${v}${y?y.replace("0x",""):""}`,to:l,...h,account:b}),P=(0,r.decodeFunctionResult)({abi:u,args:f,functionName:m,data:g||"0x"}),d=u.filter(w=>"name"in w&&w.name===c.functionName);return{result:P,request:{abi:d,address:l,args:f,dataSuffix:y,functionName:m,...h,account:b}}}catch(g){throw(0,t.getContractError)(g,{abi:u,address:l,args:f,docsPath:"/docs/contract/simulateContract",functionName:m,sender:b==null?void 0:b.address})}}return Ha}var Fa={},Dd={},xb;function en(){return xb||(xb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cleanupCache=e.listenersCache=void 0,e.observe=n,e.listenersCache=new Map,e.cleanupCache=new Map;let r=0;function n(t,o,s){const i=++r,a=()=>e.listenersCache.get(t)||[],c=()=>{const h=a().filter(b=>b.id!==i);if(h.length===0){e.listenersCache.delete(t),e.cleanupCache.delete(t);return}e.listenersCache.set(t,h)},u=()=>{const y=a();if(!y.some(b=>b.id===i))return;const h=e.cleanupCache.get(t);if(y.length===1&&h){const b=h();b instanceof Promise&&b.catch(()=>{})}c()},l=a();if(e.listenersCache.set(t,[...l,{id:i,fns:o}]),l&&l.length>0)return u;const f={};for(const y in o)f[y]=((...h)=>{var v,_;const b=a();if(b.length!==0)for(const g of b)(_=(v=g.fns)[y])==null||_.call(v,...h)});const m=s(f);return typeof m=="function"&&e.cleanupCache.set(t,m),u}})(Dd)),Dd}var Na={},$a={},qb;function If(){if(qb)return $a;qb=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.wait=r;const e=xt();async function r(n,{signal:t}={}){return new Promise((o,s)=>{if(t!=null&&t.aborted){s((0,e.getAbortError)(t));return}const i=()=>t==null?void 0:t.removeEventListener("abort",c),a=setTimeout(()=>{i(),o()},n),c=()=>{clearTimeout(a),i(),s((0,e.getAbortError)(t))};t==null||t.addEventListener("abort",c,{once:!0})})}return $a}var Mb;function Cn(){if(Mb)return Na;Mb=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.poll=r;const e=If();function r(n,{emitOnBegin:t,initialWaitTime:o,interval:s}){let i=!0;const a=()=>i=!1;return(async()=>{let u;t&&(u=await n({unpoll:a}));const l=await(o==null?void 0:o(u))??s;await(0,e.wait)(l);const f=async()=>{i&&(await n({unpoll:a}),await(0,e.wait)(s),f())};f()})(),a}return Na}var Ao={},Gd={},kb;function Bg(){return kb||(kb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.responseCache=e.promiseCache=void 0,e.getCache=r,e.withCache=n,e.promiseCache=new Map,e.responseCache=new Map;function r(t){const o=(a,c)=>({clear:()=>c.delete(a),get:()=>c.get(a),set:u=>c.set(a,u)}),s=o(t,e.promiseCache),i=o(t,e.responseCache);return{clear:()=>{s.clear(),i.clear()},promise:s,response:i}}async function n(t,{cacheKey:o,cacheTime:s=Number.POSITIVE_INFINITY}){const i=r(o),a=i.response.get();if(a&&s>0&&Date.now()-a.created.getTime()<s)return a.data;let c=i.promise.get();c||(c=t(),i.promise.set(c));try{const u=await c;return i.response.set({created:new Date,data:u}),u}finally{i.promise.clear()}}})(Gd)),Gd}var Hb;function si(){if(Hb)return Ao;Hb=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.getBlockNumberCache=n,Ao.getBlockNumber=t;const e=Bg(),r=o=>`blockNumber.${o}`;function n(o){return(0,e.getCache)(r(o))}async function t(o,{cacheTime:s=o.cacheTime}={}){const i=await(0,e.withCache)(()=>o.request({method:"eth_blockNumber"}),{cacheKey:r(o.uid),cacheTime:s});return BigInt(i)}return Ao}var za={},Fb;function Qu(){if(Fb)return za;Fb=1,Object.defineProperty(za,"__esModule",{value:!0}),za.getFilterChanges=n;const e=ri(),r=qt();async function n(t,{filter:o}){const s="strict"in o&&o.strict,i=await o.request({method:"eth_getFilterChanges",params:[o.id]});if(typeof i[0]=="string")return i;const a=i.map(c=>(0,r.formatLog)(c));return!("abi"in o)||!o.abi?a:(0,e.parseEventLogs)({abi:o.abi,logs:a,strict:s})}return za}var Ua={},Nb;function ed(){if(Nb)return Ua;Nb=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.uninstallFilter=e;async function e(r,{filter:n}){return n.request({method:"eth_uninstallFilter",params:[n.id]})}return Ua}var $b;function Og(){if($b)return Fa;$b=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.watchContractEvent=h;const e=Se(),r=gr(),n=ti(),t=Zr(),o=qt(),s=me(),i=en(),a=Cn(),c=Fe(),u=cf(),l=si(),f=Ef(),m=Qu(),y=ed();function h(b,v){const{abi:_,address:g,args:P,batch:d=!0,eventName:w,fromBlock:E,onError:p,onLogs:S,poll:A,pollingInterval:T=b.pollingInterval,strict:C}=v;return(typeof A<"u"?A:typeof E=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="ipc"||b.transport.type==="fallback"&&(b.transport.transports[0].config.type==="webSocket"||b.transport.transports[0].config.type==="ipc")))?(()=>{const F=C??!1,H=(0,c.stringify)(["watchContractEvent",g,P,d,b.uid,w,T,F,E]);return(0,i.observe)(H,{onLogs:S,onError:p},j=>{let k;E!==void 0&&(k=E-1n);let B,O=!1;const x=(0,a.poll)(async()=>{var M;if(!O){try{B=await(0,s.getAction)(b,u.createContractEventFilter,"createContractEventFilter")({abi:_,address:g,args:P,eventName:w,strict:F,fromBlock:E})}catch{}O=!0;return}try{let N;if(B)N=await(0,s.getAction)(b,m.getFilterChanges,"getFilterChanges")({filter:B});else{const z=await(0,s.getAction)(b,l.getBlockNumber,"getBlockNumber")({});k&&k<z?N=await(0,s.getAction)(b,f.getContractEvents,"getContractEvents")({abi:_,address:g,args:P,eventName:w,fromBlock:k+1n,toBlock:z,strict:F}):N=[],k=z}if(N.length===0)return;if(d)j.onLogs(N);else for(const z of N)j.onLogs([z])}catch(N){B&&N instanceof r.InvalidInputRpcError&&(O=!1),(M=j.onError)==null||M.call(j,N)}},{emitOnBegin:!0,interval:T});return async()=>{B&&await(0,s.getAction)(b,y.uninstallFilter,"uninstallFilter")({filter:B}),x()}})})():(()=>{const F=C??!1,H=(0,c.stringify)(["watchContractEvent",g,P,d,b.uid,w,T,F]);let j=!0,k=()=>j=!1;return(0,i.observe)(H,{onLogs:S,onError:p},B=>((async()=>{try{const O=(()=>{if(b.transport.type==="fallback"){const N=b.transport.transports.find(z=>z.config.type==="webSocket"||z.config.type==="ipc");return N?N.value:b.transport}return b.transport})(),x=w?(0,t.encodeEventTopics)({abi:_,eventName:w,args:P}):[],{unsubscribe:M}=await O.subscribe({params:["logs",{address:g,topics:x}],onData(N){var $;if(!j)return;const z=N.result;try{const{eventName:U,args:G}=(0,n.decodeEventLog)({abi:_,data:z.data,topics:z.topics,strict:C}),J=(0,o.formatLog)(z,{args:G,eventName:U});B.onLogs([J])}catch(U){let G,J;if(U instanceof e.DecodeLogDataMismatch||U instanceof e.DecodeLogTopicsMismatch){if(C)return;G=U.abiItem.name,J=($=U.abiItem.inputs)==null?void 0:$.some(V=>!("name"in V&&V.name))}const K=(0,o.formatLog)(z,{args:J?[]:{},eventName:G});B.onLogs([K])}},onError(N){var z;(z=B.onError)==null||z.call(B,N)}});k=M,j||k()}catch(O){p==null||p(O)}})(),()=>k()))})()}return Fa}var To={},Mr={},zb;function Pr(){if(zb)return Mr;zb=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AccountTypeNotSupportedError=Mr.AccountNotFoundError=void 0;const e=ue();class r extends e.BaseError{constructor({docsPath:o}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
44
+ `),{docsPath:o,docsSlug:"account",name:"AccountNotFoundError"})}}Mr.AccountNotFoundError=r;class n extends e.BaseError{constructor({docsPath:o,metaMessages:s,type:i}){super(`Account type "${i}" is not supported.`,{docsPath:o,metaMessages:s,name:"AccountTypeNotSupportedError"})}}return Mr.AccountTypeNotSupportedError=n,Mr}var La={},Da={},Ub;function ci(){if(Ub)return Da;Ub=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.assertCurrentChain=r;const e=oi();function r({chain:n,currentChainId:t}){if(!n)throw new e.ChainNotFoundError;if(t!==n.id)throw new e.ChainMismatchError({chain:n,currentChainId:t})}return Da}var Ga={},Lb;function Rf(){if(Lb)return Ga;Lb=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.sendRawTransaction=e;async function e(r,{serializedTransaction:n}){return r.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}return Ga}var Db;function td(){if(Db)return La;Db=1,Object.defineProperty(La,"__esModule",{value:!0}),La.sendTransaction=v;const e=Ie(),r=Pr(),n=ue(),t=Zo(),o=ci(),s=qe(),i=Qo(),a=Er(),c=St(),u=me(),l=Wr(),f=It(),m=jr(),y=ei(),h=Rf(),b=new l.LruMap(128);async function v(_,g){var M,N,z,$,U,G;const{account:P=_.account,assertChainId:d=!0,chain:w=_.chain,accessList:E,authorizationList:p,blobs:S,data:A,dataSuffix:T=typeof _.dataSuffix=="string"?_.dataSuffix:(M=_.dataSuffix)==null?void 0:M.value,gas:C,gasPrice:I,maxFeePerBlobGas:R,maxFeePerGas:q,maxPriorityFeePerGas:F,nonce:H,type:j,value:k,...B}=g;if(typeof P>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const O=P?(0,e.parseAccount)(P):null;let x;try{(0,f.assertRequest)(g);const J=await(async()=>{if(g.to)return g.to;if(g.to!==null&&p&&p.length>0)return await(0,t.recoverAuthorizationAddress)({authorization:p[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((O==null?void 0:O.type)==="json-rpc"||O===null){let K;w!==null&&(K=await(0,u.getAction)(_,m.getChainId,"getChainId")({}),d&&(0,o.assertCurrentChain)({currentChainId:K,chain:w}));const V=($=(z=(N=_.chain)==null?void 0:N.formatters)==null?void 0:z.transactionRequest)==null?void 0:$.format,te=(V||c.formatTransactionRequest)({...(0,a.extract)(B,{format:V}),accessList:E,account:O,authorizationList:p,blobs:S,chainId:K,data:T?(0,s.concat)([A??"0x",T]):A,gas:C,gasPrice:I,maxFeePerBlobGas:R,maxFeePerGas:q,maxPriorityFeePerGas:F,nonce:H,to:J,type:j,value:k},"sendTransaction"),Z=b.get(_.uid),X=Z?"wallet_sendTransaction":"eth_sendTransaction";try{return await _.request({method:X,params:[te]},{retryCount:0})}catch(Q){if(Z===!1)throw Q;const ne=Q;if(ne.name==="InvalidInputRpcError"||ne.name==="InvalidParamsRpcError"||ne.name==="MethodNotFoundRpcError"||ne.name==="MethodNotSupportedRpcError")return await _.request({method:"wallet_sendTransaction",params:[te]},{retryCount:0}).then(re=>(b.set(_.uid,!0),re)).catch(re=>{const ae=re;throw ae.name==="MethodNotFoundRpcError"||ae.name==="MethodNotSupportedRpcError"?(b.set(_.uid,!1),ne):ae});throw ne}}if((O==null?void 0:O.type)==="local"){if(O.nonceManager&&typeof H>"u"){const te=B.chainId,Z=await(async()=>typeof te=="number"?te:w?w.id:(0,u.getAction)(_,m.getChainId,"getChainId")({}))();x={address:O.address,chainId:Z}}const K=await(0,u.getAction)(_,y.prepareTransactionRequest,"prepareTransactionRequest")({account:O,accessList:E,authorizationList:p,blobs:S,chain:w,data:T?(0,s.concat)([A??"0x",T]):A,gas:C,gasPrice:I,maxFeePerBlobGas:R,maxFeePerGas:q,maxPriorityFeePerGas:F,nonce:H,nonceManager:O.nonceManager,parameters:[...y.defaultParameters,"sidecars"],type:j,value:k,...B,to:J}),V=(U=w==null?void 0:w.serializers)==null?void 0:U.transaction,Y=await O.signTransaction(K,{serializer:V});return await(0,u.getAction)(_,h.sendRawTransaction,"sendRawTransaction")({serializedTransaction:Y})}throw(O==null?void 0:O.type)==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:O==null?void 0:O.type})}catch(J){throw J instanceof r.AccountTypeNotSupportedError?J:(x&&((G=O==null?void 0:O.nonceManager)==null||G.reset(x)),(0,i.getTransactionError)(J,{...g,account:O,chain:g.chain||void 0}))}}return La}var Gb;function Bf(){if(Gb)return To;Gb=1,Object.defineProperty(To,"__esModule",{value:!0}),To.writeContract=i;const e=Ie(),r=Pr(),n=Le(),t=_r(),o=me(),s=td();async function i(a,c){return i.internal(a,s.sendTransaction,"sendTransaction",c)}return(function(a){async function c(u,l,f,m){const{abi:y,account:h=u.account,address:b,args:v,functionName:_,...g}=m;if(typeof h>"u")throw new r.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const P=h?(0,e.parseAccount)(h):null,d=(0,n.encodeFunctionData)({abi:y,args:v,functionName:_});try{return await(0,o.getAction)(u,l,f)({data:d,to:b,account:P,...g})}catch(w){throw(0,t.getContractError)(w,{abi:y,address:b,args:v,docsPath:"/docs/contract/writeContract",functionName:_,sender:P==null?void 0:P.address})}}a.internal=c})(i||(To.writeContract=i={})),To}var Vb;function o6(){if(Vb)return on;Vb=1,Object.defineProperty(on,"__esModule",{value:!0}),on.getContract=c,on.getFunctionParameters=u,on.getEventParameters=l;const e=me(),r=cf(),n=Ag(),t=Ef(),o=Ht(),s=Rg(),i=Og(),a=Bf();function c({abi:f,address:m,client:y}){const h=y,[b,v]=h?"public"in h&&"wallet"in h?[h.public,h.wallet]:"public"in h?[h.public,void 0]:"wallet"in h?[void 0,h.wallet]:[h,h]:[void 0,void 0],_=b!=null,g=v!=null,P={};let d=!1,w=!1,E=!1;for(const p of f)if(p.type==="function"?p.stateMutability==="view"||p.stateMutability==="pure"?d=!0:w=!0:p.type==="event"&&(E=!0),d&&w&&E)break;return _&&(d&&(P.read=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A);return(0,e.getAction)(b,o.readContract,"readContract")({abi:f,address:m,functionName:S,args:T,...C})}}})),w&&(P.simulate=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A);return(0,e.getAction)(b,s.simulateContract,"simulateContract")({abi:f,address:m,functionName:S,args:T,...C})}}})),E&&(P.createEventFilter=new Proxy({},{get(p,S){return(...A)=>{const T=f.find(R=>R.type==="event"&&R.name===S),{args:C,options:I}=l(A,T);return(0,e.getAction)(b,r.createContractEventFilter,"createContractEventFilter")({abi:f,address:m,eventName:S,args:C,...I})}}}),P.getEvents=new Proxy({},{get(p,S){return(...A)=>{const T=f.find(R=>R.type==="event"&&R.name===S),{args:C,options:I}=l(A,T);return(0,e.getAction)(b,t.getContractEvents,"getContractEvents")({abi:f,address:m,eventName:S,args:C,...I})}}}),P.watchEvent=new Proxy({},{get(p,S){return(...A)=>{const T=f.find(R=>R.type==="event"&&R.name===S),{args:C,options:I}=l(A,T);return(0,e.getAction)(b,i.watchContractEvent,"watchContractEvent")({abi:f,address:m,eventName:S,args:C,...I})}}}))),g&&w&&(P.write=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A);return(0,e.getAction)(v,a.writeContract,"writeContract")({abi:f,address:m,functionName:S,args:T,...C})}}})),(_||g)&&w&&(P.estimateGas=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A),I=b??v;return(0,e.getAction)(I,n.estimateContractGas,"estimateContractGas")({abi:f,address:m,functionName:S,args:T,...C,account:C.account??v.account})}}})),P.address=m,P.abi=f,P}function u(f){const m=f.length&&Array.isArray(f[0]),y=m?f[0]:[],h=(m?f[1]:f[0])??{};return{args:y,options:h}}function l(f,m){let y=!1;Array.isArray(f[0])?y=!0:f.length===1?y=m.inputs.some(v=>v.indexed):f.length===2&&(y=!0);const h=y?f[0]:void 0,b=(y?f[1]:f[0])??{};return{args:h,options:b}}return on}var yn={},So={},Wb;function Cg(){if(Wb)return So;Wb=1,Object.defineProperty(So,"__esModule",{value:!0}),So.BundleFailedError=void 0;const e=ue();class r extends e.BaseError{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}return So.BundleFailedError=r,So}var Va={},Kb;function rd(){if(Kb)return Va;Kb=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.withRetry=n;const e=xt(),r=If();function n(t,{delay:o=100,retryCount:s=2,shouldRetry:i=()=>!0,signal:a}={}){return new Promise((c,u)=>{const l=async({count:f=0}={})=>{if(a!=null&&a.aborted){u((0,e.getAbortError)(a));return}const m=async({error:y})=>{const h=typeof o=="function"?o({count:f,error:y}):o;if(h)try{await(0,r.wait)(h,{signal:a})}catch(b){u(b);return}l({count:f+1})};try{const y=await t();c(y)}catch(y){if(a!=null&&a.aborted){u((0,e.getAbortError)(a));return}if((0,e.isAbortError)(y)){u(y);return}if(f<s&&await i({count:f,error:y}))return m({error:y});u(y)}};l()})}return Va}var Wa={},Vd={},Zb;function xn(){return Zb||(Zb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionReceipt=e.receiptStatuses=void 0,e.formatTransactionReceipt=s;const r=Be(),n=Yo(),t=qt(),o=Rn();e.receiptStatuses={"0x0":"reverted","0x1":"success"};function s(i,a){const c={...i,blockNumber:i.blockNumber?BigInt(i.blockNumber):null,contractAddress:i.contractAddress?i.contractAddress:null,cumulativeGasUsed:i.cumulativeGasUsed?BigInt(i.cumulativeGasUsed):null,effectiveGasPrice:i.effectiveGasPrice?BigInt(i.effectiveGasPrice):null,gasUsed:i.gasUsed?BigInt(i.gasUsed):null,logs:i.logs?i.logs.map(u=>(0,t.formatLog)(u)):null,to:i.to?i.to:null,transactionIndex:i.transactionIndex?(0,r.hexToNumber)(i.transactionIndex):null,status:i.status?e.receiptStatuses[i.status]:null,type:i.type?o.transactionType[i.type]||i.type:null};return i.blobGasPrice&&(c.blobGasPrice=BigInt(i.blobGasPrice)),i.blobGasUsed&&(c.blobGasUsed=BigInt(i.blobGasUsed)),c}e.defineTransactionReceipt=(0,n.defineFormatter)("transactionReceipt",s)})(Vd)),Vd}var Wd={},Jb;function Of(){return Jb||(Jb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fallbackTransactionErrorMagicIdentifier=e.fallbackMagicIdentifier=void 0,e.sendCalls=l;const r=Ie(),n=ue(),t=gr(),o=Le(),s=qe(),i=Be(),a=oe(),c=Qo(),u=td();e.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",e.fallbackTransactionErrorMagicIdentifier=(0,a.numberToHex)(0,{size:32});async function l(f,m){var p;const{account:y=f.account,chain:h=f.chain,experimental_fallback:b,experimental_fallbackDelay:v=32,forceAtomic:_=!1,id:g,version:P="2.0.0"}=m,d=y?(0,r.parseAccount)(y):null;let w=m.capabilities;f.dataSuffix&&!((p=m.capabilities)!=null&&p.dataSuffix)&&(typeof f.dataSuffix=="string"?w={...m.capabilities,dataSuffix:{value:f.dataSuffix,optional:!0}}:w={...m.capabilities,dataSuffix:{value:f.dataSuffix.value,...f.dataSuffix.required?{}:{optional:!0}}});const E=m.calls.map(S=>{const A=S,T=A.abi?(0,o.encodeFunctionData)({abi:A.abi,functionName:A.functionName,args:A.args}):A.data;return{data:A.dataSuffix&&T?(0,s.concat)([T,A.dataSuffix]):T,to:A.to,value:A.value?(0,a.numberToHex)(A.value):void 0}});try{const S=await f.request({method:"wallet_sendCalls",params:[{atomicRequired:_,calls:E,capabilities:w,chainId:(0,a.numberToHex)(h.id),from:d==null?void 0:d.address,id:g,version:P}]},{retryCount:0});return typeof S=="string"?{id:S}:S}catch(S){const A=S;if(b&&(A.name==="MethodNotFoundRpcError"||A.name==="MethodNotSupportedRpcError"||A.name==="UnknownRpcError"||A.details.toLowerCase().includes("does not exist / is not available")||A.details.toLowerCase().includes("missing or invalid. request()")||A.details.toLowerCase().includes("did not match any variant of untagged enum")||A.details.toLowerCase().includes("account upgraded to unsupported contract")||A.details.toLowerCase().includes("eip-7702 not supported")||A.details.toLowerCase().includes("unsupported wc_ method")||A.details.toLowerCase().includes("feature toggled misconfigured")||A.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(w&&Object.values(w).some(R=>!R.optional)){const R="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new t.UnsupportedNonOptionalCapabilityError(new n.BaseError(R,{details:R}))}if(_&&E.length>1){const I="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new t.AtomicityNotSupportedError(new n.BaseError(I,{details:I}))}const T=[];for(const I of E){try{const R=await(0,u.sendTransaction)(f,{account:d,chain:h,data:I.data,to:I.to,value:I.value?(0,i.hexToBigInt)(I.value):void 0});T.push({status:"fulfilled",value:R})}catch(R){T.push({reason:R,status:"rejected"})}v>0&&await new Promise(R=>setTimeout(R,v))}if(T.every(I=>I.status==="rejected"))throw T[0].reason;const C=T.map(I=>I.status==="fulfilled"?I.value:e.fallbackTransactionErrorMagicIdentifier);return{id:(0,s.concat)([...C,(0,a.numberToHex)(h.id,{size:32}),e.fallbackMagicIdentifier])}}throw(0,c.getTransactionError)(S,{...m,account:d,chain:m.chain})}}})(Wd)),Wd}var Yb;function xg(){if(Yb)return Wa;Yb=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.getCallsStatus=s;const e=ft(),r=er(),n=Be(),t=xn(),o=Of();async function s(i,a){async function c(v){if(v.endsWith(o.fallbackMagicIdentifier.slice(2))){const g=(0,r.trim)((0,e.sliceHex)(v,-64,-32)),P=(0,e.sliceHex)(v,0,-64).slice(2).match(/.{1,64}/g),d=await Promise.all(P.map(E=>o.fallbackTransactionErrorMagicIdentifier.slice(2)!==E?i.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),w=d.some(E=>E===null)?100:d.every(E=>(E==null?void 0:E.status)==="0x1")?200:d.every(E=>(E==null?void 0:E.status)==="0x0")?500:600;return{atomic:!1,chainId:(0,n.hexToNumber)(g),receipts:d.filter(Boolean),status:w,version:"2.0.0"}}return i.request({method:"wallet_getCallsStatus",params:[v]})}const{atomic:u=!1,chainId:l,receipts:f,version:m="2.0.0",...y}=await c(a.id),[h,b]=(()=>{const v=y.status;return v>=100&&v<200?["pending",v]:v>=200&&v<300?["success",v]:v>=300&&v<700?["failure",v]:v==="CONFIRMED"?["success",200]:v==="PENDING"?["pending",100]:[void 0,v]})();return{...y,atomic:u,chainId:l?(0,n.hexToNumber)(l):void 0,receipts:(f==null?void 0:f.map(v=>({...v,blockNumber:(0,n.hexToBigInt)(v.blockNumber),gasUsed:(0,n.hexToBigInt)(v.gasUsed),status:t.receiptStatuses[v.status]})))??[],statusCode:b,status:h,version:m}}return Wa}var Xb;function Cf(){if(Xb)return yn;Xb=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.WaitForCallsStatusTimeoutError=void 0,yn.waitForCallsStatus=u;const e=ue(),r=Cg(),n=me(),t=en(),o=Cn(),s=wf(),i=rd(),a=Fe(),c=xg();async function u(f,m){const{id:y,pollingInterval:h=f.pollingInterval,status:b=({statusCode:T})=>T===200||T>=300,retryCount:v=4,retryDelay:_=({count:T})=>~~(1<<T)*200,timeout:g=6e4,throwOnFailure:P=!1}=m,d=(0,a.stringify)(["waitForCallsStatus",f.uid,y]),{promise:w,resolve:E,reject:p}=(0,s.withResolvers)();let S;const A=(0,t.observe)(d,{resolve:E,reject:p},T=>{const C=(0,o.poll)(async()=>{const I=R=>{clearTimeout(S),C(),R(),A()};try{const R=await(0,i.withRetry)(async()=>{const q=await(0,n.getAction)(f,c.getCallsStatus,"getCallsStatus")({id:y});if(P&&q.status==="failure")throw new r.BundleFailedError(q);return q},{retryCount:v,delay:_});if(!b(R))return;I(()=>T.resolve(R))}catch(R){I(()=>T.reject(R))}},{interval:h,emitOnBegin:!0});return C});return S=g?setTimeout(()=>{A(),clearTimeout(S),p(new l({id:y}))},g):void 0,await w}class l extends e.BaseError{constructor({id:m}){super(`Timed out while waiting for call bundle with id "${m}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}return yn.WaitForCallsStatusTimeoutError=l,yn}var Io={},Ka={},Qb;function qg(){if(Qb)return Ka;Qb=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.uid=t;const e=256;let r=e,n;function t(o=11){if(!n||r+o>e*2){n="",r=0;for(let s=0;s<e;s++)n+=(256+Math.random()*256|0).toString(16).substring(1)}return n.substring(r,r+++o)}return Ka}var em;function nd(){if(em)return Io;em=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.createClient=n,Io.rpcSchema=t;const e=Ie(),r=qg();function n(o){const{batch:s,chain:i,ccipRead:a,dataSuffix:c,key:u="base",name:l="Base Client",type:f="base"}=o,m=o.experimental_blockTag??(typeof(i==null?void 0:i.experimental_preconfirmationTime)=="number"?"pending":void 0),y=(i==null?void 0:i.blockTime)??12e3,h=Math.min(Math.max(Math.floor(y/2),500),4e3),b=o.pollingInterval??h,v=o.cacheTime??b,_=o.account?(0,e.parseAccount)(o.account):void 0,{config:g,request:P,value:d}=o.transport({account:_,chain:i,pollingInterval:b}),w={...g,...d},E={account:_,batch:s,cacheTime:v,ccipRead:a,chain:i,dataSuffix:c,key:u,name:l,pollingInterval:b,request:P,transport:w,type:f,uid:(0,r.uid)(),...m?{experimental_blockTag:m}:{}};function p(S){return A=>{const T=A(S);for(const I in E)delete T[I];const C={...S,...T};return Object.assign(C,{extend:p(C)})}}return Object.assign(E,{extend:p(E)})}function t(){return null}return Io}var Za={},Ja={},Ya={},Xa={},tm;function xf(){if(tm)return Xa;tm=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.isNullUniversalResolverError=n;const e=ue(),r=pr();function n(t){var s,i,a,c,u,l;if(!(t instanceof e.BaseError))return!1;const o=t.walk(f=>f instanceof r.ContractFunctionRevertedError);return o instanceof r.ContractFunctionRevertedError?((s=o.data)==null?void 0:s.errorName)==="HttpError"||((i=o.data)==null?void 0:i.errorName)==="ResolverError"||((a=o.data)==null?void 0:a.errorName)==="ResolverNotContract"||((c=o.data)==null?void 0:c.errorName)==="ResolverNotFound"||((u=o.data)==null?void 0:u.errorName)==="ReverseAddressMismatch"||((l=o.data)==null?void 0:l.errorName)==="UnsupportedResolverProfile":!1}return Xa}var Qa={},es={},rm;function Mg(){if(rm)return es;rm=1,Object.defineProperty(es,"__esModule",{value:!0}),es.encodedLabelToLabelhash=r;const e=Ze();function r(n){if(n.length!==66||n.indexOf("[")!==0||n.indexOf("]")!==65)return null;const t=`0x${n.slice(1,65)}`;return(0,e.isHex)(t)?t:null}return es}var nm;function qf(){if(nm)return Qa;nm=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.namehash=s;const e=qe(),r=Ee(),n=oe(),t=tt(),o=Mg();function s(i){let a=new Uint8Array(32).fill(0);if(!i)return(0,n.bytesToHex)(a);const c=i.split(".");for(let u=c.length-1;u>=0;u-=1){const l=(0,o.encodedLabelToLabelhash)(c[u]),f=l?(0,r.toBytes)(l):(0,t.keccak256)((0,r.stringToBytes)(c[u]),"bytes");a=(0,t.keccak256)((0,e.concat)([a,f]),"bytes")}return(0,n.bytesToHex)(a)}return Qa}var ts={},rs={},om;function i6(){if(om)return rs;om=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.encodeLabelhash=e;function e(r){return`[${r.slice(2)}]`}return rs}var ns={},im;function kg(){if(im)return ns;im=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.labelhash=o;const e=Ee(),r=oe(),n=tt(),t=Mg();function o(s){const i=new Uint8Array(32).fill(0);return s?(0,t.encodedLabelToLabelhash)(s)||(0,n.keccak256)((0,e.stringToBytes)(s)):(0,r.bytesToHex)(i)}return ns}var am;function Mf(){if(am)return ts;am=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.packetToBytes=t;const e=Ee(),r=i6(),n=kg();function t(o){const s=o.replace(/^\.|\.$/gm,"");if(s.length===0)return new Uint8Array(1);const i=new Uint8Array((0,e.stringToBytes)(s).byteLength+2);let a=0;const c=s.split(".");for(let u=0;u<c.length;u++){let l=(0,e.stringToBytes)(c[u]);l.byteLength>255&&(l=(0,e.stringToBytes)((0,r.encodeLabelhash)((0,n.labelhash)(c[u])))),i[a]=l.length,i.set(l,a+1),a+=l.length+1}return i.byteLength!==a+1?i.slice(0,a+1):i}return ts}var sm;function a6(){if(sm)return Ya;sm=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.getEnsAddress=h;const e=kt(),r=Rt(),n=Le(),t=Je(),o=wr(),s=Ue(),i=er(),a=oe(),c=xf(),u=ai(),l=qf(),f=Mf(),m=me(),y=Ht();async function h(v,_){const{blockNumber:g,blockTag:P,coinType:d,name:w,gatewayUrls:E,strict:p}=_,{chain:S}=v,A=(()=>{if(_.universalResolverAddress)return _.universalResolverAddress;if(!S)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,o.getChainContractAddress)({blockNumber:g,chain:S,contract:"ensUniversalResolver"})})(),T=S==null?void 0:S.ensTlds;if(T&&!T.some(I=>w.endsWith(I)))return null;const C=d!=null?[(0,l.namehash)(w),BigInt(d)]:[(0,l.namehash)(w)];try{const I=(0,n.encodeFunctionData)({abi:e.addressResolverAbi,functionName:"addr",args:C}),R={address:A,abi:e.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,a.toHex)((0,f.packetToBytes)(w)),I,E??[u.localBatchGatewayUrl]],blockNumber:g,blockTag:P},F=await(0,m.getAction)(v,y.readContract,"readContract")(R);if(F[0]==="0x")return null;const H=b({coinType:d,data:F[0],args:C});return H==="0x"||(0,i.trim)(H)==="0x00"?null:H}catch(I){if(p)throw I;if((0,c.isNullUniversalResolverError)(I))return null;throw I}}function b({coinType:v,data:_,args:g}){try{return(0,r.decodeFunctionResult)({abi:e.addressResolverAbi,args:g,functionName:"addr",data:_})}catch(P){if(v==null)throw P;const d=(0,i.trim)(_);if((0,s.size)(d)===20)return(0,t.getAddress)(d);throw P}}return Ya}var os={},is={},wt={},ut={},cm;function kf(){if(cm)return ut;cm=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.EnsInvalidChainIdError=ut.EnsAvatarUnsupportedNamespaceError=ut.EnsAvatarUriResolutionError=ut.EnsAvatarInvalidNftUriError=ut.EnsAvatarInvalidMetadataError=void 0;const e=ue();class r extends e.BaseError{constructor({data:a}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(a)}`],name:"EnsAvatarInvalidMetadataError"})}}ut.EnsAvatarInvalidMetadataError=r;class n extends e.BaseError{constructor({reason:a}){super(`ENS NFT avatar URI is invalid. ${a}`,{name:"EnsAvatarInvalidNftUriError"})}}ut.EnsAvatarInvalidNftUriError=n;class t extends e.BaseError{constructor({uri:a}){super(`Unable to resolve ENS avatar URI "${a}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}ut.EnsAvatarUriResolutionError=t;class o extends e.BaseError{constructor({namespace:a}){super(`ENS NFT avatar namespace "${a}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}ut.EnsAvatarUnsupportedNamespaceError=o;class s extends e.BaseError{constructor({chainId:a}){super(`Invalid ENSIP-11 chainId: ${a}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}return ut.EnsInvalidChainIdError=s,ut}var um;function s6(){if(um)return wt;um=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.isImageUri=i,wt.getGateway=a,wt.resolveAvatarUri=c,wt.getJsonImage=u,wt.getMetadataAvatarUri=l,wt.parseAvatarUri=f,wt.parseNftUri=m,wt.getNftTokenUri=y;const e=Ht(),r=kf(),n=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,t=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,o=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,s=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function i(h){try{const b=await fetch(h,{method:"HEAD"});if(b.status===200){const v=b.headers.get("content-type");return v==null?void 0:v.startsWith("image/")}return!1}catch(b){return typeof b=="object"&&typeof b.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(v=>{const _=new Image;_.onload=()=>{v(!0)},_.onerror=()=>{v(!1)},_.src=h})}}function a(h,b){return h?h.endsWith("/")?h.slice(0,-1):h:b}function c({uri:h,gatewayUrls:b}){const v=o.test(h);if(v)return{uri:h,isOnChain:!0,isEncoded:v};const _=a(b==null?void 0:b.ipfs,"https://ipfs.io"),g=a(b==null?void 0:b.arweave,"https://arweave.net"),P=h.match(n),{protocol:d,subpath:w,target:E,subtarget:p=""}=(P==null?void 0:P.groups)||{},S=d==="ipns:/"||w==="ipns/",A=d==="ipfs:/"||w==="ipfs/"||t.test(h);if(h.startsWith("http")&&!S&&!A){let C=h;return b!=null&&b.arweave&&(C=h.replace(/https:\/\/arweave.net/g,b==null?void 0:b.arweave)),{uri:C,isOnChain:!1,isEncoded:!1}}if((S||A)&&E)return{uri:`${_}/${S?"ipns":"ipfs"}/${E}${p}`,isOnChain:!1,isEncoded:!1};if(d==="ar:/"&&E)return{uri:`${g}/${E}${p||""}`,isOnChain:!1,isEncoded:!1};let T=h.replace(s,"");if(T.startsWith("<svg")&&(T=`data:image/svg+xml;base64,${btoa(T)}`),T.startsWith("data:")||T.startsWith("{"))return{uri:T,isOnChain:!0,isEncoded:!1};throw new r.EnsAvatarUriResolutionError({uri:h})}function u(h){if(typeof h!="object"||!("image"in h)&&!("image_url"in h)&&!("image_data"in h))throw new r.EnsAvatarInvalidMetadataError({data:h});return h.image||h.image_url||h.image_data}async function l({gatewayUrls:h,uri:b}){try{const v=await fetch(b).then(g=>g.json());return await f({gatewayUrls:h,uri:u(v)})}catch{throw new r.EnsAvatarUriResolutionError({uri:b})}}async function f({gatewayUrls:h,uri:b}){const{uri:v,isOnChain:_}=c({uri:b,gatewayUrls:h});if(_||await i(v))return v;throw new r.EnsAvatarUriResolutionError({uri:b})}function m(h){let b=h;b.startsWith("did:nft:")&&(b=b.replace("did:nft:","").replace(/_/g,"/"));const[v,_,g]=b.split("/"),[P,d]=v.split(":"),[w,E]=_.split(":");if(!P||P.toLowerCase()!=="eip155")throw new r.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!d)throw new r.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!E)throw new r.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!g)throw new r.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!w)throw new r.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(d,10),namespace:w.toLowerCase(),contractAddress:E,tokenID:g}}async function y(h,{nft:b}){if(b.namespace==="erc721")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(b.tokenID)]});if(b.namespace==="erc1155")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(b.tokenID)]});throw new r.EnsAvatarUnsupportedNamespaceError({namespace:b.namespace})}return wt}var dm;function c6(){if(dm)return is;dm=1,Object.defineProperty(is,"__esModule",{value:!0}),is.parseAvatarRecord=r;const e=s6();async function r(t,{gatewayUrls:o,record:s}){return/eip155:/i.test(s)?n(t,{gatewayUrls:o,record:s}):(0,e.parseAvatarUri)({uri:s,gatewayUrls:o})}async function n(t,{gatewayUrls:o,record:s}){const i=(0,e.parseNftUri)(s),a=await(0,e.getNftTokenUri)(t,{nft:i}),{uri:c,isOnChain:u,isEncoded:l}=(0,e.resolveAvatarUri)({uri:a,gatewayUrls:o});if(u&&(c.includes("data:application/json;base64,")||c.startsWith("{"))){const m=l?atob(c.replace("data:application/json;base64,","")):c,y=JSON.parse(m);return(0,e.parseAvatarUri)({uri:(0,e.getJsonImage)(y),gatewayUrls:o})}let f=i.tokenID;return i.namespace==="erc1155"&&(f=f.replace("0x","").padStart(64,"0")),(0,e.getMetadataAvatarUri)({gatewayUrls:o,uri:c.replace(/(?:0x)?{id}/,f)})}return is}var as={},fm;function Hg(){if(fm)return as;fm=1,Object.defineProperty(as,"__esModule",{value:!0}),as.getEnsText=f;const e=kt(),r=Rt(),n=Le(),t=wr(),o=oe(),s=xf(),i=ai(),a=qf(),c=Mf(),u=me(),l=Ht();async function f(m,y){const{blockNumber:h,blockTag:b,key:v,name:_,gatewayUrls:g,strict:P}=y,{chain:d}=m,w=(()=>{if(y.universalResolverAddress)return y.universalResolverAddress;if(!d)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,t.getChainContractAddress)({blockNumber:h,chain:d,contract:"ensUniversalResolver"})})(),E=d==null?void 0:d.ensTlds;if(E&&!E.some(p=>_.endsWith(p)))return null;try{const p={address:w,abi:e.universalResolverResolveAbi,args:[(0,o.toHex)((0,c.packetToBytes)(_)),(0,n.encodeFunctionData)({abi:e.textResolverAbi,functionName:"text",args:[(0,a.namehash)(_),v]}),g??[i.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:h,blockTag:b},A=await(0,u.getAction)(m,l.readContract,"readContract")(p);if(A[0]==="0x")return null;const T=(0,r.decodeFunctionResult)({abi:e.textResolverAbi,functionName:"text",data:A[0]});return T===""?null:T}catch(p){if(P)throw p;if((0,s.isNullUniversalResolverError)(p))return null;throw p}}return as}var lm;function u6(){if(lm)return os;lm=1,Object.defineProperty(os,"__esModule",{value:!0}),os.getEnsAvatar=t;const e=c6(),r=me(),n=Hg();async function t(o,{blockNumber:s,blockTag:i,assetGatewayUrls:a,name:c,gatewayUrls:u,strict:l,universalResolverAddress:f}){const m=await(0,r.getAction)(o,n.getEnsText,"getEnsText")({blockNumber:s,blockTag:i,key:"avatar",name:c,universalResolverAddress:f,gatewayUrls:u,strict:l});if(!m)return null;try{return await(0,e.parseAvatarRecord)(o,{record:m,gatewayUrls:a})}catch{return null}}return os}var ss={},bm;function d6(){if(bm)return ss;bm=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.getEnsName=i;const e=kt(),r=wr(),n=xf(),t=ai(),o=me(),s=Ht();async function i(a,c){const{address:u,blockNumber:l,blockTag:f,coinType:m=60n,gatewayUrls:y,strict:h}=c,{chain:b}=a,v=(()=>{if(c.universalResolverAddress)return c.universalResolverAddress;if(!b)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,r.getChainContractAddress)({blockNumber:l,chain:b,contract:"ensUniversalResolver"})})();try{const _={address:v,abi:e.universalResolverReverseAbi,args:[u,m,y??[t.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:l,blockTag:f},g=(0,o.getAction)(a,s.readContract,"readContract"),[P]=await g(_);return P||null}catch(_){if(h)throw _;if((0,n.isNullUniversalResolverError)(_))return null;throw _}}return ss}var cs={},mm;function f6(){if(mm)return cs;mm=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.getEnsResolver=s;const e=wr(),r=oe(),n=Mf(),t=me(),o=Ht();async function s(i,a){const{blockNumber:c,blockTag:u,name:l}=a,{chain:f}=i,m=(()=>{if(a.universalResolverAddress)return a.universalResolverAddress;if(!f)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,e.getChainContractAddress)({blockNumber:c,chain:f,contract:"ensUniversalResolver"})})(),y=f==null?void 0:f.ensTlds;if(y&&!y.some(b=>l.endsWith(b)))throw new Error(`${l} is not a valid ENS TLD (${y==null?void 0:y.join(", ")}) for chain "${f.name}" (id: ${f.id}).`);const[h]=await(0,t.getAction)(i,o.readContract,"readContract")({address:m,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,r.toHex)((0,n.packetToBytes)(l))],blockNumber:c,blockTag:u});return h}return cs}var us={},hm;function Fg(){if(hm)return us;hm=1,Object.defineProperty(us,"__esModule",{value:!0}),us.createAccessList=a;const e=Ie(),r=ue(),n=oe(),t=jf(),o=Er(),s=St(),i=It();async function a(c,u){var S,A,T;const{account:l=c.account,blockNumber:f,blockTag:m="latest",blobs:y,data:h,gas:b,gasPrice:v,maxFeePerBlobGas:_,maxFeePerGas:g,maxPriorityFeePerGas:P,to:d,value:w,...E}=u,p=l?(0,e.parseAccount)(l):void 0;try{(0,i.assertRequest)(u);const I=(typeof f=="bigint"?(0,n.numberToHex)(f):void 0)||m,R=(T=(A=(S=c.chain)==null?void 0:S.formatters)==null?void 0:A.transactionRequest)==null?void 0:T.format,F=(R||s.formatTransactionRequest)({...(0,o.extract)(E,{format:R}),account:p,blobs:y,data:h,gas:b,gasPrice:v,maxFeePerBlobGas:_,maxFeePerGas:g,maxPriorityFeePerGas:P,to:d,value:w},"createAccessList"),H=await c.request({method:"eth_createAccessList",params:[F,I]});if(H.error)throw new r.BaseError(H.error,{details:H.error});return{accessList:H.accessList,gasUsed:BigInt(H.gasUsed)}}catch(C){throw(0,t.getCallError)(C,{...u,account:p,chain:c.chain})}}return us}var ds={},ym;function l6(){if(ym)return ds;ym=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.createBlockFilter=r;const e=$u();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newBlockFilter"}),o=await n.request({method:"eth_newBlockFilter"});return{id:o,request:t(o),type:"block"}}return ds}var fs={},pm;function Ng(){if(pm)return fs;pm=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.createEventFilter=t;const e=Zr(),r=oe(),n=$u();async function t(o,{address:s,args:i,event:a,events:c,fromBlock:u,strict:l,toBlock:f}={}){const m=c??(a?[a]:void 0),y=(0,n.createFilterRequestScope)(o,{method:"eth_newFilter"});let h=[];m&&(h=[m.flatMap(_=>(0,e.encodeEventTopics)({abi:[_],eventName:_.name,args:i}))],a&&(h=h[0]));const b=await o.request({method:"eth_newFilter",params:[{address:s,fromBlock:typeof u=="bigint"?(0,r.numberToHex)(u):u,toBlock:typeof f=="bigint"?(0,r.numberToHex)(f):f,...h.length?{topics:h}:{}}]});return{abi:m,args:i,eventName:a?a.name:void 0,fromBlock:u,id:b,request:y(b),strict:!!l,toBlock:f,type:"event"}}return fs}var ls={},gm;function $g(){if(gm)return ls;gm=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.createPendingTransactionFilter=r;const e=$u();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newPendingTransactionFilter"}),o=await n.request({method:"eth_newPendingTransactionFilter"});return{id:o,request:t(o),type:"transaction"}}return ls}var bs={},_m;function b6(){if(_m)return bs;_m=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.getBalance=i;const e=kt(),r=Rt(),n=Le(),t=Bn(),o=me(),s=On();async function i(a,{address:c,blockHash:u,blockNumber:l,blockTag:f=a.experimental_blockTag??"latest",requireCanonical:m}){var b,v,_;const y=(0,t.formatBlockParameter)({blockHash:u,blockNumber:l,blockTag:f,requireCanonical:m});if((b=a.batch)!=null&&b.multicall&&((_=(v=a.chain)==null?void 0:v.contracts)!=null&&_.multicall3)){const g=a.chain.contracts.multicall3.address,P=(0,n.encodeFunctionData)({abi:e.multicall3Abi,functionName:"getEthBalance",args:[c]}),{data:d}=await(0,o.getAction)(a,s.call,"call")({to:g,data:P,blockHash:u,blockNumber:l,blockTag:f,requireCanonical:m});return(0,r.decodeFunctionResult)({abi:e.multicall3Abi,functionName:"getEthBalance",args:[c],data:d||"0x"})}const h=await a.request({method:"eth_getBalance",params:[c,y]});return BigInt(h)}return bs}var ms={},vm;function m6(){if(vm)return ms;vm=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.getBlobBaseFee=e;async function e(r){const n=await r.request({method:"eth_blobBaseFee"});return BigInt(n)}return ms}var hs={},Em;function h6(){if(Em)return hs;Em=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.getBlockReceipts=t;const e=Du(),r=oe(),n=xn();async function t(o,{blockHash:s,blockNumber:i,blockTag:a=o.experimental_blockTag??"latest"}={}){var f,m,y;const c=i!==void 0?(0,r.numberToHex)(i):void 0,u=await o.request({method:"eth_getBlockReceipts",params:[s||c||a]},{dedupe:!!(s||c)});if(!u)throw new e.BlockNotFoundError({blockHash:s,blockNumber:i});const l=((y=(m=(f=o.chain)==null?void 0:f.formatters)==null?void 0:m.transactionReceipt)==null?void 0:y.format)||n.formatTransactionReceipt;return u.map(h=>l(h,"getBlockReceipts"))}return hs}var ys={},jm;function y6(){if(jm)return ys;jm=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.getBlockTransactionCount=n;const e=Be(),r=oe();async function n(t,{blockHash:o,blockNumber:s,blockTag:i="latest"}={}){const a=s!==void 0?(0,r.numberToHex)(s):void 0;let c;return o?c=await t.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):c=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[a||i]},{dedupe:!!a}),(0,e.hexToNumber)(c)}return ys}var ps={},wm;function Hf(){if(wm)return ps;wm=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.getCode=r;const e=Bn();async function r(n,{address:t,blockHash:o,blockNumber:s,blockTag:i="latest",requireCanonical:a}){const c=(0,e.formatBlockParameter)({blockHash:o,blockNumber:s,blockTag:i,requireCanonical:a}),u=await n.request({method:"eth_getCode",params:[t,c]},{dedupe:typeof s=="bigint"||o!==void 0});if(u!=="0x")return u}return ps}var gs={},Pm;function p6(){if(Pm)return gs;Pm=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.getDelegation=o;const e=Je(),r=Ue(),n=ft(),t=Hf();async function o(s,{address:i,blockNumber:a,blockTag:c="latest"}){const u=await(0,t.getCode)(s,{address:i,...a!==void 0?{blockNumber:a}:{blockTag:c}});if(u&&(0,r.size)(u)===23&&u.startsWith("0xef0100"))return(0,e.getAddress)((0,n.slice)(u,3,23))}return gs}var _s={},Ro={},Am;function g6(){if(Am)return Ro;Am=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.Eip712DomainNotFoundError=void 0;const e=ue();class r extends e.BaseError{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}return Ro.Eip712DomainNotFoundError=r,Ro}var Tm;function _6(){if(Tm)return _s;Tm=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.getEip712Domain=t;const e=g6(),r=me(),n=Ht();async function t(s,i){const{address:a,factory:c,factoryData:u}=i;try{const[l,f,m,y,h,b,v]=await(0,r.getAction)(s,n.readContract,"readContract")({abi:o,address:a,functionName:"eip712Domain",factory:c,factoryData:u});return{domain:{name:f,version:m,chainId:Number(y),verifyingContract:h,salt:b},extensions:v,fields:l}}catch(l){const f=l;throw f.name==="ContractFunctionExecutionError"&&f.cause.name==="ContractFunctionZeroDataError"?new e.Eip712DomainNotFoundError({address:a}):f}}const o=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];return _s}var vs={},Es={},Sm;function v6(){if(Sm)return Es;Sm=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.formatFeeHistory=e;function e(r){var n;return{baseFeePerGas:r.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:r.gasUsedRatio,oldestBlock:BigInt(r.oldestBlock),reward:(n=r.reward)==null?void 0:n.map(t=>t.map(o=>BigInt(o)))}}return Es}var Im;function E6(){if(Im)return vs;Im=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.getFeeHistory=n;const e=oe(),r=v6();async function n(t,{blockCount:o,blockNumber:s,blockTag:i="latest",rewardPercentiles:a}){const c=typeof s=="bigint"?(0,e.numberToHex)(s):void 0,u=await t.request({method:"eth_feeHistory",params:[(0,e.numberToHex)(o),c||i,a]},{dedupe:!!c});return(0,r.formatFeeHistory)(u)}return vs}var js={},Rm;function j6(){if(Rm)return js;Rm=1,Object.defineProperty(js,"__esModule",{value:!0}),js.getFilterLogs=n;const e=ri(),r=qt();async function n(t,{filter:o}){const s=o.strict??!1,a=(await o.request({method:"eth_getFilterLogs",params:[o.id]})).map(c=>(0,r.formatLog)(c));return o.abi?(0,e.parseEventLogs)({abi:o.abi,logs:a,strict:s}):a}return js}var ws={},Ps={},Kd={},As={},Bm;function zg(){if(Bm)return As;Bm=1,Object.defineProperty(As,"__esModule",{value:!0}),As.encodePacked=a;const e=Se(),r=At(),n=rt(),t=qe(),o=mr(),s=oe(),i=Nu();function a(u,l){if(u.length!==l.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:u.length,givenLength:l.length});const f=[];for(let m=0;m<u.length;m++){const y=u[m],h=l[m];f.push(c(y,h))}return(0,t.concatHex)(f)}function c(u,l,f=!1){if(u==="address"){const b=l;if(!(0,n.isAddress)(b))throw new r.InvalidAddressError({address:b});return(0,o.pad)(b.toLowerCase(),{size:f?32:null})}if(u==="string")return(0,s.stringToHex)(l);if(u==="bytes")return l;if(u==="bool")return(0,o.pad)((0,s.boolToHex)(l),{size:f?32:1});const m=u.match(i.integerRegex);if(m){const[b,v,_="256"]=m,g=Number.parseInt(_,10)/8;return(0,s.numberToHex)(l,{size:f?32:g,signed:v==="int"})}const y=u.match(i.bytesRegex);if(y){const[b,v]=y;if(Number.parseInt(v,10)!==(l.length-2)/2)throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(v,10),givenSize:(l.length-2)/2});return(0,o.pad)(l,{dir:"right",size:f?32:null})}const h=u.match(i.arrayRegex);if(h&&Array.isArray(l)){const[b,v]=h,_=[];for(let g=0;g<l.length;g++)_.push(c(v,l[g],!0));return _.length===0?"0x":(0,t.concatHex)(_)}throw new e.UnsupportedPackedAbiType(u)}return As}var pn={},Ts={},Om;function Ff(){if(Om)return Ts;Om=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.isBytes=e;function e(r){return!r||typeof r!="object"||!("BYTES_PER_ELEMENT"in r)?!1:r.BYTES_PER_ELEMENT===1&&r.constructor.name==="Uint8Array"}return Ts}var Cm;function Ug(){if(Cm)return pn;Cm=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.getContractAddress=c,pn.getCreateAddress=u,pn.getCreate2Address=l;const e=qe(),r=Ff(),n=mr(),t=ft(),o=Ee(),s=Ko(),i=tt(),a=Je();function c(f){return f.opcode==="CREATE2"?l(f):u(f)}function u(f){const m=(0,o.toBytes)((0,a.getAddress)(f.from));let y=(0,o.toBytes)(f.nonce);return y[0]===0&&(y=new Uint8Array([])),(0,a.getAddress)(`0x${(0,i.keccak256)((0,s.toRlp)([m,y],"bytes")).slice(26)}`)}function l(f){const m=(0,o.toBytes)((0,a.getAddress)(f.from)),y=(0,n.pad)((0,r.isBytes)(f.salt)?f.salt:(0,o.toBytes)(f.salt),{size:32}),h="bytecodeHash"in f?(0,r.isBytes)(f.bytecodeHash)?f.bytecodeHash:(0,o.toBytes)(f.bytecodeHash):(0,i.keccak256)(f.bytecode,"bytes");return(0,a.getAddress)((0,t.slice)((0,i.keccak256)((0,e.concat)([(0,o.toBytes)("0xff"),m,y,h])),12))}return pn}var Ss={},Bo={},dr={},xm;function od(){if(xm)return dr;xm=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.assertTransactionEIP7702=f,dr.assertTransactionEIP4844=m,dr.assertTransactionEIP1559=y,dr.assertTransactionEIP2930=h,dr.assertTransactionLegacy=b;const e=jg(),r=bf(),n=At(),t=ue(),o=wg(),s=oi(),i=rr(),a=rt(),c=Ue(),u=ft(),l=Be();function f(v){const{authorizationList:_}=v;if(_)for(const g of _){const{chainId:P}=g,d=g.address;if(!(0,a.isAddress)(d))throw new n.InvalidAddressError({address:d});if(P<0)throw new s.InvalidChainIdError({chainId:P})}y(v)}function m(v){const{blobVersionedHashes:_}=v;if(_){if(_.length===0)throw new o.EmptyBlobError;for(const g of _){const P=(0,c.size)(g),d=(0,l.hexToNumber)((0,u.slice)(g,0,1));if(P!==32)throw new o.InvalidVersionedHashSizeError({hash:g,size:P});if(d!==e.versionedHashVersionKzg)throw new o.InvalidVersionedHashVersionError({hash:g,version:d})}}y(v)}function y(v){const{chainId:_,maxPriorityFeePerGas:g,maxFeePerGas:P,to:d}=v;if(_<=0)throw new s.InvalidChainIdError({chainId:_});if(d&&!(0,a.isAddress)(d))throw new n.InvalidAddressError({address:d});if(P&&P>r.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P});if(g&&P&&g>P)throw new i.TipAboveFeeCapError({maxFeePerGas:P,maxPriorityFeePerGas:g})}function h(v){const{chainId:_,maxPriorityFeePerGas:g,gasPrice:P,maxFeePerGas:d,to:w}=v;if(_<=0)throw new s.InvalidChainIdError({chainId:_});if(w&&!(0,a.isAddress)(w))throw new n.InvalidAddressError({address:w});if(g||d)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(P&&P>r.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P})}function b(v){const{chainId:_,maxPriorityFeePerGas:g,gasPrice:P,maxFeePerGas:d,to:w}=v;if(w&&!(0,a.isAddress)(w))throw new n.InvalidAddressError({address:w});if(typeof _<"u"&&_<=0)throw new s.InvalidChainIdError({chainId:_});if(g||d)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(P&&P>r.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P})}return dr}var Is={},qm;function Nf(){if(qm)return Is;qm=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.serializeAccessList=t;const e=At(),r=nt(),n=rt();function t(o){if(!o||o.length===0)return[];const s=[];for(let i=0;i<o.length;i++){const{address:a,storageKeys:c}=o[i];for(let u=0;u<c.length;u++)if(c[u].length-2!==64)throw new r.InvalidStorageKeySizeError({storageKey:c[u]});if(!(0,n.isAddress)(a,{strict:!1}))throw new e.InvalidAddressError({address:a});s.push([a,c])}return s}return Is}var Mm;function id(){if(Mm)return Bo;Mm=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.serializeTransaction=y,Bo.toYParitySignatureArray=P;const e=nt(),r=Lg(),n=Wu(),t=Ku(),o=pf(),s=Zu(),i=qe(),a=er(),c=oe(),u=Ko(),l=od(),f=Ju(),m=Nf();function y(d,w){const E=(0,f.getTransactionType)(d);return E==="eip1559"?v(d,w):E==="eip2930"?_(d,w):E==="eip4844"?b(d,w):E==="eip7702"?h(d,w):g(d,w)}function h(d,w){const{authorizationList:E,chainId:p,gas:S,nonce:A,to:T,value:C,maxFeePerGas:I,maxPriorityFeePerGas:R,accessList:q,data:F}=d;(0,l.assertTransactionEIP7702)(d);const H=(0,m.serializeAccessList)(q),j=(0,r.serializeAuthorizationList)(E);return(0,i.concatHex)(["0x04",(0,u.toRlp)([(0,c.numberToHex)(p),A?(0,c.numberToHex)(A):"0x",R?(0,c.numberToHex)(R):"0x",I?(0,c.numberToHex)(I):"0x",S?(0,c.numberToHex)(S):"0x",T??"0x",C?(0,c.numberToHex)(C):"0x",F??"0x",H,j,...P(d,w)])])}function b(d,w){const{chainId:E,gas:p,nonce:S,to:A,value:T,maxFeePerBlobGas:C,maxFeePerGas:I,maxPriorityFeePerGas:R,accessList:q,data:F}=d;(0,l.assertTransactionEIP4844)(d);let H=d.blobVersionedHashes,j=d.sidecars;if(d.blobs&&(typeof H>"u"||typeof j>"u")){const N=typeof d.blobs[0]=="string"?d.blobs:d.blobs.map(U=>(0,c.bytesToHex)(U)),z=d.kzg,$=(0,n.blobsToCommitments)({blobs:N,kzg:z});if(typeof H>"u"&&(H=(0,o.commitmentsToVersionedHashes)({commitments:$})),typeof j>"u"){const U=(0,t.blobsToProofs)({blobs:N,commitments:$,kzg:z});j=(0,s.toBlobSidecars)({blobs:N,commitments:$,proofs:U})}}const k=(0,m.serializeAccessList)(q),B=[(0,c.numberToHex)(E),S?(0,c.numberToHex)(S):"0x",R?(0,c.numberToHex)(R):"0x",I?(0,c.numberToHex)(I):"0x",p?(0,c.numberToHex)(p):"0x",A??"0x",T?(0,c.numberToHex)(T):"0x",F??"0x",k,C?(0,c.numberToHex)(C):"0x",H??[],...P(d,w)],O=[],x=[],M=[];if(j)for(let N=0;N<j.length;N++){const{blob:z,commitment:$,proof:U}=j[N];O.push(z),x.push($),M.push(U)}return(0,i.concatHex)(["0x03",j?(0,u.toRlp)([B,O,x,M]):(0,u.toRlp)(B)])}function v(d,w){const{chainId:E,gas:p,nonce:S,to:A,value:T,maxFeePerGas:C,maxPriorityFeePerGas:I,accessList:R,data:q}=d;(0,l.assertTransactionEIP1559)(d);const F=(0,m.serializeAccessList)(R),H=[(0,c.numberToHex)(E),S?(0,c.numberToHex)(S):"0x",I?(0,c.numberToHex)(I):"0x",C?(0,c.numberToHex)(C):"0x",p?(0,c.numberToHex)(p):"0x",A??"0x",T?(0,c.numberToHex)(T):"0x",q??"0x",F,...P(d,w)];return(0,i.concatHex)(["0x02",(0,u.toRlp)(H)])}function _(d,w){const{chainId:E,gas:p,data:S,nonce:A,to:T,value:C,accessList:I,gasPrice:R}=d;(0,l.assertTransactionEIP2930)(d);const q=(0,m.serializeAccessList)(I),F=[(0,c.numberToHex)(E),A?(0,c.numberToHex)(A):"0x",R?(0,c.numberToHex)(R):"0x",p?(0,c.numberToHex)(p):"0x",T??"0x",C?(0,c.numberToHex)(C):"0x",S??"0x",q,...P(d,w)];return(0,i.concatHex)(["0x01",(0,u.toRlp)(F)])}function g(d,w){const{chainId:E=0,gas:p,data:S,nonce:A,to:T,value:C,gasPrice:I}=d;(0,l.assertTransactionLegacy)(d);let R=[A?(0,c.numberToHex)(A):"0x",I?(0,c.numberToHex)(I):"0x",p?(0,c.numberToHex)(p):"0x",T??"0x",C?(0,c.numberToHex)(C):"0x",S??"0x"];if(w){const q=(()=>{if(w.v>=35n)return(w.v-35n)/2n>0?w.v:27n+(w.v===35n?0n:1n);if(E>0)return BigInt(E*2)+BigInt(35n+w.v-27n);const j=27n+(w.v===27n?0n:1n);if(w.v!==j)throw new e.InvalidLegacyVError({v:w.v});return j})(),F=(0,a.trim)(w.r),H=(0,a.trim)(w.s);R=[...R,(0,c.numberToHex)(q),F==="0x00"?"0x":F,H==="0x00"?"0x":H]}else E>0&&(R=[...R,(0,c.numberToHex)(E),"0x","0x"]);return(0,u.toRlp)(R)}function P(d,w){const E=w??d,{v:p,yParity:S}=E;if(typeof E.r>"u")return[];if(typeof E.s>"u")return[];if(typeof p>"u"&&typeof S>"u")return[];const A=(0,a.trim)(E.r),T=(0,a.trim)(E.s);return[typeof S=="number"?S?(0,c.numberToHex)(1):"0x":p===0n?"0x":p===1n?(0,c.numberToHex)(1):p===27n?"0x":(0,c.numberToHex)(1),A==="0x00"?"0x":A,T==="0x00"?"0x":T]}return Bo}var km;function Lg(){if(km)return Ss;km=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.serializeAuthorizationList=n;const e=oe(),r=id();function n(t){if(!t||t.length===0)return[];const o=[];for(const s of t){const{chainId:i,nonce:a,...c}=s,u=s.address;o.push([i?(0,e.toHex)(i):"0x",u,a?(0,e.toHex)(a):"0x",...(0,r.toYParitySignatureArray)({},c)])}return o}return Ss}var Rs={},Hm;function Dg(){if(Hm)return Rs;Hm=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.verifyAuthorization=t;const e=Je(),r=gt(),n=Zo();async function t({address:o,authorization:s,signature:i}){return(0,r.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverAuthorizationAddress)({authorization:s,signature:i}))}return Rs}var Oo={},Zd={},Fm;function w6(){return Fm||(Fm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.promiseCache=void 0,e.withDedupe=n;const r=Wr();e.promiseCache=new r.LruMap(8192);function n(t,{enabled:o=!0,id:s}){if(!o||!s)return t();if(e.promiseCache.get(s))return e.promiseCache.get(s);const i=t().finally(()=>e.promiseCache.delete(s));return e.promiseCache.set(s,i),i}})(Zd)),Zd}var Nm;function Gg(){if(Nm)return Oo;Nm=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.buildRequest=a,Oo.shouldRetry=c;const e=ue(),r=pt(),n=gr(),t=xt(),o=w6(),s=rd(),i=Fe();function a(l,f={}){return async(m,y={})=>{var E;const{dedupe:h=!1,methods:b,retryDelay:v=150,retryCount:_=3,signal:g,uid:P}={...f,...y},{method:d}=m;if((E=b==null?void 0:b.exclude)!=null&&E.includes(d))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});if(b!=null&&b.include&&!b.include.includes(d))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});if(g!=null&&g.aborted)throw(0,t.getAbortError)(g);const w=h?u(`${P}.${(0,i.stringify)(m)}`):void 0;return(0,o.withDedupe)(()=>(0,s.withRetry)(async()=>{try{return await l(m,g?{signal:g}:void 0)}catch(p){if(g!=null&&g.aborted)throw(0,t.getAbortError)(g);if((0,t.isAbortError)(p))throw p;const S=p;switch(S.code){case n.ParseRpcError.code:throw new n.ParseRpcError(S);case n.InvalidRequestRpcError.code:throw new n.InvalidRequestRpcError(S);case n.MethodNotFoundRpcError.code:throw new n.MethodNotFoundRpcError(S,{method:m.method});case n.InvalidParamsRpcError.code:throw new n.InvalidParamsRpcError(S);case n.InternalRpcError.code:throw new n.InternalRpcError(S);case n.InvalidInputRpcError.code:throw new n.InvalidInputRpcError(S);case n.ResourceNotFoundRpcError.code:throw new n.ResourceNotFoundRpcError(S);case n.ResourceUnavailableRpcError.code:throw new n.ResourceUnavailableRpcError(S);case n.TransactionRejectedRpcError.code:throw new n.TransactionRejectedRpcError(S);case n.MethodNotSupportedRpcError.code:throw new n.MethodNotSupportedRpcError(S,{method:m.method});case n.LimitExceededRpcError.code:throw new n.LimitExceededRpcError(S);case n.JsonRpcVersionUnsupportedError.code:throw new n.JsonRpcVersionUnsupportedError(S);case n.UserRejectedRequestError.code:throw new n.UserRejectedRequestError(S);case n.UnauthorizedProviderError.code:throw new n.UnauthorizedProviderError(S);case n.UnsupportedProviderMethodError.code:throw new n.UnsupportedProviderMethodError(S);case n.ProviderDisconnectedError.code:throw new n.ProviderDisconnectedError(S);case n.ChainDisconnectedError.code:throw new n.ChainDisconnectedError(S);case n.SwitchChainError.code:throw new n.SwitchChainError(S);case n.UnsupportedNonOptionalCapabilityError.code:throw new n.UnsupportedNonOptionalCapabilityError(S);case n.UnsupportedChainIdError.code:throw new n.UnsupportedChainIdError(S);case n.DuplicateIdError.code:throw new n.DuplicateIdError(S);case n.UnknownBundleIdError.code:throw new n.UnknownBundleIdError(S);case n.BundleTooLargeError.code:throw new n.BundleTooLargeError(S);case n.AtomicReadyWalletRejectedUpgradeError.code:throw new n.AtomicReadyWalletRejectedUpgradeError(S);case n.AtomicityNotSupportedError.code:throw new n.AtomicityNotSupportedError(S);case 5e3:throw new n.UserRejectedRequestError(S);case n.WalletConnectSessionSettlementError.code:throw new n.WalletConnectSessionSettlementError(S);default:throw p instanceof e.BaseError?p:new n.UnknownRpcError(S)}}},{delay:({count:p,error:S})=>{var A;if(S&&S instanceof r.HttpRequestError){const T=(A=S==null?void 0:S.headers)==null?void 0:A.get("Retry-After");if(T!=null&&T.match(/\d/))return Number.parseInt(T,10)*1e3}return~~(1<<p)*v},retryCount:_,signal:g,shouldRetry:({error:p})=>c(p)}),{enabled:h,id:w})}}function c(l){return(0,t.isAbortError)(l)?!1:"code"in l&&typeof l.code=="number"?l.code===-1||l.code===n.LimitExceededRpcError.code||l.code===n.InternalRpcError.code||l.code===429:l instanceof r.HttpRequestError&&l.status?l.status===403||l.status===408||l.status===413||l.status===429||l.status===500||l.status===502||l.status===503||l.status===504:!0}function u(l,f=0){let m=3735928559^f,y=1103547991^f;for(let h=0;h<l.length;h++){const b=l.charCodeAt(h);m=Math.imul(m^b,2654435761),y=Math.imul(y^b,1597334677)}return m=Math.imul(m^m>>>16,2246822507),m^=Math.imul(y^y>>>16,3266489909),y=Math.imul(y^y>>>16,2246822507),y^=Math.imul(m^m>>>16,3266489909),(4294967296*(2097151&y)+(m>>>0)).toString(36)}return Oo}var Bs={},$m;function Vg(){if($m)return Bs;$m=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.ccipReadTunnel=c;const e=kt(),r=zu(),n=pt(),t=Go(),o=Rt(),s=Le(),i=Xu(),a=ai();function c({batchGateways:u,ccipRequest:l=i.ccipRequest}){return{async request({data:f,sender:m,urls:y}){if(y.includes(a.localBatchGatewayUrl))return l({data:f,sender:m,urls:u});{const[h,b]=(0,o.decodeFunctionResult)({abi:e.batchGatewayAbi,functionName:"query",data:await l({data:(0,s.encodeFunctionData)({abi:e.batchGatewayAbi,functionName:"query",args:[[{sender:m,data:f,urls:y}]]}),sender:m,urls:u})});if(h[0]){let v;try{const _=(0,t.decodeErrorResult)({abi:[...e.batchGatewayAbi,r.solidityError],data:b[0]});if(_.errorName==="HttpError")v=new n.HttpRequestError({body:{message:_.args[1]},status:_.args[0],url:y.join(" | ")});else{const g=_.args[0];g&&(v=new Error(g))}}catch{}throw v??new Error("An unknown error occurred.")}return b[0]}}}}return Bs}var Co={},zm;function Wg(){if(zm)return Co;zm=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.defineChain=e,Co.extendSchema=r;function e(n){const t={formatters:void 0,fees:void 0,serializers:void 0,...n};function o(s){return i=>{const a=typeof i=="function"?i(s):i,c={...s,...a};return Object.assign(c,{extend:o(c)})}}return Object.assign(t,{extend:o(t)})}function r(){return{}}return Co}var Os={},Um;function Kg(){if(Um)return Os;Um=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.extractChain=e;function e({chains:r,id:n}){return r.find(t=>t.id===n)}return Os}var Cs={},Lm;function $f(){if(Lm)return Cs;Lm=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.fromRlp=s;const e=ue(),r=Sn(),n=Do(),t=Ee(),o=oe();function s(u,l="hex"){const f=(()=>{if(typeof u=="string"){if(u.length>3&&u.length%2!==0)throw new r.InvalidHexValueError(u);return(0,t.hexToBytes)(u)}return u})(),m=(0,n.createCursor)(f,{recursiveReadLimit:Number.POSITIVE_INFINITY});return i(m,l)}function i(u,l="hex"){if(u.bytes.length===0)return l==="hex"?(0,o.bytesToHex)(u.bytes):u.bytes;const f=u.readByte();if(f<128&&u.decrementPosition(1),f<192){const y=a(u,f,128),h=u.readBytes(y);return l==="hex"?(0,o.bytesToHex)(h):h}const m=a(u,f,192);return c(u,m,l)}function a(u,l,f){if(f===128&&l<128)return 1;if(l<=f+55)return l-f;if(l===f+55+1)return u.readUint8();if(l===f+55+2)return u.readUint16();if(l===f+55+3)return u.readUint24();if(l===f+55+4)return u.readUint32();throw new e.BaseError("Invalid RLP prefix")}function c(u,l,f){const m=u.position,y=[];for(;u.position-m<l;)y.push(i(u,f));return y}return Cs}var xs={},Dm;function zf(){if(Dm)return xs;Dm=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.isHash=n;const e=Ze(),r=Ue();function n(t){return(0,e.isHex)(t)&&(0,r.size)(t)===32}return xs}var qs={},kr={},Ve={},Gm;function P6(){if(Gm)return Ve;Gm=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ripemd160=Ve.RIPEMD160=Ve.md5=Ve.MD5=Ve.sha1=Ve.SHA1=void 0;const e=lg(),r=hr(),n=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),t=new Uint32Array(80);class o extends e.HashMD{constructor(){super(64,20,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0}get(){const{A,B:T,C,D:I,E:R}=this;return[A,T,C,I,R]}set(A,T,C,I,R){this.A=A|0,this.B=T|0,this.C=C|0,this.D=I|0,this.E=R|0}process(A,T){for(let H=0;H<16;H++,T+=4)t[H]=A.getUint32(T,!1);for(let H=16;H<80;H++)t[H]=(0,r.rotl)(t[H-3]^t[H-8]^t[H-14]^t[H-16],1);let{A:C,B:I,C:R,D:q,E:F}=this;for(let H=0;H<80;H++){let j,k;H<20?(j=(0,e.Chi)(I,R,q),k=1518500249):H<40?(j=I^R^q,k=1859775393):H<60?(j=(0,e.Maj)(I,R,q),k=2400959708):(j=I^R^q,k=3395469782);const B=(0,r.rotl)(C,5)+j+F+k+t[H]|0;F=q,q=R,R=(0,r.rotl)(I,30),I=C,C=B}C=C+this.A|0,I=I+this.B|0,R=R+this.C|0,q=q+this.D|0,F=F+this.E|0,this.set(C,I,R,q,F)}roundClean(){(0,r.clean)(t)}destroy(){this.set(0,0,0,0,0),(0,r.clean)(this.buffer)}}Ve.SHA1=o,Ve.sha1=(0,r.createHasher)(()=>new o);const s=Math.pow(2,32),i=Array.from({length:64},(S,A)=>Math.floor(s*Math.abs(Math.sin(A+1)))),a=n.slice(0,4),c=new Uint32Array(16);class u extends e.HashMD{constructor(){super(64,16,8,!0),this.A=a[0]|0,this.B=a[1]|0,this.C=a[2]|0,this.D=a[3]|0}get(){const{A,B:T,C,D:I}=this;return[A,T,C,I]}set(A,T,C,I){this.A=A|0,this.B=T|0,this.C=C|0,this.D=I|0}process(A,T){for(let F=0;F<16;F++,T+=4)c[F]=A.getUint32(T,!0);let{A:C,B:I,C:R,D:q}=this;for(let F=0;F<64;F++){let H,j,k;F<16?(H=(0,e.Chi)(I,R,q),j=F,k=[7,12,17,22]):F<32?(H=(0,e.Chi)(q,I,R),j=(5*F+1)%16,k=[5,9,14,20]):F<48?(H=I^R^q,j=(3*F+5)%16,k=[4,11,16,23]):(H=R^(I|~q),j=7*F%16,k=[6,10,15,21]),H=H+C+i[F]+c[j],C=q,q=R,R=I,I=I+(0,r.rotl)(H,k[F%4])}C=C+this.A|0,I=I+this.B|0,R=R+this.C|0,q=q+this.D|0,this.set(C,I,R,q)}roundClean(){(0,r.clean)(c)}destroy(){this.set(0,0,0,0),(0,r.clean)(this.buffer)}}Ve.MD5=u,Ve.md5=(0,r.createHasher)(()=>new u);const l=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),f=Uint8Array.from(new Array(16).fill(0).map((S,A)=>A)),m=f.map(S=>(9*S+5)%16),y=(()=>{const T=[[f],[m]];for(let C=0;C<4;C++)for(let I of T)I.push(I[C].map(R=>l[R]));return T})(),h=y[0],b=y[1],v=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(S=>Uint8Array.from(S)),_=h.map((S,A)=>S.map(T=>v[A][T])),g=b.map((S,A)=>S.map(T=>v[A][T])),P=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),d=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function w(S,A,T,C){return S===0?A^T^C:S===1?A&T|~A&C:S===2?(A|~T)^C:S===3?A&C|T&~C:A^(T|~C)}const E=new Uint32Array(16);class p extends e.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:A,h1:T,h2:C,h3:I,h4:R}=this;return[A,T,C,I,R]}set(A,T,C,I,R){this.h0=A|0,this.h1=T|0,this.h2=C|0,this.h3=I|0,this.h4=R|0}process(A,T){for(let x=0;x<16;x++,T+=4)E[x]=A.getUint32(T,!0);let C=this.h0|0,I=C,R=this.h1|0,q=R,F=this.h2|0,H=F,j=this.h3|0,k=j,B=this.h4|0,O=B;for(let x=0;x<5;x++){const M=4-x,N=P[x],z=d[x],$=h[x],U=b[x],G=_[x],J=g[x];for(let K=0;K<16;K++){const V=(0,r.rotl)(C+w(x,R,F,j)+E[$[K]]+N,G[K])+B|0;C=B,B=j,j=(0,r.rotl)(F,10)|0,F=R,R=V}for(let K=0;K<16;K++){const V=(0,r.rotl)(I+w(M,q,H,k)+E[U[K]]+z,J[K])+O|0;I=O,O=k,k=(0,r.rotl)(H,10)|0,H=q,q=V}}this.set(this.h1+F+k|0,this.h2+j+O|0,this.h3+B+I|0,this.h4+C+q|0,this.h0+R+H|0)}roundClean(){(0,r.clean)(E)}destroy(){this.destroyed=!0,(0,r.clean)(this.buffer),this.set(0,0,0,0,0)}}return Ve.RIPEMD160=p,Ve.ripemd160=(0,r.createHasher)(()=>new p),Ve}var Vm;function Zg(){if(Vm)return kr;Vm=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.ripemd160=kr.RIPEMD160=void 0;const e=P6();return kr.RIPEMD160=e.RIPEMD160,kr.ripemd160=e.ripemd160,kr}var Wm;function Jg(){if(Wm)return qs;Wm=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.ripemd160=o;const e=Zg(),r=Ze(),n=Ee(),t=oe();function o(s,i){const a=i||"hex",c=(0,e.ripemd160)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return qs}var Jd={},Km;function Yg(){return Km||(Km=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventHash=void 0;var r=Fu();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(Jd)),Jd}var Yd={},Zm;function Xg(){return Zm||(Zm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventSignature=void 0;var r=sf();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return r.toSignature}})})(Yd)),Yd}var Xd={},Jm;function Qg(){return Jm||(Jm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionHash=void 0;var r=Fu();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(Xd)),Xd}var Qd={},Ym;function e_(){return Ym||(Ym=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionSignature=void 0;var r=sf();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return r.toSignature}})})(Qd)),Qd}var Hr={},Xm;function t_(){if(Xm)return Hr;Xm=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.nonceManager=void 0,Hr.createNonceManager=n,Hr.jsonRpc=t;const e=Vu(),r=Wr();function n(o){const{source:s}=o,i=new Map,a=new r.LruMap(8192),c=new Map,u=({address:f,chainId:m})=>`${f}.${m}`,l=f=>{i.delete(f),c.delete(f)};return{async consume({address:f,chainId:m,client:y}){const h=u({address:f,chainId:m}),b=this.get({address:f,chainId:m,client:y});this.increment({address:f,chainId:m});const v=await b;return await s.set({address:f,chainId:m},v),a.set(h,v),v},async increment({address:f,chainId:m}){const y=u({address:f,chainId:m}),h=i.get(y)??0;i.set(y,h+1)},async get({address:f,chainId:m,client:y}){const h=u({address:f,chainId:m});let b=c.get(h);return b||(b=(async()=>{try{const _=await s.get({address:f,chainId:m,client:y}),g=a.get(h)??0;return g>0&&_<=g?g+1:(a.delete(h),_)}finally{l(h)}})(),c.set(h,b)),(i.get(h)??0)+await b},reset({address:f,chainId:m}){const y=u({address:f,chainId:m});a.delete(y),l(y)}}}function t(){return{async get(o){const{address:s,client:i}=o;return(0,e.getTransactionCount)(i,{address:s,blockTag:"pending"})},set(){}}}return Hr.nonceManager=n({source:t()}),Hr}var gn={},xo={},Ms={},Qm;function Uf(){if(Qm)return Ms;Qm=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.withTimeout=r;const e=xt();function r(n,{errorInstance:t=new Error("timed out"),timeout:o,signal:s}){return new Promise((i,a)=>{(async()=>{let c;const u=new AbortController;try{o>0&&(c=setTimeout(()=>{s?u.abort():a(t)},o)),i(await n({signal:(u==null?void 0:u.signal)||null}))}catch(l){if(u!=null&&u.signal.aborted&&(0,e.isAbortError)(l)){a(t);return}a(l)}finally{clearTimeout(c)}})()})}return Ms}var qo={},eh;function r_(){if(eh)return qo;eh=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.idCache=void 0;function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}return qo.idCache=e(),qo}var th;function Lf(){if(th)return xo;th=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.getHttpRpcClient=s,xo.parseUrl=i;const e=pt(),r=xt(),n=Uf(),t=Fe(),o=r_();function s(a,c={}){const{url:u,headers:l}=i(a);return{async request(f){var w,E,p;const{body:m,fetchFn:y=c.fetchFn??fetch,onRequest:h=c.onRequest,onResponse:b=c.onResponse,timeout:v=c.timeout??1e4}=f,_={...c.fetchOptions??{},...f.fetchOptions??{}},{headers:g,method:P,signal:d}=_;try{const S=await(0,n.withTimeout)(async({signal:T})=>{const C={..._,body:Array.isArray(m)?(0,t.stringify)(m.map(F=>({jsonrpc:"2.0",id:F.id??o.idCache.take(),...F}))):(0,t.stringify)({jsonrpc:"2.0",id:m.id??o.idCache.take(),...m}),headers:{...l,"Content-Type":"application/json",...g},method:P||"POST",signal:d||(v>0?T:null)},I=new Request(u,C),R=await(h==null?void 0:h(I,C))??{...C,url:u};return await y(R.url??u,R)},{errorInstance:new e.TimeoutError({body:m,url:u}),timeout:v,signal:!0});b&&await b(S);let A;if((w=S.headers.get("Content-Type"))!=null&&w.startsWith("application/json"))A=await S.json();else{A=await S.text();try{A=JSON.parse(A||"{}")}catch(T){if(S.ok)throw T;A={error:A}}}if(!S.ok){if(typeof((E=A.error)==null?void 0:E.code)=="number"&&typeof((p=A.error)==null?void 0:p.message)=="string")return A;throw new e.HttpRequestError({body:m,details:(0,t.stringify)(A.error)||S.statusText,headers:S.headers,status:S.status,url:u})}return A}catch(S){throw d!=null&&d.aborted?(0,r.getAbortError)(d):(0,r.isAbortError)(S)||S instanceof e.HttpRequestError||S instanceof e.TimeoutError?S:new e.HttpRequestError({body:m,cause:S,url:u})}}}}function i(a){try{const c=new URL(a),u=(()=>{if(c.username){const l=`${decodeURIComponent(c.username)}:${decodeURIComponent(c.password)}`;return c.username="",c.password="",{url:c.toString(),headers:{Authorization:`Basic ${btoa(l)}`}}}})();return{url:c.toString(),...u}}catch{return{url:a}}}return xo}var ks={},ef={},rh;function n_(){return rh||(rh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.socketClientCache=void 0,e.getSocketRpcClient=s;const r=pt(),n=Pf(),t=Uf(),o=r_();e.socketClientCache=new Map;async function s(i){const{getSocket:a,keepAlive:c=!0,key:u="socket",reconnect:l=!0,url:f}=i,{interval:m=3e4}=typeof c=="object"?c:{},{attempts:y=5,delay:h=2e3}=typeof l=="object"?l:{},b=JSON.stringify({keepAlive:c,key:u,url:f,reconnect:l});let v=e.socketClientCache.get(b);if(v)return v;let _=0;const{schedule:g}=(0,n.createBatchScheduler)({id:b,fn:async()=>{const w=new Map,E=new Map;let p,S,A,T,C=!1,I=!1;function R(){if(l&&!I&&_<y){if(C)return;C=!0,_++,S==null||S.close(),T=setTimeout(async()=>{if(T=void 0,I){C=!1;return}await q().catch(console.error),C=!1},h)}else w.clear(),E.clear()}async function q(){const F=await a({onClose(){var H,j;for(const k of w.values())(H=k.onError)==null||H.call(k,new r.SocketClosedError({url:f}));for(const k of E.values())(j=k.onError)==null||j.call(k,new r.SocketClosedError({url:f}));R()},onError(H){var j,k;p=H;for(const B of w.values())(j=B.onError)==null||j.call(B,p);for(const B of E.values())(k=B.onError)==null||k.call(B,p);R()},onOpen(){p=void 0,_=0},onResponse(H){const j=H.method==="eth_subscription",k=j?H.params.subscription:H.id,B=j?E:w,O=B.get(k);O&&O.onResponse(H),j||B.delete(k)}});if(I)return F.close(),F;if(S=F,c&&(A&&clearInterval(A),A=setInterval(()=>{var H;return(H=S.ping)==null?void 0:H.call(S)},m)),l&&E.size>0){const H=E.entries();for(const[j,{onResponse:k,body:B,onError:O}]of H)B&&(E.delete(j),v==null||v.request({body:B,onResponse:k,onError:O}))}return F}return await q(),p=void 0,v={close(){I=!0,A&&clearInterval(A),T&&(clearTimeout(T),T=void 0,C=!1),S.close(),e.socketClientCache.delete(b)},get socket(){return S},request({body:F,onError:H,onResponse:j}){var O;p&&H&&H(p);const k=F.id??o.idCache.take(),B=x=>{typeof x.id=="number"&&k!==x.id||(F.method==="eth_subscribe"&&typeof x.result=="string"&&E.set(x.result,{onResponse:B,onError:H,body:F}),j(x))};F.method==="eth_unsubscribe"&&E.delete((O=F.params)==null?void 0:O[0]),w.set(k,{onResponse:B,onError:H});try{S.request({body:{jsonrpc:"2.0",id:k,...F}})}catch(x){H==null||H(x)}},requestAsync({body:F,timeout:H=1e4}){return(0,t.withTimeout)(()=>new Promise((j,k)=>this.request({body:F,onError:k,onResponse:j})),{errorInstance:new r.TimeoutError({body:F,url:f}),timeout:H})},requests:w,subscriptions:E,url:f},e.socketClientCache.set(b,v),[v]}}),[P,[d]]=await g();return d}})(ef)),ef}const A6=Ev(Iv);var nh;function Df(){if(nh)return ks;nh=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.getWebSocketRpcClient=n;const e=pt(),r=n_();async function n(t,o={}){const{keepAlive:s,reconnect:i}=o;return(0,r.getSocketRpcClient)({async getSocket({onClose:a,onError:c,onOpen:u,onResponse:l}){const f=await Promise.resolve().then(()=>A6).then(v=>v.WebSocket),m=new f(t);function y(){m.removeEventListener("close",y),m.removeEventListener("message",h),m.removeEventListener("error",c),m.removeEventListener("open",u),a()}function h({data:v}){if(!(typeof v=="string"&&v.trim().length===0))try{const _=JSON.parse(v);l(_)}catch(_){c(_)}}m.addEventListener("close",y),m.addEventListener("message",h),m.addEventListener("error",c),m.addEventListener("open",u),m.readyState===f.CONNECTING&&await new Promise((v,_)=>{m&&(m.onopen=v,m.onerror=_)});const{close:b}=m;return Object.assign(m,{close(){b.bind(m)(),y()},ping(){try{if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({url:m.url,cause:new e.SocketClosedError({url:m.url})});const v={jsonrpc:"2.0",id:null,method:"net_version",params:[]};m.send(JSON.stringify(v))}catch(v){c(v)}},request({body:v}){if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({body:v,url:m.url,cause:new e.SocketClosedError({url:m.url})});return m.send(JSON.stringify(v))}})},keepAlive:s,reconnect:i,url:t})}return ks}var oh;function o_(){if(oh)return gn;oh=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.rpc=void 0,gn.getSocket=o;const e=Lf(),r=Df();function n(s,{body:i,onError:a,onResponse:c}){return s.request({body:i,onError:a,onResponse:c}),s}async function t(s,{body:i,timeout:a=1e4}){return s.requestAsync({body:i,timeout:a})}async function o(s){const i=await(0,r.getWebSocketRpcClient)(s);return Object.assign(i.socket,{requests:i.requests,subscriptions:i.subscriptions})}return gn.rpc={http(s,i){return(0,e.getHttpRpcClient)(s).request(i)},webSocket:n,webSocketAsync:t},gn}var Hs={},Fs={},Mo={},ih;function i_(){return ih||(ih=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.presignMessagePrefix=void 0,Mo.presignMessagePrefix=`Ethereum Signed Message:
45
+ `),Mo}var ah;function a_(){if(ah)return Fs;ah=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.toPrefixedMessage=o;const e=i_(),r=qe(),n=Ue(),t=oe();function o(s){const i=typeof s=="string"?(0,t.stringToHex)(s):typeof s.raw=="string"?s.raw:(0,t.bytesToHex)(s.raw),a=(0,t.stringToHex)(`${e.presignMessagePrefix}${(0,n.size)(i)}`);return(0,r.concat)([a,i])}return Fs}var sh;function ui(){if(sh)return Hs;sh=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.hashMessage=n;const e=tt(),r=a_();function n(t,o){return(0,e.keccak256)((0,r.toPrefixedMessage)(t),o)}return Hs}var Fr={},Nr={},Xt={},ch;function s_(){if(ch)return Xt;ch=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.InvalidStructTypeError=Xt.InvalidPrimaryTypeError=Xt.InvalidDomainError=void 0;const e=Fe(),r=ue();class n extends r.BaseError{constructor({domain:i}){super(`Invalid domain "${(0,e.stringify)(i)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}Xt.InvalidDomainError=n;class t extends r.BaseError{constructor({primaryType:i,types:a}){super(`Invalid primary type \`${i}\` must be one of \`${JSON.stringify(Object.keys(a))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}Xt.InvalidPrimaryTypeError=t;class o extends r.BaseError{constructor({type:i}){super(`Struct type "${i}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}return Xt.InvalidStructTypeError=o,Xt}var uh;function ad(){if(uh)return Nr;uh=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.serializeTypedData=u,Nr.validateTypedData=l,Nr.getTypesForEIP712Domain=f,Nr.domainSeparator=m;const e=Se(),r=At(),n=s_(),t=rt(),o=Ue(),s=oe(),i=Nu(),a=di(),c=Fe();function u(h){const{domain:b,message:v,primaryType:_,types:g}=h,P=(E,p)=>{const S={...p};for(const A of E){const{name:T,type:C}=A;C==="address"&&(S[T]=S[T].toLowerCase())}return S},d=g.EIP712Domain?b?P(g.EIP712Domain,b):{}:{},w=(()=>{if(_!=="EIP712Domain")return P(g[_],v)})();return(0,c.stringify)({domain:d,message:w,primaryType:_,types:g})}function l(h){const{domain:b,message:v,primaryType:_,types:g}=h,P=(d,w)=>{for(const E of d){const{name:p,type:S}=E,A=w[p],T=S.match(i.integerRegex);if(T&&(typeof A=="number"||typeof A=="bigint")){const[R,q,F]=T;(0,s.numberToHex)(A,{signed:q==="int",size:Number.parseInt(F,10)/8})}if(S==="address"&&typeof A=="string"&&!(0,t.isAddress)(A))throw new r.InvalidAddressError({address:A});const C=S.match(i.bytesRegex);if(C){const[R,q]=C;if(q&&(0,o.size)(A)!==Number.parseInt(q,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(q,10),givenSize:(0,o.size)(A)})}const I=g[S];I&&(y(S),P(I,A))}};if(g.EIP712Domain&&b){if(typeof b!="object")throw new n.InvalidDomainError({domain:b});P(g.EIP712Domain,b)}if(_!=="EIP712Domain")if(g[_])P(g[_],v);else throw new n.InvalidPrimaryTypeError({primaryType:_,types:g})}function f({domain:h}){return[typeof(h==null?void 0:h.name)=="string"&&{name:"name",type:"string"},(h==null?void 0:h.version)&&{name:"version",type:"string"},(typeof(h==null?void 0:h.chainId)=="number"||typeof(h==null?void 0:h.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(h==null?void 0:h.verifyingContract)&&{name:"verifyingContract",type:"address"},(h==null?void 0:h.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function m({domain:h}){return(0,a.hashDomain)({domain:h,types:{EIP712Domain:f({domain:h})}})}function y(h){if(h==="address"||h==="bool"||h==="string"||h.startsWith("bytes")||h.startsWith("uint")||h.startsWith("int"))throw new n.InvalidStructTypeError({type:h})}return Nr}var dh;function di(){if(dh)return Fr;dh=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.hashTypedData=s,Fr.hashDomain=i,Fr.hashStruct=a,Fr.encodeType=l;const e=Tt(),r=qe(),n=oe(),t=tt(),o=ad();function s(y){const{domain:h={},message:b,primaryType:v}=y,_={EIP712Domain:(0,o.getTypesForEIP712Domain)({domain:h}),...y.types};(0,o.validateTypedData)({domain:h,message:b,primaryType:v,types:_});const g=["0x1901"];return h&&g.push(i({domain:h,types:_})),v!=="EIP712Domain"&&g.push(a({data:b,primaryType:v,types:_})),(0,t.keccak256)((0,r.concat)(g))}function i({domain:y,types:h}){return a({data:y,primaryType:"EIP712Domain",types:h})}function a({data:y,primaryType:h,types:b}){const v=c({data:y,primaryType:h,types:b});return(0,t.keccak256)(v)}function c({data:y,primaryType:h,types:b}){const v=[{type:"bytes32"}],_=[u({primaryType:h,types:b})];for(const g of b[h]){const[P,d]=m({types:b,name:g.name,type:g.type,value:y[g.name]});v.push(P),_.push(d)}return(0,e.encodeAbiParameters)(v,_)}function u({primaryType:y,types:h}){const b=(0,n.toHex)(l({primaryType:y,types:h}));return(0,t.keccak256)(b)}function l({primaryType:y,types:h}){let b="";const v=f({primaryType:y,types:h});v.delete(y);const _=[y,...Array.from(v).sort()];for(const g of _)b+=`${g}(${h[g].map(({name:P,type:d})=>`${d} ${P}`).join(",")})`;return b}function f({primaryType:y,types:h},b=new Set){const v=y.match(/^\w*/u),_=v==null?void 0:v[0];if(b.has(_)||h[_]===void 0)return b;b.add(_);for(const g of h[_])f({primaryType:g.type,types:h},b);return b}function m({types:y,name:h,type:b,value:v}){if(y[b]!==void 0)return[{type:"bytes32"},(0,t.keccak256)(c({data:v,primaryType:b,types:y}))];if(b==="bytes")return[{type:"bytes32"},(0,t.keccak256)(v)];if(b==="string")return[{type:"bytes32"},(0,t.keccak256)((0,n.toHex)(v))];if(b.lastIndexOf("]")===b.length-1){const _=b.slice(0,b.lastIndexOf("[")),g=v.map(P=>m({name:h,type:_,types:y,value:P}));return[{type:"bytes32"},(0,t.keccak256)((0,e.encodeAbiParameters)(g.map(([P])=>P),g.map(([,P])=>P)))]}return[{type:b},v]}return Fr}var Ns={},$r={},fh;function Gf(){return fh||(fh=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.zeroHash=$r.erc6492MagicBytes=void 0,$r.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",$r.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),$r}var lh;function Vf(){if(lh)return Ns;lh=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.isErc6492Signature=n;const e=Gf(),r=ft();function n(t){return(0,r.sliceHex)(t,-32)===e.erc6492MagicBytes}return Ns}var $s={},ko={},tf={},Ae={},We={},_n={},Ho={},bh;function T6(){if(bh)return Ho;bh=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}return Ho.LruMap=e,Ho}var mh;function S6(){if(mh)return _n;mh=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.checksum=void 0,_n.clear=n;const e=T6(),r={checksum:new e.LruMap(8192)};_n.checksum=r.checksum;function n(){for(const t of Object.values(r))t.clear()}return _n}var fr={},hh;function Wf(){if(hh)return fr;hh=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.keccak256=i,fr.hmac256=a,fr.ripemd160=c,fr.sha256=u,fr.validate=l;const e=mg(),r=Zg(),n=sg(),t=Eg(),o=Mt(),s=Ne();function i(f,m={}){const{as:y=typeof f=="string"?"Hex":"Bytes"}=m,h=(0,n.keccak_256)(o.from(f));return y==="Bytes"?h:s.fromBytes(h)}function a(f,m,y={}){const{as:h=typeof m=="string"?"Hex":"Bytes"}=y,b=(0,e.hmac)(t.sha256,o.from(f),o.from(m));return h==="Bytes"?b:s.fromBytes(b)}function c(f,m={}){const{as:y=typeof f=="string"?"Hex":"Bytes"}=m,h=(0,r.ripemd160)(o.from(f));return y==="Bytes"?h:s.fromBytes(h)}function u(f,m={}){const{as:y=typeof f=="string"?"Hex":"Bytes"}=m,h=(0,t.sha256)(o.from(f));return y==="Bytes"?h:s.fromBytes(h)}function l(f){return s.validate(f)&&s.size(f)===32}return fr}var Oe={},yh;function c_(){if(yh)return Oe;yh=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.InvalidSerializedSizeError=Oe.InvalidUncompressedPrefixError=Oe.InvalidCompressedPrefixError=Oe.InvalidPrefixError=Oe.InvalidError=void 0,Oe.assert=o,Oe.compress=s,Oe.from=i,Oe.fromBytes=a,Oe.fromHex=c,Oe.toBytes=u,Oe.toHex=l,Oe.validate=f;const e=Mt(),r=lt(),n=Ne(),t=Yu();function o(_,g={}){const{compressed:P}=g,{prefix:d,x:w,y:E}=_;if(P===!1||typeof w=="bigint"&&typeof E=="bigint"){if(d!==4)throw new y({prefix:d,cause:new b});return}if(P===!0||typeof w=="bigint"&&typeof E>"u"){if(d!==3&&d!==2)throw new y({prefix:d,cause:new h});return}throw new m({publicKey:_})}function s(_){const{x:g,y:P}=_;return{prefix:P%2n===0n?2:3,x:g}}function i(_){const g=(()=>{if(n.validate(_))return c(_);if(e.validate(_))return a(_);const{prefix:P,x:d,y:w}=_;return typeof d=="bigint"&&typeof w=="bigint"?{prefix:P??4,x:d,y:w}:{prefix:P,x:d}})();return o(g),g}function a(_){return c(n.fromBytes(_))}function c(_){if(_.length!==132&&_.length!==130&&_.length!==68)throw new v({publicKey:_});if(_.length===130){const d=BigInt(n.slice(_,0,32)),w=BigInt(n.slice(_,32,64));return{prefix:4,x:d,y:w}}if(_.length===132){const d=Number(n.slice(_,0,1)),w=BigInt(n.slice(_,1,33)),E=BigInt(n.slice(_,33,65));return{prefix:d,x:w,y:E}}const g=Number(n.slice(_,0,1)),P=BigInt(n.slice(_,1,33));return{prefix:g,x:P}}function u(_,g={}){return e.fromHex(l(_,g))}function l(_,g={}){o(_);const{prefix:P,x:d,y:w}=_,{includePrefix:E=!0}=g;return n.concat(E?n.fromNumber(P,{size:1}):"0x",n.fromNumber(d,{size:32}),typeof w=="bigint"?n.fromNumber(w,{size:32}):"0x")}function f(_,g={}){try{return o(_,g),!0}catch{return!1}}class m extends r.BaseError{constructor({publicKey:g}){super(`Value \`${t.stringify(g)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}Oe.InvalidError=m;class y extends r.BaseError{constructor({prefix:g,cause:P}){super(`Prefix "${g}" is invalid.`,{cause:P}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}Oe.InvalidPrefixError=y;class h extends r.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}Oe.InvalidCompressedPrefixError=h;class b extends r.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}Oe.InvalidUncompressedPrefixError=b;class v extends r.BaseError{constructor({publicKey:g}){super(`Value \`${g}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${n.size(n.from(g))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}return Oe.InvalidSerializedSizeError=v,Oe}var ph;function sd(){if(ph)return We;ph=1,Object.defineProperty(We,"__esModule",{value:!0}),We.InvalidChecksumError=We.InvalidInputError=We.InvalidAddressError=void 0,We.assert=i,We.checksum=a,We.from=c,We.fromPublicKey=u,We.isEqual=l,We.validate=f;const e=Mt(),r=S6(),n=lt(),t=Wf(),o=c_(),s=/^0x[a-fA-F0-9]{40}$/;function i(b,v={}){const{strict:_=!0}=v;if(!s.test(b))throw new m({address:b,cause:new y});if(_){if(b.toLowerCase()===b)return;if(a(b)!==b)throw new m({address:b,cause:new h})}}function a(b){if(r.checksum.has(b))return r.checksum.get(b);i(b,{strict:!1});const v=b.substring(2).toLowerCase(),_=t.keccak256(e.fromString(v),{as:"Bytes"}),g=v.split("");for(let d=0;d<40;d+=2)_[d>>1]>>4>=8&&g[d]&&(g[d]=g[d].toUpperCase()),(_[d>>1]&15)>=8&&g[d+1]&&(g[d+1]=g[d+1].toUpperCase());const P=`0x${g.join("")}`;return r.checksum.set(b,P),P}function c(b,v={}){const{checksum:_=!1}=v;return i(b),_?a(b):b}function u(b,v={}){const _=t.keccak256(`0x${o.toHex(b).slice(4)}`).substring(26);return c(`0x${_}`,v)}function l(b,v){return i(b,{strict:!1}),i(v,{strict:!1}),b.toLowerCase()===v.toLowerCase()}function f(b,v={}){const{strict:_=!0}=v??{};try{return i(b,{strict:_}),!0}catch{return!1}}class m extends n.BaseError{constructor({address:v,cause:_}){super(`Address "${v}" is invalid.`,{cause:_}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}We.InvalidAddressError=m;class y extends n.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}We.InvalidInputError=y;class h extends n.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}return We.InvalidChecksumError=h,We}var Te={},L={},gh;function Kf(){return gh||(gh=1,Object.defineProperty(L,"__esModule",{value:!0}),L.minInt120=L.minInt112=L.minInt104=L.minInt96=L.minInt88=L.minInt80=L.minInt72=L.minInt64=L.minInt56=L.minInt48=L.minInt40=L.minInt32=L.minInt24=L.minInt16=L.minInt8=L.maxInt256=L.maxInt248=L.maxInt240=L.maxInt232=L.maxInt224=L.maxInt216=L.maxInt208=L.maxInt200=L.maxInt192=L.maxInt184=L.maxInt176=L.maxInt168=L.maxInt160=L.maxInt152=L.maxInt144=L.maxInt136=L.maxInt128=L.maxInt120=L.maxInt112=L.maxInt104=L.maxInt96=L.maxInt88=L.maxInt80=L.maxInt72=L.maxInt64=L.maxInt56=L.maxInt48=L.maxInt40=L.maxInt32=L.maxInt24=L.maxInt16=L.maxInt8=L.integerRegex=L.bytesRegex=L.arrayRegex=void 0,L.maxUint256=L.maxUint248=L.maxUint240=L.maxUint232=L.maxUint224=L.maxUint216=L.maxUint208=L.maxUint200=L.maxUint192=L.maxUint184=L.maxUint176=L.maxUint168=L.maxUint160=L.maxUint152=L.maxUint144=L.maxUint136=L.maxUint128=L.maxUint120=L.maxUint112=L.maxUint104=L.maxUint96=L.maxUint88=L.maxUint80=L.maxUint72=L.maxUint64=L.maxUint56=L.maxUint48=L.maxUint40=L.maxUint32=L.maxUint24=L.maxUint16=L.maxUint8=L.minInt256=L.minInt248=L.minInt240=L.minInt232=L.minInt224=L.minInt216=L.minInt208=L.minInt200=L.minInt192=L.minInt184=L.minInt176=L.minInt168=L.minInt160=L.minInt152=L.minInt144=L.minInt136=L.minInt128=void 0,L.arrayRegex=/^(.*)\[([0-9]*)\]$/,L.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,L.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,L.maxInt8=2n**(8n-1n)-1n,L.maxInt16=2n**(16n-1n)-1n,L.maxInt24=2n**(24n-1n)-1n,L.maxInt32=2n**(32n-1n)-1n,L.maxInt40=2n**(40n-1n)-1n,L.maxInt48=2n**(48n-1n)-1n,L.maxInt56=2n**(56n-1n)-1n,L.maxInt64=2n**(64n-1n)-1n,L.maxInt72=2n**(72n-1n)-1n,L.maxInt80=2n**(80n-1n)-1n,L.maxInt88=2n**(88n-1n)-1n,L.maxInt96=2n**(96n-1n)-1n,L.maxInt104=2n**(104n-1n)-1n,L.maxInt112=2n**(112n-1n)-1n,L.maxInt120=2n**(120n-1n)-1n,L.maxInt128=2n**(128n-1n)-1n,L.maxInt136=2n**(136n-1n)-1n,L.maxInt144=2n**(144n-1n)-1n,L.maxInt152=2n**(152n-1n)-1n,L.maxInt160=2n**(160n-1n)-1n,L.maxInt168=2n**(168n-1n)-1n,L.maxInt176=2n**(176n-1n)-1n,L.maxInt184=2n**(184n-1n)-1n,L.maxInt192=2n**(192n-1n)-1n,L.maxInt200=2n**(200n-1n)-1n,L.maxInt208=2n**(208n-1n)-1n,L.maxInt216=2n**(216n-1n)-1n,L.maxInt224=2n**(224n-1n)-1n,L.maxInt232=2n**(232n-1n)-1n,L.maxInt240=2n**(240n-1n)-1n,L.maxInt248=2n**(248n-1n)-1n,L.maxInt256=2n**(256n-1n)-1n,L.minInt8=-(2n**(8n-1n)),L.minInt16=-(2n**(16n-1n)),L.minInt24=-(2n**(24n-1n)),L.minInt32=-(2n**(32n-1n)),L.minInt40=-(2n**(40n-1n)),L.minInt48=-(2n**(48n-1n)),L.minInt56=-(2n**(56n-1n)),L.minInt64=-(2n**(64n-1n)),L.minInt72=-(2n**(72n-1n)),L.minInt80=-(2n**(80n-1n)),L.minInt88=-(2n**(88n-1n)),L.minInt96=-(2n**(96n-1n)),L.minInt104=-(2n**(104n-1n)),L.minInt112=-(2n**(112n-1n)),L.minInt120=-(2n**(120n-1n)),L.minInt128=-(2n**(128n-1n)),L.minInt136=-(2n**(136n-1n)),L.minInt144=-(2n**(144n-1n)),L.minInt152=-(2n**(152n-1n)),L.minInt160=-(2n**(160n-1n)),L.minInt168=-(2n**(168n-1n)),L.minInt176=-(2n**(176n-1n)),L.minInt184=-(2n**(184n-1n)),L.minInt192=-(2n**(192n-1n)),L.minInt200=-(2n**(200n-1n)),L.minInt208=-(2n**(208n-1n)),L.minInt216=-(2n**(216n-1n)),L.minInt224=-(2n**(224n-1n)),L.minInt232=-(2n**(232n-1n)),L.minInt240=-(2n**(240n-1n)),L.minInt248=-(2n**(248n-1n)),L.minInt256=-(2n**(256n-1n)),L.maxUint8=2n**8n-1n,L.maxUint16=2n**16n-1n,L.maxUint24=2n**24n-1n,L.maxUint32=2n**32n-1n,L.maxUint40=2n**40n-1n,L.maxUint48=2n**48n-1n,L.maxUint56=2n**56n-1n,L.maxUint64=2n**64n-1n,L.maxUint72=2n**72n-1n,L.maxUint80=2n**80n-1n,L.maxUint88=2n**88n-1n,L.maxUint96=2n**96n-1n,L.maxUint104=2n**104n-1n,L.maxUint112=2n**112n-1n,L.maxUint120=2n**120n-1n,L.maxUint128=2n**128n-1n,L.maxUint136=2n**136n-1n,L.maxUint144=2n**144n-1n,L.maxUint152=2n**152n-1n,L.maxUint160=2n**160n-1n,L.maxUint168=2n**168n-1n,L.maxUint176=2n**176n-1n,L.maxUint184=2n**184n-1n,L.maxUint192=2n**192n-1n,L.maxUint200=2n**200n-1n,L.maxUint208=2n**208n-1n,L.maxUint216=2n**216n-1n,L.maxUint224=2n**224n-1n,L.maxUint232=2n**232n-1n,L.maxUint240=2n**240n-1n,L.maxUint248=2n**248n-1n,L.maxUint256=2n**256n-1n),L}var _h;function I6(){if(_h)return Te;_h=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.decodeParameter=i,Te.decodeAddress=u,Te.decodeArray=l,Te.decodeBool=f,Te.decodeBytes=m,Te.decodeNumber=y,Te.decodeTuple=h,Te.decodeString=b,Te.prepareParameters=v,Te.prepareParameter=_,Te.encode=g,Te.encodeAddress=P,Te.encodeArray=d,Te.encodeBytes=w,Te.encodeBoolean=E,Te.encodeNumber=p,Te.encodeString=S,Te.encodeTuple=A,Te.getArrayComponents=T,Te.hasDynamicChild=C;const e=fi(),r=sd(),n=Mt(),t=lt(),o=Ne(),s=Kf();function i(I,R,q){const{checksumAddress:F,staticPosition:H}=q,j=T(R.type);if(j){const[k,B]=j;return l(I,{...R,type:B},{checksumAddress:F,length:k,staticPosition:H})}if(R.type==="tuple")return h(I,R,{checksumAddress:F,staticPosition:H});if(R.type==="address")return u(I,{checksum:F});if(R.type==="bool")return f(I);if(R.type.startsWith("bytes"))return m(I,R,{staticPosition:H});if(R.type.startsWith("uint")||R.type.startsWith("int"))return y(I,R);if(R.type==="string")return b(I,{staticPosition:H});throw new e.InvalidTypeError(R.type)}const a=32,c=32;function u(I,R={}){const{checksum:q=!1}=R,F=I.readBytes(32);return[(j=>q?r.checksum(j):j)(o.fromBytes(n.slice(F,-20))),32]}function l(I,R,q){const{checksumAddress:F,length:H,staticPosition:j}=q;if(!H){const O=n.toNumber(I.readBytes(c)),x=j+O,M=x+a;I.setPosition(x);const N=n.toNumber(I.readBytes(a)),z=C(R);let $=0;const U=[];for(let G=0;G<N;++G){I.setPosition(M+(z?G*32:$));const[J,K]=i(I,R,{checksumAddress:F,staticPosition:M});$+=K,U.push(J)}return I.setPosition(j+32),[U,32]}if(C(R)){const O=n.toNumber(I.readBytes(c)),x=j+O,M=[];for(let N=0;N<H;++N){I.setPosition(x+N*32);const[z]=i(I,R,{checksumAddress:F,staticPosition:x});M.push(z)}return I.setPosition(j+32),[M,32]}let k=0;const B=[];for(let O=0;O<H;++O){const[x,M]=i(I,R,{checksumAddress:F,staticPosition:j+k});k+=M,B.push(x)}return[B,k]}function f(I){return[n.toBoolean(I.readBytes(32),{size:32}),32]}function m(I,R,{staticPosition:q}){const[F,H]=R.type.split("bytes");if(!H){const k=n.toNumber(I.readBytes(32));I.setPosition(q+k);const B=n.toNumber(I.readBytes(32));if(B===0)return I.setPosition(q+32),["0x",32];const O=I.readBytes(B);return I.setPosition(q+32),[o.fromBytes(O),32]}return[o.fromBytes(I.readBytes(Number.parseInt(H,10),32)),32]}function y(I,R){const q=R.type.startsWith("int"),F=Number.parseInt(R.type.split("int")[1]||"256",10),H=I.readBytes(32);return[F>48?n.toBigInt(H,{signed:q}):n.toNumber(H,{signed:q}),32]}function h(I,R,q){const{checksumAddress:F,staticPosition:H}=q,j=R.components.length===0||R.components.some(({name:O})=>!O),k=j?[]:{};let B=0;if(C(R)){const O=n.toNumber(I.readBytes(c)),x=H+O;for(let M=0;M<R.components.length;++M){const N=R.components[M];I.setPosition(x+B);const[z,$]=i(I,N,{checksumAddress:F,staticPosition:x});B+=$,k[j?M:N==null?void 0:N.name]=z}return I.setPosition(H+32),[k,32]}for(let O=0;O<R.components.length;++O){const x=R.components[O],[M,N]=i(I,x,{checksumAddress:F,staticPosition:H});k[j?O:x==null?void 0:x.name]=M,B+=N}return[k,B]}function b(I,{staticPosition:R}){const q=n.toNumber(I.readBytes(32)),F=R+q;I.setPosition(F);const H=n.toNumber(I.readBytes(32));if(H===0)return I.setPosition(R+32),["",32];const j=I.readBytes(H,32),k=n.toString(n.trimLeft(j));return I.setPosition(R+32),[k,32]}function v({checksumAddress:I,parameters:R,values:q}){const F=[];for(let H=0;H<R.length;H++)F.push(_({checksumAddress:I,parameter:R[H],value:q[H]}));return F}function _({checksumAddress:I=!1,parameter:R,value:q}){const F=R,H=T(F.type);if(H){const[j,k]=H;return d(q,{checksumAddress:I,length:j,parameter:{...F,type:k}})}if(F.type==="tuple")return A(q,{checksumAddress:I,parameter:F});if(F.type==="address")return P(q,{checksum:I});if(F.type==="bool")return E(q);if(F.type.startsWith("uint")||F.type.startsWith("int")){const j=F.type.startsWith("int"),[,,k="256"]=s.integerRegex.exec(F.type)??[];return p(q,{signed:j,size:Number(k)})}if(F.type.startsWith("bytes"))return w(q,{type:F.type});if(F.type==="string")return S(q);throw new e.InvalidTypeError(F.type)}function g(I){let R=0;for(let j=0;j<I.length;j++){const{dynamic:k,encoded:B}=I[j];k?R+=32:R+=o.size(B)}const q=[],F=[];let H=0;for(let j=0;j<I.length;j++){const{dynamic:k,encoded:B}=I[j];k?(q.push(o.fromNumber(R+H,{size:32})),F.push(B),H+=o.size(B)):q.push(B)}return o.concat(...q,...F)}function P(I,R){const{checksum:q=!1}=R;return r.assert(I,{strict:q}),{dynamic:!1,encoded:o.padLeft(I.toLowerCase())}}function d(I,R){const{checksumAddress:q,length:F,parameter:H}=R,j=F===null;if(!Array.isArray(I))throw new e.InvalidArrayError(I);if(!j&&I.length!==F)throw new e.ArrayLengthMismatchError({expectedLength:F,givenLength:I.length,type:`${H.type}[${F}]`});let k=!1;const B=[];for(let O=0;O<I.length;O++){const x=_({checksumAddress:q,parameter:H,value:I[O]});x.dynamic&&(k=!0),B.push(x)}if(j||k){const O=g(B);if(j){const x=o.fromNumber(B.length,{size:32});return{dynamic:!0,encoded:B.length>0?o.concat(x,O):x}}if(k)return{dynamic:!0,encoded:O}}return{dynamic:!1,encoded:o.concat(...B.map(({encoded:O})=>O))}}function w(I,{type:R}){const[,q]=R.split("bytes"),F=o.size(I);if(!q){let H=I;return F%32!==0&&(H=o.padRight(H,Math.ceil((I.length-2)/2/32)*32)),{dynamic:!0,encoded:o.concat(o.padLeft(o.fromNumber(F,{size:32})),H)}}if(F!==Number.parseInt(q,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(q,10),value:I});return{dynamic:!1,encoded:o.padRight(I)}}function E(I){if(typeof I!="boolean")throw new t.BaseError(`Invalid boolean value: "${I}" (type: ${typeof I}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:o.padLeft(o.fromBoolean(I))}}function p(I,{signed:R,size:q}){if(typeof q=="number"){const F=2n**(BigInt(q)-(R?1n:0n))-1n,H=R?-F-1n:0n;if(I>F||I<H)throw new o.IntegerOutOfRangeError({max:F.toString(),min:H.toString(),signed:R,size:q/8,value:I.toString()})}return{dynamic:!1,encoded:o.fromNumber(I,{size:32,signed:R})}}function S(I){const R=o.fromString(I),q=Math.ceil(o.size(R)/32),F=[];for(let H=0;H<q;H++)F.push(o.padRight(o.slice(R,H*32,(H+1)*32)));return{dynamic:!0,encoded:o.concat(o.padRight(o.fromNumber(o.size(R),{size:32})),...F)}}function A(I,R){const{checksumAddress:q,parameter:F}=R;let H=!1;const j=[];for(let k=0;k<F.components.length;k++){const B=F.components[k],O=Array.isArray(I)?k:B.name,x=_({checksumAddress:q,parameter:B,value:I[O]});j.push(x),x.dynamic&&(H=!0)}return{dynamic:H,encoded:H?g(j):o.concat(...j.map(({encoded:k})=>k))}}function T(I){const R=I.match(/^(.*)\[(\d+)?\]$/);return R?[R[2]?Number(R[2]):null,R[1]]:void 0}function C(I){var F;const{type:R}=I;if(R==="string"||R==="bytes"||R.endsWith("[]"))return!0;if(R==="tuple")return(F=I.components)==null?void 0:F.some(C);const q=T(I.type);return!!(q&&C({...I,type:q[1]}))}return Te}var Ct={},vh;function u_(){if(vh)return Ct;vh=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.RecursiveReadLimitExceededError=Ct.PositionOutOfBoundsError=Ct.NegativeOffsetError=void 0,Ct.create=n;const e=lt(),r={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(i){if(i<0||i>this.bytes.length-1)throw new o({length:this.bytes.length,position:i})},decrementPosition(i){if(i<0)throw new t({offset:i});const a=this.position-i;this.assertPosition(a),this.position=a},getReadCount(i){return this.positionReadCount.get(i||this.position)||0},incrementPosition(i){if(i<0)throw new t({offset:i});const a=this.position+i;this.assertPosition(a),this.position=a},inspectByte(i){const a=i??this.position;return this.assertPosition(a),this.bytes[a]},inspectBytes(i,a){const c=a??this.position;return this.assertPosition(c+i-1),this.bytes.subarray(c,c+i)},inspectUint8(i){const a=i??this.position;return this.assertPosition(a),this.bytes[a]},inspectUint16(i){const a=i??this.position;return this.assertPosition(a+1),this.dataView.getUint16(a)},inspectUint24(i){const a=i??this.position;return this.assertPosition(a+2),(this.dataView.getUint16(a)<<8)+this.dataView.getUint8(a+2)},inspectUint32(i){const a=i??this.position;return this.assertPosition(a+3),this.dataView.getUint32(a)},pushByte(i){this.assertPosition(this.position),this.bytes[this.position]=i,this.position++},pushBytes(i){this.assertPosition(this.position+i.length-1),this.bytes.set(i,this.position),this.position+=i.length},pushUint8(i){this.assertPosition(this.position),this.bytes[this.position]=i,this.position++},pushUint16(i){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,i),this.position+=2},pushUint24(i){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,i>>8),this.dataView.setUint8(this.position+2,i&255),this.position+=3},pushUint32(i){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,i),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const i=this.inspectByte();return this.position++,i},readBytes(i,a){this.assertReadLimit(),this._touch();const c=this.inspectBytes(i);return this.position+=a??i,c},readUint8(){this.assertReadLimit(),this._touch();const i=this.inspectUint8();return this.position+=1,i},readUint16(){this.assertReadLimit(),this._touch();const i=this.inspectUint16();return this.position+=2,i},readUint24(){this.assertReadLimit(),this._touch();const i=this.inspectUint24();return this.position+=3,i},readUint32(){this.assertReadLimit(),this._touch();const i=this.inspectUint32();return this.position+=4,i},get remaining(){return this.bytes.length-this.position},setPosition(i){const a=this.position;return this.assertPosition(i),this.position=i,()=>this.position=a},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const i=this.getReadCount();this.positionReadCount.set(this.position,i+1),i>0&&this.recursiveReadCount++}};function n(i,{recursiveReadLimit:a=8192}={}){const c=Object.create(r);return c.bytes=i,c.dataView=new DataView(i.buffer,i.byteOffset,i.byteLength),c.positionReadCount=new Map,c.recursiveReadLimit=a,c}class t extends e.BaseError{constructor({offset:a}){super(`Offset \`${a}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}Ct.NegativeOffsetError=t;class o extends e.BaseError{constructor({length:a,position:c}){super(`Position \`${c}\` is out of bounds (\`0 < position < ${a}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}Ct.PositionOutOfBoundsError=o;class s extends e.BaseError{constructor({count:a,limit:c}){super(`Recursive read limit of \`${c}\` exceeded (recursive read count: \`${a}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}return Ct.RecursiveReadLimitExceededError=s,Ct}var Eh;function fi(){if(Eh)return Ae;Eh=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.InvalidTypeError=Ae.InvalidArrayError=Ae.LengthMismatchError=Ae.BytesSizeMismatchError=Ae.ArrayLengthMismatchError=Ae.ZeroDataError=Ae.DataSizeTooSmallError=void 0,Ae.decode=c,Ae.encode=u,Ae.encodePacked=l,Ae.format=f,Ae.from=m;const e=br(),r=sd(),n=Mt(),t=lt(),o=Ne(),s=I6(),i=u_(),a=Kf();function c(d,w,E={}){const{as:p="Array",checksumAddress:S=!1}=E,A=typeof w=="string"?n.fromHex(w):w,T=i.create(A);if(n.size(A)===0&&d.length>0)throw new h;if(n.size(A)&&n.size(A)<32)throw new y({data:typeof w=="string"?w:o.fromBytes(w),parameters:d,size:n.size(A)});let C=0;const I=p==="Array"?[]:{};for(let R=0;R<d.length;++R){const q=d[R];T.setPosition(C);const[F,H]=s.decodeParameter(T,q,{checksumAddress:S,staticPosition:0});C+=H,p==="Array"?I.push(F):I[q.name??R]=F}return I}function u(d,w,E){const{checksumAddress:p=!1}=E??{};if(d.length!==w.length)throw new _({expectedLength:d.length,givenLength:w.length});const S=s.prepareParameters({checksumAddress:p,parameters:d,values:w}),A=s.encode(S);return A.length===0?"0x":A}function l(d,w){if(d.length!==w.length)throw new _({expectedLength:d.length,givenLength:w.length});const E=[];for(let p=0;p<d.length;p++){const S=d[p],A=w[p];E.push(l.encode(S,A))}return o.concat(...E)}(function(d){function w(E,p,S=!1){if(E==="address"){const I=p;return r.assert(I),o.padLeft(I.toLowerCase(),S?32:0)}if(E==="string")return o.fromString(p);if(E==="bytes")return p;if(E==="bool")return o.padLeft(o.fromBoolean(p),S?32:1);const A=E.match(a.integerRegex);if(A){const[I,R,q="256"]=A,F=Number.parseInt(q,10)/8;return o.fromNumber(p,{size:S?32:F,signed:R==="int"})}const T=E.match(a.bytesRegex);if(T){const[I,R]=T;if(Number.parseInt(R,10)!==(p.length-2)/2)throw new v({expectedSize:Number.parseInt(R,10),value:p});return o.padRight(p,S?32:0)}const C=E.match(a.arrayRegex);if(C&&Array.isArray(p)){const[I,R]=C,q=[];for(let F=0;F<p.length;F++)q.push(w(R,p[F],!0));return q.length===0?"0x":o.concat(...q)}throw new P(E)}d.encode=w})(l||(Ae.encodePacked=l={}));function f(d){return e.formatAbiParameters(d)}function m(d){return Array.isArray(d)&&typeof d[0]=="string"||typeof d=="string"?e.parseAbiParameters(d):d}class y extends t.BaseError{constructor({data:w,parameters:E,size:p}){super(`Data size of ${p} bytes is too small for given parameters.`,{metaMessages:[`Params: (${e.formatAbiParameters(E)})`,`Data: ${w} (${p} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}Ae.DataSizeTooSmallError=y;class h extends t.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}Ae.ZeroDataError=h;class b extends t.BaseError{constructor({expectedLength:w,givenLength:E,type:p}){super(`Array length mismatch for type \`${p}\`. Expected: \`${w}\`. Given: \`${E}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}Ae.ArrayLengthMismatchError=b;class v extends t.BaseError{constructor({expectedSize:w,value:E}){super(`Size of bytes "${E}" (bytes${o.size(E)}) does not match expected size (bytes${w}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}Ae.BytesSizeMismatchError=v;class _ extends t.BaseError{constructor({expectedLength:w,givenLength:E}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${w}`,`Given length (values): ${E}`].join(`
46
+ `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}Ae.LengthMismatchError=_;class g extends t.BaseError{constructor(w){super(`Value \`${w}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}Ae.InvalidArrayError=g;class P extends t.BaseError{constructor(w){super(`Type \`${w}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}return Ae.InvalidTypeError=P,Ae}var et={},yt={},jh;function R6(){if(jh)return yt;jh=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.toBytes=o,yt.toHex=s,yt.to=i,yt.decodeRlpCursor=a,yt.readLength=c,yt.readList=u,yt.from=l,yt.fromBytes=f,yt.fromHex=m;const e=Mt(),r=lt(),n=Ne(),t=u_();function o(_){return i(_,"Bytes")}function s(_){return i(_,"Hex")}function i(_,g){const P=g??(typeof _=="string"?"Hex":"Bytes"),d=(()=>{if(typeof _=="string"){if(_.length>3&&_.length%2!==0)throw new n.InvalidLengthError(_);return e.fromHex(_)}return _})(),w=t.create(d,{recursiveReadLimit:Number.POSITIVE_INFINITY});return a(w,P)}function a(_,g="Hex"){if(_.bytes.length===0)return g==="Hex"?n.fromBytes(_.bytes):_.bytes;const P=_.readByte();if(P<128&&_.decrementPosition(1),P<192){const w=c(_,P,128),E=_.readBytes(w);return g==="Hex"?n.fromBytes(E):E}const d=c(_,P,192);return u(_,d,g)}function c(_,g,P){if(P===128&&g<128)return 1;if(g<=P+55)return g-P;if(g===P+55+1)return _.readUint8();if(g===P+55+2)return _.readUint16();if(g===P+55+3)return _.readUint24();if(g===P+55+4)return _.readUint32();throw new r.BaseError("Invalid RLP prefix")}function u(_,g,P){const d=_.position,w=[];for(;_.position-d<g;)w.push(a(_,P));return w}function l(_,g){const{as:P}=g,d=y(_),w=t.create(new Uint8Array(d.length));return d.encode(w),P==="Hex"?n.fromBytes(w.bytes):w.bytes}function f(_,g={}){const{as:P="Bytes"}=g;return l(_,{as:P})}function m(_,g={}){const{as:P="Hex"}=g;return l(_,{as:P})}function y(_){return Array.isArray(_)?h(_.map(g=>y(g))):b(_)}function h(_){const g=_.reduce((w,E)=>w+E.length,0),P=v(g);return{length:g<=55?1+g:1+P+g,encode(w){g<=55?w.pushByte(192+g):(w.pushByte(247+P),P===1?w.pushUint8(g):P===2?w.pushUint16(g):P===3?w.pushUint24(g):w.pushUint32(g));for(const{encode:E}of _)E(w)}}}function b(_){const g=typeof _=="string"?e.fromHex(_):_,P=v(g.length);return{length:g.length===1&&g[0]<128?1:g.length<=55?1+g.length:1+P+g.length,encode(w){g.length===1&&g[0]<128?w.pushBytes(g):g.length<=55?(w.pushByte(128+g.length),w.pushBytes(g)):(w.pushByte(183+P),P===1?w.pushUint8(g.length):P===2?w.pushUint16(g.length):P===3?w.pushUint24(g.length):w.pushUint32(g.length),w.pushBytes(g))}}}function v(_){if(_<=255)return 1;if(_<=65535)return 2;if(_<=16777215)return 3;if(_<=4294967295)return 4;throw new r.BaseError("Length is too large.")}return yt}var be={},wh;function d_(){if(wh)return be;wh=1,Object.defineProperty(be,"__esModule",{value:!0}),be.InvalidVError=be.InvalidYParityError=be.InvalidSError=be.InvalidRError=be.MissingPropertiesError=be.InvalidSerializedSizeError=void 0,be.assert=i,be.fromBytes=a,be.fromHex=c,be.extract=u,be.from=l,be.fromDerBytes=f,be.fromDerHex=m,be.fromLegacy=y,be.fromRpc=h,be.fromTuple=b,be.toBytes=v,be.toHex=_,be.toDerBytes=g,be.toDerHex=P,be.toLegacy=d,be.toRpc=w,be.toTuple=E,be.validate=p,be.vToYParity=S,be.yParityToV=A;const e=Xr(),r=Mt(),n=lt(),t=Ne(),o=Yu(),s=Kf();function i(H,j={}){const{recovered:k}=j;if(typeof H.r>"u")throw new C({signature:H});if(typeof H.s>"u")throw new C({signature:H});if(k&&typeof H.yParity>"u")throw new C({signature:H});if(H.r<0n||H.r>s.maxUint256)throw new I({value:H.r});if(H.s<0n||H.s>s.maxUint256)throw new R({value:H.s});if(typeof H.yParity=="number"&&H.yParity!==0&&H.yParity!==1)throw new q({value:H.yParity})}function a(H){return c(t.fromBytes(H))}function c(H){if(H.length!==130&&H.length!==132)throw new T({signature:H});const j=BigInt(t.slice(H,0,32)),k=BigInt(t.slice(H,32,64)),B=(()=>{const O=+`0x${H.slice(130)}`;if(!Number.isNaN(O))try{return S(O)}catch{throw new q({value:O})}})();return typeof B>"u"?{r:j,s:k}:{r:j,s:k,yParity:B}}function u(H){if(!(typeof H.r>"u")&&!(typeof H.s>"u"))return l(H)}function l(H){const j=typeof H=="string"?c(H):H instanceof Uint8Array?a(H):typeof H.r=="string"?h(H):H.v?y(H):{r:H.r,s:H.s,...typeof H.yParity<"u"?{yParity:H.yParity}:{}};return i(j),j}function f(H){return m(t.fromBytes(H))}function m(H){const{r:j,s:k}=e.secp256k1.Signature.fromDER(t.from(H).slice(2));return{r:j,s:k}}function y(H){return{r:H.r,s:H.s,yParity:S(H.v)}}function h(H){const j=(()=>{const k=H.v?Number(H.v):void 0;let B=H.yParity?Number(H.yParity):void 0;if(typeof k=="number"&&typeof B!="number"&&(B=S(k)),typeof B!="number")throw new q({value:H.yParity});return B})();return{r:BigInt(H.r),s:BigInt(H.s),yParity:j}}function b(H){const[j,k,B]=H;return l({r:k==="0x"?0n:BigInt(k),s:B==="0x"?0n:BigInt(B),yParity:j==="0x"?0:Number(j)})}function v(H){return r.fromHex(_(H))}function _(H){i(H);const j=H.r,k=H.s;return t.concat(t.fromNumber(j,{size:32}),t.fromNumber(k,{size:32}),typeof H.yParity=="number"?t.fromNumber(A(H.yParity),{size:1}):"0x")}function g(H){return new e.secp256k1.Signature(H.r,H.s).toDERRawBytes()}function P(H){return`0x${new e.secp256k1.Signature(H.r,H.s).toDERHex()}`}function d(H){return{r:H.r,s:H.s,v:A(H.yParity)}}function w(H){const{r:j,s:k,yParity:B}=H;return{r:t.fromNumber(j,{size:32}),s:t.fromNumber(k,{size:32}),yParity:B===0?"0x0":"0x1"}}function E(H){const{r:j,s:k,yParity:B}=H;return[B?"0x01":"0x",j===0n?"0x":t.trimLeft(t.fromNumber(j)),k===0n?"0x":t.trimLeft(t.fromNumber(k))]}function p(H,j={}){try{return i(H,j),!0}catch{return!1}}function S(H){if(H===0||H===27)return 0;if(H===1||H===28)return 1;if(H>=35)return H%2===0?1:0;throw new F({value:H})}function A(H){if(H===0)return 27;if(H===1)return 28;throw new q({value:H})}class T extends n.BaseError{constructor({signature:j}){super(`Value \`${j}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${t.size(t.from(j))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}be.InvalidSerializedSizeError=T;class C extends n.BaseError{constructor({signature:j}){super(`Signature \`${o.stringify(j)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}be.MissingPropertiesError=C;class I extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}be.InvalidRError=I;class R extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}be.InvalidSError=R;class q extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}be.InvalidYParityError=q;class F extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}return be.InvalidVError=F,be}var Ph;function B6(){if(Ph)return et;Ph=1,Object.defineProperty(et,"__esModule",{value:!0}),et.from=o,et.fromRpc=s,et.fromRpcList=i,et.fromTuple=a,et.fromTupleList=c,et.getSignPayload=u,et.hash=l,et.toRpc=f,et.toRpcList=m,et.toTuple=y,et.toTupleList=h;const e=Wf(),r=Ne(),n=R6(),t=d_();function o(b,v={}){return typeof b.chainId=="string"?s(b):{...b,...v.signature}}function s(b){const{address:v,chainId:_,nonce:g}=b,P=t.extract(b);return{address:v,chainId:Number(_),nonce:BigInt(g),...P}}function i(b){return b.map(s)}function a(b){const[v,_,g,P,d,w]=b;let E={address:_,chainId:v==="0x"?0:Number(v),nonce:g==="0x"?0n:BigInt(g)};return P&&d&&w&&(E={...E,...t.fromTuple([P,d,w])}),o(E)}function c(b){const v=[];for(const _ of b)v.push(a(_));return v}function u(b){return l(b,{presign:!0})}function l(b,v={}){const{presign:_}=v;return e.keccak256(r.concat("0x05",n.fromHex(y(_?{address:b.address,chainId:b.chainId,nonce:b.nonce}:b))))}function f(b){const{address:v,chainId:_,nonce:g,...P}=b;return{address:v,chainId:r.fromNumber(_),nonce:r.fromNumber(g),...t.toRpc(P)}}function m(b){return b.map(f)}function y(b){const{address:v,chainId:_,nonce:g}=b,P=t.extract(b);return[_?r.fromNumber(_):"0x",v,g?r.fromNumber(g):"0x",...P?t.toTuple(P):[]]}function h(b){if(!b||b.length===0)return[];const v=[];for(const _ of b)v.push(y(_));return v}return et}var dt={},zr={},Ah;function O6(){if(Ah)return zr;Ah=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.extraEntropy=void 0,zr.setExtraEntropy=e,zr.extraEntropy=!1;function e(r){zr.extraEntropy=r}return zr}var Th;function C6(){if(Th)return dt;Th=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.noble=void 0,dt.createKeyPair=i,dt.getPublicKey=a,dt.getSharedSecret=c,dt.randomPrivateKey=u,dt.recoverAddress=l,dt.recoverPublicKey=f,dt.sign=m,dt.verify=y;const e=Xr(),r=sd(),n=Mt(),t=Ne(),o=O6(),s=c_();dt.noble=e.secp256k1;function i(h={}){const{as:b="Hex"}=h,v=u({as:b}),_=a({privateKey:v});return{privateKey:v,publicKey:_}}function a(h){const{privateKey:b}=h,v=e.secp256k1.ProjectivePoint.fromPrivateKey(t.from(b).slice(2));return s.from(v)}function c(h){const{as:b="Hex",privateKey:v,publicKey:_}=h,d=e.secp256k1.ProjectivePoint.fromHex(s.toHex(_).slice(2)).multiply(e.secp256k1.utils.normPrivateKeyToScalar(t.from(v).slice(2))).toRawBytes(!0);return b==="Hex"?t.fromBytes(d):d}function u(h={}){const{as:b="Hex"}=h,v=e.secp256k1.utils.randomPrivateKey();return b==="Hex"?t.fromBytes(v):v}function l(h){return r.fromPublicKey(f(h))}function f(h){const{payload:b,signature:v}=h,{r:_,s:g,yParity:P}=v,w=new e.secp256k1.Signature(BigInt(_),BigInt(g)).addRecoveryBit(P).recoverPublicKey(t.from(b).substring(2));return s.from(w)}function m(h){const{extraEntropy:b=o.extraEntropy,hash:v,payload:_,privateKey:g}=h,{r:P,s:d,recovery:w}=e.secp256k1.sign(n.from(_),n.from(g),{extraEntropy:typeof b=="boolean"?b:t.from(b).slice(2),lowS:!0,...v?{prehash:!0}:{}});return{r:P,s:d,yParity:w}}function y(h){const{hash:b,payload:v}=h;return h.address?r.isEqual(h.address,l({payload:v,signature:h.signature})):e.secp256k1.verify(h.signature,n.from(v),s.toBytes(h.publicKey),...b?[{prehash:!0,lowS:!0}]:[])}return dt}var Sh;function x6(){return Sh||(Sh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.suffixParameters=e.magicBytes=void 0,e.assert=a,e.from=c,e.unwrap=u,e.wrap=l,e.validate=f;const r=fi(),n=B6(),t=lt(),o=Ne(),s=C6(),i=d_();e.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",e.suffixParameters=r.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function a(y){if(typeof y=="string"){if(o.slice(y,-32)!==e.magicBytes)throw new m(y)}else i.assert(y.authorization)}function c(y){return typeof y=="string"?u(y):y}function u(y){a(y);const h=o.toNumber(o.slice(y,-64,-32)),b=o.slice(y,-h-64,-64),v=o.slice(y,0,-h-64),[_,g,P]=r.decode(e.suffixParameters,b);return{authorization:n.from({address:_.delegation,chainId:Number(_.chainId),nonce:_.nonce,yParity:_.yParity,r:_.r,s:_.s}),signature:v,...P&&P!=="0x"?{data:P,to:g}:{}}}function l(y){const{data:h,signature:b}=y;a(y);const v=s.recoverAddress({payload:n.getSignPayload(y.authorization),signature:i.from(y.authorization)}),_=r.encode(e.suffixParameters,[{...y.authorization,delegation:y.authorization.address,chainId:BigInt(y.authorization.chainId)},y.to??v,h??"0x"]),g=o.fromNumber(o.size(_),{size:32});return o.concat(b,_,g,e.magicBytes)}function f(y){try{return a(y),!0}catch{return!1}}class m extends t.BaseError{constructor(h){super(`Value \`${h}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=m})(tf)),tf}var Ih;function cd(){return Ih||(Ih=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.SignatureErc8010=void 0,ko.SignatureErc8010=x6()),ko}var Rh;function Zf(){if(Rh)return $s;Rh=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.isErc8010Signature=r;const e=cd();function r(n){return e.SignatureErc8010.validate(n)}return $s}var zs={},Bh;function f_(){if(Bh)return zs;Bh=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.parseErc6492Signature=n;const e=yr(),r=Vf();function n(t){if(!(0,r.isErc6492Signature)(t))return{signature:t};const[o,s,i]=(0,e.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:o,data:s,signature:i}}return zs}var Us={},Oh;function l_(){if(Oh)return Us;Oh=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.parseErc8010Signature=t;const e=cd(),r=oe(),n=Zf();function t(o){if(!(0,n.isErc8010Signature)(o))return{signature:o};const{authorization:s,to:i,...a}=e.SignatureErc8010.unwrap(o);return{authorization:{address:s.address,chainId:s.chainId,nonce:Number(s.nonce),r:(0,r.numberToHex)(s.r,{size:32}),s:(0,r.numberToHex)(s.s,{size:32}),yParity:s.yParity},...i?{address:i}:{},...a}}return Us}var Ls={},Ch;function Jf(){if(Ch)return Ls;Ch=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.recoverMessageAddress=n;const e=ui(),r=vr();async function n({message:t,signature:o}){return(0,r.recoverAddress)({hash:(0,e.hashMessage)(t),signature:o})}return Ls}var Ds={},xh;function Yf(){if(xh)return Ds;xh=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.recoverTypedDataAddress=n;const e=di(),r=vr();async function n(t){const{domain:o,message:s,primaryType:i,signature:a,types:c}=t;return(0,r.recoverAddress)({hash:(0,e.hashTypedData)({domain:o,message:s,primaryType:i,types:c}),signature:a})}return Ds}var Gs={},qh;function b_(){if(qh)return Gs;qh=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.serializeErc6492Signature=o;const e=Gf(),r=Tt(),n=qe(),t=Ee();function o(s){const{address:i,data:a,signature:c,to:u="hex"}=s,l=(0,n.concatHex)([(0,r.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[i,a,c]),e.erc6492MagicBytes]);return u==="hex"?l:(0,t.hexToBytes)(l)}return Gs}var Vs={},Mh;function m_(){if(Mh)return Vs;Mh=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.serializeErc8010Signature=n;const e=cd(),r=Ee();function n(t){const{address:o,data:s,signature:i,to:a="hex"}=t,c=e.SignatureErc8010.wrap({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:s,signature:i,to:o});return a==="hex"?c:(0,r.hexToBytes)(c)}return Vs}var Ws={},kh;function h_(){if(kh)return Ws;kh=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.verifyHash=t;const e=Je(),r=gt(),n=vr();async function t({address:o,hash:s,signature:i}){return(0,r.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverAddress)({hash:s,signature:i}))}return Ws}var Ks={},Hh;function y_(){if(Hh)return Ks;Hh=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.verifyMessage=t;const e=Je(),r=gt(),n=Jf();async function t({address:o,message:s,signature:i}){return(0,r.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverMessageAddress)({message:s,signature:i}))}return Ks}var Zs={},Fh;function p_(){if(Fh)return Zs;Fh=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.verifyTypedData=t;const e=Je(),r=gt(),n=Yf();async function t(o){const{address:s,domain:i,message:a,primaryType:c,signature:u,types:l}=o;return(0,r.isAddressEqual)((0,e.getAddress)(s),await(0,n.recoverTypedDataAddress)({domain:i,message:a,primaryType:c,signature:u,types:l}))}return Zs}var Js={},Nh;function Xf(){if(Nh)return Js;Nh=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.getSerializedTransactionType=t;const e=nt(),r=ft(),n=Be();function t(o){const s=(0,r.sliceHex)(o,0,1);if(s==="0x04")return"eip7702";if(s==="0x03")return"eip4844";if(s==="0x02")return"eip1559";if(s==="0x01")return"eip2930";if(s!=="0x"&&(0,n.hexToNumber)(s)>=192)return"legacy";throw new e.InvalidSerializedTransactionTypeError({serializedType:s})}return Js}var vn={},$h;function Qf(){if($h)return vn;$h=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.parseTransaction=m,vn.toTransactionArray=g,vn.parseAccessList=P;const e=At(),r=nt(),n=rt(),t=Zu(),o=Ze(),s=mr(),i=er(),a=Be(),c=$f(),u=zf(),l=od(),f=Xf();function m(E){const p=(0,f.getSerializedTransactionType)(E);return p==="eip1559"?b(E):p==="eip2930"?v(E):p==="eip4844"?h(E):p==="eip7702"?y(E):_(E)}function y(E){const p=g(E),[S,A,T,C,I,R,q,F,H,j,k,B,O]=p;if(p.length!==10&&p.length!==13)throw new r.InvalidSerializedTransactionError({attributes:{chainId:S,nonce:A,maxPriorityFeePerGas:T,maxFeePerGas:C,gas:I,to:R,value:q,data:F,accessList:H,authorizationList:j,...p.length>9?{v:k,r:B,s:O}:{}},serializedTransaction:E,type:"eip7702"});const x={chainId:(0,a.hexToNumber)(S),type:"eip7702"};return(0,o.isHex)(R)&&R!=="0x"&&(x.to=R),(0,o.isHex)(I)&&I!=="0x"&&(x.gas=(0,a.hexToBigInt)(I)),(0,o.isHex)(F)&&F!=="0x"&&(x.data=F),(0,o.isHex)(A)&&(x.nonce=A==="0x"?0:(0,a.hexToNumber)(A)),(0,o.isHex)(q)&&q!=="0x"&&(x.value=(0,a.hexToBigInt)(q)),(0,o.isHex)(C)&&C!=="0x"&&(x.maxFeePerGas=(0,a.hexToBigInt)(C)),(0,o.isHex)(T)&&T!=="0x"&&(x.maxPriorityFeePerGas=(0,a.hexToBigInt)(T)),H.length!==0&&H!=="0x"&&(x.accessList=P(H)),j.length!==0&&j!=="0x"&&(x.authorizationList=d(j)),(0,l.assertTransactionEIP7702)(x),{...p.length===13?w(p):void 0,...x}}function h(E){const p=g(E),S=p.length===4,A=S?p[0]:p,T=S?p.slice(1):[],[C,I,R,q,F,H,j,k,B,O,x,M,N,z]=A,[$,U,G]=T;if(!(A.length===11||A.length===14))throw new r.InvalidSerializedTransactionError({attributes:{chainId:C,nonce:I,maxPriorityFeePerGas:R,maxFeePerGas:q,gas:F,to:H,value:j,data:k,accessList:B,...A.length>9?{v:M,r:N,s:z}:{}},serializedTransaction:E,type:"eip4844"});const J={blobVersionedHashes:x,chainId:(0,a.hexToNumber)(C),to:H,type:"eip4844"};return(0,o.isHex)(F)&&F!=="0x"&&(J.gas=(0,a.hexToBigInt)(F)),(0,o.isHex)(k)&&k!=="0x"&&(J.data=k),(0,o.isHex)(I)&&(J.nonce=I==="0x"?0:(0,a.hexToNumber)(I)),(0,o.isHex)(j)&&j!=="0x"&&(J.value=(0,a.hexToBigInt)(j)),(0,o.isHex)(O)&&O!=="0x"&&(J.maxFeePerBlobGas=(0,a.hexToBigInt)(O)),(0,o.isHex)(q)&&q!=="0x"&&(J.maxFeePerGas=(0,a.hexToBigInt)(q)),(0,o.isHex)(R)&&R!=="0x"&&(J.maxPriorityFeePerGas=(0,a.hexToBigInt)(R)),B.length!==0&&B!=="0x"&&(J.accessList=P(B)),$&&U&&G&&(J.sidecars=(0,t.toBlobSidecars)({blobs:$,commitments:U,proofs:G})),(0,l.assertTransactionEIP4844)(J),{...A.length===14?w(A):void 0,...J}}function b(E){const p=g(E),[S,A,T,C,I,R,q,F,H,j,k,B]=p;if(!(p.length===9||p.length===12))throw new r.InvalidSerializedTransactionError({attributes:{chainId:S,nonce:A,maxPriorityFeePerGas:T,maxFeePerGas:C,gas:I,to:R,value:q,data:F,accessList:H,...p.length>9?{v:j,r:k,s:B}:{}},serializedTransaction:E,type:"eip1559"});const O={chainId:(0,a.hexToNumber)(S),type:"eip1559"};return(0,o.isHex)(R)&&R!=="0x"&&(O.to=R),(0,o.isHex)(I)&&I!=="0x"&&(O.gas=(0,a.hexToBigInt)(I)),(0,o.isHex)(F)&&F!=="0x"&&(O.data=F),(0,o.isHex)(A)&&(O.nonce=A==="0x"?0:(0,a.hexToNumber)(A)),(0,o.isHex)(q)&&q!=="0x"&&(O.value=(0,a.hexToBigInt)(q)),(0,o.isHex)(C)&&C!=="0x"&&(O.maxFeePerGas=(0,a.hexToBigInt)(C)),(0,o.isHex)(T)&&T!=="0x"&&(O.maxPriorityFeePerGas=(0,a.hexToBigInt)(T)),H.length!==0&&H!=="0x"&&(O.accessList=P(H)),(0,l.assertTransactionEIP1559)(O),{...p.length===12?w(p):void 0,...O}}function v(E){const p=g(E),[S,A,T,C,I,R,q,F,H,j,k]=p;if(!(p.length===8||p.length===11))throw new r.InvalidSerializedTransactionError({attributes:{chainId:S,nonce:A,gasPrice:T,gas:C,to:I,value:R,data:q,accessList:F,...p.length>8?{v:H,r:j,s:k}:{}},serializedTransaction:E,type:"eip2930"});const B={chainId:(0,a.hexToNumber)(S),type:"eip2930"};return(0,o.isHex)(I)&&I!=="0x"&&(B.to=I),(0,o.isHex)(C)&&C!=="0x"&&(B.gas=(0,a.hexToBigInt)(C)),(0,o.isHex)(q)&&q!=="0x"&&(B.data=q),(0,o.isHex)(A)&&(B.nonce=A==="0x"?0:(0,a.hexToNumber)(A)),(0,o.isHex)(R)&&R!=="0x"&&(B.value=(0,a.hexToBigInt)(R)),(0,o.isHex)(T)&&T!=="0x"&&(B.gasPrice=(0,a.hexToBigInt)(T)),F.length!==0&&F!=="0x"&&(B.accessList=P(F)),(0,l.assertTransactionEIP2930)(B),{...p.length===11?w(p):void 0,...B}}function _(E){const p=(0,c.fromRlp)(E,"hex"),[S,A,T,C,I,R,q,F,H]=p;if(!(p.length===6||p.length===9))throw new r.InvalidSerializedTransactionError({attributes:{nonce:S,gasPrice:A,gas:T,to:C,value:I,data:R,...p.length>6?{v:q,r:F,s:H}:{}},serializedTransaction:E,type:"legacy"});const j={type:"legacy"};if((0,o.isHex)(C)&&C!=="0x"&&(j.to=C),(0,o.isHex)(T)&&T!=="0x"&&(j.gas=(0,a.hexToBigInt)(T)),(0,o.isHex)(R)&&R!=="0x"&&(j.data=R),(0,o.isHex)(S)&&(j.nonce=S==="0x"?0:(0,a.hexToNumber)(S)),(0,o.isHex)(I)&&I!=="0x"&&(j.value=(0,a.hexToBigInt)(I)),(0,o.isHex)(A)&&A!=="0x"&&(j.gasPrice=(0,a.hexToBigInt)(A)),(0,l.assertTransactionLegacy)(j),p.length===6)return j;const k=(0,o.isHex)(q)&&q!=="0x"?(0,a.hexToBigInt)(q):0n;if(H==="0x"&&F==="0x")return k>0&&(j.chainId=Number(k)),j;const B=k,O=Number((B-35n)/2n);if(O>0)j.chainId=O;else if(B!==27n&&B!==28n)throw new r.InvalidLegacyVError({v:B});return j.v=B,j.s=H,j.r=F,j.yParity=B%2n===0n?1:0,j}function g(E){return(0,c.fromRlp)(`0x${E.slice(4)}`,"hex")}function P(E){const p=[];for(let S=0;S<E.length;S++){const[A,T]=E[S];if(!(0,n.isAddress)(A,{strict:!1}))throw new e.InvalidAddressError({address:A});p.push({address:A,storageKeys:T.map(C=>(0,u.isHash)(C)?C:(0,i.trim)(C))})}return p}function d(E){const p=[];for(let S=0;S<E.length;S++){const[A,T,C,I,R,q]=E[S];p.push({address:T,chainId:A==="0x"?0:(0,a.hexToNumber)(A),nonce:C==="0x"?0:(0,a.hexToNumber)(C),...w([I,R,q])})}return p}function w(E){const p=E.slice(-3),S=p[0]==="0x"||(0,a.hexToBigInt)(p[0])===0n?27n:28n;return{r:(0,s.padHex)(p[1],{size:32}),s:(0,s.padHex)(p[2],{size:32}),v:S,yParity:S===27n?0:1}}return vn}var Ys={},Xs={},Fo={},zh;function g_(){if(zh)return Fo;zh=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.InvalidDecimalNumberError=void 0;const e=ue();class r extends e.BaseError{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}return Fo.InvalidDecimalNumberError=r,Fo}var Uh;function ud(){if(Uh)return Xs;Uh=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.parseUnits=r;const e=g_();function r(n,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new e.InvalidDecimalNumberError({value:n});let[o,s="0"]=n.split(".");const i=o.startsWith("-");if(i&&(o=o.slice(1)),s=s.replace(/(0+)$/,""),t===0)Math.round(+`.${s}`)===1&&(o=`${BigInt(o)+1n}`),s="";else if(s.length>t){const[a,c,u]=[s.slice(0,t-1),s.slice(t-1,t),s.slice(t)],l=Math.round(+`${c}.${u}`);l>9?s=`${BigInt(a)+BigInt(1)}0`.padStart(a.length+1,"0"):s=`${a}${l}`,s.length>t&&(s=s.slice(1),o=`${BigInt(o)+1n}`),s=s.slice(0,t)}else s=s.padEnd(t,"0");return BigInt(`${i?"-":""}${o}${s}`)}return Xs}var Lh;function __(){if(Lh)return Ys;Lh=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.parseEther=n;const e=Vo(),r=ud();function n(t,o="wei"){return(0,r.parseUnits)(t,e.etherUnits[o])}return Ys}var Qs={},Dh;function v_(){if(Dh)return Qs;Dh=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.parseGwei=n;const e=Vo(),r=ud();function n(t,o="wei"){return(0,r.parseUnits)(t,e.gweiUnits[o])}return Qs}var Gh;function E_(){return Gh||(Gh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.ccipReadTunnel=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.buildRequest=e.verifyAuthorization=e.serializeAuthorizationList=e.recoverAuthorizationAddress=e.hashAuthorization=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.parseEventLogs=e.getAbiItem=e.formatAbiItemWithArgs=e.formatAbiParams=e.formatAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.publicKeyToAddress=e.parseAccount=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=void 0,e.keccak256=e.isHash=e.getAction=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.defineFormatter=e.extract=e.formatBlock=e.defineBlock=e.getTransactionError=e.getNodeError=e.containsNodeError=e.getEstimateGasError=e.getContractError=e.getCallError=e.toRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=void 0,e.serializeTypedData=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.serializeErc8010Signature=e.serializeErc6492Signature=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseErc8010Signature=e.parseErc6492Signature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashMessage=e.getWebSocketRpcClient=e.socketClientCache=e.getSocketRpcClient=e.getHttpRpcClient=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.nonceManager=e.createNonceManager=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=e.ripemd160=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=e.validateTypedData=void 0;var r=br();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var n=Ie();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return n.parseAccount}});var t=fg();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return t.publicKeyToAddress}});var o=yr();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return o.decodeAbiParameters}});var s=Go();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return s.decodeErrorResult}});var i=ti();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return i.decodeEventLog}});var a=Af();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return a.decodeFunctionData}});var c=Rt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return c.decodeFunctionResult}});var u=Tt();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return u.encodeAbiParameters}});var l=ii();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return l.encodeDeployData}});var f=Tf();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return f.encodeErrorResult}});var m=Zr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return m.encodeEventTopics}});var y=Le();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return y.encodeFunctionData}});var h=Sf();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return h.encodeFunctionResult}});var b=zg();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return b.encodePacked}});var v=Qt();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return v.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return v.formatAbiParams}});var _=dg();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return _.formatAbiItemWithArgs}});var g=tr();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return g.getAbiItem}});var P=ri();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return P.parseEventLogs}});var d=Je();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return d.getAddress}});var w=Ug();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return w.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return w.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return w.getCreateAddress}});var E=rt();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return E.isAddress}});var p=gt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return p.isAddressEqual}});var S=yg();Object.defineProperty(e,"hashAuthorization",{enumerable:!0,get:function(){return S.hashAuthorization}});var A=Zo();Object.defineProperty(e,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return A.recoverAuthorizationAddress}});var T=Lg();Object.defineProperty(e,"serializeAuthorizationList",{enumerable:!0,get:function(){return T.serializeAuthorizationList}});var C=Dg();Object.defineProperty(e,"verifyAuthorization",{enumerable:!0,get:function(){return C.verifyAuthorization}});var I=Gg();Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return I.buildRequest}});var R=Xu();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return R.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return R.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return R.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return R.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return R.offchainLookupSignature}});var q=Vg();Object.defineProperty(e,"ccipReadTunnel",{enumerable:!0,get:function(){return q.ccipReadTunnel}});var F=ci();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return F.assertCurrentChain}});var H=Wg();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return H.defineChain}});var j=Kg();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return j.extractChain}});var k=wr();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return k.getChainContractAddress}});var B=qe();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return B.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return B.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return B.concatHex}});var O=Ff();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return O.isBytes}});var x=Ze();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return x.isHex}});var M=mr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return M.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return M.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return M.padHex}});var N=Ue();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return N.size}});var z=ft();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return z.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return z.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return z.sliceHex}});var $=er();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return $.trim}});var U=uf();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return U.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return U.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return U.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return U.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return U.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return U.fromBytes}});var G=Be();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return G.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return G.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return G.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return G.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return G.hexToString}});var J=$f();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return J.fromRlp}});var K=Ee();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return K.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return K.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return K.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return K.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return K.toBytes}});var V=oe();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return V.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return V.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return V.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return V.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return V.toHex}});var Y=Ko();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return Y.toRlp}});var te=jf();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return te.getCallError}});var Z=_r();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return Z.getContractError}});var X=gg();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return X.getEstimateGasError}});var Q=Jo();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return Q.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return Q.getNodeError}});var ne=Qo();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return ne.getTransactionError}});var re=Gu();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return re.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return re.formatBlock}});var ae=Er();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return ae.extract}});var ce=Yo();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return ce.defineFormatter}});var he=qt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return he.formatLog}});var ge=Rn();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return ge.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return ge.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return ge.transactionType}});var ee=xn();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return ee.defineTransactionReceipt}});var W=St();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return W.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return W.formatTransactionRequest}});var Ce=me();Object.defineProperty(e,"getAction",{enumerable:!0,get:function(){return Ce.getAction}});var xe=zf();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return xe.isHash}});var bt=tt();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return bt.keccak256}});var Ye=Jg();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Ye.ripemd160}});var mt=hf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return mt.sha256}});var Bt=Yg();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return Bt.toEventHash}});var ot=In();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return ot.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return ot.toEventSelector}});var De=Xg();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return De.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return De.toEventSignature}});var ht=Qg();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return ht.toFunctionHash}});var it=Kr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return it.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return it.toFunctionSelector}});var Xe=e_();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return Xe.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return Xe.toFunctionSignature}});var _t=t_();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return _t.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return _t.nonceManager}});var Me=Nu();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return Me.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return Me.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return Me.integerRegex}});var ke=o_();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return ke.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return ke.rpc}});var nr=Lf();Object.defineProperty(e,"getHttpRpcClient",{enumerable:!0,get:function(){return nr.getHttpRpcClient}});var qn=n_();Object.defineProperty(e,"getSocketRpcClient",{enumerable:!0,get:function(){return qn.getSocketRpcClient}}),Object.defineProperty(e,"socketClientCache",{enumerable:!0,get:function(){return qn.socketClientCache}});var or=Df();Object.defineProperty(e,"getWebSocketRpcClient",{enumerable:!0,get:function(){return or.getWebSocketRpcClient}});var Mn=ui();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return Mn.hashMessage}});var Ar=di();Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return Ar.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Ar.hashTypedData}});var $e=Vf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return $e.isErc6492Signature}});var Tr=Zf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return Tr.isErc8010Signature}});var fd=f_();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return fd.parseErc6492Signature}});var kn=l_();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return kn.parseErc8010Signature}});var ld=vr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return ld.recoverAddress}});var Hn=Jf();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return Hn.recoverMessageAddress}});var bd=ff();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return bd.recoverPublicKey}});var Sr=Yf();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return Sr.recoverTypedDataAddress}});var Ir=b_();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return Ir.serializeErc6492Signature}});var md=m_();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return md.serializeErc8010Signature}});var Rr=h_();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return Rr.verifyHash}});var Br=y_();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return Br.verifyMessage}});var Fn=p_();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return Fn.verifyTypedData}});var hd=Fe();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return hd.stringify}});var yd=It();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return yd.assertRequest}});var Nn=od();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Nn.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Nn.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return Nn.assertTransactionLegacy}});var pd=Xf();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return pd.getSerializedTransactionType}});var bi=Ju();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return bi.getTransactionType}});var gd=Qf();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return gd.parseTransaction}});var $n=Nf();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return $n.serializeAccessList}});var mi=id();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return mi.serializeTransaction}});var tn=ad();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return tn.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return tn.validateTypedData}});var _d=Wo();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return _d.formatEther}});var vd=Jr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return vd.formatGwei}});var Ed=Uu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return Ed.formatUnits}});var jd=__();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return jd.parseEther}});var wd=v_();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return wd.parseGwei}});var hi=ud();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return hi.parseUnits}})})(Kd)),Kd}var Vh;function q6(){if(Vh)return Ps;Vh=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.formatProof=n;const e=E_();function r(t){return t.map(o=>({...o,value:BigInt(o.value)}))}function n(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?(0,e.hexToNumber)(t.nonce):void 0,storageProof:t.storageProof?r(t.storageProof):void 0}}return Ps}var Wh;function M6(){if(Wh)return ws;Wh=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.getProof=n;const e=Bn(),r=q6();async function n(t,{address:o,blockHash:s,blockNumber:i,blockTag:a="latest",requireCanonical:c,storageKeys:u}){const l=(0,e.formatBlockParameter)({blockHash:s,blockNumber:i,blockTag:a,requireCanonical:c}),f=await t.request({method:"eth_getProof",params:[o,u,l]});return(0,r.formatProof)(f)}return ws}var ec={},Kh;function k6(){if(Kh)return ec;Kh=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.getStorageAt=r;const e=Bn();async function r(n,{address:t,blockHash:o,blockNumber:s,blockTag:i="latest",requireCanonical:a,slot:c}){const u=(0,e.formatBlockParameter)({blockHash:o,blockNumber:s,blockTag:i,requireCanonical:a});return await n.request({method:"eth_getStorageAt",params:[t,c,u]})}return ec}var tc={},Zh;function el(){if(Zh)return tc;Zh=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.getTransaction=t;const e=nt(),r=oe(),n=Rn();async function t(o,{blockHash:s,blockNumber:i,blockTag:a,hash:c,index:u,sender:l,nonce:f}){var v,_,g;const m=a||"latest",y=i!==void 0?(0,r.numberToHex)(i):void 0;let h=null;if(c?h=await o.request({method:"eth_getTransactionByHash",params:[c]},{dedupe:!0}):s?h=await o.request({method:"eth_getTransactionByBlockHashAndIndex",params:[s,(0,r.numberToHex)(u)]},{dedupe:!0}):typeof u=="number"?h=await o.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[y||m,(0,r.numberToHex)(u)]},{dedupe:!!y}):l&&typeof f=="number"&&(h=await o.request({method:"eth_getTransactionBySenderAndNonce",params:[l,(0,r.numberToHex)(f)]},{dedupe:!0})),!h)throw new e.TransactionNotFoundError({blockHash:s,blockNumber:i,blockTag:m,hash:c,index:u});return(((g=(_=(v=o.chain)==null?void 0:v.formatters)==null?void 0:_.transaction)==null?void 0:g.format)||n.formatTransaction)(h,"getTransaction")}return tc}var rc={},Jh;function H6(){if(Jh)return rc;Jh=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.getTransactionConfirmations=t;const e=me(),r=si(),n=el();async function t(o,{hash:s,transactionReceipt:i}){const[a,c]=await Promise.all([(0,e.getAction)(o,r.getBlockNumber,"getBlockNumber")({}),s?(0,e.getAction)(o,n.getTransaction,"getTransaction")({hash:s}):void 0]),u=(i==null?void 0:i.blockNumber)||(c==null?void 0:c.blockNumber);return u?a-u+1n:0n}return rc}var nc={},Yh;function j_(){if(Yh)return nc;Yh=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.getTransactionReceipt=n;const e=nt(),r=xn();async function n(t,{hash:o}){var a,c,u;const s=await t.request({method:"eth_getTransactionReceipt",params:[o]},{dedupe:!0});if(!s)throw new e.TransactionReceiptNotFoundError({hash:o});return(((u=(c=(a=t.chain)==null?void 0:a.formatters)==null?void 0:c.transactionReceipt)==null?void 0:u.format)||r.formatTransactionReceipt)(s,"getTransactionReceipt")}return nc}var oc={},Xh;function F6(){if(Xh)return oc;Xh=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.multicall=f;const e=kt(),r=ni(),n=Se(),t=ue(),o=pr(),s=Rt(),i=Le(),a=wr(),c=_r(),u=me(),l=Ht();async function f(m,y){var H;const{account:h,authorizationList:b,allowFailure:v=!0,blockHash:_,blockNumber:g,blockOverrides:P,blockTag:d,requireCanonical:w,stateOverride:E}=y,p=y.contracts,{batchSize:S=y.batchSize??1024,deployless:A=y.deployless??!1}=typeof((H=m.batch)==null?void 0:H.multicall)=="object"?m.batch.multicall:{},T=(()=>{if(y.multicallAddress)return y.multicallAddress;if(A)return null;if(m.chain)return(0,a.getChainContractAddress)({blockNumber:g,chain:m.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),C=[[]];let I=0,R=0;for(let j=0;j<p.length;j++){const{abi:k,address:B,args:O,functionName:x}=p[j];try{const M=(0,i.encodeFunctionData)({abi:k,args:O,functionName:x});R+=(M.length-2)/2,S>0&&R>S&&C[I].length>0&&(I++,R=(M.length-2)/2,C[I]=[]),C[I]=[...C[I],{allowFailure:!0,callData:M,target:B}]}catch(M){const N=(0,c.getContractError)(M,{abi:k,address:B,args:O,docsPath:"/docs/contract/multicall",functionName:x,sender:h});if(!v)throw N;C[I]=[...C[I],{allowFailure:!0,callData:"0x",target:B}]}}const q=await Promise.allSettled(C.map(j=>(0,u.getAction)(m,l.readContract,"readContract")({...T===null?{code:r.multicall3Bytecode}:{address:T},abi:e.multicall3Abi,account:h,args:[j],authorizationList:b,blockHash:_,blockNumber:g,blockOverrides:P,blockTag:d,functionName:"aggregate3",requireCanonical:w,stateOverride:E}))),F=[];for(let j=0;j<q.length;j++){const k=q[j];if(k.status==="rejected"){if(!v)throw k.reason;for(let O=0;O<C[j].length;O++)F.push({status:"failure",error:k.reason,result:void 0});continue}const B=k.value;for(let O=0;O<B.length;O++){const{returnData:x,success:M}=B[O],{callData:N}=C[j][O],{abi:z,address:$,functionName:U,args:G}=p[F.length];try{if(N==="0x")throw new n.AbiDecodingZeroDataError;if(!M)throw new o.RawContractError({data:x});const J=(0,s.decodeFunctionResult)({abi:z,args:G,data:x,functionName:U});F.push(v?{result:J,status:"success"}:J)}catch(J){const K=(0,c.getContractError)(J,{abi:z,address:$,args:G,docsPath:"/docs/contract/multicall",functionName:U});if(!v)throw K;F.push({error:K,result:void 0,status:"failure"})}}}if(F.length!==p.length)throw new t.BaseError("multicall results mismatch");return F}return oc}var ic={},Qh;function w_(){if(Qh)return ic;Qh=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.simulateBlocks=v;const e=Ig(),r=Ie(),n=Se(),t=pr(),o=rr(),s=Rt(),i=Le(),a=qe(),c=oe(),u=_r(),l=Jo(),f=Gu(),m=qt(),y=St(),h=lf(),b=It();async function v(_,g){const{blockNumber:P,blockTag:d=_.experimental_blockTag??"latest",blocks:w,returnFullTransactions:E,traceTransfers:p,validation:S}=g;try{const A=[];for(const R of w){const q=R.blockOverrides?e.toRpc(R.blockOverrides):void 0,F=R.calls.map(j=>{const k=j,B=k.account?(0,r.parseAccount)(k.account):void 0,O=k.abi?(0,i.encodeFunctionData)(k):k.data,x={...k,account:B,data:k.dataSuffix?(0,a.concat)([O||"0x",k.dataSuffix]):O,from:k.from??(B==null?void 0:B.address)};return(0,b.assertRequest)(x),(0,y.formatTransactionRequest)(x)}),H=R.stateOverrides?(0,h.serializeStateOverride)(R.stateOverrides):void 0;A.push({blockOverrides:q,calls:F,stateOverrides:H})}const C=(typeof P=="bigint"?(0,c.numberToHex)(P):void 0)||d;return(await _.request({method:"eth_simulateV1",params:[{blockStateCalls:A,returnFullTransactions:E,traceTransfers:p,validation:S},C]})).map((R,q)=>({...(0,f.formatBlock)(R),calls:R.calls.map((F,H)=>{var G,J;const{abi:j,args:k,functionName:B,to:O}=w[q].calls[H],x=((G=F.error)==null?void 0:G.data)??F.returnData,M=BigInt(F.gasUsed),N=(J=F.logs)==null?void 0:J.map(K=>(0,m.formatLog)(K)),z=F.status==="0x1"?"success":"failure",$=j&&z==="success"&&x!=="0x"?(0,s.decodeFunctionResult)({abi:j,data:x,functionName:B}):null,U=(()=>{if(z==="success")return;let K;if(x==="0x"?K=new n.AbiDecodingZeroDataError:x&&(K=new t.RawContractError({data:x})),!!K)return(0,u.getContractError)(K,{abi:j??[],address:O??"0x",args:k,functionName:B??"<unknown>"})})();return{data:x,gasUsed:M,logs:N,status:z,...z==="success"?{result:$}:{error:U}}})}))}catch(A){const T=A,C=(0,l.getNodeError)(T,{});throw C instanceof o.UnknownNodeError?T:C}}return ic}var ac={},lr={},Ke={},En={},ey;function N6(){if(ey)return En;ey=1,Object.defineProperty(En,"__esModule",{value:!0}),En.normalizeSignature=n,En.isArgOfType=t,En.getAmbiguousTypes=o;const e=sd(),r=lt();function n(s){let i=!0,a="",c=0,u="",l=!1;for(let f=0;f<s.length;f++){const m=s[f];if(["(",")",","].includes(m)&&(i=!0),m==="("&&c++,m===")"&&c--,!!i){if(c===0){if(m===" "&&["event","function","error",""].includes(u))u="";else if(u+=m,m===")"){l=!0;break}continue}if(m===" "){s[f-1]!==","&&a!==","&&a!==",("&&(a="",i=!1);continue}u+=m,a+=m}}if(!l)throw new r.BaseError("Unable to normalize signature.");return u}function t(s,i){const a=typeof s,c=i.type;switch(c){case"address":return e.validate(s,{strict:!1});case"bool":return a==="boolean";case"function":return a==="string";case"string":return a==="string";default:return c==="tuple"&&"components"in i?Object.values(i.components).every((u,l)=>t(Object.values(s)[l],u)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(c)?a==="number"||a==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(c)?a==="string"||s instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(c)?Array.isArray(s)&&s.every(u=>t(u,{...i,type:c.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function o(s,i,a){for(const c in s){const u=s[c],l=i[c];if(u.type==="tuple"&&l.type==="tuple"&&"components"in u&&"components"in l)return o(u.components,l.components,a[c]);const f=[u.type,l.type];if(f.includes("address")&&f.includes("bytes20")?!0:f.includes("address")&&f.includes("string")?e.validate(a[c],{strict:!1}):f.includes("address")&&f.includes("bytes")?e.validate(a[c],{strict:!1}):!1)return f}}return En}var ty;function P_(){if(ty)return Ke;ty=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.InvalidSelectorSizeError=Ke.NotFoundError=Ke.AmbiguityError=void 0,Ke.format=s,Ke.from=i,Ke.fromAbi=a,Ke.getSelector=c,Ke.getSignature=u,Ke.getSignatureHash=l;const e=br(),r=lt(),n=Wf(),t=Ne(),o=N6();function s(h){return e.formatAbiItem(h)}function i(h,b={}){const{prepare:v=!0}=b,_=Array.isArray(h)||typeof h=="string"?e.parseAbiItem(h):h;return{..._,...v?{hash:l(_)}:{}}}function a(h,b,v){const{args:_=[],prepare:g=!0}=v??{},P=t.validate(b,{strict:!1}),d=h.filter(p=>P?p.type==="function"||p.type==="error"?c(p)===t.slice(b,0,4):p.type==="event"?l(p)===b:!1:"name"in p&&p.name===b);if(d.length===0)throw new m({name:b});if(d.length===1)return{...d[0],...g?{hash:l(d[0])}:{}};let w;for(const p of d){if(!("inputs"in p))continue;if(!_||_.length===0){if(!p.inputs||p.inputs.length===0)return{...p,...g?{hash:l(p)}:{}};continue}if(!p.inputs||p.inputs.length===0||p.inputs.length!==_.length)continue;if(_.every((A,T)=>{const C="inputs"in p&&p.inputs[T];return C?o.isArgOfType(A,C):!1})){if(w&&"inputs"in w&&w.inputs){const A=o.getAmbiguousTypes(p.inputs,w.inputs,_);if(A)throw new f({abiItem:p,type:A[0]},{abiItem:w,type:A[1]})}w=p}}const E=(()=>{if(w)return w;const[p,...S]=d;return{...p,overloads:S}})();if(!E)throw new m({name:b});return{...E,...g?{hash:l(E)}:{}}}function c(...h){const b=(()=>{if(Array.isArray(h[0])){const[v,_]=h;return a(v,_)}return h[0]})();return t.slice(l(b),0,4)}function u(...h){const b=(()=>{if(Array.isArray(h[0])){const[_,g]=h;return a(_,g)}return h[0]})(),v=typeof b=="string"?b:e.formatAbiItem(b);return o.normalizeSignature(v)}function l(...h){const b=(()=>{if(Array.isArray(h[0])){const[v,_]=h;return a(v,_)}return h[0]})();return typeof b!="string"&&"hash"in b&&b.hash?b.hash:n.keccak256(t.fromString(u(b)))}class f extends r.BaseError{constructor(b,v){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${b.type}\` in \`${o.normalizeSignature(e.formatAbiItem(b.abiItem))}\`, and`,`\`${v.type}\` in \`${o.normalizeSignature(e.formatAbiItem(v.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}Ke.AmbiguityError=f;class m extends r.BaseError{constructor({name:b,data:v,type:_="item"}){const g=b?` with name "${b}"`:v?` with data "${v}"`:"";super(`ABI ${_}${g} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}Ke.NotFoundError=m;class y extends r.BaseError{constructor({data:b}){super(`Selector size is invalid. Expected 4 bytes. Received ${t.size(b)} bytes ("${b}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}return Ke.InvalidSelectorSizeError=y,Ke}var ry;function $6(){if(ry)return lr;ry=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.decode=o,lr.encode=s,lr.format=i,lr.from=a,lr.fromAbi=c;const e=br(),r=P_(),n=fi(),t=Ne();function o(...u){var h;const[l,f]=(()=>{if(Array.isArray(u[0])){const[b,v]=u;return[c(b),v]}return u})(),{bytecode:m}=f;if(((h=l.inputs)==null?void 0:h.length)===0)return;const y=f.data.replace(m,"0x");return n.decode(l.inputs,y)}function s(...u){var h;const[l,f]=(()=>{if(Array.isArray(u[0])){const[b,v]=u;return[c(b),v]}return u})(),{bytecode:m,args:y}=f;return t.concat(m,(h=l.inputs)!=null&&h.length&&(y!=null&&y.length)?n.encode(l.inputs,y):"0x")}function i(u){return e.formatAbiItem(u)}function a(u){return r.from(u)}function c(u){const l=u.find(f=>f.type==="constructor");if(!l)throw new r.NotFoundError({name:"constructor"});return l}return lr}var Pt={},ny;function z6(){if(ny)return Pt;ny=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.decodeData=o,Pt.decodeResult=s,Pt.encodeData=i,Pt.encodeResult=a,Pt.format=c,Pt.from=u,Pt.fromAbi=l,Pt.getSelector=f;const e=br(),r=P_(),n=fi(),t=Ne();function o(...m){var _;const[y,h]=(()=>{if(Array.isArray(m[0])){const[g,P,d]=m;return[l(g,P),d]}return m})(),{overloads:b}=y;if(t.size(h)<4)throw new r.InvalidSelectorSizeError({data:h});if(((_=y.inputs)==null?void 0:_.length)===0)return;const v=b?l([y,...b],h):y;if(!(t.size(h)<=4))return n.decode(v.inputs,t.slice(h,4))}function s(...m){const[y,h,b={}]=(()=>{if(Array.isArray(m[0])){const[_,g,P,d]=m;return[l(_,g),P,d]}return m})(),v=n.decode(y.outputs,h,b);if(!(v&&Object.keys(v).length===0))return v&&Object.keys(v).length===1?Array.isArray(v)?v[0]:Object.values(v)[0]:v}function i(...m){const[y,h=[]]=(()=>{if(Array.isArray(m[0])){const[w,E,p]=m;return[l(w,E,{args:p}),p]}const[P,d]=m;return[P,d]})(),{overloads:b}=y,v=b?l([y,...b],y.name,{args:h}):y,_=f(v),g=h.length>0?n.encode(v.inputs,h):void 0;return g?t.concat(_,g):_}function a(...m){const[y,h,b={}]=(()=>{if(Array.isArray(m[0])){const[g,P,d,w]=m;return[l(g,P),d,w]}return m})(),{as:v="Array"}=b,_=y.outputs.length===1?[h]:Array.isArray(h)?h:v==="Object"?Object.values(h):[h];return n.encode(y.outputs,_)}function c(m){return e.formatAbiItem(m)}function u(m,y={}){return r.from(m,y)}function l(m,y,h){const b=r.fromAbi(m,y,h);if(b.type!=="function")throw new r.NotFoundError({name:y,type:"function"});return b}function f(m){return r.getSelector(m)}return Pt}var Ur={},oy;function A_(){return oy||(oy=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.zeroAddress=Ur.ethAddress=void 0,Ur.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Ur.zeroAddress="0x0000000000000000000000000000000000000000"),Ur}var iy;function U6(){if(iy)return ac;iy=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.simulateCalls=f;const e=$6(),r=z6(),n=Ie(),t=A_(),o=ni(),s=ue(),i=Le(),a=E_(),c=Fg(),u=w_(),l="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function f(m,y){const{blockNumber:h,blockTag:b,calls:v,stateOverrides:_,traceAssetChanges:g,traceTransfers:P,validation:d}=y,w=y.account?(0,n.parseAccount)(y.account):void 0;if(g&&!w)throw new s.BaseError("`account` is required when `traceAssetChanges` is true");const E=w?e.encode(e.from("constructor(bytes, bytes)"),{bytecode:o.deploylessCallViaBytecodeBytecode,args:[l,r.encodeData(r.from("function getBalance(address)"),[w.address])]}):void 0,p=g?await Promise.all(y.calls.map(async V=>{if(!V.data&&!V.abi)return;const{accessList:Y}=await(0,c.createAccessList)(m,{account:w.address,...V,data:V.abi?(0,i.encodeFunctionData)(V):V.data});return Y.map(({address:te,storageKeys:Z})=>Z.length>0?te:null)})).then(V=>V.flat().filter(Boolean)):[],S=await(0,u.simulateBlocks)(m,{blockNumber:h,blockTag:b,blocks:[...g?[{calls:[{data:E}],stateOverrides:_},{calls:p.map((V,Y)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:V,from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[],{calls:[...v,{to:t.zeroAddress}].map(V=>({...V,from:w==null?void 0:w.address})),stateOverrides:_},...g?[{calls:[{data:E}]},{calls:p.map((V,Y)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:V,from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:p.map((V,Y)=>({to:V,abi:[r.from("function decimals() returns (uint256)")],functionName:"decimals",from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:p.map((V,Y)=>({to:V,abi:[r.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:p.map((V,Y)=>({to:V,abi:[r.from("function symbol() returns (string)")],functionName:"symbol",from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[]],traceTransfers:P,validation:d}),A=g?S[2]:S[0],[T,C,,I,R,q,F,H]=g?S:[],{calls:j,...k}=A,B=j.slice(0,-1)??[],O=(T==null?void 0:T.calls)??[],x=(C==null?void 0:C.calls)??[],M=[...O,...x].map(V=>V.status==="success"?(0,a.hexToBigInt)(V.data):null),N=(I==null?void 0:I.calls)??[],z=(R==null?void 0:R.calls)??[],$=[...N,...z].map(V=>V.status==="success"?(0,a.hexToBigInt)(V.data):null),U=((q==null?void 0:q.calls)??[]).map(V=>V.status==="success"?V.result:null),G=((H==null?void 0:H.calls)??[]).map(V=>V.status==="success"?V.result:null),J=((F==null?void 0:F.calls)??[]).map(V=>V.status==="success"?V.result:null),K=[];for(const[V,Y]of $.entries()){const te=M[V];if(typeof Y!="bigint"||typeof te!="bigint")continue;const Z=U[V-1],X=G[V-1],Q=J[V-1],ne=V===0?{address:t.ethAddress,decimals:18,symbol:"ETH"}:{address:p[V-1],decimals:Q||Z?Number(Z??1):void 0,symbol:X??void 0};K.some(re=>re.token.address===ne.address)||K.push({token:ne,value:{pre:te,post:Y,diff:Y-te}})}return{assetChanges:K,block:k,results:B}}return ac}var jn={},No={},rf={},ay;function L6(){return ay||(ay=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.universalSignatureValidatorAbi=e.universalSignatureValidatorBytecode=e.magicBytes=void 0,e.assert=o,e.from=s,e.unwrap=i,e.wrap=a,e.validate=c;const r=fi(),n=lt(),t=Ne();e.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",e.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",e.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function o(l){if(t.slice(l,-32)!==e.magicBytes)throw new u(l)}function s(l){return typeof l=="string"?i(l):l}function i(l){o(l);const[f,m,y]=r.decode(r.from("address, bytes, bytes"),l);return{data:m,signature:y,to:f}}function a(l){const{data:f,signature:m,to:y}=l;return t.concat(r.encode(r.from("address, bytes, bytes"),[y,f,m]),e.magicBytes)}function c(l){try{return o(l),!0}catch{return!1}}class u extends n.BaseError{constructor(f){super(`Value \`${f}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=u})(rf)),rf}var sy;function D6(){return sy||(sy=1,Object.defineProperty(No,"__esModule",{value:!0}),No.SignatureErc6492=void 0,No.SignatureErc6492=L6()),No}var sc={},cy;function T_(){if(cy)return sc;cy=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.serializeSignature=t;const e=Xr(),r=Be(),n=Ee();function t({r:o,s,to:i="hex",v:a,yParity:c}){const u=(()=>{if(c===0||c===1)return c;if(a&&(a===27n||a===28n||a>=35n))return a%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(o),(0,r.hexToBigInt)(s)).toCompactHex()}${u===0?"1b":"1c"}`;return i==="hex"?l:(0,n.hexToBytes)(l)}return sc}var uy;function dd(){if(uy)return jn;uy=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.verifyHash=d,jn.verifyErc8010=w,jn.verifyErc1271=p;const e=D6(),r=cd(),n=kt(),t=ni(),o=pr(),s=ii(),i=Le(),a=Je(),c=gt(),u=Dg(),l=qe(),f=Ze(),m=Be(),y=oe(),h=me(),b=vr(),v=T_(),_=On(),g=Hf(),P=Ht();async function d(A,T){var k,B,O,x;const{address:C,chain:I=A.chain,hash:R,erc6492VerifierAddress:q=T.universalSignatureVerifierAddress??((B=(k=I==null?void 0:I.contracts)==null?void 0:k.erc6492Verifier)==null?void 0:B.address),multicallAddress:F=T.multicallAddress??((x=(O=I==null?void 0:I.contracts)==null?void 0:O.multicall3)==null?void 0:x.address),mode:H="auto"}=T;if(I!=null&&I.verifyHash)return await I.verifyHash(A,T);const j=(()=>{const M=T.signature;return(0,f.isHex)(M)?M:typeof M=="object"&&"r"in M&&"s"in M?(0,v.serializeSignature)(M):(0,y.bytesToHex)(M)})();try{if(H==="eoa")try{if((0,c.isAddressEqual)((0,a.getAddress)(C),await(0,b.recoverAddress)({hash:R,signature:j})))return!0}catch{}return r.SignatureErc8010.validate(j)?await w(A,{...T,multicallAddress:F,signature:j}):await E(A,{...T,verifierAddress:q,signature:j})}catch(M){if(H!=="eoa")try{if((0,c.isAddressEqual)((0,a.getAddress)(C),await(0,b.recoverAddress)({hash:R,signature:j})))return!0}catch{}if(M instanceof S)return!1;throw M}}async function w(A,T){var $;const{address:C,blockNumber:I,blockTag:R,hash:q,multicallAddress:F}=T,{authorization:H,data:j,signature:k,to:B}=r.SignatureErc8010.unwrap(T.signature);if(await(0,g.getCode)(A,{address:C,blockNumber:I,blockTag:R})===(0,l.concatHex)(["0xef0100",H.address]))return await p(A,{address:C,blockNumber:I,blockTag:R,hash:q,signature:k});const x={address:H.address,chainId:Number(H.chainId),nonce:Number(H.nonce),r:(0,y.numberToHex)(H.r,{size:32}),s:(0,y.numberToHex)(H.s,{size:32}),yParity:H.yParity};if(!await(0,u.verifyAuthorization)({address:C,authorization:x}))throw new S;const N=await(0,h.getAction)(A,P.readContract,"readContract")({...F?{address:F}:{code:t.multicall3Bytecode},authorizationList:[x],abi:n.multicall3Abi,blockNumber:I,blockTag:"pending",functionName:"aggregate3",args:[[...j?[{allowFailure:!0,target:B??C,callData:j}]:[],{allowFailure:!0,target:C,callData:(0,i.encodeFunctionData)({abi:n.erc1271Abi,functionName:"isValidSignature",args:[q,k]})}]]}),z=($=N[N.length-1])==null?void 0:$.returnData;if(z!=null&&z.startsWith("0x1626ba7e"))return!0;throw new S}async function E(A,T){const{address:C,factory:I,factoryData:R,hash:q,signature:F,verifierAddress:H,...j}=T,k=await(async()=>!I&&!R||e.SignatureErc6492.validate(F)?F:e.SignatureErc6492.wrap({data:R,signature:F,to:I}))(),B=H?{to:H,data:(0,i.encodeFunctionData)({abi:n.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[C,q,k]}),...j}:{data:(0,s.encodeDeployData)({abi:n.erc6492SignatureValidatorAbi,args:[C,q,k],bytecode:t.erc6492SignatureValidatorByteCode}),...j},{data:O}=await(0,h.getAction)(A,_.call,"call")(B).catch(x=>{throw x instanceof o.CallExecutionError?new S:x});if((0,m.hexToBool)(O??"0x0"))return!0;throw new S}async function p(A,T){const{address:C,blockNumber:I,blockTag:R,hash:q,signature:F}=T;if((await(0,h.getAction)(A,P.readContract,"readContract")({address:C,abi:n.erc1271Abi,args:[q,F],blockNumber:I,blockTag:R,functionName:"isValidSignature"}).catch(j=>{throw j instanceof o.ContractFunctionExecutionError?new S:j})).startsWith("0x1626ba7e"))return!0;throw new S}class S extends Error{}return jn}var cc={},dy;function G6(){if(dy)return cc;dy=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.verifyMessage=t;const e=me(),r=ui(),n=dd();async function t(o,{address:s,message:i,factory:a,factoryData:c,signature:u,...l}){const f=(0,r.hashMessage)(i);return(0,e.getAction)(o,n.verifyHash,"verifyHash")({address:s,factory:a,factoryData:c,hash:f,signature:u,...l})}return cc}var uc={},fy;function V6(){if(fy)return uc;fy=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.verifyTypedData=t;const e=me(),r=di(),n=dd();async function t(o,s){const{address:i,factory:a,factoryData:c,signature:u,message:l,primaryType:f,types:m,domain:y,...h}=s,b=(0,r.hashTypedData)({message:l,primaryType:f,types:m,domain:y});return(0,e.getAction)(o,n.verifyHash,"verifyHash")({address:i,factory:a,factoryData:c,hash:b,signature:u,...h})}return uc}var dc={},fc={},ly;function S_(){if(ly)return fc;ly=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.watchBlockNumber=i;const e=Be(),r=me(),n=en(),t=Cn(),o=Fe(),s=si();function i(a,{emitOnBegin:c=!1,emitMissed:u=!1,onBlockNumber:l,onError:f,poll:m,pollingInterval:y=a.pollingInterval}){const h=typeof m<"u"?m:!(a.transport.type==="webSocket"||a.transport.type==="ipc"||a.transport.type==="fallback"&&(a.transport.transports[0].config.type==="webSocket"||a.transport.transports[0].config.type==="ipc"));let b;return h?(()=>{const g=(0,o.stringify)(["watchBlockNumber",a.uid,c,u,y]);return(0,n.observe)(g,{onBlockNumber:l,onError:f},P=>(0,t.poll)(async()=>{var d;try{const w=await(0,r.getAction)(a,s.getBlockNumber,"getBlockNumber")({cacheTime:0});if(b!==void 0){if(w===b)return;if(w-b>1&&u)for(let E=b+1n;E<w;E++)P.onBlockNumber(E,b),b=E}(b===void 0||w>b)&&(P.onBlockNumber(w,b),b=w)}catch(w){(d=P.onError)==null||d.call(P,w)}},{emitOnBegin:c,interval:y}))})():(()=>{const g=(0,o.stringify)(["watchBlockNumber",a.uid,c,u]);return(0,n.observe)(g,{onBlockNumber:l,onError:f},P=>{let d=!0,w=()=>d=!1;return(async()=>{try{const E=(()=>{if(a.transport.type==="fallback"){const S=a.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return S?S.value:a.transport}return a.transport})(),{unsubscribe:p}=await E.subscribe({params:["newHeads"],onData(S){var T;if(!d)return;const A=(0,e.hexToBigInt)((T=S.result)==null?void 0:T.number);P.onBlockNumber(A,b),b=A},onError(S){var A;(A=P.onError)==null||A.call(P,S)}});w=p,d||w()}catch(E){f==null||f(E)}})(),()=>w()})})()}return fc}var by;function I_(){if(by)return dc;by=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.waitForTransactionReceipt=f;const e=Du(),r=nt(),n=me(),t=en(),o=wf(),s=rd(),i=Fe(),a=Qr(),c=el(),u=j_(),l=S_();async function f(m,y){const{checkReplacement:h=!0,confirmations:b=1,hash:v,onReplaced:_,retryCount:g=6,retryDelay:P=({count:j})=>~~(1<<j)*200,timeout:d=18e4}=y,w=(0,i.stringify)(["waitForTransactionReceipt",m.uid,v]),E=(()=>{var j;return y.pollingInterval?y.pollingInterval:(j=m.chain)!=null&&j.experimental_preconfirmationTime?m.chain.experimental_preconfirmationTime:m.pollingInterval})();let p,S,A,T=!1,C,I;const{promise:R,resolve:q,reject:F}=(0,o.withResolvers)(),H=d?setTimeout(()=>{I==null||I(),C==null||C(),F(new r.WaitForTransactionReceiptTimeoutError({hash:v}))},d):void 0;return C=(0,t.observe)(w,{onReplaced:_,resolve:q,reject:F},async j=>{if(A=await(0,n.getAction)(m,u.getTransactionReceipt,"getTransactionReceipt")({hash:v}).catch(()=>{}),A&&b<=1){clearTimeout(H),j.resolve(A),C==null||C();return}I=(0,n.getAction)(m,l.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:E,async onBlockNumber(k){const B=x=>{clearTimeout(H),I==null||I(),x(),C==null||C()};let O=k;if(!T)try{if(A){if(b>1&&(!A.blockNumber||O-A.blockNumber+1n<b))return;B(()=>j.resolve(A));return}if(h&&!p&&(T=!0,await(0,s.withRetry)(async()=>{p=await(0,n.getAction)(m,c.getTransaction,"getTransaction")({hash:v}),p.blockNumber&&(O=p.blockNumber)},{delay:P,retryCount:g}),T=!1),A=await(0,n.getAction)(m,u.getTransactionReceipt,"getTransactionReceipt")({hash:v}),b>1&&(!A.blockNumber||O-A.blockNumber+1n<b))return;B(()=>j.resolve(A))}catch(x){if(x instanceof r.TransactionNotFoundError||x instanceof r.TransactionReceiptNotFoundError){if(!p){T=!1;return}try{S=p,T=!0;const M=await(0,s.withRetry)(()=>(0,n.getAction)(m,a.getBlock,"getBlock")({blockNumber:O,includeTransactions:!0}),{delay:P,retryCount:g,shouldRetry:({error:$})=>$ instanceof e.BlockNotFoundError});T=!1;const N=M.transactions.find(({from:$,nonce:U})=>$===S.from&&U===S.nonce);if(!N||(A=await(0,n.getAction)(m,u.getTransactionReceipt,"getTransactionReceipt")({hash:N.hash}),b>1&&(!A.blockNumber||O-A.blockNumber+1n<b)))return;let z="replaced";N.to===S.to&&N.value===S.value&&N.input===S.input?z="repriced":N.from===N.to&&N.value===0n&&(z="cancelled"),B(()=>{var $;($=j.onReplaced)==null||$.call(j,{reason:z,replacedTransaction:S,transaction:N,transactionReceipt:A}),j.resolve(A)})}catch(M){B(()=>j.reject(M))}}else B(()=>j.reject(x))}}})}),R}return dc}var lc={},my;function W6(){if(my)return lc;my=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.watchBlocks=s;const e=me(),r=en(),n=Cn(),t=Fe(),o=Qr();function s(i,{blockTag:a=i.experimental_blockTag??"latest",emitMissed:c=!1,emitOnBegin:u=!1,onBlock:l,onError:f,includeTransactions:m,poll:y,pollingInterval:h=i.pollingInterval}){const b=typeof y<"u"?y:!(i.transport.type==="webSocket"||i.transport.type==="ipc"||i.transport.type==="fallback"&&(i.transport.transports[0].config.type==="webSocket"||i.transport.transports[0].config.type==="ipc")),v=m??!1;let _;return b?(()=>{const d=(0,t.stringify)(["watchBlocks",i.uid,a,c,u,v,h]);return(0,r.observe)(d,{onBlock:l,onError:f},w=>(0,n.poll)(async()=>{var E;try{const p=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockTag:a,includeTransactions:v});if(p.number!==null&&(_==null?void 0:_.number)!=null){if(p.number===_.number)return;if(p.number-_.number>1&&c)for(let S=(_==null?void 0:_.number)+1n;S<p.number;S++){const A=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockNumber:S,includeTransactions:v});w.onBlock(A,_),_=A}}((_==null?void 0:_.number)==null||a==="pending"&&(p==null?void 0:p.number)==null||p.number!==null&&p.number>_.number)&&(w.onBlock(p,_),_=p)}catch(p){(E=w.onError)==null||E.call(w,p)}},{emitOnBegin:u,interval:h}))})():(()=>{let d=!0,w=!0,E=()=>d=!1;return(async()=>{try{u&&(0,e.getAction)(i,o.getBlock,"getBlock")({blockTag:a,includeTransactions:v}).then(A=>{d&&w&&(l(A,void 0),w=!1)}).catch(f);const p=(()=>{if(i.transport.type==="fallback"){const A=i.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return A?A.value:i.transport}return i.transport})(),{unsubscribe:S}=await p.subscribe({params:["newHeads"],async onData(A){var C;if(!d)return;const T=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockNumber:(C=A.result)==null?void 0:C.number,includeTransactions:v}).catch(()=>{});d&&(l(T,_),w=!1,_=T)},onError(A){f==null||f(A)}});E=S,d||E()}catch(p){f==null||f(p)}})(),()=>E()})()}return lc}var bc={},hy;function K6(){if(hy)return bc;hy=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.watchEvent=h;const e=Se(),r=gr(),n=ti(),t=Zr(),o=qt(),s=me(),i=en(),a=Cn(),c=Fe(),u=Ng(),l=si(),f=Qu(),m=vf(),y=ed();function h(b,{address:v,args:_,batch:g=!0,event:P,events:d,fromBlock:w,onError:E,onLogs:p,poll:S,pollingInterval:A=b.pollingInterval,strict:T}){const C=typeof S<"u"?S:typeof w=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="ipc"||b.transport.type==="fallback"&&(b.transport.transports[0].config.type==="webSocket"||b.transport.transports[0].config.type==="ipc")),I=T??!1;return C?(()=>{const F=(0,c.stringify)(["watchEvent",v,_,g,b.uid,P,A,w]);return(0,i.observe)(F,{onLogs:p,onError:E},H=>{let j;w!==void 0&&(j=w-1n);let k,B=!1;const O=(0,a.poll)(async()=>{var x;if(!B){try{k=await(0,s.getAction)(b,u.createEventFilter,"createEventFilter")({address:v,args:_,event:P,events:d,strict:I,fromBlock:w})}catch{}B=!0;return}try{let M;if(k)M=await(0,s.getAction)(b,f.getFilterChanges,"getFilterChanges")({filter:k});else{const N=await(0,s.getAction)(b,l.getBlockNumber,"getBlockNumber")({});j&&j!==N?M=await(0,s.getAction)(b,m.getLogs,"getLogs")({address:v,args:_,event:P,events:d,fromBlock:j+1n,toBlock:N}):M=[],j=N}if(M.length===0)return;if(g)H.onLogs(M);else for(const N of M)H.onLogs([N])}catch(M){k&&M instanceof r.InvalidInputRpcError&&(B=!1),(x=H.onError)==null||x.call(H,M)}},{emitOnBegin:!0,interval:A});return async()=>{k&&await(0,s.getAction)(b,y.uninstallFilter,"uninstallFilter")({filter:k}),O()}})})():(()=>{let F=!0,H=()=>F=!1;return(async()=>{try{const j=(()=>{if(b.transport.type==="fallback"){const x=b.transport.transports.find(M=>M.config.type==="webSocket"||M.config.type==="ipc");return x?x.value:b.transport}return b.transport})(),k=d??(P?[P]:void 0);let B=[];k&&(B=[k.flatMap(M=>(0,t.encodeEventTopics)({abi:[M],eventName:M.name,args:_}))],P&&(B=B[0]));const{unsubscribe:O}=await j.subscribe({params:["logs",{address:v,topics:B}],onData(x){var N;if(!F)return;const M=x.result;try{const{eventName:z,args:$}=(0,n.decodeEventLog)({abi:k??[],data:M.data,topics:M.topics,strict:I}),U=(0,o.formatLog)(M,{args:$,eventName:z});p([U])}catch(z){let $,U;if(z instanceof e.DecodeLogDataMismatch||z instanceof e.DecodeLogTopicsMismatch){if(T)return;$=z.abiItem.name,U=(N=z.abiItem.inputs)==null?void 0:N.some(J=>!("name"in J&&J.name))}const G=(0,o.formatLog)(M,{args:U?[]:{},eventName:$});p([G])}},onError(x){E==null||E(x)}});H=O,F||H()}catch(j){E==null||E(j)}})(),()=>H()})()}return bc}var mc={},yy;function Z6(){if(yy)return mc;yy=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.watchPendingTransactions=a;const e=me(),r=en(),n=Cn(),t=Fe(),o=$g(),s=Qu(),i=ed();function a(c,{batch:u=!0,onError:l,onTransactions:f,poll:m,pollingInterval:y=c.pollingInterval}){return(typeof m<"u"?m:c.transport.type!=="webSocket"&&c.transport.type!=="ipc")?(()=>{const _=(0,t.stringify)(["watchPendingTransactions",c.uid,u,y]);return(0,r.observe)(_,{onTransactions:f,onError:l},g=>{let P;const d=(0,n.poll)(async()=>{var w;try{if(!P)try{P=await(0,e.getAction)(c,o.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(p){throw d(),p}const E=await(0,e.getAction)(c,s.getFilterChanges,"getFilterChanges")({filter:P});if(E.length===0)return;if(u)g.onTransactions(E);else for(const p of E)g.onTransactions([p])}catch(E){(w=g.onError)==null||w.call(g,E)}},{emitOnBegin:!0,interval:y});return async()=>{P&&await(0,e.getAction)(c,i.uninstallFilter,"uninstallFilter")({filter:P}),d()}})})():(()=>{let _=!0,g=()=>_=!1;return(async()=>{try{const{unsubscribe:P}=await c.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!_)return;const w=d.result;f([w])},onError(d){l==null||l(d)}});g=P,_||g()}catch(P){l==null||l(P)}})(),()=>g()})()}return mc}var hc={},yc={},py;function J6(){if(py)return yc;py=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.parseSiweMessage=e;function e(t){var h,b,v;const{scheme:o,statement:s,...i}=((h=t.match(r))==null?void 0:h.groups)??{},{chainId:a,expirationTime:c,issuedAt:u,notBefore:l,requestId:f,...m}=((b=t.match(n))==null?void 0:b.groups)??{},y=(v=t.split("Resources:")[1])==null?void 0:v.split(`
47
+ - `).slice(1);return{...i,...m,...a?{chainId:Number(a)}:{},...c?{expirationTime:new Date(c)}:{},...u?{issuedAt:new Date(u)}:{},...l?{notBefore:new Date(l)}:{},...f?{requestId:f}:{},...y?{resources:y}:{},...o?{scheme:o}:{},...s?{statement:s}:{}}}const r=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,n=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;return yc}var pc={},gy;function Y6(){if(gy)return pc;gy=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.validateSiweMessage=n;const e=rt(),r=gt();function n(t){const{address:o,domain:s,message:i,nonce:a,scheme:c,time:u=new Date}=t;if(s&&i.domain!==s||a&&i.nonce!==a||c&&i.scheme!==c||i.expirationTime&&u>=i.expirationTime||i.notBefore&&u<i.notBefore)return!1;try{if(!i.address||!(0,e.isAddress)(i.address,{strict:!1})||o&&!(0,r.isAddressEqual)(i.address,o))return!1}catch{return!1}return!0}return pc}var _y;function X6(){if(_y)return hc;_y=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.verifySiweMessage=o;const e=ui(),r=J6(),n=Y6(),t=dd();async function o(s,i){const{address:a,domain:c,message:u,nonce:l,scheme:f,signature:m,time:y=new Date,...h}=i,b=(0,r.parseSiweMessage)(u);if(!b.address||!(0,n.validateSiweMessage)({address:a,domain:c,message:b,nonce:l,scheme:f,time:y}))return!1;const _=(0,e.hashMessage)(u);return(0,t.verifyHash)(s,{address:b.address,hash:_,signature:m,...h})}return hc}var gc={},vy;function tl(){if(vy)return gc;vy=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.sendRawTransactionSync=n;const e=nt(),r=xn();async function n(t,{serializedTransaction:o,throwOnReceiptRevert:s,timeout:i}){var l,f,m;const a=await t.request({method:"eth_sendRawTransactionSync",params:i?[o,i]:[o]},{retryCount:0}),u=(((m=(f=(l=t.chain)==null?void 0:l.formatters)==null?void 0:f.transactionReceipt)==null?void 0:m.format)||r.formatTransactionReceipt)(a);if(u.status==="reverted"&&s)throw new e.TransactionReceiptRevertedError({receipt:u});return u}return gc}var Ey;function R_(){if(Ey)return Ja;Ey=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.publicActions=ge;const e=a6(),r=u6(),n=d6(),t=f6(),o=Hg(),s=On(),i=Fg(),a=l6(),c=cf(),u=Ng(),l=$g(),f=Ag(),m=vg(),y=_f(),h=_g(),b=gf(),v=b6(),_=m6(),g=Qr(),P=si(),d=h6(),w=y6(),E=jr(),p=Hf(),S=Ef(),A=p6(),T=_6(),C=E6(),I=Qu(),R=j6(),q=mf(),F=vf(),H=M6(),j=k6(),k=el(),B=H6(),O=Vu(),x=j_(),M=F6(),N=Ht(),z=w_(),$=U6(),U=Rg(),G=ed(),J=dd(),K=G6(),V=V6(),Y=I_(),te=S_(),Z=W6(),X=Og(),Q=K6(),ne=Z6(),re=X6(),ae=ei(),ce=Rf(),he=tl();function ge(ee){return{call:W=>(0,s.call)(ee,W),createAccessList:W=>(0,i.createAccessList)(ee,W),createBlockFilter:()=>(0,a.createBlockFilter)(ee),createContractEventFilter:W=>(0,c.createContractEventFilter)(ee,W),createEventFilter:W=>(0,u.createEventFilter)(ee,W),createPendingTransactionFilter:()=>(0,l.createPendingTransactionFilter)(ee),estimateContractGas:W=>(0,f.estimateContractGas)(ee,W),estimateGas:W=>(0,y.estimateGas)(ee,W),getBalance:W=>(0,v.getBalance)(ee,W),getBlobBaseFee:()=>(0,_.getBlobBaseFee)(ee),getBlock:W=>(0,g.getBlock)(ee,W),getBlockNumber:W=>(0,P.getBlockNumber)(ee,W),getBlockReceipts:W=>(0,d.getBlockReceipts)(ee,W),getBlockTransactionCount:W=>(0,w.getBlockTransactionCount)(ee,W),getBytecode:W=>(0,p.getCode)(ee,W),getChainId:()=>(0,E.getChainId)(ee),getCode:W=>(0,p.getCode)(ee,W),getContractEvents:W=>(0,S.getContractEvents)(ee,W),getDelegation:W=>(0,A.getDelegation)(ee,W),getEip712Domain:W=>(0,T.getEip712Domain)(ee,W),getEnsAddress:W=>(0,e.getEnsAddress)(ee,W),getEnsAvatar:W=>(0,r.getEnsAvatar)(ee,W),getEnsName:W=>(0,n.getEnsName)(ee,W),getEnsResolver:W=>(0,t.getEnsResolver)(ee,W),getEnsText:W=>(0,o.getEnsText)(ee,W),getFeeHistory:W=>(0,C.getFeeHistory)(ee,W),estimateFeesPerGas:W=>(0,m.estimateFeesPerGas)(ee,W),getFilterChanges:W=>(0,I.getFilterChanges)(ee,W),getFilterLogs:W=>(0,R.getFilterLogs)(ee,W),getGasPrice:()=>(0,q.getGasPrice)(ee),getLogs:W=>(0,F.getLogs)(ee,W),getProof:W=>(0,H.getProof)(ee,W),estimateMaxPriorityFeePerGas:W=>(0,h.estimateMaxPriorityFeePerGas)(ee,W),fillTransaction:W=>(0,b.fillTransaction)(ee,W),getStorageAt:W=>(0,j.getStorageAt)(ee,W),getTransaction:W=>(0,k.getTransaction)(ee,W),getTransactionConfirmations:W=>(0,B.getTransactionConfirmations)(ee,W),getTransactionCount:W=>(0,O.getTransactionCount)(ee,W),getTransactionReceipt:W=>(0,x.getTransactionReceipt)(ee,W),multicall:W=>(0,M.multicall)(ee,W),prepareTransactionRequest:W=>(0,ae.prepareTransactionRequest)(ee,W),readContract:W=>(0,N.readContract)(ee,W),sendRawTransaction:W=>(0,ce.sendRawTransaction)(ee,W),sendRawTransactionSync:W=>(0,he.sendRawTransactionSync)(ee,W),simulate:W=>(0,z.simulateBlocks)(ee,W),simulateBlocks:W=>(0,z.simulateBlocks)(ee,W),simulateCalls:W=>(0,$.simulateCalls)(ee,W),simulateContract:W=>(0,U.simulateContract)(ee,W),verifyHash:W=>(0,J.verifyHash)(ee,W),verifyMessage:W=>(0,K.verifyMessage)(ee,W),verifySiweMessage:W=>(0,re.verifySiweMessage)(ee,W),verifyTypedData:W=>(0,V.verifyTypedData)(ee,W),uninstallFilter:W=>(0,G.uninstallFilter)(ee,W),waitForTransactionReceipt:W=>(0,Y.waitForTransactionReceipt)(ee,W),watchBlocks:W=>(0,Z.watchBlocks)(ee,W),watchBlockNumber:W=>(0,te.watchBlockNumber)(ee,W),watchContractEvent:W=>(0,X.watchContractEvent)(ee,W),watchEvent:W=>(0,Q.watchEvent)(ee,W),watchPendingTransactions:W=>(0,ne.watchPendingTransactions)(ee,W)}}return Ja}var jy;function Q6(){if(jy)return Za;jy=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.createPublicClient=n;const e=nd(),r=R_();function n(t){const{key:o="public",name:s="Public Client"}=t;return(0,e.createClient)({...t,key:o,name:s,type:"publicClient"}).extend(r.publicActions)}return Za}var _c={},vc={},Ec={},wy;function e2(){if(wy)return Ec;wy=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.dropTransaction=e;async function e(r,{hash:n}){await r.request({method:`${r.mode}_dropTransaction`,params:[n]})}return Ec}var jc={},Py;function t2(){if(Py)return jc;Py=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.dumpState=e;async function e(r){return r.request({method:`${r.mode}_dumpState`})}return jc}var wc={},Ay;function r2(){if(Ay)return wc;Ay=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.getAutomine=e;async function e(r){return r.mode==="ganache"?await r.request({method:"eth_mining"}):await r.request({method:`${r.mode}_getAutomine`})}return wc}var Pc={},Ty;function n2(){if(Ty)return Pc;Ty=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.getTxpoolContent=e;async function e(r){return await r.request({method:"txpool_content"})}return Pc}var Ac={},Sy;function o2(){if(Sy)return Ac;Sy=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.getTxpoolStatus=r;const e=Be();async function r(n){const{pending:t,queued:o}=await n.request({method:"txpool_status"});return{pending:(0,e.hexToNumber)(t),queued:(0,e.hexToNumber)(o)}}return Ac}var Tc={},Iy;function i2(){if(Iy)return Tc;Iy=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.impersonateAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_impersonateAccount`,params:[n]})}return Tc}var Sc={},Ry;function a2(){if(Ry)return Sc;Ry=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.increaseTime=r;const e=oe();async function r(n,{seconds:t}){return await n.request({method:"evm_increaseTime",params:[(0,e.numberToHex)(t)]})}return Sc}var Ic={},By;function s2(){if(By)return Ic;By=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.inspectTxpool=e;async function e(r){return await r.request({method:"txpool_inspect"})}return Ic}var Rc={},Oy;function c2(){if(Oy)return Rc;Oy=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.loadState=e;async function e(r,{state:n}){await r.request({method:`${r.mode}_loadState`,params:[n]})}return Rc}var Bc={},Cy;function u2(){if(Cy)return Bc;Cy=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.mine=r;const e=oe();async function r(n,{blocks:t,interval:o}){n.mode==="ganache"?await n.request({method:"evm_mine",params:[{blocks:(0,e.numberToHex)(t)}]}):await n.request({method:`${n.mode}_mine`,params:[(0,e.numberToHex)(t),(0,e.numberToHex)(o||0)]})}return Bc}var Oc={},xy;function d2(){if(xy)return Oc;xy=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.removeBlockTimestampInterval=e;async function e(r){await r.request({method:`${r.mode}_removeBlockTimestampInterval`})}return Oc}var Cc={},qy;function f2(){if(qy)return Cc;qy=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.reset=e;async function e(r,{blockNumber:n,jsonRpcUrl:t}={}){await r.request({method:`${r.mode}_reset`,params:[{forking:{blockNumber:Number(n),jsonRpcUrl:t}}]})}return Cc}var xc={},My;function l2(){if(My)return xc;My=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.revert=e;async function e(r,{id:n}){await r.request({method:"evm_revert",params:[n]})}return xc}var qc={},ky;function b2(){if(ky)return qc;ky=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.sendUnsignedTransaction=n;const e=Er(),r=St();async function n(t,o){var d,w,E;const{accessList:s,data:i,from:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:m,to:y,value:h,...b}=o,v=(E=(w=(d=t.chain)==null?void 0:d.formatters)==null?void 0:w.transactionRequest)==null?void 0:E.format,g=(v||r.formatTransactionRequest)({...(0,e.extract)(b,{format:v}),accessList:s,data:i,from:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:m,to:y,value:h},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[g]})}return qc}var Mc={},Hy;function m2(){if(Hy)return Mc;Hy=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.setAutomine=e;async function e(r,n){r.mode==="ganache"?n?await r.request({method:"miner_start"}):await r.request({method:"miner_stop"}):await r.request({method:"evm_setAutomine",params:[n]})}return Mc}var kc={},Fy;function h2(){if(Fy)return kc;Fy=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.setBalance=r;const e=oe();async function r(n,{address:t,value:o}){n.mode==="ganache"?await n.request({method:"evm_setAccountBalance",params:[t,(0,e.numberToHex)(o)]}):await n.request({method:`${n.mode}_setBalance`,params:[t,(0,e.numberToHex)(o)]})}return kc}var Hc={},Ny;function y2(){if(Ny)return Hc;Ny=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.setBlockGasLimit=r;const e=oe();async function r(n,{gasLimit:t}){await n.request({method:"evm_setBlockGasLimit",params:[(0,e.numberToHex)(t)]})}return Hc}var Fc={},$y;function p2(){if($y)return Fc;$y=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.setBlockTimestampInterval=e;async function e(r,{interval:n}){const t=r.mode==="hardhat"?n*1e3:n;await r.request({method:`${r.mode}_setBlockTimestampInterval`,params:[t]})}return Fc}var Nc={},zy;function g2(){if(zy)return Nc;zy=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.setCode=e;async function e(r,{address:n,bytecode:t}){r.mode==="ganache"?await r.request({method:"evm_setAccountCode",params:[n,t]}):await r.request({method:`${r.mode}_setCode`,params:[n,t]})}return Nc}var $c={},Uy;function _2(){if(Uy)return $c;Uy=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.setCoinbase=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_setCoinbase`,params:[n]})}return $c}var zc={},Ly;function v2(){if(Ly)return zc;Ly=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.setIntervalMining=e;async function e(r,{interval:n}){const t=r.mode==="hardhat"?n*1e3:n;await r.request({method:"evm_setIntervalMining",params:[t]})}return zc}var Uc={},Dy;function E2(){if(Dy)return Uc;Dy=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.setLoggingEnabled=e;async function e(r,n){await r.request({method:`${r.mode}_setLoggingEnabled`,params:[n]})}return Uc}var Lc={},Gy;function j2(){if(Gy)return Lc;Gy=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.setMinGasPrice=r;const e=oe();async function r(n,{gasPrice:t}){await n.request({method:`${n.mode}_setMinGasPrice`,params:[(0,e.numberToHex)(t)]})}return Lc}var Dc={},Vy;function w2(){if(Vy)return Dc;Vy=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.setNextBlockBaseFeePerGas=r;const e=oe();async function r(n,{baseFeePerGas:t}){await n.request({method:`${n.mode}_setNextBlockBaseFeePerGas`,params:[(0,e.numberToHex)(t)]})}return Dc}var Gc={},Wy;function P2(){if(Wy)return Gc;Wy=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.setNextBlockTimestamp=r;const e=oe();async function r(n,{timestamp:t}){await n.request({method:"evm_setNextBlockTimestamp",params:[(0,e.numberToHex)(t)]})}return Gc}var Vc={},Ky;function A2(){if(Ky)return Vc;Ky=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.setNonce=r;const e=oe();async function r(n,{address:t,nonce:o}){await n.request({method:`${n.mode}_setNonce`,params:[t,(0,e.numberToHex)(o)]})}return Vc}var Wc={},Zy;function T2(){if(Zy)return Wc;Zy=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.setRpcUrl=e;async function e(r,n){await r.request({method:`${r.mode}_setRpcUrl`,params:[n]})}return Wc}var Kc={},Jy;function S2(){if(Jy)return Kc;Jy=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.setStorageAt=r;const e=oe();async function r(n,{address:t,index:o,value:s}){await n.request({method:`${n.mode}_setStorageAt`,params:[t,typeof o=="number"?(0,e.numberToHex)(o):o,s]})}return Kc}var Zc={},Yy;function I2(){if(Yy)return Zc;Yy=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.snapshot=e;async function e(r){return await r.request({method:"evm_snapshot"})}return Zc}var Jc={},Xy;function R2(){if(Xy)return Jc;Xy=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.stopImpersonatingAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_stopImpersonatingAccount`,params:[n]})}return Jc}var Qy;function B_(){if(Qy)return vc;Qy=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.testActions=q;const e=e2(),r=t2(),n=r2(),t=n2(),o=o2(),s=i2(),i=a2(),a=s2(),c=c2(),u=u2(),l=d2(),f=f2(),m=l2(),y=b2(),h=m2(),b=h2(),v=y2(),_=p2(),g=g2(),P=_2(),d=v2(),w=E2(),E=j2(),p=w2(),S=P2(),A=A2(),T=T2(),C=S2(),I=I2(),R=R2();function q({mode:F}){return H=>{const j=H.extend(()=>({mode:F}));return{dropTransaction:k=>(0,e.dropTransaction)(j,k),dumpState:()=>(0,r.dumpState)(j),getAutomine:()=>(0,n.getAutomine)(j),getTxpoolContent:()=>(0,t.getTxpoolContent)(j),getTxpoolStatus:()=>(0,o.getTxpoolStatus)(j),impersonateAccount:k=>(0,s.impersonateAccount)(j,k),increaseTime:k=>(0,i.increaseTime)(j,k),inspectTxpool:()=>(0,a.inspectTxpool)(j),loadState:k=>(0,c.loadState)(j,k),mine:k=>(0,u.mine)(j,k),removeBlockTimestampInterval:()=>(0,l.removeBlockTimestampInterval)(j),reset:k=>(0,f.reset)(j,k),revert:k=>(0,m.revert)(j,k),sendUnsignedTransaction:k=>(0,y.sendUnsignedTransaction)(j,k),setAutomine:k=>(0,h.setAutomine)(j,k),setBalance:k=>(0,b.setBalance)(j,k),setBlockGasLimit:k=>(0,v.setBlockGasLimit)(j,k),setBlockTimestampInterval:k=>(0,_.setBlockTimestampInterval)(j,k),setCode:k=>(0,g.setCode)(j,k),setCoinbase:k=>(0,P.setCoinbase)(j,k),setIntervalMining:k=>(0,d.setIntervalMining)(j,k),setLoggingEnabled:k=>(0,w.setLoggingEnabled)(j,k),setMinGasPrice:k=>(0,E.setMinGasPrice)(j,k),setNextBlockBaseFeePerGas:k=>(0,p.setNextBlockBaseFeePerGas)(j,k),setNextBlockTimestamp:k=>(0,S.setNextBlockTimestamp)(j,k),setNonce:k=>(0,A.setNonce)(j,k),setRpcUrl:k=>(0,T.setRpcUrl)(j,k),setStorageAt:k=>(0,C.setStorageAt)(j,k),snapshot:()=>(0,I.snapshot)(j),stopImpersonatingAccount:k=>(0,R.stopImpersonatingAccount)(j,k)}}}return vc}var ep;function B2(){if(ep)return _c;ep=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.createTestClient=n;const e=nd(),r=B_();function n(t){const{key:o="test",name:s="Test Client",mode:i}=t;return(0,e.createClient)({...t,key:o,name:s,type:"testClient"}).extend(c=>({mode:i,...(0,r.testActions)({mode:i})(c)}))}return _c}var Yc={},Xc={},Qc={},tp;function O2(){if(tp)return Qc;tp=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.addChain=r;const e=oe();async function r(n,{chain:t}){const{id:o,name:s,nativeCurrency:i,rpcUrls:a,blockExplorers:c}=t;await n.request({method:"wallet_addEthereumChain",params:[{chainId:(0,e.numberToHex)(o),chainName:s,nativeCurrency:i,rpcUrls:a.default.http,blockExplorerUrls:c?Object.values(c).map(({url:u})=>u):void 0}]},{dedupe:!0,retryCount:0})}return Qc}var eu={},rp;function C2(){if(rp)return eu;rp=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.deployContract=n;const e=ii(),r=td();function n(t,o){const{abi:s,args:i,bytecode:a,...c}=o,u=(0,e.encodeDeployData)({abi:s,args:i,bytecode:a});return(0,r.sendTransaction)(t,{...c,...c.authorizationList?{to:null}:{},data:u})}return eu}var tu={},np;function x2(){if(np)return tu;np=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.getAddresses=r;const e=Je();async function r(n){var o;return((o=n.account)==null?void 0:o.type)==="local"?[n.account.address]:(await n.request({method:"eth_accounts"},{dedupe:!0})).map(s=>(0,e.checksumAddress)(s))}return tu}var ru={},op;function q2(){if(op)return ru;op=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.getCapabilities=n;const e=Ie(),r=oe();async function n(t,o={}){const{account:s=t.account,chainId:i}=o,a=s?(0,e.parseAccount)(s):void 0,c=i?[a==null?void 0:a.address,[(0,r.numberToHex)(i)]]:[a==null?void 0:a.address],u=await t.request({method:"wallet_getCapabilities",params:c}),l={};for(const[f,m]of Object.entries(u)){l[Number(f)]={};for(let[y,h]of Object.entries(m))y==="addSubAccount"&&(y="unstable_addSubAccount"),l[Number(f)][y]=h}return typeof i=="number"?l[i]:l}return ru}var nu={},ip;function M2(){if(ip)return nu;ip=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.getPermissions=e;async function e(r){return await r.request({method:"wallet_getPermissions"},{dedupe:!0})}return nu}var ou={},ap;function O_(){if(ap)return ou;ap=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.prepareAuthorization=i;const e=Ie(),r=Pr(),n=gt(),t=me(),o=jr(),s=Vu();async function i(a,c){var b;const{account:u=a.account,chainId:l,nonce:f}=c;if(!u)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const m=(0,e.parseAccount)(u),y=(()=>{if(c.executor)return c.executor==="self"?c.executor:(0,e.parseAccount)(c.executor)})(),h={address:c.contractAddress??c.address,chainId:l,nonce:f};return typeof h.chainId>"u"&&(h.chainId=((b=a.chain)==null?void 0:b.id)??await(0,t.getAction)(a,o.getChainId,"getChainId")({})),typeof h.nonce>"u"&&(h.nonce=await(0,t.getAction)(a,s.getTransactionCount,"getTransactionCount")({address:m.address,blockTag:"pending"}),(y==="self"||y!=null&&y.address&&(0,n.isAddressEqual)(y.address,m.address))&&(h.nonce+=1)),h}return ou}var iu={},sp;function k2(){if(sp)return iu;sp=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.requestAddresses=r;const e=Je();async function r(n){return(await n.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(o=>(0,e.getAddress)(o))}return iu}var au={},cp;function H2(){if(cp)return au;cp=1,Object.defineProperty(au,"__esModule",{value:!0}),au.requestPermissions=e;async function e(r,n){return r.request({method:"wallet_requestPermissions",params:[n]},{retryCount:0})}return au}var su={},up;function F2(){if(up)return su;up=1,Object.defineProperty(su,"__esModule",{value:!0}),su.sendCallsSync=t;const e=me(),r=Of(),n=Cf();async function t(o,s){const{chain:i=o.chain}=s,a=s.timeout??Math.max(((i==null?void 0:i.blockTime)??0)*3,5e3),c=await(0,e.getAction)(o,r.sendCalls,"sendCalls")(s);return await(0,e.getAction)(o,n.waitForCallsStatus,"waitForCallsStatus")({...s,id:c.id,timeout:a})}return su}var cu={},dp;function C_(){if(dp)return cu;dp=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.sendTransactionSync=g;const e=Ie(),r=Pr(),n=ue(),t=nt(),o=Zo(),s=ci(),i=qe(),a=Qo(),c=Er(),u=St(),l=me(),f=Wr(),m=It(),y=jr(),h=I_(),b=ei(),v=tl(),_=new f.LruMap(128);async function g(P,d){var G,J,K,V,Y,te;const{account:w=P.account,assertChainId:E=!0,chain:p=P.chain,accessList:S,authorizationList:A,blobs:T,data:C,dataSuffix:I=typeof P.dataSuffix=="string"?P.dataSuffix:(G=P.dataSuffix)==null?void 0:G.value,gas:R,gasPrice:q,maxFeePerBlobGas:F,maxFeePerGas:H,maxPriorityFeePerGas:j,nonce:k,pollingInterval:B,throwOnReceiptRevert:O,type:x,value:M,...N}=d,z=d.timeout??Math.max(((p==null?void 0:p.blockTime)??0)*3,5e3);if(typeof w>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});const $=w?(0,e.parseAccount)(w):null;let U;try{(0,m.assertRequest)(d);const Z=await(async()=>{if(d.to)return d.to;if(d.to!==null&&A&&A.length>0)return await(0,o.recoverAuthorizationAddress)({authorization:A[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if(($==null?void 0:$.type)==="json-rpc"||$===null){let X;p!==null&&(X=await(0,l.getAction)(P,y.getChainId,"getChainId")({}),E&&(0,s.assertCurrentChain)({currentChainId:X,chain:p}));const Q=(V=(K=(J=P.chain)==null?void 0:J.formatters)==null?void 0:K.transactionRequest)==null?void 0:V.format,re=(Q||u.formatTransactionRequest)({...(0,c.extract)(N,{format:Q}),accessList:S,account:$,authorizationList:A,blobs:T,chainId:X,data:I?(0,i.concat)([C??"0x",I]):C,gas:R,gasPrice:q,maxFeePerBlobGas:F,maxFeePerGas:H,maxPriorityFeePerGas:j,nonce:k,to:Z,type:x,value:M},"sendTransaction"),ae=_.get(P.uid),ce=ae?"wallet_sendTransaction":"eth_sendTransaction",he=await(async()=>{try{return await P.request({method:ce,params:[re]},{retryCount:0})}catch(ee){if(ae===!1)throw ee;const W=ee;if(W.name==="InvalidInputRpcError"||W.name==="InvalidParamsRpcError"||W.name==="MethodNotFoundRpcError"||W.name==="MethodNotSupportedRpcError")return await P.request({method:"wallet_sendTransaction",params:[re]},{retryCount:0}).then(Ce=>(_.set(P.uid,!0),Ce)).catch(Ce=>{const xe=Ce;throw xe.name==="MethodNotFoundRpcError"||xe.name==="MethodNotSupportedRpcError"?(_.set(P.uid,!1),W):xe});throw W}})(),ge=await(0,l.getAction)(P,h.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:he,pollingInterval:B,timeout:z});if(O&&ge.status==="reverted")throw new t.TransactionReceiptRevertedError({receipt:ge});return ge}if(($==null?void 0:$.type)==="local"){if($.nonceManager&&typeof k>"u"){const re=N.chainId,ae=await(async()=>typeof re=="number"?re:p?p.id:(0,l.getAction)(P,y.getChainId,"getChainId")({}))();U={address:$.address,chainId:ae}}const X=await(0,l.getAction)(P,b.prepareTransactionRequest,"prepareTransactionRequest")({account:$,accessList:S,authorizationList:A,blobs:T,chain:p,data:I?(0,i.concat)([C??"0x",I]):C,gas:R,gasPrice:q,maxFeePerBlobGas:F,maxFeePerGas:H,maxPriorityFeePerGas:j,nonce:k,nonceManager:$.nonceManager,parameters:[...b.defaultParameters,"sidecars"],type:x,value:M,...N,to:Z}),Q=(Y=p==null?void 0:p.serializers)==null?void 0:Y.transaction,ne=await $.signTransaction(X,{serializer:Q});return await(0,l.getAction)(P,v.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:ne,throwOnReceiptRevert:O,timeout:d.timeout})}throw($==null?void 0:$.type)==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:$==null?void 0:$.type})}catch(Z){throw Z instanceof r.AccountTypeNotSupportedError?Z:(U&&!(Z instanceof t.TransactionReceiptRevertedError)&&((te=$==null?void 0:$.nonceManager)==null||te.reset(U)),(0,a.getTransactionError)(Z,{...d,account:$,chain:d.chain||void 0}))}}return cu}var uu={},fp;function N2(){if(fp)return uu;fp=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.showCallsStatus=e;async function e(r,n){const{id:t}=n;await r.request({method:"wallet_showCallsStatus",params:[t]})}return uu}var du={},lp;function $2(){if(lp)return du;lp=1,Object.defineProperty(du,"__esModule",{value:!0}),du.signAuthorization=t;const e=Ie(),r=Pr(),n=O_();async function t(o,s){const{account:i=o.account}=s;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const a=(0,e.parseAccount)(i);if(!a.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:a.type});const c=await(0,n.prepareAuthorization)(o,s);return a.signAuthorization(c)}return du}var fu={},bp;function z2(){if(bp)return fu;bp=1,Object.defineProperty(fu,"__esModule",{value:!0}),fu.signMessage=t;const e=Ie(),r=Pr(),n=oe();async function t(o,{account:s=o.account,message:i}){if(!s)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const a=(0,e.parseAccount)(s);if(a.signMessage)return a.signMessage({message:i});const c=typeof i=="string"?(0,n.stringToHex)(i):i.raw instanceof Uint8Array?(0,n.toHex)(i.raw):i.raw;return o.request({method:"personal_sign",params:[c,a.address]},{retryCount:0})}return fu}var lu={},mp;function U2(){if(mp)return lu;mp=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.signTransaction=c;const e=Ie(),r=Pr(),n=ci(),t=oe(),o=St(),s=me(),i=It(),a=jr();async function c(u,l){var g,P,d,w;const{account:f=u.account,chain:m=u.chain,...y}=l;if(!f)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const h=(0,e.parseAccount)(f);(0,i.assertRequest)({account:h,...l});const b=await(0,s.getAction)(u,a.getChainId,"getChainId")({});m!==null&&(0,n.assertCurrentChain)({currentChainId:b,chain:m});const v=(m==null?void 0:m.formatters)||((g=u.chain)==null?void 0:g.formatters),_=((P=v==null?void 0:v.transactionRequest)==null?void 0:P.format)||o.formatTransactionRequest;return h.signTransaction?h.signTransaction({...y,account:h,chainId:b},{serializer:(w=(d=u.chain)==null?void 0:d.serializers)==null?void 0:w.transaction}):await u.request({method:"eth_signTransaction",params:[{..._({...y,account:h},"signTransaction"),chainId:(0,t.numberToHex)(b),from:h.address}]},{retryCount:0})}return lu}var bu={},hp;function L2(){if(hp)return bu;hp=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.signTypedData=t;const e=Ie(),r=Pr(),n=ad();async function t(o,s){const{account:i=o.account,domain:a,message:c,primaryType:u}=s;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const l=(0,e.parseAccount)(i),f={EIP712Domain:(0,n.getTypesForEIP712Domain)({domain:a}),...s.types};if((0,n.validateTypedData)({domain:a,message:c,primaryType:u,types:f}),l.signTypedData)return l.signTypedData({domain:a,message:c,primaryType:u,types:f});const m=(0,n.serializeTypedData)({domain:a,message:c,primaryType:u,types:f});return o.request({method:"eth_signTypedData_v4",params:[l.address,m]},{retryCount:0})}return bu}var mu={},yp;function D2(){if(yp)return mu;yp=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.switchChain=r;const e=oe();async function r(n,{id:t}){await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,e.numberToHex)(t)}]},{retryCount:0})}return mu}var hu={},pp;function G2(){if(pp)return hu;pp=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.watchAsset=e;async function e(r,n){return await r.request({method:"wallet_watchAsset",params:n},{retryCount:0})}return hu}var yu={},gp;function V2(){if(gp)return yu;gp=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.writeContractSync=n;const e=C_(),r=Bf();async function n(t,o){return r.writeContract.internal(t,e.sendTransactionSync,"sendTransactionSync",o)}return yu}var _p;function x_(){if(_p)return Xc;_p=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.walletActions=I;const e=gf(),r=jr(),n=O2(),t=C2(),o=x2(),s=xg(),i=q2(),a=M2(),c=O_(),u=ei(),l=k2(),f=H2(),m=Of(),y=F2(),h=Rf(),b=tl(),v=td(),_=C_(),g=N2(),P=$2(),d=z2(),w=U2(),E=L2(),p=D2(),S=Cf(),A=G2(),T=Bf(),C=V2();function I(R){return{addChain:q=>(0,n.addChain)(R,q),deployContract:q=>(0,t.deployContract)(R,q),fillTransaction:q=>(0,e.fillTransaction)(R,q),getAddresses:()=>(0,o.getAddresses)(R),getCallsStatus:q=>(0,s.getCallsStatus)(R,q),getCapabilities:q=>(0,i.getCapabilities)(R,q),getChainId:()=>(0,r.getChainId)(R),getPermissions:()=>(0,a.getPermissions)(R),prepareAuthorization:q=>(0,c.prepareAuthorization)(R,q),prepareTransactionRequest:q=>(0,u.prepareTransactionRequest)(R,q),requestAddresses:()=>(0,l.requestAddresses)(R),requestPermissions:q=>(0,f.requestPermissions)(R,q),sendCalls:q=>(0,m.sendCalls)(R,q),sendCallsSync:q=>(0,y.sendCallsSync)(R,q),sendRawTransaction:q=>(0,h.sendRawTransaction)(R,q),sendRawTransactionSync:q=>(0,b.sendRawTransactionSync)(R,q),sendTransaction:q=>(0,v.sendTransaction)(R,q),sendTransactionSync:q=>(0,_.sendTransactionSync)(R,q),showCallsStatus:q=>(0,g.showCallsStatus)(R,q),signAuthorization:q=>(0,P.signAuthorization)(R,q),signMessage:q=>(0,d.signMessage)(R,q),signTransaction:q=>(0,w.signTransaction)(R,q),signTypedData:q=>(0,E.signTypedData)(R,q),switchChain:q=>(0,p.switchChain)(R,q),waitForCallsStatus:q=>(0,S.waitForCallsStatus)(R,q),watchAsset:q=>(0,A.watchAsset)(R,q),writeContract:q=>(0,T.writeContract)(R,q),writeContractSync:q=>(0,C.writeContractSync)(R,q)}}return Xc}var vp;function W2(){if(vp)return Yc;vp=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.createWalletClient=n;const e=nd(),r=x_();function n(t){const{key:o="wallet",name:s="Wallet Client",transport:i}=t;return(0,e.createClient)({...t,key:o,name:s,transport:i,type:"walletClient"}).extend(r.walletActions)}return Yc}var pu={},Ep;function li(){if(Ep)return pu;Ep=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.createTransport=n;const e=Gg(),r=qg();function n({key:t,methods:o,name:s,request:i,retryCount:a=3,retryDelay:c=150,timeout:u,type:l},f){const m=(0,r.uid)();return{config:{key:t,methods:o,name:s,request:i,retryCount:a,retryDelay:c,timeout:u,type:l},request:(0,e.buildRequest)(i,{methods:o,retryCount:a,retryDelay:c,uid:m}),value:f}}return pu}var gu={},jp;function K2(){if(jp)return gu;jp=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.custom=r;const e=li();function r(n,t={}){const{key:o="custom",methods:s,name:i="Custom Provider",retryDelay:a}=t;return({retryCount:c})=>(0,e.createTransport)({key:o,methods:s,name:i,request:n.request.bind(n),retryCount:t.retryCount??c,retryDelay:a,type:"custom"})}return gu}var wn={},wp;function Z2(){if(wp)return wn;wp=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.fallback=o,wn.shouldThrow=s,wn.rankTransports=i;const e=rr(),r=gr(),n=If(),t=li();function o(a,c={}){const{key:u="fallback",name:l="Fallback",rank:f=!1,shouldThrow:m=s,retryCount:y,retryDelay:h}=c;return(({chain:b,pollingInterval:v=4e3,timeout:_,...g})=>{let P=a,d=()=>{};const w=(0,t.createTransport)({key:u,name:l,async request({method:E,params:p}){let S;const A=async(T=0)=>{const C=P[T]({...g,chain:b,retryCount:0,timeout:_});try{const I=await C.request({method:E,params:p});return d({method:E,params:p,response:I,transport:C,status:"success"}),I}catch(I){if(d({error:I,method:E,params:p,transport:C,status:"error"}),m(I)||T===P.length-1||(S??(S=P.slice(T+1).some(R=>{const{include:q,exclude:F}=R({chain:b}).config.methods||{};return q?q.includes(E):F?!F.includes(E):!0})),!S))throw I;return A(T+1)}};return A()},retryCount:y,retryDelay:h,type:"fallback"},{onResponse:E=>d=E,transports:P.map(E=>E({chain:b,retryCount:0}))});if(f){const E=typeof f=="object"?f:{};i({chain:b,interval:E.interval??v,onTransports:p=>P=p,ping:E.ping,sampleCount:E.sampleCount,timeout:E.timeout,transports:P,weights:E.weights})}return w})}function s(a){return!!("code"in a&&typeof a.code=="number"&&(a.code===r.TransactionRejectedRpcError.code||a.code===r.UserRejectedRequestError.code||a.code===r.WalletConnectSessionSettlementError.code||e.ExecutionRevertedError.nodeMessage.test(a.message)||a.code===5e3))}function i({chain:a,interval:c=4e3,onTransports:u,ping:l,sampleCount:f=10,timeout:m=1e3,transports:y,weights:h={}}){const{stability:b=.7,latency:v=.3}=h,_=[],g=async()=>{const P=await Promise.all(y.map(async E=>{const p=E({chain:a,retryCount:0,timeout:m}),S=Date.now();let A,T;try{await(l?l({transport:p}):p.request({method:"net_listening"})),T=1}catch{T=0}finally{A=Date.now()}return{latency:A-S,success:T}}));_.push(P),_.length>f&&_.shift();const d=Math.max(..._.map(E=>Math.max(...E.map(({latency:p})=>p)))),w=y.map((E,p)=>{const S=_.map(R=>R[p].latency),T=1-S.reduce((R,q)=>R+q,0)/S.length/d,C=_.map(R=>R[p].success),I=C.reduce((R,q)=>R+q,0)/C.length;return I===0?[0,p]:[v*T+b*I,p]}).sort((E,p)=>p[0]-E[0]);u(w.map(([,E])=>y[E])),await(0,n.wait)(c),g()};g()}return wn}var _u={},$o={},Pp;function rl(){if(Pp)return $o;Pp=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.UrlRequiredError=void 0;const e=ue();class r extends e.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}return $o.UrlRequiredError=r,$o}var Ap;function J2(){if(Ap)return _u;Ap=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.http=c;const e=pt(),r=rl(),n=Pf(),t=Lf(),o=li();let s=0;const i=new WeakMap;function a(u){if(!u)return"default";const l=i.get(u);if(l!==void 0)return l;const f=s++;return i.set(u,f),f}function c(u,l={}){const{batch:f,fetchFn:m,fetchOptions:y,key:h="http",methods:b,name:v="HTTP JSON-RPC",onFetchRequest:_,onFetchResponse:g,retryDelay:P,raw:d}=l;return({chain:w,retryCount:E,timeout:p})=>{const{batchSize:S=1e3,wait:A=0}=typeof f=="object"?f:{},T=l.retryCount??E,C=p??l.timeout??1e4,I=u||(w==null?void 0:w.rpcUrls.default.http[0]);if(!I)throw new r.UrlRequiredError;const R=(0,t.getHttpRpcClient)(I,{fetchFn:m,fetchOptions:y,onRequest:_,onResponse:g,timeout:C});return(0,o.createTransport)({key:h,methods:b,name:v,async request({method:q,params:F},H){const j={method:q,params:F},k=H!=null&&H.signal?{signal:H.signal}:void 0,{schedule:B}=(0,n.createBatchScheduler)({id:`${I}.${a(H==null?void 0:H.signal)}`,wait:A,shouldSplitBatch(N){return N.length>S},fn:N=>R.request({body:N,fetchOptions:k}),sort:(N,z)=>N.id-z.id}),O=async N=>f?B(N):[await R.request({body:N,fetchOptions:k})],[{error:x,result:M}]=await O(j);if(d)return{error:x,result:M};if(x)throw new e.RpcRequestError({body:j,error:x,url:I});return M},retryCount:T,retryDelay:P,timeout:C,type:"http"},{fetchOptions:y,url:I})}}return _u}var vu={},Tp;function Y2(){if(Tp)return vu;Tp=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.webSocket=s;const e=pt(),r=rl(),n=o_(),t=Df(),o=li();function s(i,a={}){const{keepAlive:c,key:u="webSocket",methods:l,name:f="WebSocket JSON-RPC",reconnect:m,retryDelay:y}=a;return({chain:h,retryCount:b,timeout:v})=>{var w;const _=a.retryCount??b,g=v??a.timeout??1e4,P=i||((w=h==null?void 0:h.rpcUrls.default.webSocket)==null?void 0:w[0]),d={keepAlive:c,reconnect:m};if(!P)throw new r.UrlRequiredError;return(0,o.createTransport)({key:u,methods:l,name:f,async request({method:E,params:p}){const S={method:E,params:p},A=await(0,t.getWebSocketRpcClient)(P,d),{error:T,result:C}=await A.requestAsync({body:S,timeout:g});if(T)throw new e.RpcRequestError({body:S,error:T,url:P});return C},retryCount:_,retryDelay:y,timeout:g,type:"webSocket"},{getSocket(){return(0,n.getSocket)(P)},getRpcClient(){return(0,t.getWebSocketRpcClient)(P,d)},async subscribe({params:E,onData:p,onError:S}){const A=await(0,t.getWebSocketRpcClient)(P,d),{result:T}=await new Promise((C,I)=>A.request({body:{method:"eth_subscribe",params:E},onError(R){I(R),S==null||S(R)},onResponse(R){if(R.error){I(R.error),S==null||S(R.error);return}if(typeof R.id=="number"){C(R);return}R.method==="eth_subscription"&&p(R.params)}}));return{subscriptionId:T,async unsubscribe(){return new Promise(C=>A.request({body:{method:"eth_unsubscribe",params:[T]},onResponse:C}))}}}})}}return vu}var zo={},Sp;function X2(){if(Sp)return zo;Sp=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.ProviderRpcError=void 0;class e extends Error{constructor(n,t){super(t),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n,this.details=t}}return zo.ProviderRpcError=e,zo}var Eu={},Ip;function Q2(){if(Ip)return Eu;Ip=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.decodeDeployData=t;const e=Se(),r=yr(),n="/docs/contract/decodeDeployData";function t(o){const{abi:s,bytecode:i,data:a}=o;if(a===i)return{bytecode:i};const c=s.find(l=>"type"in l&&l.type==="constructor");if(!c)throw new e.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in c))throw new e.AbiConstructorParamsNotFoundError({docsPath:n});if(!c.inputs||c.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:n});return{args:(0,r.decodeAbiParameters)(c.inputs,`0x${a.replace(i,"")}`),bytecode:i}}return Eu}var ju={},Rp;function e5(){if(Rp)return ju;Rp=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.fromBlobs=t;const e=Do(),r=Ee(),n=oe();function t(o){const s=o.to??(typeof o.blobs[0]=="string"?"hex":"bytes"),i=typeof o.blobs[0]=="string"?o.blobs.map(f=>(0,r.hexToBytes)(f)):o.blobs,a=i.reduce((f,m)=>f+m.length,0),c=(0,e.createCursor)(new Uint8Array(a));let u=!0;for(const f of i){const m=(0,e.createCursor)(f);for(;u&&m.position<f.length;){m.incrementPosition(1);let y=31;f.length-m.position<31&&(y=f.length-m.position);for(const h in Array.from({length:y})){const b=m.readByte();if(b===128&&!m.inspectBytes(m.remaining).includes(128)){u=!1;break}c.pushByte(b)}}}const l=c.bytes.slice(0,c.position);return s==="hex"?(0,n.bytesToHex)(l):l}return ju}var wu={},Bp;function t5(){if(Bp)return wu;Bp=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.sidecarsToVersionedHashes=r;const e=yf();function r(n){const{sidecars:t,version:o}=n,s=n.to??(typeof t[0].blob=="string"?"hex":"bytes"),i=[];for(const{commitment:a}of t)i.push((0,e.commitmentToVersionedHash)({commitment:a,to:s,version:o}));return i}return wu}var Pu={},Op;function r5(){if(Op)return Pu;Op=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.toCoinType=n;const e=kf(),r=2147483648;function n(t){if(t===1)return 60n;if(t>=r||t<0)throw new e.EnsInvalidChainIdError({chainId:t});return BigInt((2147483648|t)>>>0)}return Pu}var Au={},Cp;function q_(){if(Cp)return Au;Cp=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.defineKzg=e;function e({blobToKzgCommitment:r,computeBlobKzgProof:n}){return{blobToKzgCommitment:r,computeBlobKzgProof:n}}return Au}var Tu={},xp;function n5(){if(xp)return Tu;xp=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.setupKzg=r;const e=q_();function r(n,t){try{n.loadTrustedSetup(t)}catch(o){const s=o;if(!s.message.includes("trusted setup is already loaded"))throw s}return(0,e.defineKzg)(n)}return Tu}var Su={},qp;function o5(){if(qp)return Su;qp=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.compactSignatureToSignature=n;const e=Ee(),r=oe();function n({r:t,yParityAndS:o}){const s=(0,e.hexToBytes)(o),i=s[0]&128?1:0,a=s;return i===1&&(a[0]&=127),{r:t,s:(0,r.bytesToHex)(a),yParity:i}}return Su}var Iu={},Mp;function i5(){if(Mp)return Iu;Mp=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.parseCompactSignature=n;const e=Xr(),r=oe();function n(t){const{r:o,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130));return{r:(0,r.numberToHex)(o,{size:32}),yParityAndS:(0,r.numberToHex)(s,{size:32})}}return Iu}var Ru={},kp;function a5(){if(kp)return Ru;kp=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.parseSignature=n;const e=Xr(),r=oe();function n(t){const{r:o,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130)),i=+`0x${t.slice(130)}`,[a,c]=(()=>{if(i===0||i===1)return[void 0,i];if(i===27)return[BigInt(i),0];if(i===28)return[BigInt(i),1];throw new Error("Invalid yParityOrV value")})();return typeof a<"u"?{r:(0,r.numberToHex)(o,{size:32}),s:(0,r.numberToHex)(s,{size:32}),v:a,yParity:c}:{r:(0,r.numberToHex)(o,{size:32}),s:(0,r.numberToHex)(s,{size:32}),yParity:c}}return Ru}var Bu={},Hp;function s5(){if(Hp)return Bu;Hp=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.recoverTransactionAddress=o;const e=tt(),r=Qf(),n=id(),t=vr();async function o(s){const{serializedTransaction:i,signature:a}=s,c=(0,r.parseTransaction)(i),u=a??{r:c.r,s:c.s,v:c.v,yParity:c.yParity},l=(0,n.serializeTransaction)({...c,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,t.recoverAddress)({hash:(0,e.keccak256)(l),signature:u})}return Bu}var Ou={},Fp;function c5(){if(Fp)return Ou;Fp=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.serializeCompactSignature=n;const e=Xr(),r=Be();function n({r:t,yParityAndS:o}){return`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(t),(0,r.hexToBigInt)(o)).toCompactHex()}`}return Ou}var Cu={},Np;function u5(){if(Np)return Cu;Np=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.signatureToCompactSignature=n;const e=Ee(),r=oe();function n(t){const{r:o,s,v:i,yParity:a}=t,c=Number(a??i-27n);let u=s;if(c===1){const l=(0,e.hexToBytes)(s);l[0]|=128,u=(0,r.bytesToHex)(l)}return{r:o,yParityAndS:u}}return Cu}var $p;function d5(){return $p||($p=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxInt8=e.universalSignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode=e.deploylessCallViaFactoryBytecode=e.deploylessCallViaBytecodeBytecode=e.zeroHash=e.zeroAddress=e.ethAddress=e.multicall3Abi=e.universalSignatureValidatorAbi=e.erc6492SignatureValidatorAbi=e.erc4626Abi=e.erc1155Abi=e.erc721Abi=e.erc20Abi_bytes32=e.erc20Abi=e.webSocket=e.http=e.shouldThrow=e.fallback=e.custom=e.createTransport=e.walletActions=e.testActions=e.publicActions=e.createWalletClient=e.createTestClient=e.createPublicClient=e.rpcSchema=e.createClient=e.WaitForCallsStatusTimeoutError=e.getContract=e.UnknownTypeError=e.UnknownSignatureError=e.SolidityProtectedKeywordError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.InvalidStructSignatureError=e.InvalidSignatureError=e.InvalidParenthesisError=e.InvalidParameterError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=e.InvalidAbiItemError=e.CircularReferenceError=void 0,e.maxUint152=e.maxUint144=e.maxUint136=e.maxUint128=e.maxUint120=e.maxUint112=e.maxUint104=e.maxUint96=e.maxUint88=e.maxUint80=e.maxUint72=e.maxUint64=e.maxUint56=e.maxUint48=e.maxUint40=e.maxUint32=e.maxUint24=e.maxUint16=e.maxUint8=e.maxInt256=e.maxInt248=e.maxInt240=e.maxInt232=e.maxInt224=e.maxInt216=e.maxInt208=e.maxInt200=e.maxInt192=e.maxInt184=e.maxInt176=e.maxInt168=e.maxInt160=e.maxInt152=e.maxInt144=e.maxInt136=e.maxInt128=e.maxInt120=e.maxInt112=e.maxInt104=e.maxInt96=e.maxInt88=e.maxInt80=e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=void 0,e.AbiConstructorNotFoundError=e.weiUnits=e.gweiUnits=e.etherUnits=e.presignMessagePrefix=e.minInt256=e.minInt248=e.minInt240=e.minInt232=e.minInt224=e.minInt216=e.minInt208=e.minInt200=e.minInt192=e.minInt184=e.minInt176=e.minInt168=e.minInt160=e.minInt152=e.minInt144=e.minInt136=e.minInt128=e.minInt120=e.minInt112=e.minInt104=e.minInt96=e.minInt88=e.minInt80=e.minInt72=e.minInt64=e.minInt56=e.minInt48=e.minInt40=e.minInt32=e.minInt24=e.minInt16=e.minInt8=e.maxUint256=e.maxUint248=e.maxUint240=e.maxUint232=e.maxUint224=e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=void 0,e.EnsAvatarUriResolutionError=e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarInvalidNftUriError=e.SizeOverflowError=e.InvalidHexValueError=e.InvalidHexBooleanError=e.InvalidBytesBooleanError=e.IntegerOutOfRangeError=e.SliceOffsetOutOfBoundsError=e.SizeExceedsPaddingSizeError=e.RawContractError=e.CounterfactualDeploymentFailedError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=e.InvalidChainIdError=e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=e.BundleFailedError=e.BlockNotFoundError=e.setErrorConfig=e.BaseError=e.InvalidAddressError=e.UnsupportedPackedAbiType=e.InvalidDefinitionTypeError=e.InvalidArrayError=e.InvalidAbiEncodingTypeError=e.InvalidAbiDecodingTypeError=e.DecodeLogTopicsMismatch=e.DecodeLogDataMismatch=e.BytesSizeMismatchError=e.AbiFunctionSignatureNotFoundError=e.AbiFunctionOutputsNotFoundError=e.AbiFunctionNotFoundError=e.AbiEventSignatureNotFoundError=e.AbiEventSignatureEmptyTopicsError=e.AbiEventNotFoundError=e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingLengthMismatchError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingArrayLengthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=void 0,e.UnsupportedProviderMethodError=e.UnsupportedNonOptionalCapabilityError=e.UnsupportedChainIdError=e.UnknownRpcError=e.UnknownBundleIdError=e.UnauthorizedProviderError=e.TransactionRejectedRpcError=e.SwitchChainError=e.RpcError=e.ResourceUnavailableRpcError=e.ResourceNotFoundRpcError=e.ProviderRpcError=e.ProviderDisconnectedError=e.ParseRpcError=e.MethodNotSupportedRpcError=e.MethodNotFoundRpcError=e.LimitExceededRpcError=e.JsonRpcVersionUnsupportedError=e.InvalidRequestRpcError=e.InvalidParamsRpcError=e.InvalidInputRpcError=e.InternalRpcError=e.DuplicateIdError=e.ChainDisconnectedError=e.BundleTooLargeError=e.AtomicReadyWalletRejectedUpgradeError=e.AtomicityNotSupportedError=e.WebSocketRequestError=e.TimeoutError=e.SocketClosedError=e.RpcRequestError=e.HttpRequestError=e.UnknownNodeError=e.TransactionTypeNotSupportedError=e.TipAboveFeeCapError=e.NonceTooLowError=e.NonceTooHighError=e.NonceMaxValueError=e.IntrinsicGasTooLowError=e.IntrinsicGasTooHighError=e.InsufficientFundsError=e.FeeCapTooLowError=e.FeeCapTooHighError=e.ExecutionRevertedError=e.FilterTypeNotSupportedError=e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=e.EstimateGasExecutionError=e.EnsInvalidChainIdError=void 0,e.toBlobs=e.toBlobSidecars=e.sidecarsToVersionedHashes=e.fromBlobs=e.commitmentToVersionedHash=e.commitmentsToVersionedHashes=e.blobsToProofs=e.blobsToCommitments=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.checksumAddress=e.prepareEncodeFunctionData=e.parseEventLogs=e.getAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeDeployData=e.decodeAbiParameters=e.EIP1193ProviderRpcError=e.InvalidDecimalNumberError=e.InvalidStructTypeError=e.InvalidPrimaryTypeError=e.InvalidDomainError=e.UrlRequiredError=e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializedTransactionError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.StateAssignmentConflictError=e.AccountStateConflictError=e.UserRejectedRequestError=void 0,e.namehash=e.labelhash=e.toRlp=e.hexToRlp=e.bytesToRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.extendSchema=e.defineChain=e.assertCurrentChain=e.ccipReadTunnel=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=void 0,e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseSignature=e.hexToSignature=e.parseErc8010Signature=e.parseErc6492Signature=e.parseCompactSignature=e.hexToCompactSignature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashDomain=e.hashMessage=e.compactSignatureToSignature=e.withTimeout=e.withRetry=e.withCache=e.nonceManager=e.createNonceManager=e.setupKzg=e.defineKzg=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=e.ripemd160=e.keccak256=e.isHash=e.rpcTransactionType=e.formatTransactionRequest=e.defineTransactionRequest=e.formatTransactionReceipt=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.formatBlock=e.defineBlock=e.getContractError=e.toCoinType=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=e.validateTypedData=e.serializeTypedData=e.getTypesForEIP712Domain=e.domainSeparator=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.toPrefixedMessage=e.signatureToCompactSignature=e.serializeSignature=e.signatureToHex=e.serializeErc8010Signature=e.serializeErc6492Signature=e.serializeCompactSignature=e.compactSignatureToHex=e.recoverTypedDataAddress=e.recoverTransactionAddress=void 0;var r=br();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}});var n=o6();Object.defineProperty(e,"getContract",{enumerable:!0,get:function(){return n.getContract}});var t=Cf();Object.defineProperty(e,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return t.WaitForCallsStatusTimeoutError}});var o=nd();Object.defineProperty(e,"createClient",{enumerable:!0,get:function(){return o.createClient}}),Object.defineProperty(e,"rpcSchema",{enumerable:!0,get:function(){return o.rpcSchema}});var s=Q6();Object.defineProperty(e,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var i=B2();Object.defineProperty(e,"createTestClient",{enumerable:!0,get:function(){return i.createTestClient}});var a=W2();Object.defineProperty(e,"createWalletClient",{enumerable:!0,get:function(){return a.createWalletClient}});var c=R_();Object.defineProperty(e,"publicActions",{enumerable:!0,get:function(){return c.publicActions}});var u=B_();Object.defineProperty(e,"testActions",{enumerable:!0,get:function(){return u.testActions}});var l=x_();Object.defineProperty(e,"walletActions",{enumerable:!0,get:function(){return l.walletActions}});var f=li();Object.defineProperty(e,"createTransport",{enumerable:!0,get:function(){return f.createTransport}});var m=K2();Object.defineProperty(e,"custom",{enumerable:!0,get:function(){return m.custom}});var y=Z2();Object.defineProperty(e,"fallback",{enumerable:!0,get:function(){return y.fallback}}),Object.defineProperty(e,"shouldThrow",{enumerable:!0,get:function(){return y.shouldThrow}});var h=J2();Object.defineProperty(e,"http",{enumerable:!0,get:function(){return h.http}});var b=Y2();Object.defineProperty(e,"webSocket",{enumerable:!0,get:function(){return b.webSocket}});var v=kt();Object.defineProperty(e,"erc20Abi",{enumerable:!0,get:function(){return v.erc20Abi}}),Object.defineProperty(e,"erc20Abi_bytes32",{enumerable:!0,get:function(){return v.erc20Abi_bytes32}}),Object.defineProperty(e,"erc721Abi",{enumerable:!0,get:function(){return v.erc721Abi}}),Object.defineProperty(e,"erc1155Abi",{enumerable:!0,get:function(){return v.erc1155Abi}}),Object.defineProperty(e,"erc4626Abi",{enumerable:!0,get:function(){return v.erc4626Abi}}),Object.defineProperty(e,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return v.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return v.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"multicall3Abi",{enumerable:!0,get:function(){return v.multicall3Abi}});var _=A_();Object.defineProperty(e,"ethAddress",{enumerable:!0,get:function(){return _.ethAddress}}),Object.defineProperty(e,"zeroAddress",{enumerable:!0,get:function(){return _.zeroAddress}});var g=Gf();Object.defineProperty(e,"zeroHash",{enumerable:!0,get:function(){return g.zeroHash}});var P=ni();Object.defineProperty(e,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(e,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaFactoryBytecode}}),Object.defineProperty(e,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}}),Object.defineProperty(e,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}});var d=bf();Object.defineProperty(e,"maxInt8",{enumerable:!0,get:function(){return d.maxInt8}}),Object.defineProperty(e,"maxInt16",{enumerable:!0,get:function(){return d.maxInt16}}),Object.defineProperty(e,"maxInt24",{enumerable:!0,get:function(){return d.maxInt24}}),Object.defineProperty(e,"maxInt32",{enumerable:!0,get:function(){return d.maxInt32}}),Object.defineProperty(e,"maxInt40",{enumerable:!0,get:function(){return d.maxInt40}}),Object.defineProperty(e,"maxInt48",{enumerable:!0,get:function(){return d.maxInt48}}),Object.defineProperty(e,"maxInt56",{enumerable:!0,get:function(){return d.maxInt56}}),Object.defineProperty(e,"maxInt64",{enumerable:!0,get:function(){return d.maxInt64}}),Object.defineProperty(e,"maxInt72",{enumerable:!0,get:function(){return d.maxInt72}}),Object.defineProperty(e,"maxInt80",{enumerable:!0,get:function(){return d.maxInt80}}),Object.defineProperty(e,"maxInt88",{enumerable:!0,get:function(){return d.maxInt88}}),Object.defineProperty(e,"maxInt96",{enumerable:!0,get:function(){return d.maxInt96}}),Object.defineProperty(e,"maxInt104",{enumerable:!0,get:function(){return d.maxInt104}}),Object.defineProperty(e,"maxInt112",{enumerable:!0,get:function(){return d.maxInt112}}),Object.defineProperty(e,"maxInt120",{enumerable:!0,get:function(){return d.maxInt120}}),Object.defineProperty(e,"maxInt128",{enumerable:!0,get:function(){return d.maxInt128}}),Object.defineProperty(e,"maxInt136",{enumerable:!0,get:function(){return d.maxInt136}}),Object.defineProperty(e,"maxInt144",{enumerable:!0,get:function(){return d.maxInt144}}),Object.defineProperty(e,"maxInt152",{enumerable:!0,get:function(){return d.maxInt152}}),Object.defineProperty(e,"maxInt160",{enumerable:!0,get:function(){return d.maxInt160}}),Object.defineProperty(e,"maxInt168",{enumerable:!0,get:function(){return d.maxInt168}}),Object.defineProperty(e,"maxInt176",{enumerable:!0,get:function(){return d.maxInt176}}),Object.defineProperty(e,"maxInt184",{enumerable:!0,get:function(){return d.maxInt184}}),Object.defineProperty(e,"maxInt192",{enumerable:!0,get:function(){return d.maxInt192}}),Object.defineProperty(e,"maxInt200",{enumerable:!0,get:function(){return d.maxInt200}}),Object.defineProperty(e,"maxInt208",{enumerable:!0,get:function(){return d.maxInt208}}),Object.defineProperty(e,"maxInt216",{enumerable:!0,get:function(){return d.maxInt216}}),Object.defineProperty(e,"maxInt224",{enumerable:!0,get:function(){return d.maxInt224}}),Object.defineProperty(e,"maxInt232",{enumerable:!0,get:function(){return d.maxInt232}}),Object.defineProperty(e,"maxInt240",{enumerable:!0,get:function(){return d.maxInt240}}),Object.defineProperty(e,"maxInt248",{enumerable:!0,get:function(){return d.maxInt248}}),Object.defineProperty(e,"maxInt256",{enumerable:!0,get:function(){return d.maxInt256}}),Object.defineProperty(e,"maxUint8",{enumerable:!0,get:function(){return d.maxUint8}}),Object.defineProperty(e,"maxUint16",{enumerable:!0,get:function(){return d.maxUint16}}),Object.defineProperty(e,"maxUint24",{enumerable:!0,get:function(){return d.maxUint24}}),Object.defineProperty(e,"maxUint32",{enumerable:!0,get:function(){return d.maxUint32}}),Object.defineProperty(e,"maxUint40",{enumerable:!0,get:function(){return d.maxUint40}}),Object.defineProperty(e,"maxUint48",{enumerable:!0,get:function(){return d.maxUint48}}),Object.defineProperty(e,"maxUint56",{enumerable:!0,get:function(){return d.maxUint56}}),Object.defineProperty(e,"maxUint64",{enumerable:!0,get:function(){return d.maxUint64}}),Object.defineProperty(e,"maxUint72",{enumerable:!0,get:function(){return d.maxUint72}}),Object.defineProperty(e,"maxUint80",{enumerable:!0,get:function(){return d.maxUint80}}),Object.defineProperty(e,"maxUint88",{enumerable:!0,get:function(){return d.maxUint88}}),Object.defineProperty(e,"maxUint96",{enumerable:!0,get:function(){return d.maxUint96}}),Object.defineProperty(e,"maxUint104",{enumerable:!0,get:function(){return d.maxUint104}}),Object.defineProperty(e,"maxUint112",{enumerable:!0,get:function(){return d.maxUint112}}),Object.defineProperty(e,"maxUint120",{enumerable:!0,get:function(){return d.maxUint120}}),Object.defineProperty(e,"maxUint128",{enumerable:!0,get:function(){return d.maxUint128}}),Object.defineProperty(e,"maxUint136",{enumerable:!0,get:function(){return d.maxUint136}}),Object.defineProperty(e,"maxUint144",{enumerable:!0,get:function(){return d.maxUint144}}),Object.defineProperty(e,"maxUint152",{enumerable:!0,get:function(){return d.maxUint152}}),Object.defineProperty(e,"maxUint160",{enumerable:!0,get:function(){return d.maxUint160}}),Object.defineProperty(e,"maxUint168",{enumerable:!0,get:function(){return d.maxUint168}}),Object.defineProperty(e,"maxUint176",{enumerable:!0,get:function(){return d.maxUint176}}),Object.defineProperty(e,"maxUint184",{enumerable:!0,get:function(){return d.maxUint184}}),Object.defineProperty(e,"maxUint192",{enumerable:!0,get:function(){return d.maxUint192}}),Object.defineProperty(e,"maxUint200",{enumerable:!0,get:function(){return d.maxUint200}}),Object.defineProperty(e,"maxUint208",{enumerable:!0,get:function(){return d.maxUint208}}),Object.defineProperty(e,"maxUint216",{enumerable:!0,get:function(){return d.maxUint216}}),Object.defineProperty(e,"maxUint224",{enumerable:!0,get:function(){return d.maxUint224}}),Object.defineProperty(e,"maxUint232",{enumerable:!0,get:function(){return d.maxUint232}}),Object.defineProperty(e,"maxUint240",{enumerable:!0,get:function(){return d.maxUint240}}),Object.defineProperty(e,"maxUint248",{enumerable:!0,get:function(){return d.maxUint248}}),Object.defineProperty(e,"maxUint256",{enumerable:!0,get:function(){return d.maxUint256}}),Object.defineProperty(e,"minInt8",{enumerable:!0,get:function(){return d.minInt8}}),Object.defineProperty(e,"minInt16",{enumerable:!0,get:function(){return d.minInt16}}),Object.defineProperty(e,"minInt24",{enumerable:!0,get:function(){return d.minInt24}}),Object.defineProperty(e,"minInt32",{enumerable:!0,get:function(){return d.minInt32}}),Object.defineProperty(e,"minInt40",{enumerable:!0,get:function(){return d.minInt40}}),Object.defineProperty(e,"minInt48",{enumerable:!0,get:function(){return d.minInt48}}),Object.defineProperty(e,"minInt56",{enumerable:!0,get:function(){return d.minInt56}}),Object.defineProperty(e,"minInt64",{enumerable:!0,get:function(){return d.minInt64}}),Object.defineProperty(e,"minInt72",{enumerable:!0,get:function(){return d.minInt72}}),Object.defineProperty(e,"minInt80",{enumerable:!0,get:function(){return d.minInt80}}),Object.defineProperty(e,"minInt88",{enumerable:!0,get:function(){return d.minInt88}}),Object.defineProperty(e,"minInt96",{enumerable:!0,get:function(){return d.minInt96}}),Object.defineProperty(e,"minInt104",{enumerable:!0,get:function(){return d.minInt104}}),Object.defineProperty(e,"minInt112",{enumerable:!0,get:function(){return d.minInt112}}),Object.defineProperty(e,"minInt120",{enumerable:!0,get:function(){return d.minInt120}}),Object.defineProperty(e,"minInt128",{enumerable:!0,get:function(){return d.minInt128}}),Object.defineProperty(e,"minInt136",{enumerable:!0,get:function(){return d.minInt136}}),Object.defineProperty(e,"minInt144",{enumerable:!0,get:function(){return d.minInt144}}),Object.defineProperty(e,"minInt152",{enumerable:!0,get:function(){return d.minInt152}}),Object.defineProperty(e,"minInt160",{enumerable:!0,get:function(){return d.minInt160}}),Object.defineProperty(e,"minInt168",{enumerable:!0,get:function(){return d.minInt168}}),Object.defineProperty(e,"minInt176",{enumerable:!0,get:function(){return d.minInt176}}),Object.defineProperty(e,"minInt184",{enumerable:!0,get:function(){return d.minInt184}}),Object.defineProperty(e,"minInt192",{enumerable:!0,get:function(){return d.minInt192}}),Object.defineProperty(e,"minInt200",{enumerable:!0,get:function(){return d.minInt200}}),Object.defineProperty(e,"minInt208",{enumerable:!0,get:function(){return d.minInt208}}),Object.defineProperty(e,"minInt216",{enumerable:!0,get:function(){return d.minInt216}}),Object.defineProperty(e,"minInt224",{enumerable:!0,get:function(){return d.minInt224}}),Object.defineProperty(e,"minInt232",{enumerable:!0,get:function(){return d.minInt232}}),Object.defineProperty(e,"minInt240",{enumerable:!0,get:function(){return d.minInt240}}),Object.defineProperty(e,"minInt248",{enumerable:!0,get:function(){return d.minInt248}}),Object.defineProperty(e,"minInt256",{enumerable:!0,get:function(){return d.minInt256}});var w=i_();Object.defineProperty(e,"presignMessagePrefix",{enumerable:!0,get:function(){return w.presignMessagePrefix}});var E=Vo();Object.defineProperty(e,"etherUnits",{enumerable:!0,get:function(){return E.etherUnits}}),Object.defineProperty(e,"gweiUnits",{enumerable:!0,get:function(){return E.gweiUnits}}),Object.defineProperty(e,"weiUnits",{enumerable:!0,get:function(){return E.weiUnits}});var p=Se();Object.defineProperty(e,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return p.AbiConstructorNotFoundError}}),Object.defineProperty(e,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return p.AbiConstructorParamsNotFoundError}}),Object.defineProperty(e,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return p.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(e,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return p.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(e,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return p.AbiDecodingZeroDataError}}),Object.defineProperty(e,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return p.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return p.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(e,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return p.AbiEncodingLengthMismatchError}}),Object.defineProperty(e,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return p.AbiErrorInputsNotFoundError}}),Object.defineProperty(e,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return p.AbiErrorNotFoundError}}),Object.defineProperty(e,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return p.AbiErrorSignatureNotFoundError}}),Object.defineProperty(e,"AbiEventNotFoundError",{enumerable:!0,get:function(){return p.AbiEventNotFoundError}}),Object.defineProperty(e,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return p.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(e,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return p.AbiEventSignatureNotFoundError}}),Object.defineProperty(e,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return p.AbiFunctionNotFoundError}}),Object.defineProperty(e,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return p.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(e,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return p.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(e,"BytesSizeMismatchError",{enumerable:!0,get:function(){return p.BytesSizeMismatchError}}),Object.defineProperty(e,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return p.DecodeLogDataMismatch}}),Object.defineProperty(e,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return p.DecodeLogTopicsMismatch}}),Object.defineProperty(e,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return p.InvalidAbiDecodingTypeError}}),Object.defineProperty(e,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return p.InvalidAbiEncodingTypeError}}),Object.defineProperty(e,"InvalidArrayError",{enumerable:!0,get:function(){return p.InvalidArrayError}}),Object.defineProperty(e,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return p.InvalidDefinitionTypeError}}),Object.defineProperty(e,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return p.UnsupportedPackedAbiType}});var S=At();Object.defineProperty(e,"InvalidAddressError",{enumerable:!0,get:function(){return S.InvalidAddressError}});var A=ue();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return A.BaseError}}),Object.defineProperty(e,"setErrorConfig",{enumerable:!0,get:function(){return A.setErrorConfig}});var T=Du();Object.defineProperty(e,"BlockNotFoundError",{enumerable:!0,get:function(){return T.BlockNotFoundError}});var C=Cg();Object.defineProperty(e,"BundleFailedError",{enumerable:!0,get:function(){return C.BundleFailedError}});var I=oi();Object.defineProperty(e,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return I.ChainDoesNotSupportContract}}),Object.defineProperty(e,"ChainMismatchError",{enumerable:!0,get:function(){return I.ChainMismatchError}}),Object.defineProperty(e,"ChainNotFoundError",{enumerable:!0,get:function(){return I.ChainNotFoundError}}),Object.defineProperty(e,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return I.ClientChainNotConfiguredError}}),Object.defineProperty(e,"InvalidChainIdError",{enumerable:!0,get:function(){return I.InvalidChainIdError}});var R=pr();Object.defineProperty(e,"CallExecutionError",{enumerable:!0,get:function(){return R.CallExecutionError}}),Object.defineProperty(e,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return R.ContractFunctionExecutionError}}),Object.defineProperty(e,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return R.ContractFunctionRevertedError}}),Object.defineProperty(e,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return R.ContractFunctionZeroDataError}}),Object.defineProperty(e,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return R.CounterfactualDeploymentFailedError}}),Object.defineProperty(e,"RawContractError",{enumerable:!0,get:function(){return R.RawContractError}});var q=Hu();Object.defineProperty(e,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return q.SizeExceedsPaddingSizeError}}),Object.defineProperty(e,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return q.SliceOffsetOutOfBoundsError}});var F=Sn();Object.defineProperty(e,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return F.IntegerOutOfRangeError}}),Object.defineProperty(e,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return F.InvalidBytesBooleanError}}),Object.defineProperty(e,"InvalidHexBooleanError",{enumerable:!0,get:function(){return F.InvalidHexBooleanError}}),Object.defineProperty(e,"InvalidHexValueError",{enumerable:!0,get:function(){return F.InvalidHexValueError}}),Object.defineProperty(e,"SizeOverflowError",{enumerable:!0,get:function(){return F.SizeOverflowError}});var H=kf();Object.defineProperty(e,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return H.EnsAvatarInvalidNftUriError}}),Object.defineProperty(e,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return H.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(e,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return H.EnsAvatarUriResolutionError}}),Object.defineProperty(e,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return H.EnsInvalidChainIdError}});var j=pg();Object.defineProperty(e,"EstimateGasExecutionError",{enumerable:!0,get:function(){return j.EstimateGasExecutionError}});var k=Xo();Object.defineProperty(e,"BaseFeeScalarError",{enumerable:!0,get:function(){return k.BaseFeeScalarError}}),Object.defineProperty(e,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return k.Eip1559FeesNotSupportedError}}),Object.defineProperty(e,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return k.MaxFeePerGasTooLowError}});var B=ig();Object.defineProperty(e,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return B.FilterTypeNotSupportedError}});var O=rr();Object.defineProperty(e,"ExecutionRevertedError",{enumerable:!0,get:function(){return O.ExecutionRevertedError}}),Object.defineProperty(e,"FeeCapTooHighError",{enumerable:!0,get:function(){return O.FeeCapTooHighError}}),Object.defineProperty(e,"FeeCapTooLowError",{enumerable:!0,get:function(){return O.FeeCapTooLowError}}),Object.defineProperty(e,"InsufficientFundsError",{enumerable:!0,get:function(){return O.InsufficientFundsError}}),Object.defineProperty(e,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return O.IntrinsicGasTooHighError}}),Object.defineProperty(e,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return O.IntrinsicGasTooLowError}}),Object.defineProperty(e,"NonceMaxValueError",{enumerable:!0,get:function(){return O.NonceMaxValueError}}),Object.defineProperty(e,"NonceTooHighError",{enumerable:!0,get:function(){return O.NonceTooHighError}}),Object.defineProperty(e,"NonceTooLowError",{enumerable:!0,get:function(){return O.NonceTooLowError}}),Object.defineProperty(e,"TipAboveFeeCapError",{enumerable:!0,get:function(){return O.TipAboveFeeCapError}}),Object.defineProperty(e,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return O.TransactionTypeNotSupportedError}}),Object.defineProperty(e,"UnknownNodeError",{enumerable:!0,get:function(){return O.UnknownNodeError}});var x=pt();Object.defineProperty(e,"HttpRequestError",{enumerable:!0,get:function(){return x.HttpRequestError}}),Object.defineProperty(e,"RpcRequestError",{enumerable:!0,get:function(){return x.RpcRequestError}}),Object.defineProperty(e,"SocketClosedError",{enumerable:!0,get:function(){return x.SocketClosedError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return x.TimeoutError}}),Object.defineProperty(e,"WebSocketRequestError",{enumerable:!0,get:function(){return x.WebSocketRequestError}});var M=gr();Object.defineProperty(e,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return M.AtomicityNotSupportedError}}),Object.defineProperty(e,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return M.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(e,"BundleTooLargeError",{enumerable:!0,get:function(){return M.BundleTooLargeError}}),Object.defineProperty(e,"ChainDisconnectedError",{enumerable:!0,get:function(){return M.ChainDisconnectedError}}),Object.defineProperty(e,"DuplicateIdError",{enumerable:!0,get:function(){return M.DuplicateIdError}}),Object.defineProperty(e,"InternalRpcError",{enumerable:!0,get:function(){return M.InternalRpcError}}),Object.defineProperty(e,"InvalidInputRpcError",{enumerable:!0,get:function(){return M.InvalidInputRpcError}}),Object.defineProperty(e,"InvalidParamsRpcError",{enumerable:!0,get:function(){return M.InvalidParamsRpcError}}),Object.defineProperty(e,"InvalidRequestRpcError",{enumerable:!0,get:function(){return M.InvalidRequestRpcError}}),Object.defineProperty(e,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return M.JsonRpcVersionUnsupportedError}}),Object.defineProperty(e,"LimitExceededRpcError",{enumerable:!0,get:function(){return M.LimitExceededRpcError}}),Object.defineProperty(e,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return M.MethodNotFoundRpcError}}),Object.defineProperty(e,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return M.MethodNotSupportedRpcError}}),Object.defineProperty(e,"ParseRpcError",{enumerable:!0,get:function(){return M.ParseRpcError}}),Object.defineProperty(e,"ProviderDisconnectedError",{enumerable:!0,get:function(){return M.ProviderDisconnectedError}}),Object.defineProperty(e,"ProviderRpcError",{enumerable:!0,get:function(){return M.ProviderRpcError}}),Object.defineProperty(e,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return M.ResourceNotFoundRpcError}}),Object.defineProperty(e,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return M.ResourceUnavailableRpcError}}),Object.defineProperty(e,"RpcError",{enumerable:!0,get:function(){return M.RpcError}}),Object.defineProperty(e,"SwitchChainError",{enumerable:!0,get:function(){return M.SwitchChainError}}),Object.defineProperty(e,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return M.TransactionRejectedRpcError}}),Object.defineProperty(e,"UnauthorizedProviderError",{enumerable:!0,get:function(){return M.UnauthorizedProviderError}}),Object.defineProperty(e,"UnknownBundleIdError",{enumerable:!0,get:function(){return M.UnknownBundleIdError}}),Object.defineProperty(e,"UnknownRpcError",{enumerable:!0,get:function(){return M.UnknownRpcError}}),Object.defineProperty(e,"UnsupportedChainIdError",{enumerable:!0,get:function(){return M.UnsupportedChainIdError}}),Object.defineProperty(e,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return M.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(e,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return M.UnsupportedProviderMethodError}}),Object.defineProperty(e,"UserRejectedRequestError",{enumerable:!0,get:function(){return M.UserRejectedRequestError}});var N=df();Object.defineProperty(e,"AccountStateConflictError",{enumerable:!0,get:function(){return N.AccountStateConflictError}}),Object.defineProperty(e,"StateAssignmentConflictError",{enumerable:!0,get:function(){return N.StateAssignmentConflictError}});var z=nt();Object.defineProperty(e,"FeeConflictError",{enumerable:!0,get:function(){return z.FeeConflictError}}),Object.defineProperty(e,"InvalidLegacyVError",{enumerable:!0,get:function(){return z.InvalidLegacyVError}}),Object.defineProperty(e,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializableTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionTypeError}}),Object.defineProperty(e,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return z.InvalidStorageKeySizeError}}),Object.defineProperty(e,"TransactionExecutionError",{enumerable:!0,get:function(){return z.TransactionExecutionError}}),Object.defineProperty(e,"TransactionNotFoundError",{enumerable:!0,get:function(){return z.TransactionNotFoundError}}),Object.defineProperty(e,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return z.TransactionReceiptNotFoundError}}),Object.defineProperty(e,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return z.WaitForTransactionReceiptTimeoutError}});var $=rl();Object.defineProperty(e,"UrlRequiredError",{enumerable:!0,get:function(){return $.UrlRequiredError}});var U=s_();Object.defineProperty(e,"InvalidDomainError",{enumerable:!0,get:function(){return U.InvalidDomainError}}),Object.defineProperty(e,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return U.InvalidPrimaryTypeError}}),Object.defineProperty(e,"InvalidStructTypeError",{enumerable:!0,get:function(){return U.InvalidStructTypeError}});var G=g_();Object.defineProperty(e,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return G.InvalidDecimalNumberError}});var J=X2();Object.defineProperty(e,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return J.ProviderRpcError}});var K=yr();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return K.decodeAbiParameters}});var V=Q2();Object.defineProperty(e,"decodeDeployData",{enumerable:!0,get:function(){return V.decodeDeployData}});var Y=Go();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return Y.decodeErrorResult}});var te=ti();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return te.decodeEventLog}});var Z=Af();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return Z.decodeFunctionData}});var X=Rt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return X.decodeFunctionResult}});var Q=Tt();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return Q.encodeAbiParameters}});var ne=ii();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return ne.encodeDeployData}});var re=Tf();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return re.encodeErrorResult}});var ae=Zr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return ae.encodeEventTopics}});var ce=Le();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return ce.encodeFunctionData}});var he=Sf();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return he.encodeFunctionResult}});var ge=zg();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return ge.encodePacked}});var ee=tr();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return ee.getAbiItem}});var W=ri();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return W.parseEventLogs}});var Ce=cg();Object.defineProperty(e,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return Ce.prepareEncodeFunctionData}});var xe=Je();Object.defineProperty(e,"checksumAddress",{enumerable:!0,get:function(){return xe.checksumAddress}}),Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return xe.getAddress}});var bt=Ug();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return bt.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return bt.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return bt.getCreateAddress}});var Ye=rt();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return Ye.isAddress}});var mt=gt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return mt.isAddressEqual}});var Bt=Wu();Object.defineProperty(e,"blobsToCommitments",{enumerable:!0,get:function(){return Bt.blobsToCommitments}});var ot=Ku();Object.defineProperty(e,"blobsToProofs",{enumerable:!0,get:function(){return ot.blobsToProofs}});var De=pf();Object.defineProperty(e,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return De.commitmentsToVersionedHashes}});var ht=yf();Object.defineProperty(e,"commitmentToVersionedHash",{enumerable:!0,get:function(){return ht.commitmentToVersionedHash}});var it=e5();Object.defineProperty(e,"fromBlobs",{enumerable:!0,get:function(){return it.fromBlobs}});var Xe=t5();Object.defineProperty(e,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return Xe.sidecarsToVersionedHashes}});var _t=Zu();Object.defineProperty(e,"toBlobSidecars",{enumerable:!0,get:function(){return _t.toBlobSidecars}});var Me=Pg();Object.defineProperty(e,"toBlobs",{enumerable:!0,get:function(){return Me.toBlobs}});var ke=Xu();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return ke.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return ke.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return ke.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return ke.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return ke.offchainLookupSignature}});var nr=Vg();Object.defineProperty(e,"ccipReadTunnel",{enumerable:!0,get:function(){return nr.ccipReadTunnel}});var qn=ci();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return qn.assertCurrentChain}});var or=Wg();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return or.defineChain}}),Object.defineProperty(e,"extendSchema",{enumerable:!0,get:function(){return or.extendSchema}});var Mn=Kg();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return Mn.extractChain}});var Ar=wr();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return Ar.getChainContractAddress}});var $e=qe();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return $e.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return $e.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return $e.concatHex}});var Tr=Ff();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return Tr.isBytes}});var fd=Ze();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return fd.isHex}});var kn=mr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return kn.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return kn.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return kn.padHex}});var ld=Ue();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return ld.size}});var Hn=ft();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return Hn.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return Hn.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return Hn.sliceHex}});var bd=er();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return bd.trim}});var Sr=uf();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return Sr.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return Sr.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return Sr.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return Sr.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return Sr.fromBytes}});var Ir=Be();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return Ir.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return Ir.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return Ir.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return Ir.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return Ir.hexToString}});var md=$f();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return md.fromRlp}});var Rr=Ee();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Rr.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Rr.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Rr.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Rr.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Rr.toBytes}});var Br=oe();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return Br.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return Br.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return Br.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return Br.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return Br.toHex}});var Fn=Ko();Object.defineProperty(e,"bytesToRlp",{enumerable:!0,get:function(){return Fn.bytesToRlp}}),Object.defineProperty(e,"hexToRlp",{enumerable:!0,get:function(){return Fn.hexToRlp}}),Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return Fn.toRlp}});var hd=kg();Object.defineProperty(e,"labelhash",{enumerable:!0,get:function(){return hd.labelhash}});var yd=qf();Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return yd.namehash}});var Nn=r5();Object.defineProperty(e,"toCoinType",{enumerable:!0,get:function(){return Nn.toCoinType}});var pd=_r();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return pd.getContractError}});var bi=Gu();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return bi.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return bi.formatBlock}});var gd=qt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return gd.formatLog}});var $n=Rn();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return $n.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return $n.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return $n.transactionType}});var mi=xn();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return mi.defineTransactionReceipt}}),Object.defineProperty(e,"formatTransactionReceipt",{enumerable:!0,get:function(){return mi.formatTransactionReceipt}});var tn=St();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return tn.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return tn.formatTransactionRequest}}),Object.defineProperty(e,"rpcTransactionType",{enumerable:!0,get:function(){return tn.rpcTransactionType}});var _d=zf();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return _d.isHash}});var vd=tt();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return vd.keccak256}});var Ed=Jg();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Ed.ripemd160}});var jd=hf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return jd.sha256}});var wd=Yg();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return wd.toEventHash}});var hi=In();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return hi.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return hi.toEventSelector}});var nl=Xg();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return nl.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return nl.toEventSignature}});var F_=Qg();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return F_.toFunctionHash}});var ol=Kr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return ol.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return ol.toFunctionSelector}});var il=e_();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return il.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return il.toFunctionSignature}});var N_=q_();Object.defineProperty(e,"defineKzg",{enumerable:!0,get:function(){return N_.defineKzg}});var $_=n5();Object.defineProperty(e,"setupKzg",{enumerable:!0,get:function(){return $_.setupKzg}});var al=t_();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return al.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return al.nonceManager}});var z_=Bg();Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return z_.withCache}});var U_=rd();Object.defineProperty(e,"withRetry",{enumerable:!0,get:function(){return U_.withRetry}});var L_=Uf();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return L_.withTimeout}});var D_=o5();Object.defineProperty(e,"compactSignatureToSignature",{enumerable:!0,get:function(){return D_.compactSignatureToSignature}});var G_=ui();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return G_.hashMessage}});var Pd=di();Object.defineProperty(e,"hashDomain",{enumerable:!0,get:function(){return Pd.hashDomain}}),Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return Pd.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Pd.hashTypedData}});var V_=Vf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return V_.isErc6492Signature}});var W_=Zf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return W_.isErc8010Signature}});var sl=i5();Object.defineProperty(e,"hexToCompactSignature",{enumerable:!0,get:function(){return sl.parseCompactSignature}}),Object.defineProperty(e,"parseCompactSignature",{enumerable:!0,get:function(){return sl.parseCompactSignature}});var K_=f_();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return K_.parseErc6492Signature}});var Z_=l_();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return Z_.parseErc8010Signature}});var cl=a5();Object.defineProperty(e,"hexToSignature",{enumerable:!0,get:function(){return cl.parseSignature}}),Object.defineProperty(e,"parseSignature",{enumerable:!0,get:function(){return cl.parseSignature}});var J_=vr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return J_.recoverAddress}});var Y_=Jf();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return Y_.recoverMessageAddress}});var X_=ff();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return X_.recoverPublicKey}});var Q_=s5();Object.defineProperty(e,"recoverTransactionAddress",{enumerable:!0,get:function(){return Q_.recoverTransactionAddress}});var ev=Yf();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return ev.recoverTypedDataAddress}});var ul=c5();Object.defineProperty(e,"compactSignatureToHex",{enumerable:!0,get:function(){return ul.serializeCompactSignature}}),Object.defineProperty(e,"serializeCompactSignature",{enumerable:!0,get:function(){return ul.serializeCompactSignature}});var tv=b_();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return tv.serializeErc6492Signature}});var rv=m_();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return rv.serializeErc8010Signature}});var dl=T_();Object.defineProperty(e,"signatureToHex",{enumerable:!0,get:function(){return dl.serializeSignature}}),Object.defineProperty(e,"serializeSignature",{enumerable:!0,get:function(){return dl.serializeSignature}});var nv=u5();Object.defineProperty(e,"signatureToCompactSignature",{enumerable:!0,get:function(){return nv.signatureToCompactSignature}});var ov=a_();Object.defineProperty(e,"toPrefixedMessage",{enumerable:!0,get:function(){return ov.toPrefixedMessage}});var iv=h_();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return iv.verifyHash}});var av=y_();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return av.verifyMessage}});var sv=p_();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return sv.verifyTypedData}});var cv=Fe();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return cv.stringify}});var uv=It();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return uv.assertRequest}});var Ad=od();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Ad.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Ad.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return Ad.assertTransactionLegacy}});var dv=Xf();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return dv.getSerializedTransactionType}});var fv=Ju();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return fv.getTransactionType}});var lv=Qf();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return lv.parseTransaction}});var bv=Nf();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return bv.serializeAccessList}});var mv=id();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return mv.serializeTransaction}});var yi=ad();Object.defineProperty(e,"domainSeparator",{enumerable:!0,get:function(){return yi.domainSeparator}}),Object.defineProperty(e,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return yi.getTypesForEIP712Domain}}),Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return yi.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return yi.validateTypedData}});var hv=Wo();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return hv.formatEther}});var yv=Jr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return yv.formatGwei}});var pv=Uu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return pv.formatUnits}});var gv=__();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return gv.parseEther}});var _v=v_();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return _v.parseGwei}});var vv=ud();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return vv.parseUnits}})})(Bd)),Bd}var Lr={},zp;function f5(){if(zp)return Lr;zp=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.MAGIC_VALUE_BYTES=Lr.MAGIC_VALUE=void 0;const e="0x1626ba7e";Lr.MAGIC_VALUE=e;const r="0x20c13b0b";return Lr.MAGIC_VALUE_BYTES=r,Lr}var xu={},Uo={},Dr={},Up;function M_(){if(Up)return Dr;Up=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.PermissionsError=Dr.PERMISSIONS_REQUEST_REJECTED=void 0,Dr.PERMISSIONS_REQUEST_REJECTED=4001;class e extends Error{constructor(n,t,o){super(n),this.code=t,this.data=o,Object.setPrototypeOf(this,e.prototype)}}return Dr.PermissionsError=e,Dr}var Lp;function k_(){if(Lp)return Uo;Lp=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.Wallet=void 0;const e=Vr(),r=M_();class n{constructor(o){this.communicator=o}async getPermissions(){return(await this.communicator.send(e.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(o){if(!this.isPermissionRequestValid(o))throw new r.PermissionsError("Permissions request is invalid",r.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(e.Methods.wallet_requestPermissions,o)).data}catch{throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(o){return o.every(s=>typeof s=="object"?Object.keys(s).every(i=>!!Object.values(e.RestrictedMethods).includes(i)):!1)}}return Uo.Wallet=n,Uo}var Dp;function l5(){if(Dp)return xu;Dp=1,Object.defineProperty(xu,"__esModule",{value:!0});const e=k_(),r=M_(),n=(o,s)=>s.some(i=>i.parentCapability===o),t=()=>(o,s,i)=>{const a=i.value;return i.value=async function(){const c=new e.Wallet(this.communicator);let u=await c.getPermissions();if(n(s,u)||(u=await c.requestPermissions([{[s]:{}}])),!n(s,u))throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED);return a.apply(this)},i};return xu.default=t,xu}var Gp;function b5(){if(Gp)return Nt;Gp=1;var e=Nt&&Nt.__decorate||function(u,l,f,m){var y=arguments.length,h=y<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,f):m,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(u,l,f,m);else for(var v=u.length-1;v>=0;v--)(b=u[v])&&(h=(y<3?b(h):y>3?b(l,f,h):b(l,f))||h);return y>3&&h&&Object.defineProperty(l,f,h),h},r=Nt&&Nt.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.Safe=void 0;const n=d5(),t=f5(),o=Vr(),s=of(),i=nf(),a=r(l5());class c{constructor(l){this.communicator=l}async getChainInfo(){return(await this.communicator.send(o.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(o.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:l="usd"}={}){return(await this.communicator.send(o.Methods.getSafeBalances,{currency:l})).data}async check1271Signature(l,f="0x"){const m=await this.getInfo(),y=(0,n.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[l,f]}),h={call:s.RPC_CALLS.eth_call,params:[{to:m.safeAddress,data:y},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===t.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(l,f="0x"){const m=await this.getInfo(),y=(0,n.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[l,f]}),h={call:s.RPC_CALLS.eth_call,params:[{to:m.safeAddress,data:y},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===t.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(l){return(0,n.hashMessage)(l)}calculateTypedMessageHash(l){const f=typeof l.domain.chainId=="object"?l.domain.chainId.toNumber():Number(l.domain.chainId);let m=l.primaryType;if(!m){const y=Object.values(l.types),h=Object.keys(l.types).filter(b=>y.every(v=>v.every(({type:_})=>_.replace("[","").replace("]","")!==b)));if(h.length===0||h.length>1)throw new Error("Please specify primaryType");m=h[0]}return(0,n.hashTypedData)({message:l.message,domain:{...l.domain,chainId:f,verifyingContract:l.domain.verifyingContract,salt:l.domain.salt},types:l.types,primaryType:m})}async getOffChainSignature(l){return(await this.communicator.send(o.Methods.getOffChainSignature,l)).data}async isMessageSigned(l,f="0x"){let m;if(typeof l=="string"&&(m=async()=>{const y=this.calculateMessageHash(l);return await this.isMessageHashSigned(y,f)}),(0,i.isObjectEIP712TypedData)(l)&&(m=async()=>{const y=this.calculateTypedMessageHash(l);return await this.isMessageHashSigned(y,f)}),m)return await m();throw new Error("Invalid message type")}async isMessageHashSigned(l,f="0x"){const m=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const y of m)if(await y(l,f))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(o.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(o.Methods.requestAddressBook,void 0)).data}}return Nt.Safe=c,e([(0,a.default)()],c.prototype,"requestAddressBook",null),Nt}var Vp;function Wp(){if(Vp)return rn;Vp=1;var e=rn&&rn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(rn,"__esModule",{value:!0});const r=e(Bv()),n=Mv(),t=kv(),o=b5(),s=k_();class i{constructor(c={}){const{allowedDomains:u=null,debug:l=!1}=c;this.communicator=new r.default(u,l),this.eth=new t.Eth(this.communicator),this.txs=new n.TXs(this.communicator),this.safe=new o.Safe(this.communicator),this.wallet=new s.Wallet(this.communicator)}}return rn.default=i,rn}var Kp;function m5(){return Kp||(Kp=1,(function(e){var r=Ft&&Ft.__createBinding||(Object.create?(function(i,a,c,u){u===void 0&&(u=c);var l=Object.getOwnPropertyDescriptor(a,c);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(i,u,l)}):(function(i,a,c,u){u===void 0&&(u=c),i[u]=a[c]})),n=Ft&&Ft.__exportStar||function(i,a){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&r(a,i,c)},t=Ft&&Ft.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const o=t(Wp());e.default=o.default,n(Wp(),e),n(nf(),e),n(Vr(),e),n(Qp(),e);var s=Xp();Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}}),n(of(),e)})(Ft)),Ft}var Gr={},Zp;function h5(){if(Zp)return Gr;Zp=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.numberToHex=Gr.getLowerCase=void 0;function e(n){return n&&n.toLowerCase()}Gr.getLowerCase=e;function r(n){return`0x${n.toString(16)}`}return Gr.numberToHex=r,Gr}var Jp;function y5(){if(Jp)return zn;Jp=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.SafeAppProvider=void 0;const e=m5(),r=Pv(),n=h5();class t extends r.EventEmitter{constructor(s,i){super(),this.submittedTxs=new Map,this.safe=s,this.sdk=i}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(s){var c,u,l,f;const{method:i,params:a=[]}=s;switch(i){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,n.numberToHex)(this.chainId);case"personal_sign":{const[v,_]=a;if(this.safe.safeAddress.toLowerCase()!==_.toLowerCase())throw new Error("The address or message hash is invalid");const g=await this.sdk.txs.signMessage(v);return("signature"in g?g.signature:void 0)||"0x"}case"eth_sign":{const[v,_]=a;if(this.safe.safeAddress.toLowerCase()!==v.toLowerCase()||!_.startsWith("0x"))throw new Error("The address or message hash is invalid");const g=await this.sdk.txs.signMessage(_);return("signature"in g?g.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[v,_]=a,g=typeof _=="string"?JSON.parse(_):_;if(this.safe.safeAddress.toLowerCase()!==v.toLowerCase())throw new Error("The address is invalid");const P=await this.sdk.txs.signTypedMessage(g);return("signature"in P?P.signature:void 0)||"0x"}case"eth_sendTransaction":const m={...a[0],value:a[0].value||"0",data:a[0].data||"0x"};typeof m.gas=="string"&&m.gas.startsWith("0x")&&(m.gas=parseInt(m.gas,16));const y=await this.sdk.txs.send({txs:[m],params:{safeTxGas:m.gas}});return this.submittedTxs.set(y.safeTxHash,{from:this.safe.safeAddress,hash:y.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:m.data,value:m.value,to:m.to,blockHash:null,blockNumber:null,transactionIndex:null}),y.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,n.getLowerCase)(a[0]),a[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,n.getLowerCase)(a[0]),a[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,n.getLowerCase)(a[0]),a[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,n.getLowerCase)(a[0]),a[1],a[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([a[0],a[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([a[0],a[1]]);case"eth_getTransactionByHash":let b=a[0];try{b=(await this.sdk.txs.getBySafeTxHash(b)).txHash||b}catch{}return this.submittedTxs.has(b)?this.submittedTxs.get(b):this.sdk.eth.getTransactionByHash([b]).then(v=>(v&&(v.hash=a[0]),v));case"eth_getTransactionReceipt":{let v=a[0];try{v=(await this.sdk.txs.getBySafeTxHash(v)).txHash||v}catch{}return this.sdk.eth.getTransactionReceipt([v]).then(_=>(_&&(_.transactionHash=a[0]),_))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(a[0]);case"eth_call":return this.sdk.eth.call([a[0],a[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([a[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(a[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([a[0]]);case"wallet_sendCalls":{const{from:v,calls:_,chainId:g}=a[0];if(g!==(0,n.numberToHex)(this.chainId))throw new Error(`Safe is not on chain ${g}`);if(v!==this.safe.safeAddress)throw Error("Invalid from address");const P=_.map((E,p)=>{if(!E.to)throw new Error(`Invalid call #${p}: missing "to" field`);return{to:E.to,data:E.data??"0x",value:E.value??(0,n.numberToHex)(0)}}),{safeTxHash:d}=await this.sdk.txs.send({txs:P});return{id:d}}case"wallet_getCallsStatus":{const v=a[0],_={[e.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[e.TransactionStatus.AWAITING_EXECUTION]:100,[e.TransactionStatus.SUCCESS]:200,[e.TransactionStatus.CANCELLED]:400,[e.TransactionStatus.FAILED]:500},g=await this.sdk.txs.getBySafeTxHash(v),P={version:"1.0",id:v,chainId:(0,n.numberToHex)(this.chainId),status:_[g.txStatus]};if(!g.txHash)return P;const d=await this.sdk.eth.getTransactionReceipt([g.txHash]);if(!d)return P;const w=((u=(c=g.txData)==null?void 0:c.dataDecoded)==null?void 0:u.method)!=="multiSend"?1:((f=(l=g.txData.dataDecoded.parameters)==null?void 0:l[0].valueDecoded)==null?void 0:f.length)??1,E=Number(d.blockNumber),p=Number(d.gasUsed);return P.receipts=Array(w).fill({logs:d.logs,status:(0,n.numberToHex)(g.txStatus===e.TransactionStatus.SUCCESS?1:0),blockHash:d.blockHash,blockNumber:(0,n.numberToHex)(E),gasUsed:(0,n.numberToHex)(p),transactionHash:g.txHash}),P}case"wallet_showCallsStatus":throw new Error(`"${s.method}" not supported`);case"wallet_getCapabilities":return{[(0,n.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}}};default:throw Error(`"${s.method}" not implemented`)}}send(s,i){s||i("Undefined request"),this.request(s).then(a=>i(null,{jsonrpc:"2.0",id:s.id,result:a})).catch(a=>i(a,null))}}return zn.SafeAppProvider=t,zn}var Yp;function p5(){return Yp||(Yp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var r=y5();Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return r.SafeAppProvider}})})(Td)),Td}var H_=p5();const g5=jv(H_),j5=Av({__proto__:null,default:g5},[H_]);export{j5 as i};