@dcl/shop 1.15.0 → 1.15.1-35758984456.commit-e35d44f
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.
- package/_assets/{Activity-BBgqwdRc.js → Activity-bKECsdYw.js} +4 -4
- package/_assets/{AnimatedBackground-CAe8erqx.js → AnimatedBackground-DxV5mqF_.js} +2 -2
- package/_assets/{Assets-BVr6Ienp.js → Assets-DbsPVOVg.js} +7 -7
- package/_assets/{Cart-uMh-LLkS.js → Cart-DO4LIC11.js} +5 -5
- package/_assets/{Collection-C6wH7PGc.js → Collection-DYqdwnMp.js} +9 -9
- package/_assets/{CollectionCarousel-DLu1yG2d.js → CollectionCarousel-ySH8e59r.js} +6 -6
- package/_assets/{Confetti-CUYY8WKL.js → Confetti-HEIQLhzP.js} +4 -4
- package/_assets/{ConstantsUtil-Du7Rw-I9.js → ConstantsUtil-BgXRXYGw.js} +2 -2
- package/_assets/{ContentClient-CQ0rZRJX.js → ContentClient-9KfSWsTj.js} +2 -2
- package/_assets/{Creator-DiqRz4sK.js → Creator-CORE-kBH.js} +9 -9
- package/_assets/{CreditPackPicker-CZe0q7lQ.js → CreditPackPicker-COxZsW_g.js} +7 -7
- package/_assets/{DeploymentBuilder-B8n1ixz5.js → DeploymentBuilder--7EWiL5t.js} +2 -2
- package/_assets/{EmotePlaybackBar-Dh9mWTmr.js → EmotePlaybackBar-CvNNr5Oh.js} +5 -5
- package/_assets/{ErrorNotice-BZweT4nq.js → ErrorNotice-QFoLzcXZ.js} +2 -2
- package/_assets/{Event-BhrUy_li.js → Event-C21gULzn.js} +2 -2
- package/_assets/{ExchangeController-B8eGX00R.js → ExchangeController-dZXZndcr.js} +2 -2
- package/_assets/{Faq-BRUGz0o1.js → Faq-C8NlTkMm.js} +2 -2
- package/_assets/{Filters-CWaA5jz_.js → Filters-BfKlKsFH.js} +9 -9
- package/_assets/{GetCredits-91FKPj2S.js → GetCredits-C9eifvig.js} +2 -2
- package/_assets/{Grow-BtoTVtjh.js → Grow-BtwC3ton.js} +2 -2
- package/_assets/{HelpersUtil-DtSGcn50.js → HelpersUtil-h8eAZyJ2.js} +2 -2
- package/_assets/{ItemDetail-CPUr9pIj.js → ItemDetail-C2elfZqB.js} +219 -219
- package/_assets/{LoadMore-VpUeZFim.js → LoadMore-wrn8CZ0P.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-CAt88qh9.js → ManaPricingBanner.styles-DiO-oavz.js} +2 -2
- package/_assets/{MyAssets-BUFp0lDY.js → MyAssets-BJlrmf_H.js} +4 -4
- package/_assets/{MyFavorites-BJRUv9oZ.js → MyFavorites-BvCzcgXV.js} +2 -2
- package/_assets/{MyStore-CEJ3my3_.js → MyStore-CE01tniW.js} +7 -7
- package/_assets/{NetworkUtil-Ciq8Tbsc.js → NetworkUtil-B82sps2w.js} +2 -2
- package/_assets/{NotFound-DmCwRSbf.js → NotFound-B38vd0-2.js} +2 -2
- package/_assets/{NotificationsBell-DbHW9KbV.js → NotificationsBell-BAFhPYD4.js} +2 -2
- package/_assets/{OutfitDetail-BdCmpPcB.js → OutfitDetail-CmC7Fz7V.js} +2 -2
- package/_assets/{OutfitPreview-ziiAIMxw.js → OutfitPreview-doqFX8RK.js} +2 -2
- package/_assets/{OutfitStudio-i641piGk.js → OutfitStudio-BQC32jpc.js} +2 -2
- package/_assets/{PaymentMethodStep-DLWg_1Mg.js → PaymentMethodStep-D2ZZeBhr.js} +2 -2
- package/_assets/{SaleCountdown-D_0C1G0b.js → SaleCountdown-75C7xcxV.js} +2 -2
- package/_assets/{Spinner-k8dLtOrJ.js → Spinner-6yZpkHLg.js} +2 -2
- package/_assets/{StoreSettings-DiqvHUbK.js → StoreSettings-CmumjCaY.js} +2 -2
- package/_assets/{Success-yvCjE3be.js → Success-DAcLzy2D.js} +2 -2
- package/_assets/{SwapController-L-o_4Zfy.js → SwapController-DsDt8xqV.js} +2 -2
- package/_assets/{Tooltip-BEJkU8QC.js → Tooltip-CXZh9bO7.js} +2 -2
- package/_assets/TradeService-D3CWOt2G.js +2 -0
- package/_assets/{W3MFrameProviderSingleton-BxpE6Qai.js → W3MFrameProviderSingleton-B_WgnQJA.js} +4 -4
- package/_assets/{WebCryptoP256-DKkCHgRo.js → WebCryptoP256-CO4P30_Q.js} +2 -2
- package/_assets/{basic-DHFzByJo.js → basic-DqTETUY2.js} +2 -2
- package/_assets/{biconomy-DCsUE-Aa.js → biconomy-BRd-F-Rd.js} +2 -2
- package/_assets/{browseLayout.styles-fXEIBUq8.js → browseLayout.styles-DH4Un0Jq.js} +2 -2
- package/_assets/{browser-zYx7iqzr.js → browser-D85mhr-s.js} +2 -2
- package/_assets/{browser-gYEIuxiW.js → browser-D_g_kata.js} +2 -2
- package/_assets/{browser-ponyfill-5UyluzqP.js → browser-ponyfill-BcP6O00l.js} +2 -2
- package/_assets/{buy-zKbAn0Jr.js → buy-C9hvyAAq.js} +2 -2
- package/_assets/{buy-gasless-BheWI81y.js → buy-gasless-BnU0dUSp.js} +2 -2
- package/_assets/{ccip-DAEHnzsX.js → ccip-pFur8j_T.js} +2 -2
- package/_assets/{ccip-DvIRUO6I.js → ccip-wDBYP7tI.js} +2 -2
- package/_assets/{chains-lku0nIXt.js → chains-BCg_IRC_.js} +2 -2
- package/_assets/{collectionPage.styles-B8UMV0wt.js → collectionPage.styles-BfpCypx0.js} +8 -8
- package/_assets/{common-C03gEIWz.js → common-CBJZ92yk.js} +2 -2
- package/_assets/{controller-CoiO-8ak.js → controller-CWOh6-hc.js} +3 -3
- package/_assets/{core-BOjd_Eve.js → core-tb2wOJCE.js} +5 -5
- package/_assets/{createSvgIcon-BiXHCpBo.js → createSvgIcon-CTNepu6k.js} +6 -6
- package/_assets/{crumbs.styles-Bq-08Eo1.js → crumbs.styles-DK1l5Q6W.js} +2 -2
- package/_assets/{custom-D9bjz_2p.js → custom-CM-BIPga.js} +2 -2
- package/_assets/{data-capture-CGASy8JJ.js → data-capture-C9lve2O6.js} +2 -2
- package/_assets/{dcl-schemas-COntwfiV.js → dcl-schemas-Bm7CwtMo.js} +2 -2
- package/_assets/{decimals-BpivF8HU.js → decimals-CDDpcnDv.js} +2 -2
- package/_assets/{decimals-C39Js9A5.js → decimals-CDs72b7s.js} +2 -2
- package/_assets/{detectExtension-CYK2hYlo.js → detectExtension-CVIbYye2.js} +2 -2
- package/_assets/{disposePreview-C9RvsbNf.js → disposePreview-CeFK0Gbv.js} +2 -2
- package/_assets/{email-B7Hqc3Al.js → email-WP5ANIYF.js} +2 -2
- package/_assets/{embedded-wallet-DQ3g7rbj.js → embedded-wallet-CxxDH2Y_.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-orHSWwQS.js → emotion-styled.browser.esm-CwFt_fv-.js} +2 -2
- package/_assets/{engine-BVrA-eDe.js → engine-BSVHzcxQ.js} +2 -2
- package/_assets/{errors-DxKvZXrL.js → errors-DgTO8Pwf.js} +2 -2
- package/_assets/{estimate-l1-fee-CI9CaMqP.js → estimate-l1-fee-wbi1CwgU.js} +2 -2
- package/_assets/{eth_estimateGas-grjD8ZC6.js → eth_estimateGas-X0nU1zIX.js} +2 -2
- package/_assets/{eth_getStorageAt-Di8D3-FZ.js → eth_getStorageAt-smMUPSW5.js} +2 -2
- package/_assets/{eth_getTransactionCount-dmwPv1uL.js → eth_getTransactionCount-DJFj4Z-a.js} +2 -2
- package/_assets/{ethereum-BXBXB0WJ.js → ethereum-Bd9kTKCd.js} +2 -2
- package/_assets/{ethers-BIoA35Pn.js → ethers-CCCzUGvE.js} +2 -2
- package/_assets/{events-DNWUGNd7.js → events-CI6p1q09.js} +2 -2
- package/_assets/{execute-BRAlOglu.js → execute-YTrfihja.js} +3 -3
- package/_assets/{extractIPFS-B6dS8Wbs.js → extractIPFS-Beribx_y.js} +2 -2
- package/_assets/{features-YldM2Blt.js → features-2QVGTJN6.js} +2 -2
- package/_assets/{fetchTokenMetadata-BTPEU-3q.js → fetchTokenMetadata-Bph0BjJ-.js} +3 -3
- package/_assets/{field.styles-7aAfESFo.js → field.styles-DjrPseLy.js} +2 -2
- package/_assets/{fortmatic-Du20O965.js → fortmatic-f94MqiA_.js} +2 -2
- package/_assets/{get-bytecode-Dmk-6Mk4.js → get-bytecode-C2VYXUvG.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-IK9mOCLo.js → get-ecosystem-wallet-info-DY9KXpsf.js} +2 -2
- package/_assets/{getBalance-ktnD9Moc.js → getBalance-BdiZ9TAk.js} +3 -3
- package/_assets/{getInstalledModules-jTPTLnb8.js → getInstalledModules-BxXhvx70.js} +2 -2
- package/_assets/{getNFT-DbXgJ4kx.js → getNFT-CsityKp4.js} +3 -3
- package/_assets/{getNFT-CwzF6z_7.js → getNFT-w9X9S-KF.js} +2 -2
- package/_assets/{grid.styles-Reh_Sfmk.js → grid.styles-DY7OtvuI.js} +2 -2
- package/_assets/{hashTypedData-B72YO7bf.js → hashTypedData-CSbxHx5S.js} +2 -2
- package/_assets/{hashTypedData-B5WTbVYh.js → hashTypedData-DUcKfkeM.js} +2 -2
- package/_assets/{import-CJWafgcM.js → import-eY4HDWmz.js} +2 -2
- package/_assets/{in-app-reC7MW7U.js → in-app-BtkzLNRf.js} +2 -2
- package/_assets/{in-app-wallet-calls-YVgiy_Z_.js → in-app-wallet-calls-CRNOIw3M.js} +2 -2
- package/_assets/{index-CnNEDEKF.js → index--Ir8Tnq2.js} +2 -2
- package/_assets/{index-nBFm5kuI.js → index-2uhvgeUf.js} +2 -2
- package/_assets/{index-DkEEbiDR.js → index-97h9870i.js} +2 -2
- package/_assets/{index-DKiO6CtY.js → index-B06t_xi0.js} +2 -2
- package/_assets/{index-B610oYVJ.js → index-B4O2ZDef.js} +2 -2
- package/_assets/{index-DURI-gf8.js → index-B4hbKg8s.js} +4 -4
- package/_assets/{index-CZiKz5pK.js → index-B6kVIcHh.js} +2 -2
- package/_assets/{index-Csltect9.js → index-B9A39IHu.js} +2 -2
- package/_assets/{index-DcTChipn.js → index-BDN7ohqQ.js} +3 -3
- package/_assets/{index-CQ_hwt2w.js → index-BNt2xj6D.js} +2 -2
- package/_assets/{index-Butijfje.js → index-BO_D8zz8.js} +2 -2
- package/_assets/{index-DHvU-KWh.js → index-BTZOJ-cb.js} +2 -2
- package/_assets/{index-GQaePZB9.js → index-BbS-Emo7.js} +2 -2
- package/_assets/{index-Cvfa-O4J.js → index-BfPqBm6q.js} +2 -2
- package/_assets/{index-B0NLjhmz.js → index-BhLMHrfP.js} +2 -2
- package/_assets/{index-D8OXtAip.js → index-Bjmt4M2e.js} +2 -2
- package/_assets/{index-BQBSlmH-.js → index-BrnkmZmr.js} +2 -2
- package/_assets/{index-D4EeOyaA.js → index-BsxJZNP6.js} +2 -2
- package/_assets/{index-CyJXEo_c.js → index-C0I2xWST.js} +2 -2
- package/_assets/{index-B7A8C7MY.js → index-C1SUyZUZ.js} +2 -2
- package/_assets/{index-D2gmXgfJ.js → index-C20Xo0Qk.js} +2 -2
- package/_assets/{index-Ys04Xign.js → index-C3ykhW34.js} +2 -2
- package/_assets/index-CJi7LEDC.css +1 -0
- package/_assets/{index-2QUWziXM.js → index-CR6q93wr.js} +2 -2
- package/_assets/{index-B7Z8xaGK.js → index-CTh9rk5N.js} +2 -2
- package/_assets/{index-DJIQTk8q.js → index-CY5zoHO0.js} +2 -2
- package/_assets/{index-C-w85US7.js → index-CZ6WEeXs.js} +2 -2
- package/_assets/{index-DA4F0G5P.js → index-Cb0lWl7u.js} +2 -2
- package/_assets/{index-BVGDgDVf.js → index-Ceo5R3J-.js} +2 -2
- package/_assets/{index-D-gigTjB.js → index-ChROYmEk.js} +2 -2
- package/_assets/{index-D1h1jMQm.js → index-Ch_bMVeI.js} +2 -2
- package/_assets/{index-DSwXuC0D.js → index-CnhnjJ5R.js} +2 -2
- package/_assets/{index-D48CxYHB.js → index-CoUk50Lc.js} +2 -2
- package/_assets/{index-DdpXntwz.js → index-CoVvIOee.js} +2 -2
- package/_assets/{index-DW-Melj-.js → index-CsfoMOIL.js} +2 -2
- package/_assets/{index-CJ1iqO8A.js → index-Cy5gnEAh.js} +2 -2
- package/_assets/{index-CLFGNSZ-.js → index-CywqcYsx.js} +2 -2
- package/_assets/{index-DAFOiLHS.js → index-D1dmapyR.js} +3 -3
- package/_assets/{index-B5Il9w_t.js → index-D5tuSU4_.js} +2 -2
- package/_assets/{index-DtTYXgF3.js → index-DBjnYsMO.js} +2 -2
- package/_assets/{index-B18ZHjoG.js → index-DDc2PRAu.js} +2 -2
- package/_assets/{index-YHzCYJkG.js → index-DHm0H4jh.js} +2 -2
- package/_assets/{index-DDjkaD8J.js → index-DIdrDGIp.js} +2 -2
- package/_assets/{index-C_gzza3J.js → index-DMO-4UAS.js} +2 -2
- package/_assets/{index-COT5Frck.js → index-DMclcFGD.js} +2 -2
- package/_assets/{index-uYTIcGSZ.js → index-DZri9_d8.js} +2 -2
- package/_assets/{index-B3PqY8NV.js → index-Di1f_gg-.js} +2 -2
- package/_assets/{index-7WKP3ObD.js → index-DijPoity.js} +2 -2
- package/_assets/{index-DAh-ftDy.js → index-Dix506II.js} +2 -2
- package/_assets/{index-Ba4Qb-tQ.js → index-DjcH_GIm.js} +2 -2
- package/_assets/{index-CnZUnVbC.js → index-Dmln48uu.js} +2 -2
- package/_assets/{index-B-cCk8d1.js → index-Dos83S_O.js} +2 -2
- package/_assets/{index-DcpPAZS7.js → index-DxSFFM9n.js} +2 -2
- package/_assets/{index-D71yoQwh.js → index-DxfG2pYK.js} +4 -4
- package/_assets/{index-1tydFwH5.js → index-Dz4zx8G5.js} +4 -4
- package/_assets/{index-DrLA_VU_.js → index-ESgisqJB.js} +2 -2
- package/_assets/{index-ClePbRUv.js → index-FWLwLI_L.js} +3 -3
- package/_assets/{index-BYiScitc.js → index-Ie1K2NKm.js} +2 -2
- package/_assets/index-Rj6xitw3.js +4310 -0
- package/_assets/{index-jyj9sHwU.js → index-_6zzOXqE.js} +2 -2
- package/_assets/{index-CBv79d7E.js → index-hA_dK_jp.js} +2 -2
- package/_assets/{index-BXCm1lR6.js → index-iHQu-gMp.js} +2 -2
- package/_assets/{index-CYwEY6Wy.js → index-jIjsvCCP.js} +2 -2
- package/_assets/{index-Cd_cQb_5.js → index-s3zzx4qf.js} +4 -4
- package/_assets/{index-CcdPYHZS.js → index-sOzSRz9a.js} +3 -3
- package/_assets/{index-BWz0ngpy.js → index-tDGGT4se.js} +2 -2
- package/_assets/{index-CA7DDOOl.js → index-u5579SSN.js} +3 -3
- package/_assets/{index-BZcBt3X8.js → index-ucQUr7A4.js} +2 -2
- package/_assets/{index.es-Bn4oTPjZ.js → index.es-BNPjhrfs.js} +2 -2
- package/_assets/{index.es-CU-vsJdv.js → index.es-CmIxggjj.js} +2 -2
- package/_assets/{index.es-BZK_Cifn.js → index.es-OZ_jrVxQ.js} +5 -5
- package/_assets/{index.es-BXEjCl7y.js → index.es-dvTFi3WB.js} +2 -2
- package/_assets/items-empty-CAzEAuwb.js +2 -0
- package/_assets/{jump-DWbTrGpm.js → jump-Cx61htXz.js} +2 -2
- package/_assets/{linkAccount-CMtMM4t3.js → linkAccount-CWB2Woh-.js} +2 -2
- package/_assets/loader-logo-BiK3-TWh.js +2 -0
- package/_assets/{localBatchGatewayRequest-8oF0MPC1.js → localBatchGatewayRequest-DQFeMjbz.js} +2 -2
- package/_assets/{modal.styles-hpuefgX4.js → modal.styles-DgTxff7r.js} +2 -2
- package/_assets/{native-CPeL4rJZ.js → native-C4y7GMWV.js} +2 -2
- package/_assets/{networks-BhouyyPS.js → networks-ckUxzfdf.js} +2 -2
- package/_assets/{onramp-BvIHLQAv.js → onramp-Dt3jsYUN.js} +2 -2
- package/_assets/{openzeppelin-OZNoWqYj.js → openzeppelin-DIpsN3nf.js} +2 -2
- package/_assets/{ownerOf-bCzxqzq0.js → ownerOf-C54s5389.js} +2 -2
- package/_assets/{parseNft-pxEjnpjF.js → parseNft-BbR1W56D.js} +3 -3
- package/_assets/{parseSignature-CpDiAFfJ.js → parseSignature-2VcJfsir.js} +2 -2
- package/_assets/{parseSignature-BAJHdtSB.js → parseSignature-CBgqGFix.js} +4 -4
- package/_assets/{passkeys-iblxlDv1.js → passkeys-C8p4-ZyD.js} +2 -2
- package/_assets/{pay-with-exchange-CLgZOiU6.js → pay-with-exchange-DJcHLYup.js} +2 -2
- package/_assets/{prepare-contract-call-CoHsXlvg.js → prepare-contract-call-o4uVYz2Y.js} +2 -2
- package/_assets/{qr-overlay-B_NIDLKC.js → qr-overlay-dYbTNa51.js} +4 -4
- package/_assets/{react-BmPeg6sG.js → react-BJuMEjl2.js} +2 -2
- package/_assets/{receive-DszbAWAn.js → receive-DYycxA_C.js} +2 -2
- package/_assets/{resolveImplementation-32KPFc_U.js → resolveImplementation-mVYsIlgT.js} +2 -2
- package/_assets/{resume-buy-D2TWyIFl.js → resume-buy-Bkdykvli.js} +2 -2
- package/_assets/{resume-name-B-MASXQk.js → resume-name-CTNS9sIV.js} +2 -2
- package/_assets/{rpc-CHnWH0rF.js → rpc-CoZaI6EH.js} +2 -2
- package/_assets/{sales-empty-UircscXh.js → sales-empty-raINyj4_.js} +2 -2
- package/_assets/{search-empty-CPirv6rw.js → search-empty-DjCdKfBZ.js} +2 -2
- package/_assets/{secp256k1-BUEs1rcj.js → secp256k1-CI4f5kiN.js} +2 -2
- package/_assets/{secp256k1-D1DTa_mW.js → secp256k1-Cbo2_8kp.js} +2 -2
- package/_assets/{secp256k1-Bb0zIfEz.js → secp256k1-Dyn2w5P5.js} +2 -2
- package/_assets/{send-batch-transaction-CcXPrdOH.js → send-batch-transaction-CpVRyS6x.js} +2 -2
- package/_assets/{send-eip712-transaction-ouILrTb6.js → send-eip712-transaction-Dxs7wPRW.js} +3 -3
- package/_assets/{send-gasless-transaction-rKjG34Kj.js → send-gasless-transaction-S_6BUU5w.js} +3 -3
- package/_assets/{send-transaction-BbLs2Ynf.js → send-transaction-C20Ra9-I.js} +3 -3
- package/_assets/{send-C8TzZsHF.js → send-yYwvRRB7.js} +2 -2
- package/_assets/{sendMetaTransaction-Dy6lp92T.js → sendMetaTransaction-C5b7rSXh.js} +2 -2
- package/_assets/{sendRawTransaction-BY7CWiPp.js → sendRawTransaction-DDyy707c.js} +4 -4
- package/_assets/{sentry-CfKEockx.js → sentry-Cv7iYFas.js} +3 -3
- package/_assets/{serializeTransaction-DOIuoefa.js → serializeTransaction-eHQIao0M.js} +2 -2
- package/_assets/{session-proposal-BR55dEaA.js → session-proposal-nhUt9PDC.js} +2 -2
- package/_assets/{session-request-C_hO74mD.js → session-request-C-_ZZWXU.js} +3 -3
- package/_assets/{sha256-BJjUSCTX.js → sha256-BBrHzqm3.js} +2 -2
- package/_assets/{sha3-B3El3U9k.js → sha3-DF3IgY7u.js} +2 -2
- package/_assets/signin-empty-VJ2i5nlY.js +2 -0
- package/_assets/{signing-D66RpSSx.js → signing-CUVnfBov.js} +4 -4
- package/_assets/{skeleton.styles-B3BxeSy_.js → skeleton.styles-Dkdpu9S4.js} +2 -2
- package/_assets/{socials-fdANcU4O.js → socials-CzT9Ope8.js} +2 -2
- package/_assets/{styled-ihfZhc5C.js → styled-BPuJZtLw.js} +3 -3
- package/_assets/{swaps-DZV3-WZp.js → swaps-D_nn608d.js} +2 -2
- package/_assets/{thirdweb-dhrmjSPt.js → thirdweb-aXR7VZgh.js} +4 -4
- package/_assets/{to-serializable-transaction-BxxEhlQY.js → to-serializable-transaction-BmsY8QrV.js} +3 -3
- package/_assets/{totalSupply-B2nCZvgY.js → totalSupply-BMwx0h3k.js} +2 -2
- package/_assets/{trade-encoding-D0iBabuM.js → trade-encoding-DWpimiL1.js} +2 -2
- package/_assets/{transaction-CJXWN8an.js → transaction-BO0a3JDp.js} +2 -2
- package/_assets/{transactionReceipt-CpzMTSMZ.js → transactionReceipt-DTRPLDyn.js} +2 -2
- package/_assets/{transactions-CKkVNjQ4.js → transactions-DcXz63jV.js} +2 -2
- package/_assets/{useCreatorSales-Ze3V5ohC.js → useCreatorSales-Dne7wG4l.js} +77 -77
- package/_assets/{useInfiniteGrid-D8vhQEzx.js → useInfiniteGrid-Dd07CrOc.js} +2 -2
- package/_assets/{useStore-DdvCUhO-.js → useStore-5H_8nJCb.js} +3 -3
- package/_assets/{useTheme-QKnvhO7_.js → useTheme-7-3gcs4V.js} +2 -2
- package/_assets/{utils-5qk7WI4m.js → utils-t7866p84.js} +2 -2
- package/_assets/{verifyHash-Dm5TFWpr.js → verifyHash-Auu6O9eS.js} +2 -2
- package/_assets/{w3m-modal-B5R3n_ak.js → w3m-modal-BY88qkF-.js} +2 -2
- package/_assets/{w3m-modal-CEqDQIHN.js → w3m-modal-CBUfdWNk.js} +2 -2
- package/_assets/{wait-for-tx-receipt-CUblm3Uy.js → wait-for-tx-receipt-CgJna2Ie.js} +2 -2
- package/_assets/{wallets-BT0Osdwo.js → wallets-CHxO-Ctc.js} +6 -6
- package/_assets/{web-connector-BzJlWUBl.js → web-connector-DmFj8e1e.js} +4 -4
- package/_assets/{writeContract-CH8f16EO.js → writeContract-7U0ZKDRI.js} +2 -2
- package/_assets/{zora-sepolia-BfgSfWmM.js → zora-sepolia-BataDEu7.js} +2 -2
- package/_assets/{zoraTestnet-CiGZFo3e.js → zoraTestnet-DWFNTwEp.js} +2 -2
- package/index.html +12 -12
- package/package.json +2 -2
- package/_assets/TradeService-DVeKA0A9.js +0 -2
- package/_assets/index-COio6Ejd.js +0 -4310
- package/_assets/index-DVuzXPDM.css +0 -1
- package/_assets/items-empty-DGRxHTWy.js +0 -2
- package/_assets/loader-logo-CeNjVZuG.js +0 -2
- package/_assets/signin-empty-XsT9jLzt.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{f as vo,b as ra,r as oe,j as w}from"./react-BmPeg6sG.js";import{M as na,ba as sa,c as xn,h as Vt,j as Ft,a as T,s as W,I as We,n as ia,aG as Ro,t as D,bT as Ze,bY as $t,z as zt,F as Wn,bX as In,dZ as oa,O as Pt,aP as An,l as _o,bC as $o,ck as aa,H as Jt,w as ca}from"./index-COio6Ejd.js";import{S as Io,c as ua,i as la,D as Kn,a as da}from"./SaleCountdown-D_0C1G0b.js";import{f as Ao}from"./errors-DxKvZXrL.js";import{m as fa}from"./mana-matic-CEqvSwrJ.js";import{T as To}from"./Tooltip-BEJkU8QC.js";import{E as Yn}from"./ErrorNotice-BZweT4nq.js";import{f as ha}from"./browseLayout.styles-fXEIBUq8.js";import{B as Zn,d as Tn}from"./dcl-schemas-COntwfiV.js";import{r as pa}from"./sha3-B3El3U9k.js";import{r as ga}from"./browser-gYEIuxiW.js";import{p as ma}from"./sentry-CfKEockx.js";import{k as ya,r as ba,O as Qn}from"./trade-encoding-D0iBabuM.js";import{C as jo,a as bt,h as Co,r as Ea,k as wa}from"./ethers-BIoA35Pn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d519bf33-5d9f-4f47-b482-f309d51e21a8",e._sentryDebugIdIdentifier="sentry-dbid-d519bf33-5d9f-4f47-b482-f309d51e21a8")}catch{}})();var Gt={},Ue={},Ve={},Xt={},Fe={},Re={},ze={},tt={},es;function xo(){if(es)return tt;es=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.StructError=void 0;class e extends TypeError{constructor(n,s){let d;const{message:u,explanation:c,...a}=n,{path:o}=n,f=o.length===0?u:`At path: ${o.join(".")} -- ${u}`;super(c??f),c!=null&&(this.cause=f),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>d??(d=[n,...s()])}}return tt.StructError=e,tt}var fe={},he={},ts;function Bt(){if(ts)return he;ts=1,Object.defineProperty(he,"__esModule",{value:!0}),he.run=he.toFailures=he.toFailure=he.shiftIterator=he.print=he.isPlainObject=he.isObject=void 0;function e(o){return t(o)&&typeof o[Symbol.iterator]=="function"}function t(o){return typeof o=="object"&&o!==null}he.isObject=t;function n(o){if(Object.prototype.toString.call(o)!=="[object Object]")return!1;const f=Object.getPrototypeOf(o);return f===null||f===Object.prototype}he.isPlainObject=n;function s(o){return typeof o=="symbol"?o.toString():typeof o=="string"?JSON.stringify(o):`${o}`}he.print=s;function d(o){const{done:f,value:r}=o.next();return f?void 0:r}he.shiftIterator=d;function u(o,f,r,i){if(o===!0)return;o===!1?o={}:typeof o=="string"&&(o={message:o});const{path:l,branch:h}=f,{type:b}=r,{refinement:v,message:N=`Expected a value of type \`${b}\`${v?` with refinement \`${v}\``:""}, but received: \`${s(i)}\``}=o;return{value:i,type:b,refinement:v,key:l[l.length-1],path:l,branch:h,...o,message:N}}he.toFailure=u;function*c(o,f,r,i){e(o)||(o=[o]);for(const l of o){const h=u(l,f,r,i);h&&(yield h)}}he.toFailures=c;function*a(o,f,r={}){const{path:i=[],branch:l=[o],coerce:h=!1,mask:b=!1}=r,v={path:i,branch:l};if(h&&(o=f.coercer(o,v),b&&f.type!=="type"&&t(f.schema)&&t(o)&&!Array.isArray(o)))for(const L in o)f.schema[L]===void 0&&delete o[L];let N="valid";for(const L of f.validator(o,v))L.explanation=r.message,N="not_valid",yield[L,void 0];for(let[L,z,K]of f.entries(o,v)){const $=a(z,K,{path:L===void 0?i:[...i,L],branch:L===void 0?l:[...l,z],coerce:h,mask:b,message:r.message});for(const S of $)S[0]?(N=S[0].refinement===null||S[0].refinement===void 0?"not_valid":"not_refined",yield[S[0],void 0]):h&&(z=S[1],L===void 0?o=z:o instanceof Map?o.set(L,z):o instanceof Set?o.add(z):t(o)&&(z!==void 0||L in o)&&(o[L]=z))}if(N!=="not_valid")for(const L of f.refiner(o,v))L.explanation=r.message,N="not_refined",yield[L,void 0];N==="valid"&&(yield[void 0,o])}return he.run=a,he}var rs;function Et(){if(rs)return fe;rs=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.validate=fe.is=fe.mask=fe.create=fe.assert=fe.ExactOptionalStruct=fe.Struct=void 0;const e=xo(),t=Bt();class n{constructor(i){const{type:l,schema:h,validator:b,refiner:v,coercer:N=z=>z,entries:L=function*(){}}=i;this.type=l,this.schema=h,this.entries=L,this.coercer=N,b?this.validator=(z,K)=>{const $=b(z,K);return(0,t.toFailures)($,K,this,z)}:this.validator=()=>[],v?this.refiner=(z,K)=>{const $=v(z,K);return(0,t.toFailures)($,K,this,z)}:this.refiner=()=>[]}assert(i,l){return u(i,this,l)}create(i,l){return c(i,this,l)}is(i){return o(i,this)}mask(i,l){return a(i,this,l)}validate(i,l={}){return f(i,this,l)}}fe.Struct=n;const s="EXACT_OPTIONAL";class d extends n{constructor(i){super({...i,type:`exact optional ${i.type}`}),this.brand=s}static isExactOptional(i){return(0,t.isObject)(i)&&"brand"in i&&i.brand===s}}fe.ExactOptionalStruct=d;function u(r,i,l){const h=f(r,i,{message:l});if(h[0])throw h[0]}fe.assert=u;function c(r,i,l){const h=f(r,i,{coerce:!0,message:l});if(h[0])throw h[0];return h[1]}fe.create=c;function a(r,i,l){const h=f(r,i,{coerce:!0,mask:!0,message:l});if(h[0])throw h[0];return h[1]}fe.mask=a;function o(r,i){return!f(r,i)[0]}fe.is=o;function f(r,i,l={}){const h=(0,t.run)(r,i,l),b=(0,t.shiftIterator)(h);return b[0]?[new e.StructError(b[0],function*(){for(const L of h)L[0]&&(yield L[0])}),void 0]:[void 0,b[1]]}return fe.validate=f,fe}var Le={},Y={},ue={},ns;function Po(){if(ns)return ue;ns=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.pick=ue.partial=ue.omit=ue.lazy=ue.dynamic=ue.deprecated=ue.define=ue.assign=void 0;const e=Et(),t=Pn();function n(...r){var b;const i=((b=r[0])==null?void 0:b.type)==="type",l=r.map(({schema:v})=>v),h=Object.assign({},...l);return i?(0,t.type)(h):(0,t.object)(h)}ue.assign=n;function s(r,i){return new e.Struct({type:r,schema:null,validator:i})}ue.define=s;function d(r,i){return new e.Struct({...r,refiner:(l,h)=>l===void 0||r.refiner(l,h),validator(l,h){return l===void 0?!0:(i(l,h),r.validator(l,h))}})}ue.deprecated=d;function u(r){return new e.Struct({type:"dynamic",schema:null,*entries(i,l){yield*r(i,l).entries(i,l)},validator(i,l){return r(i,l).validator(i,l)},coercer(i,l){return r(i,l).coercer(i,l)},refiner(i,l){return r(i,l).refiner(i,l)}})}ue.dynamic=u;function c(r){let i;return new e.Struct({type:"lazy",schema:null,*entries(l,h){i??(i=r()),yield*i.entries(l,h)},validator(l,h){return i??(i=r()),i.validator(l,h)},coercer(l,h){return i??(i=r()),i.coercer(l,h)},refiner(l,h){return i??(i=r()),i.refiner(l,h)}})}ue.lazy=c;function a(r,i){const{schema:l}=r,h={...l};for(const b of i)delete h[b];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}ue.omit=a;function o(r){const i=r instanceof e.Struct,l=i?{...r.schema}:{...r};for(const h in l)l[h]=(0,t.optional)(l[h]);return i&&r.type==="type"?(0,t.type)(l):(0,t.object)(l)}ue.partial=o;function f(r,i){const{schema:l}=r,h={};for(const b of i)h[b]=l[b];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}return ue.pick=f,ue}var ss;function Pn(){if(ss)return Y;ss=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.unknown=Y.union=Y.type=Y.tuple=Y.string=Y.set=Y.regexp=Y.record=Y.exactOptional=Y.optional=Y.object=Y.number=Y.nullable=Y.never=Y.map=Y.literal=Y.intersection=Y.integer=Y.instance=Y.func=Y.enums=Y.date=Y.boolean=Y.bigint=Y.array=Y.any=void 0;const e=Et(),t=Bt(),n=Po();function s(){return(0,n.define)("any",()=>!0)}Y.any=s;function d(A){return new e.Struct({type:"array",schema:A,*entries(B){if(A&&Array.isArray(B))for(const[x,V]of B.entries())yield[x,V,A]},coercer(B){return Array.isArray(B)?B.slice():B},validator(B){return Array.isArray(B)||`Expected an array value, but received: ${(0,t.print)(B)}`}})}Y.array=d;function u(){return(0,n.define)("bigint",A=>typeof A=="bigint")}Y.bigint=u;function c(){return(0,n.define)("boolean",A=>typeof A=="boolean")}Y.boolean=c;function a(){return(0,n.define)("date",A=>A instanceof Date&&!isNaN(A.getTime())||`Expected a valid \`Date\` object, but received: ${(0,t.print)(A)}`)}Y.date=a;function o(A){const B={},x=A.map(V=>(0,t.print)(V)).join();for(const V of A)B[V]=V;return new e.Struct({type:"enums",schema:B,validator(V){return A.includes(V)||`Expected one of \`${x}\`, but received: ${(0,t.print)(V)}`}})}Y.enums=o;function f(){return(0,n.define)("func",A=>typeof A=="function"||`Expected a function, but received: ${(0,t.print)(A)}`)}Y.func=f;function r(A){return(0,n.define)("instance",B=>B instanceof A||`Expected a \`${A.name}\` instance, but received: ${(0,t.print)(B)}`)}Y.instance=r;function i(){return(0,n.define)("integer",A=>typeof A=="number"&&!isNaN(A)&&Number.isInteger(A)||`Expected an integer, but received: ${(0,t.print)(A)}`)}Y.integer=i;function l(A){return new e.Struct({type:"intersection",schema:null,*entries(B,x){for(const{entries:V}of A)yield*V(B,x)},*validator(B,x){for(const{validator:V}of A)yield*V(B,x)},*refiner(B,x){for(const{refiner:V}of A)yield*V(B,x)}})}Y.intersection=l;function h(A){const B=(0,t.print)(A),x=typeof A;return new e.Struct({type:"literal",schema:x==="string"||x==="number"||x==="boolean"?A:null,validator(V){return V===A||`Expected the literal \`${B}\`, but received: ${(0,t.print)(V)}`}})}Y.literal=h;function b(A,B){return new e.Struct({type:"map",schema:null,*entries(x){if(A&&B&&x instanceof Map)for(const[V,M]of x.entries())yield[V,V,A],yield[V,M,B]},coercer(x){return x instanceof Map?new Map(x):x},validator(x){return x instanceof Map||`Expected a \`Map\` object, but received: ${(0,t.print)(x)}`}})}Y.map=b;function v(){return(0,n.define)("never",()=>!1)}Y.never=v;function N(A){return new e.Struct({...A,validator:(B,x)=>B===null||A.validator(B,x),refiner:(B,x)=>B===null||A.refiner(B,x)})}Y.nullable=N;function L(){return(0,n.define)("number",A=>typeof A=="number"&&!isNaN(A)||`Expected a number, but received: ${(0,t.print)(A)}`)}Y.number=L;function z(A){const B=A?Object.keys(A):[],x=v();return new e.Struct({type:"object",schema:A??null,*entries(V){if(A&&(0,t.isObject)(V)){const M=new Set(Object.keys(V));for(const k of B){M.delete(k);const y=A[k];e.ExactOptionalStruct.isExactOptional(y)&&!Object.prototype.hasOwnProperty.call(V,k)||(yield[k,V[k],A[k]])}for(const k of M)yield[k,V[k],x]}},validator(V){return(0,t.isObject)(V)||`Expected an object, but received: ${(0,t.print)(V)}`},coercer(V){return(0,t.isObject)(V)?{...V}:V}})}Y.object=z;function K(A){return new e.Struct({...A,validator:(B,x)=>B===void 0||A.validator(B,x),refiner:(B,x)=>B===void 0||A.refiner(B,x)})}Y.optional=K;function $(A){return new e.ExactOptionalStruct(A)}Y.exactOptional=$;function S(A,B){return new e.Struct({type:"record",schema:null,*entries(x){if((0,t.isObject)(x))for(const V in x){const M=x[V];yield[V,V,A],yield[V,M,B]}},validator(x){return(0,t.isObject)(x)||`Expected an object, but received: ${(0,t.print)(x)}`}})}Y.record=S;function j(){return(0,n.define)("regexp",A=>A instanceof RegExp)}Y.regexp=j;function H(A){return new e.Struct({type:"set",schema:null,*entries(B){if(A&&B instanceof Set)for(const x of B)yield[x,x,A]},coercer(B){return B instanceof Set?new Set(B):B},validator(B){return B instanceof Set||`Expected a \`Set\` object, but received: ${(0,t.print)(B)}`}})}Y.set=H;function P(){return(0,n.define)("string",A=>typeof A=="string"||`Expected a string, but received: ${(0,t.print)(A)}`)}Y.string=P;function O(A){const B=v();return new e.Struct({type:"tuple",schema:null,*entries(x){if(Array.isArray(x)){const V=Math.max(A.length,x.length);for(let M=0;M<V;M++)yield[M,x[M],A[M]||B]}},validator(x){return Array.isArray(x)||`Expected an array, but received: ${(0,t.print)(x)}`}})}Y.tuple=O;function p(A){const B=Object.keys(A);return new e.Struct({type:"type",schema:A,*entries(x){if((0,t.isObject)(x))for(const V of B)yield[V,x[V],A[V]]},validator(x){return(0,t.isObject)(x)||`Expected an object, but received: ${(0,t.print)(x)}`},coercer(x){return(0,t.isObject)(x)?{...x}:x}})}Y.type=p;function R(A){const B=A.map(x=>x.type).join(" | ");return new e.Struct({type:"union",schema:null,coercer(x){for(const V of A){const[M,k]=V.validate(x,{coerce:!0});if(!M)return k}return x},validator(x,V){const M=[];for(const k of A){const[...y]=(0,t.run)(x,k,V),[g]=y;if(!(g!=null&&g[0]))return[];for(const[I]of y)I&&M.push(I)}return[`Expected the value to satisfy a union of \`${B}\`, but received: ${(0,t.print)(x)}`,...M]}})}Y.union=R;function G(){return(0,n.define)("unknown",()=>!0)}return Y.unknown=G,Y}var is;function Sa(){if(is)return Le;is=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.trimmed=Le.defaulted=Le.coerce=void 0;const e=Et(),t=Bt(),n=Pn();function s(c,a,o){return new e.Struct({...c,coercer:(f,r)=>(0,e.is)(f,a)?c.coercer(o(f,r),r):c.coercer(f,r)})}Le.coerce=s;function d(c,a,o={}){return s(c,(0,n.unknown)(),f=>{const r=typeof a=="function"?a():a;if(f===void 0)return r;if(!o.strict&&(0,t.isPlainObject)(f)&&(0,t.isPlainObject)(r)){const i={...f};let l=!1;for(const h in r)i[h]===void 0&&(i[h]=r[h],l=!0);if(l)return i}return f})}Le.defaulted=d;function u(c){return s(c,(0,n.string)(),a=>a.trim())}return Le.trimmed=u,Le}var pe={},os;function va(){if(os)return pe;os=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.refine=pe.size=pe.pattern=pe.nonempty=pe.min=pe.max=pe.empty=void 0;const e=Et(),t=Bt();function n(r){return f(r,"empty",i=>{const l=s(i);return l===0||`Expected an empty ${r.type} but received one with a size of \`${l}\``})}pe.empty=n;function s(r){return r instanceof Map||r instanceof Set?r.size:r.length}function d(r,i,l={}){const{exclusive:h}=l;return f(r,"max",b=>h?b<i:b<=i||`Expected a ${r.type} less than ${h?"":"or equal to "}${i} but received \`${b}\``)}pe.max=d;function u(r,i,l={}){const{exclusive:h}=l;return f(r,"min",b=>h?b>i:b>=i||`Expected a ${r.type} greater than ${h?"":"or equal to "}${i} but received \`${b}\``)}pe.min=u;function c(r){return f(r,"nonempty",i=>s(i)>0||`Expected a nonempty ${r.type} but received an empty one`)}pe.nonempty=c;function a(r,i){return f(r,"pattern",l=>i.test(l)||`Expected a ${r.type} matching \`/${i.source}/\` but received "${l}"`)}pe.pattern=a;function o(r,i,l=i){const h=`Expected a ${r.type}`,b=i===l?`of \`${i}\``:`between \`${i}\` and \`${l}\``;return f(r,"size",v=>{if(typeof v=="number"||v instanceof Date)return i<=v&&v<=l||`${h} ${b} but received \`${v}\``;if(v instanceof Map||v instanceof Set){const{size:L}=v;return i<=L&&L<=l||`${h} with a size ${b} but received one with a size of \`${L}\``}const{length:N}=v;return i<=N&&N<=l||`${h} with a length ${b} but received one with a length of \`${N}\``})}pe.size=o;function f(r,i,l){return new e.Struct({...r,*refiner(h,b){yield*r.refiner(h,b);const v=l(h,b),N=(0,t.toFailures)(v,b,r,h);for(const L of N)yield{...L,refinement:i}}})}return pe.refine=f,pe}var as;function Oe(){return as||(as=1,(function(e){var t=ze&&ze.__createBinding||(Object.create?(function(s,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(s,c,a)}):(function(s,d,u,c){c===void 0&&(c=u),s[c]=d[u]})),n=ze&&ze.__exportStar||function(s,d){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(xo(),e),n(Et(),e),n(Sa(),e),n(va(),e),n(Pn(),e),n(Po(),e)})(ze)),ze}var we={};class On extends Error{constructor(t,{cause:n}={}){super(t),this.name=On.name,n&&(this.cause=n),this.message=t}}const Ra=Object.freeze(Object.defineProperty({__proto__:null,ErrorWithCause:On},Symbol.toStringTag,{value:"Module"})),_a=vo(Ra),$a=(e,t)=>{if(!e||!t||!(e instanceof Error)||!(t.prototype instanceof Error)&&t!==Error)return;const n=new Set;let s=e;for(;s&&!n.has(s);){if(n.add(s),s instanceof t)return s;s=Lt(s)}},Lt=e=>{if(!(!e||typeof e!="object"||!("cause"in e)))if(typeof e.cause=="function"){const t=e.cause();return t instanceof Error?t:void 0}else return e.cause instanceof Error?e.cause:void 0},Oo=(e,t)=>{if(!(e instanceof Error))return"";const n=e.stack||"";if(t.has(e))return n+`
|
|
2
|
-
causes have become circular...`;const s=
|
|
3
|
-
caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Error))return"";const s=n?"":e.message||"";if(t.has(e))return s+": ...";const d=Lt(e);if(d){t.add(e);const u="cause"in e&&typeof e.cause=="function";return s+(u?"":": ")+ko(d,t,u)}else return s},Aa=e=>ko(e,new Set),Ta=Object.freeze(Object.defineProperty({__proto__:null,findCauseByReference:$a,getErrorCause:Lt,messageWithCauses:Aa,stackWithCauses:Ia},Symbol.toStringTag,{value:"Module"})),ja=vo(Ta);var Wt,cs;function Ca(){if(cs)return Wt;cs=1;const{ErrorWithCause:e}=_a,{findCauseByReference:t,getErrorCause:n,messageWithCauses:s,stackWithCauses:d}=ja;return Wt={ErrorWithCause:e,findCauseByReference:t,getErrorCause:n,stackWithCauses:d,messageWithCauses:s},Wt}var Kt={},us;function kn(){return us||(us=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(r){return Array.isArray(r)&&r.length>0}e.isNonEmptyArray=t;function n(r){return r==null}e.isNullOrUndefined=n;function s(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}e.isObject=s;const d=(r,i)=>Object.hasOwnProperty.call(r,i);e.hasProperty=d;function u(r){return Object.getOwnPropertyNames(r)}e.getKnownPropertyNames=u,(function(r){r[r.Null=4]="Null",r[r.Comma=1]="Comma",r[r.Wrapper=1]="Wrapper",r[r.True=4]="True",r[r.False=5]="False",r[r.Quote=1]="Quote",r[r.Colon=1]="Colon",r[r.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function c(r){if(typeof r!="object"||r===null)return!1;try{let i=r;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(r)===i}catch{return!1}}e.isPlainObject=c;function a(r){return r.charCodeAt(0)<=127}e.isASCII=a;function o(r){return r.split("").reduce((l,h)=>a(h)?l+1:l+2,0)+(r.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length}e.calculateStringSize=o;function f(r){return r.toString().length}e.calculateNumberSize=f})(Kt)),Kt}var ls;function Bo(){if(ls)return we;ls=1,Object.defineProperty(we,"__esModule",{value:!0}),we.wrapError=we.getErrorMessage=we.isErrorWithStack=we.isErrorWithMessage=we.isErrorWithCode=void 0;const e=Ca(),t=kn();function n(o){return o instanceof Error||(0,t.isObject)(o)&&o.constructor.name==="Error"}function s(o){return typeof o=="object"&&o!==null&&"code"in o}we.isErrorWithCode=s;function d(o){return typeof o=="object"&&o!==null&&"message"in o}we.isErrorWithMessage=d;function u(o){return typeof o=="object"&&o!==null&&"stack"in o}we.isErrorWithStack=u;function c(o){return d(o)&&typeof o.message=="string"?o.message:(0,t.isNullOrUndefined)(o)?"":String(o)}we.getErrorMessage=c;function a(o,f){if(n(o)){let r;return Error.length===2?r=new Error(f,{cause:o}):r=new e.ErrorWithCause(f,{cause:o}),s(o)&&(r.code=o.code),r}return f.length>0?new Error(`${String(o)}: ${f}`):new Error(String(o))}return we.wrapError=a,we}var ds;function De(){if(ds)return Re;ds=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.assertExhaustive=Re.assertStruct=Re.assert=Re.AssertionError=void 0;const e=Oe(),t=Bo();function n(f){var r,i;return typeof((i=(r=f==null?void 0:f.prototype)==null?void 0:r.constructor)==null?void 0:i.name)=="string"}function s(f){return(0,t.getErrorMessage)(f).replace(/\.$/u,"")}function d(f,r){return n(f)?new f({message:r}):f({message:r})}class u extends Error{constructor(r){super(r.message),this.code="ERR_ASSERTION"}}Re.AssertionError=u;function c(f,r="Assertion failed.",i=u){if(!f)throw r instanceof Error?r:d(i,r)}Re.assert=c;function a(f,r,i="Assertion failed",l=u){try{(0,e.assert)(f,r)}catch(h){throw d(l,`${i}: ${s(h)}.`)}}Re.assertStruct=a;function o(f){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Re.assertExhaustive=o,Re}var rt={},fs;function Lo(){if(fs)return rt;fs=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.base64=void 0;const e=Oe(),t=De(),n=(s,d={})=>{const u=d.paddingRequired??!1,c=d.characterSet??"base64";let a;c==="base64"?a=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(c==="base64url"),a=String.raw`[-_A-Za-z0-9]`);let o;return u?o=new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):o=new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,e.pattern)(s,o)};return rt.base64=n,rt}var ee={},Yt={},hs;function xa(){return hs||(hs=1,(function(e){/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.createBase58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64urlnopad=e.base64url=e.base64nopad=e.base64=e.base32crockford=e.base32hexnopad=e.base32hex=e.base32nopad=e.base32=e.base16=e.utils=void 0;function t(m){return m instanceof Uint8Array||ArrayBuffer.isView(m)&&m.constructor.name==="Uint8Array"}function n(m,...E){if(!t(m))throw new Error("Uint8Array expected");if(E.length>0&&!E.includes(m.length))throw new Error("Uint8Array expected of length "+E+", got length="+m.length)}function s(m,E){return Array.isArray(E)?E.length===0?!0:m?E.every(_=>typeof _=="string"):E.every(_=>Number.isSafeInteger(_)):!1}function d(m){if(typeof m!="function")throw new Error("function expected");return!0}function u(m,E){if(typeof E!="string")throw new Error(`${m}: string expected`);return!0}function c(m){if(!Number.isSafeInteger(m))throw new Error(`invalid integer: ${m}`)}function a(m){if(!Array.isArray(m))throw new Error("array expected")}function o(m,E){if(!s(!0,E))throw new Error(`${m}: array of strings expected`)}function f(m,E){if(!s(!1,E))throw new Error(`${m}: array of numbers expected`)}function r(...m){const E=X=>X,_=(X,re)=>Q=>X(re(Q)),J=m.map(X=>X.encode).reduceRight(_,E),U=m.map(X=>X.decode).reduce(_,E);return{encode:J,decode:U}}function i(m){const E=typeof m=="string"?m.split(""):m,_=E.length;o("alphabet",E);const J=new Map(E.map((U,X)=>[U,X]));return{encode:U=>(a(U),U.map(X=>{if(!Number.isSafeInteger(X)||X<0||X>=_)throw new Error(`alphabet.encode: digit index outside alphabet "${X}". Allowed: ${m}`);return E[X]})),decode:U=>(a(U),U.map(X=>{u("alphabet.decode",X);const re=J.get(X);if(re===void 0)throw new Error(`Unknown letter: "${X}". Allowed: ${m}`);return re}))}}function l(m=""){return u("join",m),{encode:E=>(o("join.decode",E),E.join(m)),decode:E=>(u("join.decode",E),E.split(m))}}function h(m,E="="){return c(m),u("padding",E),{encode(_){for(o("padding.encode",_);_.length*m%8;)_.push(E);return _},decode(_){o("padding.decode",_);let J=_.length;if(J*m%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;J>0&&_[J-1]===E;J--)if((J-1)*m%8===0)throw new Error("padding: invalid, string has too much padding");return _.slice(0,J)}}}function b(m){return d(m),{encode:E=>E,decode:E=>m(E)}}function v(m,E,_){if(E<2)throw new Error(`convertRadix: invalid from=${E}, base cannot be less than 2`);if(_<2)throw new Error(`convertRadix: invalid to=${_}, base cannot be less than 2`);if(a(m),!m.length)return[];let J=0;const U=[],X=Array.from(m,Q=>{if(c(Q),Q<0||Q>=E)throw new Error(`invalid integer: ${Q}`);return Q}),re=X.length;for(;;){let Q=0,ae=!0;for(let ce=J;ce<re;ce++){const Be=X[ce],ie=E*Q,se=ie+Be;if(!Number.isSafeInteger(se)||ie/E!==Q||se-Be!==ie)throw new Error("convertRadix: carry overflow");const me=se/_;Q=se%_;const de=Math.floor(me);if(X[ce]=de,!Number.isSafeInteger(de)||de*_+Q!==se)throw new Error("convertRadix: carry overflow");if(ae)de?ae=!1:J=ce;else continue}if(U.push(Q),ae)break}for(let Q=0;Q<m.length-1&&m[Q]===0;Q++)U.push(0);return U.reverse()}const N=(m,E)=>E===0?m:N(E,m%E),L=(m,E)=>m+(E-N(m,E)),z=(()=>{let m=[];for(let E=0;E<40;E++)m.push(2**E);return m})();function K(m,E,_,J){if(a(m),E<=0||E>32)throw new Error(`convertRadix2: wrong from=${E}`);if(_<=0||_>32)throw new Error(`convertRadix2: wrong to=${_}`);if(L(E,_)>32)throw new Error(`convertRadix2: carry overflow from=${E} to=${_} carryBits=${L(E,_)}`);let U=0,X=0;const re=z[E],Q=z[_]-1,ae=[];for(const ce of m){if(c(ce),ce>=re)throw new Error(`convertRadix2: invalid data word=${ce} from=${E}`);if(U=U<<E|ce,X+E>32)throw new Error(`convertRadix2: carry overflow pos=${X} from=${E}`);for(X+=E;X>=_;X-=_)ae.push((U>>X-_&Q)>>>0);const Be=z[X];if(Be===void 0)throw new Error("invalid carry");U&=Be-1}if(U=U<<_-X&Q,!J&&X>=E)throw new Error("Excess padding");if(!J&&U>0)throw new Error(`Non-zero padding: ${U}`);return J&&X>0&&ae.push(U>>>0),ae}function $(m){c(m);const E=2**8;return{encode:_=>{if(!t(_))throw new Error("radix.encode input should be Uint8Array");return v(Array.from(_),E,m)},decode:_=>(f("radix.decode",_),Uint8Array.from(v(_,m,E)))}}function S(m,E=!1){if(c(m),m<=0||m>32)throw new Error("radix2: bits should be in (0..32]");if(L(8,m)>32||L(m,8)>32)throw new Error("radix2: carry overflow");return{encode:_=>{if(!t(_))throw new Error("radix2.encode input should be Uint8Array");return K(Array.from(_),8,m,!E)},decode:_=>(f("radix2.decode",_),Uint8Array.from(K(_,m,8,E)))}}function j(m){return d(m),function(...E){try{return m.apply(null,E)}catch{}}}function H(m,E){return c(m),d(E),{encode(_){if(!t(_))throw new Error("checksum.encode: input should be Uint8Array");const J=E(_).slice(0,m),U=new Uint8Array(_.length+m);return U.set(_),U.set(J,_.length),U},decode(_){if(!t(_))throw new Error("checksum.decode: input should be Uint8Array");const J=_.slice(0,-m),U=_.slice(-m),X=E(J).slice(0,m);for(let re=0;re<m;re++)if(X[re]!==U[re])throw new Error("Invalid checksum");return J}}}e.utils={alphabet:i,chain:r,checksum:H,convertRadix:v,convertRadix2:K,radix:$,radix2:S,join:l,padding:h},e.base16=r(S(4),i("0123456789ABCDEF"),l("")),e.base32=r(S(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),h(5),l("")),e.base32nopad=r(S(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),l("")),e.base32hex=r(S(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),h(5),l("")),e.base32hexnopad=r(S(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),l("")),e.base32crockford=r(S(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),l(""),b(m=>m.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const P=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",O=(m,E)=>{u("base64",m);const _=E?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,J=E?"base64url":"base64";if(m.length>0&&!_.test(m))throw new Error("invalid base64");return Uint8Array.fromBase64(m,{alphabet:J,lastChunkHandling:"strict"})};e.base64=P?{encode(m){return n(m),m.toBase64()},decode(m){return O(m,!1)}}:r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),h(6),l("")),e.base64nopad=r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),l("")),e.base64url=P?{encode(m){return n(m),m.toBase64({alphabet:"base64url"})},decode(m){return O(m,!0)}}:r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),h(6),l("")),e.base64urlnopad=r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),l(""));const p=m=>r($(58),i(m),l(""));e.base58=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base58flickr=p("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),e.base58xrp=p("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const R=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(m){let E="";for(let _=0;_<m.length;_+=8){const J=m.subarray(_,_+8);E+=e.base58.encode(J).padStart(R[J.length],"1")}return E},decode(m){let E=[];for(let _=0;_<m.length;_+=11){const J=m.slice(_,_+11),U=R.indexOf(J.length),X=e.base58.decode(J);for(let re=0;re<X.length-U;re++)if(X[re]!==0)throw new Error("base58xmr: wrong padding");E=E.concat(Array.from(X.slice(X.length-U)))}return Uint8Array.from(E)}};const G=m=>r(H(4,E=>m(m(E))),e.base58);e.createBase58check=G,e.base58check=e.createBase58check;const A=r(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),l("")),B=[996825010,642813549,513874426,1027748829,705979059];function x(m){const E=m>>25;let _=(m&33554431)<<5;for(let J=0;J<B.length;J++)(E>>J&1)===1&&(_^=B[J]);return _}function V(m,E,_=1){const J=m.length;let U=1;for(let X=0;X<J;X++){const re=m.charCodeAt(X);if(re<33||re>126)throw new Error(`Invalid prefix (${m})`);U=x(U)^re>>5}U=x(U);for(let X=0;X<J;X++)U=x(U)^m.charCodeAt(X)&31;for(let X of E)U=x(U)^X;for(let X=0;X<6;X++)U=x(U);return U^=_,A.encode(K([U%z[30]],30,5,!1))}function M(m){const E=m==="bech32"?1:734539939,_=S(5),J=_.decode,U=_.encode,X=j(J);function re(ie,se,me=90){u("bech32.encode prefix",ie),t(se)&&(se=Array.from(se)),f("bech32.encode",se);const de=ie.length;if(de===0)throw new TypeError(`Invalid prefix length ${de}`);const F=de+7+se.length;if(me!==!1&&F>me)throw new TypeError(`Length ${F} exceeds limit ${me}`);const le=ie.toLowerCase(),Ee=V(le,se,E);return`${le}1${A.encode(se)}${Ee}`}function Q(ie,se=90){u("bech32.decode input",ie);const me=ie.length;if(me<8||se!==!1&&me>se)throw new TypeError(`invalid string length: ${me} (${ie}). Expected (8..${se})`);const de=ie.toLowerCase();if(ie!==de&&ie!==ie.toUpperCase())throw new Error("String must be lowercase or uppercase");const F=de.lastIndexOf("1");if(F===0||F===-1)throw new Error('Letter "1" must be present between prefix and data only');const le=de.slice(0,F),Ee=de.slice(F+1);if(Ee.length<6)throw new Error("Data must be at least 6 characters long");const Ye=A.decode(Ee).slice(0,-6),ve=V(le,Ye,E);if(!Ee.endsWith(ve))throw new Error(`Invalid checksum in ${ie}: expected "${ve}"`);return{prefix:le,words:Ye}}const ae=j(Q);function ce(ie){const{prefix:se,words:me}=Q(ie,!1);return{prefix:se,words:me,bytes:J(me)}}function Be(ie,se){return re(ie,U(se))}return{encode:re,decode:Q,encodeFromBytes:Be,decodeToBytes:ce,decodeUnsafe:ae,fromWords:J,fromWordsUnsafe:X,toWords:U}}e.bech32=M("bech32"),e.bech32m=M("bech32m"),e.utf8={encode:m=>new TextDecoder().decode(m),decode:m=>new TextEncoder().encode(m)};const k=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",y={encode(m){return n(m),m.toHex()},decode(m){return u("hex",m),Uint8Array.fromHex(m)}};e.hex=k?y:r(S(4),i("0123456789abcdef"),l(""),b(m=>{if(typeof m!="string"||m.length%2!==0)throw new TypeError(`hex.decode: expected string, got ${typeof m} with length ${m.length}`);return m.toLowerCase()}));const g={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},I="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr",C=(m,E)=>{if(typeof m!="string"||!g.hasOwnProperty(m))throw new TypeError(I);if(!t(E))throw new TypeError("bytesToString() expects Uint8Array");return g[m].encode(E)};e.bytesToString=C,e.str=e.bytesToString;const q=(m,E)=>{if(!g.hasOwnProperty(m))throw new TypeError(I);if(typeof E!="string")throw new TypeError("stringToBytes() expects string");return g[m].decode(E)};e.stringToBytes=q,e.bytes=e.stringToBytes})(Yt)),Yt}var Zt={},ps;function Nt(){return ps||(ps=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const t=Oe(),n=pa(),s=De(),d=Bn();e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-fA-F]{40}$/u);function u(b){return(0,t.is)(b,e.HexStruct)}e.isHexString=u;function c(b){return(0,t.is)(b,e.StrictHexStruct)}e.isStrictHexString=c;function a(b){(0,s.assert)(u(b),"Value must be a hexadecimal string.")}e.assertIsHexString=a;function o(b){(0,s.assert)(c(b),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function f(b){return(0,t.is)(b,e.HexAddressStruct)||i(b)}e.isValidHexAddress=f;function r(b){(0,s.assert)((0,t.is)(b,e.HexChecksumAddressStruct),"Invalid hex address.");const v=h(b.toLowerCase()),N=h((0,d.bytesToHex)((0,n.keccak_256)(v)));return`0x${v.split("").map((L,z)=>{const K=N[z];return(0,s.assert)((0,t.is)(K,(0,t.string)()),"Hash shorter than address."),parseInt(K,16)>7?L.toUpperCase():L}).join("")}`}e.getChecksumAddress=r;function i(b){return(0,t.is)(b,e.HexChecksumAddressStruct)?r(b)===b:!1}e.isValidChecksumAddress=i;function l(b){return b.startsWith("0x")?b:b.startsWith("0X")?`0x${b.substring(2)}`:`0x${b}`}e.add0x=l;function h(b){return b.startsWith("0x")||b.startsWith("0X")?b.substring(2):b}e.remove0x=h})(Zt)),Zt}var gs;function Bn(){if(gs)return ee;gs=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.createDataView=ee.concatBytes=ee.valueToBytes=ee.base64ToBytes=ee.stringToBytes=ee.numberToBytes=ee.signedBigIntToBytes=ee.bigIntToBytes=ee.hexToBytes=ee.bytesToBase64=ee.bytesToString=ee.bytesToNumber=ee.bytesToSignedBigInt=ee.bytesToBigInt=ee.bytesToHex=ee.assertIsBytes=ee.isBytes=void 0;const e=xa(),t=De(),n=Nt(),s=48,d=58,u=87;function c(){const p=[];return()=>{if(p.length===0)for(let R=0;R<256;R++)p.push(R.toString(16).padStart(2,"0"));return p}}const a=c();function o(p){return p instanceof Uint8Array}ee.isBytes=o;function f(p){(0,t.assert)(o(p),"Value must be a Uint8Array.")}ee.assertIsBytes=f;function r(p){if(f(p),p.length===0)return"0x";const R=a(),G=new Array(p.length);for(let A=0;A<p.length;A++)G[A]=R[p[A]];return(0,n.add0x)(G.join(""))}ee.bytesToHex=r;function i(p){f(p);const R=r(p);return BigInt(R)}ee.bytesToBigInt=i;function l(p){f(p);let R=BigInt(0);for(const G of p)R=(R<<BigInt(8))+BigInt(G);return BigInt.asIntN(p.length*8,R)}ee.bytesToSignedBigInt=l;function h(p){f(p);const R=i(p);return(0,t.assert)(R<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(R)}ee.bytesToNumber=h;function b(p){return f(p),new TextDecoder().decode(p)}ee.bytesToString=b;function v(p){return f(p),e.base64.encode(p)}ee.bytesToBase64=v;function N(p){var B;if(((B=p==null?void 0:p.toLowerCase)==null?void 0:B.call(p))==="0x")return new Uint8Array;(0,n.assertIsHexString)(p);const R=(0,n.remove0x)(p).toLowerCase(),G=R.length%2===0?R:`0${R}`,A=new Uint8Array(G.length/2);for(let x=0;x<A.length;x++){const V=G.charCodeAt(x*2),M=G.charCodeAt(x*2+1),k=V-(V<d?s:u),y=M-(M<d?s:u);A[x]=k*16+y}return A}ee.hexToBytes=N;function L(p){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(p>=BigInt(0),"Value must be a non-negative bigint.");const R=p.toString(16);return N(R)}ee.bigIntToBytes=L;function z(p,R){(0,t.assert)(R>0);const G=p>>BigInt(31);return!((~p&G)+(p&~G)>>BigInt(R*8+-1))}function K(p,R){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(typeof R=="number","Byte length must be a number."),(0,t.assert)(R>0,"Byte length must be greater than 0."),(0,t.assert)(z(p,R),"Byte length is too small to represent the given value.");let G=p;const A=new Uint8Array(R);for(let B=0;B<A.length;B++)A[B]=Number(BigInt.asUintN(8,G)),G>>=BigInt(8);return A.reverse()}ee.signedBigIntToBytes=K;function $(p){(0,t.assert)(typeof p=="number","Value must be a number."),(0,t.assert)(p>=0,"Value must be a non-negative number."),(0,t.assert)(Number.isSafeInteger(p),"Value is not a safe integer. Use `bigIntToBytes` instead.");const R=p.toString(16);return N(R)}ee.numberToBytes=$;function S(p){return(0,t.assert)(typeof p=="string","Value must be a string."),new TextEncoder().encode(p)}ee.stringToBytes=S;function j(p){return(0,t.assert)(typeof p=="string","Value must be a string."),e.base64.decode(p)}ee.base64ToBytes=j;function H(p){if(typeof p=="bigint")return L(p);if(typeof p=="number")return $(p);if(typeof p=="string")return p.startsWith("0x")?N(p):S(p);if(o(p))return p;throw new TypeError(`Unsupported value type: "${typeof p}".`)}ee.valueToBytes=H;function P(p){const R=new Array(p.length);let G=0;for(let B=0;B<p.length;B++){const x=H(p[B]);R[B]=x,G+=x.length}const A=new Uint8Array(G);for(let B=0,x=0;B<R.length;B++)A.set(R[B],x),x+=R[B].length;return A}ee.concatBytes=P;function O(p){if(typeof Zn<"u"&&p instanceof Zn){const R=p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength);return new DataView(R)}return new DataView(p.buffer,p.byteOffset,p.byteLength)}return ee.createDataView=O,ee}var Qt={},ms;function Pa(){return ms||(ms=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAssetId=e.isCaipAssetType=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAssetIdStruct=e.CaipAssetTypeStruct=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ASSET_ID_REGEX=e.CAIP_ASSET_TYPE_REGEX=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const t=Oe();e.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CAIP_ASSET_TYPE_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ASSET_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,e.CaipChainIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),e.CaipAssetTypeStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_TYPE_REGEX),e.CaipAssetIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_ID_REGEX),(function(l){l.Bip122="bip122",l.Eip155="eip155",l.Wallet="wallet"})(e.KnownCaipNamespace||(e.KnownCaipNamespace={}));function n(l){return(0,t.is)(l,e.CaipChainIdStruct)}e.isCaipChainId=n;function s(l){return(0,t.is)(l,e.CaipNamespaceStruct)}e.isCaipNamespace=s;function d(l){return(0,t.is)(l,e.CaipReferenceStruct)}e.isCaipReference=d;function u(l){return(0,t.is)(l,e.CaipAccountIdStruct)}e.isCaipAccountId=u;function c(l){return(0,t.is)(l,e.CaipAccountAddressStruct)}e.isCaipAccountAddress=c;function a(l){return(0,t.is)(l,e.CaipAssetTypeStruct)}e.isCaipAssetType=a;function o(l){return(0,t.is)(l,e.CaipAssetIdStruct)}e.isCaipAssetId=o;function f(l){const h=e.CAIP_CHAIN_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP chain ID.");return{namespace:h.groups.namespace,reference:h.groups.reference}}e.parseCaipChainId=f;function r(l){const h=e.CAIP_ACCOUNT_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP account ID.");return{address:h.groups.accountAddress,chainId:h.groups.chainId,chain:{namespace:h.groups.namespace,reference:h.groups.reference}}}e.parseCaipAccountId=r;function i(l,h){if(!s(l))throw new Error(`Invalid "namespace", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!d(h))throw new Error(`Invalid "reference", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${l}:${h}`}e.toCaipChainId=i})(Qt)),Qt}var nt={},ys;function Oa(){if(ys)return nt;ys=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.ChecksumStruct=void 0;const e=Oe(),t=Lo();return nt.ChecksumStruct=(0,e.size)((0,t.base64)((0,e.string)(),{paddingRequired:!0}),44,44),nt}var _e={},bs;function ka(){if(bs)return _e;bs=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.createHex=_e.createBytes=_e.createBigInt=_e.createNumber=void 0;const e=Oe(),t=De(),n=Bn(),s=Nt(),d=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),s.StrictHexStruct]),u=(0,e.coerce)((0,e.number)(),d,Number),c=(0,e.coerce)((0,e.bigint)(),d,BigInt);(0,e.union)([s.StrictHexStruct,(0,e.instance)(Uint8Array)]);const a=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([s.StrictHexStruct]),n.hexToBytes),o=(0,e.coerce)(s.StrictHexStruct,(0,e.instance)(Uint8Array),n.bytesToHex);function f(h){try{const b=(0,e.create)(h,u);return(0,t.assert)(Number.isFinite(b),`Expected a number-like value, got "${h}".`),b}catch(b){throw b instanceof e.StructError?new Error(`Expected a number-like value, got "${h}".`):b}}_e.createNumber=f;function r(h){try{return(0,e.create)(h,c)}catch(b){throw b instanceof e.StructError?new Error(`Expected a number-like value, got "${String(b.value)}".`):b}}_e.createBigInt=r;function i(h){if(typeof h=="string"&&h.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(h,a)}catch(b){throw b instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(b.value)}".`):b}}_e.createBytes=i;function l(h){if(h instanceof Uint8Array&&h.length===0||typeof h=="string"&&h.toLowerCase()==="0x")return"0x";try{return(0,e.create)(h,o)}catch(b){throw b instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(b.value)}".`):b}}return _e.createHex=l,_e}var $e={},Es;function Ba(){if(Es)return $e;Es=1;var e=$e&&$e.__classPrivateFieldGet||function(c,a,o,f){if(o==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof a=="function"?c!==a||!f:!a.has(c))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?f:o==="a"?f.call(c):f?f.value:a.get(c)},t=$e&&$e.__classPrivateFieldSet||function(c,a,o,f,r){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof a=="function"?c!==a||!r:!a.has(c))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?r.call(c,o):r?r.value=o:a.set(c,o),o},n,s;Object.defineProperty($e,"__esModule",{value:!0}),$e.FrozenSet=$e.FrozenMap=void 0;class d{get size(){return e(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return e(this,n,"f")[Symbol.iterator]()}constructor(a){n.set(this,void 0),t(this,n,new Map(a),"f"),Object.freeze(this)}entries(){return e(this,n,"f").entries()}forEach(a,o){return e(this,n,"f").forEach((f,r,i)=>a.call(o,f,r,this))}get(a){return e(this,n,"f").get(a)}has(a){return e(this,n,"f").has(a)}keys(){return e(this,n,"f").keys()}values(){return e(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([a,o])=>`${String(a)} => ${String(o)}`).join(", ")} `:""}}`}}$e.FrozenMap=d;class u{get size(){return e(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return e(this,s,"f")[Symbol.iterator]()}constructor(a){s.set(this,void 0),t(this,s,new Set(a),"f"),Object.freeze(this)}entries(){return e(this,s,"f").entries()}forEach(a,o){return e(this,s,"f").forEach((f,r,i)=>a.call(o,f,r,this))}has(a){return e(this,s,"f").has(a)}keys(){return e(this,s,"f").keys()}values(){return e(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(a=>String(a)).join(", ")} `:""}}`}}return $e.FrozenSet=u,Object.freeze(d),Object.freeze(d.prototype),Object.freeze(u),Object.freeze(u.prototype),$e}var er={},ws;function La(){return ws||(ws=1,Object.defineProperty(er,"__esModule",{value:!0})),er}var tr={},Ss;function Na(){return Ss||(Ss=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const t=Oe(),n=De(),s=kn(),d=p=>(0,t.object)(p);e.object=d;function u({path:p,branch:R}){const G=p[p.length-1];return(0,s.hasProperty)(R[R.length-2],G)}function c(p){return new t.Struct({...p,type:`optional ${p.type}`,validator:(R,G)=>!u(G)||p.validator(R,G),refiner:(R,G)=>!u(G)||p.refiner(R,G)})}e.exactOptional=c;const a=()=>(0,t.define)("finite number",p=>(0,t.is)(p,(0,t.number)())&&Number.isFinite(p));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),a(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.coerce)(e.UnsafeJsonStruct,(0,t.any)(),p=>((0,n.assertStruct)(p,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(p,(R,G)=>{if(!(R==="__proto__"||R==="constructor"))return G}))));function o(p){try{return f(p),!0}catch{return!1}}e.isValidJson=o;function f(p){return(0,t.create)(p,e.JsonStruct)}e.getSafeJson=f;function r(p){(0,n.assertStruct)(p,e.JsonStruct,"Invalid JSON value");const R=JSON.stringify(p);return new TextEncoder().encode(R).byteLength}e.getJsonSize=r,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,t.integer)(),message:(0,t.string)(),data:c(e.JsonStruct),stack:c((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:c(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:c(e.JsonRpcParamsStruct)});function i(p){return(0,t.is)(p,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=i;function l(p,R){(0,n.assertStruct)(p,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",R)}e.assertIsJsonRpcNotification=l;function h(p){return(0,t.is)(p,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=h;function b(p,R){(0,n.assertStruct)(p,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",R)}e.assertIsJsonRpcRequest=b,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function v(p){return(0,t.is)(p,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=v;function N(p,R){(0,n.assertStruct)(p,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",R)}e.assertIsPendingJsonRpcResponse=N;function L(p){return(0,t.is)(p,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=L;function z(p,R){(0,n.assertStruct)(p,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",R)}e.assertIsJsonRpcResponse=z;function K(p){return(0,t.is)(p,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=K;function $(p,R){(0,n.assertStruct)(p,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",R)}e.assertIsJsonRpcSuccess=$;function S(p){return(0,t.is)(p,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=S;function j(p,R){(0,n.assertStruct)(p,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",R)}e.assertIsJsonRpcFailure=j;function H(p){return(0,t.is)(p,e.JsonRpcErrorStruct)}e.isJsonRpcError=H;function P(p,R){(0,n.assertStruct)(p,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",R)}e.assertIsJsonRpcError=P;function O(p){const{permitEmptyString:R,permitFractions:G,permitNull:A}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...p};return x=>!!(typeof x=="number"&&(G||Number.isInteger(x))||typeof x=="string"&&(R||x.length>0)||A&&x===null)}e.getJsonRpcIdValidator=O})(tr)),tr}var rr={},vs;function Ma(){return vs||(vs=1,Object.defineProperty(rr,"__esModule",{value:!0})),rr}var Ne={},Rs;function qa(){if(Rs)return Ne;Rs=1;var e=Ne&&Ne.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.createModuleLogger=Ne.createProjectLogger=void 0;const n=(0,e(ga()).default)("metamask");function s(u){return n.extend(u)}Ne.createProjectLogger=s;function d(u,c){return u.extend(c)}return Ne.createModuleLogger=d,Ne}var Ie={},_s;function Ha(){if(_s)return Ie;_s=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.hexToBigInt=Ie.hexToNumber=Ie.bigIntToHex=Ie.numberToHex=void 0;const e=De(),t=Nt(),n=c=>((0,e.assert)(typeof c=="number","Value must be a number."),(0,e.assert)(c>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(c),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(c.toString(16)));Ie.numberToHex=n;const s=c=>((0,e.assert)(typeof c=="bigint","Value must be a bigint."),(0,e.assert)(c>=0,"Value must be a non-negative bigint."),(0,t.add0x)(c.toString(16)));Ie.bigIntToHex=s;const d=c=>{(0,t.assertIsHexString)(c);const a=parseInt(c,16);return(0,e.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a};Ie.hexToNumber=d;const u=c=>((0,t.assertIsHexString)(c),BigInt((0,t.add0x)(c)));return Ie.hexToBigInt=u,Ie}var nr={},$s;function Da(){return $s||($s=1,Object.defineProperty(nr,"__esModule",{value:!0})),nr}var st={},Is;function Ua(){if(Is)return st;Is=1,Object.defineProperty(st,"__esModule",{value:!0}),st.createDeferredPromise=void 0;function e({suppressUnhandledRejection:t=!1}={}){let n,s;const d=new Promise((u,c)=>{n=u,s=c});return t&&d.catch(u=>{}),{promise:d,resolve:n,reject:s}}return st.createDeferredPromise=e,st}var sr={},As;function Va(){return As||(As=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(u){u[u.Millisecond=1]="Millisecond",u[u.Second=1e3]="Second",u[u.Minute=6e4]="Minute",u[u.Hour=36e5]="Hour",u[u.Day=864e5]="Day",u[u.Week=6048e5]="Week",u[u.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));const t=u=>Number.isInteger(u)&&u>=0,n=(u,c)=>{if(!t(u))throw new Error(`"${c}" must be a non-negative integer. Received: "${u}".`)};function s(u,c){return n(u,"count"),u*c}e.inMilliseconds=s;function d(u){return n(u,"timestamp"),Date.now()-u}e.timeSince=d})(sr)),sr}var ir={},Ts;function Fa(){return Ts||(Ts=1,Object.defineProperty(ir,"__esModule",{value:!0})),ir}var or={},It={exports:{}},ar,js;function wt(){if(js)return ar;js=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,s=16,d=t-6;return ar={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ar}var cr,Cs;function Mt(){if(Cs)return cr;Cs=1;var e={};return cr=typeof ma=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},cr}var xs;function St(){return xs||(xs=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:d}=wt(),u=Mt();t=e.exports={};const c=t.re=[],a=t.safeRe=[],o=t.src=[],f=t.safeSrc=[],r=t.t={};let i=0;const l="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",d],[l,s]],b=N=>{for(const[L,z]of h)N=N.split(`${L}*`).join(`${L}{0,${z}}`).split(`${L}+`).join(`${L}{1,${z}}`);return N},v=(N,L,z)=>{const K=b(L),$=i++;u(N,$,L),r[N]=$,o[$]=L,f[$]=K,c[$]=new RegExp(L,z?"g":void 0),a[$]=new RegExp(K,z?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l}*`),v("MAINVERSION",`(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASE",`(?:-(${o[r.PRERELEASEIDENTIFIER]}(?:\\.${o[r.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${o[r.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[r.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${l}+`),v("BUILD",`(?:\\+(${o[r.BUILDIDENTIFIER]}(?:\\.${o[r.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${o[r.MAINVERSION]}${o[r.PRERELEASE]}?${o[r.BUILD]}?`),v("FULL",`^${o[r.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${o[r.MAINVERSIONLOOSE]}${o[r.PRERELEASELOOSE]}?${o[r.BUILD]}?`),v("LOOSE",`^${o[r.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${o[r.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${o[r.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:${o[r.PRERELEASE]})?${o[r.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:${o[r.PRERELEASELOOSE]})?${o[r.BUILD]}?)?)?`),v("XRANGE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),v("COERCE",`${o[r.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",o[r.COERCEPLAIN]+`(?:${o[r.PRERELEASE]})?(?:${o[r.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",o[r.COERCE],!0),v("COERCERTLFULL",o[r.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${o[r.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${o[r.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${o[r.LONECARET]}${o[r.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${o[r.LONECARET]}${o[r.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${o[r.GTLT]}\\s*(${o[r.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]}|${o[r.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${o[r.XRANGEPLAIN]})\\s+-\\s+(${o[r.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${o[r.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[r.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(It,It.exports)),It.exports}var ur,Ps;function Ln(){if(Ps)return ur;Ps=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ur=s=>s?typeof s!="object"?e:s:t,ur}var lr,Os;function No(){if(Os)return lr;Os=1;const e=/^[0-9]+$/,t=(s,d)=>{if(typeof s=="number"&&typeof d=="number")return s===d?0:s<d?-1:1;const u=e.test(s),c=e.test(d);return u&&c&&(s=+s,d=+d),s===d?0:u&&!c?-1:c&&!u?1:s<d?-1:1};return lr={compareIdentifiers:t,rcompareIdentifiers:(s,d)=>t(d,s)},lr}var dr,ks;function ye(){if(ks)return dr;ks=1;const e=Mt(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=wt(),{safeRe:s,t:d}=St(),u=Ln(),{compareIdentifiers:c}=No(),a=(f,r)=>{const i=r.split(".");if(i.length>f.length)return!1;for(let l=0;l<i.length;l++)if(c(f[l],i[l])!==0)return!1;return!0};class o{constructor(r,i){if(i=u(i),r instanceof o){if(r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",r,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const l=r.trim().match(i.loose?s[d.LOOSE]:s[d.FULL]);if(!l)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const b=+h;if(b>=0&&b<n)return b}return h}):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(e("SemVer.compare",this.version,this.options,r),!(r instanceof o)){if(typeof r=="string"&&r===this.version)return 0;r=new o(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof o||(r=new o(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof o||(r=new o(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let i=0;do{const l=this.prerelease[i],h=r.prerelease[i];if(e("prerelease compare",i,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return c(l,h)}while(++i)}compareBuild(r){r instanceof o||(r=new o(r,this.options));let i=0;do{const l=this.build[i],h=r.build[i];if(e("build compare",i,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return c(l,h)}while(++i)}inc(r,i,l){if(r.startsWith("pre")){if(!i&&l===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const h=`-${i}`.match(this.options.loose?s[d.PRERELEASELOOSE]:s[d.PRERELEASE]);if(!h||h[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,l),this.inc("pre",i,l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,l),this.inc("pre",i,l);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(l)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let b=this.prerelease.length;for(;--b>=0;)typeof this.prerelease[b]=="number"&&(this.prerelease[b]++,b=-2);if(b===-1){if(i===this.prerelease.join(".")&&l===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(i){let b=[i,h];if(l===!1&&(b=[i]),a(this.prerelease,i)){const v=this.prerelease[i.split(".").length];isNaN(v)&&(this.prerelease=b)}else this.prerelease=b}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return dr=o,dr}var fr,Bs;function Ke(){if(Bs)return fr;Bs=1;const e=ye();return fr=(n,s,d=!1)=>{if(n instanceof e)return n;try{return new e(n,s)}catch(u){if(!d)return null;throw u}},fr}var hr,Ls;function za(){if(Ls)return hr;Ls=1;const e=Ke();return hr=(n,s)=>{const d=e(n,s);return d?d.version:null},hr}var pr,Ns;function Ja(){if(Ns)return pr;Ns=1;const e=Ke();return pr=(n,s)=>{const d=e(n.trim().replace(/^[=v]+/,""),s);return d?d.version:null},pr}var gr,Ms;function Ga(){if(Ms)return gr;Ms=1;const e=ye();return gr=(n,s,d,u,c)=>{typeof d=="string"&&(c=u,u=d,d=void 0);try{return new e(n instanceof e?n.version:n,d).inc(s,u,c).version}catch{return null}},gr}var mr,qs;function Xa(){if(qs)return mr;qs=1;const e=Ke();return mr=(n,s)=>{const d=e(n,null,!0),u=e(s,null,!0),c=d.compare(u);if(c===0)return null;const a=c>0,o=a?d:u,f=a?u:d,r=!!o.prerelease.length;if(!!f.prerelease.length&&!r){if(!f.patch&&!f.minor)return"major";if(f.compareMain(o)===0)return f.minor&&!f.patch?"minor":"patch"}const l=r?"pre":"";return d.major!==u.major?l+"major":d.minor!==u.minor?l+"minor":d.patch!==u.patch?l+"patch":"prerelease"},mr}var yr,Hs;function Wa(){if(Hs)return yr;Hs=1;const e=ye();return yr=(n,s)=>new e(n,s).major,yr}var br,Ds;function Ka(){if(Ds)return br;Ds=1;const e=ye();return br=(n,s)=>new e(n,s).minor,br}var Er,Us;function Ya(){if(Us)return Er;Us=1;const e=ye();return Er=(n,s)=>new e(n,s).patch,Er}var wr,Vs;function Za(){if(Vs)return wr;Vs=1;const e=Ke();return wr=(n,s)=>{const d=e(n,s);return d&&d.prerelease.length?d.prerelease:null},wr}var Sr,Fs;function xe(){if(Fs)return Sr;Fs=1;const e=ye();return Sr=(n,s,d)=>new e(n,d).compare(new e(s,d)),Sr}var vr,zs;function Qa(){if(zs)return vr;zs=1;const e=xe();return vr=(n,s,d)=>e(s,n,d),vr}var Rr,Js;function ec(){if(Js)return Rr;Js=1;const e=xe();return Rr=(n,s)=>e(n,s,!0),Rr}var _r,Gs;function Nn(){if(Gs)return _r;Gs=1;const e=ye();return _r=(n,s,d)=>{const u=new e(n,d),c=new e(s,d);return u.compare(c)||u.compareBuild(c)},_r}var $r,Xs;function tc(){if(Xs)return $r;Xs=1;const e=Nn();return $r=(n,s)=>n.sort((d,u)=>e(d,u,s)),$r}var Ir,Ws;function rc(){if(Ws)return Ir;Ws=1;const e=Nn();return Ir=(n,s)=>n.sort((d,u)=>e(u,d,s)),Ir}var Ar,Ks;function qt(){if(Ks)return Ar;Ks=1;const e=xe();return Ar=(n,s,d)=>e(n,s,d)>0,Ar}var Tr,Ys;function Mn(){if(Ys)return Tr;Ys=1;const e=xe();return Tr=(n,s,d)=>e(n,s,d)<0,Tr}var jr,Zs;function Mo(){if(Zs)return jr;Zs=1;const e=xe();return jr=(n,s,d)=>e(n,s,d)===0,jr}var Cr,Qs;function qo(){if(Qs)return Cr;Qs=1;const e=xe();return Cr=(n,s,d)=>e(n,s,d)!==0,Cr}var xr,ei;function qn(){if(ei)return xr;ei=1;const e=xe();return xr=(n,s,d)=>e(n,s,d)>=0,xr}var Pr,ti;function Hn(){if(ti)return Pr;ti=1;const e=xe();return Pr=(n,s,d)=>e(n,s,d)<=0,Pr}var Or,ri;function Ho(){if(ri)return Or;ri=1;const e=Mo(),t=qo(),n=qt(),s=qn(),d=Mn(),u=Hn();return Or=(a,o,f,r)=>{switch(o){case"===":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a===f;case"!==":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a!==f;case"":case"=":case"==":return e(a,f,r);case"!=":return t(a,f,r);case">":return n(a,f,r);case">=":return s(a,f,r);case"<":return d(a,f,r);case"<=":return u(a,f,r);default:throw new TypeError(`Invalid operator: ${o}`)}},Or}var kr,ni;function nc(){if(ni)return kr;ni=1;const e=ye(),t=Ke(),{safeRe:n,t:s}=St();return kr=(u,c)=>{if(u instanceof e)return u;if(typeof u=="number"&&(u=String(u)),typeof u!="string")return null;c=c||{};let a=null;if(!c.rtl)a=u.match(c.includePrerelease?n[s.COERCEFULL]:n[s.COERCE]);else{const h=c.includePrerelease?n[s.COERCERTLFULL]:n[s.COERCERTL];let b;for(;(b=h.exec(u))&&(!a||a.index+a[0].length!==u.length);)(!a||b.index+b[0].length!==a.index+a[0].length)&&(a=b),h.lastIndex=b.index+b[1].length+b[2].length;h.lastIndex=-1}if(a===null)return null;const o=a[2],f=a[3]||"0",r=a[4]||"0",i=c.includePrerelease&&a[5]?`-${a[5]}`:"",l=c.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${f}.${r}${i}${l}`,c)},kr}var Br,si;function sc(){if(si)return Br;si=1;const e=Ke(),t=wt(),n=ye(),s=(a,o,f)=>{if(!t.RELEASE_TYPES.includes(o))return null;const r=d(a,f);return r&&u(r,o)},d=(a,o)=>{const f=a instanceof n?a.version:a;return e(f,o)},u=(a,o)=>{if(c(o))return a.version;switch(a.prerelease=[],o){case"major":a.minor=0,a.patch=0;break;case"minor":a.patch=0;break}return a.format()},c=a=>a.startsWith("pre");return Br=s,Br}var Lr,ii;function ic(){if(ii)return Lr;ii=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const s=this.map.get(n);if(s!==void 0)return this.map.delete(n),this.map.set(n,s),s}delete(n){return this.map.delete(n)}set(n,s){if(!this.delete(n)&&s!==void 0){if(this.map.size>=this.max){const u=this.map.keys().next().value;this.delete(u)}this.map.set(n,s)}return this}}return Lr=e,Lr}var Nr,oi;function Pe(){if(oi)return Nr;oi=1;const e=/\s+/g;class t{constructor(k,y){if(y=d(y),k instanceof t)return k.loose===!!y.loose&&k.includePrerelease===!!y.includePrerelease?k:new t(k.raw,y);if(k instanceof u)return this.raw=k.value,this.set=[[k]],this.formatted=void 0,this;if(this.options=y,this.loose=!!y.loose,this.includePrerelease=!!y.includePrerelease,this.raw=k.trim().replace(e," "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(I=>!L(I[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&z(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let k=0;k<this.set.length;k++){k>0&&(this.formatted+="||");const y=this.set[k];for(let g=0;g<y.length;g++)g>0&&(this.formatted+=" "),this.formatted+=y[g].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(k){k=k.replace(N,"");const g=((this.options.includePrerelease&&b)|(this.options.loose&&v))+":"+k,I=s.get(g);if(I)return I;const C=this.options.loose,q=C?o[r.HYPHENRANGELOOSE]:o[r.HYPHENRANGE];k=k.replace(q,x(this.options.includePrerelease)),c("hyphen replace",k),k=k.replace(o[r.COMPARATORTRIM],i),c("comparator trim",k),k=k.replace(o[r.TILDETRIM],l),c("tilde trim",k),k=k.replace(o[r.CARETTRIM],h),c("caret trim",k);let m=k.split(" ").map(U=>$(U,this.options)).join(" ").split(/\s+/).map(U=>B(U,this.options));C&&(m=m.filter(U=>(c("loose invalid filter",U,this.options),!!U.match(o[r.COMPARATORLOOSE])))),c("range list",m);const E=new Map,_=m.map(U=>new u(U,this.options));for(const U of _){if(L(U))return[U];E.set(U.value,U)}E.size>1&&E.has("")&&E.delete("");const J=[...E.values()];return s.set(g,J),J}intersects(k,y){if(!(k instanceof t))throw new TypeError("a Range is required");return this.set.some(g=>K(g,y)&&k.set.some(I=>K(I,y)&&g.every(C=>I.every(q=>C.intersects(q,y)))))}test(k){if(!k)return!1;if(typeof k=="string")try{k=new a(k,this.options)}catch{return!1}for(let y=0;y<this.set.length;y++)if(V(this.set[y],k,this.options))return!0;return!1}}Nr=t;const n=ic(),s=new n,d=Ln(),u=Ht(),c=Mt(),a=ye(),{safeRe:o,src:f,t:r,comparatorTrimReplace:i,tildeTrimReplace:l,caretTrimReplace:h}=St(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:v}=wt(),N=new RegExp(f[r.BUILD],"g"),L=M=>M.value==="<0.0.0-0",z=M=>M.value==="",K=(M,k)=>{let y=!0;const g=M.slice();let I=g.pop();for(;y&&g.length;)y=g.every(C=>I.intersects(C,k)),I=g.pop();return y},$=(M,k)=>(M=M.replace(o[r.BUILD],""),c("comp",M,k),M=O(M,k),c("caret",M),M=H(M,k),c("tildes",M),M=R(M,k),c("xrange",M),M=A(M,k),c("stars",M),M),S=M=>!M||M.toLowerCase()==="x"||M==="*",j=(M,k,y)=>S(M)&&!S(k)||S(k)&&y&&!S(y),H=(M,k)=>M.trim().split(/\s+/).map(y=>P(y,k)).join(" "),P=(M,k)=>{const y=k.loose?o[r.TILDELOOSE]:o[r.TILDE],g=k.includePrerelease?"-0":"";return M.replace(y,(I,C,q,m,E)=>{c("tilde",M,I,C,q,m,E);let _;return S(C)?_="":S(q)?_=`>=${C}.0.0${g} <${+C+1}.0.0-0`:S(m)?_=`>=${C}.${q}.0${g} <${C}.${+q+1}.0-0`:E?(c("replaceTilde pr",E),_=`>=${C}.${q}.${m}-${E} <${C}.${+q+1}.0-0`):_=`>=${C}.${q}.${m} <${C}.${+q+1}.0-0`,c("tilde return",_),_})},O=(M,k)=>M.trim().split(/\s+/).map(y=>p(y,k)).join(" "),p=(M,k)=>{c("caret",M,k);const y=k.loose?o[r.CARETLOOSE]:o[r.CARET],g=k.includePrerelease?"-0":"";return M.replace(y,(I,C,q,m,E)=>{c("caret",M,I,C,q,m,E);let _;return S(C)?_="":S(q)?_=`>=${C}.0.0${g} <${+C+1}.0.0-0`:S(m)?C==="0"?_=`>=${C}.${q}.0${g} <${C}.${+q+1}.0-0`:_=`>=${C}.${q}.0${g} <${+C+1}.0.0-0`:E?(c("replaceCaret pr",E),C==="0"?q==="0"?_=`>=${C}.${q}.${m}-${E} <${C}.${q}.${+m+1}-0`:_=`>=${C}.${q}.${m}-${E} <${C}.${+q+1}.0-0`:_=`>=${C}.${q}.${m}-${E} <${+C+1}.0.0-0`):(c("no pr"),C==="0"?q==="0"?_=`>=${C}.${q}.${m} <${C}.${q}.${+m+1}-0`:_=`>=${C}.${q}.${m} <${C}.${+q+1}.0-0`:_=`>=${C}.${q}.${m} <${+C+1}.0.0-0`),c("caret return",_),_})},R=(M,k)=>(c("replaceXRanges",M,k),M.split(/\s+/).map(y=>G(y,k)).join(" ")),G=(M,k)=>{M=M.trim();const y=k.loose?o[r.XRANGELOOSE]:o[r.XRANGE];return M.replace(y,(g,I,C,q,m,E)=>{if(c("xRange",M,g,I,C,q,m,E),j(C,q,m))return M;const _=S(C),J=_||S(q),U=J||S(m),X=U;return I==="="&&X&&(I=""),E=k.includePrerelease?"-0":"",_?I===">"||I==="<"?g="<0.0.0-0":g="*":I&&X?(J&&(q=0),m=0,I===">"?(I=">=",J?(C=+C+1,q=0,m=0):(q=+q+1,m=0)):I==="<="&&(I="<",J?C=+C+1:q=+q+1),I==="<"&&(E="-0"),g=`${I+C}.${q}.${m}${E}`):J?g=`>=${C}.0.0${E} <${+C+1}.0.0-0`:U&&(g=`>=${C}.${q}.0${E} <${C}.${+q+1}.0-0`),c("xRange return",g),g})},A=(M,k)=>(c("replaceStars",M,k),M.trim().replace(o[r.STAR],"")),B=(M,k)=>(c("replaceGTE0",M,k),M.trim().replace(o[k.includePrerelease?r.GTE0PRE:r.GTE0],"")),x=M=>(k,y,g,I,C,q,m,E,_,J,U,X)=>(S(g)?y="":S(I)?y=`>=${g}.0.0${M?"-0":""}`:S(C)?y=`>=${g}.${I}.0${M?"-0":""}`:q?y=`>=${y}`:y=`>=${y}${M?"-0":""}`,S(_)?E="":S(J)?E=`<${+_+1}.0.0-0`:S(U)?E=`<${_}.${+J+1}.0-0`:X?E=`<=${_}.${J}.${U}-${X}`:M?E=`<${_}.${J}.${+U+1}-0`:E=`<=${E}`,`${y} ${E}`.trim()),V=(M,k,y)=>{for(let g=0;g<M.length;g++)if(!M[g].test(k))return!1;if(k.prerelease.length&&!y.includePrerelease){for(let g=0;g<M.length;g++)if(c(M[g].semver),M[g].semver!==u.ANY&&M[g].semver.prerelease.length>0){const I=M[g].semver;if(I.major===k.major&&I.minor===k.minor&&I.patch===k.patch)return!0}return!1}return!0};return Nr}var Mr,ai;function Ht(){if(ai)return Mr;ai=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),c("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(r){const i=this.options.loose?s[d.COMPARATORLOOSE]:s[d.COMPARATOR],l=r.match(i);if(!l)throw new TypeError(`Invalid comparator: ${r}`);this.operator=l[1]!==void 0?l[1]:"",this.operator==="="&&(this.operator=""),l[2]?this.semver=new a(l[2],this.options.loose):this.semver=e}toString(){return this.value}test(r){if(c("Comparator.test",r,this.options.loose),this.semver===e||r===e)return!0;if(typeof r=="string")try{r=new a(r,this.options)}catch{return!1}return u(r,this.operator,this.semver,this.options)}intersects(r,i){if(!(r instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(r.value,i).test(this.value):r.operator===""?r.value===""?!0:new o(this.value,i).test(r.semver):(i=n(i),i.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!i.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||u(this.semver,"<",r.semver,i)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||u(this.semver,">",r.semver,i)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}}Mr=t;const n=Ln(),{safeRe:s,t:d}=St(),u=Ho(),c=Mt(),a=ye(),o=Pe();return Mr}var qr,ci;function Dt(){if(ci)return qr;ci=1;const e=Pe();return qr=(n,s,d)=>{try{s=new e(s,d)}catch{return!1}return s.test(n)},qr}var Hr,ui;function oc(){if(ui)return Hr;ui=1;const e=Pe();return Hr=(n,s)=>new e(n,s).set.map(d=>d.map(u=>u.value).join(" ").trim().split(" ")),Hr}var Dr,li;function ac(){if(li)return Dr;li=1;const e=ye(),t=Pe();return Dr=(s,d,u)=>{let c=null,a=null,o=null;try{o=new t(d,u)}catch{return null}return s.forEach(f=>{o.test(f)&&(!c||a.compare(f)===-1)&&(c=f,a=new e(c,u))}),c},Dr}var Ur,di;function cc(){if(di)return Ur;di=1;const e=ye(),t=Pe();return Ur=(s,d,u)=>{let c=null,a=null,o=null;try{o=new t(d,u)}catch{return null}return s.forEach(f=>{o.test(f)&&(!c||a.compare(f)===1)&&(c=f,a=new e(c,u))}),c},Ur}var Vr,fi;function uc(){if(fi)return Vr;fi=1;const e=ye(),t=Pe(),n=qt();return Vr=(d,u)=>{d=new t(d,u);let c=new e("0.0.0");if(d.test(c)||(c=new e("0.0.0-0"),d.test(c)))return c;c=null;for(let a=0;a<d.set.length;++a){const o=d.set[a];let f=null;o.forEach(r=>{const i=new e(r.semver.version);switch(r.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!f||n(i,f))&&(f=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${r.operator}`)}}),f&&(!c||n(c,f))&&(c=f)}return c&&d.test(c)?c:null},Vr}var Fr,hi;function lc(){if(hi)return Fr;hi=1;const e=Pe();return Fr=(n,s)=>{try{return new e(n,s).range||"*"}catch{return null}},Fr}var zr,pi;function Dn(){if(pi)return zr;pi=1;const e=ye(),t=Ht(),{ANY:n}=t,s=Pe(),d=Dt(),u=qt(),c=Mn(),a=Hn(),o=qn();return zr=(r,i,l,h)=>{r=new e(r,h),i=new s(i,h);let b,v,N,L,z;switch(l){case">":b=u,v=a,N=c,L=">",z=">=";break;case"<":b=c,v=o,N=u,L="<",z="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(r,i,h))return!1;for(let K=0;K<i.set.length;++K){const $=i.set[K];let S=null,j=null;if($.forEach(H=>{H.semver===n&&(H=new t(">=0.0.0")),S=S||H,j=j||H,b(H.semver,S.semver,h)?S=H:N(H.semver,j.semver,h)&&(j=H)}),S.operator===L||S.operator===z||(!j.operator||j.operator===L)&&v(r,j.semver))return!1;if(j.operator===z&&N(r,j.semver))return!1}return!0},zr}var Jr,gi;function dc(){if(gi)return Jr;gi=1;const e=Dn();return Jr=(n,s,d)=>e(n,s,">",d),Jr}var Gr,mi;function fc(){if(mi)return Gr;mi=1;const e=Dn();return Gr=(n,s,d)=>e(n,s,"<",d),Gr}var Xr,yi;function hc(){if(yi)return Xr;yi=1;const e=Pe();return Xr=(n,s,d)=>(n=new e(n,d),s=new e(s,d),n.intersects(s,d)),Xr}var Wr,bi;function pc(){if(bi)return Wr;bi=1;const e=Dt(),t=xe();return Wr=(n,s,d)=>{const u=[];let c=null,a=null;const o=n.sort((l,h)=>t(l,h,d));for(const l of o)e(l,s,d)?(a=l,c||(c=l)):(a&&u.push([c,a]),a=null,c=null);c&&u.push([c,null]);const f=[];for(const[l,h]of u)l===h?f.push(l):!h&&l===o[0]?f.push("*"):h?l===o[0]?f.push(`<=${h}`):f.push(`${l} - ${h}`):f.push(`>=${l}`);const r=f.join(" || "),i=typeof s.raw=="string"?s.raw:String(s);return r.length<i.length?r:s},Wr}var Kr,Ei;function gc(){if(Ei)return Kr;Ei=1;const e=Pe(),t=Ht(),{ANY:n}=t,s=Dt(),d=xe(),u=(i,l,h={})=>{if(i===l)return!0;i=new e(i,h),l=new e(l,h);let b=!1;e:for(const v of i.set){for(const N of l.set){const L=o(v,N,h);if(b=b||L!==null,L)continue e}if(b)return!1}return!0},c=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(i,l,h)=>{if(i===l)return!0;if(i.length===1&&i[0].semver===n){if(l.length===1&&l[0].semver===n)return!0;h.includePrerelease?i=c:i=a}if(l.length===1&&l[0].semver===n){if(h.includePrerelease)return!0;l=a}const b=new Set;let v,N;for(const P of i)P.operator===">"||P.operator===">="?v=f(v,P,h):P.operator==="<"||P.operator==="<="?N=r(N,P,h):b.add(P.semver);if(b.size>1)return null;let L;if(v&&N){if(L=d(v.semver,N.semver,h),L>0)return null;if(L===0&&(v.operator!==">="||N.operator!=="<="))return null}for(const P of b){if(v&&!s(P,String(v),h)||N&&!s(P,String(N),h))return null;for(const O of l)if(!s(P,String(O),h))return!1;return!0}let z,K,$,S,j=N&&!h.includePrerelease&&N.semver.prerelease.length?N.semver:!1,H=v&&!h.includePrerelease&&v.semver.prerelease.length?v.semver:!1;j&&j.prerelease.length===1&&N.operator==="<"&&j.prerelease[0]===0&&(j=!1);for(const P of l){if(S=S||P.operator===">"||P.operator===">=",$=$||P.operator==="<"||P.operator==="<=",v){if(H&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===H.major&&P.semver.minor===H.minor&&P.semver.patch===H.patch&&(H=!1),P.operator===">"||P.operator===">="){if(z=f(v,P,h),z===P&&z!==v)return!1}else if(v.operator===">="&&!P.test(v.semver))return!1}if(N){if(j&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===j.major&&P.semver.minor===j.minor&&P.semver.patch===j.patch&&(j=!1),P.operator==="<"||P.operator==="<="){if(K=r(N,P,h),K===P&&K!==N)return!1}else if(N.operator==="<="&&!P.test(N.semver))return!1}if(!P.operator&&(N||v)&&L!==0)return!1}return!(v&&$&&!N&&L!==0||N&&S&&!v&&L!==0||H||j)},f=(i,l,h)=>{if(!i)return l;const b=d(i.semver,l.semver,h);return b>0?i:b<0||l.operator===">"&&i.operator===">="?l:i},r=(i,l,h)=>{if(!i)return l;const b=d(i.semver,l.semver,h);return b<0?i:b>0||l.operator==="<"&&i.operator==="<="?l:i};return Kr=u,Kr}var Yr,wi;function mc(){if(wi)return Yr;wi=1;const e=St(),t=wt(),n=ye(),s=No(),d=Ke(),u=za(),c=Ja(),a=Ga(),o=Xa(),f=Wa(),r=Ka(),i=Ya(),l=Za(),h=xe(),b=Qa(),v=ec(),N=Nn(),L=tc(),z=rc(),K=qt(),$=Mn(),S=Mo(),j=qo(),H=qn(),P=Hn(),O=Ho(),p=nc(),R=sc(),G=Ht(),A=Pe(),B=Dt(),x=oc(),V=ac(),M=cc(),k=uc(),y=lc(),g=Dn(),I=dc(),C=fc(),q=hc(),m=pc(),E=gc();return Yr={parse:d,valid:u,clean:c,inc:a,diff:o,major:f,minor:r,patch:i,prerelease:l,compare:h,rcompare:b,compareLoose:v,compareBuild:N,sort:L,rsort:z,gt:K,lt:$,eq:S,neq:j,gte:H,lte:P,cmp:O,coerce:p,truncate:R,Comparator:G,Range:A,satisfies:B,toComparators:x,maxSatisfying:V,minSatisfying:M,minVersion:k,validRange:y,outside:g,gtr:I,ltr:C,intersects:q,simplifyRange:m,subset:E,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers},Yr}var Si;function yc(){return Si||(Si=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=Oe(),n=mc(),s=De();e.VersionStruct=(0,t.refine)((0,t.string)(),"Version",i=>(0,n.valid)(i)===null?`Expected SemVer version, got "${i}"`:!0),e.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",i=>(0,n.validRange)(i)===null?`Expected SemVer range, got "${i}"`:!0);function d(i){return(0,t.is)(i,e.VersionStruct)}e.isValidSemVerVersion=d;function u(i){return(0,t.is)(i,e.VersionRangeStruct)}e.isValidSemVerRange=u;function c(i){(0,s.assertStruct)(i,e.VersionStruct)}e.assertIsSemVerVersion=c;function a(i){(0,s.assertStruct)(i,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function o(i,l){return(0,n.gt)(i,l)}e.gtVersion=o;function f(i,l){return(0,n.gtr)(i,l)}e.gtRange=f;function r(i,l){return(0,n.satisfies)(i,l,{includePrerelease:!0})}e.satisfiesVersionRange=r})(or)),or}var vi;function be(){return vi||(vi=1,(function(e){var t=Fe&&Fe.__createBinding||(Object.create?(function(s,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(s,c,a)}):(function(s,d,u,c){c===void 0&&(c=u),s[c]=d[u]})),n=Fe&&Fe.__exportStar||function(s,d){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(De(),e),n(Lo(),e),n(Bn(),e),n(Pa(),e),n(Oa(),e),n(ka(),e),n(Ba(),e),n(La(),e),n(Bo(),e),n(Nt(),e),n(Na(),e),n(Ma(),e),n(qa(),e),n(kn(),e),n(Ha(),e),n(Da(),e),n(Ua(),e),n(Va(),e),n(Fa(),e),n(yc(),e)})(Fe)),Fe}var Zr={},Ri;function ke(){return Ri||(Ri=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParserError=e.getErrorStack=e.getErrorMessage=void 0;const t=be(),n=u=>typeof u=="string"?u:u instanceof Error||(0,t.isObject)(u)&&(0,t.hasProperty)(u,"message")&&typeof u.message=="string"?u.message:"Unknown error.";e.getErrorMessage=n;const s=u=>{if(u instanceof Error)return u.stack};e.getErrorStack=s;class d extends Error{constructor(c,a){super(c),this.name="ParserError";const o=(0,e.getErrorStack)(a);o&&(this.stack=o)}}e.ParserError=d})(Zr)),Zr}var Qr={},it={},_i;function bc(){if(_i)return it;_i=1,Object.defineProperty(it,"__esModule",{value:!0}),it.iterate=void 0;const e=be(),t=function*(n,s=32){for(let d=0;d<n.length;d+=s){const u=a=>{(0,e.assert)(a>=0,"Cannot skip a negative number of bytes."),(0,e.assert)(a%s===0,"Length must be a multiple of the size."),d+=a},c=n.subarray(d);yield{skip:u,value:c}}return{skip:()=>{},value:new Uint8Array}};return it.iterate=t,it}var Je={},en={},Ge={},Me={},$i;function Ec(){if($i)return Me;$i=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.padEnd=Me.padStart=Me.set=void 0;const e=be(),t=32,n=(u,c,a)=>(0,e.concatBytes)([u.subarray(0,a),c,u.subarray(a+c.length)]);Me.set=n;const s=(u,c=t)=>{const a=new Uint8Array(Math.max(c-u.length,0)).fill(0);return(0,e.concatBytes)([a,u])};Me.padStart=s;const d=(u,c=t)=>{const a=new Uint8Array(Math.max(c-u.length,0)).fill(0);return(0,e.concatBytes)([u,a])};return Me.padEnd=d,Me}var Ii;function et(){return Ii||(Ii=1,(function(e){var t=Ge&&Ge.__createBinding||(Object.create?(function(s,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(s,c,a)}):(function(s,d,u,c){c===void 0&&(c=u),s[c]=d[u]})),n=Ge&&Ge.__exportStar||function(s,d){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ec(),e)})(Ge)),Ge}var Ai;function wc(){return Ai||(Ai=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.address=e.getAddress=void 0;const t=be(),n=ke(),s=et(),d=u=>{const c=(0,t.createBytes)(u);return(0,t.assert)(c.length<=20,new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${c.length} bytes.`)),(0,s.padStart)(c,20)};e.getAddress=d,e.address={isDynamic:!1,isType:u=>u==="address",getByteLength(){return 32},encode({buffer:u,value:c,packed:a}){const o=(0,e.getAddress)(c);if(a)return(0,t.concatBytes)([u,o]);const f=(0,s.padStart)(o);return(0,t.concatBytes)([u,f])},decode({value:u}){return(0,t.add0x)((0,t.bytesToHex)(u.slice(12,32)))}}})(en)),en}var tn={},rn={},Ti;function Un(){return Ti||(Ti=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fixedBytes=e.getByteLength=void 0;const t=be(),n=ke(),s=et(),d=/^bytes([0-9]{1,2})$/u,u=c=>{var f;const a=(f=c.match(d))==null?void 0:f[1];(0,t.assert)(a,`Invalid byte length. Expected a number between 1 and 32, but received "${c}".`);const o=Number(a);return(0,t.assert)(o>0&&o<=32,new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${c}".`)),o};e.getByteLength=u,e.fixedBytes={isDynamic:!1,isType(c){return d.test(c)},getByteLength(){return 32},encode({type:c,buffer:a,value:o,packed:f}){const r=(0,e.getByteLength)(c),i=(0,t.createBytes)(o);return(0,t.assert)(i.length<=r,new n.ParserError(`Expected a value of length ${r}, but received a value of length ${i.length}.`)),f?(0,t.concatBytes)([a,(0,s.padEnd)(i,r)]):(0,t.concatBytes)([a,(0,s.padEnd)(i)])},decode({type:c,value:a}){const o=(0,e.getByteLength)(c);return a.slice(0,o)}}})(rn)),rn}var nn={},ji;function Do(){return ji||(ji=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tuple=e.getTupleElements=void 0;const t=be(),n=ke(),s=Vn(),d=/^\((.+)\)$/u,u=a=>d.test(a),c=a=>{(0,t.assert)(a.startsWith("(")&&a.endsWith(")"),new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${a}".`));const o=[];let f="",r=0;for(let i=1;i<a.length-1;i++){const l=a[i];l===","&&r===0?(o.push(f.trim()),f=""):(f+=l,l==="("?r+=1:l===")"&&(r-=1))}return f.trim()&&o.push(f.trim()),o};e.getTupleElements=c,e.tuple={isDynamic(a){return(0,e.getTupleElements)(a).some(f=>{const r=(0,s.getParser)(f);return(0,s.isDynamicParser)(r,f)})},isType(a){return u(a)},getByteLength(a){return(0,s.isDynamicParser)(this,a)?32:(0,e.getTupleElements)(a).reduce((f,r)=>f+(0,s.getParser)(r).getByteLength(r),0)},encode({type:a,buffer:o,value:f,packed:r,tight:i}){const l=(0,e.getTupleElements)(a);return(0,s.pack)({types:l,values:f,byteArray:o,packed:r,tight:i})},decode({type:a,value:o,skip:f}){const r=(0,e.getTupleElements)(a),i=this.getByteLength(a)-32;return f(i),(0,s.unpack)(r,o)}}})(nn)),nn}var Ci;function Sc(){return Ci||(Ci=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.array=e.getTupleType=e.getArrayType=e.isArrayType=void 0;const t=be(),n=ke(),s=Vn(),d=et(),u=Un(),c=Do(),a=/^(?<type>.*)\[(?<length>\d*?)\]$/u,o=i=>a.test(i);e.isArrayType=o;const f=i=>{var h;const l=i.match(a);return(0,t.assert)((h=l==null?void 0:l.groups)==null?void 0:h.type,new n.ParserError(`Invalid array type. Expected an array type, but received "${i}".`)),[l.groups.type,l.groups.length?parseInt(l.groups.length,10):void 0]};e.getArrayType=f;const r=(i,l)=>`(${new Array(l).fill(i).join(",")})`;e.getTupleType=r,e.array={isDynamic(i){const[l,h]=(0,e.getArrayType)(i);return h===void 0||(0,s.isDynamicParser)((0,s.getParser)(l),l)},isType(i){return(0,e.isArrayType)(i)},getByteLength(i){(0,t.assert)((0,e.isArrayType)(i),new n.ParserError(`Expected an array type, but received "${i}".`));const[l,h]=(0,e.getArrayType)(i);return!(0,s.isDynamicParser)(this,i)&&h!==void 0?c.tuple.getByteLength((0,e.getTupleType)(l,h)):32},encode({type:i,buffer:l,value:h,packed:b,tight:v}){const[N,L]=(0,e.getArrayType)(i);if((0,t.assert)(!b||!(0,e.isArrayType)(N),new n.ParserError("Cannot pack nested arrays.")),b&&(0,s.isDynamicParser)((0,s.getParser)(N),N))return(0,s.pack)({types:new Array(h.length).fill(N),values:h,byteArray:l,packed:b,arrayPacked:!0,tight:v});if(L)return(0,t.assert)(L===h.length,new n.ParserError(`Array length does not match type length. Expected a length of ${L}, but received ${h.length}.`)),c.tuple.encode({type:(0,e.getTupleType)(N,L),buffer:l,value:h,packed:u.fixedBytes.isType(N)&&v,tight:v});if(b)return(0,s.pack)({types:new Array(h.length).fill(N),values:h,byteArray:l,packed:u.fixedBytes.isType(N)&&v,arrayPacked:!0,tight:v});const z=(0,d.padStart)((0,t.numberToBytes)(h.length));return(0,s.pack)({types:new Array(h.length).fill(N),values:h,byteArray:(0,t.concatBytes)([l,z]),packed:b,tight:v})},decode({type:i,value:l,...h}){const[b,v]=(0,e.getArrayType)(i);if(v){const L=c.tuple.decode({type:(0,e.getTupleType)(b,v),value:l,...h});return(0,t.assert)(L.length===v,new n.ParserError(`Array length does not match type length. Expected a length of ${v}, but received ${L.length}.`)),L}const N=(0,t.bytesToNumber)(l.subarray(0,32));return(0,s.unpack)(new Array(N).fill(b),l.subarray(32))}}})(tn)),tn}var sn={},on={},xi;function Uo(){return xi||(xi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.number=e.getBigInt=e.assertNumberLength=e.getLength=e.isSigned=void 0;const t=be(),n=ke(),s=et(),d=/^u?int(?<length>[0-9]*)?$/u,u=f=>!f.startsWith("u");e.isSigned=u;const c=f=>{var l;if(f==="int"||f==="uint")return 256;const r=f.match(d);(0,t.assert)((l=r==null?void 0:r.groups)==null?void 0:l.length,new n.ParserError(`Invalid number type. Expected a number type, but received "${f}".`));const i=parseInt(r.groups.length,10);return(0,t.assert)(i>=8&&i<=256,new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${f}".`)),(0,t.assert)(i%8===0,new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${f}".`)),i};e.getLength=c;const a=(f,r)=>{const i=(0,e.getLength)(r),l=BigInt(2)**BigInt(i-((0,e.isSigned)(r)?1:0))-BigInt(1);if((0,e.isSigned)(r)){(0,t.assert)(f>=-(l+BigInt(1))&&f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`));return}(0,t.assert)(f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`))};e.assertNumberLength=a;const o=f=>{try{return(0,t.createBigInt)(f)}catch{throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${f}".`)}};e.getBigInt=o,e.number={isDynamic:!1,isType(f){return d.test(f)},getByteLength(){return 32},encode({type:f,buffer:r,value:i,packed:l}){const h=(0,e.getBigInt)(i);if((0,e.assertNumberLength)(h,f),(0,e.isSigned)(f)){if(l){const b=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,t.signedBigIntToBytes)(h,b)])}return(0,t.concatBytes)([r,(0,s.padStart)((0,t.signedBigIntToBytes)(h,32))])}if(l){const b=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,s.padStart)((0,t.bigIntToBytes)(h),b)])}return(0,t.concatBytes)([r,(0,s.padStart)((0,t.bigIntToBytes)(h))])},decode({type:f,value:r}){const i=r.subarray(0,32);if((0,e.isSigned)(f)){const h=(0,t.bytesToSignedBigInt)(i);return(0,e.assertNumberLength)(h,f),h}const l=(0,t.bytesToBigInt)(i);return(0,e.assertNumberLength)(l,f),l}}})(on)),on}var Pi;function vc(){return Pi||(Pi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bool=e.getBooleanValue=void 0;const t=Oe(),n=be(),s=ke(),d=Uo(),u=(0,t.coerce)((0,t.boolean)(),(0,t.union)([(0,t.literal)("true"),(0,t.literal)("false")]),a=>a==="true"),c=a=>{try{return(0,t.create)(a,u)?BigInt(1):BigInt(0)}catch{throw new s.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${a}".`)}};e.getBooleanValue=c,e.bool={isDynamic:!1,isType:a=>a==="bool",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const i=(0,e.getBooleanValue)(o);return f?(0,n.concatBytes)([a,(0,n.bigIntToBytes)(i)]):d.number.encode({type:"uint256",buffer:a,value:i,packed:f,tight:r})},decode(a){return d.number.decode({...a,type:"uint256"})===BigInt(1)}}})(sn)),sn}var ot={},Oi;function Vo(){if(Oi)return ot;Oi=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.bytes=void 0;const e=be(),t=et();return ot.bytes={isDynamic:!0,isType:n=>n==="bytes",getByteLength(){return 32},encode({buffer:n,value:s,packed:d}){const u=(0,e.createBytes)(s);if(d)return(0,e.concatBytes)([n,u]);const c=Math.ceil(u.byteLength/32)*32;return(0,e.concatBytes)([n,(0,t.padStart)((0,e.numberToBytes)(u.byteLength)),(0,t.padEnd)(u,c)])},decode({value:n}){const s=n.subarray(0,32),d=(0,e.bytesToNumber)(s);return n.slice(32,32+d)}},ot}var an={},ki;function Rc(){return ki||(ki=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fn=e.getFunction=void 0;const t=Oe(),n=be(),s=ke(),d=Un(),u=(0,t.coerce)((0,t.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,t.union)([n.StrictHexStruct,(0,t.instance)(Uint8Array)]),a=>{const o=(0,n.createBytes)(a);return(0,n.assert)(o.length===24,new s.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${o.length} bytes.`)),{address:(0,n.bytesToHex)(o.subarray(0,20)),selector:(0,n.bytesToHex)(o.subarray(20,24))}}),c=a=>{const o=(0,t.create)(a,u);return(0,n.concatBytes)([(0,n.hexToBytes)(o.address),(0,n.hexToBytes)(o.selector)])};e.getFunction=c,e.fn={isDynamic:!1,isType:a=>a==="function",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const i=(0,e.getFunction)(o);return d.fixedBytes.encode({type:"bytes24",buffer:a,value:i,packed:f,tight:r})},decode({value:a}){return{address:(0,n.bytesToHex)(a.slice(0,20)),selector:(0,n.bytesToHex)(a.slice(20,24))}}}})(an)),an}var cn={},Bi;function _c(){return Bi||(Bi=1,Object.defineProperty(cn,"__esModule",{value:!0})),cn}var at={},Li;function $c(){if(Li)return at;Li=1,Object.defineProperty(at,"__esModule",{value:!0}),at.string=void 0;const e=be(),t=Vo();return at.string={isDynamic:!0,isType:n=>n==="string",getByteLength(){return 32},encode({buffer:n,value:s,packed:d,tight:u}){return t.bytes.encode({type:"bytes",buffer:n,value:(0,e.stringToBytes)(s),packed:d,tight:u})},decode(n){return(0,e.bytesToString)(t.bytes.decode(n))}},at}var Ni;function Ic(){return Ni||(Ni=1,(function(e){var t=Je&&Je.__createBinding||(Object.create?(function(s,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(s,c,a)}):(function(s,d,u,c){c===void 0&&(c=u),s[c]=d[u]})),n=Je&&Je.__exportStar||function(s,d){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(wc(),e),n(Sc(),e),n(vc(),e),n(Vo(),e),n(Un(),e),n(Rc(),e),n(Uo(),e),n(_c(),e),n($c(),e),n(Do(),e)})(Je)),Je}var Mi;function Vn(){return Mi||(Mi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unpack=e.pack=e.isDynamicParser=e.getParser=void 0;const t=be(),n=ke(),s=bc(),d=Ic(),u=et(),c=r=>{const i={address:d.address,array:d.array,bool:d.bool,bytes:d.bytes,fixedBytes:d.fixedBytes,function:d.fn,number:d.number,string:d.string,tuple:d.tuple},l=i[r];if(l)return l;const h=Object.values(i).find(b=>b.isType(r));if(h)return h;throw new n.ParserError(`The type "${r}" is not supported.`)};e.getParser=c;const a=(r,i)=>{const{isDynamic:l}=r;return typeof l=="function"?l(i):l};e.isDynamicParser=a;const o=({types:r,values:i,packed:l=!1,tight:h=!1,arrayPacked:b=!1,byteArray:v=new Uint8Array})=>{(0,t.assert)(r.length===i.length,new n.ParserError(`The number of types (${r.length}) does not match the number of values (${i.length}).`));const{staticBuffer:N,dynamicBuffer:L,pointers:z}=r.reduce(({staticBuffer:S,dynamicBuffer:j,pointers:H},P,O)=>{const p=(0,e.getParser)(P),R=i[O];if(l||b||!(0,e.isDynamicParser)(p,P))return{staticBuffer:p.encode({buffer:S,value:R,type:P,packed:l,tight:h}),dynamicBuffer:j,pointers:H};const G=(0,t.concatBytes)([S,new Uint8Array(32)]),A=p.encode({buffer:j,value:R,type:P,packed:l,tight:h});return{staticBuffer:G,dynamicBuffer:A,pointers:[...H,{position:S.length,pointer:j.length}]}},{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,t.assert)(!l&&!b||L.length===0,new n.ParserError("Invalid pack state."));const K=N.length,$=z.reduce((S,{pointer:j,position:H})=>{const P=(0,u.padStart)((0,t.numberToBytes)(K+j));return(0,u.set)(S,P,H)},N);return(0,t.concatBytes)([v,$,L])};e.pack=o;const f=(r,i)=>{const l=(0,s.iterate)(i);return r.map(h=>{const{value:{value:b,skip:v},done:N}=l.next();(0,t.assert)(!N,new n.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${h}".`));const L=(0,e.getParser)(h);if((0,e.isDynamicParser)(L,h)){const K=(0,t.bytesToNumber)(b.subarray(0,32)),$=i.subarray(K);return L.decode({type:h,value:$,skip:v})}return L.decode({type:h,value:b,skip:v})})};e.unpack=f})(Qr)),Qr}var qi;function Ac(){return qi||(qi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSingle=e.decode=e.encodePacked=e.encodeSingle=e.encode=void 0;const t=be(),n=ke(),s=Vn(),d=(f,r,i,l)=>{try{return(0,s.pack)({types:f,values:r,packed:i,tight:l})}catch(h){throw h instanceof n.ParserError?new n.ParserError(`Unable to encode value: ${h.message}`,h):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(h)}`,h)}};e.encode=d;const u=(f,r)=>(0,e.encode)([f],[r]);e.encodeSingle=u;const c=(f,r,i)=>(0,e.encode)(f,r,!0,i);e.encodePacked=c;const a=(f,r)=>{const i=(0,t.createBytes)(r);try{return(0,s.unpack)(f,i)}catch(l){throw l instanceof n.ParserError?new n.ParserError(`Unable to decode value: ${l.message}`,l):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(l)}`,l)}};e.decode=a;const o=(f,r)=>{const i=(0,e.decode)([f],r);return(0,t.assert)(i.length===1,new n.ParserError("Decoded value array has unexpected length.")),i[0]};e.decodeSingle=o})(Xt)),Xt}var Xe={},un={},Hi;function Tc(){return Hi||(Hi=1,Object.defineProperty(un,"__esModule",{value:!0})),un}var Di;function jc(){return Di||(Di=1,(function(e){var t=Xe&&Xe.__createBinding||(Object.create?(function(s,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(s,c,a)}):(function(s,d,u,c){c===void 0&&(c=u),s[c]=d[u]})),n=Xe&&Xe.__exportStar||function(s,d){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(Tc(),e)})(Xe)),Xe}var Ui;function Fo(){return Ui||(Ui=1,(function(e){var t=Ve&&Ve.__createBinding||(Object.create?(function(s,d,u,c){c===void 0&&(c=u);var a=Object.getOwnPropertyDescriptor(d,u);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[u]}}),Object.defineProperty(s,c,a)}):(function(s,d,u,c){c===void 0&&(c=u),s[c]=d[u]})),n=Ve&&Ve.__exportStar||function(s,d){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(d,u)&&t(d,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ac(),e),n(ke(),e),n(jc(),e)})(Ve)),Ve}var Ae={},ln={},te={},Vi;function Cc(){if(Vi)return te;Vi=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(te,"__esModule",{value:!0}),te.notImplemented=te.bitMask=void 0,te.isBytes=n,te.abytes=s,te.abool=d,te.numberToHexUnpadded=u,te.hexToNumber=c,te.bytesToHex=f,te.hexToBytes=l,te.bytesToNumberBE=h,te.bytesToNumberLE=b,te.numberToBytesBE=v,te.numberToBytesLE=N,te.numberToVarBytesBE=L,te.ensureBytes=z,te.concatBytes=K,te.equalBytes=$,te.utf8ToBytes=S,te.inRange=H,te.aInRange=P,te.bitLen=O,te.bitGet=p,te.bitSet=R,te.createHmacDrbg=x,te.validateObject=M,te.memoized=y;const e=BigInt(0),t=BigInt(1);function n(g){return g instanceof Uint8Array||ArrayBuffer.isView(g)&&g.constructor.name==="Uint8Array"}function s(g){if(!n(g))throw new Error("Uint8Array expected")}function d(g,I){if(typeof I!="boolean")throw new Error(g+" boolean expected, got "+I)}function u(g){const I=g.toString(16);return I.length&1?"0"+I:I}function c(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);return g===""?e:BigInt("0x"+g)}const a=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",o=Array.from({length:256},(g,I)=>I.toString(16).padStart(2,"0"));function f(g){if(s(g),a)return g.toHex();let I="";for(let C=0;C<g.length;C++)I+=o[g[C]];return I}const r={_0:48,_9:57,A:65,F:70,a:97,f:102};function i(g){if(g>=r._0&&g<=r._9)return g-r._0;if(g>=r.A&&g<=r.F)return g-(r.A-10);if(g>=r.a&&g<=r.f)return g-(r.a-10)}function l(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);if(a)return Uint8Array.fromHex(g);const I=g.length,C=I/2;if(I%2)throw new Error("hex string expected, got unpadded hex of length "+I);const q=new Uint8Array(C);for(let m=0,E=0;m<C;m++,E+=2){const _=i(g.charCodeAt(E)),J=i(g.charCodeAt(E+1));if(_===void 0||J===void 0){const U=g[E]+g[E+1];throw new Error('hex string expected, got non-hex character "'+U+'" at index '+E)}q[m]=_*16+J}return q}function h(g){return c(f(g))}function b(g){return s(g),c(f(Uint8Array.from(g).reverse()))}function v(g,I){return l(g.toString(16).padStart(I*2,"0"))}function N(g,I){return v(g,I).reverse()}function L(g){return l(u(g))}function z(g,I,C){let q;if(typeof I=="string")try{q=l(I)}catch(E){throw new Error(g+" must be hex string or Uint8Array, cause: "+E)}else if(n(I))q=Uint8Array.from(I);else throw new Error(g+" must be hex string or Uint8Array");const m=q.length;if(typeof C=="number"&&m!==C)throw new Error(g+" of length "+C+" expected, got "+m);return q}function K(...g){let I=0;for(let q=0;q<g.length;q++){const m=g[q];s(m),I+=m.length}const C=new Uint8Array(I);for(let q=0,m=0;q<g.length;q++){const E=g[q];C.set(E,m),m+=E.length}return C}function $(g,I){if(g.length!==I.length)return!1;let C=0;for(let q=0;q<g.length;q++)C|=g[q]^I[q];return C===0}function S(g){if(typeof g!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(g))}const j=g=>typeof g=="bigint"&&e<=g;function H(g,I,C){return j(g)&&j(I)&&j(C)&&I<=g&&g<C}function P(g,I,C,q){if(!H(I,C,q))throw new Error("expected valid "+g+": "+C+" <= n < "+q+", got "+I)}function O(g){let I;for(I=0;g>e;g>>=t,I+=1);return I}function p(g,I){return g>>BigInt(I)&t}function R(g,I,C){return g|(C?t:e)<<BigInt(I)}const G=g=>(t<<BigInt(g))-t;te.bitMask=G;const A=g=>new Uint8Array(g),B=g=>Uint8Array.from(g);function x(g,I,C){if(typeof g!="number"||g<2)throw new Error("hashLen must be a number");if(typeof I!="number"||I<2)throw new Error("qByteLen must be a number");if(typeof C!="function")throw new Error("hmacFn must be a function");let q=A(g),m=A(g),E=0;const _=()=>{q.fill(1),m.fill(0),E=0},J=(...Q)=>C(m,q,...Q),U=(Q=A(0))=>{m=J(B([0]),Q),q=J(),Q.length!==0&&(m=J(B([1]),Q),q=J())},X=()=>{if(E++>=1e3)throw new Error("drbg: tried 1000 values");let Q=0;const ae=[];for(;Q<I;){q=J();const ce=q.slice();ae.push(ce),Q+=q.length}return K(...ae)};return(Q,ae)=>{_(),U(Q);let ce;for(;!(ce=ae(X()));)U();return _(),ce}}const V={bigint:g=>typeof g=="bigint",function:g=>typeof g=="function",boolean:g=>typeof g=="boolean",string:g=>typeof g=="string",stringOrUint8Array:g=>typeof g=="string"||n(g),isSafeInteger:g=>Number.isSafeInteger(g),array:g=>Array.isArray(g),field:(g,I)=>I.Fp.isValid(g),hash:g=>typeof g=="function"&&Number.isSafeInteger(g.outputLen)};function M(g,I,C={}){const q=(m,E,_)=>{const J=V[E];if(typeof J!="function")throw new Error("invalid validator function");const U=g[m];if(!(_&&U===void 0)&&!J(U,g))throw new Error("param "+String(m)+" is invalid. Expected "+E+", got "+U)};for(const[m,E]of Object.entries(I))q(m,E,!1);for(const[m,E]of Object.entries(C))q(m,E,!0);return g}const k=()=>{throw new Error("not implemented")};te.notImplemented=k;function y(g){const I=new WeakMap;return(C,...q)=>{const m=I.get(C);if(m!==void 0)return m;const E=g(C,...q);return I.set(C,E),E}}return te}var Te={},dn={},ct={},Fi;function xc(){return Fi||(Fi=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.crypto=void 0,ct.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),ct}var zi;function Ot(){return zi||(zi=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=s,e.abytes=d,e.ahash=u,e.aexists=c,e.aoutput=a,e.u8=o,e.u32=f,e.clean=r,e.createView=i,e.rotr=l,e.rotl=h,e.byteSwap=b,e.byteSwap32=v,e.bytesToHex=z,e.hexToBytes=S,e.asyncLoop=H,e.utf8ToBytes=P,e.bytesToUtf8=O,e.toBytes=p,e.kdfInputToBytes=R,e.concatBytes=G,e.checkOpts=A,e.createHasher=x,e.createOptHasher=V,e.createXOFer=M,e.randomBytes=k;const t=xc();function n(y){return y instanceof Uint8Array||ArrayBuffer.isView(y)&&y.constructor.name==="Uint8Array"}function s(y){if(!Number.isSafeInteger(y)||y<0)throw new Error("positive integer expected, got "+y)}function d(y,...g){if(!n(y))throw new Error("Uint8Array expected");if(g.length>0&&!g.includes(y.length))throw new Error("Uint8Array expected of length "+g+", got length="+y.length)}function u(y){if(typeof y!="function"||typeof y.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");s(y.outputLen),s(y.blockLen)}function c(y,g=!0){if(y.destroyed)throw new Error("Hash instance has been destroyed");if(g&&y.finished)throw new Error("Hash#digest() has already been called")}function a(y,g){d(y);const I=g.outputLen;if(y.length<I)throw new Error("digestInto() expects output buffer of length at least "+I)}function o(y){return new Uint8Array(y.buffer,y.byteOffset,y.byteLength)}function f(y){return new Uint32Array(y.buffer,y.byteOffset,Math.floor(y.byteLength/4))}function r(...y){for(let g=0;g<y.length;g++)y[g].fill(0)}function i(y){return new DataView(y.buffer,y.byteOffset,y.byteLength)}function l(y,g){return y<<32-g|y>>>g}function h(y,g){return y<<g|y>>>32-g>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function b(y){return y<<24&4278190080|y<<8&16711680|y>>>8&65280|y>>>24&255}e.swap8IfBE=e.isLE?y=>y:y=>b(y),e.byteSwapIfBE=e.swap8IfBE;function v(y){for(let g=0;g<y.length;g++)y[g]=b(y[g]);return y}e.swap32IfBE=e.isLE?y=>y:v;const N=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",L=Array.from({length:256},(y,g)=>g.toString(16).padStart(2,"0"));function z(y){if(d(y),N)return y.toHex();let g="";for(let I=0;I<y.length;I++)g+=L[y[I]];return g}const K={_0:48,_9:57,A:65,F:70,a:97,f:102};function $(y){if(y>=K._0&&y<=K._9)return y-K._0;if(y>=K.A&&y<=K.F)return y-(K.A-10);if(y>=K.a&&y<=K.f)return y-(K.a-10)}function S(y){if(typeof y!="string")throw new Error("hex string expected, got "+typeof y);if(N)return Uint8Array.fromHex(y);const g=y.length,I=g/2;if(g%2)throw new Error("hex string expected, got unpadded hex of length "+g);const C=new Uint8Array(I);for(let q=0,m=0;q<I;q++,m+=2){const E=$(y.charCodeAt(m)),_=$(y.charCodeAt(m+1));if(E===void 0||_===void 0){const J=y[m]+y[m+1];throw new Error('hex string expected, got non-hex character "'+J+'" at index '+m)}C[q]=E*16+_}return C}const j=async()=>{};e.nextTick=j;async function H(y,g,I){let C=Date.now();for(let q=0;q<y;q++){I(q);const m=Date.now()-C;m>=0&&m<g||(await(0,e.nextTick)(),C+=m)}}function P(y){if(typeof y!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(y))}function O(y){return new TextDecoder().decode(y)}function p(y){return typeof y=="string"&&(y=P(y)),d(y),y}function R(y){return typeof y=="string"&&(y=P(y)),d(y),y}function G(...y){let g=0;for(let C=0;C<y.length;C++){const q=y[C];d(q),g+=q.length}const I=new Uint8Array(g);for(let C=0,q=0;C<y.length;C++){const m=y[C];I.set(m,q),q+=m.length}return I}function A(y,g){if(g!==void 0&&{}.toString.call(g)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(y,g)}class B{}e.Hash=B;function x(y){const g=C=>y().update(p(C)).digest(),I=y();return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=()=>y(),g}function V(y){const g=(C,q)=>y(q).update(p(C)).digest(),I=y({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=C=>y(C),g}function M(y){const g=(C,q)=>y(q).update(p(C)).digest(),I=y({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=C=>y(C),g}e.wrapConstructor=x,e.wrapConstructorWithOpts=V,e.wrapXOFConstructorWithOpts=M;function k(y=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(y));if(t.crypto&&typeof t.crypto.randomBytes=="function")return Uint8Array.from(t.crypto.randomBytes(y));throw new Error("crypto.getRandomValues must be defined")}})(dn)),dn}var Ji;function Pc(){if(Ji)return Te;Ji=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.aoutput=Te.anumber=Te.aexists=Te.abytes=void 0;const e=Ot();return Te.abytes=e.abytes,Te.aexists=e.aexists,Te.anumber=e.anumber,Te.aoutput=e.aoutput,Te}var Gi;function zo(){return Gi||(Gi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.assertBytes=e.assertBool=e.utf8ToBytes=e.toHex=e.createView=e.concatBytes=e.bytesToHex=void 0,e.bytesToUtf8=u,e.hexToBytes=c,e.equalsBytes=a,e.wrapHash=o;const t=Cc();Object.defineProperty(e,"assertBool",{enumerable:!0,get:function(){return t.abool}});const n=Pc();Object.defineProperty(e,"assertBytes",{enumerable:!0,get:function(){return n.abytes}});const s=Ot();var d=Ot();Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return d.concatBytes}}),Object.defineProperty(e,"createView",{enumerable:!0,get:function(){return d.createView}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return d.utf8ToBytes}});function u(f){if(!(f instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof f}`);return new TextDecoder().decode(f)}function c(f){const r=f.startsWith("0x")?f.substring(2):f;return(0,s.hexToBytes)(r)}function a(f,r){if(f.length!==r.length)return!1;for(let i=0;i<f.length;i++)if(f[i]!==r[i])return!1;return!0}function o(f){return r=>((0,n.abytes)(r),f(r))}})(ln)),ln}var Xi;function vt(){if(Xi)return Ae;Xi=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.compare=Ae.concat=Ae.toHex=Ae.toBytes=void 0;const e=zo();function t(u){return u instanceof Uint8Array?u:typeof u=="string"?(0,e.hexToBytes)(u):new Uint8Array(u)}Ae.toBytes=t;function n(u){return typeof u=="string"?((0,e.hexToBytes)(u),u.replace(/^(0x)?/,"0x")):u instanceof Uint8Array?"0x"+(0,e.bytesToHex)(u):"0x"+(0,e.bytesToHex)(new Uint8Array(u))}Ae.toHex=n;function s(u){return(0,e.concatBytes)(...u.map(t))}Ae.concat=s;function d(u,c){const a=BigInt(n(u))-BigInt(n(c));return a>0?1:a<0?-1:0}return Ae.compare=d,Ae}var ge={},qe={},je={},ne={},Z={},Wi;function Oc(){if(Wi)return Z;Wi=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.toBig=Z.shrSL=Z.shrSH=Z.rotrSL=Z.rotrSH=Z.rotrBL=Z.rotrBH=Z.rotr32L=Z.rotr32H=Z.rotlSL=Z.rotlSH=Z.rotlBL=Z.rotlBH=Z.add5L=Z.add5H=Z.add4L=Z.add4H=Z.add3L=Z.add3H=void 0,Z.add=L,Z.fromBig=n,Z.split=s;const e=BigInt(2**32-1),t=BigInt(32);function n(O,p=!1){return p?{h:Number(O&e),l:Number(O>>t&e)}:{h:Number(O>>t&e)|0,l:Number(O&e)|0}}function s(O,p=!1){const R=O.length;let G=new Uint32Array(R),A=new Uint32Array(R);for(let B=0;B<R;B++){const{h:x,l:V}=n(O[B],p);[G[B],A[B]]=[x,V]}return[G,A]}const d=(O,p)=>BigInt(O>>>0)<<t|BigInt(p>>>0);Z.toBig=d;const u=(O,p,R)=>O>>>R;Z.shrSH=u;const c=(O,p,R)=>O<<32-R|p>>>R;Z.shrSL=c;const a=(O,p,R)=>O>>>R|p<<32-R;Z.rotrSH=a;const o=(O,p,R)=>O<<32-R|p>>>R;Z.rotrSL=o;const f=(O,p,R)=>O<<64-R|p>>>R-32;Z.rotrBH=f;const r=(O,p,R)=>O>>>R-32|p<<64-R;Z.rotrBL=r;const i=(O,p)=>p;Z.rotr32H=i;const l=(O,p)=>O;Z.rotr32L=l;const h=(O,p,R)=>O<<R|p>>>32-R;Z.rotlSH=h;const b=(O,p,R)=>p<<R|O>>>32-R;Z.rotlSL=b;const v=(O,p,R)=>p<<R-32|O>>>64-R;Z.rotlBH=v;const N=(O,p,R)=>O<<R-32|p>>>64-R;Z.rotlBL=N;function L(O,p,R,G){const A=(p>>>0)+(G>>>0);return{h:O+R+(A/2**32|0)|0,l:A|0}}const z=(O,p,R)=>(O>>>0)+(p>>>0)+(R>>>0);Z.add3L=z;const K=(O,p,R,G)=>p+R+G+(O/2**32|0)|0;Z.add3H=K;const $=(O,p,R,G)=>(O>>>0)+(p>>>0)+(R>>>0)+(G>>>0);Z.add4L=$;const S=(O,p,R,G,A)=>p+R+G+A+(O/2**32|0)|0;Z.add4H=S;const j=(O,p,R,G,A)=>(O>>>0)+(p>>>0)+(R>>>0)+(G>>>0)+(A>>>0);Z.add5L=j;const H=(O,p,R,G,A,B)=>p+R+G+A+B+(O/2**32|0)|0;Z.add5H=H;const P={fromBig:n,split:s,toBig:d,shrSH:u,shrSL:c,rotrSH:a,rotrSL:o,rotrBH:f,rotrBL:r,rotr32H:i,rotr32L:l,rotlSH:h,rotlSL:b,rotlBH:v,rotlBL:N,add:L,add3L:z,add3H:K,add4L:$,add4H:S,add5H:H,add5L:j};return Z.default=P,Z}var Ki;function kc(){if(Ki)return ne;Ki=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.shake256=ne.shake128=ne.keccak_512=ne.keccak_384=ne.keccak_256=ne.keccak_224=ne.sha3_512=ne.sha3_384=ne.sha3_256=ne.sha3_224=ne.Keccak=void 0,ne.keccakP=N;const e=Oc(),t=Ot(),n=BigInt(0),s=BigInt(1),d=BigInt(2),u=BigInt(7),c=BigInt(256),a=BigInt(113),o=[],f=[],r=[];for(let $=0,S=s,j=1,H=0;$<24;$++){[j,H]=[H,(2*j+3*H)%5],o.push(2*(5*H+j)),f.push(($+1)*($+2)/2%64);let P=n;for(let O=0;O<7;O++)S=(S<<s^(S>>u)*a)%c,S&d&&(P^=s<<(s<<BigInt(O))-s);r.push(P)}const i=(0,e.split)(r,!0),l=i[0],h=i[1],b=($,S,j)=>j>32?(0,e.rotlBH)($,S,j):(0,e.rotlSH)($,S,j),v=($,S,j)=>j>32?(0,e.rotlBL)($,S,j):(0,e.rotlSL)($,S,j);function N($,S=24){const j=new Uint32Array(10);for(let H=24-S;H<24;H++){for(let p=0;p<10;p++)j[p]=$[p]^$[p+10]^$[p+20]^$[p+30]^$[p+40];for(let p=0;p<10;p+=2){const R=(p+8)%10,G=(p+2)%10,A=j[G],B=j[G+1],x=b(A,B,1)^j[R],V=v(A,B,1)^j[R+1];for(let M=0;M<50;M+=10)$[p+M]^=x,$[p+M+1]^=V}let P=$[2],O=$[3];for(let p=0;p<24;p++){const R=f[p],G=b(P,O,R),A=v(P,O,R),B=o[p];P=$[B],O=$[B+1],$[B]=G,$[B+1]=A}for(let p=0;p<50;p+=10){for(let R=0;R<10;R++)j[R]=$[p+R];for(let R=0;R<10;R++)$[p+R]^=~j[(R+2)%10]&j[(R+4)%10]}$[0]^=l[H],$[1]^=h[H]}(0,t.clean)(j)}class L extends t.Hash{constructor(S,j,H,P=!1,O=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=S,this.suffix=j,this.outputLen=H,this.enableXOF=P,this.rounds=O,(0,t.anumber)(H),!(0<S&&S<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,t.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,t.swap32IfBE)(this.state32),N(this.state32,this.rounds),(0,t.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(S){(0,t.aexists)(this),S=(0,t.toBytes)(S),(0,t.abytes)(S);const{blockLen:j,state:H}=this,P=S.length;for(let O=0;O<P;){const p=Math.min(j-this.pos,P-O);for(let R=0;R<p;R++)H[this.pos++]^=S[O++];this.pos===j&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:S,suffix:j,pos:H,blockLen:P}=this;S[H]^=j,(j&128)!==0&&H===P-1&&this.keccak(),S[P-1]^=128,this.keccak()}writeInto(S){(0,t.aexists)(this,!1),(0,t.abytes)(S),this.finish();const j=this.state,{blockLen:H}=this;for(let P=0,O=S.length;P<O;){this.posOut>=H&&this.keccak();const p=Math.min(H-this.posOut,O-P);S.set(j.subarray(this.posOut,this.posOut+p),P),this.posOut+=p,P+=p}return S}xofInto(S){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(S)}xof(S){return(0,t.anumber)(S),this.xofInto(new Uint8Array(S))}digestInto(S){if((0,t.aoutput)(S,this),this.finished)throw new Error("digest() was already called");return this.writeInto(S),this.destroy(),S}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,t.clean)(this.state)}_cloneInto(S){const{blockLen:j,suffix:H,outputLen:P,rounds:O,enableXOF:p}=this;return S||(S=new L(j,H,P,p,O)),S.state32.set(this.state32),S.pos=this.pos,S.posOut=this.posOut,S.finished=this.finished,S.rounds=O,S.suffix=H,S.outputLen=P,S.enableXOF=p,S.destroyed=this.destroyed,S}}ne.Keccak=L;const z=($,S,j)=>(0,t.createHasher)(()=>new L(S,$,j));ne.sha3_224=z(6,144,224/8),ne.sha3_256=z(6,136,256/8),ne.sha3_384=z(6,104,384/8),ne.sha3_512=z(6,72,512/8),ne.keccak_224=z(1,144,224/8),ne.keccak_256=z(1,136,256/8),ne.keccak_384=z(1,104,384/8),ne.keccak_512=z(1,72,512/8);const K=($,S,j)=>(0,t.createXOFer)((H={})=>new L(S,$,H.dkLen===void 0?j:H.dkLen,!0));return ne.shake128=K(31,168,128/8),ne.shake256=K(31,136,256/8),ne}var Yi;function Bc(){if(Yi)return je;Yi=1,Object.defineProperty(je,"__esModule",{value:!0}),je.keccak512=je.keccak384=je.keccak256=je.keccak224=void 0;const e=kc(),t=zo();return je.keccak224=(0,t.wrapHash)(e.keccak_224),je.keccak256=(()=>{const n=(0,t.wrapHash)(e.keccak_256);return n.create=e.keccak_256.create,n})(),je.keccak384=(0,t.wrapHash)(e.keccak_384),je.keccak512=(0,t.wrapHash)(e.keccak_512),je}var Zi;function Jo(){if(Zi)return qe;Zi=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.standardNodeHash=qe.standardLeafHash=qe.keccak256=void 0;const e=Fo(),t=Bc(),n=vt();function s(c){return(0,n.toHex)((0,t.keccak256)((0,n.toBytes)(c)))}qe.keccak256=s;function d(c,a){return s(s((0,e.encode)(c,a)))}qe.standardLeafHash=d;function u(c,a){return s((0,n.concat)([c,a].sort(n.compare)))}return qe.standardNodeHash=u,qe}var Se={},Qi;function Ut(){if(Qi)return Se;Qi=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.invariant=Se.validateArgument=Se.InvalidArgumentError=Se.InvariantError=Se.throwError=void 0;function e(u){throw new Error(u)}Se.throwError=e;class t extends Error{constructor(c){super(c),this.name="InvariantError"}}Se.InvariantError=t;class n extends Error{constructor(c){super(c),this.name="InvalidArgumentError"}}Se.InvalidArgumentError=n;function s(u,c){if(!u)throw new n(c)}Se.validateArgument=s;function d(u,c){if(!u)throw new t(c)}return Se.invariant=d,Se}var eo;function Fn(){if(eo)return ge;eo=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.renderMerkleTree=ge.isValidMerkleTree=ge.processMultiProof=ge.getMultiProof=ge.processProof=ge.getProof=ge.makeMerkleTree=void 0;const e=vt(),t=Jo(),n=Ut(),s=$=>2*$+1,d=$=>2*$+2,u=$=>$>0?Math.floor(($-1)/2):(0,n.throwError)("Root has no parent"),c=$=>$>0?$-(-1)**($%2):(0,n.throwError)("Root has no siblings"),a=($,S)=>S>=0&&S<$.length,o=($,S)=>a($,s(S)),f=($,S)=>a($,S)&&!o($,S),r=$=>(0,e.toBytes)($).length===32,i=($,S)=>void(f($,S)||(0,n.throwError)("Index is not a leaf")),l=$=>void(r($)||(0,n.throwError)("Merkle tree nodes must be Uint8Array of length 32"));function h($,S=t.standardNodeHash){$.forEach(l),(0,n.validateArgument)($.length!==0,"Expected non-zero number of leaves");const j=new Array(2*$.length-1);for(const[H,P]of $.entries())j[j.length-1-H]=(0,e.toHex)(P);for(let H=j.length-1-$.length;H>=0;H--)j[H]=S(j[s(H)],j[d(H)]);return j}ge.makeMerkleTree=h;function b($,S){i($,S);const j=[];for(;S>0;)j.push((0,e.toHex)($[c(S)])),S=u(S);return j}ge.getProof=b;function v($,S,j=t.standardNodeHash){return l($),S.forEach(l),(0,e.toHex)(S.reduce(j,$))}ge.processProof=v;function N($,S){S.forEach(O=>i($,O)),S.sort((O,p)=>p-O),(0,n.validateArgument)(S.slice(1).every((O,p)=>O!==S[p]),"Cannot prove duplicated index");const j=Array.from(S),H=[],P=[];for(;j.length>0&&j[0]>0;){const O=j.shift(),p=c(O),R=u(O);p===j[0]?(P.push(!0),j.shift()):(P.push(!1),H.push((0,e.toHex)($[p]))),j.push(R)}return S.length===0&&H.push((0,e.toHex)($[0])),{leaves:S.map(O=>(0,e.toHex)($[O])),proof:H,proofFlags:P}}ge.getMultiProof=N;function L($,S=t.standardNodeHash){$.leaves.forEach(l),$.proof.forEach(l),(0,n.validateArgument)($.proof.length>=$.proofFlags.filter(P=>!P).length,"Invalid multiproof format"),(0,n.validateArgument)($.leaves.length+$.proof.length===$.proofFlags.length+1,"Provided leaves and multiproof are not compatible");const j=Array.from($.leaves),H=Array.from($.proof);for(const P of $.proofFlags){const O=j.shift(),p=P?j.shift():H.shift();(0,n.invariant)(O!==void 0&&p!==void 0),j.push(S(O,p))}return(0,n.invariant)(j.length+H.length===1),(0,e.toHex)(j.pop()??H.shift())}ge.processMultiProof=L;function z($,S=t.standardNodeHash){for(const[j,H]of $.entries()){if(!r(H))return!1;const P=s(j),O=d(j);if(O>=$.length){if(P<$.length)return!1}else if((0,e.compare)(H,S($[P],$[O])))return!1}return $.length>0}ge.isValidMerkleTree=z;function K($){(0,n.validateArgument)($.length!==0,"Expected non-zero number of nodes");const S=[[0,[]]],j=[];for(;S.length>0;){const[H,P]=S.pop();j.push(P.slice(0,-1).map(O=>[" ","│ "][O]).join("")+P.slice(-1).map(O=>["└─ ","├─ "][O]).join("")+H+") "+(0,e.toHex)($[H])),d(H)<$.length&&(S.push([d(H),P.concat(0)]),S.push([s(H),P.concat(1)]))}return j.join(`
|
|
4
|
-
`)}return ge.renderMerkleTree=K,ge}var ut={},lt={},to;function Lc(){return to||(to=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.defaultOptions=void 0,lt.defaultOptions={sortLeaves:!0}),lt}var ro;function Go(){if(ro)return ut;ro=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.MerkleTreeImpl=void 0;const e=vt(),t=Fn(),n=Lc(),s=Ut();class d{constructor(c,a,o,f){this.tree=c,this.values=a,this.leafHash=o,this.nodeHash=f,(0,s.validateArgument)(a.every(({value:r})=>typeof r!="number"),"Leaf values cannot be numbers"),this.hashLookup=Object.fromEntries(a.map(({treeIndex:r},i)=>[c[r],i]))}static prepare(c,a={},o,f){const r=a.sortLeaves??n.defaultOptions.sortLeaves,i=c.map((b,v)=>({value:b,valueIndex:v,hash:o(b)}));r&&i.sort((b,v)=>(0,e.compare)(b.hash,v.hash));const l=(0,t.makeMerkleTree)(i.map(b=>b.hash),f),h=c.map(b=>({value:b,treeIndex:0}));for(const[b,{valueIndex:v}]of i.entries())h[v].treeIndex=l.length-b-1;return[l,h]}get root(){return this.tree[0]}get length(){return this.values.length}at(c){var a;return(a=this.values.at(c))==null?void 0:a.value}render(){return(0,t.renderMerkleTree)(this.tree)}*entries(){for(const[c,{value:a}]of this.values.entries())yield[c,a]}validate(){this.values.forEach((c,a)=>this._validateValueAt(a)),(0,s.invariant)((0,t.isValidMerkleTree)(this.tree,this.nodeHash),"Merkle tree is invalid")}leafLookup(c){const a=this.hashLookup[this.leafHash(c)];return(0,s.validateArgument)(typeof a<"u","Leaf is not in tree"),a}getProof(c){const a=typeof c=="number"?c:this.leafLookup(c);this._validateValueAt(a);const{treeIndex:o}=this.values[a],f=(0,t.getProof)(this.tree,o);return(0,s.invariant)(this._verify(this.tree[o],f),"Unable to prove value"),f}getMultiProof(c){const a=c.map(r=>typeof r=="number"?r:this.leafLookup(r));for(const r of a)this._validateValueAt(r);const o=a.map(r=>this.values[r].treeIndex),f=(0,t.getMultiProof)(this.tree,o);return(0,s.invariant)(this._verifyMultiProof(f),"Unable to prove values"),{leaves:f.leaves.map(r=>this.values[this.hashLookup[r]].value),proof:f.proof,proofFlags:f.proofFlags}}verify(c,a){return this._verify(this._leafHash(c),a)}verifyMultiProof(c){return this._verifyMultiProof({leaves:c.leaves.map(a=>this._leafHash(a)),proof:c.proof,proofFlags:c.proofFlags})}_validateValueAt(c){const a=this.values[c];(0,s.validateArgument)(a!==void 0,"Index out of bounds"),(0,s.invariant)(this.tree[a.treeIndex]===this.leafHash(a.value),"Merkle tree does not contain the expected value")}_leafHash(c){if(typeof c=="number"){const a=this.values[c];(0,s.validateArgument)(a!==void 0,"Index out of bounds"),c=a.value}return this.leafHash(c)}_verify(c,a){return this.root===(0,t.processProof)(c,a,this.nodeHash)}_verifyMultiProof(c){return this.root===(0,t.processMultiProof)(c,this.nodeHash)}}return ut.MerkleTreeImpl=d,ut}var no;function Nc(){if(no)return Ue;no=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.SimpleMerkleTree=Ue.formatLeaf=void 0;const e=Fo(),t=vt(),n=Fn(),s=Go(),d=Ut();function u(a){return(0,t.toHex)((0,e.encode)(["bytes32"],[a]))}Ue.formatLeaf=u;class c extends s.MerkleTreeImpl{static of(o,f={}){const[r,i]=s.MerkleTreeImpl.prepare(o,f,u,f.nodeHash);return new c(r,i,u,f.nodeHash)}static load(o,f){(0,d.validateArgument)(o.format==="simple-v1",`Unknown format '${o.format}'`),(0,d.validateArgument)(f==null!=(o.hash=="custom"),f?"Data does not expect a custom node hashing function":"Data expects a custom node hashing function");const r=new c(o.tree,o.values,u,f);return r.validate(),r}static verify(o,f,r,i){return(0,t.toHex)(o)===(0,n.processProof)(u(f),r,i)}static verifyMultiProof(o,f,r){return(0,t.toHex)(o)===(0,n.processMultiProof)(f,r)}dump(){return{format:"simple-v1",tree:this.tree,values:this.values.map(({value:o,treeIndex:f})=>({value:(0,t.toHex)(o),treeIndex:f})),...this.nodeHash?{hash:"custom"}:{}}}}return Ue.SimpleMerkleTree=c,Ue}var dt={},so;function Mc(){if(so)return dt;so=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.StandardMerkleTree=void 0;const e=vt(),t=Fn(),n=Go(),s=Jo(),d=Ut();class u extends n.MerkleTreeImpl{constructor(a,o,f){super(a,o,r=>(0,s.standardLeafHash)(f,r)),this.tree=a,this.values=o,this.leafEncoding=f}static of(a,o,f={}){const[r,i]=n.MerkleTreeImpl.prepare(a,f,l=>(0,s.standardLeafHash)(o,l));return new u(r,i,o)}static load(a){(0,d.validateArgument)(a.format==="standard-v1",`Unknown format '${a.format}'`),(0,d.validateArgument)(a.leafEncoding!==void 0,"Expected leaf encoding");const o=new u(a.tree,a.values,a.leafEncoding);return o.validate(),o}static verify(a,o,f,r){return(0,e.toHex)(a)===(0,t.processProof)((0,s.standardLeafHash)(o,f),r)}static verifyMultiProof(a,o,f){return(0,e.toHex)(a)===(0,t.processMultiProof)({leaves:f.leaves.map(r=>(0,s.standardLeafHash)(o,r)),proof:f.proof,proofFlags:f.proofFlags})}dump(){return{format:"standard-v1",leafEncoding:this.leafEncoding,tree:this.tree,values:this.values}}}return dt.StandardMerkleTree=u,dt}var io;function qc(){return io||(io=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StandardMerkleTree=e.SimpleMerkleTree=void 0;var t=Nc();Object.defineProperty(e,"SimpleMerkleTree",{enumerable:!0,get:function(){return t.SimpleMerkleTree}});var n=Mc();Object.defineProperty(e,"StandardMerkleTree",{enumerable:!0,get:function(){return n.StandardMerkleTree}})})(Gt)),Gt}var Hc=qc();const Xo=1,Wo=5,Ko=70,Dc=720*60*60*1e3,Yo=1e6,oo={couponManager:"0x3fd3056ee72a2a85e9392fab3a450e7736536081",collectionDiscountCoupon:"0xc914507fe297b2dddd1232ac3a8903f1c125e794"};function Zo(e){try{const t=Vt(Ft.CouponManager,e),n=Vt(Ft.CollectionDiscountCoupon,e);return{couponManager:{address:t.address,name:t.name,version:t.version,abi:t.abi},collectionDiscountCoupon:n.address}}catch{if(e!==Tn.ChainId.MATIC_MAINNET)return null;const{abi:t}=Vt(Ft.CouponManager,Tn.ChainId.MATIC_AMOY);return{couponManager:{address:oo.couponManager,name:"CouponManager",version:"1.0.0",abi:t},collectionDiscountCoupon:oo.collectionDiscountCoupon}}}function zn(e){return[...new Set(e.map(t=>t.toLowerCase()))]}function Uc(e){const t=zn(e);if(t.length===0)throw new He("collections");return Hc.StandardMerkleTree.of(t.map(n=>[n]),["address"]).root}function Qo(e,t){return wa.encode(["uint256","uint256","bytes32"],[Xo,e,t])}function Vc(){return{Coupon:[{name:"checks",type:"Checks"},{name:"couponAddress",type:"address"},{name:"data",type:"bytes"}],Checks:Qn.Checks,ExternalCheck:Qn.ExternalCheck}}const kt=e=>Math.floor(e/1e3);function Fc(e,t){return{name:t.couponManager.name,version:t.couponManager.version,salt:bt(Co(e),32),verifyingContract:t.couponManager.address}}function zc(e,t,n){return{checks:{uses:e.uses,expiration:kt(e.expiration),effective:kt(e.effective),salt:bt(e.salt,32),contractSignatureIndex:e.contractSignatureIndex,signerSignatureIndex:e.signerSignatureIndex,allowedRoot:bt(e.allowedRoot||"0x",32),externalChecks:[]},couponAddress:t,data:n}}class He extends Error{constructor(t){super(`Invalid sale: ${t}`),this.problem=t,this.name="SaleInputError"}}function ea(e,t=Date.now()){if(zn(e.collections).length===0)throw new He("collections");if(!Number.isInteger(e.discountPct)||e.discountPct<Wo||e.discountPct>Ko)throw new He("pct");const n=e.startsAtMs??t;if(!(e.endsAtMs>t)||!(e.endsAtMs>n))throw new He("window");if(e.endsAtMs-Math.max(n,t)>Dc)throw new He("duration");if(e.uses!==void 0&&(!Number.isInteger(e.uses)||e.uses<1))throw new He("uses")}const Jc=["function contractSignatureIndex() view returns (uint256)","function signerSignatureIndex(address) view returns (uint256)"];async function Gc(e,t){const n=new jo(e,Jc,ba()),[s,d]=await Promise.all([n.contractSignatureIndex(),n.signerSignatureIndex(t)]);return{contractSignatureIndex:s.toNumber(),signerSignatureIndex:d.toNumber()}}async function Xc(e,t={}){const n=t.now?t.now():Date.now();ea(e,n);const s=Zo(e.chainId);if(!s)throw new Error(`Coupons are not available on chain ${e.chainId}`);const d=(await e.signer.getAddress()).toLowerCase(),u=zn(e.collections),c=await(t.readIndexes??Gc)(s.couponManager.address,d),a={uses:e.uses??Yo,expiration:e.endsAtMs,effective:e.startsAtMs??n,salt:Co(Ea(32)),contractSignatureIndex:c.contractSignatureIndex,signerSignatureIndex:c.signerSignatureIndex,allowedRoot:"0x",externalChecks:[]},o=e.discountPct*1e4,f=Qo(o,Uc(u)),r=await e.signer._signTypedData(Fc(e.chainId,s),Vc(),zc(a,s.collectionDiscountCoupon,f));return{signer:d,chainId:e.chainId,network:Tn.Network.MATIC,checks:a,couponAddress:s.collectionDiscountCoupon,discountType:Xo,discount:o,collections:u,signature:r}}async function Wc(e,t){const n=await sa(`${xn.marketplaceServerUrl}/v1/coupons`,{method:"POST",identity:t,metadata:{signer:"dcl:marketplace",intent:"dcl:create-coupon"},headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await n.json().catch(()=>({}));if(!n.ok||!s.ok||!s.data)throw new Error(s.message??`postCoupon ${n.status}`);return s.data}async function Kc(e){var s;const t=await fetch(`${xn.marketplaceServerUrl}/v1/coupons?signer=${e.toLowerCase()}`);if(!t.ok)throw(s=t.body)==null||s.cancel(),new Error(`fetchCreatorSales ${t.status}`);return(await t.json()).data??[]}function Yc(e){return e.checks.uses<Yo}function Zc(e,t=Date.now()){return e.status==="cancelled"||e.status==="revoked"||e.status==="exhausted"?e.status:e.checks.expiration<=t?"ended":e.checks.effective>t?"scheduled":"active"}async function Qc(e){const{sale:t,signer:n}=e;await na(n.provider,t.chainId);const s=Zo(t.chainId);if(!s)throw new Error(`Coupons are not available on chain ${t.chainId}`);const d=new jo(s.couponManager.address,s.couponManager.abi,n),u={signature:t.signature,checks:{uses:t.checks.uses,expiration:kt(t.checks.expiration),effective:kt(t.checks.effective),salt:bt(t.checks.salt,32),contractSignatureIndex:t.checks.contractSignatureIndex,signerSignatureIndex:t.checks.signerSignatureIndex,allowedRoot:bt(t.checks.allowedRoot||"0x",32),allowedProof:[],externalChecks:[]},couponAddress:t.couponAddress,data:Qo(t.discount,t.root),callerData:"0x"};return(await(await d.cancelSignature([u],ya(t.chainId))).wait()).transactionHash}function xt(e){return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(e))}const ft=W.div`
|
|
1
|
+
import{f as bo,b as ea,r as oe,j as E}from"./react-BJuMEjl2.js";import{M as ta,ba as ra,c as Tn,h as wo,j as Eo,d$ as na,e0 as So,b as sa,L as ia,a as T,s as W,I as We,n as oa,aG as vo,t as D,bV as Ze,b_ as $t,z as Vt,F as Jn,bZ as _n,e1 as aa,O as Pt,aP as $n,l as Ro,bE as _o,cm as ca,H as Ft,w as ua}from"./index-Rj6xitw3.js";import{S as $o,c as la,i as da,D as Gn,a as fa}from"./SaleCountdown-75C7xcxV.js";import{f as Io}from"./errors-DgTO8Pwf.js";import{m as ha}from"./mana-matic-CEqvSwrJ.js";import{T as Ao}from"./Tooltip-CXZh9bO7.js";import{E as Xn}from"./ErrorNotice-QFoLzcXZ.js";import{f as pa}from"./browseLayout.styles-DH4Un0Jq.js";import{B as Wn,d as ga}from"./dcl-schemas-Bm7CwtMo.js";import{r as ma}from"./sha3-DF3IgY7u.js";import{r as ya}from"./browser-D_g_kata.js";import{p as ba}from"./sentry-Cv7iYFas.js";import{k as wa,r as Ea,O as Kn}from"./trade-encoding-DWpimiL1.js";import{a as bt,h as To,r as Sa,C as jo,k as va}from"./ethers-CCCzUGvE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5ae49b56-9a63-43f3-9e10-ddb93cdd7ee1",e._sentryDebugIdIdentifier="sentry-dbid-5ae49b56-9a63-43f3-9e10-ddb93cdd7ee1")}catch{}})();var zt={},Ue={},Ve={},Jt={},Fe={},Re={},ze={},tt={},Yn;function Co(){if(Yn)return tt;Yn=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.StructError=void 0;class e extends TypeError{constructor(n,s){let d;const{message:c,explanation:u,...a}=n,{path:o}=n,f=o.length===0?c:`At path: ${o.join(".")} -- ${c}`;super(u??f),u!=null&&(this.cause=f),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>d??(d=[n,...s()])}}return tt.StructError=e,tt}var fe={},he={},Zn;function Lt(){if(Zn)return he;Zn=1,Object.defineProperty(he,"__esModule",{value:!0}),he.run=he.toFailures=he.toFailure=he.shiftIterator=he.print=he.isPlainObject=he.isObject=void 0;function e(o){return t(o)&&typeof o[Symbol.iterator]=="function"}function t(o){return typeof o=="object"&&o!==null}he.isObject=t;function n(o){if(Object.prototype.toString.call(o)!=="[object Object]")return!1;const f=Object.getPrototypeOf(o);return f===null||f===Object.prototype}he.isPlainObject=n;function s(o){return typeof o=="symbol"?o.toString():typeof o=="string"?JSON.stringify(o):`${o}`}he.print=s;function d(o){const{done:f,value:r}=o.next();return f?void 0:r}he.shiftIterator=d;function c(o,f,r,i){if(o===!0)return;o===!1?o={}:typeof o=="string"&&(o={message:o});const{path:l,branch:h}=f,{type:b}=r,{refinement:v,message:N=`Expected a value of type \`${b}\`${v?` with refinement \`${v}\``:""}, but received: \`${s(i)}\``}=o;return{value:i,type:b,refinement:v,key:l[l.length-1],path:l,branch:h,...o,message:N}}he.toFailure=c;function*u(o,f,r,i){e(o)||(o=[o]);for(const l of o){const h=c(l,f,r,i);h&&(yield h)}}he.toFailures=u;function*a(o,f,r={}){const{path:i=[],branch:l=[o],coerce:h=!1,mask:b=!1}=r,v={path:i,branch:l};if(h&&(o=f.coercer(o,v),b&&f.type!=="type"&&t(f.schema)&&t(o)&&!Array.isArray(o)))for(const B in o)f.schema[B]===void 0&&delete o[B];let N="valid";for(const B of f.validator(o,v))B.explanation=r.message,N="not_valid",yield[B,void 0];for(let[B,z,K]of f.entries(o,v)){const $=a(z,K,{path:B===void 0?i:[...i,B],branch:B===void 0?l:[...l,z],coerce:h,mask:b,message:r.message});for(const S of $)S[0]?(N=S[0].refinement===null||S[0].refinement===void 0?"not_valid":"not_refined",yield[S[0],void 0]):h&&(z=S[1],B===void 0?o=z:o instanceof Map?o.set(B,z):o instanceof Set?o.add(z):t(o)&&(z!==void 0||B in o)&&(o[B]=z))}if(N!=="not_valid")for(const B of f.refiner(o,v))B.explanation=r.message,N="not_refined",yield[B,void 0];N==="valid"&&(yield[void 0,o])}return he.run=a,he}var Qn;function wt(){if(Qn)return fe;Qn=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.validate=fe.is=fe.mask=fe.create=fe.assert=fe.ExactOptionalStruct=fe.Struct=void 0;const e=Co(),t=Lt();class n{constructor(i){const{type:l,schema:h,validator:b,refiner:v,coercer:N=z=>z,entries:B=function*(){}}=i;this.type=l,this.schema=h,this.entries=B,this.coercer=N,b?this.validator=(z,K)=>{const $=b(z,K);return(0,t.toFailures)($,K,this,z)}:this.validator=()=>[],v?this.refiner=(z,K)=>{const $=v(z,K);return(0,t.toFailures)($,K,this,z)}:this.refiner=()=>[]}assert(i,l){return c(i,this,l)}create(i,l){return u(i,this,l)}is(i){return o(i,this)}mask(i,l){return a(i,this,l)}validate(i,l={}){return f(i,this,l)}}fe.Struct=n;const s="EXACT_OPTIONAL";class d extends n{constructor(i){super({...i,type:`exact optional ${i.type}`}),this.brand=s}static isExactOptional(i){return(0,t.isObject)(i)&&"brand"in i&&i.brand===s}}fe.ExactOptionalStruct=d;function c(r,i,l){const h=f(r,i,{message:l});if(h[0])throw h[0]}fe.assert=c;function u(r,i,l){const h=f(r,i,{coerce:!0,message:l});if(h[0])throw h[0];return h[1]}fe.create=u;function a(r,i,l){const h=f(r,i,{coerce:!0,mask:!0,message:l});if(h[0])throw h[0];return h[1]}fe.mask=a;function o(r,i){return!f(r,i)[0]}fe.is=o;function f(r,i,l={}){const h=(0,t.run)(r,i,l),b=(0,t.shiftIterator)(h);return b[0]?[new e.StructError(b[0],function*(){for(const B of h)B[0]&&(yield B[0])}),void 0]:[void 0,b[1]]}return fe.validate=f,fe}var Be={},Y={},ue={},es;function xo(){if(es)return ue;es=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.pick=ue.partial=ue.omit=ue.lazy=ue.dynamic=ue.deprecated=ue.define=ue.assign=void 0;const e=wt(),t=jn();function n(...r){var b;const i=((b=r[0])==null?void 0:b.type)==="type",l=r.map(({schema:v})=>v),h=Object.assign({},...l);return i?(0,t.type)(h):(0,t.object)(h)}ue.assign=n;function s(r,i){return new e.Struct({type:r,schema:null,validator:i})}ue.define=s;function d(r,i){return new e.Struct({...r,refiner:(l,h)=>l===void 0||r.refiner(l,h),validator(l,h){return l===void 0?!0:(i(l,h),r.validator(l,h))}})}ue.deprecated=d;function c(r){return new e.Struct({type:"dynamic",schema:null,*entries(i,l){yield*r(i,l).entries(i,l)},validator(i,l){return r(i,l).validator(i,l)},coercer(i,l){return r(i,l).coercer(i,l)},refiner(i,l){return r(i,l).refiner(i,l)}})}ue.dynamic=c;function u(r){let i;return new e.Struct({type:"lazy",schema:null,*entries(l,h){i??(i=r()),yield*i.entries(l,h)},validator(l,h){return i??(i=r()),i.validator(l,h)},coercer(l,h){return i??(i=r()),i.coercer(l,h)},refiner(l,h){return i??(i=r()),i.refiner(l,h)}})}ue.lazy=u;function a(r,i){const{schema:l}=r,h={...l};for(const b of i)delete h[b];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}ue.omit=a;function o(r){const i=r instanceof e.Struct,l=i?{...r.schema}:{...r};for(const h in l)l[h]=(0,t.optional)(l[h]);return i&&r.type==="type"?(0,t.type)(l):(0,t.object)(l)}ue.partial=o;function f(r,i){const{schema:l}=r,h={};for(const b of i)h[b]=l[b];switch(r.type){case"type":return(0,t.type)(h);default:return(0,t.object)(h)}}return ue.pick=f,ue}var ts;function jn(){if(ts)return Y;ts=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.unknown=Y.union=Y.type=Y.tuple=Y.string=Y.set=Y.regexp=Y.record=Y.exactOptional=Y.optional=Y.object=Y.number=Y.nullable=Y.never=Y.map=Y.literal=Y.intersection=Y.integer=Y.instance=Y.func=Y.enums=Y.date=Y.boolean=Y.bigint=Y.array=Y.any=void 0;const e=wt(),t=Lt(),n=xo();function s(){return(0,n.define)("any",()=>!0)}Y.any=s;function d(A){return new e.Struct({type:"array",schema:A,*entries(L){if(A&&Array.isArray(L))for(const[x,V]of L.entries())yield[x,V,A]},coercer(L){return Array.isArray(L)?L.slice():L},validator(L){return Array.isArray(L)||`Expected an array value, but received: ${(0,t.print)(L)}`}})}Y.array=d;function c(){return(0,n.define)("bigint",A=>typeof A=="bigint")}Y.bigint=c;function u(){return(0,n.define)("boolean",A=>typeof A=="boolean")}Y.boolean=u;function a(){return(0,n.define)("date",A=>A instanceof Date&&!isNaN(A.getTime())||`Expected a valid \`Date\` object, but received: ${(0,t.print)(A)}`)}Y.date=a;function o(A){const L={},x=A.map(V=>(0,t.print)(V)).join();for(const V of A)L[V]=V;return new e.Struct({type:"enums",schema:L,validator(V){return A.includes(V)||`Expected one of \`${x}\`, but received: ${(0,t.print)(V)}`}})}Y.enums=o;function f(){return(0,n.define)("func",A=>typeof A=="function"||`Expected a function, but received: ${(0,t.print)(A)}`)}Y.func=f;function r(A){return(0,n.define)("instance",L=>L instanceof A||`Expected a \`${A.name}\` instance, but received: ${(0,t.print)(L)}`)}Y.instance=r;function i(){return(0,n.define)("integer",A=>typeof A=="number"&&!isNaN(A)&&Number.isInteger(A)||`Expected an integer, but received: ${(0,t.print)(A)}`)}Y.integer=i;function l(A){return new e.Struct({type:"intersection",schema:null,*entries(L,x){for(const{entries:V}of A)yield*V(L,x)},*validator(L,x){for(const{validator:V}of A)yield*V(L,x)},*refiner(L,x){for(const{refiner:V}of A)yield*V(L,x)}})}Y.intersection=l;function h(A){const L=(0,t.print)(A),x=typeof A;return new e.Struct({type:"literal",schema:x==="string"||x==="number"||x==="boolean"?A:null,validator(V){return V===A||`Expected the literal \`${L}\`, but received: ${(0,t.print)(V)}`}})}Y.literal=h;function b(A,L){return new e.Struct({type:"map",schema:null,*entries(x){if(A&&L&&x instanceof Map)for(const[V,M]of x.entries())yield[V,V,A],yield[V,M,L]},coercer(x){return x instanceof Map?new Map(x):x},validator(x){return x instanceof Map||`Expected a \`Map\` object, but received: ${(0,t.print)(x)}`}})}Y.map=b;function v(){return(0,n.define)("never",()=>!1)}Y.never=v;function N(A){return new e.Struct({...A,validator:(L,x)=>L===null||A.validator(L,x),refiner:(L,x)=>L===null||A.refiner(L,x)})}Y.nullable=N;function B(){return(0,n.define)("number",A=>typeof A=="number"&&!isNaN(A)||`Expected a number, but received: ${(0,t.print)(A)}`)}Y.number=B;function z(A){const L=A?Object.keys(A):[],x=v();return new e.Struct({type:"object",schema:A??null,*entries(V){if(A&&(0,t.isObject)(V)){const M=new Set(Object.keys(V));for(const k of L){M.delete(k);const y=A[k];e.ExactOptionalStruct.isExactOptional(y)&&!Object.prototype.hasOwnProperty.call(V,k)||(yield[k,V[k],A[k]])}for(const k of M)yield[k,V[k],x]}},validator(V){return(0,t.isObject)(V)||`Expected an object, but received: ${(0,t.print)(V)}`},coercer(V){return(0,t.isObject)(V)?{...V}:V}})}Y.object=z;function K(A){return new e.Struct({...A,validator:(L,x)=>L===void 0||A.validator(L,x),refiner:(L,x)=>L===void 0||A.refiner(L,x)})}Y.optional=K;function $(A){return new e.ExactOptionalStruct(A)}Y.exactOptional=$;function S(A,L){return new e.Struct({type:"record",schema:null,*entries(x){if((0,t.isObject)(x))for(const V in x){const M=x[V];yield[V,V,A],yield[V,M,L]}},validator(x){return(0,t.isObject)(x)||`Expected an object, but received: ${(0,t.print)(x)}`}})}Y.record=S;function j(){return(0,n.define)("regexp",A=>A instanceof RegExp)}Y.regexp=j;function H(A){return new e.Struct({type:"set",schema:null,*entries(L){if(A&&L instanceof Set)for(const x of L)yield[x,x,A]},coercer(L){return L instanceof Set?new Set(L):L},validator(L){return L instanceof Set||`Expected a \`Set\` object, but received: ${(0,t.print)(L)}`}})}Y.set=H;function P(){return(0,n.define)("string",A=>typeof A=="string"||`Expected a string, but received: ${(0,t.print)(A)}`)}Y.string=P;function O(A){const L=v();return new e.Struct({type:"tuple",schema:null,*entries(x){if(Array.isArray(x)){const V=Math.max(A.length,x.length);for(let M=0;M<V;M++)yield[M,x[M],A[M]||L]}},validator(x){return Array.isArray(x)||`Expected an array, but received: ${(0,t.print)(x)}`}})}Y.tuple=O;function p(A){const L=Object.keys(A);return new e.Struct({type:"type",schema:A,*entries(x){if((0,t.isObject)(x))for(const V of L)yield[V,x[V],A[V]]},validator(x){return(0,t.isObject)(x)||`Expected an object, but received: ${(0,t.print)(x)}`},coercer(x){return(0,t.isObject)(x)?{...x}:x}})}Y.type=p;function R(A){const L=A.map(x=>x.type).join(" | ");return new e.Struct({type:"union",schema:null,coercer(x){for(const V of A){const[M,k]=V.validate(x,{coerce:!0});if(!M)return k}return x},validator(x,V){const M=[];for(const k of A){const[...y]=(0,t.run)(x,k,V),[g]=y;if(!(g!=null&&g[0]))return[];for(const[I]of y)I&&M.push(I)}return[`Expected the value to satisfy a union of \`${L}\`, but received: ${(0,t.print)(x)}`,...M]}})}Y.union=R;function G(){return(0,n.define)("unknown",()=>!0)}return Y.unknown=G,Y}var rs;function Ra(){if(rs)return Be;rs=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.trimmed=Be.defaulted=Be.coerce=void 0;const e=wt(),t=Lt(),n=jn();function s(u,a,o){return new e.Struct({...u,coercer:(f,r)=>(0,e.is)(f,a)?u.coercer(o(f,r),r):u.coercer(f,r)})}Be.coerce=s;function d(u,a,o={}){return s(u,(0,n.unknown)(),f=>{const r=typeof a=="function"?a():a;if(f===void 0)return r;if(!o.strict&&(0,t.isPlainObject)(f)&&(0,t.isPlainObject)(r)){const i={...f};let l=!1;for(const h in r)i[h]===void 0&&(i[h]=r[h],l=!0);if(l)return i}return f})}Be.defaulted=d;function c(u){return s(u,(0,n.string)(),a=>a.trim())}return Be.trimmed=c,Be}var pe={},ns;function _a(){if(ns)return pe;ns=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.refine=pe.size=pe.pattern=pe.nonempty=pe.min=pe.max=pe.empty=void 0;const e=wt(),t=Lt();function n(r){return f(r,"empty",i=>{const l=s(i);return l===0||`Expected an empty ${r.type} but received one with a size of \`${l}\``})}pe.empty=n;function s(r){return r instanceof Map||r instanceof Set?r.size:r.length}function d(r,i,l={}){const{exclusive:h}=l;return f(r,"max",b=>h?b<i:b<=i||`Expected a ${r.type} less than ${h?"":"or equal to "}${i} but received \`${b}\``)}pe.max=d;function c(r,i,l={}){const{exclusive:h}=l;return f(r,"min",b=>h?b>i:b>=i||`Expected a ${r.type} greater than ${h?"":"or equal to "}${i} but received \`${b}\``)}pe.min=c;function u(r){return f(r,"nonempty",i=>s(i)>0||`Expected a nonempty ${r.type} but received an empty one`)}pe.nonempty=u;function a(r,i){return f(r,"pattern",l=>i.test(l)||`Expected a ${r.type} matching \`/${i.source}/\` but received "${l}"`)}pe.pattern=a;function o(r,i,l=i){const h=`Expected a ${r.type}`,b=i===l?`of \`${i}\``:`between \`${i}\` and \`${l}\``;return f(r,"size",v=>{if(typeof v=="number"||v instanceof Date)return i<=v&&v<=l||`${h} ${b} but received \`${v}\``;if(v instanceof Map||v instanceof Set){const{size:B}=v;return i<=B&&B<=l||`${h} with a size ${b} but received one with a size of \`${B}\``}const{length:N}=v;return i<=N&&N<=l||`${h} with a length ${b} but received one with a length of \`${N}\``})}pe.size=o;function f(r,i,l){return new e.Struct({...r,*refiner(h,b){yield*r.refiner(h,b);const v=l(h,b),N=(0,t.toFailures)(v,b,r,h);for(const B of N)yield{...B,refinement:i}}})}return pe.refine=f,pe}var ss;function Oe(){return ss||(ss=1,(function(e){var t=ze&&ze.__createBinding||(Object.create?(function(s,d,c,u){u===void 0&&(u=c);var a=Object.getOwnPropertyDescriptor(d,c);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[c]}}),Object.defineProperty(s,u,a)}):(function(s,d,c,u){u===void 0&&(u=c),s[u]=d[c]})),n=ze&&ze.__exportStar||function(s,d){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(d,c)&&t(d,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),n(Co(),e),n(wt(),e),n(Ra(),e),n(_a(),e),n(jn(),e),n(xo(),e)})(ze)),ze}var Ee={};class Cn extends Error{constructor(t,{cause:n}={}){super(t),this.name=Cn.name,n&&(this.cause=n),this.message=t}}const $a=Object.freeze(Object.defineProperty({__proto__:null,ErrorWithCause:Cn},Symbol.toStringTag,{value:"Module"})),Ia=bo($a),Aa=(e,t)=>{if(!e||!t||!(e instanceof Error)||!(t.prototype instanceof Error)&&t!==Error)return;const n=new Set;let s=e;for(;s&&!n.has(s);){if(n.add(s),s instanceof t)return s;s=Bt(s)}},Bt=e=>{if(!(!e||typeof e!="object"||!("cause"in e)))if(typeof e.cause=="function"){const t=e.cause();return t instanceof Error?t:void 0}else return e.cause instanceof Error?e.cause:void 0},Po=(e,t)=>{if(!(e instanceof Error))return"";const n=e.stack||"";if(t.has(e))return n+`
|
|
2
|
+
causes have become circular...`;const s=Bt(e);return s?(t.add(e),n+`
|
|
3
|
+
caused by: `+Po(s,t)):n},Ta=e=>Po(e,new Set),Oo=(e,t,n)=>{if(!(e instanceof Error))return"";const s=n?"":e.message||"";if(t.has(e))return s+": ...";const d=Bt(e);if(d){t.add(e);const c="cause"in e&&typeof e.cause=="function";return s+(c?"":": ")+Oo(d,t,c)}else return s},ja=e=>Oo(e,new Set),Ca=Object.freeze(Object.defineProperty({__proto__:null,findCauseByReference:Aa,getErrorCause:Bt,messageWithCauses:ja,stackWithCauses:Ta},Symbol.toStringTag,{value:"Module"})),xa=bo(Ca);var Gt,is;function Pa(){if(is)return Gt;is=1;const{ErrorWithCause:e}=Ia,{findCauseByReference:t,getErrorCause:n,messageWithCauses:s,stackWithCauses:d}=xa;return Gt={ErrorWithCause:e,findCauseByReference:t,getErrorCause:n,stackWithCauses:d,messageWithCauses:s},Gt}var Xt={},os;function xn(){return os||(os=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(r){return Array.isArray(r)&&r.length>0}e.isNonEmptyArray=t;function n(r){return r==null}e.isNullOrUndefined=n;function s(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}e.isObject=s;const d=(r,i)=>Object.hasOwnProperty.call(r,i);e.hasProperty=d;function c(r){return Object.getOwnPropertyNames(r)}e.getKnownPropertyNames=c,(function(r){r[r.Null=4]="Null",r[r.Comma=1]="Comma",r[r.Wrapper=1]="Wrapper",r[r.True=4]="True",r[r.False=5]="False",r[r.Quote=1]="Quote",r[r.Colon=1]="Colon",r[r.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function u(r){if(typeof r!="object"||r===null)return!1;try{let i=r;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(r)===i}catch{return!1}}e.isPlainObject=u;function a(r){return r.charCodeAt(0)<=127}e.isASCII=a;function o(r){return r.split("").reduce((l,h)=>a(h)?l+1:l+2,0)+(r.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length}e.calculateStringSize=o;function f(r){return r.toString().length}e.calculateNumberSize=f})(Xt)),Xt}var as;function ko(){if(as)return Ee;as=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.wrapError=Ee.getErrorMessage=Ee.isErrorWithStack=Ee.isErrorWithMessage=Ee.isErrorWithCode=void 0;const e=Pa(),t=xn();function n(o){return o instanceof Error||(0,t.isObject)(o)&&o.constructor.name==="Error"}function s(o){return typeof o=="object"&&o!==null&&"code"in o}Ee.isErrorWithCode=s;function d(o){return typeof o=="object"&&o!==null&&"message"in o}Ee.isErrorWithMessage=d;function c(o){return typeof o=="object"&&o!==null&&"stack"in o}Ee.isErrorWithStack=c;function u(o){return d(o)&&typeof o.message=="string"?o.message:(0,t.isNullOrUndefined)(o)?"":String(o)}Ee.getErrorMessage=u;function a(o,f){if(n(o)){let r;return Error.length===2?r=new Error(f,{cause:o}):r=new e.ErrorWithCause(f,{cause:o}),s(o)&&(r.code=o.code),r}return f.length>0?new Error(`${String(o)}: ${f}`):new Error(String(o))}return Ee.wrapError=a,Ee}var cs;function De(){if(cs)return Re;cs=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.assertExhaustive=Re.assertStruct=Re.assert=Re.AssertionError=void 0;const e=Oe(),t=ko();function n(f){var r,i;return typeof((i=(r=f==null?void 0:f.prototype)==null?void 0:r.constructor)==null?void 0:i.name)=="string"}function s(f){return(0,t.getErrorMessage)(f).replace(/\.$/u,"")}function d(f,r){return n(f)?new f({message:r}):f({message:r})}class c extends Error{constructor(r){super(r.message),this.code="ERR_ASSERTION"}}Re.AssertionError=c;function u(f,r="Assertion failed.",i=c){if(!f)throw r instanceof Error?r:d(i,r)}Re.assert=u;function a(f,r,i="Assertion failed",l=c){try{(0,e.assert)(f,r)}catch(h){throw d(l,`${i}: ${s(h)}.`)}}Re.assertStruct=a;function o(f){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Re.assertExhaustive=o,Re}var rt={},us;function Lo(){if(us)return rt;us=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.base64=void 0;const e=Oe(),t=De(),n=(s,d={})=>{const c=d.paddingRequired??!1,u=d.characterSet??"base64";let a;u==="base64"?a=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(u==="base64url"),a=String.raw`[-_A-Za-z0-9]`);let o;return c?o=new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):o=new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,e.pattern)(s,o)};return rt.base64=n,rt}var ee={},Wt={},ls;function Oa(){return ls||(ls=1,(function(e){/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.createBase58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64urlnopad=e.base64url=e.base64nopad=e.base64=e.base32crockford=e.base32hexnopad=e.base32hex=e.base32nopad=e.base32=e.base16=e.utils=void 0;function t(m){return m instanceof Uint8Array||ArrayBuffer.isView(m)&&m.constructor.name==="Uint8Array"}function n(m,...w){if(!t(m))throw new Error("Uint8Array expected");if(w.length>0&&!w.includes(m.length))throw new Error("Uint8Array expected of length "+w+", got length="+m.length)}function s(m,w){return Array.isArray(w)?w.length===0?!0:m?w.every(_=>typeof _=="string"):w.every(_=>Number.isSafeInteger(_)):!1}function d(m){if(typeof m!="function")throw new Error("function expected");return!0}function c(m,w){if(typeof w!="string")throw new Error(`${m}: string expected`);return!0}function u(m){if(!Number.isSafeInteger(m))throw new Error(`invalid integer: ${m}`)}function a(m){if(!Array.isArray(m))throw new Error("array expected")}function o(m,w){if(!s(!0,w))throw new Error(`${m}: array of strings expected`)}function f(m,w){if(!s(!1,w))throw new Error(`${m}: array of numbers expected`)}function r(...m){const w=X=>X,_=(X,re)=>Q=>X(re(Q)),J=m.map(X=>X.encode).reduceRight(_,w),U=m.map(X=>X.decode).reduce(_,w);return{encode:J,decode:U}}function i(m){const w=typeof m=="string"?m.split(""):m,_=w.length;o("alphabet",w);const J=new Map(w.map((U,X)=>[U,X]));return{encode:U=>(a(U),U.map(X=>{if(!Number.isSafeInteger(X)||X<0||X>=_)throw new Error(`alphabet.encode: digit index outside alphabet "${X}". Allowed: ${m}`);return w[X]})),decode:U=>(a(U),U.map(X=>{c("alphabet.decode",X);const re=J.get(X);if(re===void 0)throw new Error(`Unknown letter: "${X}". Allowed: ${m}`);return re}))}}function l(m=""){return c("join",m),{encode:w=>(o("join.decode",w),w.join(m)),decode:w=>(c("join.decode",w),w.split(m))}}function h(m,w="="){return u(m),c("padding",w),{encode(_){for(o("padding.encode",_);_.length*m%8;)_.push(w);return _},decode(_){o("padding.decode",_);let J=_.length;if(J*m%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;J>0&&_[J-1]===w;J--)if((J-1)*m%8===0)throw new Error("padding: invalid, string has too much padding");return _.slice(0,J)}}}function b(m){return d(m),{encode:w=>w,decode:w=>m(w)}}function v(m,w,_){if(w<2)throw new Error(`convertRadix: invalid from=${w}, base cannot be less than 2`);if(_<2)throw new Error(`convertRadix: invalid to=${_}, base cannot be less than 2`);if(a(m),!m.length)return[];let J=0;const U=[],X=Array.from(m,Q=>{if(u(Q),Q<0||Q>=w)throw new Error(`invalid integer: ${Q}`);return Q}),re=X.length;for(;;){let Q=0,ae=!0;for(let ce=J;ce<re;ce++){const Le=X[ce],ie=w*Q,se=ie+Le;if(!Number.isSafeInteger(se)||ie/w!==Q||se-Le!==ie)throw new Error("convertRadix: carry overflow");const me=se/_;Q=se%_;const de=Math.floor(me);if(X[ce]=de,!Number.isSafeInteger(de)||de*_+Q!==se)throw new Error("convertRadix: carry overflow");if(ae)de?ae=!1:J=ce;else continue}if(U.push(Q),ae)break}for(let Q=0;Q<m.length-1&&m[Q]===0;Q++)U.push(0);return U.reverse()}const N=(m,w)=>w===0?m:N(w,m%w),B=(m,w)=>m+(w-N(m,w)),z=(()=>{let m=[];for(let w=0;w<40;w++)m.push(2**w);return m})();function K(m,w,_,J){if(a(m),w<=0||w>32)throw new Error(`convertRadix2: wrong from=${w}`);if(_<=0||_>32)throw new Error(`convertRadix2: wrong to=${_}`);if(B(w,_)>32)throw new Error(`convertRadix2: carry overflow from=${w} to=${_} carryBits=${B(w,_)}`);let U=0,X=0;const re=z[w],Q=z[_]-1,ae=[];for(const ce of m){if(u(ce),ce>=re)throw new Error(`convertRadix2: invalid data word=${ce} from=${w}`);if(U=U<<w|ce,X+w>32)throw new Error(`convertRadix2: carry overflow pos=${X} from=${w}`);for(X+=w;X>=_;X-=_)ae.push((U>>X-_&Q)>>>0);const Le=z[X];if(Le===void 0)throw new Error("invalid carry");U&=Le-1}if(U=U<<_-X&Q,!J&&X>=w)throw new Error("Excess padding");if(!J&&U>0)throw new Error(`Non-zero padding: ${U}`);return J&&X>0&&ae.push(U>>>0),ae}function $(m){u(m);const w=2**8;return{encode:_=>{if(!t(_))throw new Error("radix.encode input should be Uint8Array");return v(Array.from(_),w,m)},decode:_=>(f("radix.decode",_),Uint8Array.from(v(_,m,w)))}}function S(m,w=!1){if(u(m),m<=0||m>32)throw new Error("radix2: bits should be in (0..32]");if(B(8,m)>32||B(m,8)>32)throw new Error("radix2: carry overflow");return{encode:_=>{if(!t(_))throw new Error("radix2.encode input should be Uint8Array");return K(Array.from(_),8,m,!w)},decode:_=>(f("radix2.decode",_),Uint8Array.from(K(_,m,8,w)))}}function j(m){return d(m),function(...w){try{return m.apply(null,w)}catch{}}}function H(m,w){return u(m),d(w),{encode(_){if(!t(_))throw new Error("checksum.encode: input should be Uint8Array");const J=w(_).slice(0,m),U=new Uint8Array(_.length+m);return U.set(_),U.set(J,_.length),U},decode(_){if(!t(_))throw new Error("checksum.decode: input should be Uint8Array");const J=_.slice(0,-m),U=_.slice(-m),X=w(J).slice(0,m);for(let re=0;re<m;re++)if(X[re]!==U[re])throw new Error("Invalid checksum");return J}}}e.utils={alphabet:i,chain:r,checksum:H,convertRadix:v,convertRadix2:K,radix:$,radix2:S,join:l,padding:h},e.base16=r(S(4),i("0123456789ABCDEF"),l("")),e.base32=r(S(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),h(5),l("")),e.base32nopad=r(S(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),l("")),e.base32hex=r(S(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),h(5),l("")),e.base32hexnopad=r(S(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),l("")),e.base32crockford=r(S(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),l(""),b(m=>m.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const P=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",O=(m,w)=>{c("base64",m);const _=w?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,J=w?"base64url":"base64";if(m.length>0&&!_.test(m))throw new Error("invalid base64");return Uint8Array.fromBase64(m,{alphabet:J,lastChunkHandling:"strict"})};e.base64=P?{encode(m){return n(m),m.toBase64()},decode(m){return O(m,!1)}}:r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),h(6),l("")),e.base64nopad=r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),l("")),e.base64url=P?{encode(m){return n(m),m.toBase64({alphabet:"base64url"})},decode(m){return O(m,!0)}}:r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),h(6),l("")),e.base64urlnopad=r(S(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),l(""));const p=m=>r($(58),i(m),l(""));e.base58=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base58flickr=p("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),e.base58xrp=p("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const R=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(m){let w="";for(let _=0;_<m.length;_+=8){const J=m.subarray(_,_+8);w+=e.base58.encode(J).padStart(R[J.length],"1")}return w},decode(m){let w=[];for(let _=0;_<m.length;_+=11){const J=m.slice(_,_+11),U=R.indexOf(J.length),X=e.base58.decode(J);for(let re=0;re<X.length-U;re++)if(X[re]!==0)throw new Error("base58xmr: wrong padding");w=w.concat(Array.from(X.slice(X.length-U)))}return Uint8Array.from(w)}};const G=m=>r(H(4,w=>m(m(w))),e.base58);e.createBase58check=G,e.base58check=e.createBase58check;const A=r(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),l("")),L=[996825010,642813549,513874426,1027748829,705979059];function x(m){const w=m>>25;let _=(m&33554431)<<5;for(let J=0;J<L.length;J++)(w>>J&1)===1&&(_^=L[J]);return _}function V(m,w,_=1){const J=m.length;let U=1;for(let X=0;X<J;X++){const re=m.charCodeAt(X);if(re<33||re>126)throw new Error(`Invalid prefix (${m})`);U=x(U)^re>>5}U=x(U);for(let X=0;X<J;X++)U=x(U)^m.charCodeAt(X)&31;for(let X of w)U=x(U)^X;for(let X=0;X<6;X++)U=x(U);return U^=_,A.encode(K([U%z[30]],30,5,!1))}function M(m){const w=m==="bech32"?1:734539939,_=S(5),J=_.decode,U=_.encode,X=j(J);function re(ie,se,me=90){c("bech32.encode prefix",ie),t(se)&&(se=Array.from(se)),f("bech32.encode",se);const de=ie.length;if(de===0)throw new TypeError(`Invalid prefix length ${de}`);const F=de+7+se.length;if(me!==!1&&F>me)throw new TypeError(`Length ${F} exceeds limit ${me}`);const le=ie.toLowerCase(),we=V(le,se,w);return`${le}1${A.encode(se)}${we}`}function Q(ie,se=90){c("bech32.decode input",ie);const me=ie.length;if(me<8||se!==!1&&me>se)throw new TypeError(`invalid string length: ${me} (${ie}). Expected (8..${se})`);const de=ie.toLowerCase();if(ie!==de&&ie!==ie.toUpperCase())throw new Error("String must be lowercase or uppercase");const F=de.lastIndexOf("1");if(F===0||F===-1)throw new Error('Letter "1" must be present between prefix and data only');const le=de.slice(0,F),we=de.slice(F+1);if(we.length<6)throw new Error("Data must be at least 6 characters long");const Ye=A.decode(we).slice(0,-6),ve=V(le,Ye,w);if(!we.endsWith(ve))throw new Error(`Invalid checksum in ${ie}: expected "${ve}"`);return{prefix:le,words:Ye}}const ae=j(Q);function ce(ie){const{prefix:se,words:me}=Q(ie,!1);return{prefix:se,words:me,bytes:J(me)}}function Le(ie,se){return re(ie,U(se))}return{encode:re,decode:Q,encodeFromBytes:Le,decodeToBytes:ce,decodeUnsafe:ae,fromWords:J,fromWordsUnsafe:X,toWords:U}}e.bech32=M("bech32"),e.bech32m=M("bech32m"),e.utf8={encode:m=>new TextDecoder().decode(m),decode:m=>new TextEncoder().encode(m)};const k=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",y={encode(m){return n(m),m.toHex()},decode(m){return c("hex",m),Uint8Array.fromHex(m)}};e.hex=k?y:r(S(4),i("0123456789abcdef"),l(""),b(m=>{if(typeof m!="string"||m.length%2!==0)throw new TypeError(`hex.decode: expected string, got ${typeof m} with length ${m.length}`);return m.toLowerCase()}));const g={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},I="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr",C=(m,w)=>{if(typeof m!="string"||!g.hasOwnProperty(m))throw new TypeError(I);if(!t(w))throw new TypeError("bytesToString() expects Uint8Array");return g[m].encode(w)};e.bytesToString=C,e.str=e.bytesToString;const q=(m,w)=>{if(!g.hasOwnProperty(m))throw new TypeError(I);if(typeof w!="string")throw new TypeError("stringToBytes() expects string");return g[m].decode(w)};e.stringToBytes=q,e.bytes=e.stringToBytes})(Wt)),Wt}var Kt={},ds;function Nt(){return ds||(ds=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const t=Oe(),n=ma(),s=De(),d=Pn();e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-fA-F]{40}$/u);function c(b){return(0,t.is)(b,e.HexStruct)}e.isHexString=c;function u(b){return(0,t.is)(b,e.StrictHexStruct)}e.isStrictHexString=u;function a(b){(0,s.assert)(c(b),"Value must be a hexadecimal string.")}e.assertIsHexString=a;function o(b){(0,s.assert)(u(b),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function f(b){return(0,t.is)(b,e.HexAddressStruct)||i(b)}e.isValidHexAddress=f;function r(b){(0,s.assert)((0,t.is)(b,e.HexChecksumAddressStruct),"Invalid hex address.");const v=h(b.toLowerCase()),N=h((0,d.bytesToHex)((0,n.keccak_256)(v)));return`0x${v.split("").map((B,z)=>{const K=N[z];return(0,s.assert)((0,t.is)(K,(0,t.string)()),"Hash shorter than address."),parseInt(K,16)>7?B.toUpperCase():B}).join("")}`}e.getChecksumAddress=r;function i(b){return(0,t.is)(b,e.HexChecksumAddressStruct)?r(b)===b:!1}e.isValidChecksumAddress=i;function l(b){return b.startsWith("0x")?b:b.startsWith("0X")?`0x${b.substring(2)}`:`0x${b}`}e.add0x=l;function h(b){return b.startsWith("0x")||b.startsWith("0X")?b.substring(2):b}e.remove0x=h})(Kt)),Kt}var fs;function Pn(){if(fs)return ee;fs=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.createDataView=ee.concatBytes=ee.valueToBytes=ee.base64ToBytes=ee.stringToBytes=ee.numberToBytes=ee.signedBigIntToBytes=ee.bigIntToBytes=ee.hexToBytes=ee.bytesToBase64=ee.bytesToString=ee.bytesToNumber=ee.bytesToSignedBigInt=ee.bytesToBigInt=ee.bytesToHex=ee.assertIsBytes=ee.isBytes=void 0;const e=Oa(),t=De(),n=Nt(),s=48,d=58,c=87;function u(){const p=[];return()=>{if(p.length===0)for(let R=0;R<256;R++)p.push(R.toString(16).padStart(2,"0"));return p}}const a=u();function o(p){return p instanceof Uint8Array}ee.isBytes=o;function f(p){(0,t.assert)(o(p),"Value must be a Uint8Array.")}ee.assertIsBytes=f;function r(p){if(f(p),p.length===0)return"0x";const R=a(),G=new Array(p.length);for(let A=0;A<p.length;A++)G[A]=R[p[A]];return(0,n.add0x)(G.join(""))}ee.bytesToHex=r;function i(p){f(p);const R=r(p);return BigInt(R)}ee.bytesToBigInt=i;function l(p){f(p);let R=BigInt(0);for(const G of p)R=(R<<BigInt(8))+BigInt(G);return BigInt.asIntN(p.length*8,R)}ee.bytesToSignedBigInt=l;function h(p){f(p);const R=i(p);return(0,t.assert)(R<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(R)}ee.bytesToNumber=h;function b(p){return f(p),new TextDecoder().decode(p)}ee.bytesToString=b;function v(p){return f(p),e.base64.encode(p)}ee.bytesToBase64=v;function N(p){var L;if(((L=p==null?void 0:p.toLowerCase)==null?void 0:L.call(p))==="0x")return new Uint8Array;(0,n.assertIsHexString)(p);const R=(0,n.remove0x)(p).toLowerCase(),G=R.length%2===0?R:`0${R}`,A=new Uint8Array(G.length/2);for(let x=0;x<A.length;x++){const V=G.charCodeAt(x*2),M=G.charCodeAt(x*2+1),k=V-(V<d?s:c),y=M-(M<d?s:c);A[x]=k*16+y}return A}ee.hexToBytes=N;function B(p){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(p>=BigInt(0),"Value must be a non-negative bigint.");const R=p.toString(16);return N(R)}ee.bigIntToBytes=B;function z(p,R){(0,t.assert)(R>0);const G=p>>BigInt(31);return!((~p&G)+(p&~G)>>BigInt(R*8+-1))}function K(p,R){(0,t.assert)(typeof p=="bigint","Value must be a bigint."),(0,t.assert)(typeof R=="number","Byte length must be a number."),(0,t.assert)(R>0,"Byte length must be greater than 0."),(0,t.assert)(z(p,R),"Byte length is too small to represent the given value.");let G=p;const A=new Uint8Array(R);for(let L=0;L<A.length;L++)A[L]=Number(BigInt.asUintN(8,G)),G>>=BigInt(8);return A.reverse()}ee.signedBigIntToBytes=K;function $(p){(0,t.assert)(typeof p=="number","Value must be a number."),(0,t.assert)(p>=0,"Value must be a non-negative number."),(0,t.assert)(Number.isSafeInteger(p),"Value is not a safe integer. Use `bigIntToBytes` instead.");const R=p.toString(16);return N(R)}ee.numberToBytes=$;function S(p){return(0,t.assert)(typeof p=="string","Value must be a string."),new TextEncoder().encode(p)}ee.stringToBytes=S;function j(p){return(0,t.assert)(typeof p=="string","Value must be a string."),e.base64.decode(p)}ee.base64ToBytes=j;function H(p){if(typeof p=="bigint")return B(p);if(typeof p=="number")return $(p);if(typeof p=="string")return p.startsWith("0x")?N(p):S(p);if(o(p))return p;throw new TypeError(`Unsupported value type: "${typeof p}".`)}ee.valueToBytes=H;function P(p){const R=new Array(p.length);let G=0;for(let L=0;L<p.length;L++){const x=H(p[L]);R[L]=x,G+=x.length}const A=new Uint8Array(G);for(let L=0,x=0;L<R.length;L++)A.set(R[L],x),x+=R[L].length;return A}ee.concatBytes=P;function O(p){if(typeof Wn<"u"&&p instanceof Wn){const R=p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength);return new DataView(R)}return new DataView(p.buffer,p.byteOffset,p.byteLength)}return ee.createDataView=O,ee}var Yt={},hs;function ka(){return hs||(hs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAssetId=e.isCaipAssetType=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAssetIdStruct=e.CaipAssetTypeStruct=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ASSET_ID_REGEX=e.CAIP_ASSET_TYPE_REGEX=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const t=Oe();e.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CAIP_ASSET_TYPE_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ASSET_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,e.CaipChainIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,t.pattern)((0,t.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),e.CaipAssetTypeStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_TYPE_REGEX),e.CaipAssetIdStruct=(0,t.pattern)((0,t.string)(),e.CAIP_ASSET_ID_REGEX),(function(l){l.Bip122="bip122",l.Eip155="eip155",l.Wallet="wallet"})(e.KnownCaipNamespace||(e.KnownCaipNamespace={}));function n(l){return(0,t.is)(l,e.CaipChainIdStruct)}e.isCaipChainId=n;function s(l){return(0,t.is)(l,e.CaipNamespaceStruct)}e.isCaipNamespace=s;function d(l){return(0,t.is)(l,e.CaipReferenceStruct)}e.isCaipReference=d;function c(l){return(0,t.is)(l,e.CaipAccountIdStruct)}e.isCaipAccountId=c;function u(l){return(0,t.is)(l,e.CaipAccountAddressStruct)}e.isCaipAccountAddress=u;function a(l){return(0,t.is)(l,e.CaipAssetTypeStruct)}e.isCaipAssetType=a;function o(l){return(0,t.is)(l,e.CaipAssetIdStruct)}e.isCaipAssetId=o;function f(l){const h=e.CAIP_CHAIN_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP chain ID.");return{namespace:h.groups.namespace,reference:h.groups.reference}}e.parseCaipChainId=f;function r(l){const h=e.CAIP_ACCOUNT_ID_REGEX.exec(l);if(!(h!=null&&h.groups))throw new Error("Invalid CAIP account ID.");return{address:h.groups.accountAddress,chainId:h.groups.chainId,chain:{namespace:h.groups.namespace,reference:h.groups.reference}}}e.parseCaipAccountId=r;function i(l,h){if(!s(l))throw new Error(`Invalid "namespace", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!d(h))throw new Error(`Invalid "reference", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${l}:${h}`}e.toCaipChainId=i})(Yt)),Yt}var nt={},ps;function La(){if(ps)return nt;ps=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.ChecksumStruct=void 0;const e=Oe(),t=Lo();return nt.ChecksumStruct=(0,e.size)((0,t.base64)((0,e.string)(),{paddingRequired:!0}),44,44),nt}var _e={},gs;function Ba(){if(gs)return _e;gs=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.createHex=_e.createBytes=_e.createBigInt=_e.createNumber=void 0;const e=Oe(),t=De(),n=Pn(),s=Nt(),d=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),s.StrictHexStruct]),c=(0,e.coerce)((0,e.number)(),d,Number),u=(0,e.coerce)((0,e.bigint)(),d,BigInt);(0,e.union)([s.StrictHexStruct,(0,e.instance)(Uint8Array)]);const a=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([s.StrictHexStruct]),n.hexToBytes),o=(0,e.coerce)(s.StrictHexStruct,(0,e.instance)(Uint8Array),n.bytesToHex);function f(h){try{const b=(0,e.create)(h,c);return(0,t.assert)(Number.isFinite(b),`Expected a number-like value, got "${h}".`),b}catch(b){throw b instanceof e.StructError?new Error(`Expected a number-like value, got "${h}".`):b}}_e.createNumber=f;function r(h){try{return(0,e.create)(h,u)}catch(b){throw b instanceof e.StructError?new Error(`Expected a number-like value, got "${String(b.value)}".`):b}}_e.createBigInt=r;function i(h){if(typeof h=="string"&&h.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(h,a)}catch(b){throw b instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(b.value)}".`):b}}_e.createBytes=i;function l(h){if(h instanceof Uint8Array&&h.length===0||typeof h=="string"&&h.toLowerCase()==="0x")return"0x";try{return(0,e.create)(h,o)}catch(b){throw b instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(b.value)}".`):b}}return _e.createHex=l,_e}var $e={},ms;function Na(){if(ms)return $e;ms=1;var e=$e&&$e.__classPrivateFieldGet||function(u,a,o,f){if(o==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof a=="function"?u!==a||!f:!a.has(u))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?f:o==="a"?f.call(u):f?f.value:a.get(u)},t=$e&&$e.__classPrivateFieldSet||function(u,a,o,f,r){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof a=="function"?u!==a||!r:!a.has(u))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?r.call(u,o):r?r.value=o:a.set(u,o),o},n,s;Object.defineProperty($e,"__esModule",{value:!0}),$e.FrozenSet=$e.FrozenMap=void 0;class d{get size(){return e(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return e(this,n,"f")[Symbol.iterator]()}constructor(a){n.set(this,void 0),t(this,n,new Map(a),"f"),Object.freeze(this)}entries(){return e(this,n,"f").entries()}forEach(a,o){return e(this,n,"f").forEach((f,r,i)=>a.call(o,f,r,this))}get(a){return e(this,n,"f").get(a)}has(a){return e(this,n,"f").has(a)}keys(){return e(this,n,"f").keys()}values(){return e(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([a,o])=>`${String(a)} => ${String(o)}`).join(", ")} `:""}}`}}$e.FrozenMap=d;class c{get size(){return e(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return e(this,s,"f")[Symbol.iterator]()}constructor(a){s.set(this,void 0),t(this,s,new Set(a),"f"),Object.freeze(this)}entries(){return e(this,s,"f").entries()}forEach(a,o){return e(this,s,"f").forEach((f,r,i)=>a.call(o,f,r,this))}has(a){return e(this,s,"f").has(a)}keys(){return e(this,s,"f").keys()}values(){return e(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(a=>String(a)).join(", ")} `:""}}`}}return $e.FrozenSet=c,Object.freeze(d),Object.freeze(d.prototype),Object.freeze(c),Object.freeze(c.prototype),$e}var Zt={},ys;function Ma(){return ys||(ys=1,Object.defineProperty(Zt,"__esModule",{value:!0})),Zt}var Qt={},bs;function qa(){return bs||(bs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const t=Oe(),n=De(),s=xn(),d=p=>(0,t.object)(p);e.object=d;function c({path:p,branch:R}){const G=p[p.length-1];return(0,s.hasProperty)(R[R.length-2],G)}function u(p){return new t.Struct({...p,type:`optional ${p.type}`,validator:(R,G)=>!c(G)||p.validator(R,G),refiner:(R,G)=>!c(G)||p.refiner(R,G)})}e.exactOptional=u;const a=()=>(0,t.define)("finite number",p=>(0,t.is)(p,(0,t.number)())&&Number.isFinite(p));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),a(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.coerce)(e.UnsafeJsonStruct,(0,t.any)(),p=>((0,n.assertStruct)(p,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(p,(R,G)=>{if(!(R==="__proto__"||R==="constructor"))return G}))));function o(p){try{return f(p),!0}catch{return!1}}e.isValidJson=o;function f(p){return(0,t.create)(p,e.JsonStruct)}e.getSafeJson=f;function r(p){(0,n.assertStruct)(p,e.JsonStruct,"Invalid JSON value");const R=JSON.stringify(p);return new TextEncoder().encode(R).byteLength}e.getJsonSize=r,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,t.integer)(),message:(0,t.string)(),data:u(e.JsonStruct),stack:u((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:u(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:u(e.JsonRpcParamsStruct)});function i(p){return(0,t.is)(p,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=i;function l(p,R){(0,n.assertStruct)(p,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",R)}e.assertIsJsonRpcNotification=l;function h(p){return(0,t.is)(p,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=h;function b(p,R){(0,n.assertStruct)(p,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",R)}e.assertIsJsonRpcRequest=b,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function v(p){return(0,t.is)(p,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=v;function N(p,R){(0,n.assertStruct)(p,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",R)}e.assertIsPendingJsonRpcResponse=N;function B(p){return(0,t.is)(p,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=B;function z(p,R){(0,n.assertStruct)(p,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",R)}e.assertIsJsonRpcResponse=z;function K(p){return(0,t.is)(p,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=K;function $(p,R){(0,n.assertStruct)(p,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",R)}e.assertIsJsonRpcSuccess=$;function S(p){return(0,t.is)(p,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=S;function j(p,R){(0,n.assertStruct)(p,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",R)}e.assertIsJsonRpcFailure=j;function H(p){return(0,t.is)(p,e.JsonRpcErrorStruct)}e.isJsonRpcError=H;function P(p,R){(0,n.assertStruct)(p,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",R)}e.assertIsJsonRpcError=P;function O(p){const{permitEmptyString:R,permitFractions:G,permitNull:A}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...p};return x=>!!(typeof x=="number"&&(G||Number.isInteger(x))||typeof x=="string"&&(R||x.length>0)||A&&x===null)}e.getJsonRpcIdValidator=O})(Qt)),Qt}var er={},ws;function Ha(){return ws||(ws=1,Object.defineProperty(er,"__esModule",{value:!0})),er}var Ne={},Es;function Da(){if(Es)return Ne;Es=1;var e=Ne&&Ne.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.createModuleLogger=Ne.createProjectLogger=void 0;const n=(0,e(ya()).default)("metamask");function s(c){return n.extend(c)}Ne.createProjectLogger=s;function d(c,u){return c.extend(u)}return Ne.createModuleLogger=d,Ne}var Ie={},Ss;function Ua(){if(Ss)return Ie;Ss=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.hexToBigInt=Ie.hexToNumber=Ie.bigIntToHex=Ie.numberToHex=void 0;const e=De(),t=Nt(),n=u=>((0,e.assert)(typeof u=="number","Value must be a number."),(0,e.assert)(u>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(u),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(u.toString(16)));Ie.numberToHex=n;const s=u=>((0,e.assert)(typeof u=="bigint","Value must be a bigint."),(0,e.assert)(u>=0,"Value must be a non-negative bigint."),(0,t.add0x)(u.toString(16)));Ie.bigIntToHex=s;const d=u=>{(0,t.assertIsHexString)(u);const a=parseInt(u,16);return(0,e.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a};Ie.hexToNumber=d;const c=u=>((0,t.assertIsHexString)(u),BigInt((0,t.add0x)(u)));return Ie.hexToBigInt=c,Ie}var tr={},vs;function Va(){return vs||(vs=1,Object.defineProperty(tr,"__esModule",{value:!0})),tr}var st={},Rs;function Fa(){if(Rs)return st;Rs=1,Object.defineProperty(st,"__esModule",{value:!0}),st.createDeferredPromise=void 0;function e({suppressUnhandledRejection:t=!1}={}){let n,s;const d=new Promise((c,u)=>{n=c,s=u});return t&&d.catch(c=>{}),{promise:d,resolve:n,reject:s}}return st.createDeferredPromise=e,st}var rr={},_s;function za(){return _s||(_s=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(c){c[c.Millisecond=1]="Millisecond",c[c.Second=1e3]="Second",c[c.Minute=6e4]="Minute",c[c.Hour=36e5]="Hour",c[c.Day=864e5]="Day",c[c.Week=6048e5]="Week",c[c.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));const t=c=>Number.isInteger(c)&&c>=0,n=(c,u)=>{if(!t(c))throw new Error(`"${u}" must be a non-negative integer. Received: "${c}".`)};function s(c,u){return n(c,"count"),c*u}e.inMilliseconds=s;function d(c){return n(c,"timestamp"),Date.now()-c}e.timeSince=d})(rr)),rr}var nr={},$s;function Ja(){return $s||($s=1,Object.defineProperty(nr,"__esModule",{value:!0})),nr}var sr={},It={exports:{}},ir,Is;function Et(){if(Is)return ir;Is=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,s=16,d=t-6;return ir={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ir}var or,As;function Mt(){if(As)return or;As=1;var e={};return or=typeof ba=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},or}var Ts;function St(){return Ts||(Ts=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:d}=Et(),c=Mt();t=e.exports={};const u=t.re=[],a=t.safeRe=[],o=t.src=[],f=t.safeSrc=[],r=t.t={};let i=0;const l="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",d],[l,s]],b=N=>{for(const[B,z]of h)N=N.split(`${B}*`).join(`${B}{0,${z}}`).split(`${B}+`).join(`${B}{1,${z}}`);return N},v=(N,B,z)=>{const K=b(B),$=i++;c(N,$,B),r[N]=$,o[$]=B,f[$]=K,u[$]=new RegExp(B,z?"g":void 0),a[$]=new RegExp(K,z?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l}*`),v("MAINVERSION",`(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})\\.(${o[r.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})\\.(${o[r.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${o[r.NONNUMERICIDENTIFIER]}|${o[r.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASE",`(?:-(${o[r.PRERELEASEIDENTIFIER]}(?:\\.${o[r.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${o[r.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[r.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${l}+`),v("BUILD",`(?:\\+(${o[r.BUILDIDENTIFIER]}(?:\\.${o[r.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${o[r.MAINVERSION]}${o[r.PRERELEASE]}?${o[r.BUILD]}?`),v("FULL",`^${o[r.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${o[r.MAINVERSIONLOOSE]}${o[r.PRERELEASELOOSE]}?${o[r.BUILD]}?`),v("LOOSE",`^${o[r.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${o[r.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${o[r.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:\\.(${o[r.XRANGEIDENTIFIER]})(?:${o[r.PRERELEASE]})?${o[r.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[r.XRANGEIDENTIFIERLOOSE]})(?:${o[r.PRERELEASELOOSE]})?${o[r.BUILD]}?)?)?`),v("XRANGE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${o[r.GTLT]}\\s*${o[r.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),v("COERCE",`${o[r.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",o[r.COERCEPLAIN]+`(?:${o[r.PRERELEASE]})?(?:${o[r.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",o[r.COERCE],!0),v("COERCERTLFULL",o[r.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${o[r.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${o[r.LONETILDE]}${o[r.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${o[r.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${o[r.LONECARET]}${o[r.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${o[r.LONECARET]}${o[r.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${o[r.GTLT]}\\s*(${o[r.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${o[r.GTLT]}\\s*(${o[r.LOOSEPLAIN]}|${o[r.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${o[r.XRANGEPLAIN]})\\s+-\\s+(${o[r.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${o[r.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[r.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(It,It.exports)),It.exports}var ar,js;function On(){if(js)return ar;js=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ar=s=>s?typeof s!="object"?e:s:t,ar}var cr,Cs;function Bo(){if(Cs)return cr;Cs=1;const e=/^[0-9]+$/,t=(s,d)=>{if(typeof s=="number"&&typeof d=="number")return s===d?0:s<d?-1:1;const c=e.test(s),u=e.test(d);return c&&u&&(s=+s,d=+d),s===d?0:c&&!u?-1:u&&!c?1:s<d?-1:1};return cr={compareIdentifiers:t,rcompareIdentifiers:(s,d)=>t(d,s)},cr}var ur,xs;function ye(){if(xs)return ur;xs=1;const e=Mt(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Et(),{safeRe:s,t:d}=St(),c=On(),{compareIdentifiers:u}=Bo(),a=(f,r)=>{const i=r.split(".");if(i.length>f.length)return!1;for(let l=0;l<i.length;l++)if(u(f[l],i[l])!==0)return!1;return!0};class o{constructor(r,i){if(i=c(i),r instanceof o){if(r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",r,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const l=r.trim().match(i.loose?s[d.LOOSE]:s[d.FULL]);if(!l)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const b=+h;if(b>=0&&b<n)return b}return h}):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(e("SemVer.compare",this.version,this.options,r),!(r instanceof o)){if(typeof r=="string"&&r===this.version)return 0;r=new o(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof o||(r=new o(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof o||(r=new o(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let i=0;do{const l=this.prerelease[i],h=r.prerelease[i];if(e("prerelease compare",i,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return u(l,h)}while(++i)}compareBuild(r){r instanceof o||(r=new o(r,this.options));let i=0;do{const l=this.build[i],h=r.build[i];if(e("build compare",i,l,h),l===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(l===void 0)return-1;if(l===h)continue;return u(l,h)}while(++i)}inc(r,i,l){if(r.startsWith("pre")){if(!i&&l===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const h=`-${i}`.match(this.options.loose?s[d.PRERELEASELOOSE]:s[d.PRERELEASE]);if(!h||h[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,l),this.inc("pre",i,l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,l),this.inc("pre",i,l);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(l)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let b=this.prerelease.length;for(;--b>=0;)typeof this.prerelease[b]=="number"&&(this.prerelease[b]++,b=-2);if(b===-1){if(i===this.prerelease.join(".")&&l===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(i){let b=[i,h];if(l===!1&&(b=[i]),a(this.prerelease,i)){const v=this.prerelease[i.split(".").length];isNaN(v)&&(this.prerelease=b)}else this.prerelease=b}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ur=o,ur}var lr,Ps;function Ke(){if(Ps)return lr;Ps=1;const e=ye();return lr=(n,s,d=!1)=>{if(n instanceof e)return n;try{return new e(n,s)}catch(c){if(!d)return null;throw c}},lr}var dr,Os;function Ga(){if(Os)return dr;Os=1;const e=Ke();return dr=(n,s)=>{const d=e(n,s);return d?d.version:null},dr}var fr,ks;function Xa(){if(ks)return fr;ks=1;const e=Ke();return fr=(n,s)=>{const d=e(n.trim().replace(/^[=v]+/,""),s);return d?d.version:null},fr}var hr,Ls;function Wa(){if(Ls)return hr;Ls=1;const e=ye();return hr=(n,s,d,c,u)=>{typeof d=="string"&&(u=c,c=d,d=void 0);try{return new e(n instanceof e?n.version:n,d).inc(s,c,u).version}catch{return null}},hr}var pr,Bs;function Ka(){if(Bs)return pr;Bs=1;const e=Ke();return pr=(n,s)=>{const d=e(n,null,!0),c=e(s,null,!0),u=d.compare(c);if(u===0)return null;const a=u>0,o=a?d:c,f=a?c:d,r=!!o.prerelease.length;if(!!f.prerelease.length&&!r){if(!f.patch&&!f.minor)return"major";if(f.compareMain(o)===0)return f.minor&&!f.patch?"minor":"patch"}const l=r?"pre":"";return d.major!==c.major?l+"major":d.minor!==c.minor?l+"minor":d.patch!==c.patch?l+"patch":"prerelease"},pr}var gr,Ns;function Ya(){if(Ns)return gr;Ns=1;const e=ye();return gr=(n,s)=>new e(n,s).major,gr}var mr,Ms;function Za(){if(Ms)return mr;Ms=1;const e=ye();return mr=(n,s)=>new e(n,s).minor,mr}var yr,qs;function Qa(){if(qs)return yr;qs=1;const e=ye();return yr=(n,s)=>new e(n,s).patch,yr}var br,Hs;function ec(){if(Hs)return br;Hs=1;const e=Ke();return br=(n,s)=>{const d=e(n,s);return d&&d.prerelease.length?d.prerelease:null},br}var wr,Ds;function xe(){if(Ds)return wr;Ds=1;const e=ye();return wr=(n,s,d)=>new e(n,d).compare(new e(s,d)),wr}var Er,Us;function tc(){if(Us)return Er;Us=1;const e=xe();return Er=(n,s,d)=>e(s,n,d),Er}var Sr,Vs;function rc(){if(Vs)return Sr;Vs=1;const e=xe();return Sr=(n,s)=>e(n,s,!0),Sr}var vr,Fs;function kn(){if(Fs)return vr;Fs=1;const e=ye();return vr=(n,s,d)=>{const c=new e(n,d),u=new e(s,d);return c.compare(u)||c.compareBuild(u)},vr}var Rr,zs;function nc(){if(zs)return Rr;zs=1;const e=kn();return Rr=(n,s)=>n.sort((d,c)=>e(d,c,s)),Rr}var _r,Js;function sc(){if(Js)return _r;Js=1;const e=kn();return _r=(n,s)=>n.sort((d,c)=>e(c,d,s)),_r}var $r,Gs;function qt(){if(Gs)return $r;Gs=1;const e=xe();return $r=(n,s,d)=>e(n,s,d)>0,$r}var Ir,Xs;function Ln(){if(Xs)return Ir;Xs=1;const e=xe();return Ir=(n,s,d)=>e(n,s,d)<0,Ir}var Ar,Ws;function No(){if(Ws)return Ar;Ws=1;const e=xe();return Ar=(n,s,d)=>e(n,s,d)===0,Ar}var Tr,Ks;function Mo(){if(Ks)return Tr;Ks=1;const e=xe();return Tr=(n,s,d)=>e(n,s,d)!==0,Tr}var jr,Ys;function Bn(){if(Ys)return jr;Ys=1;const e=xe();return jr=(n,s,d)=>e(n,s,d)>=0,jr}var Cr,Zs;function Nn(){if(Zs)return Cr;Zs=1;const e=xe();return Cr=(n,s,d)=>e(n,s,d)<=0,Cr}var xr,Qs;function qo(){if(Qs)return xr;Qs=1;const e=No(),t=Mo(),n=qt(),s=Bn(),d=Ln(),c=Nn();return xr=(a,o,f,r)=>{switch(o){case"===":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a===f;case"!==":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a!==f;case"":case"=":case"==":return e(a,f,r);case"!=":return t(a,f,r);case">":return n(a,f,r);case">=":return s(a,f,r);case"<":return d(a,f,r);case"<=":return c(a,f,r);default:throw new TypeError(`Invalid operator: ${o}`)}},xr}var Pr,ei;function ic(){if(ei)return Pr;ei=1;const e=ye(),t=Ke(),{safeRe:n,t:s}=St();return Pr=(c,u)=>{if(c instanceof e)return c;if(typeof c=="number"&&(c=String(c)),typeof c!="string")return null;u=u||{};let a=null;if(!u.rtl)a=c.match(u.includePrerelease?n[s.COERCEFULL]:n[s.COERCE]);else{const h=u.includePrerelease?n[s.COERCERTLFULL]:n[s.COERCERTL];let b;for(;(b=h.exec(c))&&(!a||a.index+a[0].length!==c.length);)(!a||b.index+b[0].length!==a.index+a[0].length)&&(a=b),h.lastIndex=b.index+b[1].length+b[2].length;h.lastIndex=-1}if(a===null)return null;const o=a[2],f=a[3]||"0",r=a[4]||"0",i=u.includePrerelease&&a[5]?`-${a[5]}`:"",l=u.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${f}.${r}${i}${l}`,u)},Pr}var Or,ti;function oc(){if(ti)return Or;ti=1;const e=Ke(),t=Et(),n=ye(),s=(a,o,f)=>{if(!t.RELEASE_TYPES.includes(o))return null;const r=d(a,f);return r&&c(r,o)},d=(a,o)=>{const f=a instanceof n?a.version:a;return e(f,o)},c=(a,o)=>{if(u(o))return a.version;switch(a.prerelease=[],o){case"major":a.minor=0,a.patch=0;break;case"minor":a.patch=0;break}return a.format()},u=a=>a.startsWith("pre");return Or=s,Or}var kr,ri;function ac(){if(ri)return kr;ri=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const s=this.map.get(n);if(s!==void 0)return this.map.delete(n),this.map.set(n,s),s}delete(n){return this.map.delete(n)}set(n,s){if(!this.delete(n)&&s!==void 0){if(this.map.size>=this.max){const c=this.map.keys().next().value;this.delete(c)}this.map.set(n,s)}return this}}return kr=e,kr}var Lr,ni;function Pe(){if(ni)return Lr;ni=1;const e=/\s+/g;class t{constructor(k,y){if(y=d(y),k instanceof t)return k.loose===!!y.loose&&k.includePrerelease===!!y.includePrerelease?k:new t(k.raw,y);if(k instanceof c)return this.raw=k.value,this.set=[[k]],this.formatted=void 0,this;if(this.options=y,this.loose=!!y.loose,this.includePrerelease=!!y.includePrerelease,this.raw=k.trim().replace(e," "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(I=>!B(I[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&z(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let k=0;k<this.set.length;k++){k>0&&(this.formatted+="||");const y=this.set[k];for(let g=0;g<y.length;g++)g>0&&(this.formatted+=" "),this.formatted+=y[g].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(k){k=k.replace(N,"");const g=((this.options.includePrerelease&&b)|(this.options.loose&&v))+":"+k,I=s.get(g);if(I)return I;const C=this.options.loose,q=C?o[r.HYPHENRANGELOOSE]:o[r.HYPHENRANGE];k=k.replace(q,x(this.options.includePrerelease)),u("hyphen replace",k),k=k.replace(o[r.COMPARATORTRIM],i),u("comparator trim",k),k=k.replace(o[r.TILDETRIM],l),u("tilde trim",k),k=k.replace(o[r.CARETTRIM],h),u("caret trim",k);let m=k.split(" ").map(U=>$(U,this.options)).join(" ").split(/\s+/).map(U=>L(U,this.options));C&&(m=m.filter(U=>(u("loose invalid filter",U,this.options),!!U.match(o[r.COMPARATORLOOSE])))),u("range list",m);const w=new Map,_=m.map(U=>new c(U,this.options));for(const U of _){if(B(U))return[U];w.set(U.value,U)}w.size>1&&w.has("")&&w.delete("");const J=[...w.values()];return s.set(g,J),J}intersects(k,y){if(!(k instanceof t))throw new TypeError("a Range is required");return this.set.some(g=>K(g,y)&&k.set.some(I=>K(I,y)&&g.every(C=>I.every(q=>C.intersects(q,y)))))}test(k){if(!k)return!1;if(typeof k=="string")try{k=new a(k,this.options)}catch{return!1}for(let y=0;y<this.set.length;y++)if(V(this.set[y],k,this.options))return!0;return!1}}Lr=t;const n=ac(),s=new n,d=On(),c=Ht(),u=Mt(),a=ye(),{safeRe:o,src:f,t:r,comparatorTrimReplace:i,tildeTrimReplace:l,caretTrimReplace:h}=St(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:v}=Et(),N=new RegExp(f[r.BUILD],"g"),B=M=>M.value==="<0.0.0-0",z=M=>M.value==="",K=(M,k)=>{let y=!0;const g=M.slice();let I=g.pop();for(;y&&g.length;)y=g.every(C=>I.intersects(C,k)),I=g.pop();return y},$=(M,k)=>(M=M.replace(o[r.BUILD],""),u("comp",M,k),M=O(M,k),u("caret",M),M=H(M,k),u("tildes",M),M=R(M,k),u("xrange",M),M=A(M,k),u("stars",M),M),S=M=>!M||M.toLowerCase()==="x"||M==="*",j=(M,k,y)=>S(M)&&!S(k)||S(k)&&y&&!S(y),H=(M,k)=>M.trim().split(/\s+/).map(y=>P(y,k)).join(" "),P=(M,k)=>{const y=k.loose?o[r.TILDELOOSE]:o[r.TILDE],g=k.includePrerelease?"-0":"";return M.replace(y,(I,C,q,m,w)=>{u("tilde",M,I,C,q,m,w);let _;return S(C)?_="":S(q)?_=`>=${C}.0.0${g} <${+C+1}.0.0-0`:S(m)?_=`>=${C}.${q}.0${g} <${C}.${+q+1}.0-0`:w?(u("replaceTilde pr",w),_=`>=${C}.${q}.${m}-${w} <${C}.${+q+1}.0-0`):_=`>=${C}.${q}.${m} <${C}.${+q+1}.0-0`,u("tilde return",_),_})},O=(M,k)=>M.trim().split(/\s+/).map(y=>p(y,k)).join(" "),p=(M,k)=>{u("caret",M,k);const y=k.loose?o[r.CARETLOOSE]:o[r.CARET],g=k.includePrerelease?"-0":"";return M.replace(y,(I,C,q,m,w)=>{u("caret",M,I,C,q,m,w);let _;return S(C)?_="":S(q)?_=`>=${C}.0.0${g} <${+C+1}.0.0-0`:S(m)?C==="0"?_=`>=${C}.${q}.0${g} <${C}.${+q+1}.0-0`:_=`>=${C}.${q}.0${g} <${+C+1}.0.0-0`:w?(u("replaceCaret pr",w),C==="0"?q==="0"?_=`>=${C}.${q}.${m}-${w} <${C}.${q}.${+m+1}-0`:_=`>=${C}.${q}.${m}-${w} <${C}.${+q+1}.0-0`:_=`>=${C}.${q}.${m}-${w} <${+C+1}.0.0-0`):(u("no pr"),C==="0"?q==="0"?_=`>=${C}.${q}.${m} <${C}.${q}.${+m+1}-0`:_=`>=${C}.${q}.${m} <${C}.${+q+1}.0-0`:_=`>=${C}.${q}.${m} <${+C+1}.0.0-0`),u("caret return",_),_})},R=(M,k)=>(u("replaceXRanges",M,k),M.split(/\s+/).map(y=>G(y,k)).join(" ")),G=(M,k)=>{M=M.trim();const y=k.loose?o[r.XRANGELOOSE]:o[r.XRANGE];return M.replace(y,(g,I,C,q,m,w)=>{if(u("xRange",M,g,I,C,q,m,w),j(C,q,m))return M;const _=S(C),J=_||S(q),U=J||S(m),X=U;return I==="="&&X&&(I=""),w=k.includePrerelease?"-0":"",_?I===">"||I==="<"?g="<0.0.0-0":g="*":I&&X?(J&&(q=0),m=0,I===">"?(I=">=",J?(C=+C+1,q=0,m=0):(q=+q+1,m=0)):I==="<="&&(I="<",J?C=+C+1:q=+q+1),I==="<"&&(w="-0"),g=`${I+C}.${q}.${m}${w}`):J?g=`>=${C}.0.0${w} <${+C+1}.0.0-0`:U&&(g=`>=${C}.${q}.0${w} <${C}.${+q+1}.0-0`),u("xRange return",g),g})},A=(M,k)=>(u("replaceStars",M,k),M.trim().replace(o[r.STAR],"")),L=(M,k)=>(u("replaceGTE0",M,k),M.trim().replace(o[k.includePrerelease?r.GTE0PRE:r.GTE0],"")),x=M=>(k,y,g,I,C,q,m,w,_,J,U,X)=>(S(g)?y="":S(I)?y=`>=${g}.0.0${M?"-0":""}`:S(C)?y=`>=${g}.${I}.0${M?"-0":""}`:q?y=`>=${y}`:y=`>=${y}${M?"-0":""}`,S(_)?w="":S(J)?w=`<${+_+1}.0.0-0`:S(U)?w=`<${_}.${+J+1}.0-0`:X?w=`<=${_}.${J}.${U}-${X}`:M?w=`<${_}.${J}.${+U+1}-0`:w=`<=${w}`,`${y} ${w}`.trim()),V=(M,k,y)=>{for(let g=0;g<M.length;g++)if(!M[g].test(k))return!1;if(k.prerelease.length&&!y.includePrerelease){for(let g=0;g<M.length;g++)if(u(M[g].semver),M[g].semver!==c.ANY&&M[g].semver.prerelease.length>0){const I=M[g].semver;if(I.major===k.major&&I.minor===k.minor&&I.patch===k.patch)return!0}return!1}return!0};return Lr}var Br,si;function Ht(){if(si)return Br;si=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),u("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(r){const i=this.options.loose?s[d.COMPARATORLOOSE]:s[d.COMPARATOR],l=r.match(i);if(!l)throw new TypeError(`Invalid comparator: ${r}`);this.operator=l[1]!==void 0?l[1]:"",this.operator==="="&&(this.operator=""),l[2]?this.semver=new a(l[2],this.options.loose):this.semver=e}toString(){return this.value}test(r){if(u("Comparator.test",r,this.options.loose),this.semver===e||r===e)return!0;if(typeof r=="string")try{r=new a(r,this.options)}catch{return!1}return c(r,this.operator,this.semver,this.options)}intersects(r,i){if(!(r instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(r.value,i).test(this.value):r.operator===""?r.value===""?!0:new o(this.value,i).test(r.semver):(i=n(i),i.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!i.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||c(this.semver,"<",r.semver,i)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||c(this.semver,">",r.semver,i)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}}Br=t;const n=On(),{safeRe:s,t:d}=St(),c=qo(),u=Mt(),a=ye(),o=Pe();return Br}var Nr,ii;function Dt(){if(ii)return Nr;ii=1;const e=Pe();return Nr=(n,s,d)=>{try{s=new e(s,d)}catch{return!1}return s.test(n)},Nr}var Mr,oi;function cc(){if(oi)return Mr;oi=1;const e=Pe();return Mr=(n,s)=>new e(n,s).set.map(d=>d.map(c=>c.value).join(" ").trim().split(" ")),Mr}var qr,ai;function uc(){if(ai)return qr;ai=1;const e=ye(),t=Pe();return qr=(s,d,c)=>{let u=null,a=null,o=null;try{o=new t(d,c)}catch{return null}return s.forEach(f=>{o.test(f)&&(!u||a.compare(f)===-1)&&(u=f,a=new e(u,c))}),u},qr}var Hr,ci;function lc(){if(ci)return Hr;ci=1;const e=ye(),t=Pe();return Hr=(s,d,c)=>{let u=null,a=null,o=null;try{o=new t(d,c)}catch{return null}return s.forEach(f=>{o.test(f)&&(!u||a.compare(f)===1)&&(u=f,a=new e(u,c))}),u},Hr}var Dr,ui;function dc(){if(ui)return Dr;ui=1;const e=ye(),t=Pe(),n=qt();return Dr=(d,c)=>{d=new t(d,c);let u=new e("0.0.0");if(d.test(u)||(u=new e("0.0.0-0"),d.test(u)))return u;u=null;for(let a=0;a<d.set.length;++a){const o=d.set[a];let f=null;o.forEach(r=>{const i=new e(r.semver.version);switch(r.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!f||n(i,f))&&(f=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${r.operator}`)}}),f&&(!u||n(u,f))&&(u=f)}return u&&d.test(u)?u:null},Dr}var Ur,li;function fc(){if(li)return Ur;li=1;const e=Pe();return Ur=(n,s)=>{try{return new e(n,s).range||"*"}catch{return null}},Ur}var Vr,di;function Mn(){if(di)return Vr;di=1;const e=ye(),t=Ht(),{ANY:n}=t,s=Pe(),d=Dt(),c=qt(),u=Ln(),a=Nn(),o=Bn();return Vr=(r,i,l,h)=>{r=new e(r,h),i=new s(i,h);let b,v,N,B,z;switch(l){case">":b=c,v=a,N=u,B=">",z=">=";break;case"<":b=u,v=o,N=c,B="<",z="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(r,i,h))return!1;for(let K=0;K<i.set.length;++K){const $=i.set[K];let S=null,j=null;if($.forEach(H=>{H.semver===n&&(H=new t(">=0.0.0")),S=S||H,j=j||H,b(H.semver,S.semver,h)?S=H:N(H.semver,j.semver,h)&&(j=H)}),S.operator===B||S.operator===z||(!j.operator||j.operator===B)&&v(r,j.semver))return!1;if(j.operator===z&&N(r,j.semver))return!1}return!0},Vr}var Fr,fi;function hc(){if(fi)return Fr;fi=1;const e=Mn();return Fr=(n,s,d)=>e(n,s,">",d),Fr}var zr,hi;function pc(){if(hi)return zr;hi=1;const e=Mn();return zr=(n,s,d)=>e(n,s,"<",d),zr}var Jr,pi;function gc(){if(pi)return Jr;pi=1;const e=Pe();return Jr=(n,s,d)=>(n=new e(n,d),s=new e(s,d),n.intersects(s,d)),Jr}var Gr,gi;function mc(){if(gi)return Gr;gi=1;const e=Dt(),t=xe();return Gr=(n,s,d)=>{const c=[];let u=null,a=null;const o=n.sort((l,h)=>t(l,h,d));for(const l of o)e(l,s,d)?(a=l,u||(u=l)):(a&&c.push([u,a]),a=null,u=null);u&&c.push([u,null]);const f=[];for(const[l,h]of c)l===h?f.push(l):!h&&l===o[0]?f.push("*"):h?l===o[0]?f.push(`<=${h}`):f.push(`${l} - ${h}`):f.push(`>=${l}`);const r=f.join(" || "),i=typeof s.raw=="string"?s.raw:String(s);return r.length<i.length?r:s},Gr}var Xr,mi;function yc(){if(mi)return Xr;mi=1;const e=Pe(),t=Ht(),{ANY:n}=t,s=Dt(),d=xe(),c=(i,l,h={})=>{if(i===l)return!0;i=new e(i,h),l=new e(l,h);let b=!1;e:for(const v of i.set){for(const N of l.set){const B=o(v,N,h);if(b=b||B!==null,B)continue e}if(b)return!1}return!0},u=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(i,l,h)=>{if(i===l)return!0;if(i.length===1&&i[0].semver===n){if(l.length===1&&l[0].semver===n)return!0;h.includePrerelease?i=u:i=a}if(l.length===1&&l[0].semver===n){if(h.includePrerelease)return!0;l=a}const b=new Set;let v,N;for(const P of i)P.operator===">"||P.operator===">="?v=f(v,P,h):P.operator==="<"||P.operator==="<="?N=r(N,P,h):b.add(P.semver);if(b.size>1)return null;let B;if(v&&N){if(B=d(v.semver,N.semver,h),B>0)return null;if(B===0&&(v.operator!==">="||N.operator!=="<="))return null}for(const P of b){if(v&&!s(P,String(v),h)||N&&!s(P,String(N),h))return null;for(const O of l)if(!s(P,String(O),h))return!1;return!0}let z,K,$,S,j=N&&!h.includePrerelease&&N.semver.prerelease.length?N.semver:!1,H=v&&!h.includePrerelease&&v.semver.prerelease.length?v.semver:!1;j&&j.prerelease.length===1&&N.operator==="<"&&j.prerelease[0]===0&&(j=!1);for(const P of l){if(S=S||P.operator===">"||P.operator===">=",$=$||P.operator==="<"||P.operator==="<=",v){if(H&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===H.major&&P.semver.minor===H.minor&&P.semver.patch===H.patch&&(H=!1),P.operator===">"||P.operator===">="){if(z=f(v,P,h),z===P&&z!==v)return!1}else if(v.operator===">="&&!P.test(v.semver))return!1}if(N){if(j&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===j.major&&P.semver.minor===j.minor&&P.semver.patch===j.patch&&(j=!1),P.operator==="<"||P.operator==="<="){if(K=r(N,P,h),K===P&&K!==N)return!1}else if(N.operator==="<="&&!P.test(N.semver))return!1}if(!P.operator&&(N||v)&&B!==0)return!1}return!(v&&$&&!N&&B!==0||N&&S&&!v&&B!==0||H||j)},f=(i,l,h)=>{if(!i)return l;const b=d(i.semver,l.semver,h);return b>0?i:b<0||l.operator===">"&&i.operator===">="?l:i},r=(i,l,h)=>{if(!i)return l;const b=d(i.semver,l.semver,h);return b<0?i:b>0||l.operator==="<"&&i.operator==="<="?l:i};return Xr=c,Xr}var Wr,yi;function bc(){if(yi)return Wr;yi=1;const e=St(),t=Et(),n=ye(),s=Bo(),d=Ke(),c=Ga(),u=Xa(),a=Wa(),o=Ka(),f=Ya(),r=Za(),i=Qa(),l=ec(),h=xe(),b=tc(),v=rc(),N=kn(),B=nc(),z=sc(),K=qt(),$=Ln(),S=No(),j=Mo(),H=Bn(),P=Nn(),O=qo(),p=ic(),R=oc(),G=Ht(),A=Pe(),L=Dt(),x=cc(),V=uc(),M=lc(),k=dc(),y=fc(),g=Mn(),I=hc(),C=pc(),q=gc(),m=mc(),w=yc();return Wr={parse:d,valid:c,clean:u,inc:a,diff:o,major:f,minor:r,patch:i,prerelease:l,compare:h,rcompare:b,compareLoose:v,compareBuild:N,sort:B,rsort:z,gt:K,lt:$,eq:S,neq:j,gte:H,lte:P,cmp:O,coerce:p,truncate:R,Comparator:G,Range:A,satisfies:L,toComparators:x,maxSatisfying:V,minSatisfying:M,minVersion:k,validRange:y,outside:g,gtr:I,ltr:C,intersects:q,simplifyRange:m,subset:w,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers},Wr}var bi;function wc(){return bi||(bi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=Oe(),n=bc(),s=De();e.VersionStruct=(0,t.refine)((0,t.string)(),"Version",i=>(0,n.valid)(i)===null?`Expected SemVer version, got "${i}"`:!0),e.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",i=>(0,n.validRange)(i)===null?`Expected SemVer range, got "${i}"`:!0);function d(i){return(0,t.is)(i,e.VersionStruct)}e.isValidSemVerVersion=d;function c(i){return(0,t.is)(i,e.VersionRangeStruct)}e.isValidSemVerRange=c;function u(i){(0,s.assertStruct)(i,e.VersionStruct)}e.assertIsSemVerVersion=u;function a(i){(0,s.assertStruct)(i,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function o(i,l){return(0,n.gt)(i,l)}e.gtVersion=o;function f(i,l){return(0,n.gtr)(i,l)}e.gtRange=f;function r(i,l){return(0,n.satisfies)(i,l,{includePrerelease:!0})}e.satisfiesVersionRange=r})(sr)),sr}var wi;function be(){return wi||(wi=1,(function(e){var t=Fe&&Fe.__createBinding||(Object.create?(function(s,d,c,u){u===void 0&&(u=c);var a=Object.getOwnPropertyDescriptor(d,c);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[c]}}),Object.defineProperty(s,u,a)}):(function(s,d,c,u){u===void 0&&(u=c),s[u]=d[c]})),n=Fe&&Fe.__exportStar||function(s,d){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(d,c)&&t(d,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),n(De(),e),n(Lo(),e),n(Pn(),e),n(ka(),e),n(La(),e),n(Ba(),e),n(Na(),e),n(Ma(),e),n(ko(),e),n(Nt(),e),n(qa(),e),n(Ha(),e),n(Da(),e),n(xn(),e),n(Ua(),e),n(Va(),e),n(Fa(),e),n(za(),e),n(Ja(),e),n(wc(),e)})(Fe)),Fe}var Kr={},Ei;function ke(){return Ei||(Ei=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParserError=e.getErrorStack=e.getErrorMessage=void 0;const t=be(),n=c=>typeof c=="string"?c:c instanceof Error||(0,t.isObject)(c)&&(0,t.hasProperty)(c,"message")&&typeof c.message=="string"?c.message:"Unknown error.";e.getErrorMessage=n;const s=c=>{if(c instanceof Error)return c.stack};e.getErrorStack=s;class d extends Error{constructor(u,a){super(u),this.name="ParserError";const o=(0,e.getErrorStack)(a);o&&(this.stack=o)}}e.ParserError=d})(Kr)),Kr}var Yr={},it={},Si;function Ec(){if(Si)return it;Si=1,Object.defineProperty(it,"__esModule",{value:!0}),it.iterate=void 0;const e=be(),t=function*(n,s=32){for(let d=0;d<n.length;d+=s){const c=a=>{(0,e.assert)(a>=0,"Cannot skip a negative number of bytes."),(0,e.assert)(a%s===0,"Length must be a multiple of the size."),d+=a},u=n.subarray(d);yield{skip:c,value:u}}return{skip:()=>{},value:new Uint8Array}};return it.iterate=t,it}var Je={},Zr={},Ge={},Me={},vi;function Sc(){if(vi)return Me;vi=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.padEnd=Me.padStart=Me.set=void 0;const e=be(),t=32,n=(c,u,a)=>(0,e.concatBytes)([c.subarray(0,a),u,c.subarray(a+u.length)]);Me.set=n;const s=(c,u=t)=>{const a=new Uint8Array(Math.max(u-c.length,0)).fill(0);return(0,e.concatBytes)([a,c])};Me.padStart=s;const d=(c,u=t)=>{const a=new Uint8Array(Math.max(u-c.length,0)).fill(0);return(0,e.concatBytes)([c,a])};return Me.padEnd=d,Me}var Ri;function et(){return Ri||(Ri=1,(function(e){var t=Ge&&Ge.__createBinding||(Object.create?(function(s,d,c,u){u===void 0&&(u=c);var a=Object.getOwnPropertyDescriptor(d,c);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[c]}}),Object.defineProperty(s,u,a)}):(function(s,d,c,u){u===void 0&&(u=c),s[u]=d[c]})),n=Ge&&Ge.__exportStar||function(s,d){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(d,c)&&t(d,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),n(Sc(),e)})(Ge)),Ge}var _i;function vc(){return _i||(_i=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.address=e.getAddress=void 0;const t=be(),n=ke(),s=et(),d=c=>{const u=(0,t.createBytes)(c);return(0,t.assert)(u.length<=20,new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${u.length} bytes.`)),(0,s.padStart)(u,20)};e.getAddress=d,e.address={isDynamic:!1,isType:c=>c==="address",getByteLength(){return 32},encode({buffer:c,value:u,packed:a}){const o=(0,e.getAddress)(u);if(a)return(0,t.concatBytes)([c,o]);const f=(0,s.padStart)(o);return(0,t.concatBytes)([c,f])},decode({value:c}){return(0,t.add0x)((0,t.bytesToHex)(c.slice(12,32)))}}})(Zr)),Zr}var Qr={},en={},$i;function qn(){return $i||($i=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fixedBytes=e.getByteLength=void 0;const t=be(),n=ke(),s=et(),d=/^bytes([0-9]{1,2})$/u,c=u=>{var f;const a=(f=u.match(d))==null?void 0:f[1];(0,t.assert)(a,`Invalid byte length. Expected a number between 1 and 32, but received "${u}".`);const o=Number(a);return(0,t.assert)(o>0&&o<=32,new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${u}".`)),o};e.getByteLength=c,e.fixedBytes={isDynamic:!1,isType(u){return d.test(u)},getByteLength(){return 32},encode({type:u,buffer:a,value:o,packed:f}){const r=(0,e.getByteLength)(u),i=(0,t.createBytes)(o);return(0,t.assert)(i.length<=r,new n.ParserError(`Expected a value of length ${r}, but received a value of length ${i.length}.`)),f?(0,t.concatBytes)([a,(0,s.padEnd)(i,r)]):(0,t.concatBytes)([a,(0,s.padEnd)(i)])},decode({type:u,value:a}){const o=(0,e.getByteLength)(u);return a.slice(0,o)}}})(en)),en}var tn={},Ii;function Ho(){return Ii||(Ii=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tuple=e.getTupleElements=void 0;const t=be(),n=ke(),s=Hn(),d=/^\((.+)\)$/u,c=a=>d.test(a),u=a=>{(0,t.assert)(a.startsWith("(")&&a.endsWith(")"),new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${a}".`));const o=[];let f="",r=0;for(let i=1;i<a.length-1;i++){const l=a[i];l===","&&r===0?(o.push(f.trim()),f=""):(f+=l,l==="("?r+=1:l===")"&&(r-=1))}return f.trim()&&o.push(f.trim()),o};e.getTupleElements=u,e.tuple={isDynamic(a){return(0,e.getTupleElements)(a).some(f=>{const r=(0,s.getParser)(f);return(0,s.isDynamicParser)(r,f)})},isType(a){return c(a)},getByteLength(a){return(0,s.isDynamicParser)(this,a)?32:(0,e.getTupleElements)(a).reduce((f,r)=>f+(0,s.getParser)(r).getByteLength(r),0)},encode({type:a,buffer:o,value:f,packed:r,tight:i}){const l=(0,e.getTupleElements)(a);return(0,s.pack)({types:l,values:f,byteArray:o,packed:r,tight:i})},decode({type:a,value:o,skip:f}){const r=(0,e.getTupleElements)(a),i=this.getByteLength(a)-32;return f(i),(0,s.unpack)(r,o)}}})(tn)),tn}var Ai;function Rc(){return Ai||(Ai=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.array=e.getTupleType=e.getArrayType=e.isArrayType=void 0;const t=be(),n=ke(),s=Hn(),d=et(),c=qn(),u=Ho(),a=/^(?<type>.*)\[(?<length>\d*?)\]$/u,o=i=>a.test(i);e.isArrayType=o;const f=i=>{var h;const l=i.match(a);return(0,t.assert)((h=l==null?void 0:l.groups)==null?void 0:h.type,new n.ParserError(`Invalid array type. Expected an array type, but received "${i}".`)),[l.groups.type,l.groups.length?parseInt(l.groups.length,10):void 0]};e.getArrayType=f;const r=(i,l)=>`(${new Array(l).fill(i).join(",")})`;e.getTupleType=r,e.array={isDynamic(i){const[l,h]=(0,e.getArrayType)(i);return h===void 0||(0,s.isDynamicParser)((0,s.getParser)(l),l)},isType(i){return(0,e.isArrayType)(i)},getByteLength(i){(0,t.assert)((0,e.isArrayType)(i),new n.ParserError(`Expected an array type, but received "${i}".`));const[l,h]=(0,e.getArrayType)(i);return!(0,s.isDynamicParser)(this,i)&&h!==void 0?u.tuple.getByteLength((0,e.getTupleType)(l,h)):32},encode({type:i,buffer:l,value:h,packed:b,tight:v}){const[N,B]=(0,e.getArrayType)(i);if((0,t.assert)(!b||!(0,e.isArrayType)(N),new n.ParserError("Cannot pack nested arrays.")),b&&(0,s.isDynamicParser)((0,s.getParser)(N),N))return(0,s.pack)({types:new Array(h.length).fill(N),values:h,byteArray:l,packed:b,arrayPacked:!0,tight:v});if(B)return(0,t.assert)(B===h.length,new n.ParserError(`Array length does not match type length. Expected a length of ${B}, but received ${h.length}.`)),u.tuple.encode({type:(0,e.getTupleType)(N,B),buffer:l,value:h,packed:c.fixedBytes.isType(N)&&v,tight:v});if(b)return(0,s.pack)({types:new Array(h.length).fill(N),values:h,byteArray:l,packed:c.fixedBytes.isType(N)&&v,arrayPacked:!0,tight:v});const z=(0,d.padStart)((0,t.numberToBytes)(h.length));return(0,s.pack)({types:new Array(h.length).fill(N),values:h,byteArray:(0,t.concatBytes)([l,z]),packed:b,tight:v})},decode({type:i,value:l,...h}){const[b,v]=(0,e.getArrayType)(i);if(v){const B=u.tuple.decode({type:(0,e.getTupleType)(b,v),value:l,...h});return(0,t.assert)(B.length===v,new n.ParserError(`Array length does not match type length. Expected a length of ${v}, but received ${B.length}.`)),B}const N=(0,t.bytesToNumber)(l.subarray(0,32));return(0,s.unpack)(new Array(N).fill(b),l.subarray(32))}}})(Qr)),Qr}var rn={},nn={},Ti;function Do(){return Ti||(Ti=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.number=e.getBigInt=e.assertNumberLength=e.getLength=e.isSigned=void 0;const t=be(),n=ke(),s=et(),d=/^u?int(?<length>[0-9]*)?$/u,c=f=>!f.startsWith("u");e.isSigned=c;const u=f=>{var l;if(f==="int"||f==="uint")return 256;const r=f.match(d);(0,t.assert)((l=r==null?void 0:r.groups)==null?void 0:l.length,new n.ParserError(`Invalid number type. Expected a number type, but received "${f}".`));const i=parseInt(r.groups.length,10);return(0,t.assert)(i>=8&&i<=256,new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${f}".`)),(0,t.assert)(i%8===0,new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${f}".`)),i};e.getLength=u;const a=(f,r)=>{const i=(0,e.getLength)(r),l=BigInt(2)**BigInt(i-((0,e.isSigned)(r)?1:0))-BigInt(1);if((0,e.isSigned)(r)){(0,t.assert)(f>=-(l+BigInt(1))&&f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`));return}(0,t.assert)(f<=l,new n.ParserError(`Number "${f}" is out of range for type "${r}".`))};e.assertNumberLength=a;const o=f=>{try{return(0,t.createBigInt)(f)}catch{throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${f}".`)}};e.getBigInt=o,e.number={isDynamic:!1,isType(f){return d.test(f)},getByteLength(){return 32},encode({type:f,buffer:r,value:i,packed:l}){const h=(0,e.getBigInt)(i);if((0,e.assertNumberLength)(h,f),(0,e.isSigned)(f)){if(l){const b=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,t.signedBigIntToBytes)(h,b)])}return(0,t.concatBytes)([r,(0,s.padStart)((0,t.signedBigIntToBytes)(h,32))])}if(l){const b=(0,e.getLength)(f)/8;return(0,t.concatBytes)([r,(0,s.padStart)((0,t.bigIntToBytes)(h),b)])}return(0,t.concatBytes)([r,(0,s.padStart)((0,t.bigIntToBytes)(h))])},decode({type:f,value:r}){const i=r.subarray(0,32);if((0,e.isSigned)(f)){const h=(0,t.bytesToSignedBigInt)(i);return(0,e.assertNumberLength)(h,f),h}const l=(0,t.bytesToBigInt)(i);return(0,e.assertNumberLength)(l,f),l}}})(nn)),nn}var ji;function _c(){return ji||(ji=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bool=e.getBooleanValue=void 0;const t=Oe(),n=be(),s=ke(),d=Do(),c=(0,t.coerce)((0,t.boolean)(),(0,t.union)([(0,t.literal)("true"),(0,t.literal)("false")]),a=>a==="true"),u=a=>{try{return(0,t.create)(a,c)?BigInt(1):BigInt(0)}catch{throw new s.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${a}".`)}};e.getBooleanValue=u,e.bool={isDynamic:!1,isType:a=>a==="bool",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const i=(0,e.getBooleanValue)(o);return f?(0,n.concatBytes)([a,(0,n.bigIntToBytes)(i)]):d.number.encode({type:"uint256",buffer:a,value:i,packed:f,tight:r})},decode(a){return d.number.decode({...a,type:"uint256"})===BigInt(1)}}})(rn)),rn}var ot={},Ci;function Uo(){if(Ci)return ot;Ci=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.bytes=void 0;const e=be(),t=et();return ot.bytes={isDynamic:!0,isType:n=>n==="bytes",getByteLength(){return 32},encode({buffer:n,value:s,packed:d}){const c=(0,e.createBytes)(s);if(d)return(0,e.concatBytes)([n,c]);const u=Math.ceil(c.byteLength/32)*32;return(0,e.concatBytes)([n,(0,t.padStart)((0,e.numberToBytes)(c.byteLength)),(0,t.padEnd)(c,u)])},decode({value:n}){const s=n.subarray(0,32),d=(0,e.bytesToNumber)(s);return n.slice(32,32+d)}},ot}var sn={},xi;function $c(){return xi||(xi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fn=e.getFunction=void 0;const t=Oe(),n=be(),s=ke(),d=qn(),c=(0,t.coerce)((0,t.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,t.union)([n.StrictHexStruct,(0,t.instance)(Uint8Array)]),a=>{const o=(0,n.createBytes)(a);return(0,n.assert)(o.length===24,new s.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${o.length} bytes.`)),{address:(0,n.bytesToHex)(o.subarray(0,20)),selector:(0,n.bytesToHex)(o.subarray(20,24))}}),u=a=>{const o=(0,t.create)(a,c);return(0,n.concatBytes)([(0,n.hexToBytes)(o.address),(0,n.hexToBytes)(o.selector)])};e.getFunction=u,e.fn={isDynamic:!1,isType:a=>a==="function",getByteLength(){return 32},encode({buffer:a,value:o,packed:f,tight:r}){const i=(0,e.getFunction)(o);return d.fixedBytes.encode({type:"bytes24",buffer:a,value:i,packed:f,tight:r})},decode({value:a}){return{address:(0,n.bytesToHex)(a.slice(0,20)),selector:(0,n.bytesToHex)(a.slice(20,24))}}}})(sn)),sn}var on={},Pi;function Ic(){return Pi||(Pi=1,Object.defineProperty(on,"__esModule",{value:!0})),on}var at={},Oi;function Ac(){if(Oi)return at;Oi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.string=void 0;const e=be(),t=Uo();return at.string={isDynamic:!0,isType:n=>n==="string",getByteLength(){return 32},encode({buffer:n,value:s,packed:d,tight:c}){return t.bytes.encode({type:"bytes",buffer:n,value:(0,e.stringToBytes)(s),packed:d,tight:c})},decode(n){return(0,e.bytesToString)(t.bytes.decode(n))}},at}var ki;function Tc(){return ki||(ki=1,(function(e){var t=Je&&Je.__createBinding||(Object.create?(function(s,d,c,u){u===void 0&&(u=c);var a=Object.getOwnPropertyDescriptor(d,c);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[c]}}),Object.defineProperty(s,u,a)}):(function(s,d,c,u){u===void 0&&(u=c),s[u]=d[c]})),n=Je&&Je.__exportStar||function(s,d){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(d,c)&&t(d,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),n(vc(),e),n(Rc(),e),n(_c(),e),n(Uo(),e),n(qn(),e),n($c(),e),n(Do(),e),n(Ic(),e),n(Ac(),e),n(Ho(),e)})(Je)),Je}var Li;function Hn(){return Li||(Li=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unpack=e.pack=e.isDynamicParser=e.getParser=void 0;const t=be(),n=ke(),s=Ec(),d=Tc(),c=et(),u=r=>{const i={address:d.address,array:d.array,bool:d.bool,bytes:d.bytes,fixedBytes:d.fixedBytes,function:d.fn,number:d.number,string:d.string,tuple:d.tuple},l=i[r];if(l)return l;const h=Object.values(i).find(b=>b.isType(r));if(h)return h;throw new n.ParserError(`The type "${r}" is not supported.`)};e.getParser=u;const a=(r,i)=>{const{isDynamic:l}=r;return typeof l=="function"?l(i):l};e.isDynamicParser=a;const o=({types:r,values:i,packed:l=!1,tight:h=!1,arrayPacked:b=!1,byteArray:v=new Uint8Array})=>{(0,t.assert)(r.length===i.length,new n.ParserError(`The number of types (${r.length}) does not match the number of values (${i.length}).`));const{staticBuffer:N,dynamicBuffer:B,pointers:z}=r.reduce(({staticBuffer:S,dynamicBuffer:j,pointers:H},P,O)=>{const p=(0,e.getParser)(P),R=i[O];if(l||b||!(0,e.isDynamicParser)(p,P))return{staticBuffer:p.encode({buffer:S,value:R,type:P,packed:l,tight:h}),dynamicBuffer:j,pointers:H};const G=(0,t.concatBytes)([S,new Uint8Array(32)]),A=p.encode({buffer:j,value:R,type:P,packed:l,tight:h});return{staticBuffer:G,dynamicBuffer:A,pointers:[...H,{position:S.length,pointer:j.length}]}},{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,t.assert)(!l&&!b||B.length===0,new n.ParserError("Invalid pack state."));const K=N.length,$=z.reduce((S,{pointer:j,position:H})=>{const P=(0,c.padStart)((0,t.numberToBytes)(K+j));return(0,c.set)(S,P,H)},N);return(0,t.concatBytes)([v,$,B])};e.pack=o;const f=(r,i)=>{const l=(0,s.iterate)(i);return r.map(h=>{const{value:{value:b,skip:v},done:N}=l.next();(0,t.assert)(!N,new n.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${h}".`));const B=(0,e.getParser)(h);if((0,e.isDynamicParser)(B,h)){const K=(0,t.bytesToNumber)(b.subarray(0,32)),$=i.subarray(K);return B.decode({type:h,value:$,skip:v})}return B.decode({type:h,value:b,skip:v})})};e.unpack=f})(Yr)),Yr}var Bi;function jc(){return Bi||(Bi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSingle=e.decode=e.encodePacked=e.encodeSingle=e.encode=void 0;const t=be(),n=ke(),s=Hn(),d=(f,r,i,l)=>{try{return(0,s.pack)({types:f,values:r,packed:i,tight:l})}catch(h){throw h instanceof n.ParserError?new n.ParserError(`Unable to encode value: ${h.message}`,h):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(h)}`,h)}};e.encode=d;const c=(f,r)=>(0,e.encode)([f],[r]);e.encodeSingle=c;const u=(f,r,i)=>(0,e.encode)(f,r,!0,i);e.encodePacked=u;const a=(f,r)=>{const i=(0,t.createBytes)(r);try{return(0,s.unpack)(f,i)}catch(l){throw l instanceof n.ParserError?new n.ParserError(`Unable to decode value: ${l.message}`,l):new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(l)}`,l)}};e.decode=a;const o=(f,r)=>{const i=(0,e.decode)([f],r);return(0,t.assert)(i.length===1,new n.ParserError("Decoded value array has unexpected length.")),i[0]};e.decodeSingle=o})(Jt)),Jt}var Xe={},an={},Ni;function Cc(){return Ni||(Ni=1,Object.defineProperty(an,"__esModule",{value:!0})),an}var Mi;function xc(){return Mi||(Mi=1,(function(e){var t=Xe&&Xe.__createBinding||(Object.create?(function(s,d,c,u){u===void 0&&(u=c);var a=Object.getOwnPropertyDescriptor(d,c);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[c]}}),Object.defineProperty(s,u,a)}):(function(s,d,c,u){u===void 0&&(u=c),s[u]=d[c]})),n=Xe&&Xe.__exportStar||function(s,d){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(d,c)&&t(d,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),n(Cc(),e)})(Xe)),Xe}var qi;function Vo(){return qi||(qi=1,(function(e){var t=Ve&&Ve.__createBinding||(Object.create?(function(s,d,c,u){u===void 0&&(u=c);var a=Object.getOwnPropertyDescriptor(d,c);(!a||("get"in a?!d.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return d[c]}}),Object.defineProperty(s,u,a)}):(function(s,d,c,u){u===void 0&&(u=c),s[u]=d[c]})),n=Ve&&Ve.__exportStar||function(s,d){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(d,c)&&t(d,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),n(jc(),e),n(ke(),e),n(xc(),e)})(Ve)),Ve}var Ae={},cn={},te={},Hi;function Pc(){if(Hi)return te;Hi=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(te,"__esModule",{value:!0}),te.notImplemented=te.bitMask=void 0,te.isBytes=n,te.abytes=s,te.abool=d,te.numberToHexUnpadded=c,te.hexToNumber=u,te.bytesToHex=f,te.hexToBytes=l,te.bytesToNumberBE=h,te.bytesToNumberLE=b,te.numberToBytesBE=v,te.numberToBytesLE=N,te.numberToVarBytesBE=B,te.ensureBytes=z,te.concatBytes=K,te.equalBytes=$,te.utf8ToBytes=S,te.inRange=H,te.aInRange=P,te.bitLen=O,te.bitGet=p,te.bitSet=R,te.createHmacDrbg=x,te.validateObject=M,te.memoized=y;const e=BigInt(0),t=BigInt(1);function n(g){return g instanceof Uint8Array||ArrayBuffer.isView(g)&&g.constructor.name==="Uint8Array"}function s(g){if(!n(g))throw new Error("Uint8Array expected")}function d(g,I){if(typeof I!="boolean")throw new Error(g+" boolean expected, got "+I)}function c(g){const I=g.toString(16);return I.length&1?"0"+I:I}function u(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);return g===""?e:BigInt("0x"+g)}const a=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",o=Array.from({length:256},(g,I)=>I.toString(16).padStart(2,"0"));function f(g){if(s(g),a)return g.toHex();let I="";for(let C=0;C<g.length;C++)I+=o[g[C]];return I}const r={_0:48,_9:57,A:65,F:70,a:97,f:102};function i(g){if(g>=r._0&&g<=r._9)return g-r._0;if(g>=r.A&&g<=r.F)return g-(r.A-10);if(g>=r.a&&g<=r.f)return g-(r.a-10)}function l(g){if(typeof g!="string")throw new Error("hex string expected, got "+typeof g);if(a)return Uint8Array.fromHex(g);const I=g.length,C=I/2;if(I%2)throw new Error("hex string expected, got unpadded hex of length "+I);const q=new Uint8Array(C);for(let m=0,w=0;m<C;m++,w+=2){const _=i(g.charCodeAt(w)),J=i(g.charCodeAt(w+1));if(_===void 0||J===void 0){const U=g[w]+g[w+1];throw new Error('hex string expected, got non-hex character "'+U+'" at index '+w)}q[m]=_*16+J}return q}function h(g){return u(f(g))}function b(g){return s(g),u(f(Uint8Array.from(g).reverse()))}function v(g,I){return l(g.toString(16).padStart(I*2,"0"))}function N(g,I){return v(g,I).reverse()}function B(g){return l(c(g))}function z(g,I,C){let q;if(typeof I=="string")try{q=l(I)}catch(w){throw new Error(g+" must be hex string or Uint8Array, cause: "+w)}else if(n(I))q=Uint8Array.from(I);else throw new Error(g+" must be hex string or Uint8Array");const m=q.length;if(typeof C=="number"&&m!==C)throw new Error(g+" of length "+C+" expected, got "+m);return q}function K(...g){let I=0;for(let q=0;q<g.length;q++){const m=g[q];s(m),I+=m.length}const C=new Uint8Array(I);for(let q=0,m=0;q<g.length;q++){const w=g[q];C.set(w,m),m+=w.length}return C}function $(g,I){if(g.length!==I.length)return!1;let C=0;for(let q=0;q<g.length;q++)C|=g[q]^I[q];return C===0}function S(g){if(typeof g!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(g))}const j=g=>typeof g=="bigint"&&e<=g;function H(g,I,C){return j(g)&&j(I)&&j(C)&&I<=g&&g<C}function P(g,I,C,q){if(!H(I,C,q))throw new Error("expected valid "+g+": "+C+" <= n < "+q+", got "+I)}function O(g){let I;for(I=0;g>e;g>>=t,I+=1);return I}function p(g,I){return g>>BigInt(I)&t}function R(g,I,C){return g|(C?t:e)<<BigInt(I)}const G=g=>(t<<BigInt(g))-t;te.bitMask=G;const A=g=>new Uint8Array(g),L=g=>Uint8Array.from(g);function x(g,I,C){if(typeof g!="number"||g<2)throw new Error("hashLen must be a number");if(typeof I!="number"||I<2)throw new Error("qByteLen must be a number");if(typeof C!="function")throw new Error("hmacFn must be a function");let q=A(g),m=A(g),w=0;const _=()=>{q.fill(1),m.fill(0),w=0},J=(...Q)=>C(m,q,...Q),U=(Q=A(0))=>{m=J(L([0]),Q),q=J(),Q.length!==0&&(m=J(L([1]),Q),q=J())},X=()=>{if(w++>=1e3)throw new Error("drbg: tried 1000 values");let Q=0;const ae=[];for(;Q<I;){q=J();const ce=q.slice();ae.push(ce),Q+=q.length}return K(...ae)};return(Q,ae)=>{_(),U(Q);let ce;for(;!(ce=ae(X()));)U();return _(),ce}}const V={bigint:g=>typeof g=="bigint",function:g=>typeof g=="function",boolean:g=>typeof g=="boolean",string:g=>typeof g=="string",stringOrUint8Array:g=>typeof g=="string"||n(g),isSafeInteger:g=>Number.isSafeInteger(g),array:g=>Array.isArray(g),field:(g,I)=>I.Fp.isValid(g),hash:g=>typeof g=="function"&&Number.isSafeInteger(g.outputLen)};function M(g,I,C={}){const q=(m,w,_)=>{const J=V[w];if(typeof J!="function")throw new Error("invalid validator function");const U=g[m];if(!(_&&U===void 0)&&!J(U,g))throw new Error("param "+String(m)+" is invalid. Expected "+w+", got "+U)};for(const[m,w]of Object.entries(I))q(m,w,!1);for(const[m,w]of Object.entries(C))q(m,w,!0);return g}const k=()=>{throw new Error("not implemented")};te.notImplemented=k;function y(g){const I=new WeakMap;return(C,...q)=>{const m=I.get(C);if(m!==void 0)return m;const w=g(C,...q);return I.set(C,w),w}}return te}var Te={},un={},ct={},Di;function Oc(){return Di||(Di=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.crypto=void 0,ct.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),ct}var Ui;function Ot(){return Ui||(Ui=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=s,e.abytes=d,e.ahash=c,e.aexists=u,e.aoutput=a,e.u8=o,e.u32=f,e.clean=r,e.createView=i,e.rotr=l,e.rotl=h,e.byteSwap=b,e.byteSwap32=v,e.bytesToHex=z,e.hexToBytes=S,e.asyncLoop=H,e.utf8ToBytes=P,e.bytesToUtf8=O,e.toBytes=p,e.kdfInputToBytes=R,e.concatBytes=G,e.checkOpts=A,e.createHasher=x,e.createOptHasher=V,e.createXOFer=M,e.randomBytes=k;const t=Oc();function n(y){return y instanceof Uint8Array||ArrayBuffer.isView(y)&&y.constructor.name==="Uint8Array"}function s(y){if(!Number.isSafeInteger(y)||y<0)throw new Error("positive integer expected, got "+y)}function d(y,...g){if(!n(y))throw new Error("Uint8Array expected");if(g.length>0&&!g.includes(y.length))throw new Error("Uint8Array expected of length "+g+", got length="+y.length)}function c(y){if(typeof y!="function"||typeof y.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");s(y.outputLen),s(y.blockLen)}function u(y,g=!0){if(y.destroyed)throw new Error("Hash instance has been destroyed");if(g&&y.finished)throw new Error("Hash#digest() has already been called")}function a(y,g){d(y);const I=g.outputLen;if(y.length<I)throw new Error("digestInto() expects output buffer of length at least "+I)}function o(y){return new Uint8Array(y.buffer,y.byteOffset,y.byteLength)}function f(y){return new Uint32Array(y.buffer,y.byteOffset,Math.floor(y.byteLength/4))}function r(...y){for(let g=0;g<y.length;g++)y[g].fill(0)}function i(y){return new DataView(y.buffer,y.byteOffset,y.byteLength)}function l(y,g){return y<<32-g|y>>>g}function h(y,g){return y<<g|y>>>32-g>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function b(y){return y<<24&4278190080|y<<8&16711680|y>>>8&65280|y>>>24&255}e.swap8IfBE=e.isLE?y=>y:y=>b(y),e.byteSwapIfBE=e.swap8IfBE;function v(y){for(let g=0;g<y.length;g++)y[g]=b(y[g]);return y}e.swap32IfBE=e.isLE?y=>y:v;const N=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",B=Array.from({length:256},(y,g)=>g.toString(16).padStart(2,"0"));function z(y){if(d(y),N)return y.toHex();let g="";for(let I=0;I<y.length;I++)g+=B[y[I]];return g}const K={_0:48,_9:57,A:65,F:70,a:97,f:102};function $(y){if(y>=K._0&&y<=K._9)return y-K._0;if(y>=K.A&&y<=K.F)return y-(K.A-10);if(y>=K.a&&y<=K.f)return y-(K.a-10)}function S(y){if(typeof y!="string")throw new Error("hex string expected, got "+typeof y);if(N)return Uint8Array.fromHex(y);const g=y.length,I=g/2;if(g%2)throw new Error("hex string expected, got unpadded hex of length "+g);const C=new Uint8Array(I);for(let q=0,m=0;q<I;q++,m+=2){const w=$(y.charCodeAt(m)),_=$(y.charCodeAt(m+1));if(w===void 0||_===void 0){const J=y[m]+y[m+1];throw new Error('hex string expected, got non-hex character "'+J+'" at index '+m)}C[q]=w*16+_}return C}const j=async()=>{};e.nextTick=j;async function H(y,g,I){let C=Date.now();for(let q=0;q<y;q++){I(q);const m=Date.now()-C;m>=0&&m<g||(await(0,e.nextTick)(),C+=m)}}function P(y){if(typeof y!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(y))}function O(y){return new TextDecoder().decode(y)}function p(y){return typeof y=="string"&&(y=P(y)),d(y),y}function R(y){return typeof y=="string"&&(y=P(y)),d(y),y}function G(...y){let g=0;for(let C=0;C<y.length;C++){const q=y[C];d(q),g+=q.length}const I=new Uint8Array(g);for(let C=0,q=0;C<y.length;C++){const m=y[C];I.set(m,q),q+=m.length}return I}function A(y,g){if(g!==void 0&&{}.toString.call(g)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(y,g)}class L{}e.Hash=L;function x(y){const g=C=>y().update(p(C)).digest(),I=y();return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=()=>y(),g}function V(y){const g=(C,q)=>y(q).update(p(C)).digest(),I=y({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=C=>y(C),g}function M(y){const g=(C,q)=>y(q).update(p(C)).digest(),I=y({});return g.outputLen=I.outputLen,g.blockLen=I.blockLen,g.create=C=>y(C),g}e.wrapConstructor=x,e.wrapConstructorWithOpts=V,e.wrapXOFConstructorWithOpts=M;function k(y=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(y));if(t.crypto&&typeof t.crypto.randomBytes=="function")return Uint8Array.from(t.crypto.randomBytes(y));throw new Error("crypto.getRandomValues must be defined")}})(un)),un}var Vi;function kc(){if(Vi)return Te;Vi=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.aoutput=Te.anumber=Te.aexists=Te.abytes=void 0;const e=Ot();return Te.abytes=e.abytes,Te.aexists=e.aexists,Te.anumber=e.anumber,Te.aoutput=e.aoutput,Te}var Fi;function Fo(){return Fi||(Fi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.assertBytes=e.assertBool=e.utf8ToBytes=e.toHex=e.createView=e.concatBytes=e.bytesToHex=void 0,e.bytesToUtf8=c,e.hexToBytes=u,e.equalsBytes=a,e.wrapHash=o;const t=Pc();Object.defineProperty(e,"assertBool",{enumerable:!0,get:function(){return t.abool}});const n=kc();Object.defineProperty(e,"assertBytes",{enumerable:!0,get:function(){return n.abytes}});const s=Ot();var d=Ot();Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return d.concatBytes}}),Object.defineProperty(e,"createView",{enumerable:!0,get:function(){return d.createView}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return d.utf8ToBytes}});function c(f){if(!(f instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof f}`);return new TextDecoder().decode(f)}function u(f){const r=f.startsWith("0x")?f.substring(2):f;return(0,s.hexToBytes)(r)}function a(f,r){if(f.length!==r.length)return!1;for(let i=0;i<f.length;i++)if(f[i]!==r[i])return!1;return!0}function o(f){return r=>((0,n.abytes)(r),f(r))}})(cn)),cn}var zi;function vt(){if(zi)return Ae;zi=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.compare=Ae.concat=Ae.toHex=Ae.toBytes=void 0;const e=Fo();function t(c){return c instanceof Uint8Array?c:typeof c=="string"?(0,e.hexToBytes)(c):new Uint8Array(c)}Ae.toBytes=t;function n(c){return typeof c=="string"?((0,e.hexToBytes)(c),c.replace(/^(0x)?/,"0x")):c instanceof Uint8Array?"0x"+(0,e.bytesToHex)(c):"0x"+(0,e.bytesToHex)(new Uint8Array(c))}Ae.toHex=n;function s(c){return(0,e.concatBytes)(...c.map(t))}Ae.concat=s;function d(c,u){const a=BigInt(n(c))-BigInt(n(u));return a>0?1:a<0?-1:0}return Ae.compare=d,Ae}var ge={},qe={},je={},ne={},Z={},Ji;function Lc(){if(Ji)return Z;Ji=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.toBig=Z.shrSL=Z.shrSH=Z.rotrSL=Z.rotrSH=Z.rotrBL=Z.rotrBH=Z.rotr32L=Z.rotr32H=Z.rotlSL=Z.rotlSH=Z.rotlBL=Z.rotlBH=Z.add5L=Z.add5H=Z.add4L=Z.add4H=Z.add3L=Z.add3H=void 0,Z.add=B,Z.fromBig=n,Z.split=s;const e=BigInt(2**32-1),t=BigInt(32);function n(O,p=!1){return p?{h:Number(O&e),l:Number(O>>t&e)}:{h:Number(O>>t&e)|0,l:Number(O&e)|0}}function s(O,p=!1){const R=O.length;let G=new Uint32Array(R),A=new Uint32Array(R);for(let L=0;L<R;L++){const{h:x,l:V}=n(O[L],p);[G[L],A[L]]=[x,V]}return[G,A]}const d=(O,p)=>BigInt(O>>>0)<<t|BigInt(p>>>0);Z.toBig=d;const c=(O,p,R)=>O>>>R;Z.shrSH=c;const u=(O,p,R)=>O<<32-R|p>>>R;Z.shrSL=u;const a=(O,p,R)=>O>>>R|p<<32-R;Z.rotrSH=a;const o=(O,p,R)=>O<<32-R|p>>>R;Z.rotrSL=o;const f=(O,p,R)=>O<<64-R|p>>>R-32;Z.rotrBH=f;const r=(O,p,R)=>O>>>R-32|p<<64-R;Z.rotrBL=r;const i=(O,p)=>p;Z.rotr32H=i;const l=(O,p)=>O;Z.rotr32L=l;const h=(O,p,R)=>O<<R|p>>>32-R;Z.rotlSH=h;const b=(O,p,R)=>p<<R|O>>>32-R;Z.rotlSL=b;const v=(O,p,R)=>p<<R-32|O>>>64-R;Z.rotlBH=v;const N=(O,p,R)=>O<<R-32|p>>>64-R;Z.rotlBL=N;function B(O,p,R,G){const A=(p>>>0)+(G>>>0);return{h:O+R+(A/2**32|0)|0,l:A|0}}const z=(O,p,R)=>(O>>>0)+(p>>>0)+(R>>>0);Z.add3L=z;const K=(O,p,R,G)=>p+R+G+(O/2**32|0)|0;Z.add3H=K;const $=(O,p,R,G)=>(O>>>0)+(p>>>0)+(R>>>0)+(G>>>0);Z.add4L=$;const S=(O,p,R,G,A)=>p+R+G+A+(O/2**32|0)|0;Z.add4H=S;const j=(O,p,R,G,A)=>(O>>>0)+(p>>>0)+(R>>>0)+(G>>>0)+(A>>>0);Z.add5L=j;const H=(O,p,R,G,A,L)=>p+R+G+A+L+(O/2**32|0)|0;Z.add5H=H;const P={fromBig:n,split:s,toBig:d,shrSH:c,shrSL:u,rotrSH:a,rotrSL:o,rotrBH:f,rotrBL:r,rotr32H:i,rotr32L:l,rotlSH:h,rotlSL:b,rotlBH:v,rotlBL:N,add:B,add3L:z,add3H:K,add4L:$,add4H:S,add5H:H,add5L:j};return Z.default=P,Z}var Gi;function Bc(){if(Gi)return ne;Gi=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.shake256=ne.shake128=ne.keccak_512=ne.keccak_384=ne.keccak_256=ne.keccak_224=ne.sha3_512=ne.sha3_384=ne.sha3_256=ne.sha3_224=ne.Keccak=void 0,ne.keccakP=N;const e=Lc(),t=Ot(),n=BigInt(0),s=BigInt(1),d=BigInt(2),c=BigInt(7),u=BigInt(256),a=BigInt(113),o=[],f=[],r=[];for(let $=0,S=s,j=1,H=0;$<24;$++){[j,H]=[H,(2*j+3*H)%5],o.push(2*(5*H+j)),f.push(($+1)*($+2)/2%64);let P=n;for(let O=0;O<7;O++)S=(S<<s^(S>>c)*a)%u,S&d&&(P^=s<<(s<<BigInt(O))-s);r.push(P)}const i=(0,e.split)(r,!0),l=i[0],h=i[1],b=($,S,j)=>j>32?(0,e.rotlBH)($,S,j):(0,e.rotlSH)($,S,j),v=($,S,j)=>j>32?(0,e.rotlBL)($,S,j):(0,e.rotlSL)($,S,j);function N($,S=24){const j=new Uint32Array(10);for(let H=24-S;H<24;H++){for(let p=0;p<10;p++)j[p]=$[p]^$[p+10]^$[p+20]^$[p+30]^$[p+40];for(let p=0;p<10;p+=2){const R=(p+8)%10,G=(p+2)%10,A=j[G],L=j[G+1],x=b(A,L,1)^j[R],V=v(A,L,1)^j[R+1];for(let M=0;M<50;M+=10)$[p+M]^=x,$[p+M+1]^=V}let P=$[2],O=$[3];for(let p=0;p<24;p++){const R=f[p],G=b(P,O,R),A=v(P,O,R),L=o[p];P=$[L],O=$[L+1],$[L]=G,$[L+1]=A}for(let p=0;p<50;p+=10){for(let R=0;R<10;R++)j[R]=$[p+R];for(let R=0;R<10;R++)$[p+R]^=~j[(R+2)%10]&j[(R+4)%10]}$[0]^=l[H],$[1]^=h[H]}(0,t.clean)(j)}class B extends t.Hash{constructor(S,j,H,P=!1,O=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=S,this.suffix=j,this.outputLen=H,this.enableXOF=P,this.rounds=O,(0,t.anumber)(H),!(0<S&&S<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,t.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,t.swap32IfBE)(this.state32),N(this.state32,this.rounds),(0,t.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(S){(0,t.aexists)(this),S=(0,t.toBytes)(S),(0,t.abytes)(S);const{blockLen:j,state:H}=this,P=S.length;for(let O=0;O<P;){const p=Math.min(j-this.pos,P-O);for(let R=0;R<p;R++)H[this.pos++]^=S[O++];this.pos===j&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:S,suffix:j,pos:H,blockLen:P}=this;S[H]^=j,(j&128)!==0&&H===P-1&&this.keccak(),S[P-1]^=128,this.keccak()}writeInto(S){(0,t.aexists)(this,!1),(0,t.abytes)(S),this.finish();const j=this.state,{blockLen:H}=this;for(let P=0,O=S.length;P<O;){this.posOut>=H&&this.keccak();const p=Math.min(H-this.posOut,O-P);S.set(j.subarray(this.posOut,this.posOut+p),P),this.posOut+=p,P+=p}return S}xofInto(S){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(S)}xof(S){return(0,t.anumber)(S),this.xofInto(new Uint8Array(S))}digestInto(S){if((0,t.aoutput)(S,this),this.finished)throw new Error("digest() was already called");return this.writeInto(S),this.destroy(),S}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,t.clean)(this.state)}_cloneInto(S){const{blockLen:j,suffix:H,outputLen:P,rounds:O,enableXOF:p}=this;return S||(S=new B(j,H,P,p,O)),S.state32.set(this.state32),S.pos=this.pos,S.posOut=this.posOut,S.finished=this.finished,S.rounds=O,S.suffix=H,S.outputLen=P,S.enableXOF=p,S.destroyed=this.destroyed,S}}ne.Keccak=B;const z=($,S,j)=>(0,t.createHasher)(()=>new B(S,$,j));ne.sha3_224=z(6,144,224/8),ne.sha3_256=z(6,136,256/8),ne.sha3_384=z(6,104,384/8),ne.sha3_512=z(6,72,512/8),ne.keccak_224=z(1,144,224/8),ne.keccak_256=z(1,136,256/8),ne.keccak_384=z(1,104,384/8),ne.keccak_512=z(1,72,512/8);const K=($,S,j)=>(0,t.createXOFer)((H={})=>new B(S,$,H.dkLen===void 0?j:H.dkLen,!0));return ne.shake128=K(31,168,128/8),ne.shake256=K(31,136,256/8),ne}var Xi;function Nc(){if(Xi)return je;Xi=1,Object.defineProperty(je,"__esModule",{value:!0}),je.keccak512=je.keccak384=je.keccak256=je.keccak224=void 0;const e=Bc(),t=Fo();return je.keccak224=(0,t.wrapHash)(e.keccak_224),je.keccak256=(()=>{const n=(0,t.wrapHash)(e.keccak_256);return n.create=e.keccak_256.create,n})(),je.keccak384=(0,t.wrapHash)(e.keccak_384),je.keccak512=(0,t.wrapHash)(e.keccak_512),je}var Wi;function zo(){if(Wi)return qe;Wi=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.standardNodeHash=qe.standardLeafHash=qe.keccak256=void 0;const e=Vo(),t=Nc(),n=vt();function s(u){return(0,n.toHex)((0,t.keccak256)((0,n.toBytes)(u)))}qe.keccak256=s;function d(u,a){return s(s((0,e.encode)(u,a)))}qe.standardLeafHash=d;function c(u,a){return s((0,n.concat)([u,a].sort(n.compare)))}return qe.standardNodeHash=c,qe}var Se={},Ki;function Ut(){if(Ki)return Se;Ki=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.invariant=Se.validateArgument=Se.InvalidArgumentError=Se.InvariantError=Se.throwError=void 0;function e(c){throw new Error(c)}Se.throwError=e;class t extends Error{constructor(u){super(u),this.name="InvariantError"}}Se.InvariantError=t;class n extends Error{constructor(u){super(u),this.name="InvalidArgumentError"}}Se.InvalidArgumentError=n;function s(c,u){if(!c)throw new n(u)}Se.validateArgument=s;function d(c,u){if(!c)throw new t(u)}return Se.invariant=d,Se}var Yi;function Dn(){if(Yi)return ge;Yi=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.renderMerkleTree=ge.isValidMerkleTree=ge.processMultiProof=ge.getMultiProof=ge.processProof=ge.getProof=ge.makeMerkleTree=void 0;const e=vt(),t=zo(),n=Ut(),s=$=>2*$+1,d=$=>2*$+2,c=$=>$>0?Math.floor(($-1)/2):(0,n.throwError)("Root has no parent"),u=$=>$>0?$-(-1)**($%2):(0,n.throwError)("Root has no siblings"),a=($,S)=>S>=0&&S<$.length,o=($,S)=>a($,s(S)),f=($,S)=>a($,S)&&!o($,S),r=$=>(0,e.toBytes)($).length===32,i=($,S)=>void(f($,S)||(0,n.throwError)("Index is not a leaf")),l=$=>void(r($)||(0,n.throwError)("Merkle tree nodes must be Uint8Array of length 32"));function h($,S=t.standardNodeHash){$.forEach(l),(0,n.validateArgument)($.length!==0,"Expected non-zero number of leaves");const j=new Array(2*$.length-1);for(const[H,P]of $.entries())j[j.length-1-H]=(0,e.toHex)(P);for(let H=j.length-1-$.length;H>=0;H--)j[H]=S(j[s(H)],j[d(H)]);return j}ge.makeMerkleTree=h;function b($,S){i($,S);const j=[];for(;S>0;)j.push((0,e.toHex)($[u(S)])),S=c(S);return j}ge.getProof=b;function v($,S,j=t.standardNodeHash){return l($),S.forEach(l),(0,e.toHex)(S.reduce(j,$))}ge.processProof=v;function N($,S){S.forEach(O=>i($,O)),S.sort((O,p)=>p-O),(0,n.validateArgument)(S.slice(1).every((O,p)=>O!==S[p]),"Cannot prove duplicated index");const j=Array.from(S),H=[],P=[];for(;j.length>0&&j[0]>0;){const O=j.shift(),p=u(O),R=c(O);p===j[0]?(P.push(!0),j.shift()):(P.push(!1),H.push((0,e.toHex)($[p]))),j.push(R)}return S.length===0&&H.push((0,e.toHex)($[0])),{leaves:S.map(O=>(0,e.toHex)($[O])),proof:H,proofFlags:P}}ge.getMultiProof=N;function B($,S=t.standardNodeHash){$.leaves.forEach(l),$.proof.forEach(l),(0,n.validateArgument)($.proof.length>=$.proofFlags.filter(P=>!P).length,"Invalid multiproof format"),(0,n.validateArgument)($.leaves.length+$.proof.length===$.proofFlags.length+1,"Provided leaves and multiproof are not compatible");const j=Array.from($.leaves),H=Array.from($.proof);for(const P of $.proofFlags){const O=j.shift(),p=P?j.shift():H.shift();(0,n.invariant)(O!==void 0&&p!==void 0),j.push(S(O,p))}return(0,n.invariant)(j.length+H.length===1),(0,e.toHex)(j.pop()??H.shift())}ge.processMultiProof=B;function z($,S=t.standardNodeHash){for(const[j,H]of $.entries()){if(!r(H))return!1;const P=s(j),O=d(j);if(O>=$.length){if(P<$.length)return!1}else if((0,e.compare)(H,S($[P],$[O])))return!1}return $.length>0}ge.isValidMerkleTree=z;function K($){(0,n.validateArgument)($.length!==0,"Expected non-zero number of nodes");const S=[[0,[]]],j=[];for(;S.length>0;){const[H,P]=S.pop();j.push(P.slice(0,-1).map(O=>[" ","│ "][O]).join("")+P.slice(-1).map(O=>["└─ ","├─ "][O]).join("")+H+") "+(0,e.toHex)($[H])),d(H)<$.length&&(S.push([d(H),P.concat(0)]),S.push([s(H),P.concat(1)]))}return j.join(`
|
|
4
|
+
`)}return ge.renderMerkleTree=K,ge}var ut={},lt={},Zi;function Mc(){return Zi||(Zi=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.defaultOptions=void 0,lt.defaultOptions={sortLeaves:!0}),lt}var Qi;function Jo(){if(Qi)return ut;Qi=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.MerkleTreeImpl=void 0;const e=vt(),t=Dn(),n=Mc(),s=Ut();class d{constructor(u,a,o,f){this.tree=u,this.values=a,this.leafHash=o,this.nodeHash=f,(0,s.validateArgument)(a.every(({value:r})=>typeof r!="number"),"Leaf values cannot be numbers"),this.hashLookup=Object.fromEntries(a.map(({treeIndex:r},i)=>[u[r],i]))}static prepare(u,a={},o,f){const r=a.sortLeaves??n.defaultOptions.sortLeaves,i=u.map((b,v)=>({value:b,valueIndex:v,hash:o(b)}));r&&i.sort((b,v)=>(0,e.compare)(b.hash,v.hash));const l=(0,t.makeMerkleTree)(i.map(b=>b.hash),f),h=u.map(b=>({value:b,treeIndex:0}));for(const[b,{valueIndex:v}]of i.entries())h[v].treeIndex=l.length-b-1;return[l,h]}get root(){return this.tree[0]}get length(){return this.values.length}at(u){var a;return(a=this.values.at(u))==null?void 0:a.value}render(){return(0,t.renderMerkleTree)(this.tree)}*entries(){for(const[u,{value:a}]of this.values.entries())yield[u,a]}validate(){this.values.forEach((u,a)=>this._validateValueAt(a)),(0,s.invariant)((0,t.isValidMerkleTree)(this.tree,this.nodeHash),"Merkle tree is invalid")}leafLookup(u){const a=this.hashLookup[this.leafHash(u)];return(0,s.validateArgument)(typeof a<"u","Leaf is not in tree"),a}getProof(u){const a=typeof u=="number"?u:this.leafLookup(u);this._validateValueAt(a);const{treeIndex:o}=this.values[a],f=(0,t.getProof)(this.tree,o);return(0,s.invariant)(this._verify(this.tree[o],f),"Unable to prove value"),f}getMultiProof(u){const a=u.map(r=>typeof r=="number"?r:this.leafLookup(r));for(const r of a)this._validateValueAt(r);const o=a.map(r=>this.values[r].treeIndex),f=(0,t.getMultiProof)(this.tree,o);return(0,s.invariant)(this._verifyMultiProof(f),"Unable to prove values"),{leaves:f.leaves.map(r=>this.values[this.hashLookup[r]].value),proof:f.proof,proofFlags:f.proofFlags}}verify(u,a){return this._verify(this._leafHash(u),a)}verifyMultiProof(u){return this._verifyMultiProof({leaves:u.leaves.map(a=>this._leafHash(a)),proof:u.proof,proofFlags:u.proofFlags})}_validateValueAt(u){const a=this.values[u];(0,s.validateArgument)(a!==void 0,"Index out of bounds"),(0,s.invariant)(this.tree[a.treeIndex]===this.leafHash(a.value),"Merkle tree does not contain the expected value")}_leafHash(u){if(typeof u=="number"){const a=this.values[u];(0,s.validateArgument)(a!==void 0,"Index out of bounds"),u=a.value}return this.leafHash(u)}_verify(u,a){return this.root===(0,t.processProof)(u,a,this.nodeHash)}_verifyMultiProof(u){return this.root===(0,t.processMultiProof)(u,this.nodeHash)}}return ut.MerkleTreeImpl=d,ut}var eo;function qc(){if(eo)return Ue;eo=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.SimpleMerkleTree=Ue.formatLeaf=void 0;const e=Vo(),t=vt(),n=Dn(),s=Jo(),d=Ut();function c(a){return(0,t.toHex)((0,e.encode)(["bytes32"],[a]))}Ue.formatLeaf=c;class u extends s.MerkleTreeImpl{static of(o,f={}){const[r,i]=s.MerkleTreeImpl.prepare(o,f,c,f.nodeHash);return new u(r,i,c,f.nodeHash)}static load(o,f){(0,d.validateArgument)(o.format==="simple-v1",`Unknown format '${o.format}'`),(0,d.validateArgument)(f==null!=(o.hash=="custom"),f?"Data does not expect a custom node hashing function":"Data expects a custom node hashing function");const r=new u(o.tree,o.values,c,f);return r.validate(),r}static verify(o,f,r,i){return(0,t.toHex)(o)===(0,n.processProof)(c(f),r,i)}static verifyMultiProof(o,f,r){return(0,t.toHex)(o)===(0,n.processMultiProof)(f,r)}dump(){return{format:"simple-v1",tree:this.tree,values:this.values.map(({value:o,treeIndex:f})=>({value:(0,t.toHex)(o),treeIndex:f})),...this.nodeHash?{hash:"custom"}:{}}}}return Ue.SimpleMerkleTree=u,Ue}var dt={},to;function Hc(){if(to)return dt;to=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.StandardMerkleTree=void 0;const e=vt(),t=Dn(),n=Jo(),s=zo(),d=Ut();class c extends n.MerkleTreeImpl{constructor(a,o,f){super(a,o,r=>(0,s.standardLeafHash)(f,r)),this.tree=a,this.values=o,this.leafEncoding=f}static of(a,o,f={}){const[r,i]=n.MerkleTreeImpl.prepare(a,f,l=>(0,s.standardLeafHash)(o,l));return new c(r,i,o)}static load(a){(0,d.validateArgument)(a.format==="standard-v1",`Unknown format '${a.format}'`),(0,d.validateArgument)(a.leafEncoding!==void 0,"Expected leaf encoding");const o=new c(a.tree,a.values,a.leafEncoding);return o.validate(),o}static verify(a,o,f,r){return(0,e.toHex)(a)===(0,t.processProof)((0,s.standardLeafHash)(o,f),r)}static verifyMultiProof(a,o,f){return(0,e.toHex)(a)===(0,t.processMultiProof)({leaves:f.leaves.map(r=>(0,s.standardLeafHash)(o,r)),proof:f.proof,proofFlags:f.proofFlags})}dump(){return{format:"standard-v1",leafEncoding:this.leafEncoding,tree:this.tree,values:this.values}}}return dt.StandardMerkleTree=c,dt}var ro;function Dc(){return ro||(ro=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StandardMerkleTree=e.SimpleMerkleTree=void 0;var t=qc();Object.defineProperty(e,"SimpleMerkleTree",{enumerable:!0,get:function(){return t.SimpleMerkleTree}});var n=Hc();Object.defineProperty(e,"StandardMerkleTree",{enumerable:!0,get:function(){return n.StandardMerkleTree}})})(zt)),zt}var Uc=Dc();const Go=1,Xo=5,Wo=70,Vc=720*60*60*1e3,Ko=1e6;function Fc(e){try{const t=sa(e),n=So(ia(t.address),e),s=wo(Eo.CollectionDiscountCoupon,e);return{couponManager:{address:n.address,name:n.name,version:n.version,abi:n.abi},collectionDiscountCoupon:s.address}}catch{return null}}function zc(e,t){const n=t.toLowerCase();let s;try{s=wo(Eo.CollectionDiscountCoupon,e).address}catch{return null}for(const d of na)try{const c=So(d,e);if(c.address.toLowerCase()===n)return{couponManager:{address:c.address,name:c.name,version:c.version,abi:c.abi},collectionDiscountCoupon:s}}catch{continue}return null}function Un(e){return[...new Set(e.map(t=>t.toLowerCase()))]}function Jc(e){const t=Un(e);if(t.length===0)throw new He("collections");return Uc.StandardMerkleTree.of(t.map(n=>[n]),["address"]).root}function Yo(e,t){return va.encode(["uint256","uint256","bytes32"],[Go,e,t])}function Gc(){return{Coupon:[{name:"checks",type:"Checks"},{name:"couponAddress",type:"address"},{name:"data",type:"bytes"}],Checks:Kn.Checks,ExternalCheck:Kn.ExternalCheck}}const kt=e=>Math.floor(e/1e3);function Xc(e,t){return{name:t.couponManager.name,version:t.couponManager.version,salt:bt(To(e),32),verifyingContract:t.couponManager.address}}function Wc(e,t,n){return{checks:{uses:e.uses,expiration:kt(e.expiration),effective:kt(e.effective),salt:bt(e.salt,32),contractSignatureIndex:e.contractSignatureIndex,signerSignatureIndex:e.signerSignatureIndex,allowedRoot:bt(e.allowedRoot||"0x",32),externalChecks:[]},couponAddress:t,data:n}}class He extends Error{constructor(t){super(`Invalid sale: ${t}`),this.problem=t,this.name="SaleInputError"}}function Zo(e,t=Date.now()){if(Un(e.collections).length===0)throw new He("collections");if(!Number.isInteger(e.discountPct)||e.discountPct<Xo||e.discountPct>Wo)throw new He("pct");const n=e.startsAtMs??t;if(!(e.endsAtMs>t)||!(e.endsAtMs>n))throw new He("window");if(e.endsAtMs-Math.max(n,t)>Vc)throw new He("duration");if(e.uses!==void 0&&(!Number.isInteger(e.uses)||e.uses<1))throw new He("uses")}const Kc=["function contractSignatureIndex() view returns (uint256)","function signerSignatureIndex(address) view returns (uint256)"];async function Yc(e,t){const n=new jo(e,Kc,Ea()),[s,d]=await Promise.all([n.contractSignatureIndex(),n.signerSignatureIndex(t)]);return{contractSignatureIndex:s.toNumber(),signerSignatureIndex:d.toNumber()}}async function Zc(e,t={}){const n=t.now?t.now():Date.now();Zo(e,n);const s=Fc(e.chainId);if(!s)throw new Error(`Coupons are not available on chain ${e.chainId}`);const d=(await e.signer.getAddress()).toLowerCase(),c=Un(e.collections),u=await(t.readIndexes??Yc)(s.couponManager.address,d),a={uses:e.uses??Ko,expiration:e.endsAtMs,effective:e.startsAtMs??n,salt:To(Sa(32)),contractSignatureIndex:u.contractSignatureIndex,signerSignatureIndex:u.signerSignatureIndex,allowedRoot:"0x",externalChecks:[]},o=e.discountPct*1e4,f=Yo(o,Jc(c)),r=await e.signer._signTypedData(Xc(e.chainId,s),Gc(),Wc(a,s.collectionDiscountCoupon,f));return{signer:d,chainId:e.chainId,network:ga.Network.MATIC,checks:a,couponAddress:s.collectionDiscountCoupon,discountType:Go,discount:o,collections:c,signature:r}}async function Qc(e,t){const n=await ra(`${Tn.marketplaceServerUrl}/v1/coupons`,{method:"POST",identity:t,metadata:{signer:"dcl:marketplace",intent:"dcl:create-coupon"},headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await n.json().catch(()=>({}));if(!n.ok||!s.ok||!s.data)throw new Error(s.message??`postCoupon ${n.status}`);return s.data}async function eu(e){var s;const t=await fetch(`${Tn.marketplaceServerUrl}/v1/coupons?signer=${e.toLowerCase()}`);if(!t.ok)throw(s=t.body)==null||s.cancel(),new Error(`fetchCreatorSales ${t.status}`);return(await t.json()).data??[]}function tu(e){return e.checks.uses<Ko}function ru(e,t=Date.now()){return e.status==="cancelled"||e.status==="revoked"||e.status==="exhausted"?e.status:e.checks.expiration<=t?"ended":e.checks.effective>t?"scheduled":"active"}const nu=(e,t,n)=>new jo(e,t,n);async function su(e,t={}){const{sale:n,signer:s}=e;await ta(s.provider,n.chainId);const d=zc(n.chainId,n.couponManager);if(!d)throw new Error(`The sale's coupon manager ${n.couponManager} is not one this build knows on chain ${n.chainId}`);const c=(t.connect??nu)(d.couponManager.address,d.couponManager.abi,s),u={signature:n.signature,checks:{uses:n.checks.uses,expiration:kt(n.checks.expiration),effective:kt(n.checks.effective),salt:bt(n.checks.salt,32),contractSignatureIndex:n.checks.contractSignatureIndex,signerSignatureIndex:n.checks.signerSignatureIndex,allowedRoot:bt(n.checks.allowedRoot||"0x",32),allowedProof:[],externalChecks:[]},couponAddress:n.couponAddress,data:Yo(n.discount,n.root),callerData:"0x"};return(await(await c.cancelSignature([u],wa(n.chainId))).wait()).transactionHash}function xt(e){return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(e))}const ft=W.div`
|
|
5
5
|
position: fixed;
|
|
6
6
|
inset: 0;
|
|
7
7
|
z-index: ${T.z.overlay};
|
|
@@ -59,7 +59,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
59
59
|
outline: 2px solid ${T.colors.accent};
|
|
60
60
|
outline-offset: 2px;
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,ln=W.p`
|
|
63
63
|
margin: 0;
|
|
64
64
|
font-family: ${T.font.sans};
|
|
65
65
|
font-size: 15px;
|
|
@@ -73,13 +73,13 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
73
73
|
font-family: ${T.font.sans};
|
|
74
74
|
font-size: 13px;
|
|
75
75
|
color: ${T.colors.muted};
|
|
76
|
-
`,
|
|
76
|
+
`,iu=W.div`
|
|
77
77
|
display: flex;
|
|
78
78
|
flex-direction: column;
|
|
79
79
|
gap: 8px;
|
|
80
80
|
max-height: 220px;
|
|
81
81
|
overflow-y: auto;
|
|
82
|
-
`,
|
|
82
|
+
`,ou=W.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
gap: 12px;
|
|
@@ -95,21 +95,21 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
95
95
|
&[data-readonly] {
|
|
96
96
|
cursor: default;
|
|
97
97
|
}
|
|
98
|
-
`,
|
|
98
|
+
`,no=W.span`
|
|
99
99
|
flex: none;
|
|
100
100
|
width: 40px;
|
|
101
101
|
height: 40px;
|
|
102
102
|
border-radius: ${T.radius.btn};
|
|
103
103
|
overflow: hidden;
|
|
104
104
|
background: ${T.colors.media};
|
|
105
|
-
`,
|
|
105
|
+
`,au=W.div`
|
|
106
106
|
display: flex;
|
|
107
107
|
flex-direction: column;
|
|
108
108
|
gap: 8px;
|
|
109
109
|
max-height: 340px;
|
|
110
110
|
overflow-y: auto;
|
|
111
111
|
margin-top: 4px;
|
|
112
|
-
`,
|
|
112
|
+
`,cu=W.button`
|
|
113
113
|
display: flex;
|
|
114
114
|
align-items: center;
|
|
115
115
|
gap: 12px;
|
|
@@ -134,17 +134,17 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
134
134
|
transform: rotate(-90deg);
|
|
135
135
|
color: ${T.colors.muted};
|
|
136
136
|
}
|
|
137
|
-
`,
|
|
137
|
+
`,uu=W.span`
|
|
138
138
|
display: flex;
|
|
139
139
|
flex-direction: column;
|
|
140
140
|
gap: 2px;
|
|
141
141
|
min-width: 0;
|
|
142
|
-
`,
|
|
142
|
+
`,lu=W.span`
|
|
143
143
|
display: flex;
|
|
144
144
|
flex-direction: column;
|
|
145
145
|
gap: 2px;
|
|
146
146
|
min-width: 0;
|
|
147
|
-
`,
|
|
147
|
+
`,so=W.span`
|
|
148
148
|
font-family: ${T.font.sans};
|
|
149
149
|
font-weight: 600;
|
|
150
150
|
font-size: 15px;
|
|
@@ -152,11 +152,11 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
152
152
|
overflow: hidden;
|
|
153
153
|
text-overflow: ellipsis;
|
|
154
154
|
white-space: nowrap;
|
|
155
|
-
`,
|
|
155
|
+
`,io=W.span`
|
|
156
156
|
font-family: ${T.font.sans};
|
|
157
157
|
font-size: 13px;
|
|
158
158
|
color: ${T.colors.muted};
|
|
159
|
-
`,
|
|
159
|
+
`,dn=W.div`
|
|
160
160
|
display: flex;
|
|
161
161
|
flex-wrap: wrap;
|
|
162
162
|
align-items: center;
|
|
@@ -211,7 +211,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
211
211
|
outline: 2px solid ${T.colors.accent};
|
|
212
212
|
outline-offset: 2px;
|
|
213
213
|
}
|
|
214
|
-
`,
|
|
214
|
+
`,oo=W.span`
|
|
215
215
|
display: inline-flex;
|
|
216
216
|
align-items: center;
|
|
217
217
|
gap: 4px;
|
|
@@ -260,7 +260,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
260
260
|
appearance: textfield;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
`,
|
|
263
|
+
`,ao=W.div`
|
|
264
264
|
.react-datepicker-wrapper {
|
|
265
265
|
display: block;
|
|
266
266
|
}
|
|
@@ -286,7 +286,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
286
286
|
.react-datepicker__input-container input:focus {
|
|
287
287
|
border-color: ${T.colors.magenta};
|
|
288
288
|
}
|
|
289
|
-
`,
|
|
289
|
+
`,du=W.div`
|
|
290
290
|
display: flex;
|
|
291
291
|
align-items: center;
|
|
292
292
|
gap: 8px;
|
|
@@ -303,12 +303,12 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
303
303
|
accent-color: ${T.colors.accent};
|
|
304
304
|
cursor: pointer;
|
|
305
305
|
}
|
|
306
|
-
`,
|
|
306
|
+
`,fu=W.label`
|
|
307
307
|
display: inline-flex;
|
|
308
308
|
align-items: center;
|
|
309
309
|
gap: 8px;
|
|
310
310
|
cursor: pointer;
|
|
311
|
-
`,
|
|
311
|
+
`,hu=W.p`
|
|
312
312
|
display: flex;
|
|
313
313
|
align-items: center;
|
|
314
314
|
margin: 0;
|
|
@@ -320,7 +320,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
320
320
|
font-size: 14px;
|
|
321
321
|
line-height: 1.5;
|
|
322
322
|
color: ${T.colors.text2};
|
|
323
|
-
`,
|
|
323
|
+
`,co=W.b`
|
|
324
324
|
font-weight: 700;
|
|
325
325
|
color: ${T.colors.text};
|
|
326
326
|
white-space: nowrap;
|
|
@@ -328,17 +328,17 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
328
328
|
.ico {
|
|
329
329
|
margin-right: 2px;
|
|
330
330
|
}
|
|
331
|
-
`,
|
|
331
|
+
`,pu=W.img`
|
|
332
332
|
width: 1em;
|
|
333
333
|
height: 1em;
|
|
334
334
|
vertical-align: -0.125em;
|
|
335
|
-
`,
|
|
335
|
+
`,uo=W.p`
|
|
336
336
|
margin: 0;
|
|
337
337
|
font-family: ${T.font.sans};
|
|
338
338
|
font-size: 14px;
|
|
339
339
|
color: ${T.colors.muted};
|
|
340
340
|
text-align: center;
|
|
341
|
-
`,
|
|
341
|
+
`,gu=W.button`
|
|
342
342
|
width: 100%;
|
|
343
343
|
height: 48px;
|
|
344
344
|
border: 0;
|
|
@@ -365,14 +365,14 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
365
365
|
background: rgba(105, 31, 169, 0.2);
|
|
366
366
|
color: ${T.colors.white};
|
|
367
367
|
}
|
|
368
|
-
`,
|
|
368
|
+
`,fn=W.div`
|
|
369
369
|
display: flex;
|
|
370
370
|
gap: 12px;
|
|
371
371
|
|
|
372
372
|
${T.media.maxWidth("mobile")} {
|
|
373
373
|
flex-direction: column;
|
|
374
374
|
}
|
|
375
|
-
`,
|
|
375
|
+
`,Qo=`
|
|
376
376
|
flex: 1 1 0;
|
|
377
377
|
height: 48px;
|
|
378
378
|
border-radius: ${T.radius.modal};
|
|
@@ -386,13 +386,13 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
386
386
|
outline: 2px solid ${T.colors.accent};
|
|
387
387
|
outline-offset: 2px;
|
|
388
388
|
}
|
|
389
|
-
`,
|
|
390
|
-
${
|
|
389
|
+
`,hn=W.button`
|
|
390
|
+
${Qo}
|
|
391
391
|
border: 1px solid ${T.colors.accent};
|
|
392
392
|
background: ${T.colors.white};
|
|
393
393
|
color: ${T.colors.accent};
|
|
394
|
-
`,
|
|
395
|
-
${
|
|
394
|
+
`,pn=W.button`
|
|
395
|
+
${Qo}
|
|
396
396
|
border: 0;
|
|
397
397
|
background: ${T.colors.accent};
|
|
398
398
|
color: ${T.colors.white};
|
|
@@ -400,7 +400,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
400
400
|
&:hover {
|
|
401
401
|
background: ${T.colors.accentHover};
|
|
402
402
|
}
|
|
403
|
-
`,
|
|
403
|
+
`,mu=W.div`
|
|
404
404
|
display: flex;
|
|
405
405
|
flex-direction: column;
|
|
406
406
|
align-items: center;
|
|
@@ -409,7 +409,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
409
409
|
border-radius: ${T.radius.modal};
|
|
410
410
|
background: rgba(193, 238, 207, 0.5);
|
|
411
411
|
text-align: center;
|
|
412
|
-
`,
|
|
412
|
+
`,yu=W.div`
|
|
413
413
|
display: grid;
|
|
414
414
|
place-items: center;
|
|
415
415
|
width: 64px;
|
|
@@ -422,13 +422,13 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
422
422
|
width: 34px;
|
|
423
423
|
height: 34px;
|
|
424
424
|
}
|
|
425
|
-
`,
|
|
425
|
+
`,bu=W.p`
|
|
426
426
|
margin: 0;
|
|
427
427
|
font-family: ${T.font.sans};
|
|
428
428
|
font-size: 22px;
|
|
429
429
|
line-height: 1.4;
|
|
430
430
|
color: ${T.colors.text};
|
|
431
|
-
`,
|
|
431
|
+
`,wu=W.p`
|
|
432
432
|
margin: 0;
|
|
433
433
|
display: inline-flex;
|
|
434
434
|
align-items: center;
|
|
@@ -438,7 +438,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
438
438
|
font-family: ${T.font.sans};
|
|
439
439
|
font-size: 15px;
|
|
440
440
|
color: ${T.colors.text2};
|
|
441
|
-
`,
|
|
441
|
+
`,Eu=W.div`
|
|
442
442
|
display: inline-grid;
|
|
443
443
|
grid-template-columns: 1fr 0fr;
|
|
444
444
|
align-items: center;
|
|
@@ -451,7 +451,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
451
451
|
@media (prefers-reduced-motion: reduce) {
|
|
452
452
|
transition: none;
|
|
453
453
|
}
|
|
454
|
-
`,
|
|
454
|
+
`,Su=W.div`
|
|
455
455
|
display: inline-grid;
|
|
456
456
|
grid-template-columns: 0fr;
|
|
457
457
|
transition: grid-template-columns 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
@@ -463,7 +463,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
463
463
|
@media (prefers-reduced-motion: reduce) {
|
|
464
464
|
transition: none;
|
|
465
465
|
}
|
|
466
|
-
`,
|
|
466
|
+
`,In=W.div`
|
|
467
467
|
min-width: 0;
|
|
468
468
|
overflow: hidden;
|
|
469
469
|
white-space: nowrap;
|
|
@@ -472,14 +472,14 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
472
472
|
&[data-off] {
|
|
473
473
|
pointer-events: none;
|
|
474
474
|
}
|
|
475
|
-
`,
|
|
475
|
+
`,vu=W.div`
|
|
476
476
|
display: flex;
|
|
477
477
|
flex-direction: column;
|
|
478
478
|
gap: 8px;
|
|
479
479
|
padding: 12px;
|
|
480
480
|
border-radius: ${T.radius.btn};
|
|
481
481
|
background: ${T.colors.panel};
|
|
482
|
-
`,
|
|
482
|
+
`,Ru=W.span`
|
|
483
483
|
display: inline-flex;
|
|
484
484
|
align-items: center;
|
|
485
485
|
/* Hugs its label: it sits in the same 1fr column the dates fill, which would otherwise stretch it. */
|
|
@@ -499,7 +499,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
499
499
|
border-color: ${n};
|
|
500
500
|
color: ${n};
|
|
501
501
|
}`).join("")}
|
|
502
|
-
`,
|
|
502
|
+
`,gn=W.div`
|
|
503
503
|
display: grid;
|
|
504
504
|
/* Fixed, not content-sized: each row is its own grid, so a max-content track would line each label up
|
|
505
505
|
with nothing. 78px clears the longest label in either locale ("Descuento" measures ~70px). */
|
|
@@ -510,33 +510,33 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
510
510
|
font-family: ${T.font.sans};
|
|
511
511
|
font-size: 15px;
|
|
512
512
|
line-height: 1.5;
|
|
513
|
-
`,
|
|
513
|
+
`,mn=W.span`
|
|
514
514
|
color: ${T.colors.muted};
|
|
515
515
|
font-size: 14px;
|
|
516
|
-
`,
|
|
516
|
+
`,lo=W.b`
|
|
517
517
|
font-weight: 700;
|
|
518
518
|
color: ${T.colors.text};
|
|
519
519
|
overflow: hidden;
|
|
520
520
|
text-overflow: ellipsis;
|
|
521
521
|
white-space: nowrap;
|
|
522
|
-
`,
|
|
522
|
+
`,fo=W($o)`
|
|
523
523
|
flex: none;
|
|
524
524
|
padding: 0;
|
|
525
525
|
background: none;
|
|
526
526
|
color: ${T.colors.muted};
|
|
527
527
|
font-size: 14px;
|
|
528
528
|
font-weight: 600;
|
|
529
|
-
`,
|
|
529
|
+
`,yn=W.div`
|
|
530
530
|
display: flex;
|
|
531
531
|
flex-direction: column;
|
|
532
532
|
gap: 8px;
|
|
533
|
-
`,
|
|
533
|
+
`,bn=W.h3`
|
|
534
534
|
margin: 0;
|
|
535
535
|
font-family: ${T.font.sans};
|
|
536
536
|
font-weight: 600;
|
|
537
537
|
font-size: 14px;
|
|
538
538
|
color: ${T.colors.text};
|
|
539
|
-
`,
|
|
539
|
+
`,wn=W.ul`
|
|
540
540
|
display: flex;
|
|
541
541
|
flex-direction: column;
|
|
542
542
|
gap: 8px;
|
|
@@ -546,7 +546,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
546
546
|
/* Long collections stay inside the modal instead of pushing the actions off-screen. */
|
|
547
547
|
max-height: 232px;
|
|
548
548
|
overflow-y: auto;
|
|
549
|
-
`,
|
|
549
|
+
`,En=W.li`
|
|
550
550
|
display: grid;
|
|
551
551
|
grid-template-columns: 40px minmax(0, 1fr) auto;
|
|
552
552
|
align-items: center;
|
|
@@ -560,27 +560,27 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
560
560
|
background: ${T.colors.panel};
|
|
561
561
|
border-color: ${T.colors.panel};
|
|
562
562
|
}
|
|
563
|
-
`,
|
|
563
|
+
`,Sn=W.img`
|
|
564
564
|
width: 40px;
|
|
565
565
|
height: 40px;
|
|
566
566
|
border-radius: ${T.radius.btn};
|
|
567
567
|
object-fit: cover;
|
|
568
568
|
background: ${T.colors.media};
|
|
569
|
-
`,
|
|
569
|
+
`,vn=W.span`
|
|
570
570
|
font-family: ${T.font.sans};
|
|
571
571
|
font-size: 15px;
|
|
572
572
|
color: ${T.colors.text};
|
|
573
573
|
overflow: hidden;
|
|
574
574
|
text-overflow: ellipsis;
|
|
575
575
|
white-space: nowrap;
|
|
576
|
-
`,
|
|
576
|
+
`,_u=W.span`
|
|
577
577
|
display: grid;
|
|
578
578
|
grid-template-columns: minmax(34px, auto) minmax(46px, auto);
|
|
579
579
|
align-items: center;
|
|
580
580
|
gap: 6px;
|
|
581
581
|
font-family: ${T.font.sans};
|
|
582
582
|
white-space: nowrap;
|
|
583
|
-
|
|
583
|
+
`,$u=W.span`
|
|
584
584
|
display: inline-flex;
|
|
585
585
|
align-items: center;
|
|
586
586
|
justify-content: flex-end;
|
|
@@ -589,7 +589,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
589
589
|
text-decoration: line-through;
|
|
590
590
|
font-weight: 600;
|
|
591
591
|
font-size: 17px;
|
|
592
|
-
`,
|
|
592
|
+
`,Iu=W.span`
|
|
593
593
|
display: inline-flex;
|
|
594
594
|
align-items: center;
|
|
595
595
|
justify-content: flex-end;
|
|
@@ -601,7 +601,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
601
601
|
&[data-heat='${e}'] {
|
|
602
602
|
color: ${t};
|
|
603
603
|
}`).join("")}
|
|
604
|
-
`,
|
|
604
|
+
`,ho=W.span`
|
|
605
605
|
display: inline-flex;
|
|
606
606
|
align-items: center;
|
|
607
607
|
gap: 6px;
|
|
@@ -611,7 +611,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
611
611
|
letter-spacing: 0.04em;
|
|
612
612
|
color: ${T.colors.muted};
|
|
613
613
|
white-space: nowrap;
|
|
614
|
-
`,
|
|
614
|
+
`,Au=W(We)`
|
|
615
615
|
/* Drawn at 14px, hit at 26px: padding cancelled by an equal negative margin, so a finger has something
|
|
616
616
|
to land on without the glyph moving or the row growing. */
|
|
617
617
|
width: 14px;
|
|
@@ -627,7 +627,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
627
627
|
outline-offset: 2px;
|
|
628
628
|
border-radius: 50%;
|
|
629
629
|
}
|
|
630
|
-
`,
|
|
630
|
+
`,Tu=W.p`
|
|
631
631
|
margin: 0;
|
|
632
632
|
padding: 12px;
|
|
633
633
|
border-radius: ${T.radius.btn};
|
|
@@ -640,19 +640,19 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
640
640
|
b {
|
|
641
641
|
font-weight: 700;
|
|
642
642
|
}
|
|
643
|
-
`,
|
|
643
|
+
`,ju=W.p`
|
|
644
644
|
margin: 0;
|
|
645
645
|
font-family: ${T.font.sans};
|
|
646
646
|
font-size: 13px;
|
|
647
647
|
line-height: 1.45;
|
|
648
648
|
color: ${T.colors.muted};
|
|
649
|
-
|
|
649
|
+
`,Cu=oa`
|
|
650
650
|
#creator-sale-calendar {
|
|
651
651
|
position: relative;
|
|
652
652
|
/* Above the modal, which paints over anything at the document's own level. */
|
|
653
653
|
z-index: ${T.z.overlay+1};
|
|
654
654
|
|
|
655
|
-
${
|
|
655
|
+
${la}
|
|
656
656
|
|
|
657
657
|
/* The time column, which the sell flow's date-only picker never shows. */
|
|
658
658
|
.react-datepicker__time-container,
|
|
@@ -680,18 +680,18 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
680
680
|
font-size: 13px;
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
`;function bo(e,t){return Math.max(1,Math.ceil(e*(100-(Number.isFinite(t)?t:0))/100))}const Iu=[10,20,30,50],Eo=[{key:"24h",hours:24},{key:"48h",hours:48},{key:"72h",hours:72},{key:"7d",hours:168}],Tt=3600*1e3;function jt(e){const t=new Date(e),n=s=>String(s).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function wo(e){const t=Cn(e);return t===void 0?null:new Date(t)}const So="creator-sale-calendar";function Cn(e){if(!e)return;const t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}function Ct(e){switch(e){case"pct":return D("creatorSale.errorPct");case"duration":return D("creatorSale.errorDuration");case"collections":return D("creatorSale.errorCollections");case"uses":return D("creatorSale.errorUses");default:return D("creatorSale.errorWindow")}}function Au(e){return e%24===0&&e>=48?D("creatorSale.days",{count:e/24}):D("creatorSale.hours",{count:e})}function $n({id:e,open:t,chip:n,field:s}){return w.jsxs(gu,{"data-open":t||void 0,"data-testid":e,children:[w.jsx(jn,{"data-off":t||void 0,"aria-hidden":t||void 0,"data-testid":`${e}-chip`,children:n}),w.jsx(jn,{"data-off":!t||void 0,"aria-hidden":!t||void 0,"data-testid":`${e}-field`,children:s})]})}function rl({session:e,collection:t,collections:n,onCreated:s,onClose:d}){const u=Ro(),c=ra(),a=n??[],[o,f]=oe.useState(()=>t??(a.length===1?a[0]:null)),r=o??t??a[0],i=oe.useMemo(()=>r?[r.contractAddress]:[],[r]),[l,h]=oe.useState(()=>t||a.length===1?"form":"pick"),[b,v]=oe.useState(20),[N,L]=oe.useState("15"),[z,K]=oe.useState("72h"),[$,S]=oe.useState(()=>jt(Date.now()+168*Tt)),[j,H]=oe.useState("now"),[P,O]=oe.useState(()=>jt(Date.now()+24*Tt)),[p,R]=oe.useState(!1),[G,A]=oe.useState("50"),[B,x]=oe.useState(!1),[V,M]=oe.useState(!1),[k,y]=oe.useState(null),[g,I]=oe.useState(null),[C,q]=oe.useState(null),m=la(e),E=b==="custom"?Number(N):b,_=oe.useMemo(()=>{const F=Date.now(),le=j==="later"?Cn(P):void 0,Ee=Eo.find(_t=>_t.key===z),Ye=Ee?(le??F)+Ee.hours*Tt:Cn($),ve=p?Number(G):void 0,Rt={collections:i,discountPct:E,startsAtMs:le,endsAtMs:Ye??0,uses:ve};let Xn=null;try{ea(Rt,F)}catch(_t){Xn=_t instanceof He?_t.problem:"window"}return{...Rt,problem:Xn}},[i,E,z,$,j,P,p,G]),J=oe.useMemo(()=>{const F=r.examplePriceCredits??100;return{price:F,sale:bo(F,E)}},[r,E]),U=oe.useMemo(()=>{const F=r.items.filter(ve=>ve.state==="discounted"),le=r.items.filter(ve=>ve.state==="classic"),Ee=r.items.filter(ve=>ve.state==="unlisted"),Ye=F.reduce((ve,Rt)=>ve+Rt.remainingSupply,0);return{listed:F,classic:le,unlisted:Ee,supply:Ye}},[r]);async function X(){if(x(!0),I(null),_.problem){I(Ct(_.problem));return}M(!0);try{y(m?D("creatorSale.starting"):D("creatorSale.confirm"));const F=await Xc({signer:e.signer,chainId:xn.chainId,collections:_.collections,discountPct:_.discountPct,startsAtMs:_.startsAtMs,endsAtMs:_.endsAtMs,uses:_.uses});y(D("creatorSale.finishing"));const le=await Wc(F,e.identity);y(null),q(le);const Ee=le.status==="scheduled";Pt("Shop Created Sale",{sale_id:le.id,collections:le.collections.length,discount_pct:_.discountPct,duration_h:Math.round((_.endsAtMs-(_.startsAtMs??Date.now()))/Tt),scheduled:Ee,capped:_.uses!==void 0}),An.success(Ee?D("creatorSale.toastScheduled"):D("creatorSale.toastLive")),s==null||s(le),u.invalidateQueries({queryKey:["creator-sales"]}),u.invalidateQueries({queryKey:["shop-items"]}),u.invalidateQueries({queryKey:["catalog-items"]}),u.invalidateQueries({queryKey:["overview-listings"]}),u.invalidateQueries({queryKey:["collection-sale-state"]})}catch(F){F instanceof He?I(Ct(F.problem)):(_o(F,{flow:"creator_sale"}),Pt("Shop Sale Failed",{error_code:$o(F)}),I(Ao(F,D("creatorSale.errorGeneric")))),y(null)}finally{M(!1)}}function re(){d(),c(`/items/creator/${e.address}`)}if(C){const F=C.status==="scheduled";return w.jsx(ft,{onClick:d,role:"presentation",children:w.jsxs(ht,{"data-testid":"creator-sale-success",onClick:le=>le.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":F?D("creatorSale.successScheduledTitle"):D("creatorSale.successTitle"),children:[w.jsxs(pt,{children:[w.jsx(gt,{children:F?D("creatorSale.successScheduledTitle"):D("creatorSale.successTitle")}),w.jsx(mt,{onClick:d,"aria-label":D("creatorSale.done"),children:w.jsx(We,{name:"close",className:"ico"})})]}),w.jsxs(du,{children:[w.jsx(fu,{"aria-hidden":!0,children:w.jsx(We,{name:"check",className:"ico"})}),w.jsx(hu,{children:w.jsx("b",{children:D("creatorSale.successBody",{count:C.collections.length,pct:C.discount/1e4})})}),w.jsx(pu,{children:F?D("creatorSale.successStarts",{date:xt(C.checks.effective)}):w.jsxs(w.Fragment,{children:[D("creatorSale.successEnds")," ",w.jsx(Io,{until:C.checks.expiration,testId:"creator-sale-countdown"})]})})]}),w.jsxs(pn,{children:[w.jsx(gn,{onClick:d,children:D("creatorSale.done")}),w.jsx(mn,{onClick:re,children:D("creatorSale.viewStore")})]})]})})}const Q=F=>w.jsx("b",{children:F}),ae=F=>w.jsxs(ho,{children:[w.jsx(zt,{className:"ccy-mark"}),F]}),ce=F=>w.jsxs(ho,{children:[w.jsx(uu,{src:fa,alt:"","aria-hidden":!0}),F]}),Be=_.uses!==void 0?Ze("creatorSale.reviewCap",{b:Q,count:_.uses}):Ze("creatorSale.reviewNoCap",{b:Q,count:U.supply});if(l==="review")return w.jsx(ft,{onClick:V?void 0:d,role:"presentation",children:w.jsxs(ht,{"data-testid":"creator-sale-review",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.reviewTitle"),children:[w.jsxs(pt,{children:[w.jsx(gt,{children:D("creatorSale.reviewTitle")}),w.jsx(mt,{onClick:d,disabled:V,"aria-label":D("creatorSale.cancel"),children:w.jsx(We,{name:"close",className:"ico"})})]}),w.jsxs(yu,{children:[w.jsxs(yn,{"data-testid":"creator-sale-review-discount",children:[w.jsx(bn,{children:D("creatorSale.discount")}),w.jsx(bu,{"data-heat":$t(E),"data-testid":"creator-sale-review-pct",children:D("creatorSale.offPct",{pct:E})})]}),w.jsxs(yn,{"data-testid":"creator-sale-review-starts",children:[w.jsx(bn,{children:D("creatorSale.reviewStarts")}),w.jsx(go,{children:_.startsAtMs?xt(_.startsAtMs):D("creatorSale.reviewStartsNow")}),_.startsAtMs?w.jsx(mo,{until:_.startsAtMs}):null]}),w.jsxs(yn,{"data-testid":"creator-sale-review-ends",children:[w.jsx(bn,{children:D("creatorSale.reviewEnds")}),w.jsx(go,{children:xt(_.endsAtMs)}),w.jsx(mo,{until:_.endsAtMs})]})]}),w.jsxs(En,{children:[w.jsx(wn,{children:D("creatorSale.reviewOnSale",{count:U.listed.length})}),w.jsx(Sn,{"data-testid":"creator-sale-review-items",children:U.listed.map(F=>w.jsxs(vn,{"data-testid":"creator-sale-review-item",children:[w.jsx(Rn,{src:F.thumbnail,alt:""}),w.jsx(_n,{"data-testid":"review-name",children:F.name}),w.jsxs(Eu,{children:[w.jsxs(wu,{"data-testid":"review-was",children:[w.jsx(zt,{size:14}),Wn(F.priceCredits)]}),w.jsxs(Su,{"data-heat":$t(E),"data-testid":"review-now",children:[w.jsx(zt,{size:16}),Wn(bo(F.priceCredits,E))]})]})]},F.key))})]}),U.classic.length>0?w.jsxs(En,{children:[w.jsx(wn,{children:D("creatorSale.reviewClassic",{count:U.classic.length})}),w.jsx(Sn,{"data-testid":"creator-sale-review-classic",children:U.classic.map(F=>w.jsxs(vn,{"data-muted":!0,children:[w.jsx(Rn,{src:F.thumbnail,alt:""}),w.jsx(_n,{children:F.name}),w.jsxs(yo,{children:[D("creatorSale.reviewClassicTag"),w.jsx(To,{content:D("creatorSale.reviewClassicWhy"),children:w.jsx(vu,{name:"info",role:"img","aria-label":D("creatorSale.reviewClassicWhy"),tabIndex:0,"data-testid":"creator-sale-classic-why"})})]})]},F.key))}),w.jsx(_u,{children:Ze("creatorSale.reviewClassicHint",{c:ae})})]}):null,U.unlisted.length>0?w.jsxs(En,{children:[w.jsx(wn,{children:D("creatorSale.reviewUntouched",{count:U.unlisted.length})}),w.jsx(Sn,{"data-testid":"creator-sale-review-untouched",children:U.unlisted.map(F=>w.jsxs(vn,{"data-muted":!0,children:[w.jsx(Rn,{src:F.thumbnail,alt:""}),w.jsx(_n,{children:F.name}),w.jsx(yo,{children:D("creatorSale.reviewNotListed")})]},F.key))})]}):null,w.jsx(Ru,{children:Be}),k?w.jsx(po,{children:k}):null,w.jsx(Yn,{message:g,testId:"creator-sale-error"}),w.jsxs(pn,{children:[w.jsx(gn,{onClick:()=>{I(null),y(null),h("form")},disabled:V,"data-testid":"creator-sale-back",children:D("creatorSale.back")}),w.jsx(mn,{"data-testid":"creator-sale-submit",onClick:()=>void X(),disabled:V,children:V?k:j==="later"?D("creatorSale.submitScheduled"):D("creatorSale.submit")})]})]})});const ie=B&&_.problem?Ct(_.problem):null,se=b==="custom",me=z==="custom",de=j==="later";return l==="pick"?w.jsx(ft,{onClick:d,role:"presentation",children:w.jsxs(ht,{"data-testid":"creator-sale-pick",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.pickTitle"),children:[w.jsxs(pt,{children:[w.jsx(gt,{children:D("creatorSale.pickTitle")}),w.jsx(mt,{onClick:d,"aria-label":D("creatorSale.cancel"),children:w.jsx(We,{name:"close",className:"ico"})})]}),w.jsx(fn,{children:D("creatorSale.pickBody")}),w.jsx(ru,{children:a.map(F=>w.jsxs(nu,{type:"button",onClick:()=>{f(F),h("form")},"data-testid":"creator-sale-pick-row",children:[w.jsx(ao,{children:w.jsx(In,{contractAddress:F.contractAddress})}),w.jsxs(su,{children:[w.jsx(co,{children:F.name}),w.jsx(uo,{children:D("creatorSale.collectionListed",{count:F.listedCount})})]}),w.jsx(ha,{className:"ico"})]},F.contractAddress))})]})}):U.listed.length===0&&U.classic.length>0?w.jsx(ft,{onClick:d,role:"presentation",children:w.jsxs(ht,{"data-testid":"creator-sale-blocked",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.title"),children:[w.jsxs(pt,{children:[w.jsx(gt,{children:D("creatorSale.title")}),w.jsx(mt,{onClick:d,"aria-label":D("creatorSale.cancel"),children:w.jsx(We,{name:"close",className:"ico"})})]}),w.jsx(fn,{children:Ze("creatorSale.blockedBody",{c:ae,m:ce,count:U.classic.length})}),w.jsxs(pn,{children:[w.jsx(gn,{onClick:d,children:D("creatorSale.cancel")}),w.jsx(mn,{onClick:()=>{d(),c("/activity?section=listings")},children:D("creatorSale.blockedCta")})]})]})}):w.jsxs(ft,{onClick:V?void 0:d,role:"presentation",children:[w.jsx(oa,{styles:$u}),w.jsxs(ht,{"data-testid":"creator-sale-modal",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.title"),children:[w.jsxs(pt,{children:[w.jsx(gt,{children:D("creatorSale.title")}),w.jsx(mt,{onClick:d,disabled:V,"aria-label":D("creatorSale.cancel"),children:w.jsx(We,{name:"close",className:"ico"})})]}),w.jsx(fn,{children:D("creatorSale.subtitle")}),w.jsxs(yt,{children:[w.jsx(At,{children:D("creatorSale.collection")}),w.jsx(eu,{"data-testid":"creator-sale-collections",children:w.jsxs(tu,{"data-selected":!0,"data-readonly":!0,children:[w.jsx(ao,{children:w.jsx(In,{contractAddress:r.contractAddress})}),w.jsxs(iu,{children:[w.jsx(co,{children:r.name}),w.jsx(uo,{children:D("creatorSale.collectionListed",{count:r.listedCount})})]})]})})]}),w.jsxs(yt,{children:[w.jsx(At,{children:D("creatorSale.discount")}),w.jsxs(hn,{role:"group","aria-label":D("creatorSale.discount"),"data-testid":"creator-sale-discounts",children:[Iu.map(F=>w.jsx(Qe,{type:"button","data-heat":$t(F),"data-selected":b===F||void 0,"aria-pressed":b===F,disabled:V,onClick:()=>{x(!0),v(F)},children:D("creatorSale.offPct",{pct:F})},F)),w.jsx($n,{id:"creator-sale-custom-pct",open:se,chip:w.jsx(Qe,{type:"button",tabIndex:se?-1:void 0,disabled:V,onClick:()=>{x(!0),v("custom")},children:D("creatorSale.customPct")}),field:w.jsxs(lo,{"data-heat":$t(E),"aria-invalid":B&&_.problem==="pct"?!0:void 0,children:[w.jsx("input",{type:"number",min:Wo,max:Ko,step:"1",inputMode:"numeric",value:N,disabled:V,tabIndex:se?void 0:-1,"aria-label":D("creatorSale.pctLabel"),onChange:F=>{x(!0),L(F.target.value)}}),w.jsx("span",{"aria-hidden":!0,children:"%"})]})})]})]}),w.jsxs(yt,{children:[w.jsx(At,{children:D("creatorSale.duration")}),w.jsxs(hn,{role:"group","aria-label":D("creatorSale.duration"),"data-testid":"creator-sale-durations",children:[Eo.map(F=>w.jsx(Qe,{type:"button","data-selected":z===F.key||void 0,"aria-pressed":z===F.key,disabled:V,onClick:()=>{x(!0),K(F.key)},children:Au(F.hours)},F.key)),w.jsx($n,{id:"creator-sale-custom-end",open:me,chip:w.jsx(Qe,{type:"button",tabIndex:me?-1:void 0,disabled:V,onClick:()=>{x(!0),K("custom")},children:D("creatorSale.customEnd")}),field:w.jsx(fo,{children:w.jsx(Kn,{selected:wo($),onChange:F=>{x(!0),S(F?jt(F.getTime()):"")},minDate:new Date,showTimeSelect:!0,timeIntervals:30,dateFormat:"Pp",disabled:V,tabIndex:me?void 0:-1,showPopperArrow:!1,portalId:So,placeholderText:D("creatorSale.endLabel"),"aria-label":D("creatorSale.endLabel")})})})]})]}),w.jsxs(yt,{children:[w.jsx(At,{children:D("creatorSale.start")}),w.jsxs(hn,{role:"group","aria-label":D("creatorSale.start"),children:[w.jsx(Qe,{type:"button","data-selected":j==="now"||void 0,"aria-pressed":j==="now",disabled:V,onClick:()=>H("now"),children:D("creatorSale.startNow")}),w.jsx($n,{id:"creator-sale-custom-start",open:de,chip:w.jsx(Qe,{type:"button",tabIndex:de?-1:void 0,disabled:V,onClick:()=>H("later"),children:D("creatorSale.startLater")}),field:w.jsx(fo,{children:w.jsx(Kn,{selected:wo(P),onChange:F=>{x(!0),O(F?jt(F.getTime()):"")},minDate:new Date,showTimeSelect:!0,timeIntervals:30,dateFormat:"Pp",disabled:V,tabIndex:de?void 0:-1,showPopperArrow:!1,portalId:So,placeholderText:D("creatorSale.startLabel"),"aria-label":D("creatorSale.startLabel")})})})]})]}),w.jsx(yt,{children:w.jsxs(ou,{children:[w.jsxs(au,{children:[w.jsx("input",{type:"checkbox",checked:p,disabled:V,"data-testid":"creator-sale-cap-toggle",onChange:F=>R(F.target.checked)}),w.jsx("span",{children:D("creatorSale.cap")})]}),w.jsx(mu,{"data-open":p||void 0,"data-testid":"creator-sale-cap",children:w.jsx(jn,{"data-off":!p||void 0,"aria-hidden":!p||void 0,children:w.jsx(lo,{children:w.jsx("input",{type:"number",min:"1",step:"1",inputMode:"numeric",value:G,disabled:V,tabIndex:p?void 0:-1,"aria-label":D("creatorSale.capLabel"),onChange:F=>{x(!0),A(F.target.value)}})})})})]})}),w.jsx(cu,{"data-testid":"creator-sale-preview",children:w.jsx("span",{children:J.sale<J.price?Ze("creatorSale.preview",{price:J.price,sale:J.sale,c:ae}):Ze("creatorSale.previewNoChange",{price:J.price,c:ae})})}),k?w.jsx(po,{children:k}):null,w.jsx(Yn,{message:g??ie,testId:"creator-sale-error"}),w.jsx(lu,{"data-testid":"creator-sale-continue",onClick:()=>{x(!0),_.problem?I(Ct(_.problem)):(I(null),h("review"))},disabled:V||B&&!!_.problem,children:D("creatorSale.review")})]})]})}function nl(e,t){const n=new Map;for(const s of e){if(s.remainingSupply<=0)continue;const d=t==null?void 0:t[`${s.contractAddress}-${s.blockchainItemId}`],u=d!=null&&d.isOnSale?d.manaWei?"classic":"discounted":"unlisted",c=u==="discounted",a=s.contractAddress.toLowerCase(),o=n.get(a)??{contractAddress:a,name:s.collectionName,listedCount:0,examplePriceCredits:null,items:[]};o.items.push({key:`${a}-${s.blockchainItemId}`,name:s.name,thumbnail:s.thumbnail,priceCredits:c&&d?d.priceCredits:null,state:u,remainingSupply:s.remainingSupply}),c&&d&&(o.listedCount+=1,o.examplePriceCredits=Math.max(o.examplePriceCredits??0,d.priceCredits)),n.set(a,o)}return[...n.values()].filter(s=>s.listedCount>0||s.items.some(d=>d.state==="classic"))}const{colors:Ce,radius:Jn,font:Gn,media:Tu}=T,ju=W.div`
|
|
683
|
+
`;function po(e,t){return Math.max(1,Math.ceil(e*(100-(Number.isFinite(t)?t:0))/100))}const xu=[10,20,30,50],go=[{key:"24h",hours:24},{key:"48h",hours:48},{key:"72h",hours:72},{key:"7d",hours:168}],Tt=3600*1e3;function jt(e){const t=new Date(e),n=s=>String(s).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function mo(e){const t=An(e);return t===void 0?null:new Date(t)}const yo="creator-sale-calendar";function An(e){if(!e)return;const t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}function Ct(e){switch(e){case"pct":return D("creatorSale.errorPct");case"duration":return D("creatorSale.errorDuration");case"collections":return D("creatorSale.errorCollections");case"uses":return D("creatorSale.errorUses");default:return D("creatorSale.errorWindow")}}function Pu(e){return e%24===0&&e>=48?D("creatorSale.days",{count:e/24}):D("creatorSale.hours",{count:e})}function Rn({id:e,open:t,chip:n,field:s}){return E.jsxs(Eu,{"data-open":t||void 0,"data-testid":e,children:[E.jsx(In,{"data-off":t||void 0,"aria-hidden":t||void 0,"data-testid":`${e}-chip`,children:n}),E.jsx(In,{"data-off":!t||void 0,"aria-hidden":!t||void 0,"data-testid":`${e}-field`,children:s})]})}function al({session:e,collection:t,collections:n,onCreated:s,onClose:d}){const c=vo(),u=ea(),a=n??[],[o,f]=oe.useState(()=>t??(a.length===1?a[0]:null)),r=o??t??a[0],i=oe.useMemo(()=>r?[r.contractAddress]:[],[r]),[l,h]=oe.useState(()=>t||a.length===1?"form":"pick"),[b,v]=oe.useState(20),[N,B]=oe.useState("15"),[z,K]=oe.useState("72h"),[$,S]=oe.useState(()=>jt(Date.now()+168*Tt)),[j,H]=oe.useState("now"),[P,O]=oe.useState(()=>jt(Date.now()+24*Tt)),[p,R]=oe.useState(!1),[G,A]=oe.useState("50"),[L,x]=oe.useState(!1),[V,M]=oe.useState(!1),[k,y]=oe.useState(null),[g,I]=oe.useState(null),[C,q]=oe.useState(null),m=da(e),w=b==="custom"?Number(N):b,_=oe.useMemo(()=>{const F=Date.now(),le=j==="later"?An(P):void 0,we=go.find(_t=>_t.key===z),Ye=we?(le??F)+we.hours*Tt:An($),ve=p?Number(G):void 0,Rt={collections:i,discountPct:w,startsAtMs:le,endsAtMs:Ye??0,uses:ve};let zn=null;try{Zo(Rt,F)}catch(_t){zn=_t instanceof He?_t.problem:"window"}return{...Rt,problem:zn}},[i,w,z,$,j,P,p,G]),J=oe.useMemo(()=>{const F=r.examplePriceCredits??100;return{price:F,sale:po(F,w)}},[r,w]),U=oe.useMemo(()=>{const F=r.items.filter(ve=>ve.state==="discounted"),le=r.items.filter(ve=>ve.state==="classic"),we=r.items.filter(ve=>ve.state==="unlisted"),Ye=F.reduce((ve,Rt)=>ve+Rt.remainingSupply,0);return{listed:F,classic:le,unlisted:we,supply:Ye}},[r]);async function X(){if(x(!0),I(null),_.problem){I(Ct(_.problem));return}M(!0);try{y(m?D("creatorSale.starting"):D("creatorSale.confirm"));const F=await Zc({signer:e.signer,chainId:Tn.chainId,collections:_.collections,discountPct:_.discountPct,startsAtMs:_.startsAtMs,endsAtMs:_.endsAtMs,uses:_.uses});y(D("creatorSale.finishing"));const le=await Qc(F,e.identity);y(null),q(le);const we=le.status==="scheduled";Pt("Shop Created Sale",{sale_id:le.id,collections:le.collections.length,discount_pct:_.discountPct,duration_h:Math.round((_.endsAtMs-(_.startsAtMs??Date.now()))/Tt),scheduled:we,capped:_.uses!==void 0}),$n.success(we?D("creatorSale.toastScheduled"):D("creatorSale.toastLive")),s==null||s(le),c.invalidateQueries({queryKey:["creator-sales"]}),c.invalidateQueries({queryKey:["shop-items"]}),c.invalidateQueries({queryKey:["catalog-items"]}),c.invalidateQueries({queryKey:["overview-listings"]}),c.invalidateQueries({queryKey:["collection-sale-state"]})}catch(F){F instanceof He?I(Ct(F.problem)):(Ro(F,{flow:"creator_sale"}),Pt("Shop Sale Failed",{error_code:_o(F)}),I(Io(F,D("creatorSale.errorGeneric")))),y(null)}finally{M(!1)}}function re(){d(),u(`/items/creator/${e.address}`)}if(C){const F=C.status==="scheduled";return E.jsx(ft,{onClick:d,role:"presentation",children:E.jsxs(ht,{"data-testid":"creator-sale-success",onClick:le=>le.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":F?D("creatorSale.successScheduledTitle"):D("creatorSale.successTitle"),children:[E.jsxs(pt,{children:[E.jsx(gt,{children:F?D("creatorSale.successScheduledTitle"):D("creatorSale.successTitle")}),E.jsx(mt,{onClick:d,"aria-label":D("creatorSale.done"),children:E.jsx(We,{name:"close",className:"ico"})})]}),E.jsxs(mu,{children:[E.jsx(yu,{"aria-hidden":!0,children:E.jsx(We,{name:"check",className:"ico"})}),E.jsx(bu,{children:E.jsx("b",{children:D("creatorSale.successBody",{count:C.collections.length,pct:C.discount/1e4})})}),E.jsx(wu,{children:F?D("creatorSale.successStarts",{date:xt(C.checks.effective)}):E.jsxs(E.Fragment,{children:[D("creatorSale.successEnds")," ",E.jsx($o,{until:C.checks.expiration,testId:"creator-sale-countdown"})]})})]}),E.jsxs(fn,{children:[E.jsx(hn,{onClick:d,children:D("creatorSale.done")}),E.jsx(pn,{onClick:re,children:D("creatorSale.viewStore")})]})]})})}const Q=F=>E.jsx("b",{children:F}),ae=F=>E.jsxs(co,{children:[E.jsx(Vt,{className:"ccy-mark"}),F]}),ce=F=>E.jsxs(co,{children:[E.jsx(pu,{src:ha,alt:"","aria-hidden":!0}),F]}),Le=_.uses!==void 0?Ze("creatorSale.reviewCap",{b:Q,count:_.uses}):Ze("creatorSale.reviewNoCap",{b:Q,count:U.supply});if(l==="review")return E.jsx(ft,{onClick:V?void 0:d,role:"presentation",children:E.jsxs(ht,{"data-testid":"creator-sale-review",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.reviewTitle"),children:[E.jsxs(pt,{children:[E.jsx(gt,{children:D("creatorSale.reviewTitle")}),E.jsx(mt,{onClick:d,disabled:V,"aria-label":D("creatorSale.cancel"),children:E.jsx(We,{name:"close",className:"ico"})})]}),E.jsxs(vu,{children:[E.jsxs(gn,{"data-testid":"creator-sale-review-discount",children:[E.jsx(mn,{children:D("creatorSale.discount")}),E.jsx(Ru,{"data-heat":$t(w),"data-testid":"creator-sale-review-pct",children:D("creatorSale.offPct",{pct:w})})]}),E.jsxs(gn,{"data-testid":"creator-sale-review-starts",children:[E.jsx(mn,{children:D("creatorSale.reviewStarts")}),E.jsx(lo,{children:_.startsAtMs?xt(_.startsAtMs):D("creatorSale.reviewStartsNow")}),_.startsAtMs?E.jsx(fo,{until:_.startsAtMs}):null]}),E.jsxs(gn,{"data-testid":"creator-sale-review-ends",children:[E.jsx(mn,{children:D("creatorSale.reviewEnds")}),E.jsx(lo,{children:xt(_.endsAtMs)}),E.jsx(fo,{until:_.endsAtMs})]})]}),E.jsxs(yn,{children:[E.jsx(bn,{children:D("creatorSale.reviewOnSale",{count:U.listed.length})}),E.jsx(wn,{"data-testid":"creator-sale-review-items",children:U.listed.map(F=>E.jsxs(En,{"data-testid":"creator-sale-review-item",children:[E.jsx(Sn,{src:F.thumbnail,alt:""}),E.jsx(vn,{"data-testid":"review-name",children:F.name}),E.jsxs(_u,{children:[E.jsxs($u,{"data-testid":"review-was",children:[E.jsx(Vt,{size:14}),Jn(F.priceCredits)]}),E.jsxs(Iu,{"data-heat":$t(w),"data-testid":"review-now",children:[E.jsx(Vt,{size:16}),Jn(po(F.priceCredits,w))]})]})]},F.key))})]}),U.classic.length>0?E.jsxs(yn,{children:[E.jsx(bn,{children:D("creatorSale.reviewClassic",{count:U.classic.length})}),E.jsx(wn,{"data-testid":"creator-sale-review-classic",children:U.classic.map(F=>E.jsxs(En,{"data-muted":!0,children:[E.jsx(Sn,{src:F.thumbnail,alt:""}),E.jsx(vn,{children:F.name}),E.jsxs(ho,{children:[D("creatorSale.reviewClassicTag"),E.jsx(Ao,{content:D("creatorSale.reviewClassicWhy"),children:E.jsx(Au,{name:"info",role:"img","aria-label":D("creatorSale.reviewClassicWhy"),tabIndex:0,"data-testid":"creator-sale-classic-why"})})]})]},F.key))}),E.jsx(ju,{children:Ze("creatorSale.reviewClassicHint",{c:ae})})]}):null,U.unlisted.length>0?E.jsxs(yn,{children:[E.jsx(bn,{children:D("creatorSale.reviewUntouched",{count:U.unlisted.length})}),E.jsx(wn,{"data-testid":"creator-sale-review-untouched",children:U.unlisted.map(F=>E.jsxs(En,{"data-muted":!0,children:[E.jsx(Sn,{src:F.thumbnail,alt:""}),E.jsx(vn,{children:F.name}),E.jsx(ho,{children:D("creatorSale.reviewNotListed")})]},F.key))})]}):null,E.jsx(Tu,{children:Le}),k?E.jsx(uo,{children:k}):null,E.jsx(Xn,{message:g,testId:"creator-sale-error"}),E.jsxs(fn,{children:[E.jsx(hn,{onClick:()=>{I(null),y(null),h("form")},disabled:V,"data-testid":"creator-sale-back",children:D("creatorSale.back")}),E.jsx(pn,{"data-testid":"creator-sale-submit",onClick:()=>void X(),disabled:V,children:V?k:j==="later"?D("creatorSale.submitScheduled"):D("creatorSale.submit")})]})]})});const ie=L&&_.problem?Ct(_.problem):null,se=b==="custom",me=z==="custom",de=j==="later";return l==="pick"?E.jsx(ft,{onClick:d,role:"presentation",children:E.jsxs(ht,{"data-testid":"creator-sale-pick",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.pickTitle"),children:[E.jsxs(pt,{children:[E.jsx(gt,{children:D("creatorSale.pickTitle")}),E.jsx(mt,{onClick:d,"aria-label":D("creatorSale.cancel"),children:E.jsx(We,{name:"close",className:"ico"})})]}),E.jsx(ln,{children:D("creatorSale.pickBody")}),E.jsx(au,{children:a.map(F=>E.jsxs(cu,{type:"button",onClick:()=>{f(F),h("form")},"data-testid":"creator-sale-pick-row",children:[E.jsx(no,{children:E.jsx(_n,{contractAddress:F.contractAddress})}),E.jsxs(uu,{children:[E.jsx(so,{children:F.name}),E.jsx(io,{children:D("creatorSale.collectionListed",{count:F.listedCount})})]}),E.jsx(pa,{className:"ico"})]},F.contractAddress))})]})}):U.listed.length===0&&U.classic.length>0?E.jsx(ft,{onClick:d,role:"presentation",children:E.jsxs(ht,{"data-testid":"creator-sale-blocked",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.title"),children:[E.jsxs(pt,{children:[E.jsx(gt,{children:D("creatorSale.title")}),E.jsx(mt,{onClick:d,"aria-label":D("creatorSale.cancel"),children:E.jsx(We,{name:"close",className:"ico"})})]}),E.jsx(ln,{children:Ze("creatorSale.blockedBody",{c:ae,m:ce,count:U.classic.length})}),E.jsxs(fn,{children:[E.jsx(hn,{onClick:d,children:D("creatorSale.cancel")}),E.jsx(pn,{onClick:()=>{d(),u("/activity?section=listings")},children:D("creatorSale.blockedCta")})]})]})}):E.jsxs(ft,{onClick:V?void 0:d,role:"presentation",children:[E.jsx(aa,{styles:Cu}),E.jsxs(ht,{"data-testid":"creator-sale-modal",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":D("creatorSale.title"),children:[E.jsxs(pt,{children:[E.jsx(gt,{children:D("creatorSale.title")}),E.jsx(mt,{onClick:d,disabled:V,"aria-label":D("creatorSale.cancel"),children:E.jsx(We,{name:"close",className:"ico"})})]}),E.jsx(ln,{children:D("creatorSale.subtitle")}),E.jsxs(yt,{children:[E.jsx(At,{children:D("creatorSale.collection")}),E.jsx(iu,{"data-testid":"creator-sale-collections",children:E.jsxs(ou,{"data-selected":!0,"data-readonly":!0,children:[E.jsx(no,{children:E.jsx(_n,{contractAddress:r.contractAddress})}),E.jsxs(lu,{children:[E.jsx(so,{children:r.name}),E.jsx(io,{children:D("creatorSale.collectionListed",{count:r.listedCount})})]})]})})]}),E.jsxs(yt,{children:[E.jsx(At,{children:D("creatorSale.discount")}),E.jsxs(dn,{role:"group","aria-label":D("creatorSale.discount"),"data-testid":"creator-sale-discounts",children:[xu.map(F=>E.jsx(Qe,{type:"button","data-heat":$t(F),"data-selected":b===F||void 0,"aria-pressed":b===F,disabled:V,onClick:()=>{x(!0),v(F)},children:D("creatorSale.offPct",{pct:F})},F)),E.jsx(Rn,{id:"creator-sale-custom-pct",open:se,chip:E.jsx(Qe,{type:"button",tabIndex:se?-1:void 0,disabled:V,onClick:()=>{x(!0),v("custom")},children:D("creatorSale.customPct")}),field:E.jsxs(oo,{"data-heat":$t(w),"aria-invalid":L&&_.problem==="pct"?!0:void 0,children:[E.jsx("input",{type:"number",min:Xo,max:Wo,step:"1",inputMode:"numeric",value:N,disabled:V,tabIndex:se?void 0:-1,"aria-label":D("creatorSale.pctLabel"),onChange:F=>{x(!0),B(F.target.value)}}),E.jsx("span",{"aria-hidden":!0,children:"%"})]})})]})]}),E.jsxs(yt,{children:[E.jsx(At,{children:D("creatorSale.duration")}),E.jsxs(dn,{role:"group","aria-label":D("creatorSale.duration"),"data-testid":"creator-sale-durations",children:[go.map(F=>E.jsx(Qe,{type:"button","data-selected":z===F.key||void 0,"aria-pressed":z===F.key,disabled:V,onClick:()=>{x(!0),K(F.key)},children:Pu(F.hours)},F.key)),E.jsx(Rn,{id:"creator-sale-custom-end",open:me,chip:E.jsx(Qe,{type:"button",tabIndex:me?-1:void 0,disabled:V,onClick:()=>{x(!0),K("custom")},children:D("creatorSale.customEnd")}),field:E.jsx(ao,{children:E.jsx(Gn,{selected:mo($),onChange:F=>{x(!0),S(F?jt(F.getTime()):"")},minDate:new Date,showTimeSelect:!0,timeIntervals:30,dateFormat:"Pp",disabled:V,tabIndex:me?void 0:-1,showPopperArrow:!1,portalId:yo,placeholderText:D("creatorSale.endLabel"),"aria-label":D("creatorSale.endLabel")})})})]})]}),E.jsxs(yt,{children:[E.jsx(At,{children:D("creatorSale.start")}),E.jsxs(dn,{role:"group","aria-label":D("creatorSale.start"),children:[E.jsx(Qe,{type:"button","data-selected":j==="now"||void 0,"aria-pressed":j==="now",disabled:V,onClick:()=>H("now"),children:D("creatorSale.startNow")}),E.jsx(Rn,{id:"creator-sale-custom-start",open:de,chip:E.jsx(Qe,{type:"button",tabIndex:de?-1:void 0,disabled:V,onClick:()=>H("later"),children:D("creatorSale.startLater")}),field:E.jsx(ao,{children:E.jsx(Gn,{selected:mo(P),onChange:F=>{x(!0),O(F?jt(F.getTime()):"")},minDate:new Date,showTimeSelect:!0,timeIntervals:30,dateFormat:"Pp",disabled:V,tabIndex:de?void 0:-1,showPopperArrow:!1,portalId:yo,placeholderText:D("creatorSale.startLabel"),"aria-label":D("creatorSale.startLabel")})})})]})]}),E.jsx(yt,{children:E.jsxs(du,{children:[E.jsxs(fu,{children:[E.jsx("input",{type:"checkbox",checked:p,disabled:V,"data-testid":"creator-sale-cap-toggle",onChange:F=>R(F.target.checked)}),E.jsx("span",{children:D("creatorSale.cap")})]}),E.jsx(Su,{"data-open":p||void 0,"data-testid":"creator-sale-cap",children:E.jsx(In,{"data-off":!p||void 0,"aria-hidden":!p||void 0,children:E.jsx(oo,{children:E.jsx("input",{type:"number",min:"1",step:"1",inputMode:"numeric",value:G,disabled:V,tabIndex:p?void 0:-1,"aria-label":D("creatorSale.capLabel"),onChange:F=>{x(!0),A(F.target.value)}})})})})]})}),E.jsx(hu,{"data-testid":"creator-sale-preview",children:E.jsx("span",{children:J.sale<J.price?Ze("creatorSale.preview",{price:J.price,sale:J.sale,c:ae}):Ze("creatorSale.previewNoChange",{price:J.price,c:ae})})}),k?E.jsx(uo,{children:k}):null,E.jsx(Xn,{message:g??ie,testId:"creator-sale-error"}),E.jsx(gu,{"data-testid":"creator-sale-continue",onClick:()=>{x(!0),_.problem?I(Ct(_.problem)):(I(null),h("review"))},disabled:V||L&&!!_.problem,children:D("creatorSale.review")})]})]})}function cl(e,t){const n=new Map;for(const s of e){if(s.remainingSupply<=0)continue;const d=t==null?void 0:t[`${s.contractAddress}-${s.blockchainItemId}`],c=d!=null&&d.isOnSale?d.manaWei?"classic":"discounted":"unlisted",u=c==="discounted",a=s.contractAddress.toLowerCase(),o=n.get(a)??{contractAddress:a,name:s.collectionName,listedCount:0,examplePriceCredits:null,items:[]};o.items.push({key:`${a}-${s.blockchainItemId}`,name:s.name,thumbnail:s.thumbnail,priceCredits:u&&d?d.priceCredits:null,state:c,remainingSupply:s.remainingSupply}),u&&d&&(o.listedCount+=1,o.examplePriceCredits=Math.max(o.examplePriceCredits??0,d.priceCredits)),n.set(a,o)}return[...n.values()].filter(s=>s.listedCount>0||s.items.some(d=>d.state==="classic"))}const{colors:Ce,radius:Vn,font:Fn,media:Ou}=T,ku=W.div`
|
|
684
684
|
display: flex;
|
|
685
685
|
flex-direction: column;
|
|
686
686
|
gap: 12px;
|
|
687
|
-
`,
|
|
687
|
+
`,Lu=W.span`
|
|
688
688
|
flex: none;
|
|
689
689
|
width: 40px;
|
|
690
690
|
height: 40px;
|
|
691
|
-
border-radius: ${
|
|
691
|
+
border-radius: ${Vn.btn};
|
|
692
692
|
overflow: hidden;
|
|
693
693
|
background: ${Ce.media};
|
|
694
|
-
`,
|
|
694
|
+
`,Bu=W.div`
|
|
695
695
|
display: grid;
|
|
696
696
|
/* Three tracks: the mosaic, the text, the action. The discount moved in with the text, where it lines up
|
|
697
697
|
with the timer instead of floating between the row's two lines. */
|
|
@@ -702,7 +702,7 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
702
702
|
padding left them pressed against the card's edges. */
|
|
703
703
|
padding: 16px 18px;
|
|
704
704
|
border: 1px solid ${Ce.line};
|
|
705
|
-
border-radius: ${
|
|
705
|
+
border-radius: ${Vn.card};
|
|
706
706
|
background: ${Ce.white};
|
|
707
707
|
|
|
708
708
|
&[data-status='ended'],
|
|
@@ -712,35 +712,35 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
712
712
|
opacity: 0.7;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
${
|
|
715
|
+
${Ou.maxWidth("mobile")} {
|
|
716
716
|
grid-template-columns: auto minmax(0, 1fr);
|
|
717
717
|
|
|
718
718
|
> :last-child {
|
|
719
719
|
grid-column: 1 / -1;
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
`,
|
|
722
|
+
`,Nu=W.div`
|
|
723
723
|
display: flex;
|
|
724
724
|
flex-direction: column;
|
|
725
725
|
/* The name sits on one line and the figures on the next; at 4px the chips touched the name above them. */
|
|
726
726
|
gap: 8px;
|
|
727
727
|
min-width: 0;
|
|
728
|
-
`,
|
|
728
|
+
`,Mu=W.div`
|
|
729
729
|
display: flex;
|
|
730
730
|
flex-wrap: wrap;
|
|
731
731
|
align-items: center;
|
|
732
732
|
gap: 8px;
|
|
733
|
-
`,
|
|
734
|
-
font-family: ${
|
|
733
|
+
`,qu=W.span`
|
|
734
|
+
font-family: ${Fn.sans};
|
|
735
735
|
font-weight: 600;
|
|
736
736
|
font-size: 14px;
|
|
737
737
|
color: ${Ce.text};
|
|
738
|
-
`,
|
|
738
|
+
`,Hu=W.span`
|
|
739
739
|
display: inline-flex;
|
|
740
740
|
align-items: center;
|
|
741
741
|
padding: 2px 8px;
|
|
742
|
-
border-radius: ${
|
|
743
|
-
font-family: ${
|
|
742
|
+
border-radius: ${Vn.pill};
|
|
743
|
+
font-family: ${Fn.sans};
|
|
744
744
|
font-weight: 700;
|
|
745
745
|
font-size: 11px;
|
|
746
746
|
text-transform: uppercase;
|
|
@@ -755,19 +755,19 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
755
755
|
background: ${Ce.promptLilac};
|
|
756
756
|
color: ${Ce.accent};
|
|
757
757
|
}
|
|
758
|
-
`,
|
|
758
|
+
`,Du=W.div`
|
|
759
759
|
display: flex;
|
|
760
760
|
flex-wrap: wrap;
|
|
761
761
|
align-items: center;
|
|
762
762
|
gap: 6px 10px;
|
|
763
|
-
font-family: ${
|
|
763
|
+
font-family: ${Fn.sans};
|
|
764
764
|
font-size: 12px;
|
|
765
765
|
color: ${Ce.muted};
|
|
766
|
-
`,
|
|
766
|
+
`,Uu=W.div`
|
|
767
767
|
display: flex;
|
|
768
768
|
align-items: center;
|
|
769
769
|
gap: 8px;
|
|
770
|
-
`,
|
|
770
|
+
`,Vu=W.span`
|
|
771
771
|
display: inline-flex;
|
|
772
772
|
align-items: center;
|
|
773
773
|
font-weight: 700;
|
|
@@ -780,5 +780,5 @@ caused by: `+Oo(s,t)):n},Ia=e=>Oo(e,new Set),ko=(e,t,n)=>{if(!(e instanceof Erro
|
|
|
780
780
|
&[data-dir='down'] {
|
|
781
781
|
color: #d64545;
|
|
782
782
|
}
|
|
783
|
-
`;function
|
|
784
|
-
//# sourceMappingURL=useCreatorSales-
|
|
783
|
+
`;function Fu(e){switch(e){case"active":return D("creatorSale.statusActive");case"scheduled":return D("creatorSale.statusScheduled");case"cancelled":return D("creatorSale.statusCancelled");case"exhausted":return D("creatorSale.statusExhausted");case"revoked":return D("creatorSale.statusRevoked");default:return D("creatorSale.statusEnded")}}function zu(e){return e.liftPct===null||Math.round(e.liftPct)===0?"flat":e.liftPct>0?"up":"down"}function Ju(e){if(e.liftPct===null)return D("creatorSale.liftNoBaseline");const t=Math.round(e.liftPct);if(t===0)return D("creatorSale.liftFlat");const n=t>=1e3?`${Math.round(e.duringPerDay/e.beforePerDay).toLocaleString()}×`:`${Math.abs(t)}%`;return D(t>0?"creatorSale.liftUp":"creatorSale.liftDown",{amount:n})}function ul({sales:e,session:t,names:n,lift:s}){const d=vo(),[c,u]=oe.useState(null),[a,o]=oe.useState(null),[f,r]=oe.useState([]);async function i(l){o(l.id);try{await su({sale:l,signer:t.signer}),r(h=>[...h,l.id]),u(null),Pt("Shop Ended Sale",{sale_id:l.id,discount_pct:l.discount/1e4}),$n.success(D("creatorSale.endedToast")),d.invalidateQueries({queryKey:["creator-sales"]}),d.invalidateQueries({queryKey:["shop-items"]}),d.invalidateQueries({queryKey:["catalog-items"]})}catch(h){Ro(h,{flow:"creator_sale_end"}),Pt("Shop Sale Failed",{error_code:_o(h),step:"end"}),$n.error(Io(h,D("creatorSale.endError")))}finally{o(null)}}return E.jsx(ku,{"data-testid":"creator-sales",children:e.map(l=>{var z;const h=f.includes(l.id)?"cancelled":ru(l),b=h==="active"||h==="scheduled",v=l.discount/1e4,N=l.collections.length===1?l.collections[0]:null,B=N?n==null?void 0:n[N.toLowerCase()]:void 0;return E.jsxs(Bu,{"data-status":h,"data-testid":"creator-sale",children:[N?E.jsx(Lu,{children:E.jsx(_n,{contractAddress:N})}):null,E.jsxs(Nu,{children:[E.jsxs(Mu,{children:[E.jsx(qu,{children:B??D("creatorSale.successBody",{count:l.collections.length,pct:v})}),E.jsx(Hu,{"data-status":h,children:Fu(h)})]}),E.jsxs(Du,{children:[E.jsx(ca,{pct:v}),h==="active"?E.jsx(fa,{until:l.checks.expiration}):h==="scheduled"?D("creatorSale.startsOn",{date:xt(l.checks.effective)}):null,tu(l)?E.jsx("span",{children:D("creatorSale.used",{used:((z=l.state)==null?void 0:z.uses)??0,total:l.checks.uses})}):null,s!=null&&s[l.id]?E.jsx(Ao,{content:D("creatorSale.liftHint"),children:E.jsx(Vu,{"data-dir":zu(s[l.id]),"data-testid":"creator-sale-lift",children:Ju(s[l.id])})}):null]})]}),b?c===l.id?E.jsxs(Uu,{children:[E.jsx(Ft,{variant:"red",size:"sm",disabled:a===l.id,onClick:()=>void i(l),"data-testid":"creator-sale-end-confirm",children:a===l.id?D("creatorSale.ending"):D("creatorSale.confirmEnd")}),E.jsx(Ft,{variant:"ghost",size:"sm",disabled:a===l.id,onClick:()=>u(null),children:D("creatorSale.keepSale")})]}):E.jsx(Ft,{variant:"outline",size:"sm",onClick:()=>u(l.id),"data-testid":"creator-sale-end",children:D("creatorSale.endSale")}):null]},l.id)})})}function ll(e,t=!0){return ua({queryKey:["creator-sales",e==null?void 0:e.toLowerCase()],queryFn:()=>eu(e),enabled:!!e&&t,staleTime:3e4,refetchInterval:6e4})}export{ul as C,al as a,cl as t,ll as u};
|
|
784
|
+
//# sourceMappingURL=useCreatorSales-Dne7wG4l.js.map
|