@dcl/shop 0.1.0-29030398160.commit-dedc8ac → 0.1.0-29111888971.commit-e1b927a

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 (164) hide show
  1. package/assets/{AnimatedBackground-8aI4vJAl.js → AnimatedBackground-XZF9g9Bk.js} +3 -3
  2. package/assets/{Assets-O86HcPf_.js → Assets-CZPTo1jO.js} +1 -1
  3. package/assets/{Button-D1faXtxc.js → Button-B2TDtyup.js} +1 -1
  4. package/assets/{Cart-wT4YY2XB.js → Cart-DhU4_S6H.js} +1 -1
  5. package/assets/{CircularProgress-ByISsJtD.js → CircularProgress-Cf__730y.js} +1 -1
  6. package/assets/{Collection-B-SrzrlP.js → Collection-CRBxkkqX.js} +1 -1
  7. package/assets/{Creator-3SRIb5GI.js → Creator-DO__19RD.js} +1 -1
  8. package/assets/{ExchangeController-CtvD9TxU.js → ExchangeController-txwSQL2Z.js} +1 -1
  9. package/assets/{GetCredits-BntbDm9-.js → GetCredits-DS1z5pyp.js} +2 -2
  10. package/assets/{HelpersUtil-zGctDzqI.js → HelpersUtil-CMysbO5y.js} +1 -1
  11. package/assets/{ImportListings-DvqpDa-s.js → ImportListings-ChNZ2UwM.js} +1 -1
  12. package/assets/{ItemDetail-CjSWRE3L.js → ItemDetail-Do5cjFW8.js} +2 -2
  13. package/assets/{Market-Hqywp2wQ.js → Market-Z4jp-uLb.js} +1 -1
  14. package/assets/{MenuItem-BzIPsU3-.js → MenuItem-B4U0TYKf.js} +1 -1
  15. package/assets/{MyAssets-nfsXXyUv.js → MyAssets-C7QdtDYF.js} +1 -1
  16. package/assets/{MyFavorites-B6_8hr5-.js → MyFavorites-Bu2IDcdJ.js} +1 -1
  17. package/assets/{MyPurchases-33hyTefC.js → MyPurchases-CDUC3XzQ.js} +1 -1
  18. package/assets/{NotFound-DXluG5-7.js → NotFound-D5sXjRPf.js} +1 -1
  19. package/assets/{RealCheckout-tQms6dAo.js → RealCheckout-DBL3uxEj.js} +1 -1
  20. package/assets/{ShopFooterInner-DV3X__jb.js → ShopFooterInner-BHh4OUAv.js} +2 -2
  21. package/assets/{Success-BblXOFEG.js → Success-BrvAPmP4.js} +1 -1
  22. package/assets/{SvgIcon-CVoRZ89M.js → SvgIcon-Cg5l4LDh.js} +1 -1
  23. package/assets/{SwapController-BEHLqATV.js → SwapController-BDZMxnNb.js} +1 -1
  24. package/assets/{TradeService-a9BKe-Oz.js → TradeService-CkLYTYcJ.js} +1 -1
  25. package/assets/{W3MFrameProviderSingleton-HtGM3kiI.js → W3MFrameProviderSingleton-D4DCXtQm.js} +3 -3
  26. package/assets/{WebCryptoP256-bPjiT7wY.js → WebCryptoP256-OE37a6hF.js} +1 -1
  27. package/assets/{basic-awR2CJat.js → basic-SUHSB6nZ.js} +1 -1
  28. package/assets/{biconomy-CBCMLM9k.js → biconomy-C6flCXA4.js} +1 -1
  29. package/assets/{buy-C8v-ou6b.js → buy-YkuLG1h7.js} +1 -1
  30. package/assets/{buy-gasless-CUtIigP0.js → buy-gasless-gRmZHjsE.js} +1 -1
  31. package/assets/{ccip-BMCE_sFa.js → ccip-7fqLW_t2.js} +1 -1
  32. package/assets/{ccip-DiW7RkRR.js → ccip-ByQiZ_aq.js} +1 -1
  33. package/assets/{collection-D-oaSVfu.js → collection-2CKCNH2O.js} +1 -1
  34. package/assets/{controller-CJz3LUjz.js → controller-BO0zre2A.js} +2 -2
  35. package/assets/{core-CGoVaJvD.js → core-D-mQUZ3X.js} +4 -4
  36. package/assets/{custom-CLQCvu9h.js → custom-C6VO1Je_.js} +1 -1
  37. package/assets/{data-capture-C1enk8q3.js → data-capture-DdxbO7dd.js} +1 -1
  38. package/assets/decimals-ByIlBo-2.js +1 -0
  39. package/assets/{decimals-C8GSUqDy.js → decimals-Di7mGY-D.js} +1 -1
  40. package/assets/{detectExtension-Bdev6B_Y.js → detectExtension-DsE82Ej6.js} +1 -1
  41. package/assets/{email-DI1UmfjV.js → email-BTEyDEk6.js} +1 -1
  42. package/assets/{embedded-wallet-CUaCp934.js → embedded-wallet-QGoIGdCB.js} +1 -1
  43. package/assets/{engine-NUwMDIUh.js → engine-Bjifrd8K.js} +1 -1
  44. package/assets/{estimate-l1-fee-CkQ_-gw6.js → estimate-l1-fee-Bqou6JLl.js} +1 -1
  45. package/assets/{eth_estimateGas-DaI_qfS7.js → eth_estimateGas-CarYiSgL.js} +1 -1
  46. package/assets/{eth_getStorageAt-DqNZYObO.js → eth_getStorageAt-B-cqm2CG.js} +1 -1
  47. package/assets/{eth_getTransactionCount-BBYhaRkF.js → eth_getTransactionCount-Dfx3JW2Q.js} +1 -1
  48. package/assets/{extractIPFS-COY4B3_o.js → extractIPFS-C5EI4cZz.js} +1 -1
  49. package/assets/{features-DW4K2ZKu.js → features-U-ULFF0v.js} +1 -1
  50. package/assets/{fetchTokenMetadata-D4vVc_nQ.js → fetchTokenMetadata-DHc2WWGs.js} +2 -2
  51. package/assets/{generateUtilityClasses-D15hK3nM.js → generateUtilityClasses-BAjjhm6X.js} +1 -1
  52. package/assets/{get-ecosystem-wallet-info-QCLNyKk6.js → get-ecosystem-wallet-info-CWcGnKL4.js} +1 -1
  53. package/assets/{getBalance-CndsdQzG.js → getBalance-C8i1-K0c.js} +1 -1
  54. package/assets/{getInstalledModules-BZgUgPCr.js → getInstalledModules-BXhbS0To.js} +1 -1
  55. package/assets/{getNFT-Bw4qn7ry.js → getNFT-CzHwZ4FU.js} +2 -2
  56. package/assets/{getNFT-BQyw29TQ.js → getNFT-D3XSi6wm.js} +1 -1
  57. package/assets/{hashTypedData-Er6Ia-O7.js → hashTypedData-BOc0w62Q.js} +1 -1
  58. package/assets/{hashTypedData-CaO8N883.js → hashTypedData-DX5YrpbP.js} +1 -1
  59. package/assets/{import-NJqh-zgj.js → import-BulayqYM.js} +1 -1
  60. package/assets/{in-app-wallet-calls-BDq_Ik7W.js → in-app-wallet-calls-BI0pU06-.js} +1 -1
  61. package/assets/{index-P5U8LYs6.js → index--_rHc9Od.js} +1 -1
  62. package/assets/{index-BZIVWDQd.js → index-2NUAW7ds.js} +1 -1
  63. package/assets/{index-CDAYsxA6.js → index-BF6unOoT.js} +1 -1
  64. package/assets/{index-Hn-DbSZA.js → index-BKSTjS_b.js} +1 -1
  65. package/assets/{index-LDSpzB15.js → index-BLQJ40Mi.js} +1 -1
  66. package/assets/{index-CfKqUBFA.js → index-BNH6Xzon.js} +2 -2
  67. package/assets/{index-Bo34Cx12.js → index-BOQwd6ZB.js} +1 -1
  68. package/assets/{index-DwQ4pw8v.js → index-BZ5hUBd_.js} +1 -1
  69. package/assets/{index-mLXaZKmk.js → index-BaSqmd6J.js} +1 -1
  70. package/assets/{index-AgzyxgSU.js → index-BlEd83Li.js} +1 -1
  71. package/assets/{index-BqIdYoG8.js → index-Bo6hVxzu.js} +1 -1
  72. package/assets/{index-C6QyIhnE.js → index-C2OMQVG4.js} +1 -1
  73. package/assets/{index-FcUvAZuZ.js → index-C2U9pe20.js} +1 -1
  74. package/assets/{index-DXfwhNfH.js → index-C6FQ8I_Q.js} +2 -2
  75. package/assets/{index-Dmfk0azd.js → index-C7-iTfFV.js} +39 -39
  76. package/assets/{index-CDOPdFEN.js → index-CDMAFM2h.js} +1 -1
  77. package/assets/{index-zGd0k6zk.js → index-CIPKmOlZ.js} +1 -1
  78. package/assets/{index-D-VYD1II.js → index-CMavzzI_.js} +1 -1
  79. package/assets/{index-C1RysQbA.js → index-CbJmVQBN.js} +1 -1
  80. package/assets/{index-BoZx7TrW.js → index-CcQfGUgB.js} +1 -1
  81. package/assets/{index-DieH8QTn.js → index-CiIXwK1P.js} +1 -1
  82. package/assets/{index-DrcFvB51.js → index-CkHNiFzW.js} +1 -1
  83. package/assets/{index-BexyLNIk.js → index-CkVoCPEe.js} +1 -1
  84. package/assets/{index-BABCyrjx.js → index-CxyR8sie.js} +1 -1
  85. package/assets/{index-emGKKyxf.js → index-CzFnbzvY.js} +1 -1
  86. package/assets/{index-Dav5KOrd.js → index-CzfG6alx.js} +1 -1
  87. package/assets/{index-BdBYQDrP.js → index-D3hzhbb8.js} +1 -1
  88. package/assets/{index-PQMQyCqV.js → index-D4VlTBkw.js} +1 -1
  89. package/assets/{index-BRyy9_FL.js → index-D5qOQwpy.js} +1 -1
  90. package/assets/{index-BseAcDfV.js → index-DIMSfymy.js} +3 -3
  91. package/assets/{index-DVQRwKte.js → index-DIw62AgP.js} +1 -1
  92. package/assets/{index-CCxw-foK.js → index-DJyoXp5I.js} +1 -1
  93. package/assets/{index-j1oJp18p.js → index-DOTYPGXa.js} +1 -1
  94. package/assets/{index-Buf412yH.js → index-DQx-sY_c.js} +1 -1
  95. package/assets/{index-Gr3BFRx7.js → index-DS8DYtub.js} +1 -1
  96. package/assets/{index-ccNJtibX.js → index-DShBCYos.js} +3 -3
  97. package/assets/{index-2l5r0dRI.js → index-DV4p99KA.js} +2 -2
  98. package/assets/{index-KUsuHO11.js → index-DacKA042.js} +1 -1
  99. package/assets/{index-Ddmzqmxk.js → index-DhBdPYnK.js} +1 -1
  100. package/assets/{index-CWz8eoAl.js → index-DjPU0-Js.js} +1 -1
  101. package/assets/{index-CRhrr6gN.js → index-DlllSUoB.js} +1 -1
  102. package/assets/{index-BEzzzIlC.js → index-DtrBN21c.js} +1 -1
  103. package/assets/{index-CWHR1ZBn.js → index-Eb-Zd0F2.js} +1 -1
  104. package/assets/{index-C6xmzvY-.js → index-GAmNssSM.js} +1 -1
  105. package/assets/{index-CmcvhZsS.js → index-IfYZnKCO.js} +1 -1
  106. package/assets/{index-FrZezou7.js → index-LSZxonl2.js} +1 -1
  107. package/assets/{index-CyDCPwX2.js → index-Pp2oEhTr.js} +1 -1
  108. package/assets/{index-DRm7xERf.js → index-Qzch3HJ1.js} +1 -1
  109. package/assets/{index-BUaGOTLN.js → index-ULMMROQ0.js} +1 -1
  110. package/assets/{index-Dm67LTtv.js → index-YfJF6hV4.js} +1 -1
  111. package/assets/{index-BKg37Q5D.js → index-jYazATJj.js} +1 -1
  112. package/assets/{index-DJCTaNyE.js → index-kxu93Of2.js} +1 -1
  113. package/assets/{index-Dq7Rlnvq.js → index-n-cFV5ht.js} +1 -1
  114. package/assets/{index.es-DZDKrrOX.js → index.es-Dk6KC5kj.js} +1 -1
  115. package/assets/{index.es-7keraYJG.js → index.es-DnMpNe4m.js} +4 -4
  116. package/assets/{index.es-C2X55s9j.js → index.es-IGCEipYb.js} +1 -1
  117. package/assets/{localBatchGatewayRequest-ntoba0Xt.js → localBatchGatewayRequest-BLJAP4fw.js} +1 -1
  118. package/assets/{mana-rate-D_DTt_S8.js → mana-rate-DkxpKYLQ.js} +1 -1
  119. package/assets/network-DsCGVBhE.js +1 -0
  120. package/assets/{networks-DvMCxuQT.js → networks-Bc_Uf_7y.js} +1 -1
  121. package/assets/{onramp-D4LFsmfg.js → onramp-DnhEoZl6.js} +1 -1
  122. package/assets/{openzeppelin-CJAun2pO.js → openzeppelin-DwFpqgXP.js} +1 -1
  123. package/assets/{ownerOf-DrmYf79A.js → ownerOf-Qq7Or7yc.js} +1 -1
  124. package/assets/{parseNft-Yzo9Plhx.js → parseNft-B-POJxiL.js} +2 -2
  125. package/assets/{parseSignature-3yq9FfJP.js → parseSignature-ClLI6O4f.js} +3 -3
  126. package/assets/{parseSignature-h2iJV3NZ.js → parseSignature-kOoafZEo.js} +1 -1
  127. package/assets/{pay-with-exchange-BWW2tZIp.js → pay-with-exchange-BZR4RMBZ.js} +1 -1
  128. package/assets/{qr-overlay-hYqgRnm0.js → qr-overlay-9WMDd_PO.js} +1 -1
  129. package/assets/{receive-BMHwXxqP.js → receive-CtJWuhGM.js} +1 -1
  130. package/assets/{resolveImplementation-DS1nY4sc.js → resolveImplementation-BJatMhHh.js} +1 -1
  131. package/assets/{rpc-BC6ESxMB.js → rpc-BA0W82l4.js} +1 -1
  132. package/assets/{secp256k1-DNCGSF8O.js → secp256k1-B82Rx-TY.js} +1 -1
  133. package/assets/{secp256k1-BQuyxdaC.js → secp256k1-DFslM7tB.js} +1 -1
  134. package/assets/{secp256k1-CrZRZ9L5.js → secp256k1-DHqlJ8nk.js} +1 -1
  135. package/assets/{send-B62L18Hx.js → send-DXVwWcB5.js} +1 -1
  136. package/assets/{send-batch-transaction-De_pBpa_.js → send-batch-transaction-D1j9aZww.js} +1 -1
  137. package/assets/{send-eip712-transaction-D-GzcP3o.js → send-eip712-transaction-CrryJAyV.js} +2 -2
  138. package/assets/{send-gasless-transaction-Iil1KVOe.js → send-gasless-transaction-B7YcLCGg.js} +2 -2
  139. package/assets/{sendRawTransaction-BqauPPYf.js → sendRawTransaction-DT-ObNx8.js} +3 -3
  140. package/assets/{serializeTransaction-B4qzULZO.js → serializeTransaction-DawhfTu0.js} +1 -1
  141. package/assets/{session-proposal-C4Cz1cln.js → session-proposal-lgMupzDT.js} +1 -1
  142. package/assets/{session-request-De0p90UO.js → session-request-DacijEHD.js} +2 -2
  143. package/assets/{sha256-bg_KfcLv.js → sha256-BxR-wXll.js} +1 -1
  144. package/assets/{signing-BGpVago5.js → signing-CoPa7cSW.js} +4 -4
  145. package/assets/{socials-vOukOtuh.js → socials-CMh8u0Ej.js} +1 -1
  146. package/assets/{swaps-FEWWVCcs.js → swaps-B0Q00kKq.js} +1 -1
  147. package/assets/{thirdweb-C8ToELvu.js → thirdweb-9c12J_EF.js} +3 -3
  148. package/assets/{totalSupply-C5jxuFw1.js → totalSupply-BCZn9Djj.js} +1 -1
  149. package/assets/{transactionReceipt-CbcThGoC.js → transactionReceipt-C2iQ3ozz.js} +1 -1
  150. package/assets/{transactions-CaxBviMm.js → transactions-Dqx74UWQ.js} +1 -1
  151. package/assets/{useInfiniteGrid-BiC1UMEK.js → useInfiniteGrid-DgSsqvQS.js} +1 -1
  152. package/assets/{verifyHash-JbNzrsYR.js → verifyHash-BVbpPoSf.js} +1 -1
  153. package/assets/{w3m-modal-BUwENQ4T.js → w3m-modal-CGHylzdj.js} +1 -1
  154. package/assets/{w3m-modal-BfRGsEzF.js → w3m-modal-DvCL5Oh_.js} +1 -1
  155. package/assets/{wait-for-tx-receipt-BJDKOLGI.js → wait-for-tx-receipt-Dm2aAIs1.js} +1 -1
  156. package/assets/{wallet-kind-CuaDlRao.js → wallet-kind-vciDs8sO.js} +1 -1
  157. package/assets/{wallets-BnBHCJi8.js → wallets-D8labJv_.js} +6 -6
  158. package/assets/{web-connector-CJKlFm6H.js → web-connector-C9MeCxtf.js} +3 -3
  159. package/assets/{writeContract-CtBYiULm.js → writeContract-C3IzBPhR.js} +1 -1
  160. package/assets/{zoraTestnet-CJMxifqR.js → zoraTestnet-CduWQC79.js} +1 -1
  161. package/index.html +8 -8
  162. package/package.json +2 -2
  163. package/assets/decimals-DnNelAv5.js +0 -1
  164. package/assets/network-CFFySFe9.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-DiW7RkRR.js","assets/NetworkUtil-Ddexw9-U.js","assets/ethers-DHDSyreX.js","assets/react-Vu6nbGi5.js","assets/localBatchGatewayRequest-ntoba0Xt.js","assets/index-Dmfk0azd.js","assets/index-DCrqkiFN.css"])))=>i.map(i=>d[i]);
