@dcl/shop 0.6.1 → 0.6.2-30958394678.commit-3968c2a
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-CCVwnN-d.js → Activity-3zyI1IRX.js} +3 -3
- package/_assets/{AnimatedBackground-CNn-Vax_.js → AnimatedBackground-nIupuP8l.js} +1 -1
- package/_assets/{Assets-BPgkfGkc.js → Assets-BI3c9ohq.js} +8 -8
- package/_assets/{Assets.styles-BAy3by3Z.js → Assets.styles-9ki_t5x3.js} +1 -1
- package/_assets/{Authorizations-CdqHugnL.js → Authorizations-DXc8lpwm.js} +1 -1
- package/_assets/{Cart-CzNOpZkY.js → Cart-DuHl9E6I.js} +2 -2
- package/_assets/{CircularProgress-DqLGsuLk.js → CircularProgress-U_mjuju1.js} +3 -3
- package/_assets/{Collection-DmrD6mAW.js → Collection-CIcLTFPZ.js} +1 -1
- package/_assets/{CollectionCarousel-BpMj1RRH.js → CollectionCarousel-B7TB_OMj.js} +7 -7
- package/_assets/{Creator-DYPK74k6.js → Creator-BFMpAq2T.js} +7 -7
- package/_assets/{ErrorNotice-6j32LCd-.js → ErrorNotice-B5gvtysl.js} +1 -1
- package/_assets/{ExchangeController-CjtWowut.js → ExchangeController-Chujc587.js} +1 -1
- package/_assets/{GetCredits-9nCD-_vL.js → GetCredits-DUE68Ofv.js} +17 -17
- package/_assets/{HelpersUtil-6C8PzEL7.js → HelpersUtil-DzsKL2ac.js} +1 -1
- package/_assets/{ItemDetail-lJyiLtT6.js → ItemDetail-Ch7JVJ39.js} +193 -194
- package/_assets/LazyEmoteControls-BwHr8-X7.js +2 -0
- package/_assets/{LoadMore-C6sUcyIf.js → LoadMore-BO9-NgF0.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-zp0428S7.js → ManaPricingBanner.styles-LfXG3P0z.js} +3 -3
- package/_assets/{MenuList-BTdUxA4D.js → MenuList-BX6yO7Ac.js} +2 -2
- package/_assets/{MyAssets-BbmsS4SI.js → MyAssets-DVZ_pZXb.js} +1 -1
- package/_assets/{MyFavorites-B_Mv89Yf.js → MyFavorites-CbvKYAiN.js} +35 -24
- package/_assets/{NotFound-0lsOfC5s.js → NotFound-B3230xyR.js} +1 -1
- package/_assets/NotificationsBell-x9qG4JAm.js +34 -0
- package/_assets/OutfitDetail-DQa5i9Jk.js +334 -0
- package/_assets/OutfitPreview-D4-9krF1.js +6 -0
- package/_assets/OutfitStudio-8RdjVeCY.js +537 -0
- package/_assets/{StoreSettings-BxTLlxHn.js → StoreSettings-DWBD4fbU.js} +1 -1
- package/_assets/{Success-DMCTT33h.js → Success-Couk7Hdv.js} +5 -5
- package/_assets/{SwapController-Ci7sPB_-.js → SwapController-k6QIzYEE.js} +1 -1
- package/_assets/{Tooltip-BZ-qUO0l.js → Tooltip-BQX-SlPA.js} +1 -1
- package/_assets/{TradeService-Cu6fpwnh.js → TradeService-mV7WtrBG.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-8GeYldkk.js → W3MFrameProviderSingleton-DrpRVilu.js} +3 -3
- package/_assets/{WebCryptoP256-fMzbuVHl.js → WebCryptoP256-CMlkql0I.js} +1 -1
- package/_assets/{authorizations-DOwEBZw0.js → authorizations-CtiOXVNn.js} +1 -1
- package/_assets/{basic-CNB5RbBM.js → basic-DdbQHLj0.js} +1 -1
- package/_assets/{biconomy-VIh33SiE.js → biconomy-2kmLuYrH.js} +1 -1
- package/_assets/{builder-ENYhtC9A.js → builder-Be5eHY-S.js} +1 -1
- package/_assets/{buy-DME37PMo.js → buy-Bm7LPL_y.js} +1 -1
- package/_assets/{buy-gasless-CsB_UciL.js → buy-gasless-Cna5Um4K.js} +1 -1
- package/_assets/{categories-SI1YlvJt.js → categories-B0u9Kgh7.js} +1 -1
- package/_assets/{ccip-r6C5X7kR.js → ccip-Ci5E3IwV.js} +1 -1
- package/_assets/{ccip-BWQZvTr_.js → ccip-DGfiuVqj.js} +1 -1
- package/_assets/clsx-WwvpwSg0.js +1 -0
- package/_assets/{collectionPage.styles-DTQE0MEN.js → collectionPage.styles-zJMtUweU.js} +5 -5
- package/_assets/{controller-D4hrVQu3.js → controller-DsSvMbNo.js} +2 -2
- package/_assets/{core-CG9Ai3BM.js → core-Cq1jU2ZC.js} +4 -4
- package/_assets/{createSvgIcon-BBqN76DB.js → createSvgIcon-WjfcCScq.js} +2 -2
- package/_assets/{custom-CoESkeU0.js → custom-C3YA4NkW.js} +1 -1
- package/_assets/{data-capture-DsD2q2fn.js → data-capture-CEkcLxes.js} +1 -1
- package/_assets/{email-2Crwdpgb.js → email-Dsb8bC4V.js} +1 -1
- package/_assets/{embedded-wallet-B5qGTlLf.js → embedded-wallet-DYwTFWHC.js} +1 -1
- package/_assets/emotion-styled.browser.esm-CXHuvzN7.js +1 -0
- package/_assets/{engine-DMQKkPgK.js → engine-CRG7y_Dc.js} +1 -1
- package/_assets/{errors-BNZ7sBF_.js → errors-md0_v65i.js} +1 -1
- package/_assets/{estimate-l1-fee-D7epFE-D.js → estimate-l1-fee-pM-7mo0C.js} +1 -1
- package/_assets/{execute-DKumTrX9.js → execute-By-QAyMu.js} +2 -2
- package/_assets/{features-DI5UMV_W.js → features-CE9fos6_.js} +1 -1
- package/_assets/{fetchTokenMetadata-D4n2TjLB.js → fetchTokenMetadata-CCRHppyJ.js} +2 -2
- package/_assets/{field.styles-CjeX0pR0.js → field.styles-I7yK67N6.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-b6CDxjL2.js → get-ecosystem-wallet-info-CfkIBkrv.js} +1 -1
- package/_assets/{getBalance-k1LJAZwU.js → getBalance-r2d5SR8J.js} +1 -1
- package/_assets/{getNFT-B39rY-PL.js → getNFT-CdMO9Qsb.js} +1 -1
- package/_assets/{getNFT-BMgMzvsZ.js → getNFT-DJwtmi5E.js} +1 -1
- package/_assets/{getThemeProps-CppRRpEN.js → getThemeProps-Dfsert1D.js} +1 -1
- package/_assets/{grid.styles-Ckr_d1Os.js → grid.styles-nOJmORwE.js} +1 -1
- package/_assets/{hashTypedData-CiesaRhT.js → hashTypedData-BUyuoUS1.js} +1 -1
- package/_assets/{hashTypedData-DUwT6kJz.js → hashTypedData-Cn4NLSva.js} +1 -1
- package/_assets/{in-app-B5W9FA6J.js → in-app-Bbyp_hac.js} +1 -1
- package/_assets/{in-app-wallet-calls--fTMhgRz.js → in-app-wallet-calls-B-gR9DjX.js} +1 -1
- package/_assets/{index-COM-LGX-.js → index-2aeigaSb.js} +1 -1
- package/_assets/{index-DmlHhfEt.js → index-2hXh3Lug.js} +1 -1
- package/_assets/{index-C4Mo9qnf.js → index-40kmd_aK.js} +3 -3
- package/_assets/{index-8Gs8aT7x.js → index-42pSYxn6.js} +1 -1
- package/_assets/{index-Ct4YR2LP.js → index-7y51FKRL.js} +1 -1
- package/_assets/{index-CjmdU7lV.js → index-8KyAMGS-.js} +3 -3
- package/_assets/{index-D0JaJVwf.js → index-B-vjn9pq.js} +1 -1
- package/_assets/{index-C2R_7cZP.js → index-BF0WiBHh.js} +1 -1
- package/_assets/{index-CqYYwjL0.js → index-BF64P65M.js} +1 -1
- package/_assets/{index-BwnQwSAu.js → index-BLLKqfcD.js} +2 -2
- package/_assets/{index-MSDyZgBz.js → index-BLT6_sje.js} +2 -2
- package/_assets/{index-DIYC-eqY.js → index-BRbJkxhy.js} +1 -1
- package/_assets/{index-C_8wyBUp.js → index-BRg1smL5.js} +1 -1
- package/_assets/{index-CROLwqLK.js → index-BSPthC5D.js} +1 -1
- package/_assets/{index-6lOpuU8D.js → index-BVV_fmte.js} +1 -1
- package/_assets/{index--5-WNACO.js → index-BmI_VY2L.js} +1 -1
- package/_assets/{index-DCUHwzVB.js → index-BmXWASOw.js} +1 -1
- package/_assets/{index-BlTW8bE5.js → index-C4paiR8G.js} +1 -1
- package/_assets/{index-pzI9SPYg.js → index-C74Kz078.js} +1 -1
- package/_assets/index-CFNN4IQh.js +1 -0
- package/_assets/{index-CWl1zAsC.js → index-CGvsSnH5.js} +2 -2
- package/_assets/{index-7Jx0RbBI.js → index-CHP45HLF.js} +1 -1
- package/_assets/{index-r_ie-fYk.js → index-CKh-MxqM.js} +1 -1
- package/_assets/{index-D1Kwe229.js → index-CN7oQ8au.js} +1 -1
- package/_assets/{index-hzUEG0Wn.js → index-CT-IhRIi.js} +1 -1
- package/_assets/{index-D3b-6hLL.js → index-C_2RtD-k.js} +3 -3
- package/_assets/{index-DyyMlzME.js → index-Cjv0VYHk.js} +1 -1
- package/_assets/{index-BjDpMJu4.js → index-ClooG4VA.js} +1 -1
- package/_assets/{index-baUyxxA5.js → index-CoQL2VdI.js} +1 -1
- package/_assets/{index-6hXQkpzo.js → index-Cqxr1K7X.js} +1 -1
- package/_assets/{index-CnU32wDE.js → index-CrL-oicn.js} +1 -1
- package/_assets/{index-BvHiSowo.js → index-CxyxAB7h.js} +1 -1
- package/_assets/{index-BPLQs7pP.js → index-CyPEmEh2.js} +1 -1
- package/_assets/index-DBKr5jDP.js +3318 -0
- package/_assets/{index-DUdz_zrJ.js → index-DD3YA4Xc.js} +1 -1
- package/_assets/{index-CMt6SGgd.js → index-DItNTWlM.js} +1 -1
- package/_assets/{index-D0VlnNE3.js → index-DVtU3QsJ.js} +1 -1
- package/_assets/{index-Cz0mItuU.js → index-DWFeJSdC.js} +1 -1
- package/_assets/{index-DIpNccsB.js → index-Dvtk0M13.js} +1 -1
- package/_assets/{index-3Gl3qzVg.js → index-Dz2HX_tG.js} +1 -1
- package/_assets/{index-CiVLOnq4.js → index-DzE64ywR.js} +1 -1
- package/_assets/{index-DN_XFLDI.js → index-M6ot6iel.js} +9 -9
- package/_assets/index-T0WMmU10.js +2 -0
- package/_assets/{index-CWDp9PWh.js → index-UVas8o3a.js} +1 -1
- package/_assets/{index-BH9Lj6j_.js → index-YodNRE0F.js} +1 -1
- package/_assets/{index-BSMtncI0.js → index-aPDIsvsp.js} +1 -1
- package/_assets/{index-DLJMJNYR.js → index-cNFvNcyv.js} +1 -1
- package/_assets/{index-DIGH_-jR.js → index-g_bSpYWE.js} +1 -1
- package/_assets/{index-CdMXnYZl.js → index-nD_B3x2a.js} +1 -1
- package/_assets/{index-brzaaZ1P.js → index-o26JQUSX.js} +1 -1
- package/_assets/{index-DJigbyYH.js → index-wYE8B-zV.js} +1 -1
- package/_assets/index-yT06p0hy.js +4 -0
- package/_assets/{index.es-BfycRISM.js → index.es-AvY6da-n.js} +1 -1
- package/_assets/{index.es-Dz4gJjtG.js → index.es-BjABjHDS.js} +1 -1
- package/_assets/{index.es-CEspgBOo.js → index.es-CjrBlA2t.js} +4 -4
- package/_assets/{localBatchGatewayRequest-C2ejDWSe.js → localBatchGatewayRequest-DASiMtj6.js} +1 -1
- package/_assets/{networks-C8W7qTmi.js → networks-C8ez-bvH.js} +1 -1
- package/_assets/{onramp-gMYCcz-L.js → onramp-Mm39n2H9.js} +1 -1
- package/_assets/{openzeppelin-DoXqKfoL.js → openzeppelin-DM4th0ON.js} +1 -1
- package/_assets/{parseNft-CG6mXwGw.js → parseNft-jU70OzWf.js} +2 -2
- package/_assets/{parseSignature-YB0y-EIH.js → parseSignature-DgPEk7JG.js} +3 -3
- package/_assets/{parseSignature-BtFyUMyh.js → parseSignature-Vz1kWqBf.js} +1 -1
- package/_assets/{passkeys-DMD6dHpE.js → passkeys-DUP0d8Zb.js} +1 -1
- package/_assets/{pay-with-exchange-DmOk5KUk.js → pay-with-exchange-bcJ8587x.js} +1 -1
- package/_assets/{qr-overlay-BmfI4Van.js → qr-overlay-BgqdrAQN.js} +1 -1
- package/_assets/{receive-C8CxHyfZ.js → receive-DLQ1rgxk.js} +1 -1
- package/_assets/{resolveImplementation-D10q4uG8.js → resolveImplementation-D5VOTogv.js} +1 -1
- package/_assets/{rpc-C6XV-dPj.js → rpc-CZqGf5Pw.js} +1 -1
- package/_assets/{secp256k1-BmbnB2T6.js → secp256k1-CeIqoHzM.js} +1 -1
- package/_assets/{secp256k1-i1ynB1kh.js → secp256k1-DFodyUE2.js} +1 -1
- package/_assets/{secp256k1-CplZyQx1.js → secp256k1-wpoFdYyv.js} +1 -1
- package/_assets/{send-r-sbW-NR.js → send-5wSIIKSl.js} +1 -1
- package/_assets/{send-batch-transaction-DPGUnjFL.js → send-batch-transaction-BsHJzRR6.js} +1 -1
- package/_assets/{send-eip712-transaction-DDBiSwZa.js → send-eip712-transaction-CfdZenAu.js} +2 -2
- package/_assets/{send-gasless-transaction-TUww1FFr.js → send-gasless-transaction-DdUHdO7Q.js} +2 -2
- package/_assets/{send-transaction-INP2LgJd.js → send-transaction-BI-LBwbQ.js} +2 -2
- package/_assets/{sendMetaTransaction-CtlcvZ2u.js → sendMetaTransaction-DZqdC6fw.js} +1 -1
- package/_assets/{sendRawTransaction-BiF1pCL3.js → sendRawTransaction-BHUyxFbw.js} +3 -3
- package/_assets/{serializeTransaction-_CDXrMP2.js → serializeTransaction-ByXeuyQy.js} +1 -1
- package/_assets/{session-proposal-Cyo4-zWW.js → session-proposal-BbxUdmu_.js} +1 -1
- package/_assets/{session-request-DhBEeqtM.js → session-request-iIRNVfwz.js} +2 -2
- package/_assets/{signing-eZY4IKkr.js → signing-Cnwo6tva.js} +3 -3
- package/_assets/{socials-ez11BKnF.js → socials-JesVWt33.js} +1 -1
- package/_assets/styled-B0-_jC66.js +9 -0
- package/_assets/{swaps-D50dXpS9.js → swaps-DiHFkz3h.js} +1 -1
- package/_assets/{thirdweb-DtMwg5nw.js → thirdweb-BgDawyw0.js} +3 -3
- package/_assets/{to-serializable-transaction-Bo2k0bHN.js → to-serializable-transaction-Cy2ugr3u.js} +2 -2
- package/_assets/{trade-encoding-DBrxq_08.js → trade-encoding-DYGW0EG6.js} +1 -1
- package/_assets/{transactionReceipt-D84_cL1Y.js → transactionReceipt-BN5uajuZ.js} +1 -1
- package/_assets/{transactions-BxDrgH0T.js → transactions-vLsZNFPY.js} +1 -1
- package/_assets/{useCreditPacks-DJGSwrlc.js → useCreditPacks-Bxxs5gPt.js} +1 -1
- package/_assets/{useImportable-8-eoe6U0.js → useImportable-DaFCiZt-.js} +1 -1
- package/_assets/{useInfiniteGrid-BioQWUj3.js → useInfiniteGrid-aaW1umo4.js} +1 -1
- package/_assets/{useTheme-CuHYv3yr.js → useTheme-CWDPVAdC.js} +1 -1
- package/_assets/{verifyHash-Dp410C0R.js → verifyHash-Bfqcsnfy.js} +1 -1
- package/_assets/{w3m-modal-q1294Ir0.js → w3m-modal-7IzsWep_.js} +1 -1
- package/_assets/{w3m-modal-ChBvc6av.js → w3m-modal-dbHO42vZ.js} +1 -1
- package/_assets/{wait-for-tx-receipt-GGiAUH7I.js → wait-for-tx-receipt-CNCHrX28.js} +1 -1
- package/_assets/{wallets-B8DTTYN0.js → wallets-D-L32AGp.js} +5 -5
- package/_assets/{web-connector-CwvhuMom.js → web-connector-PVStra29.js} +3 -3
- package/_assets/{writeContract-CsfeVlnc.js → writeContract-znr6ni3L.js} +1 -1
- package/_assets/{zoraTestnet-CaYytGcL.js → zoraTestnet-Ux1B_UMW.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/NotificationsBell-CaKoTXrL.js +0 -34
- package/_assets/OutfitDetail-ME6t5FNU.js +0 -326
- package/_assets/OutfitPreview-BCoX8M6g.js +0 -6
- package/_assets/OutfitStudio-DeiWpnBW.js +0 -500
- package/_assets/clsx-Dp2xNKFR.js +0 -9
- package/_assets/emotion-styled.browser.esm-Cc0eNU1p.js +0 -1
- package/_assets/index-BQADEYsi.js +0 -1
- package/_assets/index-BYQ4eOXE.js +0 -2
- package/_assets/index-C50bRdDg.js +0 -3318
- package/_assets/index-C5xtRArG.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/add-gtH78Af8.js","_assets/lit-element-B3y9oplH.js","_assets/all-wallets-Bu4MasoZ.js","_assets/arrow-bottom-circle-Bm7U8Xm5.js","_assets/app-store-geBbzx8r.js","_assets/apple-DbX-KO3Q.js","_assets/arrow-bottom-NgyJiryy.js","_assets/arrow-left-Bx8XJo4p.js","_assets/arrow-right-CpmwAcz3.js","_assets/arrow-top-CXuApiRq.js","_assets/bank-B-AtGavB.js","_assets/browser-GaKxoKgI.js","_assets/card-DY_lirot.js","_assets/checkmark-B_Gn6_T7.js","_assets/checkmark-bold-B4Vhr71f.js","_assets/chevron-bottom-DkjlNWaH.js","_assets/chevron-left-t2d7IYla.js","_assets/chevron-right-BpvBfQlF.js","_assets/chevron-top-DaNUAgN3.js","_assets/chrome-store-BrYSyOan.js","_assets/clock-CM52yIf5.js","_assets/close-CcVztAR5.js","_assets/compass-Dnpz_bMX.js","_assets/coinPlaceholder-A0d_T23w.js","_assets/copy-OgObxpD0.js","_assets/cursor-TGA47xsa.js","_assets/cursor-transparent-ChuRXHZT.js","_assets/desktop-DSYLUYtr.js","_assets/disconnect-DOu0l9hw.js","_assets/discord-DSagmLDU.js","_assets/etherscan-BQWJnhdU.js","_assets/extension-BCceciJ0.js","_assets/external-link-nniZ8T-z.js","_assets/facebook-C8cFHJmd.js","_assets/farcaster-VVYMNsPV.js","_assets/filters-IQcwAHNQ.js","_assets/github-CUGKA0gF.js","_assets/google-ICSz-zKJ.js","_assets/help-circle-DUmb3lur.js","_assets/image-CcAGLSqv.js","_assets/id-CcMBGK0y.js","_assets/info-circle-BRf2hsXl.js","_assets/lightbulb-DxzqU2aA.js","_assets/mail-GTcep6d_.js","_assets/mobile-CxfewOOf.js","_assets/more-B1GNyGbD.js","_assets/network-placeholder-CaAIn0go.js","_assets/nftPlaceholder-CcKWs410.js","_assets/off-AGLeyIW1.js","_assets/play-store-DauY6Xkj.js","_assets/plus-C1iVend5.js","_assets/qr-code-D9x4W1o0.js","_assets/recycle-horizontal-BZndf3A8.js","_assets/refresh-BVUyDU7W.js","_assets/search-CmKy7FIM.js","_assets/send-1nI1S_8r.js","_assets/swapHorizontal-DtPyG-1F.js","_assets/swapHorizontalMedium-BF57TL40.js","_assets/swapHorizontalBold-iZFfQZST.js","_assets/swapHorizontalRoundedBold-KJaF8iLR.js","_assets/swapVertical-BPHOH9K5.js","_assets/telegram-DZ8t7D__.js","_assets/three-dots-RSAQzvrm.js","_assets/twitch-ClCm-_yi.js","_assets/x-CJLl3cK1.js","_assets/twitterIcon-CFdE9cDK.js","_assets/verify-DBW23CTN.js","_assets/verify-filled-hMsYvnXR.js","_assets/wallet-B1K8se3b.js","_assets/walletconnect-BTykUwcd.js","_assets/wallet-placeholder-rTto8m3y.js","_assets/warning-circle-CR5Zi2hc.js","_assets/info-DxBb29bi.js","_assets/exclamation-triangle-DlfV2WT2.js","_assets/reown-logo-oGjjPiPA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as S,i as E,b as f,E as z}from"./lit-element-B3y9oplH.js";import{n as l,e as W,a as H}from"./class-map-CxwNmq0D.js";import{r as b,c as B,e as F}from"./core-
|
|
2
|
+
import{a as S,i as E,b as f,E as z}from"./lit-element-B3y9oplH.js";import{n as l,e as W,a as H}from"./class-map-CxwNmq0D.js";import{r as b,c as B,e as F}from"./core-Cq1jU2ZC.js";import{_ as i}from"./index-DBKr5jDP.js";import{f as G,n as M}from"./async-directive-BRxn_Py3.js";const h={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--wui-spacing-${t[e]})`:void 0;if(typeof t=="string")return`var(--wui-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:r,truncate:a}){return t.length<=e+r?t:a==="end"?`${t.substring(0,e)}...`:a==="start"?`...${t.substring(t.length-r)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(r))}`},generateAvatarColors(t){const r=t.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),a=this.hexToRgb(r),n=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),s=100-3*Number(n==null?void 0:n.replace("px","")),c=`${s}% ${s}% at 65% 40%`,u=[];for(let p=0;p<5;p+=1){const v=this.tintColor(a,.15*p);u.push(`rgb(${v[0]}, ${v[1]}, ${v[2]})`)}return`
|
|
3
3
|
--local-color-1: ${u[0]};
|
|
4
4
|
--local-color-2: ${u[1]};
|
|
5
5
|
--local-color-3: ${u[2]};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as b,b as c}from"./lit-element-B3y9oplH.js";import{n}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-
|
|
1
|
+
import{i as b,b as c}from"./lit-element-B3y9oplH.js";import{n}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-CKh-MxqM.js";import"./index-YodNRE0F.js";import{d as g,r as m,e as h}from"./index-C_2RtD-k.js";const v=g`
|
|
2
2
|
:host {
|
|
3
3
|
width: var(--local-width);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as t,a as d,i as p,b as n}from"./lit-element-B3y9oplH.js";import{n as f}from"./class-map-CxwNmq0D.js";import{c as w,t as k}from"./index-
|
|
1
|
+
import{w as t,a as d,i as p,b as n}from"./lit-element-B3y9oplH.js";import{n as f}from"./class-map-CxwNmq0D.js";import{c as w,t as k}from"./index-CKh-MxqM.js";import{r as v}from"./index-C_2RtD-k.js";const g=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<rect width="64" height="64" fill="#F7931A"/>
|
|
3
3
|
<g clip-path="url(#clip0_1045_17)">
|
|
4
4
|
<path d="M63.0394 39.7409C58.7654 56.8839 41.4024 67.3169 24.2574 63.0419C7.11937 58.7679 -3.31363 41.4039 0.962367 24.2619C5.23437 7.11686 22.5974 -3.31714 39.7374 0.956863C56.8814 5.23086 67.3134 22.5969 63.0394 39.7409Z" fill="#F7931A"/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,d as X,r as x,L as Z}from"./react-DehiWSvs.js";import{t as _,s as i,q,w as ee,d as n,e as E,B as $,x as
|
|
1
|
+
import{j as e,d as X,r as x,L as Z}from"./react-DehiWSvs.js";import{t as _,s as i,q,w as ee,d as n,e as E,B as $,x as G,U as te,b3 as B,D as Q,L as ie,l as ne,y as ae,af as se,I as D,a3 as re,a6 as oe,a7 as de,bG as le,A as ce}from"./index-DBKr5jDP.js";import{c as pe,i as he,R as ge,u as xe}from"./useImportable-DaFCiZt-.js";import{S as me,C as ue,b as fe}from"./ManaPricingBanner.styles-LfXG3P0z.js";import{C as F}from"./field.styles-I7yK67N6.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-Bm7LPL_y.js";import"./authorizations-CtiOXVNn.js";import"./sendMetaTransaction-DZqdC6fw.js";import"./trade-encoding-DYGW0EG6.js";function W({size:a=12,...l}){return e.jsx("svg",{viewBox:"0 0 20 20",width:a,height:a,fill:"none","aria-hidden":!0,focusable:"false",...l,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:C,radius:we,z:ye}=_,be=q`
|
|
2
2
|
0% {
|
|
3
3
|
transform: scale(0);
|
|
4
4
|
opacity: 0;
|
|
@@ -16,7 +16,7 @@ import{j as e,d as X,r as x,L as Z}from"./react-DehiWSvs.js";import{t as _,s as
|
|
|
16
16
|
padding: 20px;
|
|
17
17
|
// Above the global DCL navbar so the backdrop dims the full viewport (navbar included).
|
|
18
18
|
z-index: ${ye.overlay};
|
|
19
|
-
`,
|
|
19
|
+
`,V=i.div`
|
|
20
20
|
background: ${C.white};
|
|
21
21
|
border-radius: ${we.card};
|
|
22
22
|
padding: 24px;
|
|
@@ -76,7 +76,7 @@ import{j as e,d as X,r as x,L as Z}from"./react-DehiWSvs.js";import{t as _,s as
|
|
|
76
76
|
font-weight: 700;
|
|
77
77
|
font-size: 16px;
|
|
78
78
|
margin: 2px 0 0;
|
|
79
|
-
`;const{colors:u,gradients:ke,radius:$e}=_,Ce=i(
|
|
79
|
+
`;const{colors:u,gradients:ke,radius:$e}=_,Ce=i(V)`
|
|
80
80
|
width: min(460px, 94vw);
|
|
81
81
|
text-align: left;
|
|
82
82
|
align-items: stretch;
|
|
@@ -179,7 +179,7 @@ import{j as e,d as X,r as x,L as Z}from"./react-DehiWSvs.js";import{t as _,s as
|
|
|
179
179
|
font-size: 12px;
|
|
180
180
|
`,Be=i.p`
|
|
181
181
|
margin: 12px 0 0;
|
|
182
|
-
`;function _e(a,l){switch(a==null?void 0:a.step){case"cancelling":return l?n("migrate.phaseCancelConfirm"):n("migrate.phaseCancel");case"confirming-cancel":return n("migrate.phaseConfirmingCancel");case"authorising":return l?n("migrate.phaseAuthoriseConfirm"):n("migrate.phaseAuthorise");case"signing":return l?n("migrate.phaseSignConfirm"):n("migrate.phaseSign");case"publishing":return n("migrate.phasePublishing");case"indexing":return n("migrate.phaseIndexing",{attempt:a.attempt,of:a.of});default:return l?n("migrate.statusConfirm"):n("migrate.statusAdding")}}function
|
|
182
|
+
`;function _e(a,l){switch(a==null?void 0:a.step){case"cancelling":return l?n("migrate.phaseCancelConfirm"):n("migrate.phaseCancel");case"confirming-cancel":return n("migrate.phaseConfirmingCancel");case"authorising":return l?n("migrate.phaseAuthoriseConfirm"):n("migrate.phaseAuthorise");case"signing":return l?n("migrate.phaseSignConfirm"):n("migrate.phaseSign");case"publishing":return n("migrate.phasePublishing");case"indexing":return n("migrate.phaseIndexing",{attempt:a.attempt,of:a.of});default:return l?n("migrate.statusConfirm"):n("migrate.statusAdding")}}function Qe({queue:a,session:l,onClose:h,onDone:j}){const I=X(),w=ee(l.providerType),[A,S]=x.useState(()=>a.map(()=>null)),[v,L]=x.useState(null),[c,f]=x.useState(()=>a.map(()=>"pending")),[m,T]=x.useState("running"),k=x.useRef(!1);x.useEffect(()=>{if(k.current)return;k.current=!0;let r=!1;return w&&pe(a.map(t=>t.item),l.address).then(t=>{!r&&t&&L({approvals:t.approvals,total:t.total})}).catch(()=>{}),(async()=>{for(let t=0;t<a.length;t++){if(r)return;f(s=>s.map((o,p)=>p===t?"active":o));try{await he(a[t].item,a[t].priceCredits,l,{onPhase:s=>{r||S(o=>o.map((p,b)=>b===t?s:p))}}),te("Shop Migrated Listing",{item_id:a[t].item.itemId??a[t].item.oldTradeId??null,contract_address:a[t].item.contractAddress,new_price_credits:a[t].priceCredits,new_price_usd:B(a[t].priceCredits)}),r||f(s=>s.map((o,p)=>p===t?"done":o))}catch(s){if(s instanceof ge)Q(s,{flow:"import_listing",step:"relist",itemId:a[t].item.itemId??a[t].item.oldTradeId}),r||f(o=>o.map((p,b)=>b===t?"unlisted":p));else{const o=s,p=o.code===4001||/reject|denied|cancel/i.test(o.message??"");p||Q(s,{flow:"import_listing",itemId:a[t].item.itemId??a[t].item.oldTradeId}),r||f(b=>b.map((Y,J)=>J===t?p?"skipped":"failed":Y))}}}r||T("finished")})(),()=>{r=!0}},[]);const y=c.filter(r=>r==="done").length,z=c.findIndex(r=>r==="active"),R=Math.round(c.filter(r=>r!=="pending"&&r!=="active").length/a.length*100);function N(){j(),h()}if(m==="finished"){const r=c.filter(t=>t==="skipped"||t==="failed").length,g=c.filter(t=>t==="unlisted").length;return e.jsx(K,{role:"presentation",children:e.jsxs(V,{"data-success":!0,role:"dialog","aria-modal":"true",children:[e.jsx(ve,{"aria-hidden":!0,children:e.jsx(W,{size:30})}),e.jsx(O,{children:y>0?n("migrate.successTitle"):n("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[y>0?n("migrate.listedSummary",{count:y,currency:E.name}):n("migrate.noneListed"),r>0?" "+n("migrate.skippedSummary",{count:r}):"",g>0?" "+n("migrate.unlistedSummary",{count:g}):""]}),e.jsxs(je,{"data-actions":!0,children:[e.jsx($,{variant:"ghost",onClick:N,children:n("getCredits.done")}),g>0?e.jsx($,{variant:"purple",onClick:()=>{j(),h(),I("/my-items")},children:n("migrate.goToMyAssets")}):y>0?e.jsx($,{variant:"purple",onClick:()=>{j(),h(),I("/items")},children:n("migrate.viewInShop")}):null]})]})})}return e.jsx(K,{role:"presentation",children:e.jsxs(Ce,{"data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx(O,{children:n("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[w?n("migrate.subConfirm"):n("migrate.subManaged")," ",z>=0?n("migrate.progressCount",{current:z+1,total:a.length}):""]}),e.jsx(Ie,{children:e.jsx(Se,{style:{width:`${R}%`}})}),e.jsx(Le,{children:a.map((r,g)=>e.jsxs(Te,{"data-status":c[g],children:[e.jsx(ze,{children:r.item.thumbnail?e.jsx("img",{src:r.item.thumbnail,alt:""}):null}),e.jsx(Me,{title:r.item.name,children:r.item.name||n("migrate.itemFallback")}),e.jsxs(Ae,{children:[e.jsx(G,{className:"ccy-mark"})," ",r.priceCredits.toLocaleString()]}),e.jsx(Re,{children:c[g]==="active"?e.jsxs(e.Fragment,{children:[e.jsx(Pe,{className:"spinner","aria-hidden":!0})," ",_e(A[g],w)]}):c[g]==="done"?e.jsx(Ee,{children:e.jsx(W,{})}):c[g]==="skipped"?e.jsx(P,{children:n("migrate.statusSkipped")}):c[g]==="failed"?e.jsx(P,{children:n("migrate.statusFailed")}):c[g]==="unlisted"?e.jsx(P,{title:n("migrate.unlistedTooltip"),children:n("migrate.statusUnlisted")}):e.jsx(Ne,{children:n("migrate.statusWaiting")})})]},r.item.oldTradeId))}),e.jsx(Be,{className:"muted small",children:w?v?n(v.approvals>0?"migrate.hintCountApproval":"migrate.hintCount",{total:v.total}):n("migrate.hintConfirm"):n("migrate.hintManaged")})]})})}const{colors:d,font:De,media:Fe,radius:M}=_,We=i.div`
|
|
183
183
|
max-width: 520px;
|
|
184
184
|
margin: 0 auto;
|
|
185
185
|
text-align: center;
|
|
@@ -203,17 +203,17 @@ import{j as e,d as X,r as x,L as Z}from"./react-DehiWSvs.js";import{t as _,s as
|
|
|
203
203
|
display: flex;
|
|
204
204
|
flex-direction: column;
|
|
205
205
|
gap: 12px;
|
|
206
|
-
font-family: ${
|
|
207
|
-
`,
|
|
206
|
+
font-family: ${De.sans};
|
|
207
|
+
`,Ge=i.header`
|
|
208
208
|
display: flex;
|
|
209
209
|
flex-direction: column;
|
|
210
210
|
gap: 16px;
|
|
211
211
|
padding: 10px 12px;
|
|
212
|
-
`,
|
|
212
|
+
`,Ve=i.div`
|
|
213
213
|
display: flex;
|
|
214
214
|
flex-direction: column;
|
|
215
215
|
gap: 8px;
|
|
216
|
-
`,
|
|
216
|
+
`,Ye=i.h2`
|
|
217
217
|
margin: 0;
|
|
218
218
|
font-weight: 600;
|
|
219
219
|
font-size: 20px;
|
|
@@ -471,4 +471,4 @@ import{j as e,d as X,r as x,L as Z}from"./react-DehiWSvs.js";import{t as _,s as
|
|
|
471
471
|
`,vt=i($)`
|
|
472
472
|
flex: none;
|
|
473
473
|
padding: 13px 24px;
|
|
474
|
-
`,kt="https://docs.decentraland.org";function $t(a){try{return le(BigInt(a))}catch{return null}}function _t(){const{session:a}=ne(),l=ae(),{items:h,isLoading:j}=xe(),[I,w]=x.useState({}),[A,S]=x.useState(new Set),[v,L]=x.useState(null);x.useEffect(()=>{h.length&&w(t=>{const s={...t};for(const o of h)s[o.oldTradeId]==null&&(s[o.oldTradeId]=o.suggestedCredits);return s})},[h]);const c=t=>!A.has(t),f=t=>I[t.oldTradeId]??t.suggestedCredits,m=h.filter(t=>c(t.oldTradeId)),T=m.reduce((t,s)=>t+f(s),0),k=h.length>0&&m.length===h.length,y=m.length>0&&!k;function z(t,s){const o=s.replace(/[^\d]/g,"");w(p=>({...p,[t]:o===""?0:parseInt(o,10)}))}function R(t){S(s=>{const o=new Set(s);return o.has(t)?o.delete(t):o.add(t),o})}function N(){S(k?new Set(h.map(t=>t.oldTradeId)):new Set)}function r(t){return t.map(s=>({item:s,priceCredits:Math.max(1,f(s))}))}function g(){l.invalidateQueries({queryKey:["importable"]}),l.invalidateQueries({queryKey:["shop-items"]}),l.invalidateQueries({queryKey:["catalog-items"]}),l.invalidateQueries({queryKey:["overview-listings"]}),l.invalidateQueries({queryKey:["upsell-listings"]}),l.invalidateQueries({queryKey:["my-assets"]}),l.invalidateQueries({queryKey:["collection-sale-state"]}),ce.success(n("importListings.toastUpdated"))}return!j&&h.length===0?e.jsxs(We,{children:[e.jsx(Ke,{"aria-hidden":!0,children:"✨"}),e.jsx(Oe,{children:n("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:n("importListings.emptyBody")}),e.jsx(Ue,{as:Z,to:"/my-items",variant:"purple",children:n("importListings.goToMyAssets")})]}):e.jsxs(He,{children:[e.jsxs(
|
|
474
|
+
`,kt="https://docs.decentraland.org";function $t(a){try{return le(BigInt(a))}catch{return null}}function _t(){const{session:a}=ne(),l=ae(),{items:h,isLoading:j}=xe(),[I,w]=x.useState({}),[A,S]=x.useState(new Set),[v,L]=x.useState(null);x.useEffect(()=>{h.length&&w(t=>{const s={...t};for(const o of h)s[o.oldTradeId]==null&&(s[o.oldTradeId]=o.suggestedCredits);return s})},[h]);const c=t=>!A.has(t),f=t=>I[t.oldTradeId]??t.suggestedCredits,m=h.filter(t=>c(t.oldTradeId)),T=m.reduce((t,s)=>t+f(s),0),k=h.length>0&&m.length===h.length,y=m.length>0&&!k;function z(t,s){const o=s.replace(/[^\d]/g,"");w(p=>({...p,[t]:o===""?0:parseInt(o,10)}))}function R(t){S(s=>{const o=new Set(s);return o.has(t)?o.delete(t):o.add(t),o})}function N(){S(k?new Set(h.map(t=>t.oldTradeId)):new Set)}function r(t){return t.map(s=>({item:s,priceCredits:Math.max(1,f(s))}))}function g(){l.invalidateQueries({queryKey:["importable"]}),l.invalidateQueries({queryKey:["shop-items"]}),l.invalidateQueries({queryKey:["catalog-items"]}),l.invalidateQueries({queryKey:["overview-listings"]}),l.invalidateQueries({queryKey:["upsell-listings"]}),l.invalidateQueries({queryKey:["my-assets"]}),l.invalidateQueries({queryKey:["collection-sale-state"]}),ce.success(n("importListings.toastUpdated"))}return!j&&h.length===0?e.jsxs(We,{children:[e.jsx(Ke,{"aria-hidden":!0,children:"✨"}),e.jsx(Oe,{children:n("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:n("importListings.emptyBody")}),e.jsx(Ue,{as:Z,to:"/my-items",variant:"purple",children:n("importListings.goToMyAssets")})]}):e.jsxs(He,{children:[e.jsxs(Ge,{children:[e.jsxs(Ve,{children:[e.jsx(Ye,{children:n("importListings.title")}),e.jsxs("div",{children:[e.jsx(Je,{children:n("importListings.lede",{currency:se(E.name)})}),e.jsxs(Xe,{href:kt,target:"_blank",rel:"noopener noreferrer",children:[n("importListings.learnMore"),e.jsx(D,{name:"external-link",className:"ico","aria-hidden":!0})]})]})]}),e.jsx(ue,{})]}),e.jsx(Ze,{}),e.jsxs(qe,{children:[e.jsxs(et,{"data-testid":"import-progress",children:[e.jsx(tt,{"data-testid":"import-count",children:h.length}),n("importListings.updatePricing")]}),e.jsxs(it,{children:[e.jsxs(nt,{children:[e.jsx(U,{children:e.jsx(F,{type:"checkbox",checked:k,ref:t=>{t&&(t.indeterminate=y)},"data-indeterminate":y,onChange:N,"data-testid":"import-select-all","aria-label":n("importListings.selectAllAria")})}),n("importListings.selectAll")]}),e.jsx(at,{children:j?Array.from({length:4}).map((t,s)=>e.jsx(ut,{},s)):h.map(t=>{const s=f(t),o=re({...t,wearableCategory:t.wearableCategory??void 0}),p=$t(t.manaWei);return e.jsxs(st,{"data-off":c(t.oldTradeId)?void 0:!0,children:[e.jsxs(rt,{children:[e.jsx(U,{children:e.jsx(F,{type:"checkbox",checked:c(t.oldTradeId),onChange:()=>R(t.oldTradeId),"data-testid":"import-row-check","aria-label":n("importListings.includeItem",{name:t.name})})}),e.jsx(ot,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null})]}),e.jsxs(dt,{children:[e.jsx(lt,{title:t.name,children:t.name||n("importListings.itemFallback")}),e.jsxs(ct,{children:[e.jsx(H,{"data-variant":"rarity",style:{background:de(t.rarity),color:oe(t.rarity)},children:t.rarity}),o?e.jsx(H,{"data-variant":"icon",children:e.jsx(D,{name:o,"aria-hidden":!0})}):null]})]}),e.jsxs(pt,{children:[e.jsxs(ht,{children:[e.jsx(G,{}),e.jsx(gt,{"data-testid":"imp-price-input",inputMode:"numeric",value:s.toLocaleString(),onChange:b=>z(t.oldTradeId,b.target.value),"aria-label":n("importListings.priceAria",{currency:E.name,name:t.name})})]}),e.jsxs(xt,{children:[e.jsxs("span",{children:["$",B(s).toFixed(2)]}),p?e.jsx(mt,{children:n("importListings.wasMana",{amount:p})}):null]})]})]},t.oldTradeId)})})]})]}),e.jsx(ft,{children:e.jsxs(wt,{children:[e.jsxs("div",{children:[e.jsxs(yt,{children:[e.jsx(fe,{})," ",T.toLocaleString()]}),e.jsx(bt,{children:n("importListings.selectedSummary",{count:m.length,usd:B(T).toFixed(2)})})]}),e.jsx(jt,{}),e.jsx(vt,{variant:"purple",disabled:m.length===0,onClick:()=>L(r(m)),children:n("importListings.listAll",{count:m.length})})]})}),v&&a?e.jsx(Qe,{queue:v,session:a,onClose:()=>L(null),onDone:g}):null]})}export{_t as ImportListings};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as _,bQ as g,bR as F,ab as M,ac as f,bS as j,bT as k,bU as I,bV as R,f as V,T as O,bW as z}from"./index-DBKr5jDP.js";import{bX as Me,bY as Oe,bZ as $e,ae as we,b_ as Te,b$ as Ee,c0 as Pe,c1 as _e,c2 as Fe,q as je,c3 as ke,c4 as Ie,c5 as Re,c6 as Ve,c7 as ze}from"./index-DBKr5jDP.js";import{u as Ae}from"./useTheme-CWDPVAdC.js";import{g as L}from"./getThemeProps-Dfsert1D.js";import{s as He,s as Ue}from"./styled-B0-_jC66.js";import{j as A}from"./react-DehiWSvs.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";function C({props:e,name:t,defaultTheme:n,themeId:s}){let r=_(n);return r=r[s]||r,L({theme:r,name:t,props:e})}function w(e,t=0,n=1){return F(e,t,n)}function H(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(s=>s+s)),n?`rgb${n.length===4?"a":""}(${n.map((s,r)=>r<3?parseInt(s,16):Math.round(parseInt(s,16)/255*1e3)/1e3).join(", ")})`:""}function U(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function c(e){if(e.type)return e;if(e.charAt(0)==="#")return c(H(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(g(9,e));let s=e.substring(t+1,e.length-1),r;if(n==="color"){if(s=s.split(" "),r=s.shift(),s.length===4&&s[3].charAt(0)==="/"&&(s[3]=s[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r)===-1)throw new Error(g(10,r))}else s=s.split(",");return s=s.map(o=>parseFloat(o)),{type:n,values:s,colorSpace:r}}function S(e){const{type:t,colorSpace:n}=e;let{values:s}=e;return t.indexOf("rgb")!==-1?s=s.map((r,o)=>o<3?parseInt(r,10):r):t.indexOf("hsl")!==-1&&(s[1]=`${s[1]}%`,s[2]=`${s[2]}%`),t.indexOf("color")!==-1?s=`${n} ${s.join(" ")}`:s=`${s.join(", ")}`,`${t}(${s})`}function ie(e){if(e.indexOf("#")===0)return e;const{values:t}=c(e);return`#${t.map((n,s)=>U(s===3?Math.round(255*n):n)).join("")}`}function B(e){e=c(e);const{values:t}=e,n=t[0],s=t[1]/100,r=t[2]/100,o=s*Math.min(r,1-r),u=(h,m=(h+n/30)%12)=>r-o*Math.max(Math.min(m-3,9-m,1),-1);let l="rgb";const i=[Math.round(u(0)*255),Math.round(u(8)*255),Math.round(u(4)*255)];return e.type==="hsla"&&(l+="a",i.push(t[3])),S({type:l,values:i})}function $(e){e=c(e);let t=e.type==="hsl"||e.type==="hsla"?c(B(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function oe(e,t){const n=$(e),s=$(t);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}function ue(e,t){return e=c(e),t=w(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,S(e)}function W(e,t){if(e=c(e),t=w(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return S(e)}function G(e,t){if(e=c(e),t=w(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return S(e)}function pe(e,t=.15){return $(e)>.5?W(e,t):G(e,t)}const q=["defaultProps","mixins","overrides","palette","props","styleOverrides"],D=["type","mode"];function me(e){const{defaultProps:t={},mixins:n={},overrides:s={},palette:r={},props:o={},styleOverrides:u={}}=e,l=M(e,q),i=f({},l,{components:{}});Object.keys(t).forEach(a=>{const p=i.components[a]||{};p.defaultProps=t[a],i.components[a]=p}),Object.keys(o).forEach(a=>{const p=i.components[a]||{};p.defaultProps=o[a],i.components[a]=p}),Object.keys(u).forEach(a=>{const p=i.components[a]||{};p.styleOverrides=u[a],i.components[a]=p}),Object.keys(s).forEach(a=>{const p=i.components[a]||{};p.styleOverrides=s[a],i.components[a]=p}),i.spacing=j(e.spacing);const h=k(e.breakpoints||{}),m=i.spacing;i.mixins=f({gutters:(a={})=>f({paddingLeft:m(2),paddingRight:m(2)},a,{[h.up("sm")]:f({paddingLeft:m(3),paddingRight:m(3)},a[h.up("sm")])})},n);const{type:y,mode:x}=r,v=M(r,D),b=x||y||"light";return i.palette=f({text:{hint:b==="dark"?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:b,type:b},v),i}function le(e,...t){return I(R({unstable_strictMode:!0},e),...t)}let T=!1;function he(e){return T||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join(`
|
|
2
|
+
`)),T=!0),e}function E(e){return String(parseFloat(e)).length===String(e).length}function N(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function d(e){return parseFloat(e)}function Q(e){return(t,n)=>{const s=N(t);if(s===n)return t;let r=d(t);s!=="px"&&(s==="em"||s==="rem")&&(r=d(t)*d(e));let o=r;if(n!=="px")if(n==="em")o=r/d(e);else if(n==="rem")o=r/d(e);else return t;return parseFloat(o.toFixed(5))+n}}function X({size:e,grid:t}){const n=e-e%t,s=n+t;return e-n<s-e?n:s}function Y({lineHeight:e,pixels:t,htmlFontSize:n}){return t/(e*n)}function Z({cssProperty:e,min:t,max:n,unit:s="rem",breakpoints:r=[600,900,1200],transform:o=null}){const u={[e]:`${t}${s}`},l=(n-t)/r[r.length-1];return r.forEach(i=>{let h=t+l*i;o!==null&&(h=o(h)),u[`@media (min-width:${i}px)`]={[e]:`${Math.round(h*1e4)/1e4}${s}`}}),u}function fe(e,t={}){const{breakpoints:n=["sm","md","lg"],disableAlign:s=!1,factor:r=2,variants:o=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=t,u=f({},e);u.typography=f({},u.typography);const l=u.typography,i=Q(l.htmlFontSize),h=n.map(m=>u.breakpoints.values[m]);return o.forEach(m=>{const y=l[m];if(!y)return;const x=parseFloat(i(y.fontSize,"rem"));if(x<=1)return;const v=x,b=1+(v-1)/r;let{lineHeight:a}=y;if(!E(a)&&!s)throw new Error(g(6));E(a)||(a=parseFloat(i(a,"rem"))/parseFloat(x));let p=null;s||(p=P=>X({size:P,grid:Y({pixels:4,lineHeight:a,htmlFontSize:l.htmlFontSize})})),l[m]=f({},y,Z({cssProperty:"fontSize",min:b,max:v,unit:"rem",breakpoints:h,transform:p}))}),u}function ce({props:e,name:t}){return C({props:e,name:t,defaultTheme:V,themeId:O})}const J=["theme"];function de(e){let{theme:t}=e,n=M(e,J);const s=t[O];return A.jsx(z,f({},n,{themeId:s?O:void 0,theme:s||t}))}function ge(){throw new Error(g(14))}function ye(){throw new Error(g(15))}function xe(){throw new Error(g(16))}function be(){throw new Error(g(20))}export{Me as Experimental_CssVarsProvider,Oe as StyledEngineProvider,O as THEME_ID,de as ThemeProvider,me as adaptV4Theme,ue as alpha,$e as createMuiTheme,he as createStyles,I as createTheme,we as css,W as darken,c as decomposeColor,Te as duration,Ee as easing,pe as emphasize,He as experimentalStyled,Pe as experimental_extendTheme,be as experimental_sx,oe as getContrastRatio,_e as getInitColorSchemeScript,$ as getLuminance,Fe as getOverlayAlpha,H as hexToRgb,B as hslToRgb,je as keyframes,G as lighten,ge as makeStyles,ke as private_createMixins,Ie as private_createTypography,Re as private_excludeVariablesFromRoot,S as recomposeColor,fe as responsiveFontSizes,ie as rgbToHex,Ve as shouldSkipGeneratingVar,Ue as styled,le as unstable_createMuiStrictModeTheme,N as unstable_getUnit,d as unstable_toUnitless,ze as useColorScheme,Ae as useTheme,ce as useThemeProps,ye as withStyles,xe as withTheme};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as u,b as h}from"./lit-element-B3y9oplH.js";import{n as d,o as f}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-
|
|
1
|
+
import{i as u,b as h}from"./lit-element-B3y9oplH.js";import{n as d,o as f}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-CKh-MxqM.js";import{d as g,r as m,e as b}from"./index-C_2RtD-k.js";const y=g`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as d,i as p,b as m}from"./lit-element-B3y9oplH.js";import{n as h}from"./class-map-CxwNmq0D.js";import{r as f,v as r}from"./index-
|
|
1
|
+
import{a as d,i as p,b as m}from"./lit-element-B3y9oplH.js";import{n as h}from"./class-map-CxwNmq0D.js";import{r as f,v as r}from"./index-C_2RtD-k.js";import{c as x}from"./index-CKh-MxqM.js";const g=d`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as x,k as N,r as i,j as f}from"./react-DehiWSvs.js";import{p as v,g}from"./dcl-schemas-Dr9BTjb7.js";import{cg as L}from"./index-C50bRdDg.js";import{r as q,g as he,h as ye}from"./createSvgIcon-BBqN76DB.js";import{n as M}from"./emotion-styled.browser.esm-Cc0eNU1p.js";import{C as ve}from"./CircularProgress-DqLGsuLk.js";var A={},oe;function Ee(){if(oe)return A;oe=1,Object.defineProperty(A,"__esModule",{value:!0});function e(){let r,n;const t=new Promise((s,u)=>{r=c=>{s(c),t.isPending=!1},n=c=>{u(c),t.isPending=!1}}).catch(s=>Promise.reject(s));return t.resolve=r,t.reject=n,"finally"in t||(t.finally=s=>{t.then(s),t.catch(s)}),t.isPending=!0,t}return A.future=e,A.default=e,A}var we=Ee();const be=x(we);function se(e){return{all:e=e||new Map,on:function(r,n){var t=e.get(r);t?t.push(n):e.set(r,[n])},off:function(r,n){var t=e.get(r);t&&(n?t.splice(t.indexOf(n)>>>0,1):e.set(r,[]))},emit:function(r,n){var t=e.get(r);t&&t.slice().map(function(s){s(n)}),(t=e.get("*"))&&t.slice().map(function(s){s(r,n)})}}}const S=new Map,Y=new Map,Z=new Map,k=new Map;function ae(e){const r=document.getElementById(e);return!r||!r.contentWindow?!1:Z.get(r.contentWindow)??!1}function H(e){if(e.data&&e.data.type)try{switch(e.data.type){case v.PreviewMessageType.CONTROLLER_RESPONSE:{const r=e.data.payload,{id:n}=r,t=S.get(n);t&&(S.delete(n),r.ok?t.resolve(r.result):r.ok===!1&&t.reject(new Error(r.error)));break}case v.PreviewMessageType.EMOTE_EVENT:{const r=e.data.payload,{type:n,payload:t}=r,s=e.source?Y.get(e.source):null;s&&n&&s.emit(n,t);break}case v.PreviewMessageType.LOAD:{e.source&&(Z.set(e.source,!0),(k.get(e.source)||[]).filter(t=>{var s;return((s=t.data)==null?void 0:s.type)!==v.PreviewMessageType.LOAD}).forEach(H),k.delete(e.source));break}default:}}catch(r){console.error("Error processing WearablePreview message:",r)}}const Pe=e=>{var n;if(((n=e.data)==null?void 0:n.type)===v.PreviewMessageType.LOAD){H(e);return}if(!(e.source?Z.get(e.source):!1)&&e.source){const t=k.get(e.source)||[];t.push(e),k.set(e.source,t);return}H(e)};typeof window<"u"&&window.addEventListener("message",Pe,!1);let ie=0;function Se(e){return function(n,t,s){const u=document.getElementById(e);if(!u||!u.contentWindow){const d=new Error("iframe not found or not accessible");return Promise.reject(d)}const c=e+"-"+ie,l=be();S.set(c,l);const p=v.PreviewMessageType.CONTROLLER_REQUEST,y={id:c,namespace:n,method:t,params:s},m=setTimeout(()=>{S.delete(c),l.reject(new Error(`Request timeout for ${t}`))},1e4),a=l.resolve,j=l.reject;l.resolve=d=>{clearTimeout(m),a(d)},l.reject=d=>{clearTimeout(m),j(d)};try{v.sendMessage(u.contentWindow,p,y)}catch(d){const w=d instanceof Error?d.message:String(d);l.reject(new Error(`Failed to send message: ${w}`)),S.delete(c),clearTimeout(m)}return ie++,l}}function Me(e){const r=document.getElementById(e);if(!r)throw new Error(`Could not find an iframe with id="${e}"`);S.clear();const n=r.contentWindow?Y.get(r.contentWindow)??se():se();r.contentWindow&&Y.set(r.contentWindow,n);const t=Se(e);return{scene:{getScreenshot(s,u){return t("scene","getScreenshot",[s,u])},getMetrics(){return t("scene","getMetrics",[])},changeZoom:function(s){return t("scene","changeZoom",[s])},panCamera:function(s){return t("scene","panCamera",[s])},changeCameraPosition:function(s){return t("scene","changeCameraPosition",[s])},cleanup(){return t("scene","cleanup",[])},setUsername:function(s){return t("scene","setUsername",[s])}},emote:{getLength(){return t("emote","getLength",[])},isPlaying(){return t("emote","isPlaying",[])},goTo(s){return t("emote","goTo",[s])},play(){return t("emote","play",[])},pause(){return t("emote","pause",[])},stop(){return t("emote","stop",[])},enableSound(){return t("emote","enableSound",[])},disableSound(){return t("emote","disableSound",[])},hasSound(){return t("emote","hasSound",[])},isSocialEmote(){return t("emote","isSocialEmote",[])},getSocialEmoteAnimations(){return t("emote","getSocialEmoteAnimations",[])},getPlayingSocialEmoteAnimation(){return t("emote","getPlayingSocialEmoteAnimation",[])},emote:null,events:n},physics:{setSpringBonesParams(s,u){return t("physics","setSpringBonesParams",[s,u])}}}}var R={},ue;function Ae(){if(ue)return R;ue=1;var e=L();Object.defineProperty(R,"__esModule",{value:!0}),R.default=void 0;var r=e(q()),n=N();return R.default=(0,r.default)((0,n.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),R}var Re=Ae();const Te=x(Re);var T={},ce;function Ce(){if(ce)return T;ce=1;var e=L();Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var r=e(q()),n=N();return T.default=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),T}var Ie=Ce();const xe=x(Ie);var C={},le;function je(){if(le)return C;le=1;var e=L();Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var r=e(q()),n=N();return C.default=(0,r.default)((0,n.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),C}var _e=je();const Oe=x(_e);var I={},de;function ke(){if(de)return I;de=1;var e=L();Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;var r=e(q()),n=N();return I.default=(0,r.default)((0,n.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp"),I}var Ne=ke();const Le=x(Ne),qe=(e,r)=>{const n=i.useRef(null),[t,s]=i.useState(!1);return i.useEffect(()=>{const u=r??Me(e);if(n.current=u,ae(e)){s(!0);return}const c=document.getElementById(e);if(!c){console.error(`Could not find iframe with id="${e}"`);return}if(!c.contentWindow){console.error(`Iframe contentWindow is not accessible for id="${e}"`);return}const p=y=>{var m;((m=y.data)==null?void 0:m.type)===v.PreviewMessageType.LOAD&&ae(e)&&s(!0)};return window.addEventListener("message",p),()=>{window.removeEventListener("message",p),s(!1),n.current=null}},[e,r]),{controllerRef:n,isReady:t}},We={small:16,medium:20,large:24},me=({children:e,startIcon:r,endIcon:n,loading:t=!1,loadingIcon:s,loadingPosition:u="center",disabled:c=!1,size:l="medium",...p})=>{const y=f.jsx(ve,{color:"inherit",size:We[l]}),m=s||y,a=t&&u==="center"?m:e;return f.jsx(he,{disabled:c||t,startIcon:t&&u==="start"?m:r,endIcon:t&&u==="end"?m:n,size:l,...p,children:a})},Ve=M(ye)(({theme:e})=>({display:"flex",position:"absolute",width:"100%",bottom:0,margin:`${e.spacing(2)} 0`,padding:`0 ${e.spacing(3)}`,gap:e.spacing(2)})),Ue=M(me)(({theme:e})=>({width:56,height:44,padding:0,minWidth:"unset",background:"rgba(0, 0, 0, 0.64) !important","& svg":{marginLeft:e.spacing(.5)}})),De=M(me)(({theme:e,muted:r})=>({marginLeft:e.spacing(2.5),minWidth:25,background:"none",padding:0,opacity:r?.5:1})),Fe=M("input")(({theme:e})=>({flex:1,width:"100%",background:"none",WebkitAppearance:"none","&:focus":{outline:"none"},"&::-webkit-slider-thumb":{WebkitAppearance:"none",width:24,height:24,borderRadius:10,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",paddingBottom:e.spacing(.625),marginTop:e.spacing(-.5)},"&::-moz-range-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",border:"none"},"&::-ms-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer"},"&::-webkit-slider-runnable-track":{width:300,height:15,background:"rgba(115, 110, 125, 0.32)",border:"none",borderRadius:10},"&::-moz-range-track":{width:"100%",height:15,borderRadius:10,cursor:"pointer",background:"rgba(115, 110, 125, 0.32)"}})),Be=M("div")({display:"flex",alignItems:"center"}),ze=M("input")({width:56,height:44,borderRadius:5,background:"transparent",border:"1px solid rgba(115, 110, 125, 0.4)",color:"white",textAlign:"center","&:focus-visible":{outline:"1px solid"}}),$e=({wearablePreviewId:e,className:r,hideFrameInput:n,hideProgressInput:t,hidePlayButton:s,hideSoundButton:u,wearablePreviewController:c,renderPlayButton:l,renderSoundButton:p,renderProgressBar:y,renderFrameInput:m})=>{const{controllerRef:a,isReady:j}=qe(e,c),[d,w]=i.useState(0),[b,W]=i.useState(!1),[h,fe]=i.useState(void 0),[P,ge]=i.useState(!0),[_,G]=i.useState(void 0),[J,Q]=i.useState(!1),[K,X]=i.useState(!1),V=i.useCallback(()=>{w(0)},[]),U=i.useCallback(()=>{W(!1),w(o=>o>=Math.floor((h??0)*100)?0:o)},[h]),D=i.useCallback(()=>{W(!1)},[]),F=i.useCallback(async()=>{if(!K){let o=h;!h&&a.current&&(o=await a.current.emote.getLength()),W(!0),fe(o)}},[h,K,a]),B=i.useCallback(({length:o})=>{w(Math.ceil((o??0)*100))},[]);i.useEffect(()=>{const o=a.current;if(o)return o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_LOOP,V),()=>{o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_LOOP,V)}},[a,F,B,U,D,V]),i.useEffect(()=>{_===void 0&&j&&a.current&&a.current.emote.hasSound().then(o=>G(o)).catch(o=>{console.error("Error checking sound:",o),G(!1)})},[_,j,a]);const z=i.useCallback(async()=>{if(a.current)try{await a.current.emote.play()}catch(o){console.error("Error playing emote:",o)}},[a]),$=i.useCallback(async()=>{if(a.current)try{await a.current.emote.pause()}catch(o){console.error("Error pausing emote:",o)}},[a]),ee=i.useCallback(async()=>{b?await $():await z()},[b,z,$]),te=i.useCallback(()=>{var o,E;P?(o=a.current)==null||o.emote.disableSound():(E=a.current)==null||E.emote.enableSound(),ge(!P)},[P,a]),O=i.useCallback(async o=>{if(isNaN(o)||!a.current)return;let E=o;const ne=h??0;ne*100<o&&(E=ne*100),w(E),X(!0);try{b&&(await a.current.emote.pause(),Q(!0)),await a.current.emote.goTo(E/100)}catch(pe){console.error("Error changing frame:",pe)}},[h,b,a]),re=i.useCallback(async()=>{if(X(!1),J&&a.current){try{await a.current.emote.play()}catch(o){console.error("Error resuming play:",o)}Q(!1)}},[J,a]);return f.jsxs(Ve,{className:r,children:[s?null:l?l({isPlaying:b,onPlay:z,onPause:$,onToggle:ee}):f.jsx(Ue,{onClick:ee,children:b?f.jsx(Te,{}):f.jsx(xe,{})}),t?null:y?y({frame:d,length:h??0,onChange:O,onMouseUp:re}):f.jsx(Fe,{type:"range",value:d,max:Math.ceil((h??0)*100),min:0,step:1,onChange:o=>O(Number(o.target.value)),onMouseUp:re}),n?null:f.jsx(Be,{children:m?m({frame:Math.round(d/100),onChange:o=>O(o*100)}):f.jsx(ze,{type:"number",value:Math.round(d/100),onChange:o=>O(Number(o.target.value)*100)})}),u||!_?null:p?p({isSoundEnabled:P,hasSound:_,onToggle:te}):f.jsx(De,{muted:!P,onClick:te,children:P?f.jsx(Le,{}):f.jsx(Oe,{})})]})},Ke=Object.freeze(Object.defineProperty({__proto__:null,EmoteControls:$e},Symbol.toStringTag,{value:"Module"}));export{me as B,$e as E,Me as c,Ke as i,qe as u};
|
|
1
|
+
import{g as x,k as N,r as i,j as f}from"./react-DehiWSvs.js";import{p as v,g}from"./dcl-schemas-Dr9BTjb7.js";import{cj as L}from"./index-DBKr5jDP.js";import{r as q,g as he,h as ye}from"./createSvgIcon-WjfcCScq.js";import{n as M}from"./emotion-styled.browser.esm-CXHuvzN7.js";import{C as ve}from"./CircularProgress-U_mjuju1.js";var A={},oe;function Ee(){if(oe)return A;oe=1,Object.defineProperty(A,"__esModule",{value:!0});function e(){let r,n;const t=new Promise((s,u)=>{r=c=>{s(c),t.isPending=!1},n=c=>{u(c),t.isPending=!1}}).catch(s=>Promise.reject(s));return t.resolve=r,t.reject=n,"finally"in t||(t.finally=s=>{t.then(s),t.catch(s)}),t.isPending=!0,t}return A.future=e,A.default=e,A}var we=Ee();const be=x(we);function se(e){return{all:e=e||new Map,on:function(r,n){var t=e.get(r);t?t.push(n):e.set(r,[n])},off:function(r,n){var t=e.get(r);t&&(n?t.splice(t.indexOf(n)>>>0,1):e.set(r,[]))},emit:function(r,n){var t=e.get(r);t&&t.slice().map(function(s){s(n)}),(t=e.get("*"))&&t.slice().map(function(s){s(r,n)})}}}const S=new Map,Y=new Map,Z=new Map,k=new Map;function ae(e){const r=document.getElementById(e);return!r||!r.contentWindow?!1:Z.get(r.contentWindow)??!1}function H(e){if(e.data&&e.data.type)try{switch(e.data.type){case v.PreviewMessageType.CONTROLLER_RESPONSE:{const r=e.data.payload,{id:n}=r,t=S.get(n);t&&(S.delete(n),r.ok?t.resolve(r.result):r.ok===!1&&t.reject(new Error(r.error)));break}case v.PreviewMessageType.EMOTE_EVENT:{const r=e.data.payload,{type:n,payload:t}=r,s=e.source?Y.get(e.source):null;s&&n&&s.emit(n,t);break}case v.PreviewMessageType.LOAD:{e.source&&(Z.set(e.source,!0),(k.get(e.source)||[]).filter(t=>{var s;return((s=t.data)==null?void 0:s.type)!==v.PreviewMessageType.LOAD}).forEach(H),k.delete(e.source));break}default:}}catch(r){console.error("Error processing WearablePreview message:",r)}}const Pe=e=>{var n;if(((n=e.data)==null?void 0:n.type)===v.PreviewMessageType.LOAD){H(e);return}if(!(e.source?Z.get(e.source):!1)&&e.source){const t=k.get(e.source)||[];t.push(e),k.set(e.source,t);return}H(e)};typeof window<"u"&&window.addEventListener("message",Pe,!1);let ie=0;function Se(e){return function(n,t,s){const u=document.getElementById(e);if(!u||!u.contentWindow){const d=new Error("iframe not found or not accessible");return Promise.reject(d)}const c=e+"-"+ie,l=be();S.set(c,l);const p=v.PreviewMessageType.CONTROLLER_REQUEST,y={id:c,namespace:n,method:t,params:s},m=setTimeout(()=>{S.delete(c),l.reject(new Error(`Request timeout for ${t}`))},1e4),a=l.resolve,j=l.reject;l.resolve=d=>{clearTimeout(m),a(d)},l.reject=d=>{clearTimeout(m),j(d)};try{v.sendMessage(u.contentWindow,p,y)}catch(d){const w=d instanceof Error?d.message:String(d);l.reject(new Error(`Failed to send message: ${w}`)),S.delete(c),clearTimeout(m)}return ie++,l}}function Me(e){const r=document.getElementById(e);if(!r)throw new Error(`Could not find an iframe with id="${e}"`);S.clear();const n=r.contentWindow?Y.get(r.contentWindow)??se():se();r.contentWindow&&Y.set(r.contentWindow,n);const t=Se(e);return{scene:{getScreenshot(s,u){return t("scene","getScreenshot",[s,u])},getMetrics(){return t("scene","getMetrics",[])},changeZoom:function(s){return t("scene","changeZoom",[s])},panCamera:function(s){return t("scene","panCamera",[s])},changeCameraPosition:function(s){return t("scene","changeCameraPosition",[s])},cleanup(){return t("scene","cleanup",[])},setUsername:function(s){return t("scene","setUsername",[s])}},emote:{getLength(){return t("emote","getLength",[])},isPlaying(){return t("emote","isPlaying",[])},goTo(s){return t("emote","goTo",[s])},play(){return t("emote","play",[])},pause(){return t("emote","pause",[])},stop(){return t("emote","stop",[])},enableSound(){return t("emote","enableSound",[])},disableSound(){return t("emote","disableSound",[])},hasSound(){return t("emote","hasSound",[])},isSocialEmote(){return t("emote","isSocialEmote",[])},getSocialEmoteAnimations(){return t("emote","getSocialEmoteAnimations",[])},getPlayingSocialEmoteAnimation(){return t("emote","getPlayingSocialEmoteAnimation",[])},emote:null,events:n},physics:{setSpringBonesParams(s,u){return t("physics","setSpringBonesParams",[s,u])}}}}var R={},ue;function Ae(){if(ue)return R;ue=1;var e=L();Object.defineProperty(R,"__esModule",{value:!0}),R.default=void 0;var r=e(q()),n=N();return R.default=(0,r.default)((0,n.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),R}var Re=Ae();const Te=x(Re);var T={},ce;function Ce(){if(ce)return T;ce=1;var e=L();Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var r=e(q()),n=N();return T.default=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),T}var Ie=Ce();const xe=x(Ie);var C={},le;function je(){if(le)return C;le=1;var e=L();Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var r=e(q()),n=N();return C.default=(0,r.default)((0,n.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),C}var _e=je();const Oe=x(_e);var I={},de;function ke(){if(de)return I;de=1;var e=L();Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;var r=e(q()),n=N();return I.default=(0,r.default)((0,n.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp"),I}var Ne=ke();const Le=x(Ne),qe=(e,r)=>{const n=i.useRef(null),[t,s]=i.useState(!1);return i.useEffect(()=>{const u=r??Me(e);if(n.current=u,ae(e)){s(!0);return}const c=document.getElementById(e);if(!c){console.error(`Could not find iframe with id="${e}"`);return}if(!c.contentWindow){console.error(`Iframe contentWindow is not accessible for id="${e}"`);return}const p=y=>{var m;((m=y.data)==null?void 0:m.type)===v.PreviewMessageType.LOAD&&ae(e)&&s(!0)};return window.addEventListener("message",p),()=>{window.removeEventListener("message",p),s(!1),n.current=null}},[e,r]),{controllerRef:n,isReady:t}},We={small:16,medium:20,large:24},me=({children:e,startIcon:r,endIcon:n,loading:t=!1,loadingIcon:s,loadingPosition:u="center",disabled:c=!1,size:l="medium",...p})=>{const y=f.jsx(ve,{color:"inherit",size:We[l]}),m=s||y,a=t&&u==="center"?m:e;return f.jsx(he,{disabled:c||t,startIcon:t&&u==="start"?m:r,endIcon:t&&u==="end"?m:n,size:l,...p,children:a})},Ve=M(ye)(({theme:e})=>({display:"flex",position:"absolute",width:"100%",bottom:0,margin:`${e.spacing(2)} 0`,padding:`0 ${e.spacing(3)}`,gap:e.spacing(2)})),Ue=M(me)(({theme:e})=>({width:56,height:44,padding:0,minWidth:"unset",background:"rgba(0, 0, 0, 0.64) !important","& svg":{marginLeft:e.spacing(.5)}})),De=M(me)(({theme:e,muted:r})=>({marginLeft:e.spacing(2.5),minWidth:25,background:"none",padding:0,opacity:r?.5:1})),Fe=M("input")(({theme:e})=>({flex:1,width:"100%",background:"none",WebkitAppearance:"none","&:focus":{outline:"none"},"&::-webkit-slider-thumb":{WebkitAppearance:"none",width:24,height:24,borderRadius:10,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",paddingBottom:e.spacing(.625),marginTop:e.spacing(-.5)},"&::-moz-range-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",border:"none"},"&::-ms-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer"},"&::-webkit-slider-runnable-track":{width:300,height:15,background:"rgba(115, 110, 125, 0.32)",border:"none",borderRadius:10},"&::-moz-range-track":{width:"100%",height:15,borderRadius:10,cursor:"pointer",background:"rgba(115, 110, 125, 0.32)"}})),Be=M("div")({display:"flex",alignItems:"center"}),ze=M("input")({width:56,height:44,borderRadius:5,background:"transparent",border:"1px solid rgba(115, 110, 125, 0.4)",color:"white",textAlign:"center","&:focus-visible":{outline:"1px solid"}}),$e=({wearablePreviewId:e,className:r,hideFrameInput:n,hideProgressInput:t,hidePlayButton:s,hideSoundButton:u,wearablePreviewController:c,renderPlayButton:l,renderSoundButton:p,renderProgressBar:y,renderFrameInput:m})=>{const{controllerRef:a,isReady:j}=qe(e,c),[d,w]=i.useState(0),[b,W]=i.useState(!1),[h,fe]=i.useState(void 0),[P,ge]=i.useState(!0),[_,G]=i.useState(void 0),[J,Q]=i.useState(!1),[K,X]=i.useState(!1),V=i.useCallback(()=>{w(0)},[]),U=i.useCallback(()=>{W(!1),w(o=>o>=Math.floor((h??0)*100)?0:o)},[h]),D=i.useCallback(()=>{W(!1)},[]),F=i.useCallback(async()=>{if(!K){let o=h;!h&&a.current&&(o=await a.current.emote.getLength()),W(!0),fe(o)}},[h,K,a]),B=i.useCallback(({length:o})=>{w(Math.ceil((o??0)*100))},[]);i.useEffect(()=>{const o=a.current;if(o)return o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_LOOP,V),()=>{o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_LOOP,V)}},[a,F,B,U,D,V]),i.useEffect(()=>{_===void 0&&j&&a.current&&a.current.emote.hasSound().then(o=>G(o)).catch(o=>{console.error("Error checking sound:",o),G(!1)})},[_,j,a]);const z=i.useCallback(async()=>{if(a.current)try{await a.current.emote.play()}catch(o){console.error("Error playing emote:",o)}},[a]),$=i.useCallback(async()=>{if(a.current)try{await a.current.emote.pause()}catch(o){console.error("Error pausing emote:",o)}},[a]),ee=i.useCallback(async()=>{b?await $():await z()},[b,z,$]),te=i.useCallback(()=>{var o,E;P?(o=a.current)==null||o.emote.disableSound():(E=a.current)==null||E.emote.enableSound(),ge(!P)},[P,a]),O=i.useCallback(async o=>{if(isNaN(o)||!a.current)return;let E=o;const ne=h??0;ne*100<o&&(E=ne*100),w(E),X(!0);try{b&&(await a.current.emote.pause(),Q(!0)),await a.current.emote.goTo(E/100)}catch(pe){console.error("Error changing frame:",pe)}},[h,b,a]),re=i.useCallback(async()=>{if(X(!1),J&&a.current){try{await a.current.emote.play()}catch(o){console.error("Error resuming play:",o)}Q(!1)}},[J,a]);return f.jsxs(Ve,{className:r,children:[s?null:l?l({isPlaying:b,onPlay:z,onPause:$,onToggle:ee}):f.jsx(Ue,{onClick:ee,children:b?f.jsx(Te,{}):f.jsx(xe,{})}),t?null:y?y({frame:d,length:h??0,onChange:O,onMouseUp:re}):f.jsx(Fe,{type:"range",value:d,max:Math.ceil((h??0)*100),min:0,step:1,onChange:o=>O(Number(o.target.value)),onMouseUp:re}),n?null:f.jsx(Be,{children:m?m({frame:Math.round(d/100),onChange:o=>O(o*100)}):f.jsx(ze,{type:"number",value:Math.round(d/100),onChange:o=>O(Number(o.target.value)*100)})}),u||!_?null:p?p({isSoundEnabled:P,hasSound:_,onToggle:te}):f.jsx(De,{muted:!P,onClick:te,children:P?f.jsx(Le,{}):f.jsx(Oe,{})})]})},Ke=Object.freeze(Object.defineProperty({__proto__:null,EmoteControls:$e},Symbol.toStringTag,{value:"Module"}));export{me as B,$e as E,Me as c,Ke as i,qe as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as d,b as h}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{e as m,n as f}from"./ref-BsAZ42-h.js";import{d as c,r as v,e as y,v as b}from"./index-
|
|
1
|
+
import{i as d,b as h}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{e as m,n as f}from"./ref-BsAZ42-h.js";import{d as c,r as v,e as y,v as b}from"./index-C_2RtD-k.js";import{c as g,U as w}from"./index-CKh-MxqM.js";const x=c`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-block;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/native-DfrS-44q.js","_assets/sentry-973sfbO9.js","_assets/react-DehiWSvs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{p as gt,b as Yt,i as Qt,I as Zt,m as bt,s as ut,A as D,e as Xt,g as U,d as te,f as N,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as me,x as Z,y as le,z as fe,B as he,C as $,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as Ut,$ as K,a0 as _e,a1 as Bt,a2 as Re,a3 as qe,a4 as mt,a5 as Fe,a6 as Ue,a7 as Be,a8 as ke,a9 as Ne,aa as kt,ab as Le}from"./parseSignature-YB0y-EIH.js";import{ac as Pr,ad as _r,ae as Rr,af as qr,ag as Fr,ah as Ur,ai as Br,aj as kr,ak as Nr,al as Lr,am as Mr,an as Dr,ao as zr,ap as Gr,aq as $r,ar as Hr,as as Or,at as jr,au as Wr,av as Vr,aw as Kr,ax as Jr,ay as Yr,az as Qr,aA as Zr,aB as Xr,aC as ts,aD as es,aE as as,aF as ns,aG as rs,aH as ss,aI as os,aJ as is,aK as cs,aL as us,aM as ds,aN as ms,aO as ls,aP as fs,aQ as hs,aR as ps,aS as ys,aT as gs,aU as bs,aV as ws,aW as xs,aX as Es,aY as Is,aZ as Ts,a_ as Cs,a$ as vs,b0 as Ss,b1 as As,b2 as Ps,b3 as _s,b4 as Rs,b5 as qs,b6 as Fs,b7 as Us,b8 as Bs,b9 as ks,ba as Ns,bb as Ls,bc as Ms,bd as Ds,be as zs,bf as Gs,bg as $s,bh as Hs,bi as Os,bj as js,bk as Ws,bl as Vs,bm as Ks,bn as Js,bo as Ys,bp as Qs,bq as Zs,br as Xs,bs as to,bt as eo,bu as ao,bv as no,bw as ro,bx as so,by as oo,bz as io,br as co,bA as uo,bB as mo,bC as lo,bD as fo,bE as ho,bF as po,bG as yo,bH as go,bH as bo,bI as wo,bJ as xo,bi as Eo,bj as Io,bK as To,bL as Co,bM as vo,bN as So,bO as Ao}from"./parseSignature-YB0y-EIH.js";import{R as k,b3 as B,S as Me,x as Y,a7 as De,w as ze,b4 as Ge,U as H,V as ct,W as G,B as lt,q as E,E as $e,a2 as He,b5 as j,a1 as wt,G as Nt,b6 as Lt,d as Mt,A as R,m as F,b7 as A,C as Oe,I as je,b8 as We,b9 as xt,y as Ve,ba as Ke,bb as Je,bc as Ye,bd as Et}from"./prepare-contract-call-BnXbUbQT.js";import{be as _o,O as Ro,a8 as qo,bf as Fo,bg as Uo,bh as Bo,bi as ko,bj as No,a9 as Lo,bk as Mo,J as Do,M as zo,bl as Go,bm as $o,bn as Ho,F as Oo,Q as jo,N as Wo,bo as Vo,bp as Ko,bq as Jo,br as Yo,bs as Qo,bt as Zo,bu as Xo,bv as ti,bw as ei,bx as ai,by as ni,bz as ri,bA as si,bB as oi,bC as ii,bD as ci,bE as ui,bF as di,bG as mi,bH as li,j as fi,bI as hi,bJ as pi,bK as yi,bL as gi,K as bi,bM as wi,t as xi,bM as Ei,bN as Ii,bO as Ti,bP as Ci,bQ as vi,bR as Si,bS as Ai,bT as Pi,bU as _i,K as Ri,bM as qi,bU as Fi,t as Ui,bM as Bi}from"./prepare-contract-call-BnXbUbQT.js";import{u as ft}from"./to-serializable-transaction-Bo2k0bHN.js";import{b as Ni,B as Li,C as Mi,D as Di,E as zi,m as Gi,n as $i,F as Hi,s as Oi,a as ji}from"./to-serializable-transaction-Bo2k0bHN.js";import{w as Qe,h as Ze,g as Xe,v as ta,s as ea}from"./hashTypedData-CiesaRhT.js";import{I as Vi,a as Ki,b as Ji,d as Yi,c as Qi,e as Zi}from"./hashTypedData-CiesaRhT.js";import{T as aa,a as Q,W as It,b as na,U as ra,R as sa}from"./rpc-C6XV-dPj.js";import{A as tc,c as ec,B as ac,C as nc,D as rc,H as sc,I as oc,d as ic,e as cc,f as uc,J as dc,L as mc,M as lc,h as fc,P as hc,i as pc,j as yc,k as gc,l as bc,m as wc,S as xc,n as Ec,o as Ic,p as Tc,q as Cc,r as vc,s as Sc}from"./rpc-C6XV-dPj.js";import{_ as oa}from"./index-C50bRdDg.js";import{t as ia,H as ca}from"./sha256--PXCNFKm.js";import{b as Pc,h as _c,a as Rc,c as qc,d as Fc,e as Uc,f as Bc,g as kc,i as Nc,j as Lc,k as Mc,l as Dc,n as zc,o as Gc,p as $c,q as Hc,r as Oc,u as jc,v as Wc,w as Vc,x as Kc,y as Jc,z as Yc,A as Qc,B as Zc,C as Xc,D as tu,E as eu,F as au,G as nu,I as ru,J as su,K as ou,L as iu,M as cu,N as uu,O as du,P as mu,Q as lu,R as fu,S as hu,m as pu,T as yu,U as gu,V as bu,W as wu,X as xu,Y as Eu,Z as Iu,_ as Tu,$ as Cu,a0 as vu,a1 as Su,a2 as Au,a3 as Pu,a4 as _u,a5 as Ru,a6 as qu,a7 as Fu,a8 as Uu,a9 as Bu,aa as ku,ab as Nu,ac as Lu,ad as Mu,ae as Du,af as zu,ag as Gu,ah as $u,ai as Hu,aj as Ou,ak as ju,al as Wu,am as Vu,an as Ku,ao as Ju,ap as Yu,aq as Qu,ar as Zu,as as Xu,at as td,au as ed,av as ad,aw as nd,ax as rd,ay as sd,az as od,aA as id,aB as cd,aC as ud,aD as dd,aE as md,aF as ld,aG as fd,aH as hd,aI as pd,aJ as yd,aK as gd,s as bd}from"./sha256--PXCNFKm.js";import{i as ht}from"./get-bytecode-knYex1Eu.js";import{d as xd,a as Ed}from"./get-bytecode-knYex1Eu.js";import{ccipRequest as Td,ccipRequest as Cd,offchainLookup as vd,offchainLookupAbiItem as Sd,offchainLookupSignature as Ad}from"./ccip-BWQZvTr_.js";import{d as _d,a as Rd,f as qd}from"./transactionReceipt-D84_cL1Y.js";import"./utils-B9hEgCzc.js";import"./sentry-973sfbO9.js";import"./react-DehiWSvs.js";import"./transaction-BRB0QRZP.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";function Qn(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Qt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Zt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:l,...h}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Xt({abi:u,args:i,functionName:l});try{return await U(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:c,account:o,...h})}catch(m){throw te(m,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:l,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function Zn({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,l=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(l=!0),i&&f&&l)break;return u&&(i&&(c.read=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),f&&(c.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),l&&(c.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(s,M,"writeContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:m,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Xn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=k(B(t.from));let a=k(t.nonce);return a[0]===0&&(a=new Uint8Array([])),B(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=k(B(t.from)),a=Me(Tt(t.salt)?t.salt:k(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:k(t.bytecodeHash):Y(t.bytecode,"bytes");return B(De(Y(ze([k("0xff"),e,a,n])),12))}function tr({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return ma(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new lt("Invalid RLP prefix")}function ma(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function la(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),ha=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,l=this.h4|0,h=l;for(let o=0;o<5;o++){const p=4-o,m=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+m,C[x])+l|0;n=l,l=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(p,u,c,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+l+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function er(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?k(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let l=0;const{schedule:h}=ie({id:i,fn:async()=>{const m=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&l<d){if(b)return;b=!0,l++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else m.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of m.values())(v=S.onError)==null||v.call(S,new Q({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Q({url:s}));x()},onError(v){var P,S;w=v;for(const _ of m.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,l=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:m,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};m.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Qe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:m,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function J(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-DfrS-44q.js").then(o=>o.n),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",l),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function l({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",l),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Q({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Q({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await J(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function ar(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function nr(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=me(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Z({hash:le(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Z({hash:Ze({domain:e,message:a,primaryType:n,types:s}),signature:r})}function rr(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function sr({address:t,hash:e,signature:a}){return ht(B(t),await Z({hash:e,signature:a}))}async function or({address:t,message:e,signature:a}){return ht(B(t),await Sa({message:e,signature:a}))}async function ir(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return ht(B(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):Ba(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,l,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:l,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const m={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(m.to=d),E(u)&&u!=="0x"&&(m.gas=A(u)),E(i)&&i!=="0x"&&(m.data=i),E(n)&&(m.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(m.value=A(c)),E(s)&&s!=="0x"&&(m.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(m.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(m.accessList=tt(f)),l.length!==0&&l!=="0x"&&(m.authorizationList=ka(l)),we(m),{...e.length===13?O(e):void 0,...m}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,l,h,o,p,m,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:l,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:m,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(l)&&l!=="0x"&&(I.value=A(l)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,l,h,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:l,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(u)&&u!=="0x"&&(p.gas=A(u)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(p.value=A(c)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),pe(p),{...e.length===12?O(e):void 0,...p}}function Ua(t){const e=X(t),[a,n,r,s,u,d,c,i,f,l,h]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:l,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function Ba(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const l={type:"legacy"};if(E(s)&&s!=="0x"&&(l.to=s),E(r)&&r!=="0x"&&(l.gas=A(r)),E(d)&&d!=="0x"&&(l.data=d),E(a)&&(l.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(l.value=A(u)),E(n)&&n!=="0x"&&(l.gasPrice=A(n)),xe(l),e.length===6)return l;const h=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return h>0&&(l.chainId=Number(h)),l;const o=h,p=Number((o-35n)/2n);if(p>0)l.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return l.v=o,l.s=f,l.r=i,l.yParity=o%2n===0n?1:0,l}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!Oe(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>la(s)?s:We(s))})}return e}function ka(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends lt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function cr(t,e="wei"){return Wt(t,Ie[e])}function ur(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ka(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ja(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:l,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,m=(o||ft)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:l},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[m]})}async function Qa(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Za(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function mn(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function ln(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function hn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ka(a,n),revert:n=>Ja(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Qa(a,n),setBalance:n=>Za(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>mn(a,n),snapshot:()=>ln(a),stopImpersonatingAccount:n=>fn(a,n)}}}function dr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...hn({mode:n})(s)}))}async function pn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,l]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=l}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>B(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ke(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:m,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new lt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ft)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),pt=ot.get(t.uid),Kt=pt?"wallet_sendTransaction":"eth_sendTransaction",Jt=await(async()=>{try{return await t.request({method:Kt,params:[z]},{retryCount:0})}catch(yt){if(pt===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Jt,pollingInterval:p,timeout:C});if(m&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:m})}throw(b==null?void 0:b.type)==="smart"?new K({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new K({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof K?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new K({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await Bt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Je(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,l,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ft;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(h=(l=t.chain)==null?void 0:l.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Xe({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>pn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>Bt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function mr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function lr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>mt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function fr(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return(({chain:c,pollingInterval:i=4e3,timeout:f,...l})=>{let h=t,o=()=>{};const p=mt({key:a,name:n,async request({method:m,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...l,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:m,params:y});return o({method:m,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:m,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(m):v?!v.includes(m):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:m=>o=m,transports:h.map(m=>m({chain:c,retryCount:0}))});if(r){const m=typeof r=="object"?r:{};Un({chain:c,interval:m.interval??i,onTransports:y=>h=y,ping:m.ping,sampleCount:m.sampleCount,timeout:m.timeout,transports:h,weights:m.weights})}return p})}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Un({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],l=async()=>{const h=await Promise.all(u.map(async m=>{const y=m({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(m=>Math.max(...m.map(({latency:y})=>y)))),p=u.map((m,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((m,y)=>y[0]-m[0]);a(p.map(([,m])=>u[m])),await Ue(e),l()};l()}function hr(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var m;const l=e.retryCount??i,h=f??e.timeout??1e4,o=t||((m=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:m[0]),p={keepAlive:a,reconnect:u};if(!o)throw new Be;return mt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await J(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:l,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return J(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await J(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class pr extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function yr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new Ye({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function gr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const l=c.readByte();if(l===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(l)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function br(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(ke({commitment:s,to:n,version:a}));return r}const Bn=2147483648;function wr(t){if(t===1)return 60n;if(t>=Bn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function kn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function xr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return kn(t)}function Er({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function Ir(t){const{r:e,s:a}=kt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function Tr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Z({hash:Y(s),signature:r})}function Cr({r:t,yParityAndS:e}){return`0x${new kt.Signature(A(t),A(e)).toCompactHex()}`}function vr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{Ye as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,_o as AbiDecodingDataSizeInvalidError,Ro as AbiDecodingDataSizeTooSmallError,qo as AbiDecodingZeroDataError,Fo as AbiEncodingArrayLengthMismatchError,Uo as AbiEncodingBytesSizeMismatchError,Bo as AbiEncodingLengthMismatchError,ko as AbiErrorInputsNotFoundError,No as AbiErrorNotFoundError,Lo as AbiErrorSignatureNotFoundError,Mo as AbiEventNotFoundError,Do as AbiEventSignatureEmptyTopicsError,zo as AbiEventSignatureNotFoundError,Go as AbiFunctionNotFoundError,$o as AbiFunctionOutputsNotFoundError,Ho as AbiFunctionSignatureNotFoundError,Pr as AccountStateConflictError,tc as AtomicReadyWalletRejectedUpgradeError,ec as AtomicityNotSupportedError,lt as BaseError,_r as BaseFeeScalarError,Rr as BlockNotFoundError,qr as BundleFailedError,ac as BundleTooLargeError,Oo as BytesSizeMismatchError,Fr as CallExecutionError,nc as ChainDisconnectedError,Ur as ChainDoesNotSupportContract,Br as ChainMismatchError,kr as ChainNotFoundError,Nr as CircularReferenceError,Lr as ClientChainNotConfiguredError,Mr as ContractFunctionExecutionError,Dr as ContractFunctionRevertedError,zr as ContractFunctionZeroDataError,Gr as CounterfactualDeploymentFailedError,jo as DecodeLogDataMismatch,Wo as DecodeLogTopicsMismatch,rc as DuplicateIdError,pr as EIP1193ProviderRpcError,$r as Eip1559FeesNotSupportedError,Hr as EnsAvatarInvalidNftUriError,Or as EnsAvatarUnsupportedNamespaceError,jr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Wr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Vr as FeeCapTooHighError,Kr as FeeCapTooLowError,Jr as FeeConflictError,Vo as FilterTypeNotSupportedError,sc as HttpRequestError,Yr as InsufficientFundsError,Ko as IntegerOutOfRangeError,oc as InternalRpcError,Qr as IntrinsicGasTooHighError,Zr as IntrinsicGasTooLowError,Jo as InvalidAbiDecodingTypeError,Yo as InvalidAbiEncodingTypeError,Xr as InvalidAbiItemError,Zt as InvalidAbiParameterError,ts as InvalidAbiParametersError,es as InvalidAbiTypeParameterError,je as InvalidAddressError,Qo as InvalidArrayError,Zo as InvalidBytesBooleanError,as as InvalidChainIdError,Na as InvalidDecimalNumberError,Xo as InvalidDefinitionTypeError,Vi as InvalidDomainError,ns as InvalidFunctionModifierError,ti as InvalidHexBooleanError,Ge as InvalidHexValueError,ic as InvalidInputRpcError,Ee as InvalidLegacyVError,rs as InvalidModifierError,ss as InvalidParameterError,cc as InvalidParamsRpcError,os as InvalidParenthesisError,Ki as InvalidPrimaryTypeError,uc as InvalidRequestRpcError,is as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,cs as InvalidSignatureError,us as InvalidStorageKeySizeError,ds as InvalidStructSignatureError,Ji as InvalidStructTypeError,dc as JsonRpcVersionUnsupportedError,mc as LimitExceededRpcError,ms as MaxFeePerGasTooLowError,lc as MethodNotFoundRpcError,fc as MethodNotSupportedRpcError,ls as NonceMaxValueError,fs as NonceTooHighError,hs as NonceTooLowError,hc as ParseRpcError,pc as ProviderDisconnectedError,yc as ProviderRpcError,ps as RawContractError,gc as ResourceNotFoundRpcError,bc as ResourceUnavailableRpcError,wc as RpcError,sa as RpcRequestError,ei as SizeExceedsPaddingSizeError,ai as SizeOverflowError,ni as SliceOffsetOutOfBoundsError,Q as SocketClosedError,ys as SolidityProtectedKeywordError,gs as StateAssignmentConflictError,xc as SwitchChainError,aa as TimeoutError,bs as TipAboveFeeCapError,ws as TransactionExecutionError,xs as TransactionNotFoundError,Es as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,Is as TransactionTypeNotSupportedError,Ec as UnauthorizedProviderError,Ic as UnknownBundleIdError,Ts as UnknownNodeError,Tc as UnknownRpcError,Cs as UnknownSignatureError,vs as UnknownTypeError,Cc as UnsupportedChainIdError,vc as UnsupportedNonOptionalCapabilityError,ri as UnsupportedPackedAbiType,Sc as UnsupportedProviderMethodError,Be as UrlRequiredError,ra as UserRejectedRequestError,Ss as WaitForCallsStatusTimeoutError,As as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,pe as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,Ps as blobsToCommitments,_s as blobsToProofs,si as boolToBytes,oi as boolToHex,ii as bytesToBigInt,ci as bytesToBool,G as bytesToHex,ui as bytesToNumber,Pc as bytesToRlp,di as bytesToString,Td as ccipFetch,Cd as ccipRequest,Ve as checksumAddress,ke as commitmentToVersionedHash,Rs as commitmentsToVersionedHashes,Cr as compactSignatureToHex,Er as compactSignatureToSignature,ze as concat,mi as concatBytes,li as concatHex,At as createClient,qs as createNonceManager,Fs as createPublicClient,dr as createTestClient,mt as createTransport,mr as createWalletClient,lr as custom,Mt as decodeAbiParameters,yr as decodeDeployData,Ni as decodeErrorResult,xd as decodeEventLog,Us as decodeFunctionData,Bs as decodeFunctionResult,Li as defineBlock,Mi as defineChain,kn as defineKzg,Di as defineTransaction,_d as defineTransactionReceipt,zi as defineTransactionRequest,ks as deploylessCallViaBytecodeBytecode,Ns as deploylessCallViaFactoryBytecode,Yi as domainSeparator,fi as encodeAbiParameters,Ce as encodeDeployData,Ls as encodeErrorResult,hi as encodeEventTopics,Xt as encodeFunctionData,Ms as encodeFunctionResult,Ds as encodePacked,zs as erc1155Abi,Gs as erc20Abi,$s as erc20Abi_bytes32,Hs as erc4626Abi,Os as erc6492SignatureValidatorAbi,js as erc6492SignatureValidatorByteCode,Ws as erc721Abi,Vs as ethAddress,Ie as etherUnits,tr as extractChain,fr as fallback,Gi as formatBlock,Ks as formatEther,Js as formatGwei,Rd as formatLog,$i as formatTransaction,qd as formatTransactionReceipt,ft as formatTransactionRequest,Ys as formatUnits,gr as fromBlobs,pi as fromBytes,yi as fromHex,Dt as fromRlp,gi as getAbiItem,B as getAddress,Qs as getChainContractAddress,Zn as getContract,Xn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,bi as getEventSelector,wi as getEventSignature,xi as getFunctionSelector,Ei as getFunctionSignature,Pa as getSerializedTransactionType,Zs as getTransactionType,Xe as getTypesForEIP712Domain,Te as gweiUnits,Qi as hashDomain,le as hashMessage,Zi as hashStruct,Ze as hashTypedData,A as hexToBigInt,Ii as hexToBool,H as hexToBytes,Ir as hexToCompactSignature,F as hexToNumber,_c as hexToRlp,Xs as hexToSignature,Ti as hexToString,to as http,Oe as isAddress,ht as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,la as isHash,E as isHex,Y as keccak256,eo as labelhash,Rc as maxInt104,qc as maxInt112,Fc as maxInt120,Uc as maxInt128,Bc as maxInt136,kc as maxInt144,Nc as maxInt152,Lc as maxInt16,Mc as maxInt160,Dc as maxInt168,zc as maxInt176,Gc as maxInt184,$c as maxInt192,Hc as maxInt200,Oc as maxInt208,jc as maxInt216,Wc as maxInt224,Vc as maxInt232,Kc as maxInt24,Jc as maxInt240,Yc as maxInt248,Qc as maxInt256,Zc as maxInt32,Xc as maxInt40,tu as maxInt48,eu as maxInt56,au as maxInt64,nu as maxInt72,ru as maxInt8,su as maxInt80,ou as maxInt88,iu as maxInt96,cu as maxUint104,uu as maxUint112,du as maxUint120,mu as maxUint128,lu as maxUint136,fu as maxUint144,hu as maxUint152,pu as maxUint16,yu as maxUint160,gu as maxUint168,bu as maxUint176,wu as maxUint184,xu as maxUint192,Eu as maxUint200,Iu as maxUint208,Tu as maxUint216,Cu as maxUint224,vu as maxUint232,Su as maxUint24,Au as maxUint240,Pu as maxUint248,_u as maxUint256,Ru as maxUint32,qu as maxUint40,Fu as maxUint48,Uu as maxUint56,Bu as maxUint64,ku as maxUint72,Nu as maxUint8,Lu as maxUint80,Mu as maxUint88,Du as maxUint96,zu as minInt104,Gu as minInt112,$u as minInt120,Hu as minInt128,Ou as minInt136,ju as minInt144,Wu as minInt152,Vu as minInt16,Ku as minInt160,Ju as minInt168,Yu as minInt176,Qu as minInt184,Zu as minInt192,Xu as minInt200,td as minInt208,ed as minInt216,ad as minInt224,nd as minInt232,rd as minInt24,sd as minInt240,od as minInt248,id as minInt256,cd as minInt32,ud as minInt40,dd as minInt48,md as minInt56,ld as minInt64,fd as minInt72,hd as minInt8,pd as minInt80,yd as minInt88,gd as minInt96,ao as multicall3Abi,no as namehash,ro as nonceManager,Ci as numberToBytes,R as numberToHex,vd as offchainLookup,Sd as offchainLookupAbiItem,Ad as offchainLookupSignature,Me as pad,vi as padBytes,xt as padHex,so as parseAbi,oo as parseAbiItem,Qn as parseAbiParameter,io as parseAbiParameters,Ir as parseCompactSignature,ar as parseErc6492Signature,nr as parseErc8010Signature,cr as parseEther,Ed as parseEventLogs,ur as parseGwei,co as parseSignature,_a as parseTransaction,Wt as parseUnits,uo as prepareEncodeFunctionData,mo as presignMessagePrefix,lo as publicActions,Z as recoverAddress,Sa as recoverMessageAddress,fo as recoverPublicKey,Tr as recoverTransactionAddress,Aa as recoverTypedDataAddress,er as ripemd160,ho as rpcSchema,Hi as rpcTransactionType,po as serializeAccessList,Cr as serializeCompactSignature,yo as serializeErc6492Signature,rr as serializeErc8010Signature,go as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Si as setErrorConfig,xr as setupKzg,bd as sha256,Fn as shouldThrow,br as sidecarsToVersionedHashes,vr as signatureToCompactSignature,bo as signatureToHex,$e as size,De as slice,Ai as sliceBytes,Lt as sliceHex,Pi as stringToBytes,Je as stringToHex,Oi as stringify,hn as testActions,ge as toBlobSidecars,wo as toBlobs,k as toBytes,wr as toCoinType,_i as toEventHash,Ri as toEventSelector,qi as toEventSignature,Fi as toFunctionHash,Ui as toFunctionSelector,Bi as toFunctionSignature,Nt as toHex,xo as toPrefixedMessage,ia as toRlp,ji as transactionType,We as trim,Eo as universalSignatureValidatorAbi,Io as universalSignatureValidatorByteCode,ta as validateTypedData,sr as verifyHash,or as verifyMessage,ir as verifyTypedData,qn as walletActions,hr as webSocket,To as weiUnits,Co as withCache,vo as withRetry,Qe as withTimeout,So as zeroAddress,Ao as zeroHash};
|
|
2
|
+
import{p as gt,b as Yt,i as Qt,I as Zt,m as bt,s as ut,A as D,e as Xt,g as U,d as te,f as N,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as me,x as Z,y as le,z as fe,B as he,C as $,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as Ut,$ as K,a0 as _e,a1 as Bt,a2 as Re,a3 as qe,a4 as mt,a5 as Fe,a6 as Ue,a7 as Be,a8 as ke,a9 as Ne,aa as kt,ab as Le}from"./parseSignature-DgPEk7JG.js";import{ac as Pr,ad as _r,ae as Rr,af as qr,ag as Fr,ah as Ur,ai as Br,aj as kr,ak as Nr,al as Lr,am as Mr,an as Dr,ao as zr,ap as Gr,aq as $r,ar as Hr,as as Or,at as jr,au as Wr,av as Vr,aw as Kr,ax as Jr,ay as Yr,az as Qr,aA as Zr,aB as Xr,aC as ts,aD as es,aE as as,aF as ns,aG as rs,aH as ss,aI as os,aJ as is,aK as cs,aL as us,aM as ds,aN as ms,aO as ls,aP as fs,aQ as hs,aR as ps,aS as ys,aT as gs,aU as bs,aV as ws,aW as xs,aX as Es,aY as Is,aZ as Ts,a_ as Cs,a$ as vs,b0 as Ss,b1 as As,b2 as Ps,b3 as _s,b4 as Rs,b5 as qs,b6 as Fs,b7 as Us,b8 as Bs,b9 as ks,ba as Ns,bb as Ls,bc as Ms,bd as Ds,be as zs,bf as Gs,bg as $s,bh as Hs,bi as Os,bj as js,bk as Ws,bl as Vs,bm as Ks,bn as Js,bo as Ys,bp as Qs,bq as Zs,br as Xs,bs as to,bt as eo,bu as ao,bv as no,bw as ro,bx as so,by as oo,bz as io,br as co,bA as uo,bB as mo,bC as lo,bD as fo,bE as ho,bF as po,bG as yo,bH as go,bH as bo,bI as wo,bJ as xo,bi as Eo,bj as Io,bK as To,bL as Co,bM as vo,bN as So,bO as Ao}from"./parseSignature-DgPEk7JG.js";import{R as k,b3 as B,S as Me,x as Y,a7 as De,w as ze,b4 as Ge,U as H,V as ct,W as G,B as lt,q as E,E as $e,a2 as He,b5 as j,a1 as wt,G as Nt,b6 as Lt,d as Mt,A as R,m as F,b7 as A,C as Oe,I as je,b8 as We,b9 as xt,y as Ve,ba as Ke,bb as Je,bc as Ye,bd as Et}from"./prepare-contract-call-BnXbUbQT.js";import{be as _o,O as Ro,a8 as qo,bf as Fo,bg as Uo,bh as Bo,bi as ko,bj as No,a9 as Lo,bk as Mo,J as Do,M as zo,bl as Go,bm as $o,bn as Ho,F as Oo,Q as jo,N as Wo,bo as Vo,bp as Ko,bq as Jo,br as Yo,bs as Qo,bt as Zo,bu as Xo,bv as ti,bw as ei,bx as ai,by as ni,bz as ri,bA as si,bB as oi,bC as ii,bD as ci,bE as ui,bF as di,bG as mi,bH as li,j as fi,bI as hi,bJ as pi,bK as yi,bL as gi,K as bi,bM as wi,t as xi,bM as Ei,bN as Ii,bO as Ti,bP as Ci,bQ as vi,bR as Si,bS as Ai,bT as Pi,bU as _i,K as Ri,bM as qi,bU as Fi,t as Ui,bM as Bi}from"./prepare-contract-call-BnXbUbQT.js";import{u as ft}from"./to-serializable-transaction-Cy2ugr3u.js";import{b as Ni,B as Li,C as Mi,D as Di,E as zi,m as Gi,n as $i,F as Hi,s as Oi,a as ji}from"./to-serializable-transaction-Cy2ugr3u.js";import{w as Qe,h as Ze,g as Xe,v as ta,s as ea}from"./hashTypedData-BUyuoUS1.js";import{I as Vi,a as Ki,b as Ji,d as Yi,c as Qi,e as Zi}from"./hashTypedData-BUyuoUS1.js";import{T as aa,a as Q,W as It,b as na,U as ra,R as sa}from"./rpc-CZqGf5Pw.js";import{A as tc,c as ec,B as ac,C as nc,D as rc,H as sc,I as oc,d as ic,e as cc,f as uc,J as dc,L as mc,M as lc,h as fc,P as hc,i as pc,j as yc,k as gc,l as bc,m as wc,S as xc,n as Ec,o as Ic,p as Tc,q as Cc,r as vc,s as Sc}from"./rpc-CZqGf5Pw.js";import{_ as oa}from"./index-DBKr5jDP.js";import{t as ia,H as ca}from"./sha256--PXCNFKm.js";import{b as Pc,h as _c,a as Rc,c as qc,d as Fc,e as Uc,f as Bc,g as kc,i as Nc,j as Lc,k as Mc,l as Dc,n as zc,o as Gc,p as $c,q as Hc,r as Oc,u as jc,v as Wc,w as Vc,x as Kc,y as Jc,z as Yc,A as Qc,B as Zc,C as Xc,D as tu,E as eu,F as au,G as nu,I as ru,J as su,K as ou,L as iu,M as cu,N as uu,O as du,P as mu,Q as lu,R as fu,S as hu,m as pu,T as yu,U as gu,V as bu,W as wu,X as xu,Y as Eu,Z as Iu,_ as Tu,$ as Cu,a0 as vu,a1 as Su,a2 as Au,a3 as Pu,a4 as _u,a5 as Ru,a6 as qu,a7 as Fu,a8 as Uu,a9 as Bu,aa as ku,ab as Nu,ac as Lu,ad as Mu,ae as Du,af as zu,ag as Gu,ah as $u,ai as Hu,aj as Ou,ak as ju,al as Wu,am as Vu,an as Ku,ao as Ju,ap as Yu,aq as Qu,ar as Zu,as as Xu,at as td,au as ed,av as ad,aw as nd,ax as rd,ay as sd,az as od,aA as id,aB as cd,aC as ud,aD as dd,aE as md,aF as ld,aG as fd,aH as hd,aI as pd,aJ as yd,aK as gd,s as bd}from"./sha256--PXCNFKm.js";import{i as ht}from"./get-bytecode-knYex1Eu.js";import{d as xd,a as Ed}from"./get-bytecode-knYex1Eu.js";import{ccipRequest as Td,ccipRequest as Cd,offchainLookup as vd,offchainLookupAbiItem as Sd,offchainLookupSignature as Ad}from"./ccip-DGfiuVqj.js";import{d as _d,a as Rd,f as qd}from"./transactionReceipt-BN5uajuZ.js";import"./utils-B9hEgCzc.js";import"./sentry-973sfbO9.js";import"./react-DehiWSvs.js";import"./transaction-BRB0QRZP.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";function Qn(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Qt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Zt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:l,...h}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Xt({abi:u,args:i,functionName:l});try{return await U(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:c,account:o,...h})}catch(m){throw te(m,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:l,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function Zn({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,l=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(l=!0),i&&f&&l)break;return u&&(i&&(c.read=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),f&&(c.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),l&&(c.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(s,M,"writeContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:m,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Xn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=k(B(t.from));let a=k(t.nonce);return a[0]===0&&(a=new Uint8Array([])),B(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=k(B(t.from)),a=Me(Tt(t.salt)?t.salt:k(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:k(t.bytecodeHash):Y(t.bytecode,"bytes");return B(De(Y(ze([k("0xff"),e,a,n])),12))}function tr({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return ma(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new lt("Invalid RLP prefix")}function ma(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function la(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),ha=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,l=this.h4|0,h=l;for(let o=0;o<5;o++){const p=4-o,m=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+m,C[x])+l|0;n=l,l=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(p,u,c,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+l+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function er(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?k(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let l=0;const{schedule:h}=ie({id:i,fn:async()=>{const m=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&l<d){if(b)return;b=!0,l++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else m.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of m.values())(v=S.onError)==null||v.call(S,new Q({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Q({url:s}));x()},onError(v){var P,S;w=v;for(const _ of m.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,l=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:m,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};m.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Qe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:m,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function J(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-DfrS-44q.js").then(o=>o.n),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",l),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function l({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",l),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Q({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Q({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await J(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function ar(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function nr(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=me(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Z({hash:le(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Z({hash:Ze({domain:e,message:a,primaryType:n,types:s}),signature:r})}function rr(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function sr({address:t,hash:e,signature:a}){return ht(B(t),await Z({hash:e,signature:a}))}async function or({address:t,message:e,signature:a}){return ht(B(t),await Sa({message:e,signature:a}))}async function ir(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return ht(B(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):Ba(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,l,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:l,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const m={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(m.to=d),E(u)&&u!=="0x"&&(m.gas=A(u)),E(i)&&i!=="0x"&&(m.data=i),E(n)&&(m.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(m.value=A(c)),E(s)&&s!=="0x"&&(m.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(m.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(m.accessList=tt(f)),l.length!==0&&l!=="0x"&&(m.authorizationList=ka(l)),we(m),{...e.length===13?O(e):void 0,...m}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,l,h,o,p,m,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:l,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:m,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(l)&&l!=="0x"&&(I.value=A(l)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,l,h,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:l,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(u)&&u!=="0x"&&(p.gas=A(u)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(p.value=A(c)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),pe(p),{...e.length===12?O(e):void 0,...p}}function Ua(t){const e=X(t),[a,n,r,s,u,d,c,i,f,l,h]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:l,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function Ba(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const l={type:"legacy"};if(E(s)&&s!=="0x"&&(l.to=s),E(r)&&r!=="0x"&&(l.gas=A(r)),E(d)&&d!=="0x"&&(l.data=d),E(a)&&(l.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(l.value=A(u)),E(n)&&n!=="0x"&&(l.gasPrice=A(n)),xe(l),e.length===6)return l;const h=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return h>0&&(l.chainId=Number(h)),l;const o=h,p=Number((o-35n)/2n);if(p>0)l.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return l.v=o,l.s=f,l.r=i,l.yParity=o%2n===0n?1:0,l}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!Oe(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>la(s)?s:We(s))})}return e}function ka(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends lt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function cr(t,e="wei"){return Wt(t,Ie[e])}function ur(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ka(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ja(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:l,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,m=(o||ft)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:l},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[m]})}async function Qa(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Za(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function mn(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function ln(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function hn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ka(a,n),revert:n=>Ja(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Qa(a,n),setBalance:n=>Za(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>mn(a,n),snapshot:()=>ln(a),stopImpersonatingAccount:n=>fn(a,n)}}}function dr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...hn({mode:n})(s)}))}async function pn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,l]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=l}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>B(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ke(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:m,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new lt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ft)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),pt=ot.get(t.uid),Kt=pt?"wallet_sendTransaction":"eth_sendTransaction",Jt=await(async()=>{try{return await t.request({method:Kt,params:[z]},{retryCount:0})}catch(yt){if(pt===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Jt,pollingInterval:p,timeout:C});if(m&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:m})}throw(b==null?void 0:b.type)==="smart"?new K({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new K({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof K?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new K({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await Bt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Je(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,l,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ft;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(h=(l=t.chain)==null?void 0:l.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Xe({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>pn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>Bt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function mr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function lr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>mt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function fr(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return(({chain:c,pollingInterval:i=4e3,timeout:f,...l})=>{let h=t,o=()=>{};const p=mt({key:a,name:n,async request({method:m,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...l,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:m,params:y});return o({method:m,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:m,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(m):v?!v.includes(m):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:m=>o=m,transports:h.map(m=>m({chain:c,retryCount:0}))});if(r){const m=typeof r=="object"?r:{};Un({chain:c,interval:m.interval??i,onTransports:y=>h=y,ping:m.ping,sampleCount:m.sampleCount,timeout:m.timeout,transports:h,weights:m.weights})}return p})}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Un({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],l=async()=>{const h=await Promise.all(u.map(async m=>{const y=m({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(m=>Math.max(...m.map(({latency:y})=>y)))),p=u.map((m,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((m,y)=>y[0]-m[0]);a(p.map(([,m])=>u[m])),await Ue(e),l()};l()}function hr(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var m;const l=e.retryCount??i,h=f??e.timeout??1e4,o=t||((m=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:m[0]),p={keepAlive:a,reconnect:u};if(!o)throw new Be;return mt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await J(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:l,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return J(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await J(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class pr extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function yr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new Ye({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function gr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const l=c.readByte();if(l===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(l)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function br(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(ke({commitment:s,to:n,version:a}));return r}const Bn=2147483648;function wr(t){if(t===1)return 60n;if(t>=Bn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function kn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function xr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return kn(t)}function Er({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function Ir(t){const{r:e,s:a}=kt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function Tr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Z({hash:Y(s),signature:r})}function Cr({r:t,yParityAndS:e}){return`0x${new kt.Signature(A(t),A(e)).toCompactHex()}`}function vr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{Ye as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,_o as AbiDecodingDataSizeInvalidError,Ro as AbiDecodingDataSizeTooSmallError,qo as AbiDecodingZeroDataError,Fo as AbiEncodingArrayLengthMismatchError,Uo as AbiEncodingBytesSizeMismatchError,Bo as AbiEncodingLengthMismatchError,ko as AbiErrorInputsNotFoundError,No as AbiErrorNotFoundError,Lo as AbiErrorSignatureNotFoundError,Mo as AbiEventNotFoundError,Do as AbiEventSignatureEmptyTopicsError,zo as AbiEventSignatureNotFoundError,Go as AbiFunctionNotFoundError,$o as AbiFunctionOutputsNotFoundError,Ho as AbiFunctionSignatureNotFoundError,Pr as AccountStateConflictError,tc as AtomicReadyWalletRejectedUpgradeError,ec as AtomicityNotSupportedError,lt as BaseError,_r as BaseFeeScalarError,Rr as BlockNotFoundError,qr as BundleFailedError,ac as BundleTooLargeError,Oo as BytesSizeMismatchError,Fr as CallExecutionError,nc as ChainDisconnectedError,Ur as ChainDoesNotSupportContract,Br as ChainMismatchError,kr as ChainNotFoundError,Nr as CircularReferenceError,Lr as ClientChainNotConfiguredError,Mr as ContractFunctionExecutionError,Dr as ContractFunctionRevertedError,zr as ContractFunctionZeroDataError,Gr as CounterfactualDeploymentFailedError,jo as DecodeLogDataMismatch,Wo as DecodeLogTopicsMismatch,rc as DuplicateIdError,pr as EIP1193ProviderRpcError,$r as Eip1559FeesNotSupportedError,Hr as EnsAvatarInvalidNftUriError,Or as EnsAvatarUnsupportedNamespaceError,jr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Wr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Vr as FeeCapTooHighError,Kr as FeeCapTooLowError,Jr as FeeConflictError,Vo as FilterTypeNotSupportedError,sc as HttpRequestError,Yr as InsufficientFundsError,Ko as IntegerOutOfRangeError,oc as InternalRpcError,Qr as IntrinsicGasTooHighError,Zr as IntrinsicGasTooLowError,Jo as InvalidAbiDecodingTypeError,Yo as InvalidAbiEncodingTypeError,Xr as InvalidAbiItemError,Zt as InvalidAbiParameterError,ts as InvalidAbiParametersError,es as InvalidAbiTypeParameterError,je as InvalidAddressError,Qo as InvalidArrayError,Zo as InvalidBytesBooleanError,as as InvalidChainIdError,Na as InvalidDecimalNumberError,Xo as InvalidDefinitionTypeError,Vi as InvalidDomainError,ns as InvalidFunctionModifierError,ti as InvalidHexBooleanError,Ge as InvalidHexValueError,ic as InvalidInputRpcError,Ee as InvalidLegacyVError,rs as InvalidModifierError,ss as InvalidParameterError,cc as InvalidParamsRpcError,os as InvalidParenthesisError,Ki as InvalidPrimaryTypeError,uc as InvalidRequestRpcError,is as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,cs as InvalidSignatureError,us as InvalidStorageKeySizeError,ds as InvalidStructSignatureError,Ji as InvalidStructTypeError,dc as JsonRpcVersionUnsupportedError,mc as LimitExceededRpcError,ms as MaxFeePerGasTooLowError,lc as MethodNotFoundRpcError,fc as MethodNotSupportedRpcError,ls as NonceMaxValueError,fs as NonceTooHighError,hs as NonceTooLowError,hc as ParseRpcError,pc as ProviderDisconnectedError,yc as ProviderRpcError,ps as RawContractError,gc as ResourceNotFoundRpcError,bc as ResourceUnavailableRpcError,wc as RpcError,sa as RpcRequestError,ei as SizeExceedsPaddingSizeError,ai as SizeOverflowError,ni as SliceOffsetOutOfBoundsError,Q as SocketClosedError,ys as SolidityProtectedKeywordError,gs as StateAssignmentConflictError,xc as SwitchChainError,aa as TimeoutError,bs as TipAboveFeeCapError,ws as TransactionExecutionError,xs as TransactionNotFoundError,Es as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,Is as TransactionTypeNotSupportedError,Ec as UnauthorizedProviderError,Ic as UnknownBundleIdError,Ts as UnknownNodeError,Tc as UnknownRpcError,Cs as UnknownSignatureError,vs as UnknownTypeError,Cc as UnsupportedChainIdError,vc as UnsupportedNonOptionalCapabilityError,ri as UnsupportedPackedAbiType,Sc as UnsupportedProviderMethodError,Be as UrlRequiredError,ra as UserRejectedRequestError,Ss as WaitForCallsStatusTimeoutError,As as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,pe as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,Ps as blobsToCommitments,_s as blobsToProofs,si as boolToBytes,oi as boolToHex,ii as bytesToBigInt,ci as bytesToBool,G as bytesToHex,ui as bytesToNumber,Pc as bytesToRlp,di as bytesToString,Td as ccipFetch,Cd as ccipRequest,Ve as checksumAddress,ke as commitmentToVersionedHash,Rs as commitmentsToVersionedHashes,Cr as compactSignatureToHex,Er as compactSignatureToSignature,ze as concat,mi as concatBytes,li as concatHex,At as createClient,qs as createNonceManager,Fs as createPublicClient,dr as createTestClient,mt as createTransport,mr as createWalletClient,lr as custom,Mt as decodeAbiParameters,yr as decodeDeployData,Ni as decodeErrorResult,xd as decodeEventLog,Us as decodeFunctionData,Bs as decodeFunctionResult,Li as defineBlock,Mi as defineChain,kn as defineKzg,Di as defineTransaction,_d as defineTransactionReceipt,zi as defineTransactionRequest,ks as deploylessCallViaBytecodeBytecode,Ns as deploylessCallViaFactoryBytecode,Yi as domainSeparator,fi as encodeAbiParameters,Ce as encodeDeployData,Ls as encodeErrorResult,hi as encodeEventTopics,Xt as encodeFunctionData,Ms as encodeFunctionResult,Ds as encodePacked,zs as erc1155Abi,Gs as erc20Abi,$s as erc20Abi_bytes32,Hs as erc4626Abi,Os as erc6492SignatureValidatorAbi,js as erc6492SignatureValidatorByteCode,Ws as erc721Abi,Vs as ethAddress,Ie as etherUnits,tr as extractChain,fr as fallback,Gi as formatBlock,Ks as formatEther,Js as formatGwei,Rd as formatLog,$i as formatTransaction,qd as formatTransactionReceipt,ft as formatTransactionRequest,Ys as formatUnits,gr as fromBlobs,pi as fromBytes,yi as fromHex,Dt as fromRlp,gi as getAbiItem,B as getAddress,Qs as getChainContractAddress,Zn as getContract,Xn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,bi as getEventSelector,wi as getEventSignature,xi as getFunctionSelector,Ei as getFunctionSignature,Pa as getSerializedTransactionType,Zs as getTransactionType,Xe as getTypesForEIP712Domain,Te as gweiUnits,Qi as hashDomain,le as hashMessage,Zi as hashStruct,Ze as hashTypedData,A as hexToBigInt,Ii as hexToBool,H as hexToBytes,Ir as hexToCompactSignature,F as hexToNumber,_c as hexToRlp,Xs as hexToSignature,Ti as hexToString,to as http,Oe as isAddress,ht as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,la as isHash,E as isHex,Y as keccak256,eo as labelhash,Rc as maxInt104,qc as maxInt112,Fc as maxInt120,Uc as maxInt128,Bc as maxInt136,kc as maxInt144,Nc as maxInt152,Lc as maxInt16,Mc as maxInt160,Dc as maxInt168,zc as maxInt176,Gc as maxInt184,$c as maxInt192,Hc as maxInt200,Oc as maxInt208,jc as maxInt216,Wc as maxInt224,Vc as maxInt232,Kc as maxInt24,Jc as maxInt240,Yc as maxInt248,Qc as maxInt256,Zc as maxInt32,Xc as maxInt40,tu as maxInt48,eu as maxInt56,au as maxInt64,nu as maxInt72,ru as maxInt8,su as maxInt80,ou as maxInt88,iu as maxInt96,cu as maxUint104,uu as maxUint112,du as maxUint120,mu as maxUint128,lu as maxUint136,fu as maxUint144,hu as maxUint152,pu as maxUint16,yu as maxUint160,gu as maxUint168,bu as maxUint176,wu as maxUint184,xu as maxUint192,Eu as maxUint200,Iu as maxUint208,Tu as maxUint216,Cu as maxUint224,vu as maxUint232,Su as maxUint24,Au as maxUint240,Pu as maxUint248,_u as maxUint256,Ru as maxUint32,qu as maxUint40,Fu as maxUint48,Uu as maxUint56,Bu as maxUint64,ku as maxUint72,Nu as maxUint8,Lu as maxUint80,Mu as maxUint88,Du as maxUint96,zu as minInt104,Gu as minInt112,$u as minInt120,Hu as minInt128,Ou as minInt136,ju as minInt144,Wu as minInt152,Vu as minInt16,Ku as minInt160,Ju as minInt168,Yu as minInt176,Qu as minInt184,Zu as minInt192,Xu as minInt200,td as minInt208,ed as minInt216,ad as minInt224,nd as minInt232,rd as minInt24,sd as minInt240,od as minInt248,id as minInt256,cd as minInt32,ud as minInt40,dd as minInt48,md as minInt56,ld as minInt64,fd as minInt72,hd as minInt8,pd as minInt80,yd as minInt88,gd as minInt96,ao as multicall3Abi,no as namehash,ro as nonceManager,Ci as numberToBytes,R as numberToHex,vd as offchainLookup,Sd as offchainLookupAbiItem,Ad as offchainLookupSignature,Me as pad,vi as padBytes,xt as padHex,so as parseAbi,oo as parseAbiItem,Qn as parseAbiParameter,io as parseAbiParameters,Ir as parseCompactSignature,ar as parseErc6492Signature,nr as parseErc8010Signature,cr as parseEther,Ed as parseEventLogs,ur as parseGwei,co as parseSignature,_a as parseTransaction,Wt as parseUnits,uo as prepareEncodeFunctionData,mo as presignMessagePrefix,lo as publicActions,Z as recoverAddress,Sa as recoverMessageAddress,fo as recoverPublicKey,Tr as recoverTransactionAddress,Aa as recoverTypedDataAddress,er as ripemd160,ho as rpcSchema,Hi as rpcTransactionType,po as serializeAccessList,Cr as serializeCompactSignature,yo as serializeErc6492Signature,rr as serializeErc8010Signature,go as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Si as setErrorConfig,xr as setupKzg,bd as sha256,Fn as shouldThrow,br as sidecarsToVersionedHashes,vr as signatureToCompactSignature,bo as signatureToHex,$e as size,De as slice,Ai as sliceBytes,Lt as sliceHex,Pi as stringToBytes,Je as stringToHex,Oi as stringify,hn as testActions,ge as toBlobSidecars,wo as toBlobs,k as toBytes,wr as toCoinType,_i as toEventHash,Ri as toEventSelector,qi as toEventSignature,Fi as toFunctionHash,Ui as toFunctionSelector,Bi as toFunctionSignature,Nt as toHex,xo as toPrefixedMessage,ia as toRlp,ji as transactionType,We as trim,Eo as universalSignatureValidatorAbi,Io as universalSignatureValidatorByteCode,ta as validateTypedData,sr as verifyHash,or as verifyMessage,ir as verifyTypedData,qn as walletActions,hr as webSocket,To as weiUnits,Co as withCache,vo as withRetry,Qe as withTimeout,So as zeroAddress,Ao as zeroHash};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-
|
|
1
|
+
import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-CKh-MxqM.js";import{d as f,r as $,e as g}from"./index-C_2RtD-k.js";const w=f`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as f,i as w,b as l}from"./lit-element-B3y9oplH.js";import{n as o,o as y}from"./class-map-CxwNmq0D.js";import{c as v,U as $}from"./index-
|
|
1
|
+
import{w as f,i as w,b as l}from"./lit-element-B3y9oplH.js";import{n as o,o as y}from"./class-map-CxwNmq0D.js";import{c as v,U as $}from"./index-CKh-MxqM.js";import"./index-BSPthC5D.js";import{d as b,r as x,e as z}from"./index-C_2RtD-k.js";import"./index-UVas8o3a.js";const S=f`<svg width="86" height="96" fill="none">
|
|
2
2
|
<path
|
|
3
3
|
d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
|
|
4
4
|
/>
|