2
- import{aa as ue,$ as j,af as I,B as p,a9 as de,a4 as X0,a2 as q0,a3 as W,ac as we,an as Je,ao as Re,aj as G,aq as It,ak as Q0,w as Mn,aG as Ye,ap as Ft,h as er,a7 as De,ai as fe,_ as tr,d as nr,al as rr,am as sr,aH as ir,E as Ue,F as mt,c as Xt,n as qt,o as Qt,N as en,I as tn,f as nn,g as rn,G as sn,y as gt,O as Xe,aI as on,as as or,at as ar,aF as cr,ad as an,e as fr,j as ur,u as dr}from"./NetworkUtil-Ddexw9-U.js";import{_ as On}from"./index-Dmfk0azd.js";function qe(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,i)=>{const o=t(s,i);if(n)for(const a of n)delete o[a];return{...o,...r(s,i)}},type:e})}const Ln={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function St(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?ue(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?ue(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ln[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=lr(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Pa=qe("transaction",St);function lr(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Un(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:St(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Aa=qe("block",Un);function _n(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const br={"0x0":"reverted","0x1":"success"};function hr(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>_n(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ue(e.transactionIndex):null,status:e.status?br[e.status]:null,type:e.type?Ln[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const $a=qe("transactionReceipt",hr),pr={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Qe(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=yr(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>j(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=I(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=I(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=I(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=I(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=I(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=I(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=pr[e.type]),typeof e.value<"u"&&(n.value=I(e.value)),n}const Ea=qe("transactionRequest",Qe);function yr(e){return e.map(t=>({address:t.address,r:t.r?I(BigInt(t.r)):t.r,s:t.s?I(BigInt(t.s)):t.s,chainId:I(t.chainId),nonce:I(t.nonce),...typeof t.yParity<"u"?{yParity:I(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:I(t.v)}:{}}))}const va=2n**16n-1n,mr=2n**256n-1n;function Pe(e){return typeof e[0]=="string"?et(e):gr(e)}function gr(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function et(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class cn extends p{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Hn extends p{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class xr extends p{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const wr={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 xr({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Hn({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Tt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(wr);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Pr(e,t="hex"){const n=Nn(e),r=Tt(new Uint8Array(n.length));return n.encode(r),t==="hex"?j(r.bytes):r.bytes}function Nn(e){return Array.isArray(e)?Ar(e.map(t=>Nn(t))):$r(e)}function Ar(e){const t=e.reduce((s,i)=>s+i.length,0),n=jn(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:i}of e)i(s)}}}function $r(e){const t=typeof e=="string"?de(e):e,n=jn(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function jn(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new p("Length is too large.")}function kt(e,t="wei"){return X0(e,q0[t])}function Me(e){const t=Object.entries(e).map(([r,s])=>s===void 0||s===!1?null:[r,s]).filter(Boolean),n=t.reduce((r,[s])=>Math.max(r,s.length),0);return t.map(([r,s])=>` ${`${r}:`.padEnd(n+1)} ${s}`).join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-ByQiZ_aq.js","assets/NetworkUtil-Ddexw9-U.js","assets/ethers-DHDSyreX.js","assets/react-Vu6nbGi5.js","assets/localBatchGatewayRequest-BLJAP4fw.js","assets/index-C7-iTfFV.js","assets/index-DCrqkiFN.css"])))=>i.map(i=>d[i]);
2
+ import{aa as ue,$ as j,af as I,B as p,a9 as de,a4 as X0,a2 as q0,a3 as W,ac as we,an as Je,ao as Re,aj as G,aq as It,ak as Q0,w as Mn,aG as Ye,ap as Ft,h as er,a7 as De,ai as fe,_ as tr,d as nr,al as rr,am as sr,aH as ir,E as Ue,F as mt,c as Xt,n as qt,o as Qt,N as en,I as tn,f as nn,g as rn,G as sn,y as gt,O as Xe,aI as on,as as or,at as ar,aF as cr,ad as an,e as fr,j as ur,u as dr}from"./NetworkUtil-Ddexw9-U.js";import{_ as On}from"./index-C7-iTfFV.js";function qe(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,i)=>{const o=t(s,i);if(n)for(const a of n)delete o[a];return{...o,...r(s,i)}},type:e})}const Ln={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function St(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?ue(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?ue(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ln[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=lr(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Pa=qe("transaction",St);function lr(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Un(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:St(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Aa=qe("block",Un);function _n(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const br={"0x0":"reverted","0x1":"success"};function hr(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>_n(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ue(e.transactionIndex):null,status:e.status?br[e.status]:null,type:e.type?Ln[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const $a=qe("transactionReceipt",hr),pr={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Qe(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=yr(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>j(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=I(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=I(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=I(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=I(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=I(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=I(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=pr[e.type]),typeof e.value<"u"&&(n.value=I(e.value)),n}const Ea=qe("transactionRequest",Qe);function yr(e){return e.map(t=>({address:t.address,r:t.r?I(BigInt(t.r)):t.r,s:t.s?I(BigInt(t.s)):t.s,chainId:I(t.chainId),nonce:I(t.nonce),...typeof t.yParity<"u"?{yParity:I(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:I(t.v)}:{}}))}const va=2n**16n-1n,mr=2n**256n-1n;function Pe(e){return typeof e[0]=="string"?et(e):gr(e)}function gr(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function et(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class cn extends p{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Hn extends p{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class xr extends p{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const wr={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 xr({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Hn({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Tt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(wr);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Pr(e,t="hex"){const n=Nn(e),r=Tt(new Uint8Array(n.length));return n.encode(r),t==="hex"?j(r.bytes):r.bytes}function Nn(e){return Array.isArray(e)?Ar(e.map(t=>Nn(t))):$r(e)}function Ar(e){const t=e.reduce((s,i)=>s+i.length,0),n=jn(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:i}of e)i(s)}}}function $r(e){const t=typeof e=="string"?de(e):e,n=jn(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function jn(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new p("Length is too large.")}function kt(e,t="wei"){return X0(e,q0[t])}function Me(e){const t=Object.entries(e).map(([r,s])=>s===void 0||s===!1?null:[r,s]).filter(Boolean),n=t.reduce((r,[s])=>Math.max(r,s.length),0);return t.map(([r,s])=>` ${`${r}:`.padEnd(n+1)} ${s}`).join(`
3
3
  `)}class Ba extends p{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class Er extends p{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Me(t),"}","","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"})}}class Ia extends p{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class vr extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l}){var h;const b=Me({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:n==null?void 0:n.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((h=s==null?void 0:s.nativeCurrency)==null?void 0:h.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",b].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Fa extends p{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:s,index:i}){let o="Transaction";r&&i!==void 0&&(o=`Transaction at block time "${r}" at index "${i}"`),t&&i!==void 0&&(o=`Transaction at block hash "${t}" at index "${i}"`),n&&i!==void 0&&(o=`Transaction at block number "${n}" at index "${i}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class Sa extends p{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class Ta extends p{constructor({receipt:t}){super(`Transaction with hash "${t.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=t}}class ka extends p{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function Rn(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>de(i)):e.blobs,s=[];for(const i of r)s.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?s:s.map(i=>j(i))}function Dn(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>de(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>de(o)):e.commitments,i=[];for(let o=0;o<r.length;o++){const a=r[o],c=s[o];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?i:i.map(o=>j(o))}const ye=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Br(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ve(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ae(e,...t){if(!Br(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function za(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Ve(e.outputLen),Ve(e.blockLen)}function We(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Vn(e,t){Ae(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Ir(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function le(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ct(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function V(e,t){return e<<32-t|e>>>t}const Fr=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Sr(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Tr(e){for(let t=0;t<e.length;t++)e[t]=Sr(e[t]);return e}const fn=Fr?e=>e:Tr;function kr(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function zt(e){return typeof e=="string"&&(e=kr(e)),Ae(e),e}function Ca(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];Ae(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}class Wn{}function tt(e){const t=r=>e().update(zt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Ga(e=32){if(ye&&typeof ye.getRandomValues=="function")return ye.getRandomValues(new Uint8Array(e));if(ye&&typeof ye.randomBytes=="function")return Uint8Array.from(ye.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function zr(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(n>>s&i),a=Number(n&i),c=r?4:0,f=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+f,a,r)}function Cr(e,t,n){return e&t^~e&n}function Gr(e,t,n){return e&t^e&n^t&n}class Kn extends Wn{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=ct(this.buffer)}update(t){We(this),t=zt(t),Ae(t);const{view:n,buffer:r,blockLen:s}=this,i=t.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);if(a===s){const c=ct(t);for(;s<=i-o;o+=s)this.process(c,o);continue}r.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){We(this),Vn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;n[o++]=128,le(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let u=o;u<s;u++)n[u]=0;zr(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=ct(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=c/4,d=this.get();if(f>d.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<f;u++)a.setUint32(4*u,d[u],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:i,destroyed:o,pos:a}=this;return t.destroyed=o,t.finished=i,t.length=s,t.pos=a,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const re=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),L=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),U=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),_e=BigInt(2**32-1),un=BigInt(32);function Mr(e,t=!1){return t?{h:Number(e&_e),l:Number(e>>un&_e)}:{h:Number(e>>un&_e)|0,l:Number(e&_e)|0}}function Zn(e,t=!1){const n=e.length;let r=new Uint32Array(n),s=new Uint32Array(n);for(let i=0;i<n;i++){const{h:o,l:a}=Mr(e[i],t);[r[i],s[i]]=[o,a]}return[r,s]}const dn=(e,t,n)=>e>>>n,ln=(e,t,n)=>e<<32-n|t>>>n,me=(e,t,n)=>e>>>n|t<<32-n,ge=(e,t,n)=>e<<32-n|t>>>n,He=(e,t,n)=>e<<64-n|t>>>n-32,Ne=(e,t,n)=>e>>>n-32|t<<64-n,Or=(e,t,n)=>e<<n|t>>>32-n,Lr=(e,t,n)=>t<<n|e>>>32-n,Ur=(e,t,n)=>t<<n-32|e>>>64-n,_r=(e,t,n)=>e<<n-32|t>>>64-n;function J(e,t,n,r){const s=(t>>>0)+(r>>>0);return{h:e+n+(s/2**32|0)|0,l:s|0}}const Hr=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Nr=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,jr=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Rr=(e,t,n,r,s)=>t+n+r+s+(e/2**32|0)|0,Dr=(e,t,n,r,s)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(s>>>0),Vr=(e,t,n,r,s,i)=>t+n+r+s+i+(e/2**32|0)|0,Wr=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]),se=new Uint32Array(64);class Kr extends Kn{constructor(t=32){super(64,t,8,!1),this.A=re[0]|0,this.B=re[1]|0,this.C=re[2]|0,this.D=re[3]|0,this.E=re[4]|0,this.F=re[5]|0,this.G=re[6]|0,this.H=re[7]|0}get(){const{A:t,B:n,C:r,D:s,E:i,F:o,G:a,H:c}=this;return[t,n,r,s,i,o,a,c]}set(t,n,r,s,i,o,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,n){for(let u=0;u<16;u++,n+=4)se[u]=t.getUint32(n,!1);for(let u=16;u<64;u++){const l=se[u-15],b=se[u-2],h=V(l,7)^V(l,18)^l>>>3,y=V(b,17)^V(b,19)^b>>>10;se[u]=y+se[u-7]+h+se[u-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:c,G:f,H:d}=this;for(let u=0;u<64;u++){const l=V(a,6)^V(a,11)^V(a,25),b=d+l+Cr(a,c,f)+Wr[u]+se[u]|0,y=(V(r,2)^V(r,13)^V(r,22))+Gr(r,s,i)|0;d=f,f=c,c=a,a=o+b|0,o=i,i=s,s=r,r=b+y|0}r=r+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,f=f+this.G|0,d=d+this.H|0,this.set(r,s,i,o,a,c,f,d)}roundClean(){le(se)}destroy(){this.set(0,0,0,0,0,0,0,0),le(this.buffer)}}const Jn=Zn(["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(e=>BigInt(e))),Zr=Jn[0],Jr=Jn[1],ie=new Uint32Array(80),oe=new Uint32Array(80);class Yn extends Kn{constructor(t=64){super(128,t,16,!1),this.Ah=U[0]|0,this.Al=U[1]|0,this.Bh=U[2]|0,this.Bl=U[3]|0,this.Ch=U[4]|0,this.Cl=U[5]|0,this.Dh=U[6]|0,this.Dl=U[7]|0,this.Eh=U[8]|0,this.El=U[9]|0,this.Fh=U[10]|0,this.Fl=U[11]|0,this.Gh=U[12]|0,this.Gl=U[13]|0,this.Hh=U[14]|0,this.Hl=U[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:f,El:d,Fh:u,Fl:l,Gh:b,Gl:h,Hh:y,Hl:A}=this;return[t,n,r,s,i,o,a,c,f,d,u,l,b,h,y,A]}set(t,n,r,s,i,o,a,c,f,d,u,l,b,h,y,A){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=f|0,this.El=d|0,this.Fh=u|0,this.Fl=l|0,this.Gh=b|0,this.Gl=h|0,this.Hh=y|0,this.Hl=A|0}process(t,n){for(let m=0;m<16;m++,n+=4)ie[m]=t.getUint32(n),oe[m]=t.getUint32(n+=4);for(let m=16;m<80;m++){const v=ie[m-15]|0,T=oe[m-15]|0,k=me(v,T,1)^me(v,T,8)^dn(v,T,7),P=ge(v,T,1)^ge(v,T,8)^ln(v,T,7),w=ie[m-2]|0,$=oe[m-2]|0,M=me(w,$,19)^He(w,$,61)^dn(w,$,6),S=ge(w,$,19)^Ne(w,$,61)^ln(w,$,6),z=jr(P,S,oe[m-7],oe[m-16]),B=Rr(z,k,M,ie[m-7],ie[m-16]);ie[m]=B|0,oe[m]=z|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:f,Dl:d,Eh:u,El:l,Fh:b,Fl:h,Gh:y,Gl:A,Hh:x,Hl:E}=this;for(let m=0;m<80;m++){const v=me(u,l,14)^me(u,l,18)^He(u,l,41),T=ge(u,l,14)^ge(u,l,18)^Ne(u,l,41),k=u&b^~u&y,P=l&h^~l&A,w=Dr(E,T,P,Jr[m],oe[m]),$=Vr(w,x,v,k,Zr[m],ie[m]),M=w|0,S=me(r,s,28)^He(r,s,34)^He(r,s,39),z=ge(r,s,28)^Ne(r,s,34)^Ne(r,s,39),B=r&i^r&a^i&a,O=s&o^s&c^o&c;x=y|0,E=A|0,y=b|0,A=h|0,b=u|0,h=l|0,{h:u,l}=J(f|0,d|0,$|0,M|0),f=a|0,d=c|0,a=i|0,c=o|0,i=r|0,o=s|0;const g=Hr(M,z,O);r=Nr(g,$,S,B),s=g|0}({h:r,l:s}=J(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=J(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=J(this.Ch|0,this.Cl|0,a|0,c|0),{h:f,l:d}=J(this.Dh|0,this.Dl|0,f|0,d|0),{h:u,l}=J(this.Eh|0,this.El|0,u|0,l|0),{h:b,l:h}=J(this.Fh|0,this.Fl|0,b|0,h|0),{h:y,l:A}=J(this.Gh|0,this.Gl|0,y|0,A|0),{h:x,l:E}=J(this.Hh|0,this.Hl|0,x|0,E|0),this.set(r,s,i,o,a,c,f,d,u,l,b,h,y,A,x,E)}roundClean(){le(ie,oe)}destroy(){le(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Yr extends Yn{constructor(){super(48),this.Ah=L[0]|0,this.Al=L[1]|0,this.Bh=L[2]|0,this.Bl=L[3]|0,this.Ch=L[4]|0,this.Cl=L[5]|0,this.Dh=L[6]|0,this.Dl=L[7]|0,this.Eh=L[8]|0,this.El=L[9]|0,this.Fh=L[10]|0,this.Fl=L[11]|0,this.Gh=L[12]|0,this.Gl=L[13]|0,this.Hh=L[14]|0,this.Hl=L[15]|0}}const Xr=tt(()=>new Kr),Ma=tt(()=>new Yn),Oa=tt(()=>new Yr),qr=Xr;function Qr(e,t){const n=t||"hex",r=qr(we(e,{strict:!1})?Je(e):e);return n==="bytes"?r:Re(r)}function es(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=Qr(t,"bytes");return s.set([n],0),r==="bytes"?s:j(s)}function ts(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const i of t)s.push(es({commitment:i,to:r,version:n}));return s}const bn=6,Xn=32,Ct=4096,qn=Xn*Ct,hn=qn*bn-1-1*Ct*bn,ns=1;class rs extends p{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class ss extends p{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class La extends p{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Ua extends p{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${ns}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function is(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?de(e.data):e.data,r=G(n);if(!r)throw new ss;if(r>hn)throw new rs({maxSize:hn,size:r});const s=[];let i=!0,o=0;for(;i;){const a=Tt(new Uint8Array(qn));let c=0;for(;c<Ct;){const f=n.slice(o,o+(Xn-1));if(a.pushByte(0),a.pushBytes(f),f.length<31){a.pushByte(128),i=!1;break}c++,o+=31}s.push(a)}return t==="bytes"?s.map(a=>a.bytes):s.map(a=>j(a.bytes))}function os(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??is({data:t,to:r}),i=e.commitments??Rn({blobs:s,kzg:n,to:r}),o=e.proofs??Dn({blobs:s,commitments:i,kzg:n,to:r}),a=[];for(let c=0;c<s.length;c++)a.push({blob:s[c],commitment:i[c],proof:o[c]});return a}class be extends p{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"})}}class xt extends p{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class as extends p{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class cs extends p{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(`
4
4
  `),{name:"ChainNotFoundError"})}}class Qn extends p{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class _a extends p{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}const fs=BigInt(0),ke=BigInt(1),us=BigInt(2),ds=BigInt(7),ls=BigInt(256),bs=BigInt(113),e0=[],t0=[],n0=[];for(let e=0,t=ke,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],e0.push(2*(5*r+n)),t0.push((e+1)*(e+2)/2%64);let s=fs;for(let i=0;i<7;i++)t=(t<<ke^(t>>ds)*bs)%ls,t&us&&(s^=ke<<(ke<<BigInt(i))-ke);n0.push(s)}const r0=Zn(n0,!0),hs=r0[0],ps=r0[1],pn=(e,t,n)=>n>32?Ur(e,t,n):Or(e,t,n),yn=(e,t,n)=>n>32?_r(e,t,n):Lr(e,t,n);function ys(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,f=n[c],d=n[c+1],u=pn(f,d,1)^n[a],l=yn(f,d,1)^n[a+1];for(let b=0;b<50;b+=10)e[o+b]^=u,e[o+b+1]^=l}let s=e[2],i=e[3];for(let o=0;o<24;o++){const a=t0[o],c=pn(s,i,a),f=yn(s,i,a),d=e0[o];s=e[d],i=e[d+1],e[d]=c,e[d+1]=f}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=hs[r],e[1]^=ps[r]}le(n)}class Gt extends Wn{constructor(t,n,r,s=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=i,Ve(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Ir(this.state)}clone(){return this._cloneInto()}keccak(){fn(this.state32),ys(this.state32,this.rounds),fn(this.state32),this.posOut=0,this.pos=0}update(t){We(this),t=zt(t),Ae(t);const{blockLen:n,state:r}=this,s=t.length;for(let i=0;i<s;){const o=Math.min(n-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:s}=this;t[r]^=n,(n&128)!==0&&r===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){We(this,!1),Ae(t),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,i=t.length;s<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-s);t.set(n.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Ve(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Vn(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,le(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return t||(t=new Gt(n,r,s,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=s,t.enableXOF=o,t.destroyed=this.destroyed,t}}const ms=(e,t,n)=>tt(()=>new Gt(t,e,n)),gs=ms(1,136,256/8);function Oe(e,t){const n=t||"hex",r=gs(we(e,{strict:!1})?Je(e):e);return n==="bytes"?r:Re(r)}const ft=new It(8192);function nt(e,t){if(ft.has(`${e}.${t}`))return ft.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=Oe(Q0(n),"bytes"),s=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(r[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const i=`0x${s.join("")}`;return ft.set(`${e}.${t}`,i),i}function Ha(e,t){if(!K(e,{strict:!1}))throw new be({address:e});return nt(e,t)}const xs=/^0x[a-fA-F0-9]{40}$/,ut=new It(8192);function K(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(ut.has(r))return ut.get(r);const s=xs.test(e)?e.toLowerCase()===e?!0:n?nt(e)===e:!0:!1;return ut.set(r,s),s}function Ke(e,t,n,{strict:r}={}){return we(e,{strict:!1})?ws(e,t,n,{strict:r}):o0(e,t,n,{strict:r})}function s0(e,t){if(typeof t=="number"&&t>0&&t>G(e)-1)throw new Mn({offset:t,position:"start",size:G(e)})}function i0(e,t,n){if(typeof t=="number"&&typeof n=="number"&&G(e)!==n-t)throw new Mn({offset:n,position:"end",size:G(e)})}function o0(e,t,n,{strict:r}={}){s0(e,t);const s=e.slice(t,n);return r&&i0(s,t,n),s}function ws(e,t,n,{strict:r}={}){s0(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&i0(s,t,n),s}function Ps(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Er({transaction:e})}function Na({chain:e,currentChainId:t}){if(!e)throw new cs;if(t!==e.id)throw new as({chain:e,currentChainId:t})}function As({blockNumber:e,chain:t,contract:n}){var s;const r=(s=t==null?void 0:t.contracts)==null?void 0:s[n];if(!r)throw new xt({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new xt({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function he(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}class ja extends p{constructor({docsPath:t}={}){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(`
5
5
  `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class Ra extends p{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}const $s={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."},Es={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},vs={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function ae(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new _s(e.type);return`${e.name}(${rt(e.inputs,{includeName:t})})`}function rt(e,{includeName:t=!1}={}){return e?e.map(n=>Bs(n,{includeName:t})).join(t?", ":","):""}function Bs(e,{includeName:t}){return e.type.startsWith("tuple")?`(${rt(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class Is extends p{constructor({docsPath:t}){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(`
@@ -33,4 +33,4 @@ import{aa as ue,$ as j,af as I,B as p,a9 as de,a4 as X0,a2 as q0,a3 as W,ac as w
33
33
  `).slice(0,-1)}class to extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l,stateOverride:b}){var A;const h=n?he(n):void 0;let y=Me({from:h==null?void 0:h.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((A=s==null?void 0:s.nativeCurrency)==null?void 0:A.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});b&&(y+=`
34
34
  ${eo(b)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",y].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class no extends p{constructor(t,{abi:n,args:r,contractAddress:s,docsPath:i,functionName:o,sender:a}){const c=Nt({abi:n,args:r,name:o}),f=c?E0({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=c?ae(c,{includeName:!0}):void 0,u=Me({address:s&&ir(s),function:d,args:f&&f!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${f}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],u&&"Contract Call:",u].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=n,this.args=r,this.cause=t,this.contractAddress=s,this.functionName=o,this.sender=a}}class ro extends p{constructor({abi:t,data:n,functionName:r,message:s,cause:i}){let o,a,c,f;if(n&&n!=="0x")try{a=Xi({abi:t,data:n,cause:i});const{abiItem:u,errorName:l,args:b}=a;if(l==="Error")f=b[0];else if(l==="Panic"){const[h]=b;f=$s[h]}else{const h=u?ae(u,{includeName:!0}):void 0,y=u&&b?E0({abiItem:u,args:b,includeFunctionName:!1,includeName:!1}):void 0;c=[h?`Error: ${h}`:"",y&&y!=="()"?` ${[...Array((l==null?void 0:l.length)??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(u){o=u}else s&&(f=s);let d;o instanceof c0&&(d=o.signature,c=[`Unable to decode signature "${d}" 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=${d}.`]),super(f&&f!=="execution reverted"||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,f||d].join(`
35
35
  `):`The contract function "${r}" reverted.`,{cause:o??i,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=a,this.raw=n,this.reason=f,this.signature=d}}class so extends p{constructor({functionName:t,cause:n}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:n})}}class io extends p{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{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"})}}class B0 extends p{constructor({data:t,message:n}){super(n||"",{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=t}}function jt(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof p?e.walk(s=>(s==null?void 0:s.code)===Ue.code):e;return r instanceof p?new Ue({cause:e,message:r.details}):Ue.nodeMessage.test(n)?new Ue({cause:e,message:e.details}):mt.nodeMessage.test(n)?new mt({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Xt.nodeMessage.test(n)?new Xt({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):qt.nodeMessage.test(n)?new qt({cause:e,nonce:t==null?void 0:t.nonce}):Qt.nodeMessage.test(n)?new Qt({cause:e,nonce:t==null?void 0:t.nonce}):en.nodeMessage.test(n)?new en({cause:e,nonce:t==null?void 0:t.nonce}):tn.nodeMessage.test(n)?new tn({cause:e}):nn.nodeMessage.test(n)?new nn({cause:e,gas:t==null?void 0:t.gas}):rn.nodeMessage.test(n)?new rn({cause:e,gas:t==null?void 0:t.gas}):sn.nodeMessage.test(n)?new sn({cause:e}):gt.nodeMessage.test(n)?new gt({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Xe({cause:e})}function oo(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new to(r,{docsPath:t,...n})}function Rt(e,{format:t}){if(!t)return{};const n={};function r(i){const o=Object.keys(i);for(const a of o)a in e&&(n[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&r(i[a])}const s=t(e||{});return r(s),n}function it(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:s}=e,i=t?he(t):void 0;if(i&&!K(i.address))throw new be({address:i.address});if(s&&!K(s))throw new be({address:s});if(n&&n>mr)throw new mt({maxFeePerGas:n});if(r&&n&&r>n)throw new gt({maxFeePerGas:n,maxPriorityFeePerGas:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dt=BigInt(0),vt=BigInt(1);function Vt(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Wt(e){if(!Vt(e))throw new Error("Uint8Array expected")}function tc(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function nc(e){const t=e.toString(16);return t.length&1?"0"+t:t}function I0(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Dt:BigInt("0x"+e)}const F0=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ao=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function S0(e){if(Wt(e),F0)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=ao[e[n]];return t}const Y={_0:48,_9:57,A:65,F:70,a:97,f:102};function An(e){if(e>=Y._0&&e<=Y._9)return e-Y._0;if(e>=Y.A&&e<=Y.F)return e-(Y.A-10);if(e>=Y.a&&e<=Y.f)return e-(Y.a-10)}function T0(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(F0)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,i=0;s<n;s++,i+=2){const o=An(e.charCodeAt(i)),a=An(e.charCodeAt(i+1));if(o===void 0||a===void 0){const c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[s]=o*16+a}return r}function rc(e){return I0(S0(e))}function sc(e){return Wt(e),I0(S0(Uint8Array.from(e).reverse()))}function co(e,t){return T0(e.toString(16).padStart(t*2,"0"))}function ic(e,t){return co(e,t).reverse()}function oc(e,t,n){let r;if(typeof t=="string")try{r=T0(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(Vt(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return r}function fo(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];Wt(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}function uo(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const lt=e=>typeof e=="bigint"&&Dt<=e;function lo(e,t,n){return lt(e)&&lt(t)&&lt(n)&&t<=e&&e<n}function ac(e,t,n,r){if(!lo(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function cc(e){let t;for(t=0;e>Dt;e>>=vt,t+=1);return t}const fc=e=>(vt<<BigInt(e))-vt,bt=e=>new Uint8Array(e),$n=e=>Uint8Array.from(e);function uc(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=bt(e),s=bt(e),i=0;const o=()=>{r.fill(1),s.fill(0),i=0},a=(...u)=>n(s,r,...u),c=(u=bt(0))=>{s=a($n([0]),u),r=a(),u.length!==0&&(s=a($n([1]),u),r=a())},f=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const l=[];for(;u<t;){r=a();const b=r.slice();l.push(b),u+=r.length}return fo(...l)};return(u,l)=>{o(),c(u);let b;for(;!(b=l(f()));)c();return o(),b}}const bo={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Vt(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function dc(e,t,n={}){const r=(s,i,o)=>{const a=bo[i];if(typeof a!="function")throw new Error("invalid validator function");const c=e[s];if(!(o&&c===void 0)&&!a(c,e))throw new Error("param "+String(s)+" is invalid. Expected "+i+", got "+c)};for(const[s,i]of Object.entries(t))r(s,i,!1);for(const[s,i]of Object.entries(n))r(s,i,!0);return e}function lc(e){const t=new WeakMap;return(n,...r)=>{const s=t.get(n);if(s!==void 0)return s;const i=e(n,...r);return t.set(n,i),i}}const ho="0.1.1";function po(){return ho}class F extends Error{static setStaticOptions(t){F.prototype.docsOrigin=t.docsOrigin,F.prototype.showVersion=t.showVersion,F.prototype.version=t.version}constructor(t,n={}){const r=(()=>{var d;if(n.cause instanceof F){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(d=n.cause)!=null&&d.message?n.cause.message:n.details})(),s=n.cause instanceof F&&n.cause.docsPath||n.docsPath,i=n.docsOrigin??F.prototype.docsOrigin,o=`${i}${s??""}`,a=!!(n.version??F.prototype.showVersion),c=n.version??F.prototype.version,f=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||s||a?["",r?`Details: ${r}`:void 0,s?`See: ${o}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(d=>typeof d=="string").join(`
36
- `);super(f,n.cause?{cause:n.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=n.cause,this.details=r,this.docs=o,this.docsOrigin=i,this.docsPath=s,this.shortMessage=t,this.showVersion=a,this.version=c}walk(t){return k0(this,t)}}Object.defineProperty(F,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${po()}`}});F.setStaticOptions(F.defaultStaticOptions);function k0(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?k0(e.cause,t):t?null:e}function Be(e,t){if(vn(e)>t)throw new So({givenSize:vn(e),maxSize:t})}const X={zero:48,nine:57,A:65,F:70,a:97,f:102};function En(e){if(e>=X.zero&&e<=X.nine)return e-X.zero;if(e>=X.A&&e<=X.F)return e-(X.A-10);if(e>=X.a&&e<=X.f)return e-(X.a-10)}function yo(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new To({size:e.length,targetSize:r,type:"Bytes"});const s=new Uint8Array(r);for(let i=0;i<r;i++){const o=n==="right";s[o?i:r-i-1]=e[o?i:e.length-i-1]}return s}function z0(e,t={}){const{dir:n="left"}=t;let r=e,s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r}function ot(e,t){if(Ee(e)>t)throw new Oo({givenSize:Ee(e),maxSize:t})}function mo(e,t){if(typeof t=="number"&&t>0&&t>Ee(e)-1)throw new H0({offset:t,position:"start",size:Ee(e)})}function go(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Ee(e)!==n-t)throw new H0({offset:n,position:"end",size:Ee(e)})}function C0(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const s=e.replace("0x","");if(s.length>r*2)throw new Lo({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function xo(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r==="0"?"0x":n==="right"&&r.length%2===1?`0x${r}0`:`0x${r}`}const wo="#__bigint";function G0(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+wo:s,n)}const Po=new TextDecoder,Ao=new TextEncoder;function $o(e){if(!(e instanceof Uint8Array)){if(!e)throw new je(e);if(typeof e!="object")throw new je(e);if(!("BYTES_PER_ELEMENT"in e))throw new je(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new je(e)}}function bc(...e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}function hc(e){return e instanceof Uint8Array?e:typeof e=="string"?M0(e):Eo(e)}function Eo(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function M0(e,t={}){const{size:n}=t;let r=e;n&&(ot(e,n),r=U0(e,n));let s=r.slice(2);s.length%2&&(s=`0${s}`);const i=s.length/2,o=new Uint8Array(i);for(let a=0,c=0;a<i;a++){const f=En(s.charCodeAt(c++)),d=En(s.charCodeAt(c++));if(f===void 0||d===void 0)throw new F(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[a]=f<<4|d}return o}function pc(e,t={}){const{size:n}=t,r=Ao.encode(e);return typeof n=="number"?(Be(r,n),vo(r,n)):r}function yc(e,t){return uo(e,t)}function vo(e,t){return yo(e,{dir:"right",size:t})}function Bo(e){return crypto.getRandomValues(new Uint8Array(e))}function vn(e){return e.length}function mc(e,t,n,r={}){const{strict:s}=r;return e.slice(t,n)}function gc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return _0(r,t)}function xc(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Be(r,n),r=Io(r)),r.length>1||r[0]>1)throw new Fo(r);return!!r[0]}function wc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return Go(r,t)}function Pc(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Be(r,n),r=O0(r)),Po.decode(r)}function Io(e){return z0(e,{dir:"left"})}function O0(e){return z0(e,{dir:"right"})}function Ac(e){try{return $o(e),!0}catch{return!1}}class Fo extends F{constructor(t){super(`Bytes value \`${t}\` 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"})}}class je extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` 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"})}}let So=class extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},To=class extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const ko=new TextEncoder,zo=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Co(e,t={}){const{strict:n=!1}=t;if(!e)throw new Bn(e);if(typeof e!="string")throw new Bn(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new In(e);if(!e.startsWith("0x"))throw new In(e)}function vc(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Bc(e){return e instanceof Uint8Array?$e(e):Array.isArray(e)?$e(new Uint8Array(e)):e}function Ic(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ot(n,t.size),L0(n,t.size)):n}function $e(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=zo[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(ot(r,t.size),U0(r,t.size)):r}function q(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof i=="bigint"&&n?-i-1n:0;if(i&&s>i||s<o){const f=typeof e=="bigint"?"n":"";throw new Mo({max:i?`${i}${f}`:void 0,min:`${o}${f}`,signed:n,size:r,value:`${e}${f}`})}const c=`0x${(n&&s<0?BigInt.asUintN(r*8,BigInt(s)):s).toString(16)}`;return r?L0(c,r):c}function Fc(e,t={}){return $e(ko.encode(e),t)}function L0(e,t){return C0(e,{dir:"left",size:t})}function U0(e,t){return C0(e,{dir:"right",size:t})}function Sc(e){return $e(Bo(e))}function Tc(e,t,n,r={}){const{strict:s}=r;mo(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&go(i,t,n),i}function Ee(e){return Math.ceil((e.length-2)/2)}function kc(e){return xo(e,{dir:"left"})}function _0(e,t={}){const{signed:n}=t;t.size&&ot(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,i=(1n<<BigInt(s)*8n)-1n,o=i>>1n;return r<=o?r:r-i-1n}function Go(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:_0(e,t))}function zc(e,t={}){const{size:n}=t;let r=M0(e);return n&&(Be(r,n),r=O0(r)),new TextDecoder().decode(r)}function Cc(e,t={}){const{strict:n=!1}=t;try{return Co(e,{strict:n}),!0}catch{return!1}}class Mo extends F{constructor({max:t,min:n,signed:r,size:s,value:i}){super(`Number \`${i}\` is not in safe${s?` ${s*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class Bn extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` 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"})}}class In extends F{constructor(t){super(`Value \`${t}\` 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"})}}class Gc extends F{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class Oo extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class H0 extends F{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class Lo extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Kt(e){const{blockHash:t,blockNumber:n,blockTag:r,requireCanonical:s}=e;if(s!==void 0&&!t)throw new p("`requireCanonical` can only be provided when `blockHash` is set.");return t?s?{blockHash:t,requireCanonical:s}:{blockHash:t}:typeof n=="bigint"?I(n):r??"latest"}const Uo="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",_o="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Mc="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Ho="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",ht="/docs/contract/encodeDeployData";function N0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Is({docsPath:ht});if(!("inputs"in s))throw new mn({docsPath:ht});if(!s.inputs||s.inputs.length===0)throw new mn({docsPath:ht});const i=$0(s.inputs,n);return et([r,i])}const Fn="/docs/contract/encodeFunctionData";function No(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const i=Nt({abi:t,args:n,name:r});if(!i)throw new Ze(r,{docsPath:Fn});s=i}if(s.type!=="function")throw new Ze(void 0,{docsPath:Fn});return{abi:[s],functionName:Ot(ae(s))}}function jo(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:No(e)})(),s=n[0],i=r,o="inputs"in s&&s.inputs?$0(s.inputs,t??[]):void 0;return et([i,o??"0x"])}function j0(e,t){if(!K(e,{strict:!1}))throw new be({address:e});if(!K(t,{strict:!1}))throw new be({address:t});return e.toLowerCase()===t.toLowerCase()}function Ro(e){const t=Oe(`0x${e.substring(4)}`).substring(26);return nt(`0x${t}`)}async function Do({hash:e,signature:t}){const n=we(e)?e:Re(e),{secp256k1:r}=await On(async()=>{const{secp256k1:o}=await import("./secp256k1-BQuyxdaC.js").then(a=>a.a);return{secp256k1:o}},[]);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:f,s:d,v:u,yParity:l}=t,b=Number(l??u),h=Sn(b);return new r.Signature(De(f),De(d)).addRecoveryBit(h)}const o=we(t)?t:Re(t);if(G(o)!==65)throw new Error("invalid signature length");const a=ue(`0x${o.slice(130)}`),c=Sn(a);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Sn(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Vo({hash:e,signature:t}){return Ro(await Do({hash:e,signature:t}))}function Wo(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,i=Oe(et(["0x05",Pr([t?I(t):"0x",s,n?I(n):"0x"])]));return r==="bytes"?de(i):i}async function Ko(e){const{authorization:t,signature:n}=e;return Vo({hash:Wo(t),signature:n??t})}function N(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:i=>t(e,i)}function Zo(e){return{address:e.address,amount:q(e.amount),index:q(e.index),validatorIndex:q(e.validatorIndex)}}function Jo(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:q(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:q(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:q(e.gasLimit)},...typeof e.number=="bigint"&&{number:q(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:q(e.prevRandao)},...typeof e.time=="bigint"&&{time:q(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Zo)}}}const Yo="0x82ad56cb",pt="/docs/contract/decodeFunctionResult";function Xo(e){const{abi:t,args:n,functionName:r,data:s}=e;let i=t[0];if(r){const a=Nt({abi:t,args:n,name:r});if(!a)throw new Ze(r,{docsPath:pt});i=a}if(i.type!=="function")throw new Ze(void 0,{docsPath:pt});if(!i.outputs)throw new Cs(i.name,{docsPath:pt});const o=st(i.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}function Tn(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new on({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new on({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function qo(e){const{balance:t,nonce:n,state:r,stateDiff:s,code:i}=e,o={};if(i!==void 0&&(o.code=i),t!==void 0&&(o.balance=I(t)),n!==void 0&&(o.nonce=I(n)),r!==void 0&&(o.state=Tn(r)),s!==void 0){if(o.state)throw new Qi;o.stateDiff=Tn(s)}return o}function R0(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!K(n,{strict:!1}))throw new be({address:n});if(t[n])throw new qi({address:n});t[n]=qo(r)}return t}async function Oc(e,t){var Z,C,Ie,Fe,ce,Se;const{account:n=e.account,authorizationList:r,batch:s=!!((Z=e.batch)!=null&&Z.multicall),blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:f,blobs:d,blockOverrides:u,code:l,data:b,factory:h,factoryData:y,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,requestOptions:k,to:P,value:w,stateOverride:$,...M}=t,S=n?he(n):void 0;if(l&&(h||y))throw new p("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&P)throw new p("Cannot provide both `code` & `to` as parameters.");const z=l&&b,B=h&&y&&P&&b,O=z||B,g=z?V0({code:l,data:b}):B?sa({data:b,factory:h,factoryData:y,to:P}):b;try{it(t);const te=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),H=u?Jo(u):void 0,ne=R0($),Le=(Fe=(Ie=(C=e.chain)==null?void 0:C.formatters)==null?void 0:Ie.transactionRequest)==null?void 0:Fe.format,Te=(Le||Qe)({...Rt(M,{format:Le}),accessList:f,account:S,authorizationList:r,blobs:d,data:g,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,to:O?void 0:P,value:w},"call");if(s&&Qo({request:Te})&&!H&&i===void 0)try{const{deployless:D=!1}=typeof((ce=e.batch)==null?void 0:ce.multicall)=="object"?e.batch.multicall:{},at=D0(e,{blockNumber:o,deployless:D});if(!at||!ra(ne,at))return await na(e,{...Te,blockHash:i,blockNumber:o,blockTag:a,multicallAddress:at,requestOptions:k,requireCanonical:c,rpcStateOverride:ne})}catch(D){if(!(D instanceof Qn)&&!(D instanceof xt))throw D}const Y0=(()=>{const D=[Te,te];return ne&&H?[...D,ne,H]:ne?[...D,ne]:H?[...D,{},H]:D})(),Yt=await e.request({method:"eth_call",params:Y0},k);return Yt==="0x"?{data:void 0}:{data:Yt}}catch(te){if((Se=k==null?void 0:k.signal)!=null&&Se.aborted)throw or(k.signal);if(ar(te))throw te;const H=ia(te),{offchainLookup:ne,offchainLookupSignature:Le}=await On(async()=>{const{offchainLookup:Jt,offchainLookupSignature:Te}=await import("./ccip-DiW7RkRR.js");return{offchainLookup:Jt,offchainLookupSignature:Te}},__vite__mapDeps([0,1,2,3,4,5,6]));if(e.ccipRead!==!1&&(H==null?void 0:H.slice(0,10))===Le&&P)return{data:await ne(e,{data:H,requestOptions:k,to:P})};throw O&&(H==null?void 0:H.slice(0,10))==="0x101bb98d"?new io({factory:h}):oo(te,{...t,account:S,chain:e.chain})}}function Qo({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(Yo)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}let ea=0;const kn=new WeakMap;function ta(e){if(!e)return"default";const t=kn.get(e);if(t!==void 0)return t;const n=ea++;return kn.set(e,n),n}async function na(e,t){var T;const{batchSize:n=1024,deployless:r=!1,wait:s=0}=typeof((T=e.batch)==null?void 0:T.multicall)=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:f,multicallAddress:d,requestOptions:u,rpcStateOverride:l,to:b}=t,h=d!==void 0?d:D0(e,{blockNumber:o,deployless:r}),y=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),A=typeof y=="string"?y:JSON.stringify(y),x=l?`.${JSON.stringify(l)}`:"",{schedule:E}=cr({id:`${e.uid}.${A}.${ta(u)}${x}`,wait:s,shouldSplitBatch(k){return k.reduce((w,{data:$})=>w+($.length-2),0)>n*2},fn:async k=>{const P=k.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),w=jo({abi:an,args:[P],functionName:"aggregate3"}),$={...h===null?{data:V0({code:Ho,data:w})}:{to:h,data:w}},M=await e.request({method:"eth_call",params:l?[$,y,l]:[$,y]},u);return Xo({abi:an,args:[P],functionName:"aggregate3",data:M||"0x"})}}),[{returnData:m,success:v}]=await E({data:f,to:b});if(!v)throw new B0({data:m});return m==="0x"?{data:void 0}:{data:m}}function D0(e,t){const{blockNumber:n,deployless:r}=t;if(r)return null;if(e.chain)return As({blockNumber:n,chain:e.chain,contract:"multicall3"});throw new Qn}function ra(e,t){return e?Object.keys(e).some(n=>j0(n,t)):!1}function V0(e){const{code:t,data:n}=e;return N0({abi:P0(["constructor(bytes, bytes)"]),bytecode:Uo,args:[t,n]})}function sa(e){const{data:t,factory:n,factoryData:r,to:s}=e;return N0({abi:P0(["constructor(address, bytes, address, bytes)"]),bytecode:_o,args:[s,t,n,r]})}function ia(e){var n;if(!(e instanceof p))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}const oa=3;function Lc(e,{abi:t,address:n,args:r,docsPath:s,functionName:i,sender:o}){const a=e instanceof B0?e:e instanceof p?e.walk(h=>"data"in h)||e.walk():{},{code:c,data:f,details:d,message:u,shortMessage:l}=a,b=e instanceof Mt?new so({functionName:i,cause:e}):[oa,fr.code].includes(c)&&(f||d||u||l)||c===ur.code&&d==="execution reverted"&&f?new ro({abi:t,data:typeof f=="object"?f.data:f,functionName:i,message:a instanceof dr?d:l??u,cause:e}):e;return new no(b,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:i,sender:o})}const zn="/docs/contract/decodeEventLog";function Cn(e){const{abi:t,data:n,strict:r,topics:s}=e,i=r??!0,[o,...a]=s;if(!o)throw new ks({docsPath:zn});const c=t.find(x=>x.type==="event"&&o===Ht(ae(x)));if(!(c&&"name"in c)||c.type!=="event")throw new zs(o,{docsPath:zn});const{name:f,inputs:d}=c,u=d==null?void 0:d.some(x=>!("name"in x&&x.name)),l=u?[]:{},b=d.map((x,E)=>[x,E]).filter(([x])=>"indexed"in x&&x.indexed),h=[];for(let x=0;x<b.length;x++){const[E,m]=b[x],v=a[x];if(!v){if(i)throw new Ms({abiItem:c,param:E});h.push([E,m]);continue}l[u?m:E.name||m]=aa({param:E,value:v})}const y=d.filter(x=>!("indexed"in x&&x.indexed)),A=i?y:[...h.map(([x])=>x),...y];if(A.length>0){if(n&&n!=="0x")try{const x=st(A,n);if(x){let E=0;if(!i)for(const[m,v]of h)l[u?v:m.name||v]=x[E++];if(u)for(let m=0;m<d.length;m++)l[m]===void 0&&E<x.length&&(l[m]=x[E++]);else for(let m=0;m<y.length;m++)l[y[m].name]=x[E++]}}catch(x){if(i)throw x instanceof a0||x instanceof Hn?new gn({abiItem:c,data:n,params:A,size:G(n)}):x}else if(i)throw new gn({abiItem:c,data:"0x",params:A,size:0})}return{eventName:f,args:Object.values(l).length>0?l:void 0}}function aa({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(st([e],t)||[])[0]}function Uc(e){const{abi:t,args:n,logs:r,strict:s=!0}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),o=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:Ht(a)}));return r.map(a=>{var l;const c=typeof a.blockNumber=="string"?_n(a):a,f=o.filter(b=>c.topics[0]===b.selector);if(f.length===0)return null;let d,u;for(const b of f)try{d=Cn({...c,abi:[b.abi],strict:!0}),u=b;break}catch{}if(!d&&!s){u=f[0];try{d=Cn({data:c.data,topics:c.topics,abi:[u.abi],strict:!1})}catch{const b=(l=u.abi.inputs)==null?void 0:l.some(h=>!("name"in h&&h.name));return{...c,args:b?[]:{},eventName:u.abi.name}}}return!d||!u||i&&!i.includes(d.eventName)||!ca({args:d.args,inputs:u.abi.inputs,matchArgs:n})?null:{...d,...c}}).filter(Boolean)}function ca(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function s(i,o,a){try{return i.type==="address"?j0(o,a):i.type==="string"||i.type==="bytes"?Oe(Je(o))===a:o===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((i,o)=>{if(i==null)return!0;const a=n[o];return a?(Array.isArray(i)?i:[i]).some(f=>s(a,f,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([i,o])=>{if(o==null)return!0;const a=n.find(f=>f.name===i);return a?(Array.isArray(o)?o:[o]).some(f=>s(a,f,t[i])):!1}):!1}function fa(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new vr(r,{docsPath:t,...n})}async function W0(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return ue(t)}class K0 extends p{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Zt extends p{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class ua extends p{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${W(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class da extends p{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}async function Ge(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){var f,d,u;const i=s??!1,o=n!==void 0?I(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[o||r,i]},{dedupe:!!o}),!a)throw new da({blockHash:t,blockNumber:n});return(((u=(d=(f=e.chain)==null?void 0:f.formatters)==null?void 0:d.block)==null?void 0:u.format)||Un)(a,"getBlock")}async function Z0(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function _c(e,t){return J0(e,t)}async function J0(e,t){var i,o;const{block:n,chain:r=e.chain,request:s}=t||{};try{const a=((i=r==null?void 0:r.fees)==null?void 0:i.maxPriorityFeePerGas)??((o=r==null?void 0:r.fees)==null?void 0:o.defaultPriorityFee);if(typeof a=="function"){const f=n||await N(e,Ge,"getBlock")({}),d=await a({block:f,client:e,request:s});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return De(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):N(e,Ge,"getBlock")({}),N(e,Z0,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Zt;const f=c-a.baseFeePerGas;return f<0n?0n:f}}async function Hc(e,t){return Bt(e,t)}async function Bt(e,t){var l,b;const{block:n,chain:r=e.chain,request:s,type:i="eip1559"}=t||{},o=await(async()=>{var h,y;return typeof((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):((y=r==null?void 0:r.fees)==null?void 0:y.baseFeeMultiplier)??1.2})();if(o<1)throw new K0;const c=10**(((l=o.toString().split(".")[1])==null?void 0:l.length)??0),f=h=>h*BigInt(Math.ceil(o*c))/BigInt(c),d=n||await N(e,Ge,"getBlock")({});if(typeof((b=r==null?void 0:r.fees)==null?void 0:b.estimateFeesPerGas)=="function"){const h=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:s,type:i});if(h!==null)return h}if(i==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Zt;const h=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await J0(e,{block:d,chain:r,request:s}),y=f(d.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??y+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??f(await N(e,Z0,"getGasPrice")({}))}}class la extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l}){var h;const b=Me({from:n==null?void 0:n.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((h=s==null?void 0:s.nativeCurrency)==null?void 0:h.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",b].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function ba(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new la(r,{docsPath:t,...n})}async function ha(e,t){var o,a,c;const{account:n=e.account,prepare:r=!0}=t,s=n?he(n):void 0,i=(()=>{if(Array.isArray(r))return r;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const f=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Ko({authorization:t.authorizationList[0]}).catch(()=>{throw new p("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,blockNumber:h,blockTag:y,data:A,gas:x,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,value:P,stateOverride:w,...$}=r?await ga(e,{...t,parameters:i,to:f}):t;if(x&&t.gas!==x)return x;const S=(typeof h=="bigint"?I(h):void 0)||y,z=R0(w);it(t);const B=(c=(a=(o=e.chain)==null?void 0:o.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,g=(B||Qe)({...Rt($,{format:B}),account:s,accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,data:A,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,to:f,value:P},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:z?[g,S??e.experimental_blockTag??"latest",z]:S?[g,S]:[g]}))}catch(f){throw ba(f,{...t,account:s,chain:e.chain})}}async function pa(e,{address:t,blockHash:n,blockNumber:r,blockTag:s="latest",requireCanonical:i}){const o=Kt({blockHash:n,blockNumber:r,blockTag:s,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,o]},{dedupe:typeof r=="bigint"||n!==void 0});return ue(a)}async function ya(e,t){var w,$,M,S,z;const{account:n=e.account,accessList:r,authorizationList:s,chain:i=e.chain,blobVersionedHashes:o,blobs:a,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:h,nonceManager:y,to:A,type:x,value:E,...m}=t,v=await(async()=>{if(!n||!y||typeof h<"u")return h;const B=he(n),O=i?i.id:await N(e,W0,"getChainId")({});return await y.consume({address:B.address,chainId:O,client:e})})();it(t);const T=($=(w=i==null?void 0:i.formatters)==null?void 0:w.transactionRequest)==null?void 0:$.format,P=(T||Qe)({...Rt(m,{format:T}),account:n?he(n):void 0,accessList:r,authorizationList:s,blobs:a,blobVersionedHashes:o,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:v,to:A,type:x,value:E},"fillTransaction");try{const B=await e.request({method:"eth_fillTransaction",params:[P]}),g=(((S=(M=i==null?void 0:i.formatters)==null?void 0:M.transaction)==null?void 0:S.format)||St)(B.tx);delete g.blockHash,delete g.blockNumber,delete g.r,delete g.s,delete g.transactionIndex,delete g.v,delete g.yParity,g.data=g.input,g.gas&&(g.gas=t.gas??g.gas),g.gasPrice&&(g.gasPrice=t.gasPrice??g.gasPrice),g.maxFeePerBlobGas&&(g.maxFeePerBlobGas=t.maxFeePerBlobGas??g.maxFeePerBlobGas),g.maxFeePerGas&&(g.maxFeePerGas=t.maxFeePerGas??g.maxFeePerGas),g.maxPriorityFeePerGas&&(g.maxPriorityFeePerGas=t.maxPriorityFeePerGas??g.maxPriorityFeePerGas),typeof g.nonce<"u"&&(g.nonce=t.nonce??g.nonce);const Z=await(async()=>{var ce,Se;if(typeof((ce=i==null?void 0:i.fees)==null?void 0:ce.baseFeeMultiplier)=="function"){const te=await N(e,Ge,"getBlock")({});return i.fees.baseFeeMultiplier({block:te,client:e,request:t})}return((Se=i==null?void 0:i.fees)==null?void 0:Se.baseFeeMultiplier)??1.2})();if(Z<1)throw new K0;const Ie=10**(((z=Z.toString().split(".")[1])==null?void 0:z.length)??0),Fe=ce=>ce*BigInt(Math.ceil(Z*Ie))/BigInt(Ie);return g.feePayerSignature||(g.maxFeePerGas&&!t.maxFeePerGas&&(g.maxFeePerGas=Fe(g.maxFeePerGas)),g.gasPrice&&!t.gasPrice&&(g.gasPrice=Fe(g.gasPrice))),{raw:B.raw,transaction:{from:P.from,...g},...B.capabilities?{capabilities:B.capabilities}:{}}}catch(B){throw fa(B,{...t,chain:e.chain})}}const ma=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Gn=new Map,yt=new It(128);async function ga(e,t){var v,T,k;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=ma);const{account:r,chain:s=e.chain,nonceManager:i,parameters:o}=n,a=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function f(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await N(e,W0,"getChainId")({}),c))}const d=r&&he(r);let u=n.nonce;if(o.includes("nonce")&&typeof u>"u"&&d&&i){const P=await f();u=await i.consume({address:d.address,chainId:P,client:e})}a!=null&&a.fn&&((v=a.runAt)!=null&&v.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillTransaction"}),u??(u=n.nonce));const b=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&n.kzg&&n.blobs||yt.get(e.uid)===!1||!["fees","gas"].some(w=>o.includes(w))?!1:!!(o.includes("chainId")&&typeof n.chainId!="number"||o.includes("nonce")&&typeof u!="number"||o.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof n.gas!="bigint"))?await N(e,ya,"fillTransaction")({...n,nonce:u}).then(P=>{const{chainId:w,from:$,gas:M,gasPrice:S,nonce:z,maxFeePerBlobGas:B,maxFeePerGas:O,maxPriorityFeePerGas:g,type:Z,...C}=P.transaction;return yt.set(e.uid,!0),{...n,...$?{from:$}:{},...Z&&!n.type?{type:Z}:{},...typeof w<"u"?{chainId:w}:{},...typeof M<"u"?{gas:M}:{},...typeof S<"u"?{gasPrice:S}:{},...typeof z<"u"?{nonce:z}:{},...typeof B<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:B}:{},...typeof O<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:O}:{},...typeof g<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:g}:{},..."nonceKey"in C&&typeof C.nonceKey<"u"?{nonceKey:C.nonceKey}:{},..."keyAuthorization"in C&&typeof C.keyAuthorization<"u"&&C.keyAuthorization!==null&&!("keyAuthorization"in n)?{keyAuthorization:C.keyAuthorization}:{},..."feePayerSignature"in C&&typeof C.feePayerSignature<"u"&&C.feePayerSignature!==null?{feePayerSignature:C.feePayerSignature}:{},..."feeToken"in C&&typeof C.feeToken<"u"&&C.feeToken!==null&&!("feeToken"in n)?{feeToken:C.feeToken}:{},...P.capabilities?{_capabilities:P.capabilities}:{}}}).catch(P=>{var S,z;const w=P;if(w.name!=="TransactionExecutionError")return n;if((S=w.walk)==null?void 0:S.call(w,B=>B.name==="ExecutionRevertedError"))throw P;return((z=w.walk)==null?void 0:z.call(w,B=>{var g;const O=B;return O.name==="MethodNotFoundRpcError"||O.name==="MethodNotSupportedRpcError"||((g=O.message)==null?void 0:g.includes("eth_fillTransaction is not available"))}))&&yt.set(e.uid,!1),n}):n;u??(u=b.nonce),n={...b,...d?{from:d==null?void 0:d.address}:{},...typeof u<"u"?{nonce:u}:{}};const{blobs:h,gas:y,kzg:A,type:x}=n;a!=null&&a.fn&&((T=a.runAt)!=null&&T.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillParameters"}));let E;async function m(){return E||(E=await N(e,Ge,"getBlock")({blockTag:"latest"}),E)}if(o.includes("nonce")&&typeof u>"u"&&d&&!i&&(n.nonce=await N(e,pa,"getTransactionCount")({address:d.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&h&&A){const P=Rn({blobs:h,kzg:A});if(o.includes("blobVersionedHashes")){const w=ts({commitments:P,to:"hex"});n.blobVersionedHashes=w}if(o.includes("sidecars")){const w=Dn({blobs:h,commitments:P,kzg:A}),$=os({blobs:h,commitments:P,proofs:w,to:"hex"});n.sidecars=$}}if(o.includes("chainId")&&(n.chainId=await f()),(o.includes("fees")||o.includes("type"))&&typeof x>"u")try{n.type=Ps(n)}catch{let P=Gn.get(e.uid);if(typeof P>"u"){const w=await m();P=typeof(w==null?void 0:w.baseFeePerGas)=="bigint",Gn.set(e.uid,P)}n.type=P?"eip1559":"legacy"}if(o.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const P=await m(),{maxFeePerGas:w,maxPriorityFeePerGas:$}=await Bt(e,{block:P,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<$)throw new ua({maxPriorityFeePerGas:$});n.maxPriorityFeePerGas=$,n.maxFeePerGas=w}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Zt;if(typeof n.gasPrice>"u"){const P=await m(),{gasPrice:w}=await Bt(e,{block:P,chain:s,request:n,type:"legacy"});n.gasPrice=w}}return o.includes("gas")&&typeof y>"u"&&(n.gas=await N(e,ha,"estimateGas")({...n,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((k=a.runAt)!=null&&k.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"afterFillParameters"})),it(n),delete n.parameters,n}async function Nc(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}export{B0 as $,Is as A,K0 as B,to as C,io as D,gn as E,Ms as F,Zt as G,la as H,Ls as I,Os as J,Xa as K,qa as L,ui as M,be as N,Us as O,_a as P,_s as Q,fi as R,Ba as S,ci as T,oi as U,hi as V,Er as W,ve as X,Ia as Y,li as Z,ua as _,mn as a,Ke as a$,ai as a0,Qi as a1,vr as a2,Fa as a3,Sa as a4,di as a5,si as a6,Ja as a7,ka as a8,Na as a9,Mc as aA,Un as aB,kt as aC,_n as aD,St as aE,hr as aF,Qe as aG,Nt as aH,Ha as aI,As as aJ,Lc as aK,Ht as aL,ki as aM,Ot as aN,Ps as aO,K as aP,j0 as aQ,Oe as aR,va as aS,mr as aT,P0 as aU,Uc as aV,No as aW,Vo as aX,Do as aY,pr as aZ,Qr as a_,it as aa,Rn as ab,Dn as ac,zi as ad,Ci as ae,Q as af,Gi as ag,nt as ah,es as ai,ts as aj,Pe as ak,gr as al,et as am,st as an,Xi as ao,Cn as ap,Xo as aq,Aa as ar,Pa as as,$a as at,Ea as au,Uo as av,_o as aw,$0 as ax,N0 as ay,jo as az,a0 as b,gs as b$,o0 as b0,ws as b1,os as b2,is as b3,A0 as b4,Pr as b5,Ln as b6,ja as b7,Ko as b8,N as b9,dc as bA,Ve as bB,cc as bC,fo as bD,ac as bE,oc as bF,T0 as bG,Vt as bH,uc as bI,tc as bJ,S0 as bK,lo as bL,nc as bM,lc as bN,Ga as bO,Ca as bP,Xr as bQ,Mi as bR,ec as bS,Ge as bT,Kt as bU,yi as bV,Fi as bW,y0 as bX,R as bY,pe as bZ,Ya as b_,W0 as ba,Rt as bb,ga as bc,ma as bd,Nc as be,Ra as bf,fa as bg,he as bh,Oc as bi,ss as bj,La as bk,ns as bl,Ua as bm,ae as bn,Es as bo,Wn as bp,za as bq,zt as br,le as bs,We as bt,Ae as bu,sc as bv,rc as bw,ic as bx,co as by,fc as bz,Mt as c,hc as c0,$e as c1,qr as c2,Cc as c3,Ee as c4,F as c5,vc as c6,q as c7,M0 as c8,Ac as c9,Ta as cA,Qa as cB,br as cC,oo as cD,Jo as cE,jt as cF,ya as cG,_c as cH,Z0 as cI,Gc as cJ,Oa as cK,Ma as cL,yc as cM,bc as cN,_0 as cO,zc as cP,Co as cQ,Sc as cR,G0 as ca,Tc as cb,Bc as cc,pc as cd,kc as ce,wc as cf,mc as cg,xc as ch,gc as ci,Pc as cj,Io as ck,L0 as cl,Ic as cm,Mo as cn,U0 as co,Fc as cp,vn as cq,ze as cr,Rs as cs,Go as ct,Ho as cu,ha as cv,pa as cw,Me as cx,Hc as cy,R0 as cz,Fs as d,Ss as e,Ts as f,Da as g,Va as h,c0 as i,Wa as j,ks as k,zs as l,Ze as m,Cs as n,Ka as o,qi as p,da as q,Za as r,xt as s,as as t,cs as u,bi as v,Qn as w,no as x,ro as y,so as z};
36
+ `);super(f,n.cause?{cause:n.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=n.cause,this.details=r,this.docs=o,this.docsOrigin=i,this.docsPath=s,this.shortMessage=t,this.showVersion=a,this.version=c}walk(t){return k0(this,t)}}Object.defineProperty(F,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${po()}`}});F.setStaticOptions(F.defaultStaticOptions);function k0(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?k0(e.cause,t):t?null:e}function Be(e,t){if(vn(e)>t)throw new So({givenSize:vn(e),maxSize:t})}const X={zero:48,nine:57,A:65,F:70,a:97,f:102};function En(e){if(e>=X.zero&&e<=X.nine)return e-X.zero;if(e>=X.A&&e<=X.F)return e-(X.A-10);if(e>=X.a&&e<=X.f)return e-(X.a-10)}function yo(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new To({size:e.length,targetSize:r,type:"Bytes"});const s=new Uint8Array(r);for(let i=0;i<r;i++){const o=n==="right";s[o?i:r-i-1]=e[o?i:e.length-i-1]}return s}function z0(e,t={}){const{dir:n="left"}=t;let r=e,s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r}function ot(e,t){if(Ee(e)>t)throw new Oo({givenSize:Ee(e),maxSize:t})}function mo(e,t){if(typeof t=="number"&&t>0&&t>Ee(e)-1)throw new H0({offset:t,position:"start",size:Ee(e)})}function go(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Ee(e)!==n-t)throw new H0({offset:n,position:"end",size:Ee(e)})}function C0(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const s=e.replace("0x","");if(s.length>r*2)throw new Lo({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function xo(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r==="0"?"0x":n==="right"&&r.length%2===1?`0x${r}0`:`0x${r}`}const wo="#__bigint";function G0(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+wo:s,n)}const Po=new TextDecoder,Ao=new TextEncoder;function $o(e){if(!(e instanceof Uint8Array)){if(!e)throw new je(e);if(typeof e!="object")throw new je(e);if(!("BYTES_PER_ELEMENT"in e))throw new je(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new je(e)}}function bc(...e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}function hc(e){return e instanceof Uint8Array?e:typeof e=="string"?M0(e):Eo(e)}function Eo(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function M0(e,t={}){const{size:n}=t;let r=e;n&&(ot(e,n),r=U0(e,n));let s=r.slice(2);s.length%2&&(s=`0${s}`);const i=s.length/2,o=new Uint8Array(i);for(let a=0,c=0;a<i;a++){const f=En(s.charCodeAt(c++)),d=En(s.charCodeAt(c++));if(f===void 0||d===void 0)throw new F(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[a]=f<<4|d}return o}function pc(e,t={}){const{size:n}=t,r=Ao.encode(e);return typeof n=="number"?(Be(r,n),vo(r,n)):r}function yc(e,t){return uo(e,t)}function vo(e,t){return yo(e,{dir:"right",size:t})}function Bo(e){return crypto.getRandomValues(new Uint8Array(e))}function vn(e){return e.length}function mc(e,t,n,r={}){const{strict:s}=r;return e.slice(t,n)}function gc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return _0(r,t)}function xc(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Be(r,n),r=Io(r)),r.length>1||r[0]>1)throw new Fo(r);return!!r[0]}function wc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return Go(r,t)}function Pc(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Be(r,n),r=O0(r)),Po.decode(r)}function Io(e){return z0(e,{dir:"left"})}function O0(e){return z0(e,{dir:"right"})}function Ac(e){try{return $o(e),!0}catch{return!1}}class Fo extends F{constructor(t){super(`Bytes value \`${t}\` 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"})}}class je extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` 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"})}}let So=class extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},To=class extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const ko=new TextEncoder,zo=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Co(e,t={}){const{strict:n=!1}=t;if(!e)throw new Bn(e);if(typeof e!="string")throw new Bn(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new In(e);if(!e.startsWith("0x"))throw new In(e)}function vc(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Bc(e){return e instanceof Uint8Array?$e(e):Array.isArray(e)?$e(new Uint8Array(e)):e}function Ic(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ot(n,t.size),L0(n,t.size)):n}function $e(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=zo[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(ot(r,t.size),U0(r,t.size)):r}function q(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof i=="bigint"&&n?-i-1n:0;if(i&&s>i||s<o){const f=typeof e=="bigint"?"n":"";throw new Mo({max:i?`${i}${f}`:void 0,min:`${o}${f}`,signed:n,size:r,value:`${e}${f}`})}const c=`0x${(n&&s<0?BigInt.asUintN(r*8,BigInt(s)):s).toString(16)}`;return r?L0(c,r):c}function Fc(e,t={}){return $e(ko.encode(e),t)}function L0(e,t){return C0(e,{dir:"left",size:t})}function U0(e,t){return C0(e,{dir:"right",size:t})}function Sc(e){return $e(Bo(e))}function Tc(e,t,n,r={}){const{strict:s}=r;mo(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&go(i,t,n),i}function Ee(e){return Math.ceil((e.length-2)/2)}function kc(e){return xo(e,{dir:"left"})}function _0(e,t={}){const{signed:n}=t;t.size&&ot(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,i=(1n<<BigInt(s)*8n)-1n,o=i>>1n;return r<=o?r:r-i-1n}function Go(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:_0(e,t))}function zc(e,t={}){const{size:n}=t;let r=M0(e);return n&&(Be(r,n),r=O0(r)),new TextDecoder().decode(r)}function Cc(e,t={}){const{strict:n=!1}=t;try{return Co(e,{strict:n}),!0}catch{return!1}}class Mo extends F{constructor({max:t,min:n,signed:r,size:s,value:i}){super(`Number \`${i}\` is not in safe${s?` ${s*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class Bn extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` 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"})}}class In extends F{constructor(t){super(`Value \`${t}\` 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"})}}class Gc extends F{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class Oo extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class H0 extends F{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class Lo extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Kt(e){const{blockHash:t,blockNumber:n,blockTag:r,requireCanonical:s}=e;if(s!==void 0&&!t)throw new p("`requireCanonical` can only be provided when `blockHash` is set.");return t?s?{blockHash:t,requireCanonical:s}:{blockHash:t}:typeof n=="bigint"?I(n):r??"latest"}const Uo="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",_o="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Mc="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Ho="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",ht="/docs/contract/encodeDeployData";function N0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Is({docsPath:ht});if(!("inputs"in s))throw new mn({docsPath:ht});if(!s.inputs||s.inputs.length===0)throw new mn({docsPath:ht});const i=$0(s.inputs,n);return et([r,i])}const Fn="/docs/contract/encodeFunctionData";function No(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const i=Nt({abi:t,args:n,name:r});if(!i)throw new Ze(r,{docsPath:Fn});s=i}if(s.type!=="function")throw new Ze(void 0,{docsPath:Fn});return{abi:[s],functionName:Ot(ae(s))}}function jo(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:No(e)})(),s=n[0],i=r,o="inputs"in s&&s.inputs?$0(s.inputs,t??[]):void 0;return et([i,o??"0x"])}function j0(e,t){if(!K(e,{strict:!1}))throw new be({address:e});if(!K(t,{strict:!1}))throw new be({address:t});return e.toLowerCase()===t.toLowerCase()}function Ro(e){const t=Oe(`0x${e.substring(4)}`).substring(26);return nt(`0x${t}`)}async function Do({hash:e,signature:t}){const n=we(e)?e:Re(e),{secp256k1:r}=await On(async()=>{const{secp256k1:o}=await import("./secp256k1-DFslM7tB.js").then(a=>a.a);return{secp256k1:o}},[]);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:f,s:d,v:u,yParity:l}=t,b=Number(l??u),h=Sn(b);return new r.Signature(De(f),De(d)).addRecoveryBit(h)}const o=we(t)?t:Re(t);if(G(o)!==65)throw new Error("invalid signature length");const a=ue(`0x${o.slice(130)}`),c=Sn(a);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Sn(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Vo({hash:e,signature:t}){return Ro(await Do({hash:e,signature:t}))}function Wo(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,i=Oe(et(["0x05",Pr([t?I(t):"0x",s,n?I(n):"0x"])]));return r==="bytes"?de(i):i}async function Ko(e){const{authorization:t,signature:n}=e;return Vo({hash:Wo(t),signature:n??t})}function N(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:i=>t(e,i)}function Zo(e){return{address:e.address,amount:q(e.amount),index:q(e.index),validatorIndex:q(e.validatorIndex)}}function Jo(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:q(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:q(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:q(e.gasLimit)},...typeof e.number=="bigint"&&{number:q(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:q(e.prevRandao)},...typeof e.time=="bigint"&&{time:q(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Zo)}}}const Yo="0x82ad56cb",pt="/docs/contract/decodeFunctionResult";function Xo(e){const{abi:t,args:n,functionName:r,data:s}=e;let i=t[0];if(r){const a=Nt({abi:t,args:n,name:r});if(!a)throw new Ze(r,{docsPath:pt});i=a}if(i.type!=="function")throw new Ze(void 0,{docsPath:pt});if(!i.outputs)throw new Cs(i.name,{docsPath:pt});const o=st(i.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}function Tn(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new on({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new on({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function qo(e){const{balance:t,nonce:n,state:r,stateDiff:s,code:i}=e,o={};if(i!==void 0&&(o.code=i),t!==void 0&&(o.balance=I(t)),n!==void 0&&(o.nonce=I(n)),r!==void 0&&(o.state=Tn(r)),s!==void 0){if(o.state)throw new Qi;o.stateDiff=Tn(s)}return o}function R0(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!K(n,{strict:!1}))throw new be({address:n});if(t[n])throw new qi({address:n});t[n]=qo(r)}return t}async function Oc(e,t){var Z,C,Ie,Fe,ce,Se;const{account:n=e.account,authorizationList:r,batch:s=!!((Z=e.batch)!=null&&Z.multicall),blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:f,blobs:d,blockOverrides:u,code:l,data:b,factory:h,factoryData:y,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,requestOptions:k,to:P,value:w,stateOverride:$,...M}=t,S=n?he(n):void 0;if(l&&(h||y))throw new p("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&P)throw new p("Cannot provide both `code` & `to` as parameters.");const z=l&&b,B=h&&y&&P&&b,O=z||B,g=z?V0({code:l,data:b}):B?sa({data:b,factory:h,factoryData:y,to:P}):b;try{it(t);const te=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),H=u?Jo(u):void 0,ne=R0($),Le=(Fe=(Ie=(C=e.chain)==null?void 0:C.formatters)==null?void 0:Ie.transactionRequest)==null?void 0:Fe.format,Te=(Le||Qe)({...Rt(M,{format:Le}),accessList:f,account:S,authorizationList:r,blobs:d,data:g,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,to:O?void 0:P,value:w},"call");if(s&&Qo({request:Te})&&!H&&i===void 0)try{const{deployless:D=!1}=typeof((ce=e.batch)==null?void 0:ce.multicall)=="object"?e.batch.multicall:{},at=D0(e,{blockNumber:o,deployless:D});if(!at||!ra(ne,at))return await na(e,{...Te,blockHash:i,blockNumber:o,blockTag:a,multicallAddress:at,requestOptions:k,requireCanonical:c,rpcStateOverride:ne})}catch(D){if(!(D instanceof Qn)&&!(D instanceof xt))throw D}const Y0=(()=>{const D=[Te,te];return ne&&H?[...D,ne,H]:ne?[...D,ne]:H?[...D,{},H]:D})(),Yt=await e.request({method:"eth_call",params:Y0},k);return Yt==="0x"?{data:void 0}:{data:Yt}}catch(te){if((Se=k==null?void 0:k.signal)!=null&&Se.aborted)throw or(k.signal);if(ar(te))throw te;const H=ia(te),{offchainLookup:ne,offchainLookupSignature:Le}=await On(async()=>{const{offchainLookup:Jt,offchainLookupSignature:Te}=await import("./ccip-ByQiZ_aq.js");return{offchainLookup:Jt,offchainLookupSignature:Te}},__vite__mapDeps([0,1,2,3,4,5,6]));if(e.ccipRead!==!1&&(H==null?void 0:H.slice(0,10))===Le&&P)return{data:await ne(e,{data:H,requestOptions:k,to:P})};throw O&&(H==null?void 0:H.slice(0,10))==="0x101bb98d"?new io({factory:h}):oo(te,{...t,account:S,chain:e.chain})}}function Qo({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(Yo)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}let ea=0;const kn=new WeakMap;function ta(e){if(!e)return"default";const t=kn.get(e);if(t!==void 0)return t;const n=ea++;return kn.set(e,n),n}async function na(e,t){var T;const{batchSize:n=1024,deployless:r=!1,wait:s=0}=typeof((T=e.batch)==null?void 0:T.multicall)=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:f,multicallAddress:d,requestOptions:u,rpcStateOverride:l,to:b}=t,h=d!==void 0?d:D0(e,{blockNumber:o,deployless:r}),y=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),A=typeof y=="string"?y:JSON.stringify(y),x=l?`.${JSON.stringify(l)}`:"",{schedule:E}=cr({id:`${e.uid}.${A}.${ta(u)}${x}`,wait:s,shouldSplitBatch(k){return k.reduce((w,{data:$})=>w+($.length-2),0)>n*2},fn:async k=>{const P=k.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),w=jo({abi:an,args:[P],functionName:"aggregate3"}),$={...h===null?{data:V0({code:Ho,data:w})}:{to:h,data:w}},M=await e.request({method:"eth_call",params:l?[$,y,l]:[$,y]},u);return Xo({abi:an,args:[P],functionName:"aggregate3",data:M||"0x"})}}),[{returnData:m,success:v}]=await E({data:f,to:b});if(!v)throw new B0({data:m});return m==="0x"?{data:void 0}:{data:m}}function D0(e,t){const{blockNumber:n,deployless:r}=t;if(r)return null;if(e.chain)return As({blockNumber:n,chain:e.chain,contract:"multicall3"});throw new Qn}function ra(e,t){return e?Object.keys(e).some(n=>j0(n,t)):!1}function V0(e){const{code:t,data:n}=e;return N0({abi:P0(["constructor(bytes, bytes)"]),bytecode:Uo,args:[t,n]})}function sa(e){const{data:t,factory:n,factoryData:r,to:s}=e;return N0({abi:P0(["constructor(address, bytes, address, bytes)"]),bytecode:_o,args:[s,t,n,r]})}function ia(e){var n;if(!(e instanceof p))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}const oa=3;function Lc(e,{abi:t,address:n,args:r,docsPath:s,functionName:i,sender:o}){const a=e instanceof B0?e:e instanceof p?e.walk(h=>"data"in h)||e.walk():{},{code:c,data:f,details:d,message:u,shortMessage:l}=a,b=e instanceof Mt?new so({functionName:i,cause:e}):[oa,fr.code].includes(c)&&(f||d||u||l)||c===ur.code&&d==="execution reverted"&&f?new ro({abi:t,data:typeof f=="object"?f.data:f,functionName:i,message:a instanceof dr?d:l??u,cause:e}):e;return new no(b,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:i,sender:o})}const zn="/docs/contract/decodeEventLog";function Cn(e){const{abi:t,data:n,strict:r,topics:s}=e,i=r??!0,[o,...a]=s;if(!o)throw new ks({docsPath:zn});const c=t.find(x=>x.type==="event"&&o===Ht(ae(x)));if(!(c&&"name"in c)||c.type!=="event")throw new zs(o,{docsPath:zn});const{name:f,inputs:d}=c,u=d==null?void 0:d.some(x=>!("name"in x&&x.name)),l=u?[]:{},b=d.map((x,E)=>[x,E]).filter(([x])=>"indexed"in x&&x.indexed),h=[];for(let x=0;x<b.length;x++){const[E,m]=b[x],v=a[x];if(!v){if(i)throw new Ms({abiItem:c,param:E});h.push([E,m]);continue}l[u?m:E.name||m]=aa({param:E,value:v})}const y=d.filter(x=>!("indexed"in x&&x.indexed)),A=i?y:[...h.map(([x])=>x),...y];if(A.length>0){if(n&&n!=="0x")try{const x=st(A,n);if(x){let E=0;if(!i)for(const[m,v]of h)l[u?v:m.name||v]=x[E++];if(u)for(let m=0;m<d.length;m++)l[m]===void 0&&E<x.length&&(l[m]=x[E++]);else for(let m=0;m<y.length;m++)l[y[m].name]=x[E++]}}catch(x){if(i)throw x instanceof a0||x instanceof Hn?new gn({abiItem:c,data:n,params:A,size:G(n)}):x}else if(i)throw new gn({abiItem:c,data:"0x",params:A,size:0})}return{eventName:f,args:Object.values(l).length>0?l:void 0}}function aa({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(st([e],t)||[])[0]}function Uc(e){const{abi:t,args:n,logs:r,strict:s=!0}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),o=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:Ht(a)}));return r.map(a=>{var l;const c=typeof a.blockNumber=="string"?_n(a):a,f=o.filter(b=>c.topics[0]===b.selector);if(f.length===0)return null;let d,u;for(const b of f)try{d=Cn({...c,abi:[b.abi],strict:!0}),u=b;break}catch{}if(!d&&!s){u=f[0];try{d=Cn({data:c.data,topics:c.topics,abi:[u.abi],strict:!1})}catch{const b=(l=u.abi.inputs)==null?void 0:l.some(h=>!("name"in h&&h.name));return{...c,args:b?[]:{},eventName:u.abi.name}}}return!d||!u||i&&!i.includes(d.eventName)||!ca({args:d.args,inputs:u.abi.inputs,matchArgs:n})?null:{...d,...c}}).filter(Boolean)}function ca(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function s(i,o,a){try{return i.type==="address"?j0(o,a):i.type==="string"||i.type==="bytes"?Oe(Je(o))===a:o===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((i,o)=>{if(i==null)return!0;const a=n[o];return a?(Array.isArray(i)?i:[i]).some(f=>s(a,f,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([i,o])=>{if(o==null)return!0;const a=n.find(f=>f.name===i);return a?(Array.isArray(o)?o:[o]).some(f=>s(a,f,t[i])):!1}):!1}function fa(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new vr(r,{docsPath:t,...n})}async function W0(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return ue(t)}class K0 extends p{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Zt extends p{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class ua extends p{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${W(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class da extends p{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}async function Ge(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){var f,d,u;const i=s??!1,o=n!==void 0?I(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[o||r,i]},{dedupe:!!o}),!a)throw new da({blockHash:t,blockNumber:n});return(((u=(d=(f=e.chain)==null?void 0:f.formatters)==null?void 0:d.block)==null?void 0:u.format)||Un)(a,"getBlock")}async function Z0(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function _c(e,t){return J0(e,t)}async function J0(e,t){var i,o;const{block:n,chain:r=e.chain,request:s}=t||{};try{const a=((i=r==null?void 0:r.fees)==null?void 0:i.maxPriorityFeePerGas)??((o=r==null?void 0:r.fees)==null?void 0:o.defaultPriorityFee);if(typeof a=="function"){const f=n||await N(e,Ge,"getBlock")({}),d=await a({block:f,client:e,request:s});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return De(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):N(e,Ge,"getBlock")({}),N(e,Z0,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Zt;const f=c-a.baseFeePerGas;return f<0n?0n:f}}async function Hc(e,t){return Bt(e,t)}async function Bt(e,t){var l,b;const{block:n,chain:r=e.chain,request:s,type:i="eip1559"}=t||{},o=await(async()=>{var h,y;return typeof((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):((y=r==null?void 0:r.fees)==null?void 0:y.baseFeeMultiplier)??1.2})();if(o<1)throw new K0;const c=10**(((l=o.toString().split(".")[1])==null?void 0:l.length)??0),f=h=>h*BigInt(Math.ceil(o*c))/BigInt(c),d=n||await N(e,Ge,"getBlock")({});if(typeof((b=r==null?void 0:r.fees)==null?void 0:b.estimateFeesPerGas)=="function"){const h=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:s,type:i});if(h!==null)return h}if(i==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Zt;const h=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await J0(e,{block:d,chain:r,request:s}),y=f(d.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??y+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??f(await N(e,Z0,"getGasPrice")({}))}}class la extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l}){var h;const b=Me({from:n==null?void 0:n.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((h=s==null?void 0:s.nativeCurrency)==null?void 0:h.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",b].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function ba(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new la(r,{docsPath:t,...n})}async function ha(e,t){var o,a,c;const{account:n=e.account,prepare:r=!0}=t,s=n?he(n):void 0,i=(()=>{if(Array.isArray(r))return r;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const f=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Ko({authorization:t.authorizationList[0]}).catch(()=>{throw new p("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,blockNumber:h,blockTag:y,data:A,gas:x,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,value:P,stateOverride:w,...$}=r?await ga(e,{...t,parameters:i,to:f}):t;if(x&&t.gas!==x)return x;const S=(typeof h=="bigint"?I(h):void 0)||y,z=R0(w);it(t);const B=(c=(a=(o=e.chain)==null?void 0:o.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,g=(B||Qe)({...Rt($,{format:B}),account:s,accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,data:A,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,to:f,value:P},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:z?[g,S??e.experimental_blockTag??"latest",z]:S?[g,S]:[g]}))}catch(f){throw ba(f,{...t,account:s,chain:e.chain})}}async function pa(e,{address:t,blockHash:n,blockNumber:r,blockTag:s="latest",requireCanonical:i}){const o=Kt({blockHash:n,blockNumber:r,blockTag:s,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,o]},{dedupe:typeof r=="bigint"||n!==void 0});return ue(a)}async function ya(e,t){var w,$,M,S,z;const{account:n=e.account,accessList:r,authorizationList:s,chain:i=e.chain,blobVersionedHashes:o,blobs:a,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:h,nonceManager:y,to:A,type:x,value:E,...m}=t,v=await(async()=>{if(!n||!y||typeof h<"u")return h;const B=he(n),O=i?i.id:await N(e,W0,"getChainId")({});return await y.consume({address:B.address,chainId:O,client:e})})();it(t);const T=($=(w=i==null?void 0:i.formatters)==null?void 0:w.transactionRequest)==null?void 0:$.format,P=(T||Qe)({...Rt(m,{format:T}),account:n?he(n):void 0,accessList:r,authorizationList:s,blobs:a,blobVersionedHashes:o,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:v,to:A,type:x,value:E},"fillTransaction");try{const B=await e.request({method:"eth_fillTransaction",params:[P]}),g=(((S=(M=i==null?void 0:i.formatters)==null?void 0:M.transaction)==null?void 0:S.format)||St)(B.tx);delete g.blockHash,delete g.blockNumber,delete g.r,delete g.s,delete g.transactionIndex,delete g.v,delete g.yParity,g.data=g.input,g.gas&&(g.gas=t.gas??g.gas),g.gasPrice&&(g.gasPrice=t.gasPrice??g.gasPrice),g.maxFeePerBlobGas&&(g.maxFeePerBlobGas=t.maxFeePerBlobGas??g.maxFeePerBlobGas),g.maxFeePerGas&&(g.maxFeePerGas=t.maxFeePerGas??g.maxFeePerGas),g.maxPriorityFeePerGas&&(g.maxPriorityFeePerGas=t.maxPriorityFeePerGas??g.maxPriorityFeePerGas),typeof g.nonce<"u"&&(g.nonce=t.nonce??g.nonce);const Z=await(async()=>{var ce,Se;if(typeof((ce=i==null?void 0:i.fees)==null?void 0:ce.baseFeeMultiplier)=="function"){const te=await N(e,Ge,"getBlock")({});return i.fees.baseFeeMultiplier({block:te,client:e,request:t})}return((Se=i==null?void 0:i.fees)==null?void 0:Se.baseFeeMultiplier)??1.2})();if(Z<1)throw new K0;const Ie=10**(((z=Z.toString().split(".")[1])==null?void 0:z.length)??0),Fe=ce=>ce*BigInt(Math.ceil(Z*Ie))/BigInt(Ie);return g.feePayerSignature||(g.maxFeePerGas&&!t.maxFeePerGas&&(g.maxFeePerGas=Fe(g.maxFeePerGas)),g.gasPrice&&!t.gasPrice&&(g.gasPrice=Fe(g.gasPrice))),{raw:B.raw,transaction:{from:P.from,...g},...B.capabilities?{capabilities:B.capabilities}:{}}}catch(B){throw fa(B,{...t,chain:e.chain})}}const ma=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Gn=new Map,yt=new It(128);async function ga(e,t){var v,T,k;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=ma);const{account:r,chain:s=e.chain,nonceManager:i,parameters:o}=n,a=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function f(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await N(e,W0,"getChainId")({}),c))}const d=r&&he(r);let u=n.nonce;if(o.includes("nonce")&&typeof u>"u"&&d&&i){const P=await f();u=await i.consume({address:d.address,chainId:P,client:e})}a!=null&&a.fn&&((v=a.runAt)!=null&&v.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillTransaction"}),u??(u=n.nonce));const b=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&n.kzg&&n.blobs||yt.get(e.uid)===!1||!["fees","gas"].some(w=>o.includes(w))?!1:!!(o.includes("chainId")&&typeof n.chainId!="number"||o.includes("nonce")&&typeof u!="number"||o.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof n.gas!="bigint"))?await N(e,ya,"fillTransaction")({...n,nonce:u}).then(P=>{const{chainId:w,from:$,gas:M,gasPrice:S,nonce:z,maxFeePerBlobGas:B,maxFeePerGas:O,maxPriorityFeePerGas:g,type:Z,...C}=P.transaction;return yt.set(e.uid,!0),{...n,...$?{from:$}:{},...Z&&!n.type?{type:Z}:{},...typeof w<"u"?{chainId:w}:{},...typeof M<"u"?{gas:M}:{},...typeof S<"u"?{gasPrice:S}:{},...typeof z<"u"?{nonce:z}:{},...typeof B<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:B}:{},...typeof O<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:O}:{},...typeof g<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:g}:{},..."nonceKey"in C&&typeof C.nonceKey<"u"?{nonceKey:C.nonceKey}:{},..."keyAuthorization"in C&&typeof C.keyAuthorization<"u"&&C.keyAuthorization!==null&&!("keyAuthorization"in n)?{keyAuthorization:C.keyAuthorization}:{},..."feePayerSignature"in C&&typeof C.feePayerSignature<"u"&&C.feePayerSignature!==null?{feePayerSignature:C.feePayerSignature}:{},..."feeToken"in C&&typeof C.feeToken<"u"&&C.feeToken!==null&&!("feeToken"in n)?{feeToken:C.feeToken}:{},...P.capabilities?{_capabilities:P.capabilities}:{}}}).catch(P=>{var S,z;const w=P;if(w.name!=="TransactionExecutionError")return n;if((S=w.walk)==null?void 0:S.call(w,B=>B.name==="ExecutionRevertedError"))throw P;return((z=w.walk)==null?void 0:z.call(w,B=>{var g;const O=B;return O.name==="MethodNotFoundRpcError"||O.name==="MethodNotSupportedRpcError"||((g=O.message)==null?void 0:g.includes("eth_fillTransaction is not available"))}))&&yt.set(e.uid,!1),n}):n;u??(u=b.nonce),n={...b,...d?{from:d==null?void 0:d.address}:{},...typeof u<"u"?{nonce:u}:{}};const{blobs:h,gas:y,kzg:A,type:x}=n;a!=null&&a.fn&&((T=a.runAt)!=null&&T.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillParameters"}));let E;async function m(){return E||(E=await N(e,Ge,"getBlock")({blockTag:"latest"}),E)}if(o.includes("nonce")&&typeof u>"u"&&d&&!i&&(n.nonce=await N(e,pa,"getTransactionCount")({address:d.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&h&&A){const P=Rn({blobs:h,kzg:A});if(o.includes("blobVersionedHashes")){const w=ts({commitments:P,to:"hex"});n.blobVersionedHashes=w}if(o.includes("sidecars")){const w=Dn({blobs:h,commitments:P,kzg:A}),$=os({blobs:h,commitments:P,proofs:w,to:"hex"});n.sidecars=$}}if(o.includes("chainId")&&(n.chainId=await f()),(o.includes("fees")||o.includes("type"))&&typeof x>"u")try{n.type=Ps(n)}catch{let P=Gn.get(e.uid);if(typeof P>"u"){const w=await m();P=typeof(w==null?void 0:w.baseFeePerGas)=="bigint",Gn.set(e.uid,P)}n.type=P?"eip1559":"legacy"}if(o.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const P=await m(),{maxFeePerGas:w,maxPriorityFeePerGas:$}=await Bt(e,{block:P,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<$)throw new ua({maxPriorityFeePerGas:$});n.maxPriorityFeePerGas=$,n.maxFeePerGas=w}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Zt;if(typeof n.gasPrice>"u"){const P=await m(),{gasPrice:w}=await Bt(e,{block:P,chain:s,request:n,type:"legacy"});n.gasPrice=w}}return o.includes("gas")&&typeof y>"u"&&(n.gas=await N(e,ha,"estimateGas")({...n,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((k=a.runAt)!=null&&k.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"afterFillParameters"})),it(n),delete n.parameters,n}async function Nc(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}export{B0 as $,Is as A,K0 as B,to as C,io as D,gn as E,Ms as F,Zt as G,la as H,Ls as I,Os as J,Xa as K,qa as L,ui as M,be as N,Us as O,_a as P,_s as Q,fi as R,Ba as S,ci as T,oi as U,hi as V,Er as W,ve as X,Ia as Y,li as Z,ua as _,mn as a,Ke as a$,ai as a0,Qi as a1,vr as a2,Fa as a3,Sa as a4,di as a5,si as a6,Ja as a7,ka as a8,Na as a9,Mc as aA,Un as aB,kt as aC,_n as aD,St as aE,hr as aF,Qe as aG,Nt as aH,Ha as aI,As as aJ,Lc as aK,Ht as aL,ki as aM,Ot as aN,Ps as aO,K as aP,j0 as aQ,Oe as aR,va as aS,mr as aT,P0 as aU,Uc as aV,No as aW,Vo as aX,Do as aY,pr as aZ,Qr as a_,it as aa,Rn as ab,Dn as ac,zi as ad,Ci as ae,Q as af,Gi as ag,nt as ah,es as ai,ts as aj,Pe as ak,gr as al,et as am,st as an,Xi as ao,Cn as ap,Xo as aq,Aa as ar,Pa as as,$a as at,Ea as au,Uo as av,_o as aw,$0 as ax,N0 as ay,jo as az,a0 as b,gs as b$,o0 as b0,ws as b1,os as b2,is as b3,A0 as b4,Pr as b5,Ln as b6,ja as b7,Ko as b8,N as b9,dc as bA,Ve as bB,cc as bC,fo as bD,ac as bE,oc as bF,T0 as bG,Vt as bH,uc as bI,tc as bJ,S0 as bK,lo as bL,nc as bM,lc as bN,Ga as bO,Ca as bP,Xr as bQ,Mi as bR,ec as bS,Ge as bT,Kt as bU,yi as bV,Fi as bW,y0 as bX,R as bY,pe as bZ,Ya as b_,W0 as ba,Rt as bb,ga as bc,ma as bd,Nc as be,Ra as bf,fa as bg,he as bh,Oc as bi,ss as bj,La as bk,ns as bl,Ua as bm,ae as bn,Es as bo,Wn as bp,za as bq,zt as br,le as bs,We as bt,Ae as bu,sc as bv,rc as bw,ic as bx,co as by,fc as bz,Mt as c,hc as c0,$e as c1,qr as c2,Cc as c3,Ee as c4,F as c5,vc as c6,q as c7,M0 as c8,Ac as c9,Ta as cA,Qa as cB,br as cC,oo as cD,Jo as cE,jt as cF,ya as cG,_c as cH,Z0 as cI,Gc as cJ,Oa as cK,Ma as cL,yc as cM,bc as cN,_0 as cO,zc as cP,Co as cQ,Sc as cR,G0 as ca,Tc as cb,Bc as cc,pc as cd,kc as ce,wc as cf,mc as cg,xc as ch,gc as ci,Pc as cj,Io as ck,L0 as cl,Ic as cm,Mo as cn,U0 as co,Fc as cp,vn as cq,ze as cr,Rs as cs,Go as ct,Ho as cu,ha as cv,pa as cw,Me as cx,Hc as cy,R0 as cz,Fs as d,Ss as e,Ts as f,Da as g,Va as h,c0 as i,Wa as j,ks as k,zs as l,Ze as m,Cs as n,Ka as o,qi as p,da as q,Za as r,xt as s,as as t,cs as u,bi as v,Qn as w,no as x,ro as y,so as z};
@@ -1 +1 @@
1
- import{P as T,aP as y,N as p,aT as E,bj as K,a$ as k,bk as _,bl as N,bm as Y,Y as $,aO as O,am as F,b5 as P,ab as R,aj as U,ac as q,b2 as D,S as J}from"./sendRawTransaction-BqauPPYf.js";import{ao as S,F as G,y as M,B as j,aj as Q,aa as W,af as i,$ as X,ap as v}from"./NetworkUtil-Ddexw9-U.js";function Z(e){if(!e||e.length===0)return[];const s=[];for(const r of e){const{chainId:n,nonce:o,...t}=r,a=r.address;s.push([n?S(n):"0x",a,o?S(o):"0x",...z({},t)])}return s}function ee(e){const{authorizationList:s}=e;if(s)for(const r of s){const{chainId:n}=r,o=r.address;if(!y(o))throw new p({address:o});if(n<0)throw new T({chainId:n})}A(e)}function se(e){const{blobVersionedHashes:s}=e;if(s){if(s.length===0)throw new K;for(const r of s){const n=Q(r),o=W(k(r,0,1));if(n!==32)throw new _({hash:r,size:n});if(o!==N)throw new Y({hash:r,version:o})}}A(e)}function A(e){const{chainId:s,maxPriorityFeePerGas:r,maxFeePerGas:n,to:o}=e;if(s<=0)throw new T({chainId:s});if(o&&!y(o))throw new p({address:o});if(n&&n>E)throw new G({maxFeePerGas:n});if(r&&n&&r>n)throw new M({maxFeePerGas:n,maxPriorityFeePerGas:r})}function re(e){const{chainId:s,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:t}=e;if(s<=0)throw new T({chainId:s});if(t&&!y(t))throw new p({address:t});if(r||o)throw new j("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>E)throw new G({maxFeePerGas:n})}function ne(e){const{chainId:s,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:t}=e;if(t&&!y(t))throw new p({address:t});if(typeof s<"u"&&s<=0)throw new T({chainId:s});if(r||o)throw new j("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>E)throw new G({maxFeePerGas:n})}function g(e){if(!e||e.length===0)return[];const s=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:o}=e[r];for(let t=0;t<o.length;t++)if(o[t].length-2!==64)throw new $({storageKey:o[t]});if(!y(n,{strict:!1}))throw new p({address:n});s.push([n,o])}return s}function xe(e,s){const r=O(e);return r==="eip1559"?te(e,s):r==="eip2930"?ae(e,s):r==="eip4844"?ie(e,s):r==="eip7702"?oe(e,s):ce(e,s)}function oe(e,s){const{authorizationList:r,chainId:n,gas:o,nonce:t,to:a,value:f,maxFeePerGas:d,maxPriorityFeePerGas:c,accessList:u,data:h}=e;ee(e);const l=g(u),x=Z(r);return F(["0x04",P([i(n),t?i(t):"0x",c?i(c):"0x",d?i(d):"0x",o?i(o):"0x",a??"0x",f?i(f):"0x",h??"0x",l,x,...z(e,s)])])}function ie(e,s){const{chainId:r,gas:n,nonce:o,to:t,value:a,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:c,accessList:u,data:h}=e;se(e);let l=e.blobVersionedHashes,x=e.sidecars;if(e.blobs&&(typeof l>"u"||typeof x>"u")){const m=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(w=>X(w)),I=e.kzg,b=R({blobs:m,kzg:I});if(typeof l>"u"&&(l=U({commitments:b})),typeof x>"u"){const w=q({blobs:m,commitments:b,kzg:I});x=D({blobs:m,commitments:b,proofs:w})}}const L=g(u),H=[i(r),o?i(o):"0x",c?i(c):"0x",d?i(d):"0x",n?i(n):"0x",t??"0x",a?i(a):"0x",h??"0x",L,f?i(f):"0x",l??[],...z(e,s)],V=[],B=[],C=[];if(x)for(let m=0;m<x.length;m++){const{blob:I,commitment:b,proof:w}=x[m];V.push(I),B.push(b),C.push(w)}return F(["0x03",x?P([H,V,B,C]):P(H)])}function te(e,s){const{chainId:r,gas:n,nonce:o,to:t,value:a,maxFeePerGas:f,maxPriorityFeePerGas:d,accessList:c,data:u}=e;A(e);const h=g(c),l=[i(r),o?i(o):"0x",d?i(d):"0x",f?i(f):"0x",n?i(n):"0x",t??"0x",a?i(a):"0x",u??"0x",h,...z(e,s)];return F(["0x02",P(l)])}function ae(e,s){const{chainId:r,gas:n,data:o,nonce:t,to:a,value:f,accessList:d,gasPrice:c}=e;re(e);const u=g(d),h=[i(r),t?i(t):"0x",c?i(c):"0x",n?i(n):"0x",a??"0x",f?i(f):"0x",o??"0x",u,...z(e,s)];return F(["0x01",P(h)])}function ce(e,s){const{chainId:r=0,gas:n,data:o,nonce:t,to:a,value:f,gasPrice:d}=e;ne(e);let c=[t?i(t):"0x",d?i(d):"0x",n?i(n):"0x",a??"0x",f?i(f):"0x",o??"0x"];if(s){const u=(()=>{if(s.v>=35n)return(s.v-35n)/2n>0?s.v:27n+(s.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+s.v-27n);const x=27n+(s.v===27n?0n:1n);if(s.v!==x)throw new J({v:s.v});return x})(),h=v(s.r),l=v(s.s);c=[...c,i(u),h==="0x00"?"0x":h,l==="0x00"?"0x":l]}else r>0&&(c=[...c,i(r),"0x","0x"]);return P(c)}function z(e,s){const r=s??e,{v:n,yParity:o}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof o>"u")return[];const t=v(r.r),a=v(r.s);return[typeof o=="number"?o?i(1):"0x":n===0n?"0x":n===1n?i(1):n===27n?"0x":i(1),t==="0x00"?"0x":t,a==="0x00"?"0x":a]}export{A as a,re as b,ne as c,xe as d,g as s,z as t};
1
+ import{P as T,aP as y,N as p,aT as E,bj as K,a$ as k,bk as _,bl as N,bm as Y,Y as $,aO as O,am as F,b5 as P,ab as R,aj as U,ac as q,b2 as D,S as J}from"./sendRawTransaction-DT-ObNx8.js";import{ao as S,F as G,y as M,B as j,aj as Q,aa as W,af as i,$ as X,ap as v}from"./NetworkUtil-Ddexw9-U.js";function Z(e){if(!e||e.length===0)return[];const s=[];for(const r of e){const{chainId:n,nonce:o,...t}=r,a=r.address;s.push([n?S(n):"0x",a,o?S(o):"0x",...z({},t)])}return s}function ee(e){const{authorizationList:s}=e;if(s)for(const r of s){const{chainId:n}=r,o=r.address;if(!y(o))throw new p({address:o});if(n<0)throw new T({chainId:n})}A(e)}function se(e){const{blobVersionedHashes:s}=e;if(s){if(s.length===0)throw new K;for(const r of s){const n=Q(r),o=W(k(r,0,1));if(n!==32)throw new _({hash:r,size:n});if(o!==N)throw new Y({hash:r,version:o})}}A(e)}function A(e){const{chainId:s,maxPriorityFeePerGas:r,maxFeePerGas:n,to:o}=e;if(s<=0)throw new T({chainId:s});if(o&&!y(o))throw new p({address:o});if(n&&n>E)throw new G({maxFeePerGas:n});if(r&&n&&r>n)throw new M({maxFeePerGas:n,maxPriorityFeePerGas:r})}function re(e){const{chainId:s,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:t}=e;if(s<=0)throw new T({chainId:s});if(t&&!y(t))throw new p({address:t});if(r||o)throw new j("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>E)throw new G({maxFeePerGas:n})}function ne(e){const{chainId:s,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:t}=e;if(t&&!y(t))throw new p({address:t});if(typeof s<"u"&&s<=0)throw new T({chainId:s});if(r||o)throw new j("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>E)throw new G({maxFeePerGas:n})}function g(e){if(!e||e.length===0)return[];const s=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:o}=e[r];for(let t=0;t<o.length;t++)if(o[t].length-2!==64)throw new $({storageKey:o[t]});if(!y(n,{strict:!1}))throw new p({address:n});s.push([n,o])}return s}function xe(e,s){const r=O(e);return r==="eip1559"?te(e,s):r==="eip2930"?ae(e,s):r==="eip4844"?ie(e,s):r==="eip7702"?oe(e,s):ce(e,s)}function oe(e,s){const{authorizationList:r,chainId:n,gas:o,nonce:t,to:a,value:f,maxFeePerGas:d,maxPriorityFeePerGas:c,accessList:u,data:h}=e;ee(e);const l=g(u),x=Z(r);return F(["0x04",P([i(n),t?i(t):"0x",c?i(c):"0x",d?i(d):"0x",o?i(o):"0x",a??"0x",f?i(f):"0x",h??"0x",l,x,...z(e,s)])])}function ie(e,s){const{chainId:r,gas:n,nonce:o,to:t,value:a,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:c,accessList:u,data:h}=e;se(e);let l=e.blobVersionedHashes,x=e.sidecars;if(e.blobs&&(typeof l>"u"||typeof x>"u")){const m=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(w=>X(w)),I=e.kzg,b=R({blobs:m,kzg:I});if(typeof l>"u"&&(l=U({commitments:b})),typeof x>"u"){const w=q({blobs:m,commitments:b,kzg:I});x=D({blobs:m,commitments:b,proofs:w})}}const L=g(u),H=[i(r),o?i(o):"0x",c?i(c):"0x",d?i(d):"0x",n?i(n):"0x",t??"0x",a?i(a):"0x",h??"0x",L,f?i(f):"0x",l??[],...z(e,s)],V=[],B=[],C=[];if(x)for(let m=0;m<x.length;m++){const{blob:I,commitment:b,proof:w}=x[m];V.push(I),B.push(b),C.push(w)}return F(["0x03",x?P([H,V,B,C]):P(H)])}function te(e,s){const{chainId:r,gas:n,nonce:o,to:t,value:a,maxFeePerGas:f,maxPriorityFeePerGas:d,accessList:c,data:u}=e;A(e);const h=g(c),l=[i(r),o?i(o):"0x",d?i(d):"0x",f?i(f):"0x",n?i(n):"0x",t??"0x",a?i(a):"0x",u??"0x",h,...z(e,s)];return F(["0x02",P(l)])}function ae(e,s){const{chainId:r,gas:n,data:o,nonce:t,to:a,value:f,accessList:d,gasPrice:c}=e;re(e);const u=g(d),h=[i(r),t?i(t):"0x",c?i(c):"0x",n?i(n):"0x",a??"0x",f?i(f):"0x",o??"0x",u,...z(e,s)];return F(["0x01",P(h)])}function ce(e,s){const{chainId:r=0,gas:n,data:o,nonce:t,to:a,value:f,gasPrice:d}=e;ne(e);let c=[t?i(t):"0x",d?i(d):"0x",n?i(n):"0x",a??"0x",f?i(f):"0x",o??"0x"];if(s){const u=(()=>{if(s.v>=35n)return(s.v-35n)/2n>0?s.v:27n+(s.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+s.v-27n);const x=27n+(s.v===27n?0n:1n);if(s.v!==x)throw new J({v:s.v});return x})(),h=v(s.r),l=v(s.s);c=[...c,i(u),h==="0x00"?"0x":h,l==="0x00"?"0x":l]}else r>0&&(c=[...c,i(r),"0x","0x"]);return P(c)}function z(e,s){const r=s??e,{v:n,yParity:o}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof o>"u")return[];const t=v(r.r),a=v(r.s);return[typeof o=="number"?o?i(1):"0x":n===0n?"0x":n===1n?i(1):n===27n?"0x":i(1),t==="0x00"?"0x":t,a==="0x00"?"0x":a]}export{A as a,re as b,ne as c,xe as d,g as s,z as t};
@@ -1 +1 @@
1
- import{d as b,e as E,h as k}from"./wallets-BnBHCJi8.js";import"./signing-BGpVago5.js";import"./utils-nbkSUjEy.js";import"./ethers-DHDSyreX.js";import"./react-Vu6nbGi5.js";import"./index-Dmfk0azd.js";import"./store-CraP4F4Y.js";import"./hashTypedData-CaO8N883.js";import"./index-DXfwhNfH.js";import"./index-CyDCPwX2.js";import"./index-CdfeQ7YK.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-BKg37Q5D.js";import"./ethereum-CjiWK1L5.js";async function R(a){var r,p;const{wallet:t,walletConnectClient:e,event:i,chains:s,onConnect:m}=a,d=t.getAccount();if(!d)throw new Error("No account connected to provided wallet");const n=(p=(r=i.verifyContext)==null?void 0:r.verified)==null?void 0:p.origin;n&&await A({origin:n,walletConnectClient:e});const o=await W({account:d,chains:s,sessionProposal:i,walletConnectClient:e});await b(o),t.subscribe("disconnect",()=>{E({session:o,walletConnectClient:e})}),m==null||m(o)}async function A({walletConnectClient:a,origin:t}){const e=await k();for(const i of e)i.origin===t&&await E({session:i,walletConnectClient:a})}async function W({account:a,walletConnectClient:t,sessionProposal:e,chains:i}){var n,o,r,p,w,f,v,l,u,g,N,h,S,y,$,C,q,x;if(!((n=e.params.requiredNamespaces)!=null&&n.eip155)&&!((o=e.params.optionalNamespaces)!=null&&o.eip155))throw new Error("No EIP155 namespace found in Wallet Connect session proposal");const s={chains:[...Array.from(new Set([...((w=(p=(r=e.params.requiredNamespaces)==null?void 0:r.eip155)==null?void 0:p.chains)==null?void 0:w.map(c=>`${c}:${a.address}`))??[],...((l=(v=(f=e.params.optionalNamespaces)==null?void 0:f.eip155)==null?void 0:v.chains)==null?void 0:l.map(c=>`${c}:${a.address}`))??[],...(i==null?void 0:i.map(c=>`eip155:${c.id}:${a.address}`))??[]]))],events:[...((g=(u=e.params.requiredNamespaces)==null?void 0:u.eip155)==null?void 0:g.events)??[],...((h=(N=e.params.optionalNamespaces)==null?void 0:N.eip155)==null?void 0:h.events)??[]],methods:[...((y=(S=e.params.requiredNamespaces)==null?void 0:S.eip155)==null?void 0:y.methods)??[],...((C=($=e.params.optionalNamespaces)==null?void 0:$.eip155)==null?void 0:C.methods)??[]]},d=await(await t.approve({id:e.id,namespaces:{eip155:{accounts:s.chains,events:s.events,methods:s.methods}}})).acknowledged();return{origin:((x=(q=e.verifyContext)==null?void 0:q.verified)==null?void 0:x.origin)||"Unknown origin",topic:d.topic}}export{W as acceptSessionProposal,A as disconnectExistingSessions,R as onSessionProposal};
1
+ import{d as b,e as E,h as k}from"./wallets-D8labJv_.js";import"./signing-CoPa7cSW.js";import"./utils-nbkSUjEy.js";import"./ethers-DHDSyreX.js";import"./react-Vu6nbGi5.js";import"./index-C7-iTfFV.js";import"./store-CraP4F4Y.js";import"./hashTypedData-DX5YrpbP.js";import"./index-C6FQ8I_Q.js";import"./index-Pp2oEhTr.js";import"./index-CdfeQ7YK.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-jYazATJj.js";import"./ethereum-CjiWK1L5.js";async function R(a){var r,p;const{wallet:t,walletConnectClient:e,event:i,chains:s,onConnect:m}=a,d=t.getAccount();if(!d)throw new Error("No account connected to provided wallet");const n=(p=(r=i.verifyContext)==null?void 0:r.verified)==null?void 0:p.origin;n&&await A({origin:n,walletConnectClient:e});const o=await W({account:d,chains:s,sessionProposal:i,walletConnectClient:e});await b(o),t.subscribe("disconnect",()=>{E({session:o,walletConnectClient:e})}),m==null||m(o)}async function A({walletConnectClient:a,origin:t}){const e=await k();for(const i of e)i.origin===t&&await E({session:i,walletConnectClient:a})}async function W({account:a,walletConnectClient:t,sessionProposal:e,chains:i}){var n,o,r,p,w,f,v,l,u,g,N,h,S,y,$,C,q,x;if(!((n=e.params.requiredNamespaces)!=null&&n.eip155)&&!((o=e.params.optionalNamespaces)!=null&&o.eip155))throw new Error("No EIP155 namespace found in Wallet Connect session proposal");const s={chains:[...Array.from(new Set([...((w=(p=(r=e.params.requiredNamespaces)==null?void 0:r.eip155)==null?void 0:p.chains)==null?void 0:w.map(c=>`${c}:${a.address}`))??[],...((l=(v=(f=e.params.optionalNamespaces)==null?void 0:f.eip155)==null?void 0:v.chains)==null?void 0:l.map(c=>`${c}:${a.address}`))??[],...(i==null?void 0:i.map(c=>`eip155:${c.id}:${a.address}`))??[]]))],events:[...((g=(u=e.params.requiredNamespaces)==null?void 0:u.eip155)==null?void 0:g.events)??[],...((h=(N=e.params.optionalNamespaces)==null?void 0:N.eip155)==null?void 0:h.events)??[]],methods:[...((y=(S=e.params.requiredNamespaces)==null?void 0:S.eip155)==null?void 0:y.methods)??[],...((C=($=e.params.optionalNamespaces)==null?void 0:$.eip155)==null?void 0:C.methods)??[]]},d=await(await t.approve({id:e.id,namespaces:{eip155:{accounts:s.chains,events:s.events,methods:s.methods}}})).acknowledged();return{origin:((x=(q=e.verifyContext)==null?void 0:q.verified)==null?void 0:x.origin)||"Unknown origin",topic:d.topic}}export{W as acceptSessionProposal,A as disconnectExistingSessions,R as onSessionProposal};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/wallets-BnBHCJi8.js","assets/signing-BGpVago5.js","assets/utils-nbkSUjEy.js","assets/ethers-DHDSyreX.js","assets/react-Vu6nbGi5.js","assets/index-Dmfk0azd.js","assets/index-DCrqkiFN.css","assets/store-CraP4F4Y.js","assets/hashTypedData-CaO8N883.js","assets/index-DXfwhNfH.js","assets/index-CyDCPwX2.js","assets/index-CdfeQ7YK.js","assets/index-nibyPLVP.js","assets/index-CJdot1dH.js","assets/index-BKg37Q5D.js","assets/ethereum-CjiWK1L5.js"])))=>i.map(i=>d[i]);
2
- import{_ as g}from"./index-Dmfk0azd.js";import{i as o,j as f,k as T,l as C,m as p,o as m}from"./wallets-BnBHCJi8.js";import"./react-Vu6nbGi5.js";import"./ethers-DHDSyreX.js";import"./signing-BGpVago5.js";import"./utils-nbkSUjEy.js";import"./store-CraP4F4Y.js";import"./hashTypedData-CaO8N883.js";import"./index-DXfwhNfH.js";import"./index-CyDCPwX2.js";import"./index-CdfeQ7YK.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-BKg37Q5D.js";import"./ethereum-CjiWK1L5.js";async function H(c){const{wallet:r,walletConnectClient:w,thirdwebClient:h,event:{topic:_,id:d,params:{chainId:n,request:e}},handlers:a}=c,i=r.getAccount();if(!i)throw new Error("No account connected to provided wallet");let t;try{switch(e.method){case"personal_sign":{a!=null&&a.personal_sign?t=await a.personal_sign({account:i,params:e.params}):t=await m({account:i,params:e.params});break}case"eth_sign":{a!=null&&a.eth_sign?t=await a.eth_sign({account:i,params:e.params}):t=await m({account:i,params:e.params});break}case"eth_signTypedData":{a!=null&&a.eth_signTypedData?t=await a.eth_signTypedData({account:i,params:e.params}):t=await p({account:i,params:e.params});break}case"eth_signTypedData_v4":{a!=null&&a.eth_signTypedData_v4?t=await a.eth_signTypedData_v4({account:i,params:e.params}):t=await p({account:i,params:e.params});break}case"eth_signTransaction":{a!=null&&a.eth_signTransaction?t=await a.eth_signTransaction({account:i,params:e.params}):t=await C({account:i,params:e.params});break}case"eth_sendTransaction":{const s=o(n);a!=null&&a.eth_sendTransaction?t=await a.eth_sendTransaction({account:i,chainId:s,params:e.params}):t=await T({account:i,chainId:s,params:e.params,thirdwebClient:h});break}case"eth_sendRawTransaction":{const s=o(n);a!=null&&a.eth_sendRawTransaction?t=await a.eth_sendRawTransaction({account:i,chainId:s,params:e.params}):t=await f({account:i,chainId:s,params:e.params});break}case"wallet_addEthereumChain":{if(a!=null&&a.wallet_addEthereumChain)t=await a.wallet_addEthereumChain({params:e.params,wallet:r});else throw new Error("Unsupported request method: wallet_addEthereumChain");break}case"wallet_switchEthereumChain":{if(a!=null&&a.wallet_switchEthereumChain)t=await a.wallet_switchEthereumChain({params:e.params,wallet:r});else{const{handleSwitchChain:s}=await g(async()=>{const{handleSwitchChain:l}=await import("./wallets-BnBHCJi8.js").then(u=>u.af);return{handleSwitchChain:l}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));t=await s({params:e.params,wallet:r})}break}default:{const s=a==null?void 0:a[e.method];if(s)t=await s({account:i,chainId:o(n),params:e.params});else throw new Error(`Unsupported request method: ${e.method}`)}}}catch(s){t={code:typeof s=="object"&&s!==null&&"code"in s?s.code:500,message:typeof s=="object"&&s!==null&&"message"in s?s.message:"Unknown error"}}w.respond({response:{id:d,jsonrpc:"2.0",result:t},topic:_})}export{H as fulfillRequest};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/wallets-D8labJv_.js","assets/signing-CoPa7cSW.js","assets/utils-nbkSUjEy.js","assets/ethers-DHDSyreX.js","assets/react-Vu6nbGi5.js","assets/index-C7-iTfFV.js","assets/index-DCrqkiFN.css","assets/store-CraP4F4Y.js","assets/hashTypedData-DX5YrpbP.js","assets/index-C6FQ8I_Q.js","assets/index-Pp2oEhTr.js","assets/index-CdfeQ7YK.js","assets/index-nibyPLVP.js","assets/index-CJdot1dH.js","assets/index-jYazATJj.js","assets/ethereum-CjiWK1L5.js"])))=>i.map(i=>d[i]);
2
+ import{_ as g}from"./index-C7-iTfFV.js";import{i as o,j as f,k as T,l as C,m as p,o as m}from"./wallets-D8labJv_.js";import"./react-Vu6nbGi5.js";import"./ethers-DHDSyreX.js";import"./signing-CoPa7cSW.js";import"./utils-nbkSUjEy.js";import"./store-CraP4F4Y.js";import"./hashTypedData-DX5YrpbP.js";import"./index-C6FQ8I_Q.js";import"./index-Pp2oEhTr.js";import"./index-CdfeQ7YK.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-jYazATJj.js";import"./ethereum-CjiWK1L5.js";async function H(c){const{wallet:r,walletConnectClient:w,thirdwebClient:h,event:{topic:_,id:d,params:{chainId:n,request:e}},handlers:a}=c,i=r.getAccount();if(!i)throw new Error("No account connected to provided wallet");let t;try{switch(e.method){case"personal_sign":{a!=null&&a.personal_sign?t=await a.personal_sign({account:i,params:e.params}):t=await m({account:i,params:e.params});break}case"eth_sign":{a!=null&&a.eth_sign?t=await a.eth_sign({account:i,params:e.params}):t=await m({account:i,params:e.params});break}case"eth_signTypedData":{a!=null&&a.eth_signTypedData?t=await a.eth_signTypedData({account:i,params:e.params}):t=await p({account:i,params:e.params});break}case"eth_signTypedData_v4":{a!=null&&a.eth_signTypedData_v4?t=await a.eth_signTypedData_v4({account:i,params:e.params}):t=await p({account:i,params:e.params});break}case"eth_signTransaction":{a!=null&&a.eth_signTransaction?t=await a.eth_signTransaction({account:i,params:e.params}):t=await C({account:i,params:e.params});break}case"eth_sendTransaction":{const s=o(n);a!=null&&a.eth_sendTransaction?t=await a.eth_sendTransaction({account:i,chainId:s,params:e.params}):t=await T({account:i,chainId:s,params:e.params,thirdwebClient:h});break}case"eth_sendRawTransaction":{const s=o(n);a!=null&&a.eth_sendRawTransaction?t=await a.eth_sendRawTransaction({account:i,chainId:s,params:e.params}):t=await f({account:i,chainId:s,params:e.params});break}case"wallet_addEthereumChain":{if(a!=null&&a.wallet_addEthereumChain)t=await a.wallet_addEthereumChain({params:e.params,wallet:r});else throw new Error("Unsupported request method: wallet_addEthereumChain");break}case"wallet_switchEthereumChain":{if(a!=null&&a.wallet_switchEthereumChain)t=await a.wallet_switchEthereumChain({params:e.params,wallet:r});else{const{handleSwitchChain:s}=await g(async()=>{const{handleSwitchChain:l}=await import("./wallets-D8labJv_.js").then(u=>u.af);return{handleSwitchChain:l}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));t=await s({params:e.params,wallet:r})}break}default:{const s=a==null?void 0:a[e.method];if(s)t=await s({account:i,chainId:o(n),params:e.params});else throw new Error(`Unsupported request method: ${e.method}`)}}}catch(s){t={code:typeof s=="object"&&s!==null&&"code"in s?s.code:500,message:typeof s=="object"&&s!==null&&"message"in s?s.message:"Unknown error"}}w.respond({response:{id:d,jsonrpc:"2.0",result:t},topic:_})}export{H as fulfillRequest};
@@ -1 +1 @@
1
- import{_ as H,$ as L,X as _,B as C,a0 as E,a1 as d,a2 as y,a3 as D,a4 as T,a5 as F,a6 as U,a7 as G,a8 as r,D as k,T as S,R as z}from"./signing-BGpVago5.js";function B(e,n="hex"){const s=w(e),a=H(new Uint8Array(s.length));return s.encode(a),n==="hex"?L(a.bytes):a.bytes}function X(e,n="bytes"){return B(e,n)}function P(e,n="hex"){return B(e,n)}function w(e){return Array.isArray(e)?R(e.map(n=>w(n))):$(e)}function R(e){const n=e.reduce((t,o)=>t+o.length,0),s=A(n);return{length:n<=55?1+n:1+s+n,encode(t){n<=55?t.pushByte(192+n):(t.pushByte(247+s),s===1?t.pushUint8(n):s===2?t.pushUint16(n):s===3?t.pushUint24(n):t.pushUint32(n));for(const{encode:o}of e)o(t)}}}function $(e){const n=typeof e=="string"?_(e):e,s=A(n.length);return{length:n.length===1&&n[0]<128?1:n.length<=55?1+n.length:1+s+n.length,encode(t){n.length===1&&n[0]<128?t.pushBytes(n):n.length<=55?(t.pushByte(128+n.length),t.pushBytes(n)):(t.pushByte(183+s),s===1?t.pushUint8(n.length):s===2?t.pushUint16(n.length):s===3?t.pushUint24(n.length):t.pushUint32(n.length),t.pushBytes(n))}}}function A(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new C("Length is too large.")}const Q=2n**(8n-1n)-1n,Y=2n**(16n-1n)-1n,Z=2n**(24n-1n)-1n,v=2n**(32n-1n)-1n,nn=2n**(40n-1n)-1n,tn=2n**(48n-1n)-1n,sn=2n**(56n-1n)-1n,an=2n**(64n-1n)-1n,en=2n**(72n-1n)-1n,on=2n**(80n-1n)-1n,cn=2n**(88n-1n)-1n,xn=2n**(96n-1n)-1n,hn=2n**(104n-1n)-1n,fn=2n**(112n-1n)-1n,rn=2n**(120n-1n)-1n,mn=2n**(128n-1n)-1n,un=2n**(136n-1n)-1n,In=2n**(144n-1n)-1n,bn=2n**(152n-1n)-1n,ln=2n**(160n-1n)-1n,gn=2n**(168n-1n)-1n,dn=2n**(176n-1n)-1n,Un=2n**(184n-1n)-1n,pn=2n**(192n-1n)-1n,yn=2n**(200n-1n)-1n,Bn=2n**(208n-1n)-1n,wn=2n**(216n-1n)-1n,An=2n**(224n-1n)-1n,Hn=2n**(232n-1n)-1n,Ln=2n**(240n-1n)-1n,_n=2n**(248n-1n)-1n,Cn=2n**(256n-1n)-1n,En=-(2n**(8n-1n)),Dn=-(2n**(16n-1n)),Tn=-(2n**(24n-1n)),Fn=-(2n**(32n-1n)),Gn=-(2n**(40n-1n)),kn=-(2n**(48n-1n)),Sn=-(2n**(56n-1n)),zn=-(2n**(64n-1n)),Rn=-(2n**(72n-1n)),$n=-(2n**(80n-1n)),Mn=-(2n**(88n-1n)),Vn=-(2n**(96n-1n)),Wn=-(2n**(104n-1n)),jn=-(2n**(112n-1n)),Kn=-(2n**(120n-1n)),Nn=-(2n**(128n-1n)),qn=-(2n**(136n-1n)),Jn=-(2n**(144n-1n)),On=-(2n**(152n-1n)),Xn=-(2n**(160n-1n)),Pn=-(2n**(168n-1n)),Qn=-(2n**(176n-1n)),Yn=-(2n**(184n-1n)),Zn=-(2n**(192n-1n)),vn=-(2n**(200n-1n)),nt=-(2n**(208n-1n)),tt=-(2n**(216n-1n)),st=-(2n**(224n-1n)),at=-(2n**(232n-1n)),et=-(2n**(240n-1n)),it=-(2n**(248n-1n)),ot=-(2n**(256n-1n)),ct=2n**8n-1n,xt=2n**16n-1n,ht=2n**24n-1n,ft=2n**32n-1n,rt=2n**40n-1n,mt=2n**48n-1n,ut=2n**56n-1n,It=2n**64n-1n,bt=2n**72n-1n,lt=2n**80n-1n,gt=2n**88n-1n,dt=2n**96n-1n,Ut=2n**104n-1n,pt=2n**112n-1n,yt=2n**120n-1n,Bt=2n**128n-1n,wt=2n**136n-1n,At=2n**144n-1n,Ht=2n**152n-1n,Lt=2n**160n-1n,_t=2n**168n-1n,Ct=2n**176n-1n,Et=2n**184n-1n,Dt=2n**192n-1n,Tt=2n**200n-1n,Ft=2n**208n-1n,Gt=2n**216n-1n,kt=2n**224n-1n,St=2n**232n-1n,zt=2n**240n-1n,Rt=2n**248n-1n,$t=2n**256n-1n;function M(e,n,s,a){if(typeof e.setBigUint64=="function")return e.setBigUint64(n,s,a);const t=BigInt(32),o=BigInt(4294967295),i=Number(s>>t&o),x=Number(s&o),h=a?4:0,f=a?0:4;e.setUint32(n+h,i,a),e.setUint32(n+f,x,a)}function V(e,n,s){return e&n^~e&s}function W(e,n,s){return e&n^e&s^n&s}class j extends E{constructor(n,s,a,t){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=n,this.outputLen=s,this.padOffset=a,this.isLE=t,this.buffer=new Uint8Array(n),this.view=d(this.buffer)}update(n){y(this),n=D(n),T(n);const{view:s,buffer:a,blockLen:t}=this,o=n.length;for(let i=0;i<o;){const x=Math.min(t-this.pos,o-i);if(x===t){const h=d(n);for(;t<=o-i;i+=t)this.process(h,i);continue}a.set(n.subarray(i,i+x),this.pos),this.pos+=x,i+=x,this.pos===t&&(this.process(s,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){y(this),F(n,this),this.finished=!0;const{buffer:s,view:a,blockLen:t,isLE:o}=this;let{pos:i}=this;s[i++]=128,U(this.buffer.subarray(i)),this.padOffset>t-i&&(this.process(a,0),i=0);for(let c=i;c<t;c++)s[c]=0;M(a,t-8,BigInt(this.length*8),o),this.process(a,0);const x=d(n),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=h/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c<f;c++)x.setUint32(4*c,m[c],o)}digest(){const{buffer:n,outputLen:s}=this;this.digestInto(n);const a=n.slice(0,s);return this.destroy(),a}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:s,buffer:a,length:t,finished:o,destroyed:i,pos:x}=this;return n.destroyed=i,n.finished=o,n.length=t,n.pos=x,t%s&&n.buffer.set(a),n}clone(){return this._cloneInto()}}const u=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),K=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]),I=new Uint32Array(64);class N extends j{constructor(n=32){super(64,n,8,!1),this.A=u[0]|0,this.B=u[1]|0,this.C=u[2]|0,this.D=u[3]|0,this.E=u[4]|0,this.F=u[5]|0,this.G=u[6]|0,this.H=u[7]|0}get(){const{A:n,B:s,C:a,D:t,E:o,F:i,G:x,H:h}=this;return[n,s,a,t,o,i,x,h]}set(n,s,a,t,o,i,x,h){this.A=n|0,this.B=s|0,this.C=a|0,this.D=t|0,this.E=o|0,this.F=i|0,this.G=x|0,this.H=h|0}process(n,s){for(let c=0;c<16;c++,s+=4)I[c]=n.getUint32(s,!1);for(let c=16;c<64;c++){const l=I[c-15],b=I[c-2],p=r(l,7)^r(l,18)^l>>>3,g=r(b,17)^r(b,19)^b>>>10;I[c]=g+I[c-7]+p+I[c-16]|0}let{A:a,B:t,C:o,D:i,E:x,F:h,G:f,H:m}=this;for(let c=0;c<64;c++){const l=r(x,6)^r(x,11)^r(x,25),b=m+l+V(x,h,f)+K[c]+I[c]|0,g=(r(a,2)^r(a,13)^r(a,22))+W(a,t,o)|0;m=f,f=h,h=x,x=i+b|0,i=o,o=t,t=a,a=b+g|0}a=a+this.A|0,t=t+this.B|0,o=o+this.C|0,i=i+this.D|0,x=x+this.E|0,h=h+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(a,t,o,i,x,h,f,m)}roundClean(){U(I)}destroy(){this.set(0,0,0,0,0,0,0,0),U(this.buffer)}}const q=G(()=>new N),J=q;function Mt(e,n){const s=n||"hex",a=J(k(e,{strict:!1})?S(e):e);return s==="bytes"?a:z(a)}export{kt as $,Cn as A,v as B,nn as C,tn as D,sn as E,an as F,en as G,j as H,Q as I,on as J,cn as K,xn as L,Ut as M,pt as N,yt as O,Bt as P,wt as Q,At as R,Ht as S,Lt as T,_t as U,Ct as V,Et as W,Dt as X,Tt as Y,Ft as Z,Gt as _,hn as a,St as a0,ht as a1,zt as a2,Rt as a3,$t as a4,ft as a5,rt as a6,mt as a7,ut as a8,It as a9,ot as aA,Fn as aB,Gn as aC,kn as aD,Sn as aE,zn as aF,Rn as aG,En as aH,$n as aI,Mn as aJ,Vn as aK,q as aL,bt as aa,ct as ab,lt as ac,gt as ad,dt as ae,Wn as af,jn as ag,Kn as ah,Nn as ai,qn as aj,Jn as ak,On as al,Dn as am,Xn as an,Pn as ao,Qn as ap,Yn as aq,Zn as ar,vn as as,nt as at,tt as au,st as av,at as aw,Tn as ax,et as ay,it as az,X as b,fn as c,rn as d,mn as e,un as f,In as g,P as h,bn as i,Y as j,ln as k,gn as l,xt as m,dn as n,Un as o,pn as p,yn as q,Bn as r,Mt as s,B as t,wn as u,An as v,Hn as w,Z as x,Ln as y,_n as z};
1
+ import{_ as H,$ as L,X as _,B as C,a0 as E,a1 as d,a2 as y,a3 as D,a4 as T,a5 as F,a6 as U,a7 as G,a8 as r,D as k,T as S,R as z}from"./signing-CoPa7cSW.js";function B(e,n="hex"){const s=w(e),a=H(new Uint8Array(s.length));return s.encode(a),n==="hex"?L(a.bytes):a.bytes}function X(e,n="bytes"){return B(e,n)}function P(e,n="hex"){return B(e,n)}function w(e){return Array.isArray(e)?R(e.map(n=>w(n))):$(e)}function R(e){const n=e.reduce((t,o)=>t+o.length,0),s=A(n);return{length:n<=55?1+n:1+s+n,encode(t){n<=55?t.pushByte(192+n):(t.pushByte(247+s),s===1?t.pushUint8(n):s===2?t.pushUint16(n):s===3?t.pushUint24(n):t.pushUint32(n));for(const{encode:o}of e)o(t)}}}function $(e){const n=typeof e=="string"?_(e):e,s=A(n.length);return{length:n.length===1&&n[0]<128?1:n.length<=55?1+n.length:1+s+n.length,encode(t){n.length===1&&n[0]<128?t.pushBytes(n):n.length<=55?(t.pushByte(128+n.length),t.pushBytes(n)):(t.pushByte(183+s),s===1?t.pushUint8(n.length):s===2?t.pushUint16(n.length):s===3?t.pushUint24(n.length):t.pushUint32(n.length),t.pushBytes(n))}}}function A(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new C("Length is too large.")}const Q=2n**(8n-1n)-1n,Y=2n**(16n-1n)-1n,Z=2n**(24n-1n)-1n,v=2n**(32n-1n)-1n,nn=2n**(40n-1n)-1n,tn=2n**(48n-1n)-1n,sn=2n**(56n-1n)-1n,an=2n**(64n-1n)-1n,en=2n**(72n-1n)-1n,on=2n**(80n-1n)-1n,cn=2n**(88n-1n)-1n,xn=2n**(96n-1n)-1n,hn=2n**(104n-1n)-1n,fn=2n**(112n-1n)-1n,rn=2n**(120n-1n)-1n,mn=2n**(128n-1n)-1n,un=2n**(136n-1n)-1n,In=2n**(144n-1n)-1n,bn=2n**(152n-1n)-1n,ln=2n**(160n-1n)-1n,gn=2n**(168n-1n)-1n,dn=2n**(176n-1n)-1n,Un=2n**(184n-1n)-1n,pn=2n**(192n-1n)-1n,yn=2n**(200n-1n)-1n,Bn=2n**(208n-1n)-1n,wn=2n**(216n-1n)-1n,An=2n**(224n-1n)-1n,Hn=2n**(232n-1n)-1n,Ln=2n**(240n-1n)-1n,_n=2n**(248n-1n)-1n,Cn=2n**(256n-1n)-1n,En=-(2n**(8n-1n)),Dn=-(2n**(16n-1n)),Tn=-(2n**(24n-1n)),Fn=-(2n**(32n-1n)),Gn=-(2n**(40n-1n)),kn=-(2n**(48n-1n)),Sn=-(2n**(56n-1n)),zn=-(2n**(64n-1n)),Rn=-(2n**(72n-1n)),$n=-(2n**(80n-1n)),Mn=-(2n**(88n-1n)),Vn=-(2n**(96n-1n)),Wn=-(2n**(104n-1n)),jn=-(2n**(112n-1n)),Kn=-(2n**(120n-1n)),Nn=-(2n**(128n-1n)),qn=-(2n**(136n-1n)),Jn=-(2n**(144n-1n)),On=-(2n**(152n-1n)),Xn=-(2n**(160n-1n)),Pn=-(2n**(168n-1n)),Qn=-(2n**(176n-1n)),Yn=-(2n**(184n-1n)),Zn=-(2n**(192n-1n)),vn=-(2n**(200n-1n)),nt=-(2n**(208n-1n)),tt=-(2n**(216n-1n)),st=-(2n**(224n-1n)),at=-(2n**(232n-1n)),et=-(2n**(240n-1n)),it=-(2n**(248n-1n)),ot=-(2n**(256n-1n)),ct=2n**8n-1n,xt=2n**16n-1n,ht=2n**24n-1n,ft=2n**32n-1n,rt=2n**40n-1n,mt=2n**48n-1n,ut=2n**56n-1n,It=2n**64n-1n,bt=2n**72n-1n,lt=2n**80n-1n,gt=2n**88n-1n,dt=2n**96n-1n,Ut=2n**104n-1n,pt=2n**112n-1n,yt=2n**120n-1n,Bt=2n**128n-1n,wt=2n**136n-1n,At=2n**144n-1n,Ht=2n**152n-1n,Lt=2n**160n-1n,_t=2n**168n-1n,Ct=2n**176n-1n,Et=2n**184n-1n,Dt=2n**192n-1n,Tt=2n**200n-1n,Ft=2n**208n-1n,Gt=2n**216n-1n,kt=2n**224n-1n,St=2n**232n-1n,zt=2n**240n-1n,Rt=2n**248n-1n,$t=2n**256n-1n;function M(e,n,s,a){if(typeof e.setBigUint64=="function")return e.setBigUint64(n,s,a);const t=BigInt(32),o=BigInt(4294967295),i=Number(s>>t&o),x=Number(s&o),h=a?4:0,f=a?0:4;e.setUint32(n+h,i,a),e.setUint32(n+f,x,a)}function V(e,n,s){return e&n^~e&s}function W(e,n,s){return e&n^e&s^n&s}class j extends E{constructor(n,s,a,t){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=n,this.outputLen=s,this.padOffset=a,this.isLE=t,this.buffer=new Uint8Array(n),this.view=d(this.buffer)}update(n){y(this),n=D(n),T(n);const{view:s,buffer:a,blockLen:t}=this,o=n.length;for(let i=0;i<o;){const x=Math.min(t-this.pos,o-i);if(x===t){const h=d(n);for(;t<=o-i;i+=t)this.process(h,i);continue}a.set(n.subarray(i,i+x),this.pos),this.pos+=x,i+=x,this.pos===t&&(this.process(s,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){y(this),F(n,this),this.finished=!0;const{buffer:s,view:a,blockLen:t,isLE:o}=this;let{pos:i}=this;s[i++]=128,U(this.buffer.subarray(i)),this.padOffset>t-i&&(this.process(a,0),i=0);for(let c=i;c<t;c++)s[c]=0;M(a,t-8,BigInt(this.length*8),o),this.process(a,0);const x=d(n),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=h/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c<f;c++)x.setUint32(4*c,m[c],o)}digest(){const{buffer:n,outputLen:s}=this;this.digestInto(n);const a=n.slice(0,s);return this.destroy(),a}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:s,buffer:a,length:t,finished:o,destroyed:i,pos:x}=this;return n.destroyed=i,n.finished=o,n.length=t,n.pos=x,t%s&&n.buffer.set(a),n}clone(){return this._cloneInto()}}const u=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),K=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]),I=new Uint32Array(64);class N extends j{constructor(n=32){super(64,n,8,!1),this.A=u[0]|0,this.B=u[1]|0,this.C=u[2]|0,this.D=u[3]|0,this.E=u[4]|0,this.F=u[5]|0,this.G=u[6]|0,this.H=u[7]|0}get(){const{A:n,B:s,C:a,D:t,E:o,F:i,G:x,H:h}=this;return[n,s,a,t,o,i,x,h]}set(n,s,a,t,o,i,x,h){this.A=n|0,this.B=s|0,this.C=a|0,this.D=t|0,this.E=o|0,this.F=i|0,this.G=x|0,this.H=h|0}process(n,s){for(let c=0;c<16;c++,s+=4)I[c]=n.getUint32(s,!1);for(let c=16;c<64;c++){const l=I[c-15],b=I[c-2],p=r(l,7)^r(l,18)^l>>>3,g=r(b,17)^r(b,19)^b>>>10;I[c]=g+I[c-7]+p+I[c-16]|0}let{A:a,B:t,C:o,D:i,E:x,F:h,G:f,H:m}=this;for(let c=0;c<64;c++){const l=r(x,6)^r(x,11)^r(x,25),b=m+l+V(x,h,f)+K[c]+I[c]|0,g=(r(a,2)^r(a,13)^r(a,22))+W(a,t,o)|0;m=f,f=h,h=x,x=i+b|0,i=o,o=t,t=a,a=b+g|0}a=a+this.A|0,t=t+this.B|0,o=o+this.C|0,i=i+this.D|0,x=x+this.E|0,h=h+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(a,t,o,i,x,h,f,m)}roundClean(){U(I)}destroy(){this.set(0,0,0,0,0,0,0,0),U(this.buffer)}}const q=G(()=>new N),J=q;function Mt(e,n){const s=n||"hex",a=J(k(e,{strict:!1})?S(e):e);return s==="bytes"?a:z(a)}export{kt as $,Cn as A,v as B,nn as C,tn as D,sn as E,an as F,en as G,j as H,Q as I,on as J,cn as K,xn as L,Ut as M,pt as N,yt as O,Bt as P,wt as Q,At as R,Ht as S,Lt as T,_t as U,Ct as V,Et as W,Dt as X,Tt as Y,Ft as Z,Gt as _,hn as a,St as a0,ht as a1,zt as a2,Rt as a3,$t as a4,ft as a5,rt as a6,mt as a7,ut as a8,It as a9,ot as aA,Fn as aB,Gn as aC,kn as aD,Sn as aE,zn as aF,Rn as aG,En as aH,$n as aI,Mn as aJ,Vn as aK,q as aL,bt as aa,ct as ab,lt as ac,gt as ad,dt as ae,Wn as af,jn as ag,Kn as ah,Nn as ai,qn as aj,Jn as ak,On as al,Dn as am,Xn as an,Pn as ao,Qn as ap,Yn as aq,Zn as ar,vn as as,nt as at,tt as au,st as av,at as aw,Tn as ax,et as ay,it as az,X as b,fn as c,rn as d,mn as e,un as f,In as g,P as h,bn as i,Y as j,ln as k,gn as l,xt as m,dn as n,Un as o,pn as p,yn as q,Bn as r,Mt as s,B as t,wn as u,An as v,Hn as w,Z as x,Ln as y,_n as z};