@dcl/shop 1.17.2-36417112568.commit-e2afc81 → 1.17.2-36418293890.commit-220d68e
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-ahc1cGJr.js → Activity-D4VBtnbk.js} +6 -6
- package/_assets/{AnimatedBackground-umIp23wl.js → AnimatedBackground-B69r2Bc-.js} +3 -3
- package/_assets/{Assets-DwelGvtu.js → Assets-CRTwcBwP.js} +9 -9
- package/_assets/{Cart-nnTbuXqE.js → Cart-BxDC8lj6.js} +2 -2
- package/_assets/{Collection-OO-CXfeg.js → Collection-Dnht-2q3.js} +2 -2
- package/_assets/{CollectionCarousel-Dg2NBx67.js → CollectionCarousel-C9wq2JOZ.js} +3 -3
- package/_assets/{Confetti-DF67ec9x.js → Confetti-BI3FtvtA.js} +4 -4
- package/_assets/{ConstantsUtil-C4MAR3n5.js → ConstantsUtil-AO-LLgrp.js} +2 -2
- package/_assets/{ContentClient-CeSQQmZ0.js → ContentClient-BTeKzo7T.js} +2 -2
- package/_assets/{Creator-BgQvXwOl.js → Creator-CJU_n_Ee.js} +2 -2
- package/_assets/{CreditPackPicker-Cksr3kzu.js → CreditPackPicker-B01NLAbL.js} +2 -2
- package/_assets/{CreditRate-CRu68bxJ.js → CreditRate-BvwbnBW-.js} +2 -2
- package/_assets/{DeploymentBuilder-7eFv_frV.js → DeploymentBuilder-HajOLjzg.js} +2 -2
- package/_assets/{EmotePlaybackBar-CdhQyQNk.js → EmotePlaybackBar-DEuoLg6N.js} +3 -3
- package/_assets/{ErrorNotice-YylntVIF.js → ErrorNotice-BmAQfVhf.js} +2 -2
- package/_assets/{Event-jynjm47j.js → Event-D8-9ebpv.js} +2 -2
- package/_assets/{ExchangeController-BPmmrC-n.js → ExchangeController-gStnDMQK.js} +2 -2
- package/_assets/{Faq-DuTr6ePB.js → Faq-CvfRl4yG.js} +2 -2
- package/_assets/{Filters-CXCCoPfU.js → Filters-LZ9snivB.js} +2 -2
- package/_assets/{GetCredits-CFErpq-L.js → GetCredits-y_URWWV-.js} +2 -2
- package/_assets/{Grow-C46NVYT_.js → Grow-BNtEtruo.js} +2 -2
- package/_assets/{HelpersUtil-CvEYQ_bN.js → HelpersUtil-Blp7Eq-U.js} +2 -2
- package/_assets/IssueModal-DfxiUimT.js +323 -0
- package/_assets/{ItemDetail-D9tzUCK_.js → ItemDetail-s3kjESZN.js} +2 -2
- package/_assets/{LoadMore-1l5kVCpI.js → LoadMore-BRW4riO-.js} +2 -2
- package/_assets/{ManaPricingBanner-Bpt7PE5u.js → ManaPricingBanner-dP4FGFiE.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-DsEi0tgF.js → ManaPricingBanner.styles-8psnL7zm.js} +2 -2
- package/_assets/{MyAssets-BUo6c0_2.js → MyAssets-B1mV2q8F.js} +2 -2
- package/_assets/{MyFavorites-C6mXW5Jl.js → MyFavorites-C0aEyMBE.js} +2 -2
- package/_assets/MyStore-C5KnNX82.js +2122 -0
- package/_assets/{NetworkUtil-C4JZB8Ae.js → NetworkUtil-BKndxmAv.js} +2 -2
- package/_assets/{NotFound-D1YOGdVu.js → NotFound-D54GcHkx.js} +2 -2
- package/_assets/{NotificationsBell-BOYDhVk6.js → NotificationsBell-pH8tJXRW.js} +2 -2
- package/_assets/{OutfitDetail-BGIocC8Y.js → OutfitDetail-CRqnkCPP.js} +2 -2
- package/_assets/{OutfitPreview-tuw000fG.js → OutfitPreview-BHggnYWV.js} +2 -2
- package/_assets/{OutfitStudio-Cyr31rH6.js → OutfitStudio-1Di-LPT1.js} +2 -2
- package/_assets/{PaymentMethodStep-hPpJP-Wl.js → PaymentMethodStep-CCThKPFp.js} +5 -5
- package/_assets/{SaleCountdown-D75asuMy.js → SaleCountdown-CVfn_nkW.js} +2 -2
- package/_assets/{Spinner-BvrhyD7L.js → Spinner-CsrKVEJ6.js} +2 -2
- package/_assets/{StoreSettings-24Sax-kk.js → StoreSettings-C-BRsjS0.js} +2 -2
- package/_assets/{Success-BPEXgiYa.js → Success-BNOfkDxB.js} +2 -2
- package/_assets/{SwapController-DLrZ30eq.js → SwapController-CDvVpAnZ.js} +2 -2
- package/_assets/{Tooltip-2to0FtD5.js → Tooltip-DodLiQGn.js} +2 -2
- package/_assets/{TradeService-BroAtYDK.js → TradeService-CK1obPqz.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-DtsX-WLb.js → W3MFrameProviderSingleton-Bi11xf0a.js} +4 -4
- package/_assets/{WebCryptoP256-CA91XWV0.js → WebCryptoP256-DdJx12ry.js} +2 -2
- package/_assets/{basic-BRxJpd6n.js → basic-kYjcgNwQ.js} +2 -2
- package/_assets/{biconomy-C8WZJfrn.js → biconomy-DSPO7yo7.js} +2 -2
- package/_assets/{browseLayout.styles-DySdp3ol.js → browseLayout.styles-C0-FBoNa.js} +2 -2
- package/_assets/{browser-Bsk1yKVj.js → browser-BFShAaT0.js} +2 -2
- package/_assets/{browser-gnLUFKwX.js → browser-Br_PGSx5.js} +2 -2
- package/_assets/{browser-ponyfill-1RGXVE2_.js → browser-ponyfill-CrYE44xX.js} +2 -2
- package/_assets/{buy-DY-mMt7w.js → buy-N92V9AyQ.js} +2 -2
- package/_assets/{buy-gasless-BLW3WNLa.js → buy-gasless-BqyhGX44.js} +2 -2
- package/_assets/{ccip-CdHrlR0T.js → ccip-B_HvA8dg.js} +2 -2
- package/_assets/{ccip-Dhy3aii9.js → ccip-jOTW4hk8.js} +2 -2
- package/_assets/{chains-w-LqjG8V.js → chains-CQr46OzR.js} +2 -2
- package/_assets/collectionPage.styles-COfykuUv.js +41 -0
- package/_assets/{common-ClyopIw2.js → common-NfXKQFUO.js} +2 -2
- package/_assets/{controller-BLFxGiru.js → controller-uEuuhOzZ.js} +3 -3
- package/_assets/{core-Cgo171jk.js → core-CiORg1nl.js} +5 -5
- package/_assets/{createSvgIcon-DFZIXrO2.js → createSvgIcon-CJQ_wRTF.js} +2 -2
- package/_assets/{crumbs.styles-DNbofwyV.js → crumbs.styles-Cvt8wkkQ.js} +2 -2
- package/_assets/{custom-CzL3ZDy6.js → custom-BtdzOPyA.js} +2 -2
- package/_assets/{data-capture-oFjjsPXO.js → data-capture-CuXP8zCA.js} +2 -2
- package/_assets/{dcl-schemas-CIgtuOoU.js → dcl-schemas-_B0Kk1dX.js} +2 -2
- package/_assets/{decimals-DAXns5g7.js → decimals-DE-_bCrG.js} +2 -2
- package/_assets/{decimals-BEHcGzvL.js → decimals-Dl6Ac2Yr.js} +2 -2
- package/_assets/{detectExtension-5E6hSqod.js → detectExtension-Cwqdpc5H.js} +2 -2
- package/_assets/{disposePreview-DmN3QW2F.js → disposePreview-VulUR7GI.js} +2 -2
- package/_assets/{email-Pd0tOznC.js → email-B9mCFBNR.js} +2 -2
- package/_assets/{embedded-wallet-C-nyyiA9.js → embedded-wallet-Dh5zggIz.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-C-347kjK.js → emotion-styled.browser.esm-SwDlCOIE.js} +2 -2
- package/_assets/{engine-DgLHXCvQ.js → engine-h-Hm5Du4.js} +2 -2
- package/_assets/{errors-CGpVjZew.js → errors-DADPuabe.js} +2 -2
- package/_assets/{estimate-l1-fee-DMNF6VY5.js → estimate-l1-fee-CLV1dz3T.js} +2 -2
- package/_assets/{eth_estimateGas-DU3yHXo0.js → eth_estimateGas-7d-6agbs.js} +2 -2
- package/_assets/{eth_getStorageAt-CZXlYseH.js → eth_getStorageAt-IXCr5ARn.js} +2 -2
- package/_assets/{eth_getTransactionCount-BPBkSCUe.js → eth_getTransactionCount-QrQ-YZ2_.js} +2 -2
- package/_assets/{ethereum-BcnV2ali.js → ethereum-Dcbgjb99.js} +2 -2
- package/_assets/{ethers-B_gMX7bu.js → ethers-Dp2JFZH-.js} +2 -2
- package/_assets/{events-Dn3_sDeB.js → events-keqiXLZy.js} +2 -2
- package/_assets/{execute-67mwCNiO.js → execute-CmtSq1Mi.js} +3 -3
- package/_assets/{extractIPFS--4ktQwdZ.js → extractIPFS-BdHt_nhV.js} +2 -2
- package/_assets/{features-xb712O6d.js → features-CMqxTvsM.js} +2 -2
- package/_assets/{fetchTokenMetadata-CROm5iEy.js → fetchTokenMetadata-D33vrFMS.js} +3 -3
- package/_assets/{field.styles-B7GpVroz.js → field.styles-CboGP8oE.js} +2 -2
- package/_assets/{fortmatic-DxnTmpwf.js → fortmatic-CTCUZGSh.js} +2 -2
- package/_assets/{get-bytecode-Cn7VPjuQ.js → get-bytecode-CTC9Ke-5.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-CziI2Mp5.js → get-ecosystem-wallet-info-v-fSB1GI.js} +2 -2
- package/_assets/{getBalance-CXpOqiRi.js → getBalance-bTJiiiHw.js} +3 -3
- package/_assets/{getInstalledModules-C97rQKkl.js → getInstalledModules-Bma4gJyX.js} +2 -2
- package/_assets/{getNFT-BEDez5yk.js → getNFT-BTuyVQiv.js} +2 -2
- package/_assets/{getNFT-CMUK9Jkt.js → getNFT-Dw3qNCM8.js} +3 -3
- package/_assets/{grid.styles-CTCw781a.js → grid.styles-DqJ0qNtW.js} +2 -2
- package/_assets/{hashTypedData-DrTnE0Uo.js → hashTypedData-0InMGzMN.js} +2 -2
- package/_assets/{hashTypedData-CkWSwa_M.js → hashTypedData-BDYHSIfU.js} +2 -2
- package/_assets/{import-C7TsYQy9.js → import-PvZhp7TH.js} +2 -2
- package/_assets/{in-app-XCTtPdXb.js → in-app-CQCuHufY.js} +2 -2
- package/_assets/{in-app-wallet-calls-Bf-KUvJ0.js → in-app-wallet-calls-0l44bAKE.js} +2 -2
- package/_assets/{index-B0icZDm6.js → index-2NXkxE64.js} +2 -2
- package/_assets/{index-C6iF-SQS.js → index-2Yvk78KZ.js} +2 -2
- package/_assets/{index-D6bgolKH.js → index-5PEf1C05.js} +2 -2
- package/_assets/{index-Bx_cH1nn.js → index-B0sEXvn2.js} +2 -2
- package/_assets/{index-CfRRbY4r.js → index-B0ttuhq9.js} +4 -4
- package/_assets/{index-Cg5J3PHn.js → index-B9kDWBV8.js} +2 -2
- package/_assets/{index-D0bdYV1m.js → index-BK8G6jWI.js} +2 -2
- package/_assets/{index-DcQgVGCL.js → index-BNVAlY49.js} +2 -2
- package/_assets/{index-DglMTc6w.js → index-BO9Xu_HO.js} +2 -2
- package/_assets/{index-pzFHM3no.js → index-BV74hnAs.js} +2 -2
- package/_assets/{index-ummDM-YW.js → index-B_2gQm9j.js} +2 -2
- package/_assets/{index-BmEcJIFr.js → index-BlCbRMtD.js} +2 -2
- package/_assets/{index-Bz5aUY4R.js → index-BmnUgKLP.js} +2 -2
- package/_assets/{index-DlYwkoh9.js → index-Bn4HqcS6.js} +2 -2
- package/_assets/{index-B47x5iYD.js → index-BnTx4ws4.js} +4 -4
- package/_assets/{index-BJQicl8s.js → index-Bp3aHt26.js} +266 -266
- package/_assets/{index-SnM__nMN.js → index-BpKF2zsV.js} +2 -2
- package/_assets/{index-Bx2Yr0I1.js → index-BrEORGwc.js} +3 -3
- package/_assets/{index-KtwMZa_D.js → index-BudJkUoY.js} +2 -2
- package/_assets/{index-D6RUnASW.js → index-Bvn260Vl.js} +2 -2
- package/_assets/{index-Da0OIpMQ.js → index-C2tDl-Kb.js} +2 -2
- package/_assets/{index-srwTpss-.js → index-C7Ja3Y6S.js} +2 -2
- package/_assets/{index-D_LWbA_T.js → index-C91yDpJn.js} +2 -2
- package/_assets/{index-BNBdrKN8.js → index-CBmC4JRa.js} +2 -2
- package/_assets/{index-B1mdfGb_.js → index-CC4oeKRC.js} +2 -2
- package/_assets/{index-rlHJmfTq.js → index-CDLnCGnN.js} +2 -2
- package/_assets/{index-DYNUrlyd.js → index-CJkTbUXr.js} +2 -2
- package/_assets/{index-lBF5zNbH.js → index-COLL-965.js} +2 -2
- package/_assets/{index-CYZGTT5Q.js → index-CV6n-ZpQ.js} +2 -2
- package/_assets/{index-D0XUi2BW.js → index-CXt0bCkh.js} +2 -2
- package/_assets/{index-BxZY3R6O.js → index-C_en7zzj.js} +3 -3
- package/_assets/{index-C8Spvg7F.js → index-CkWtWgH3.js} +2 -2
- package/_assets/{index-BFiJHg3T.js → index-ClLMt34W.js} +2 -2
- package/_assets/{index-CUbbKhDQ.js → index-Cq2mz6sF.js} +2 -2
- package/_assets/{index-C6lsb53t.js → index-CsmKttlZ.js} +2 -2
- package/_assets/{index-DwfqzD3B.js → index-Cw5-Ihj5.js} +2 -2
- package/_assets/{index-BiZ6sDat.js → index-CwsIKbLW.js} +2 -2
- package/_assets/{index-D_YK6f10.js → index-D0x4XVMx.js} +2 -2
- package/_assets/{index-BS1m5BmZ.js → index-D4uH2RFU.js} +2 -2
- package/_assets/{index-ByfsdepO.js → index-D8UMsNgI.js} +2 -2
- package/_assets/{index-DBhKJzP1.js → index-D8lpod0j.js} +2 -2
- package/_assets/{index-Dyai1waz.js → index-DGy4gD9M.js} +2 -2
- package/_assets/{index-nAuGEnGp.js → index-DMmXUXxd.js} +2 -2
- package/_assets/{index-3z3h-sWT.js → index-DOqbDyoF.js} +2 -2
- package/_assets/{index-Baur_xj6.js → index-DRPoZEiN.js} +2 -2
- package/_assets/{index-IS7z8bF7.js → index-DTkkVjsa.js} +2 -2
- package/_assets/{index-ZWBqYIeK.js → index-DW2SBgsT.js} +2 -2
- package/_assets/{index-BKceaYFO.js → index-DeYhfeYR.js} +2 -2
- package/_assets/{index-DIMycRNk.js → index-DitYYXq7.js} +2 -2
- package/_assets/{index-DVNQ3djO.js → index-DkSpWs0n.js} +2 -2
- package/_assets/{index-R_74jjrw.js → index-DktRaopJ.js} +2 -2
- package/_assets/{index-Dd-2Y9li.js → index-Dncqt9PR.js} +2 -2
- package/_assets/{index-KcQBXzUD.js → index-DpK4-4Ty.js} +2 -2
- package/_assets/{index-Dm73DTNL.js → index-DrpLxOHh.js} +2 -2
- package/_assets/{index-o1o23ELd.js → index-DyPX0auR.js} +2 -2
- package/_assets/{index-hLobvkDU.js → index-JUXp6Dlc.js} +4 -4
- package/_assets/{index-VGJY4m72.js → index-JbnopHfg.js} +3 -3
- package/_assets/{index-BLs6tbd1.js → index-LecHOKus.js} +2 -2
- package/_assets/{index-DJFLeIP8.js → index-M4eFYgWB.js} +2 -2
- package/_assets/{index-CBA4W5FG.css → index-SNOMFTTK.css} +1 -1
- package/_assets/{index-Ao40Rh7v.js → index-SOl7iePx.js} +2 -2
- package/_assets/{index-DEhC8LgS.js → index-_bAz9rUY.js} +2 -2
- package/_assets/{index-CF8SkK1g.js → index-d74473In.js} +2 -2
- package/_assets/{index-OvP5xDwc.js → index-oWE1yc71.js} +2 -2
- package/_assets/{index-Cx-907QR.js → index-qPXDynV3.js} +2 -2
- package/_assets/{index-B5aKYuFu.js → index-qR9hBR1Y.js} +2 -2
- package/_assets/{index-CGXb1e0C.js → index-t_DTunkm.js} +2 -2
- package/_assets/{index-B3d1HVPO.js → index-uD8Xwoma.js} +3 -3
- package/_assets/{index.es-DUGjvY5V.js → index.es-CF1TpWwB.js} +2 -2
- package/_assets/{index.es-BgDLSDRr.js → index.es-CafG5vDc.js} +5 -5
- package/_assets/{index.es-D5A8qSvl.js → index.es-DR4gl8qK.js} +2 -2
- package/_assets/{index.es-mH1f8Pbn.js → index.es-Dxe_tQfK.js} +2 -2
- package/_assets/{items-empty-C2mQWlpa.js → items-empty-BIxeTwto.js} +2 -2
- package/_assets/{jump-BKgEW1Uq.js → jump-YJO6VZZT.js} +2 -2
- package/_assets/{linkAccount-7AfjwEWc.js → linkAccount-Di1L6ODp.js} +2 -2
- package/_assets/{loader-logo-B2Di-_Ze.js → loader-logo-CUaLPrEf.js} +2 -2
- package/_assets/{localBatchGatewayRequest-Ku83V8tQ.js → localBatchGatewayRequest-D2hxnEpH.js} +2 -2
- package/_assets/{modal.styles-DKyrrEDx.js → modal.styles-C4pYkuZj.js} +2 -2
- package/_assets/{native-CUblzjFD.js → native-8vsnOJR4.js} +2 -2
- package/_assets/{networks-CslgB8gK.js → networks-C8S8vhv3.js} +2 -2
- package/_assets/{onramp-CBYpF4D5.js → onramp-wP8uPyX2.js} +2 -2
- package/_assets/{openzeppelin-V9W06b6g.js → openzeppelin-BZquI8jE.js} +2 -2
- package/_assets/{ownerOf-CaM3U2UN.js → ownerOf-CeffRJWl.js} +2 -2
- package/_assets/{parseNft-CQ5MCToI.js → parseNft-CJBHaSxB.js} +3 -3
- package/_assets/{parseSignature-B-1Tq6oP.js → parseSignature-CTywhOXZ.js} +4 -4
- package/_assets/{parseSignature-Bq-XGU-C.js → parseSignature-Gt-Tp49v.js} +2 -2
- package/_assets/{passkeys-BQJISQgw.js → passkeys-B3gs0Zat.js} +2 -2
- package/_assets/{pay-with-exchange-7MLwJdJf.js → pay-with-exchange-B-nQx4jw.js} +2 -2
- package/_assets/{prepare-contract-call-C2cYOhbO.js → prepare-contract-call-CthQ_8dx.js} +2 -2
- package/_assets/{qr-overlay-BLml90bO.js → qr-overlay-CmiVvxUM.js} +4 -4
- package/_assets/{react-4P5sGbEq.js → react-LHIQ98KR.js} +2 -2
- package/_assets/{receive-D2DHGMs6.js → receive-BLEP1nRX.js} +2 -2
- package/_assets/{resolveImplementation-LR6nB9QW.js → resolveImplementation-CsldPK8y.js} +2 -2
- package/_assets/{resume-buy-PRghislR.js → resume-buy-DHFmAeF4.js} +2 -2
- package/_assets/{resume-name-bHNOaad3.js → resume-name-ktnwHkJR.js} +2 -2
- package/_assets/{rpc-Cm-DpE6F.js → rpc-DoZnkyqC.js} +2 -2
- package/_assets/{sales-empty-CkxAX5qQ.js → sales-empty-B0QquTRo.js} +2 -2
- package/_assets/{search-empty-CaBq2HkU.js → search-empty-CIkPUIx0.js} +2 -2
- package/_assets/{secp256k1-sqPtvBok.js → secp256k1-CvS45x8t.js} +2 -2
- package/_assets/{secp256k1-Cp0CohWk.js → secp256k1-ir2IysjZ.js} +2 -2
- package/_assets/{secp256k1-CKzcFiXH.js → secp256k1-qcRCtNm7.js} +2 -2
- package/_assets/{send-DCOMlceB.js → send-C8Z5DKl1.js} +2 -2
- package/_assets/{send-batch-transaction-BsZh8Uk5.js → send-batch-transaction-DWBPL2Xd.js} +2 -2
- package/_assets/{send-eip712-transaction-CzOZcgLd.js → send-eip712-transaction-BPOb4Kew.js} +3 -3
- package/_assets/{send-gasless-transaction-B6XUAmSL.js → send-gasless-transaction-C8lkAvob.js} +3 -3
- package/_assets/{send-transaction-D-XocUou.js → send-transaction-6sN2gwwv.js} +3 -3
- package/_assets/{sendMetaTransaction-B2oQ5eKD.js → sendMetaTransaction-DqCaiE1G.js} +2 -2
- package/_assets/{sendRawTransaction-gnCQ4l70.js → sendRawTransaction-PWiWe9oZ.js} +4 -4
- package/_assets/{sentry-BhkK6fEK.js → sentry-DfhH7M7m.js} +3 -3
- package/_assets/{serializeTransaction-BaK3bRi1.js → serializeTransaction-BQOXshQM.js} +2 -2
- package/_assets/{session-proposal-Dm-Nvcz-.js → session-proposal-DiCtlfl-.js} +2 -2
- package/_assets/{session-request-CrQTuuP7.js → session-request-YSiBX2i8.js} +3 -3
- package/_assets/{sha256-DBJDpCHg.js → sha256-DTaoTGeM.js} +2 -2
- package/_assets/{sha3-70hRWHxs.js → sha3-DG5Rerll.js} +2 -2
- package/_assets/signin-empty-DnbkmKDt.js +2 -0
- package/_assets/{signing-DCOM6x8H.js → signing-BL8nzqUh.js} +4 -4
- package/_assets/{skeleton.styles-B8FT4bpt.js → skeleton.styles-BsIoB_Qm.js} +2 -2
- package/_assets/{socials-BPNH7uMf.js → socials-4bzF0vB9.js} +2 -2
- package/_assets/{styled-CdX_hwL4.js → styled-BAv1xnnT.js} +2 -2
- package/_assets/{swaps-DRg-0_cj.js → swaps-iSQXs6GQ.js} +2 -2
- package/_assets/{thirdweb-DhUWHu_Q.js → thirdweb-DFVL09cd.js} +4 -4
- package/_assets/{to-serializable-transaction-C68Txae9.js → to-serializable-transaction-CkE-NgmW.js} +3 -3
- package/_assets/{totalSupply-DGM7d1I-.js → totalSupply-qkYmzw_6.js} +2 -2
- package/_assets/{trade-encoding-DcVwVU4D.js → trade-encoding-ckNC4fJ-.js} +2 -2
- package/_assets/{transaction-DShAG0ei.js → transaction-Yvut_WEw.js} +2 -2
- package/_assets/{transactionReceipt-C7KPa1TY.js → transactionReceipt-bOGdURTM.js} +2 -2
- package/_assets/{transactions-DMCLNnvd.js → transactions-pJWMS9Al.js} +2 -2
- package/_assets/{useInfiniteGrid-DS-eHJl3.js → useInfiniteGrid-SY9xs2bD.js} +2 -2
- package/_assets/{useStore-D4vtf_uM.js → useStore-DtSFjEO-.js} +3 -3
- package/_assets/{useTheme-DdgO2k0Y.js → useTheme-B2sXCJMT.js} +2 -2
- package/_assets/{utils-Bhk-dfOy.js → utils-ZXL77_V-.js} +2 -2
- package/_assets/{verifyHash-COTUPfs3.js → verifyHash-BaaSBs31.js} +2 -2
- package/_assets/{w3m-modal-DI7gA3rB.js → w3m-modal-RMD0rXBw.js} +2 -2
- package/_assets/{w3m-modal-CO33DEWa.js → w3m-modal-Rzu8HJ5T.js} +2 -2
- package/_assets/{wait-for-tx-receipt-8S4DlVRa.js → wait-for-tx-receipt-CV57tGp2.js} +2 -2
- package/_assets/{wallets-n81pe2QQ.js → wallets-0RL5EqXk.js} +6 -6
- package/_assets/{web-connector-Cu8MU84-.js → web-connector-BrtjJDdk.js} +4 -4
- package/_assets/{writeContract-LG21efqR.js → writeContract-qrIA3P4r.js} +2 -2
- package/_assets/{zora-sepolia-h86d5KkK.js → zora-sepolia-aMaIuMFa.js} +2 -2
- package/_assets/{zoraTestnet-V0TYbfom.js → zoraTestnet-w7lDfHTy.js} +2 -2
- package/index.html +12 -12
- package/package.json +2 -2
- package/_assets/IssueModal-CdyJ5U3J.js +0 -323
- package/_assets/MyStore-D3H6JCYZ.js +0 -2008
- package/_assets/collectionPage.styles-DTKFRnJt.js +0 -41
- package/_assets/signin-empty-DoMTaEfj.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as g,b as m}from"./lit-element-wjYUA6aF.js";import{n as f}from"./class-map-BxMzgOIb.js";import{c as h}from"./index-
|
|
1
|
+
import{i as g,b as m}from"./lit-element-wjYUA6aF.js";import{n as f}from"./class-map-BxMzgOIb.js";import{c as h}from"./index-2NXkxE64.js";import{d as p,r as b}from"./index-BnTx4ws4.js";import{C as c}from"./ConstantsUtil-AO-LLgrp.js";import{R as y,O as u}from"./W3MFrameProviderSingleton-Bi11xf0a.js";import{au as v}from"./NetworkUtil-BKndxmAv.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="254b2b69-cdb3-421a-af46-4e16f80590c2",t._sentryDebugIdIdentifier="sentry-dbid-254b2b69-cdb3-421a-af46-4e16f80590c2")}catch{}})();const $=p`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -60,4 +60,4 @@ import{i as g,b as m}from"./lit-element-wjYUA6aF.js";import{n as f}from"./class-
|
|
|
60
60
|
<slot></slot>
|
|
61
61
|
</wui-text>
|
|
62
62
|
`}};i.styles=[b,$];d([f()],i.prototype,"variant",void 0);d([f()],i.prototype,"size",void 0);d([f()],i.prototype,"icon",void 0);i=d([h("wui-tag")],i);const S={getTabsByNamespace(t){var r;return!!t&&t===v.CHAIN.EVM?((r=u.state.remoteFeatures)==null?void 0:r.activity)===!1?c.ACCOUNT_TABS.filter(a=>a.label!=="Activity"):c.ACCOUNT_TABS:[]},isValidReownName(t){return/^[a-zA-Z0-9]+$/gu.test(t)},isValidEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/gu.test(t)},validateReownName(t){return t.replace(/\^/gu,"").toLowerCase().replace(/[^a-zA-Z0-9]/gu,"")},hasFooter(){var e;const t=y.state.view;if(c.VIEWS_WITH_LEGAL_FOOTER.includes(t)){const{termsConditionsUrl:r,privacyPolicyUrl:a}=u.state,n=(e=u.state.features)==null?void 0:e.legalCheckbox;return!(!r&&!a||n)}return c.VIEWS_WITH_DEFAULT_FOOTER.includes(t)}};export{S as H};
|
|
63
|
-
//# sourceMappingURL=HelpersUtil-
|
|
63
|
+
//# sourceMappingURL=HelpersUtil-Blp7Eq-U.js.map
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import{r as y,j as s}from"./react-LHIQ98KR.js";import{M as Y,h as Z,j as J,s as o,a as e,X as ee,t as r,I as k,O as z,Y as se,l as te,Z as oe}from"./index-Bp3aHt26.js";import{f as L,m as ne,k as re,r as ie,n as ae,p as le}from"./trade-encoding-ckNC4fJ-.js";import{M as ce,E as de,s as ue}from"./sendMetaTransaction-DqCaiE1G.js";import{C as pe,I as fe}from"./ethers-Dp2JFZH-.js";import{i as xe}from"./SaleCountdown-CVfn_nkW.js";import{i as _,f as me}from"./errors-DADPuabe.js";import{E as he}from"./ErrorNotice-BmAQfVhf.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="d99916f4-9299-4933-be85-3d179fd65b5e",t._sentryDebugIdIdentifier="sentry-dbid-d99916f4-9299-4933-be85-3d179fd65b5e")}catch{}})();const P=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function H(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function O(t){return t.reduce((a,i)=>a+Math.max(0,Math.floor(i.amount||0)),0)}const C=50;function U(t){return Math.max(0,Math.min(t,C))}function ge(t,a){const i=t.filter(l=>l.address.trim().length>0||(l.amount||0)>0);if(i.length===0)return!1;for(const l of i)if(!H(l.address)||!Number.isInteger(l.amount)||l.amount<1)return!1;const d=O(i);return d>=1&&d<=U(a)}function be(t,a){const i=[],d=[];for(const l of t){const x=l.address.trim(),p=Math.max(0,Math.floor(l.amount||0));if(!(!x||p===0))for(let f=0;f<p;f++)i.push(x),d.push(a)}return{beneficiaries:i,itemIds:d}}async function ye(t){const{contractAddress:a,chainId:i,beneficiaries:d,itemIds:l,signer:x}=t,p={...Z(J.ERC721CollectionV2,i),address:a},f=new fe(P).encodeFunctionData("issueTokens",[d,l]),c=ie(),w=ae(x.provider,c),v=await ue(w,c,f,p,{serverURL:L.relayerUrl});return await le(v,"the mint"),v}async function we(t){const{signer:a,contractAddress:i,chainId:d,entries:l,itemId:x}=t,{beneficiaries:p,itemIds:f}=be(l,x);if(p.length===0)throw new Error("No copies to issue");if(L.enabled)try{return await ye({contractAddress:i,chainId:d,beneficiaries:p,itemIds:f,signer:a})}catch(m){if(m instanceof ce&&m.code===de.USER_DENIED||m instanceof ne)throw m;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",m)}return await Y(a.provider,d),(await(await new pe(i,P,a).issueTokens(p,f,re(d))).wait()).transactionHash}const ve=o.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 10000;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
background: rgba(22, 21, 24, 0.55);
|
|
10
|
+
`,$e=o.div`
|
|
11
|
+
width: 560px;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
max-height: 92vh;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
background: ${e.colors.white};
|
|
16
|
+
border-radius: 16px;
|
|
17
|
+
padding: 12px 16px 16px;
|
|
18
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 20px;
|
|
22
|
+
`,je=o.div`
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
padding-bottom: 16px;
|
|
28
|
+
border-bottom: 1px solid ${e.colors.gray4};
|
|
29
|
+
`,ke=o.h2`
|
|
30
|
+
margin: 0;
|
|
31
|
+
font-family: ${e.font.sans};
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
font-size: 20px;
|
|
34
|
+
line-height: 1.6;
|
|
35
|
+
color: ${e.colors.text};
|
|
36
|
+
`,Ie=o.button`
|
|
37
|
+
flex: none;
|
|
38
|
+
display: grid;
|
|
39
|
+
place-items: center;
|
|
40
|
+
width: 24px;
|
|
41
|
+
height: 24px;
|
|
42
|
+
border: 0;
|
|
43
|
+
background: none;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
color: ${e.colors.text};
|
|
46
|
+
|
|
47
|
+
.ico {
|
|
48
|
+
width: 18px;
|
|
49
|
+
height: 18px;
|
|
50
|
+
}
|
|
51
|
+
&:disabled {
|
|
52
|
+
opacity: 0.4;
|
|
53
|
+
cursor: default;
|
|
54
|
+
}
|
|
55
|
+
&:focus-visible {
|
|
56
|
+
outline: 2px solid ${e.colors.accent};
|
|
57
|
+
outline-offset: 2px;
|
|
58
|
+
}
|
|
59
|
+
`,Ce=o.p`
|
|
60
|
+
margin: 0;
|
|
61
|
+
font-family: ${e.font.sans};
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
line-height: 1.57;
|
|
64
|
+
color: ${e.colors.text};
|
|
65
|
+
text-align: left;
|
|
66
|
+
`,Ee=o.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 12px;
|
|
70
|
+
`,Me=o.div`
|
|
71
|
+
flex: none;
|
|
72
|
+
display: grid;
|
|
73
|
+
place-items: center;
|
|
74
|
+
width: 56px;
|
|
75
|
+
height: 56px;
|
|
76
|
+
border-radius: 12px;
|
|
77
|
+
background: ${e.colors.media};
|
|
78
|
+
border: 1px solid ${e.colors.gray4};
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
|
|
81
|
+
img {
|
|
82
|
+
width: 48px;
|
|
83
|
+
height: 48px;
|
|
84
|
+
object-fit: contain;
|
|
85
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
86
|
+
}
|
|
87
|
+
`,Se=o.p`
|
|
88
|
+
margin: 0;
|
|
89
|
+
font-family: ${e.font.sans};
|
|
90
|
+
font-weight: 600;
|
|
91
|
+
font-size: 16px;
|
|
92
|
+
line-height: 1.4;
|
|
93
|
+
color: ${e.colors.text};
|
|
94
|
+
`,Ae=o.div`
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
gap: 10px;
|
|
98
|
+
`,Te=o.div`
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: flex-start;
|
|
101
|
+
gap: 8px;
|
|
102
|
+
`,Ne=o.label`
|
|
103
|
+
flex: 1 1 auto;
|
|
104
|
+
min-width: 0;
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: 4px;
|
|
108
|
+
`,ze=o.label`
|
|
109
|
+
flex: none;
|
|
110
|
+
width: 96px;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
gap: 4px;
|
|
114
|
+
`,R=o.span`
|
|
115
|
+
font-family: ${e.font.sans};
|
|
116
|
+
font-size: 12px;
|
|
117
|
+
color: ${e.colors.muted};
|
|
118
|
+
`,B=o.input`
|
|
119
|
+
height: 42px;
|
|
120
|
+
padding: 0 10px;
|
|
121
|
+
border: 0.5px solid ${e.colors.text};
|
|
122
|
+
border-radius: 8px;
|
|
123
|
+
background: ${e.colors.white};
|
|
124
|
+
font-family: ${e.font.sans};
|
|
125
|
+
font-size: 13px;
|
|
126
|
+
color: ${e.colors.text};
|
|
127
|
+
outline: none;
|
|
128
|
+
|
|
129
|
+
&::placeholder {
|
|
130
|
+
color: ${e.colors.muted2};
|
|
131
|
+
}
|
|
132
|
+
&:focus {
|
|
133
|
+
border-color: ${e.colors.magenta};
|
|
134
|
+
}
|
|
135
|
+
&[aria-invalid='true'] {
|
|
136
|
+
border-color: ${e.colors.err};
|
|
137
|
+
}
|
|
138
|
+
/* Strip the number spinners on the amount input. */
|
|
139
|
+
&::-webkit-outer-spin-button,
|
|
140
|
+
&::-webkit-inner-spin-button {
|
|
141
|
+
-webkit-appearance: none;
|
|
142
|
+
margin: 0;
|
|
143
|
+
}
|
|
144
|
+
&[type='number'] {
|
|
145
|
+
-moz-appearance: textfield;
|
|
146
|
+
appearance: textfield;
|
|
147
|
+
}
|
|
148
|
+
`,_e=o.button`
|
|
149
|
+
flex: none;
|
|
150
|
+
margin-top: 22px;
|
|
151
|
+
display: grid;
|
|
152
|
+
place-items: center;
|
|
153
|
+
width: 42px;
|
|
154
|
+
height: 42px;
|
|
155
|
+
border: 0.5px solid ${e.colors.gray4};
|
|
156
|
+
border-radius: 8px;
|
|
157
|
+
background: ${e.colors.white};
|
|
158
|
+
color: ${e.colors.muted};
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
|
|
161
|
+
.ico {
|
|
162
|
+
width: 16px;
|
|
163
|
+
height: 16px;
|
|
164
|
+
}
|
|
165
|
+
&:hover:not(:disabled) {
|
|
166
|
+
color: ${e.colors.err};
|
|
167
|
+
border-color: ${e.colors.err};
|
|
168
|
+
}
|
|
169
|
+
&:disabled {
|
|
170
|
+
opacity: 0.35;
|
|
171
|
+
cursor: default;
|
|
172
|
+
}
|
|
173
|
+
&:focus-visible {
|
|
174
|
+
outline: 2px solid ${e.colors.accent};
|
|
175
|
+
outline-offset: 2px;
|
|
176
|
+
}
|
|
177
|
+
`,Re=o.button`
|
|
178
|
+
align-self: flex-start;
|
|
179
|
+
display: inline-flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
gap: 6px;
|
|
182
|
+
border: 0;
|
|
183
|
+
background: none;
|
|
184
|
+
padding: 0;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
font-family: ${e.font.sans};
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
font-size: 13px;
|
|
189
|
+
color: ${e.colors.accent};
|
|
190
|
+
|
|
191
|
+
.ico {
|
|
192
|
+
width: 16px;
|
|
193
|
+
height: 16px;
|
|
194
|
+
}
|
|
195
|
+
&:disabled {
|
|
196
|
+
opacity: 0.4;
|
|
197
|
+
cursor: default;
|
|
198
|
+
}
|
|
199
|
+
&:focus-visible {
|
|
200
|
+
outline: 2px solid ${e.colors.accent};
|
|
201
|
+
outline-offset: 2px;
|
|
202
|
+
}
|
|
203
|
+
`,Be=o.p`
|
|
204
|
+
margin: 0;
|
|
205
|
+
font-family: ${e.font.sans};
|
|
206
|
+
font-size: 13px;
|
|
207
|
+
line-height: 1.5;
|
|
208
|
+
color: ${t=>t.over?e.colors.err:e.colors.text};
|
|
209
|
+
|
|
210
|
+
strong {
|
|
211
|
+
font-weight: 700;
|
|
212
|
+
}
|
|
213
|
+
`,Fe=o.p`
|
|
214
|
+
margin: 0;
|
|
215
|
+
font-family: ${e.font.sans};
|
|
216
|
+
font-size: 12px;
|
|
217
|
+
line-height: 1.5;
|
|
218
|
+
color: ${e.colors.muted};
|
|
219
|
+
`;o.p`
|
|
220
|
+
margin: 0;
|
|
221
|
+
font-family: ${e.font.sans};
|
|
222
|
+
font-size: 13px;
|
|
223
|
+
color: ${e.colors.muted};
|
|
224
|
+
text-align: center;
|
|
225
|
+
`;const De=o.p`
|
|
226
|
+
margin: 0;
|
|
227
|
+
font-family: ${e.font.sans};
|
|
228
|
+
font-size: 11px;
|
|
229
|
+
color: ${e.colors.err};
|
|
230
|
+
`,F=o.div`
|
|
231
|
+
display: flex;
|
|
232
|
+
gap: 12px;
|
|
233
|
+
|
|
234
|
+
${e.media.maxWidth("mobile")} {
|
|
235
|
+
flex-direction: column-reverse;
|
|
236
|
+
}
|
|
237
|
+
`,Le=o.button`
|
|
238
|
+
flex: 1 1 0;
|
|
239
|
+
height: 48px;
|
|
240
|
+
border: 2px solid ${e.colors.accent};
|
|
241
|
+
border-radius: 12px;
|
|
242
|
+
background: transparent;
|
|
243
|
+
color: ${e.colors.accent};
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
font-family: ${e.font.sans};
|
|
246
|
+
font-weight: 600;
|
|
247
|
+
font-size: 13px;
|
|
248
|
+
line-height: 24px;
|
|
249
|
+
letter-spacing: 0.46px;
|
|
250
|
+
text-transform: uppercase;
|
|
251
|
+
|
|
252
|
+
&:hover:not(:disabled) {
|
|
253
|
+
background: rgba(105, 31, 169, 0.06);
|
|
254
|
+
}
|
|
255
|
+
&:disabled {
|
|
256
|
+
opacity: 0.5;
|
|
257
|
+
cursor: not-allowed;
|
|
258
|
+
}
|
|
259
|
+
&:focus-visible {
|
|
260
|
+
outline: 2px solid ${e.colors.accent};
|
|
261
|
+
outline-offset: 2px;
|
|
262
|
+
}
|
|
263
|
+
`,D=o.button`
|
|
264
|
+
flex: 1 1 0;
|
|
265
|
+
height: 48px;
|
|
266
|
+
border: 0;
|
|
267
|
+
border-radius: 12px;
|
|
268
|
+
cursor: pointer;
|
|
269
|
+
background: ${e.colors.accent};
|
|
270
|
+
color: ${e.colors.white};
|
|
271
|
+
font-family: ${e.font.sans};
|
|
272
|
+
font-weight: 600;
|
|
273
|
+
font-size: 13px;
|
|
274
|
+
line-height: 24px;
|
|
275
|
+
letter-spacing: 0.46px;
|
|
276
|
+
text-transform: uppercase;
|
|
277
|
+
|
|
278
|
+
&:hover:not(:disabled) {
|
|
279
|
+
background: ${e.colors.accentHover};
|
|
280
|
+
}
|
|
281
|
+
&:focus-visible {
|
|
282
|
+
outline: 2px solid ${e.colors.accent};
|
|
283
|
+
outline-offset: 2px;
|
|
284
|
+
}
|
|
285
|
+
&:disabled {
|
|
286
|
+
cursor: not-allowed;
|
|
287
|
+
background: rgba(105, 31, 169, 0.2);
|
|
288
|
+
color: ${e.colors.white};
|
|
289
|
+
}
|
|
290
|
+
`,Pe=o.div`
|
|
291
|
+
display: flex;
|
|
292
|
+
flex-direction: column;
|
|
293
|
+
align-items: center;
|
|
294
|
+
gap: 16px;
|
|
295
|
+
padding: 24px 16px;
|
|
296
|
+
border-radius: 16px;
|
|
297
|
+
background: rgba(193, 238, 207, 0.5);
|
|
298
|
+
text-align: center;
|
|
299
|
+
`,He=o.div`
|
|
300
|
+
display: grid;
|
|
301
|
+
place-items: center;
|
|
302
|
+
width: 64px;
|
|
303
|
+
height: 64px;
|
|
304
|
+
border-radius: 50%;
|
|
305
|
+
background: ${e.colors.ok};
|
|
306
|
+
color: ${e.colors.white};
|
|
307
|
+
|
|
308
|
+
.ico {
|
|
309
|
+
width: 34px;
|
|
310
|
+
height: 34px;
|
|
311
|
+
}
|
|
312
|
+
`,Oe=o.p`
|
|
313
|
+
margin: 0;
|
|
314
|
+
font-family: ${e.font.sans};
|
|
315
|
+
font-size: 20px;
|
|
316
|
+
line-height: 1.334;
|
|
317
|
+
color: ${e.colors.text2};
|
|
318
|
+
|
|
319
|
+
b {
|
|
320
|
+
font-weight: 700;
|
|
321
|
+
}
|
|
322
|
+
`;function Ue(t){return t.map(a=>({address:a.address,amount:Number(a.amount)}))}function Ze({item:t,session:a,onClose:i,onIssued:d,initialRecipients:l}){const x=ee(),[p,f]=y.useState(()=>l!=null&&l.length?l.map(n=>({address:n,amount:"1"})):[{address:"",amount:"1"}]),[c,w]=y.useState(!1),[v,m]=y.useState(null),[E,q]=y.useState(null),M=y.useRef(null),V=xe(a),$=Ue(p),h=O($),S=ge($,t.available),A=U(t.available),T=h>A;y.useEffect(()=>{var u;(u=M.current)==null||u.focus();function n(g){g.key==="Escape"&&!c&&i()}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[c,i]);function N(n,u){f(g=>g.map((b,j)=>j===n?{...b,...u}:b))}function K(){f(n=>[...n,{address:"",amount:"1"}])}function Q(n){f(u=>u.length<=1?u:u.filter((g,b)=>b!==n))}async function G(){if(!(!S||c)){m(null),w(!0);try{await we({signer:a.signer,contractAddress:t.contractAddress,chainId:t.chainId,entries:$,itemId:t.itemId}),z("Shop Issued Item",{contract_address:t.contractAddress,item_id:t.itemId,recipients:$.filter(n=>n.address.trim().length>0).length,copies:h}),q(h),se.success(r("issue.toastSuccess",{count:h,name:t.name})),x.invalidateQueries({queryKey:["publishable-item"]}),x.invalidateQueries({queryKey:["publishable-items"]}),d==null||d()}catch(n){_(n)||te(n,{flow:"issue-item",itemId:t.itemId}),z("Shop Issue Failed",{error_code:oe(n)}),m(_(n)?r("getCredits.errorCanceled"):me(n,r("issue.errorGeneric")))}finally{w(!1)}}}const W=c?V?r("issue.issuing"):r("issue.confirm"):h>0?r("issue.issueCount",{count:h}):r("issue.issue");return s.jsx(ve,{onClick:c?void 0:i,role:"presentation",children:s.jsxs($e,{ref:M,tabIndex:-1,"data-testid":"issue-modal",onClick:n=>n.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":r("issue.title"),children:[s.jsxs(je,{children:[s.jsx(ke,{children:r("issue.title")}),s.jsx(Ie,{onClick:i,disabled:c,"aria-label":r("sellModal.cancel"),children:s.jsx(k,{name:"close",className:"ico"})})]}),E!==null?s.jsxs(s.Fragment,{children:[s.jsxs(Pe,{children:[s.jsx(He,{"aria-hidden":!0,children:s.jsx(k,{name:"check",className:"ico"})}),s.jsx(Oe,{children:r("issue.successBody",{count:E,name:t.name})})]}),s.jsx(F,{children:s.jsx(D,{onClick:i,children:r("getCredits.done")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(Ee,{children:[s.jsx(Me,{children:t.thumbnail?s.jsx("img",{src:t.thumbnail,alt:""}):null}),s.jsx(Se,{children:t.name})]}),s.jsx(Ce,{children:r("issue.subtitle")}),s.jsx(Ae,{children:p.map((n,u)=>{const g=n.address.trim(),b=g.length>0&&!H(g),j=Number(n.amount),X=n.amount.length>0&&(!Number.isInteger(j)||j<1);return s.jsxs(Te,{children:[s.jsxs(Ne,{children:[s.jsx(R,{children:r("issue.addressLabel")}),s.jsx(B,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:n.address,onChange:I=>N(u,{address:I.target.value}),disabled:c,"aria-invalid":b,"aria-label":r("issue.addressLabel")}),b?s.jsx(De,{children:r("issue.invalidAddress")}):null]}),s.jsxs(ze,{children:[s.jsx(R,{children:r("issue.amountLabel")}),s.jsx(B,{type:"number",min:"1",step:"1",inputMode:"numeric",value:n.amount,onChange:I=>N(u,{amount:I.target.value}),disabled:c,"aria-invalid":X,"aria-label":r("issue.amountLabel")})]}),s.jsx(_e,{onClick:()=>Q(u),disabled:c||p.length<=1,"aria-label":r("issue.removeRow"),children:s.jsx(k,{name:"close",className:"ico"})})]},u)})}),s.jsxs(Re,{onClick:K,disabled:c,children:[s.jsx(k,{name:"plus",className:"ico"}),r("issue.addRow")]}),s.jsxs(Be,{over:T,"aria-live":"polite",children:[s.jsx("strong",{children:h})," / ",A," ",r("issue.itemsToIssue")]}),T?s.jsx(Fe,{children:t.available>C?r("issue.overBatch",{max:C}):r("issue.overCap",{available:t.available})}):null,s.jsx(he,{message:v}),s.jsxs(F,{children:[s.jsx(Le,{onClick:i,disabled:c,children:r("sellModal.cancel")}),s.jsx(D,{onClick:()=>void G(),disabled:!S||c,children:W})]})]})]})})}export{F as A,$e as C,je as H,Ze as I,C as M,Fe as N,Le as O,D as P,ve as S,ke as T,Ie as a,Ce as b};
|
|
323
|
+
//# sourceMappingURL=IssueModal-DfxiUimT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,b as st,r as c,L as Ba,e as Hi,a as _a}from"./react-4P5sGbEq.js";import{bi as Gt,c as nt,x as rt,bm as Wa,bn as Ui,X as ft,t as n,bx as Qi,by as Vi,V as et,O as Z,Z as Se,bE as be,bF as Tn,l as ue,bD as cn,bC as Da,i as Gi,C as We,au as Yi,F as _n,d as Ji,E as ht,bl as Zi,G as Xi,bz as es,bA as ts,dh as ns,di as rs,dj as as,dk as is,w as ie,bk as ss,s as r,a,a6 as Yt,aH as Jt,bO as Wn,aI as tt,I as L,z as Pe,p as qa,Y as Zt,c8 as Oa,H as Ue,av as ge,dl as os,n as mt,bd as un,ad as Ka,dm as Mr,cY as ls,f as Ha,be as ds,bf as cs,dn as us,c7 as ps,dp as hs,bS as xs,dq as fs,dr as ms,k as gs,aj as St,b1 as bs,ds as ys,a9 as ws,dt as vs,b3 as js,du as ks,P as Ua,a0 as Qa,dv as Va,dw as $s,dx as Cs,bb as Ga,dy as Is,bT as Ss,dz as As,dA as Ms,dB as Ps,ca as Ls,A as Rs,dC as pn,$ as Fs,bp as Ts,bq as Es,y as zs,m as Ns,dD as Bs,dE as _s,dF as Ws,dG as Ds,dH as qs,aw as Os,ax as Ks,dI as Hs,B as Us,dJ as Qs,aA as Pr,az as Lr,dK as Vs,dL as Gs,a3 as Ys,bw as Js,dM as Rr,dN as Zs,dO as Xs,dP as eo,dQ as to,dR as no,dS as ro,dT as ao,dU as io}from"./index-BJQicl8s.js";import{d as Ae}from"./dcl-schemas-CIgtuOoU.js";import{p as so,e as Fr,i as oo,A as Ya,C as lo,b as co,f as uo,g as po,h as ho,j as xo,m as fo,u as mo,t as go,k as bo,a as yo,s as wo}from"./CollectionCarousel-Dg2NBx67.js";import{d as Tr,t as vo,e as Er,G as jo,c as ko}from"./buy-DY-mMt7w.js";import{c as $o,i as Dn,D as Co,a as Io,S as So,b as Ao,f as Mo}from"./SaleCountdown-D75asuMy.js";import{u as Po,M as Lo,o as Ro,f as Fo,b as To,l as Ja,c as Eo}from"./loader-logo-B2Di-_Ze.js";import{w as zr,M as zo,S as No,C as Bo,H as _o,a as Wo,T as Do,X as qo,B as Oo,b as Ko,c as Ho,d as Uo,e as Xe,f as Qo,g as Vo,h as Go,i as ut,j as qe,W as _t,m as Wt,n as Dt,o as Yo,v as Jo,L as Za,P as Xa,k as ei,l as ti,E as Zo,F as Xo,G as Nr,A as el,p as tl,q as nl,r as rl,s as al,t as il,u as sl,I as Br}from"./CreditPackPicker-Cksr3kzu.js";import{P as ol}from"./PaymentMethodStep-hPpJP-Wl.js";import{m as ll}from"./mana-matic-light-Bl5duieC.js";import{q as ni,g as ri,t as dl,s as cl,a as _r,b as ul,d as pl,i as hl,e as xl,c as fl}from"./trade-encoding-DcVwVU4D.js";import{J as ml,p as gl}from"./ethers-B_gMX7bu.js";import{a as bl,w as ai,S as ii,G as si,c as yl}from"./buy-gasless-BLW3WNLa.js";import{R as Wr}from"./resume-buy-PRghislR.js";import{a as wl,f as at,i as Vt}from"./errors-CGpVjZew.js";import{C as vl}from"./Confetti-DF67ec9x.js";import{b as jl,J as kl,a as $l}from"./jump-BKgEW1Uq.js";import{p as oi}from"./import-C7TsYQy9.js";import{E as it}from"./ErrorNotice-YylntVIF.js";import{L as Dr,M as Cl,B as Il,H as Sl,T as Al,A as Ml}from"./modal.styles-DKyrrEDx.js";import{S as Pl}from"./Spinner-BvrhyD7L.js";import{I as Ll}from"./IssueModal-CdyJ5U3J.js";import{E as Rl}from"./EmotePlaybackBar-CdhQyQNk.js";import{d as Fl}from"./disposePreview-DmN3QW2F.js";import{T as qt}from"./Tooltip-2to0FtD5.js";import{c as Tl}from"./crumbs.styles-DNbofwyV.js";import"./sentry-BhkK6fEK.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-B2oQ5eKD.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="8ecf0a84-8df3-49a5-aa7c-dd97ecd73a4b",t._sentryDebugIdIdentifier="sentry-dbid-8ecf0a84-8df3-49a5-aa7c-dd97ecd73a4b")}catch{}})();const li=216n,El=(1n<<li)-1n;function zl(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>li).toString(),issuedId:(s&El).toString()}}function Nl(t){if(!t)return null;try{return zl(t).itemId}catch{return null}}const di=["cancelled-listings"];function Bl(t,s){s&&t.setQueryData(di,d=>d!=null&&d.includes(s)?d:[...d??[],s])}function qr(t,s){var d;if(s)return(d=t.getQueryData(di))!=null&&d.includes(s)?void 0:s}function Or(t,s){return s.kind==="listed"?{...t,isOnSale:!0,listingPrice:s.priceCredits,tradeId:s.tradeId??t.tradeId}:{...t,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function hn(t,s,d){const{address:o,contractAddress:l,tokenId:p}=s;if(!l||!p)return;const x=`${l}-${p}`;t.cancelQueries({queryKey:["owned-token",l,p]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const v=d.kind==="gone";t.setQueriesData({queryKey:["owned-token",l,p]},$=>$&&(v?null:Or($,d)));const g=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:g},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(v){const j=h.items.filter(b=>!(b.contractAddress===l&&b.tokenId===p));return{...h,items:j,total:Math.max(0,h.total-(h.items.length-j.length))}}return{...h,items:h.items.map(j=>j.contractAddress===l&&j.tokenId===p?Or(j,d):j)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var j;if(!$)return $;const h={...$};return d.kind==="removed"||d.kind==="gone"?delete h[x]:h[x]={priceCredits:d.priceCredits,tradeId:d.tradeId??((j=h[x])==null?void 0:j.tradeId)??""},h})}function _l(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}function ci(){const t=new Map,s=new Set,d=new Set,o=new Set;return{submitStarted:l=>{o.add(l)},submitFinished:l=>{o.delete(l)},broadcast:(l,p)=>{const x=t.get(l);x?x.add(p):t.set(l,new Set([p]))},reverted:l=>{s.add(l)},unobservable:l=>{d.add(l)},isInFlight:l=>o.has(l),mayBeConsumed:l=>{if(d.has(l))return!0;const p=t.get(l);if(!p)return!1;for(const x of p)if(!s.has(x))return!0;return!1}}}const Wl=gl("0.05");async function Dl(t){try{return(await new ml(nt.rpcUrl).getBalance(t)).gte(Wl)}catch{return!1}}async function ql(t,s){return Gt(t)?Dl(s):!1}function Ol({size:t=64,...s}){return e.jsxs("svg",{viewBox:"0 0 64 64",width:t,height:t,"aria-hidden":!0,...s,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Kl=t=>ts(t.contractAddress,String(t.itemId));async function Kr(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return ns(await rs(t.trade),t.coupon)}catch(d){return s.reportFailure!==!1&&ue(d,{flow:"buy",step:"mana_price"}),null}}function Hr(t){return t.kind==="trade"?t.trade.id:void 0}function Ur(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function En({item:t,onClose:s,resume:d=!1}){const{session:o}=rt(),{data:l}=Wa(o),{data:p}=Ui(o),x=ft(),v=st();async function g(){try{return await x.fetchQuery(es())}catch{return}}async function $(){if(p!=null)return p;if(!o)return 0n;try{const w=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>is(o.address),staleTime:3e4});return le(w),w}catch{return 0n}}const h=Po().packs.slice(0,Lo),[j,b]=c.useState("loading"),[k,I]=c.useState(null),[C,A]=c.useState(null),[q,M]=c.useState(!1),[y,H]=c.useState(0),[i,K]=c.useState(""),[V,G]=c.useState(t.priceCredits),Y=Math.max(0,V-((l==null?void 0:l.credits)??0)),{packs:ne}=Ro(h,Y),[ee,xe]=c.useState(null),[pe,le]=c.useState(null),W=p??pe??0n,[E,B]=c.useState(!1),[m,re]=c.useState(null),[S,T]=c.useState(0),[z,D]=c.useState(null),[ae,ve]=c.useState(!1),J=c.useRef(null),U=c.useRef(!1),X=c.useRef(ci()),fe=(z==null?void 0:z.credits)??V,je=(l==null?void 0:l.credits)??0;c.useEffect(()=>(U.current=!1,()=>{U.current=!0}),[]);async function ke(w,P,F,R){const O=await $();if(R!=null&&R())return;const te=O>0n,_=te?await Kr(P):null;if(R!=null&&R())return;_!=null?xe(_):te&&B(!0);const De=zr({priceCents:F,priceManaWei:_??0n,balanceCents:(l==null?void 0:l.balanceCents)??0,manaBalanceWei:O}).options.some(Te=>Te.method==="mana"||Te.method==="combined"),ye=w-((l==null?void 0:l.credits)??0),Lt=h.find(Te=>Te.credits>=ye)??h[h.length-1];K(Lt.id),De||Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:w,credits_balance:(l==null?void 0:l.credits)??0,shortfall:Math.max(0,ye)}),b("nofunds")}c.useEffect(()=>{let w=!1;if(!o){b("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const P=await Fo(t,o.address,Qi,await g(),Kl,Vi);if(P.status==="own")throw new Error("You can't buy your own listing.");if(P.status==="no-price")throw new Error("price unavailable");if(P.status!=="buyable")throw new Error("not for sale");const F=To(P.line),R=P.line.usdCents,O=et(R);if(w)return;if(G(O),re(F),T(R),l!=null&&l.credits<O){await ke(O,F,R,()=>w);return}d?ot({sale:F,usdCents:R}):b("ready")}catch(P){if(w)return;Z(be(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(P)}),de(P)}})(),()=>{w=!0,J.current&&o&&(gt([J.current]),J.current=null)}},[y]),c.useEffect(()=>{const w=(z==null?void 0:z.sale)??m;if(!w||j!=="ready"&&j!=="nofunds"||W<=0n||ee!==null)return;let P=!1;return Kr(w,{reportFailure:!E}).then(F=>{P||(F!=null?xe(F):B(!0))}),()=>{P=!0}},[j,z,m,W,ee,E]);const Q=zr({priceCents:S,priceManaWei:ee??0n,balanceCents:(l==null?void 0:l.balanceCents)??0,manaBalanceWei:W});async function ot(w){const P=(z==null?void 0:z.sale)??(w==null?void 0:w.sale)??m,F=(z==null?void 0:z.usdCents)??(w==null?void 0:w.usdCents)??S;if(!o||!P||F<=0)return;b("processing"),I(null),ve(!1);let R=z;if(!R)try{const{credit:_,maxCreditedValue:he,usdCents:De}=await Tn(o.identity,F,Hr(P),Ur(t));if(U.current){Le([_.id]);return}J.current=_.id,x.invalidateQueries({queryKey:["usd-balance"]});const ye=et(De);if(R={sale:P,credit:_,maxCreditedValue:he,usdCents:De,credits:ye},D(R),ye!==et(F)){G(ye),T(De),ve(!0),b("ready");return}}catch(_){if(wl(_)){x.invalidateQueries({queryKey:["usd-balance"]}),await ke(et(F),P,F);return}be(_)||ue(_,{flow:"buy",step:"authorize"}),Z(be(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(_)}),I(at(_,n("buyModal.error.generic"),{sale:!0})),b("error");return}if(!R)return;let O=!1,te;try{const _={purchase:so(R.sale,[R.credit],R.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:he})=>X.current.broadcast(R.credit.id,he),onReverted:({txHash:he})=>{he&&X.current.reverted(he)}};if(X.current.submitStarted(R.credit.id),ni())try{te=await bl(_),X.current.broadcast(R.credit.id,te),await ai(te),O=!0}catch(he){if(he instanceof ii)O=!0;else if(he instanceof si){if(he.reason==="relayer-unreachable")throw X.current.unobservable(R.credit.id),he;if(!Gt(o.providerType))throw he;te=await Tr(_)}else throw te&&X.current.reverted(te),he}else te=await Tr(_)}catch(_){X.current.submitFinished(R.credit.id),be(_)||ue(_,{flow:"buy",step:"submit",gasless:O}),$e([R.credit.id]),J.current=null,Z(be(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(_)}),x.invalidateQueries({queryKey:["usd-balance"]}),de(_);return}X.current.submitFinished(R.credit.id),J.current=null;try{Fr(t.coupon),oo(x,t),Z("Shop Completed Purchase",{...cn([t]),payment_type:"credits",no_crypto_step:O,transaction_hash:te??null})}catch(_){ue(_,{flow:"buy",step:"post_purchase"})}b("complete")}function Le(w){if(!o||w.length===0)return Promise.resolve(!1);const P=w.filter(F=>!X.current.mayBeConsumed(F));return P.length===0?Promise.resolve(!1):Da(o.identity,P).then(()=>!0,()=>!0)}function $e(w){M(!0),Le(w).then(P=>{P||M(!1)})}function gt(w){return Le(w.filter(P=>!X.current.isInFlight(P)))}function At(){Fr(t.coupon),x.invalidateQueries({queryKey:["mana-balance"]}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["detail-trade"]}),x.invalidateQueries({queryKey:["shop-item"]}),x.invalidateQueries({queryKey:["owned-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["public-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),x.invalidateQueries({queryKey:["shop-items"]}),x.invalidateQueries({queryKey:["catalog-items"]}),x.invalidateQueries({queryKey:["my-assets"]}),x.invalidateQueries({queryKey:["purchases"]}),x.invalidateQueries({queryKey:["owned-item-count"]}),x.invalidateQueries({queryKey:["overview-listings"]}),x.invalidateQueries({queryKey:["upsell-listings"]})}async function tn(){var P;const w=(z==null?void 0:z.sale)??m;if(!(!o||!w)){J.current&&($e([J.current]),J.current=null),b("processing"),I(null);try{const F=(P=Br(Q,"mana"))==null?void 0:P.manaWei,R=w.kind==="trade"?await uo({trade:w.trade,coupon:w.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await po({mint:w.mint,buyer:o.address,signer:o.signer,manaWei:F});Z("Shop Completed Purchase",{...cn([t]),payment_type:"mana",transaction_hash:R??null}),At(),b("complete")}catch(F){be(F)||ue(F,{flow:"buy_mana",step:"submit"}),Z(be(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(F)}),de(F)}}}async function Mt(){const w=(z==null?void 0:z.sale)??m,P=Br(Q,"combined");if(!o||!w||!P)return;b("processing"),I(null),J.current&&(await Le([J.current])&&M(!0),J.current=null);let F=null,R;try{const{credit:O}=await Tn(o.identity,P.creditsCents,Hr(w),Ur(t));F=O.id,X.current.submitStarted(O.id);const te={buyer:o.address,signer:o.signer,credits:[O],manaGapWei:P.manaWei,providerType:o.providerType,onBroadcast:({txHash:_})=>X.current.broadcast(O.id,_),onReverted:({txHash:_})=>{_&&X.current.reverted(_)},onUnobservable:()=>X.current.unobservable(O.id)};R=w.kind==="trade"?await ho({trade:w.trade,coupon:w.coupon,...te}):await xo({mint:w.mint,...te})}catch(O){F&&X.current.submitFinished(F),F&&$e([F]),be(O)||ue(O,{flow:"buy_credits_and_mana",step:"submit"}),Z(be(O)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(O)}),x.invalidateQueries({queryKey:["usd-balance"]}),de(O);return}F&&X.current.submitFinished(F);try{At(),Z("Shop Completed Purchase",{...cn([t]),payment_type:"credits_and_mana",transaction_hash:R??null})}catch(O){ue(O,{flow:"buy_credits_and_mana",step:"post_purchase"})}b("complete")}async function bt(){if(!(!i||!o)){try{sessionStorage.setItem(Wr,JSON.stringify(t))}catch{}J.current&&(Le([J.current]),J.current=null),D(null),b("loading");try{const w=await Eo(i,{address:o.address,identity:o.identity});if(w.url){window.location.href=w.url;return}if(!w.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");v(`/credits?order=${encodeURIComponent(w.orderId)}`)}catch(w){ue(w,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Wr)}catch{}I(n("buyModal.error.creditsCheckout")),b("error")}}}const[Ce,Re]=c.useState(null);function nn(w,P){const{spender:F,chainId:R}=fo(w,P);return cl(R,F)}function de(w){if(I(at(w,n("buyModal.error.generic"),{sale:!0})),b("error"),!Gi(w)||!o)return;const P=w.required;(async()=>{if(await ql(o.providerType,o.address)){A(P);return}I(n("buyModal.error.relayDownNoRail"))})()}async function lt(w){if(o){A(null);try{await as(o.web3Provider,w)}catch(P){be(P)||ue(P,{flow:"buy",step:"switch_chain"}),A(w);return}yt()}}function Fe(w){w==="mana"?tn():w==="combined"?Mt():ot()}const Ke=c.useRef(!1);async function Ve(w){var P;if(!Ke.current){Ke.current=!0;try{const F=(z==null?void 0:z.sale)??m;if(w==="credits"||!F||!o){Fe(w);return}const R=nn(w,F),O=((P=Q.options.find(_=>_.method===w))==null?void 0:P.manaWei)??0n,te=await ri(R,o.address,O).catch(()=>!0);if(dl(o.providerType,te)){Re({auth:R,rail:w});return}Fe(w)}finally{Ke.current=!1}}}const Ie=Q.options.some(w=>w.method==="mana"||w.method==="combined"),Pt=j==="ready"&&(Ie||Q.manaShortfall!=null)||j==="nofunds"&&Ie;function yt(){I(null),D(null),ve(!1),M(!1),b("loading"),H(w=>w+1)}const wt=j==="error"&&C===null&&(!!J.current||q),Ge=j==="processing",rn=j==="complete"?n("buyModal.titleComplete"):j==="error"?n("cartCheckout.errorTitle"):j==="nofunds"?n("buyModal.titleNoFunds"):n("buyModal.titleBuy");return Ce&&o?e.jsx(Ya,{auth:Ce.auth,signer:o.signer,title:n(Ce.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:n(Ce.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:n(Ce.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:ll,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:w}=Ce;Re(null),Fe(w)},onCancel:()=>Re(null),onClose:()=>{Re(null),s()}}):e.jsxs(zo,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(No,{onClick:Ge?void 0:s,"aria-hidden":!0}),e.jsx(Bo,{"data-tall":j==="processing"||j==="loading"||void 0,children:Pt?e.jsx(ol,{asset:{name:t.name,thumb:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null,caption:t.creator?e.jsx(Yi,{address:t.creator}):null},priceCredits:fe,priceCents:S,options:Q.options,priceManaWei:ee??0n,balanceCredits:je,manaBalanceWei:W,onBuy:w=>void Ve(w),onClose:s,busy:Ge,notice:ae?n("buyModal.priceChanged"):l!=null&&l.held?n("buyModal.heldExplainer",{credits:l.held.credits,currency:We.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(_o,{children:[e.jsxs(Wo,{children:[e.jsx(Do,{children:rn}),!Ge&&e.jsx(qo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(lo,{})})]}),e.jsxs(Oo,{children:[e.jsx(Ko,{children:j==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(Ho,{}),e.jsx(Uo,{children:_n(je)})]})]}),j==="loading"&&e.jsx(Xe,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),j==="error"&&e.jsxs(Xe,{children:[e.jsxs(Qo,{"data-testid":"buy-error",children:[e.jsx(Vo,{src:co,alt:"",width:64,height:80}),e.jsxs(Go,{children:[e.jsx("b",{children:n("cartCheckout.errorHeadline")})," ",k??(wt?null:n("cartCheckout.errorBody")),wt?e.jsxs(e.Fragment,{children:[k?" ":"",n("cartCheckout.heldLead",{currency:We.name}),e.jsx("b",{children:n("cartCheckout.heldBold")}),n("cartCheckout.heldTail",{currency:We.name})]}):null]})]}),C!==null?e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void lt(C),children:n("buyModal.error.switchAndRetry",{network:Ji(C)})})]}):wt?e.jsx(ut,{children:e.jsx(qe,{"data-variant":"purple","data-full":!0,onClick:s,children:n("cartCheckout.gotIt")})}):e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple",onClick:yt,children:n("cartCheckout.tryAgain")})]})]}),j==="nofunds"&&e.jsxs(Xe,{children:[E&&ee===null&&W>0n?e.jsxs(_t,{"data-testid":"mana-price-unavailable",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.manaPriceUnavailable")})]}):null,l!=null&&l.held?e.jsxs(_t,{"data-testid":"nofunds-held",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.heldExplainer",{credits:l.held.credits,currency:We.name})})]}):null,e.jsxs(_t,{children:[e.jsx(Wt,{}),e.jsxs(Dt,{children:[e.jsx("b",{children:n("buyModal.insufficientFunds")})," ",n("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:n("buyModal.warningCreditsAmount",{count:Math.max(1,fe-je)})})," ",n("buyModal.warningToPurchase",{count:1}),ht()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(Yo,{href:Zi("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Qr,{item:t,priceCredits:fe}),ht()?null:e.jsx(e.Fragment,{children:e.jsx(Jo,{packs:ne,selectedId:i||void 0,onSelect:K})}),e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),ht()?null:e.jsx(qe,{"data-variant":"gradient",onClick:()=>void bt(),children:n("buyModal.buy")})]})]}),j==="ready"&&e.jsxs(Xe,{children:[ae&&e.jsxs(_t,{"data-testid":"price-changed",role:"status",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.priceChanged")})]}),e.jsx(Qr,{item:t,priceCredits:fe}),e.jsx(ut,{children:e.jsx(qe,{"data-variant":"gradient","data-full":!0,onClick:()=>void ot(),children:n("buyModal.buy")})})]}),j==="processing"&&e.jsxs(Xe,{"data-processing":!0,children:[e.jsx(Za,{src:Ja,alt:"",width:61,height:61}),e.jsx(Xa,{children:d?n("buyModal.completingPurchase"):n("buyModal.completingTransaction")}),e.jsx(ei,{"aria-hidden":!0,children:e.jsx(ti,{})})]}),j==="complete"&&e.jsxs(Xe,{children:[e.jsx(vl,{}),e.jsxs(Zo,{children:[e.jsx(Ol,{}),e.jsxs(Xo,{children:[e.jsx("b",{children:n("getCredits.successTitle")})," ",n("buyModal.successBody")]})]}),e.jsxs(ut,{"data-stack":!0,children:[e.jsx(qe,{"data-variant":"outline",onClick:()=>v(Xi([t.category])),children:n("buyModal.myAssets")}),ht()?e.jsx(Nr,{"data-variant":"ruby",href:jl([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Nr,{"data-variant":"ruby",href:kl,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx($l,{})]})]})]})]})})]})}function Qr({item:t,priceCredits:s}){return e.jsxs(el,{children:[e.jsx(tl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(nl,{children:[e.jsxs("div",{children:[e.jsx(rl,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(al,{address:t.creator}):null]}),e.jsxs(il,{children:[e.jsx(sl,{}),e.jsx("span",{children:_n(s)})]})]})]})}function Hl(){const{data:t}=ie({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:ss,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const Ul=r.div`
|
|
1
|
+
import{j as e,b as st,r as c,L as Ba,e as Hi,a as _a}from"./react-LHIQ98KR.js";import{bi as Gt,c as nt,x as rt,bm as Wa,bn as Ui,X as ft,t as n,bx as Qi,by as Vi,V as et,O as Z,Z as Se,bE as be,bF as Tn,l as ue,bD as cn,bC as Da,i as Gi,C as We,au as Yi,F as _n,d as Ji,E as ht,bl as Zi,G as Xi,bz as es,bA as ts,dh as ns,di as rs,dj as as,dk as is,w as ie,bk as ss,s as r,a,a6 as Yt,aH as Jt,bO as Wn,aI as tt,I as L,z as Pe,p as qa,Y as Zt,c8 as Oa,H as Ue,av as ge,dl as os,n as mt,bd as un,ad as Ka,dm as Mr,cY as ls,f as Ha,be as ds,bf as cs,dn as us,c7 as ps,dp as hs,bS as xs,dq as fs,dr as ms,k as gs,aj as St,b1 as bs,ds as ys,a9 as ws,dt as vs,b3 as js,du as ks,P as Ua,a0 as Qa,dv as Va,dw as $s,dx as Cs,bb as Ga,dy as Is,bT as Ss,dz as As,dA as Ms,dB as Ps,ca as Ls,A as Rs,dC as pn,$ as Fs,bp as Ts,bq as Es,y as zs,m as Ns,dD as Bs,dE as _s,dF as Ws,dG as Ds,dH as qs,aw as Os,ax as Ks,dI as Hs,B as Us,dJ as Qs,aA as Pr,az as Lr,dK as Vs,dL as Gs,a3 as Ys,bw as Js,dM as Rr,dN as Zs,dO as Xs,dP as eo,dQ as to,dR as no,dS as ro,dT as ao,dU as io}from"./index-Bp3aHt26.js";import{d as Ae}from"./dcl-schemas-_B0Kk1dX.js";import{p as so,e as Fr,i as oo,A as Ya,C as lo,b as co,f as uo,g as po,h as ho,j as xo,m as fo,u as mo,t as go,k as bo,a as yo,s as wo}from"./CollectionCarousel-C9wq2JOZ.js";import{d as Tr,t as vo,e as Er,G as jo,c as ko}from"./buy-N92V9AyQ.js";import{c as $o,i as Dn,D as Co,a as Io,S as So,b as Ao,f as Mo}from"./SaleCountdown-CVfn_nkW.js";import{u as Po,M as Lo,o as Ro,f as Fo,b as To,l as Ja,c as Eo}from"./loader-logo-CUaLPrEf.js";import{w as zr,M as zo,S as No,C as Bo,H as _o,a as Wo,T as Do,X as qo,B as Oo,b as Ko,c as Ho,d as Uo,e as Xe,f as Qo,g as Vo,h as Go,i as ut,j as qe,W as _t,m as Wt,n as Dt,o as Yo,v as Jo,L as Za,P as Xa,k as ei,l as ti,E as Zo,F as Xo,G as Nr,A as el,p as tl,q as nl,r as rl,s as al,t as il,u as sl,I as Br}from"./CreditPackPicker-B01NLAbL.js";import{P as ol}from"./PaymentMethodStep-CCThKPFp.js";import{m as ll}from"./mana-matic-light-Bl5duieC.js";import{q as ni,g as ri,t as dl,s as cl,a as _r,b as ul,d as pl,i as hl,e as xl,c as fl}from"./trade-encoding-ckNC4fJ-.js";import{J as ml,p as gl}from"./ethers-Dp2JFZH-.js";import{a as bl,w as ai,S as ii,G as si,c as yl}from"./buy-gasless-BqyhGX44.js";import{R as Wr}from"./resume-buy-DHFmAeF4.js";import{a as wl,f as at,i as Vt}from"./errors-DADPuabe.js";import{C as vl}from"./Confetti-BI3FtvtA.js";import{b as jl,J as kl,a as $l}from"./jump-YJO6VZZT.js";import{p as oi}from"./import-PvZhp7TH.js";import{E as it}from"./ErrorNotice-BmAQfVhf.js";import{L as Dr,M as Cl,B as Il,H as Sl,T as Al,A as Ml}from"./modal.styles-C4pYkuZj.js";import{S as Pl}from"./Spinner-CsrKVEJ6.js";import{I as Ll}from"./IssueModal-DfxiUimT.js";import{E as Rl}from"./EmotePlaybackBar-DEuoLg6N.js";import{d as Fl}from"./disposePreview-VulUR7GI.js";import{T as qt}from"./Tooltip-DodLiQGn.js";import{c as Tl}from"./crumbs.styles-Cvt8wkkQ.js";import"./sentry-DfhH7M7m.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-DqCaiE1G.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="8ecf0a84-8df3-49a5-aa7c-dd97ecd73a4b",t._sentryDebugIdIdentifier="sentry-dbid-8ecf0a84-8df3-49a5-aa7c-dd97ecd73a4b")}catch{}})();const li=216n,El=(1n<<li)-1n;function zl(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>li).toString(),issuedId:(s&El).toString()}}function Nl(t){if(!t)return null;try{return zl(t).itemId}catch{return null}}const di=["cancelled-listings"];function Bl(t,s){s&&t.setQueryData(di,d=>d!=null&&d.includes(s)?d:[...d??[],s])}function qr(t,s){var d;if(s)return(d=t.getQueryData(di))!=null&&d.includes(s)?void 0:s}function Or(t,s){return s.kind==="listed"?{...t,isOnSale:!0,listingPrice:s.priceCredits,tradeId:s.tradeId??t.tradeId}:{...t,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function hn(t,s,d){const{address:o,contractAddress:l,tokenId:p}=s;if(!l||!p)return;const x=`${l}-${p}`;t.cancelQueries({queryKey:["owned-token",l,p]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const v=d.kind==="gone";t.setQueriesData({queryKey:["owned-token",l,p]},$=>$&&(v?null:Or($,d)));const g=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:g},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(v){const j=h.items.filter(b=>!(b.contractAddress===l&&b.tokenId===p));return{...h,items:j,total:Math.max(0,h.total-(h.items.length-j.length))}}return{...h,items:h.items.map(j=>j.contractAddress===l&&j.tokenId===p?Or(j,d):j)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var j;if(!$)return $;const h={...$};return d.kind==="removed"||d.kind==="gone"?delete h[x]:h[x]={priceCredits:d.priceCredits,tradeId:d.tradeId??((j=h[x])==null?void 0:j.tradeId)??""},h})}function _l(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}function ci(){const t=new Map,s=new Set,d=new Set,o=new Set;return{submitStarted:l=>{o.add(l)},submitFinished:l=>{o.delete(l)},broadcast:(l,p)=>{const x=t.get(l);x?x.add(p):t.set(l,new Set([p]))},reverted:l=>{s.add(l)},unobservable:l=>{d.add(l)},isInFlight:l=>o.has(l),mayBeConsumed:l=>{if(d.has(l))return!0;const p=t.get(l);if(!p)return!1;for(const x of p)if(!s.has(x))return!0;return!1}}}const Wl=gl("0.05");async function Dl(t){try{return(await new ml(nt.rpcUrl).getBalance(t)).gte(Wl)}catch{return!1}}async function ql(t,s){return Gt(t)?Dl(s):!1}function Ol({size:t=64,...s}){return e.jsxs("svg",{viewBox:"0 0 64 64",width:t,height:t,"aria-hidden":!0,...s,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Kl=t=>ts(t.contractAddress,String(t.itemId));async function Kr(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return ns(await rs(t.trade),t.coupon)}catch(d){return s.reportFailure!==!1&&ue(d,{flow:"buy",step:"mana_price"}),null}}function Hr(t){return t.kind==="trade"?t.trade.id:void 0}function Ur(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function En({item:t,onClose:s,resume:d=!1}){const{session:o}=rt(),{data:l}=Wa(o),{data:p}=Ui(o),x=ft(),v=st();async function g(){try{return await x.fetchQuery(es())}catch{return}}async function $(){if(p!=null)return p;if(!o)return 0n;try{const w=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>is(o.address),staleTime:3e4});return le(w),w}catch{return 0n}}const h=Po().packs.slice(0,Lo),[j,b]=c.useState("loading"),[k,I]=c.useState(null),[C,A]=c.useState(null),[q,M]=c.useState(!1),[y,H]=c.useState(0),[i,K]=c.useState(""),[V,G]=c.useState(t.priceCredits),Y=Math.max(0,V-((l==null?void 0:l.credits)??0)),{packs:ne}=Ro(h,Y),[ee,xe]=c.useState(null),[pe,le]=c.useState(null),W=p??pe??0n,[E,B]=c.useState(!1),[m,re]=c.useState(null),[S,T]=c.useState(0),[z,D]=c.useState(null),[ae,ve]=c.useState(!1),J=c.useRef(null),U=c.useRef(!1),X=c.useRef(ci()),fe=(z==null?void 0:z.credits)??V,je=(l==null?void 0:l.credits)??0;c.useEffect(()=>(U.current=!1,()=>{U.current=!0}),[]);async function ke(w,P,F,R){const O=await $();if(R!=null&&R())return;const te=O>0n,_=te?await Kr(P):null;if(R!=null&&R())return;_!=null?xe(_):te&&B(!0);const De=zr({priceCents:F,priceManaWei:_??0n,balanceCents:(l==null?void 0:l.balanceCents)??0,manaBalanceWei:O}).options.some(Te=>Te.method==="mana"||Te.method==="combined"),ye=w-((l==null?void 0:l.credits)??0),Lt=h.find(Te=>Te.credits>=ye)??h[h.length-1];K(Lt.id),De||Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:w,credits_balance:(l==null?void 0:l.credits)??0,shortfall:Math.max(0,ye)}),b("nofunds")}c.useEffect(()=>{let w=!1;if(!o){b("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const P=await Fo(t,o.address,Qi,await g(),Kl,Vi);if(P.status==="own")throw new Error("You can't buy your own listing.");if(P.status==="no-price")throw new Error("price unavailable");if(P.status!=="buyable")throw new Error("not for sale");const F=To(P.line),R=P.line.usdCents,O=et(R);if(w)return;if(G(O),re(F),T(R),l!=null&&l.credits<O){await ke(O,F,R,()=>w);return}d?ot({sale:F,usdCents:R}):b("ready")}catch(P){if(w)return;Z(be(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(P)}),de(P)}})(),()=>{w=!0,J.current&&o&&(gt([J.current]),J.current=null)}},[y]),c.useEffect(()=>{const w=(z==null?void 0:z.sale)??m;if(!w||j!=="ready"&&j!=="nofunds"||W<=0n||ee!==null)return;let P=!1;return Kr(w,{reportFailure:!E}).then(F=>{P||(F!=null?xe(F):B(!0))}),()=>{P=!0}},[j,z,m,W,ee,E]);const Q=zr({priceCents:S,priceManaWei:ee??0n,balanceCents:(l==null?void 0:l.balanceCents)??0,manaBalanceWei:W});async function ot(w){const P=(z==null?void 0:z.sale)??(w==null?void 0:w.sale)??m,F=(z==null?void 0:z.usdCents)??(w==null?void 0:w.usdCents)??S;if(!o||!P||F<=0)return;b("processing"),I(null),ve(!1);let R=z;if(!R)try{const{credit:_,maxCreditedValue:he,usdCents:De}=await Tn(o.identity,F,Hr(P),Ur(t));if(U.current){Le([_.id]);return}J.current=_.id,x.invalidateQueries({queryKey:["usd-balance"]});const ye=et(De);if(R={sale:P,credit:_,maxCreditedValue:he,usdCents:De,credits:ye},D(R),ye!==et(F)){G(ye),T(De),ve(!0),b("ready");return}}catch(_){if(wl(_)){x.invalidateQueries({queryKey:["usd-balance"]}),await ke(et(F),P,F);return}be(_)||ue(_,{flow:"buy",step:"authorize"}),Z(be(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(_)}),I(at(_,n("buyModal.error.generic"),{sale:!0})),b("error");return}if(!R)return;let O=!1,te;try{const _={purchase:so(R.sale,[R.credit],R.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:he})=>X.current.broadcast(R.credit.id,he),onReverted:({txHash:he})=>{he&&X.current.reverted(he)}};if(X.current.submitStarted(R.credit.id),ni())try{te=await bl(_),X.current.broadcast(R.credit.id,te),await ai(te),O=!0}catch(he){if(he instanceof ii)O=!0;else if(he instanceof si){if(he.reason==="relayer-unreachable")throw X.current.unobservable(R.credit.id),he;if(!Gt(o.providerType))throw he;te=await Tr(_)}else throw te&&X.current.reverted(te),he}else te=await Tr(_)}catch(_){X.current.submitFinished(R.credit.id),be(_)||ue(_,{flow:"buy",step:"submit",gasless:O}),$e([R.credit.id]),J.current=null,Z(be(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(_)}),x.invalidateQueries({queryKey:["usd-balance"]}),de(_);return}X.current.submitFinished(R.credit.id),J.current=null;try{Fr(t.coupon),oo(x,t),Z("Shop Completed Purchase",{...cn([t]),payment_type:"credits",no_crypto_step:O,transaction_hash:te??null})}catch(_){ue(_,{flow:"buy",step:"post_purchase"})}b("complete")}function Le(w){if(!o||w.length===0)return Promise.resolve(!1);const P=w.filter(F=>!X.current.mayBeConsumed(F));return P.length===0?Promise.resolve(!1):Da(o.identity,P).then(()=>!0,()=>!0)}function $e(w){M(!0),Le(w).then(P=>{P||M(!1)})}function gt(w){return Le(w.filter(P=>!X.current.isInFlight(P)))}function At(){Fr(t.coupon),x.invalidateQueries({queryKey:["mana-balance"]}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["detail-trade"]}),x.invalidateQueries({queryKey:["shop-item"]}),x.invalidateQueries({queryKey:["owned-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["public-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),x.invalidateQueries({queryKey:["shop-items"]}),x.invalidateQueries({queryKey:["catalog-items"]}),x.invalidateQueries({queryKey:["my-assets"]}),x.invalidateQueries({queryKey:["purchases"]}),x.invalidateQueries({queryKey:["owned-item-count"]}),x.invalidateQueries({queryKey:["overview-listings"]}),x.invalidateQueries({queryKey:["upsell-listings"]})}async function tn(){var P;const w=(z==null?void 0:z.sale)??m;if(!(!o||!w)){J.current&&($e([J.current]),J.current=null),b("processing"),I(null);try{const F=(P=Br(Q,"mana"))==null?void 0:P.manaWei,R=w.kind==="trade"?await uo({trade:w.trade,coupon:w.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await po({mint:w.mint,buyer:o.address,signer:o.signer,manaWei:F});Z("Shop Completed Purchase",{...cn([t]),payment_type:"mana",transaction_hash:R??null}),At(),b("complete")}catch(F){be(F)||ue(F,{flow:"buy_mana",step:"submit"}),Z(be(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(F)}),de(F)}}}async function Mt(){const w=(z==null?void 0:z.sale)??m,P=Br(Q,"combined");if(!o||!w||!P)return;b("processing"),I(null),J.current&&(await Le([J.current])&&M(!0),J.current=null);let F=null,R;try{const{credit:O}=await Tn(o.identity,P.creditsCents,Hr(w),Ur(t));F=O.id,X.current.submitStarted(O.id);const te={buyer:o.address,signer:o.signer,credits:[O],manaGapWei:P.manaWei,providerType:o.providerType,onBroadcast:({txHash:_})=>X.current.broadcast(O.id,_),onReverted:({txHash:_})=>{_&&X.current.reverted(_)},onUnobservable:()=>X.current.unobservable(O.id)};R=w.kind==="trade"?await ho({trade:w.trade,coupon:w.coupon,...te}):await xo({mint:w.mint,...te})}catch(O){F&&X.current.submitFinished(F),F&&$e([F]),be(O)||ue(O,{flow:"buy_credits_and_mana",step:"submit"}),Z(be(O)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(O)}),x.invalidateQueries({queryKey:["usd-balance"]}),de(O);return}F&&X.current.submitFinished(F);try{At(),Z("Shop Completed Purchase",{...cn([t]),payment_type:"credits_and_mana",transaction_hash:R??null})}catch(O){ue(O,{flow:"buy_credits_and_mana",step:"post_purchase"})}b("complete")}async function bt(){if(!(!i||!o)){try{sessionStorage.setItem(Wr,JSON.stringify(t))}catch{}J.current&&(Le([J.current]),J.current=null),D(null),b("loading");try{const w=await Eo(i,{address:o.address,identity:o.identity});if(w.url){window.location.href=w.url;return}if(!w.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");v(`/credits?order=${encodeURIComponent(w.orderId)}`)}catch(w){ue(w,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Wr)}catch{}I(n("buyModal.error.creditsCheckout")),b("error")}}}const[Ce,Re]=c.useState(null);function nn(w,P){const{spender:F,chainId:R}=fo(w,P);return cl(R,F)}function de(w){if(I(at(w,n("buyModal.error.generic"),{sale:!0})),b("error"),!Gi(w)||!o)return;const P=w.required;(async()=>{if(await ql(o.providerType,o.address)){A(P);return}I(n("buyModal.error.relayDownNoRail"))})()}async function lt(w){if(o){A(null);try{await as(o.web3Provider,w)}catch(P){be(P)||ue(P,{flow:"buy",step:"switch_chain"}),A(w);return}yt()}}function Fe(w){w==="mana"?tn():w==="combined"?Mt():ot()}const Ke=c.useRef(!1);async function Ve(w){var P;if(!Ke.current){Ke.current=!0;try{const F=(z==null?void 0:z.sale)??m;if(w==="credits"||!F||!o){Fe(w);return}const R=nn(w,F),O=((P=Q.options.find(_=>_.method===w))==null?void 0:P.manaWei)??0n,te=await ri(R,o.address,O).catch(()=>!0);if(dl(o.providerType,te)){Re({auth:R,rail:w});return}Fe(w)}finally{Ke.current=!1}}}const Ie=Q.options.some(w=>w.method==="mana"||w.method==="combined"),Pt=j==="ready"&&(Ie||Q.manaShortfall!=null)||j==="nofunds"&&Ie;function yt(){I(null),D(null),ve(!1),M(!1),b("loading"),H(w=>w+1)}const wt=j==="error"&&C===null&&(!!J.current||q),Ge=j==="processing",rn=j==="complete"?n("buyModal.titleComplete"):j==="error"?n("cartCheckout.errorTitle"):j==="nofunds"?n("buyModal.titleNoFunds"):n("buyModal.titleBuy");return Ce&&o?e.jsx(Ya,{auth:Ce.auth,signer:o.signer,title:n(Ce.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:n(Ce.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:n(Ce.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:ll,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:w}=Ce;Re(null),Fe(w)},onCancel:()=>Re(null),onClose:()=>{Re(null),s()}}):e.jsxs(zo,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(No,{onClick:Ge?void 0:s,"aria-hidden":!0}),e.jsx(Bo,{"data-tall":j==="processing"||j==="loading"||void 0,children:Pt?e.jsx(ol,{asset:{name:t.name,thumb:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null,caption:t.creator?e.jsx(Yi,{address:t.creator}):null},priceCredits:fe,priceCents:S,options:Q.options,priceManaWei:ee??0n,balanceCredits:je,manaBalanceWei:W,onBuy:w=>void Ve(w),onClose:s,busy:Ge,notice:ae?n("buyModal.priceChanged"):l!=null&&l.held?n("buyModal.heldExplainer",{credits:l.held.credits,currency:We.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(_o,{children:[e.jsxs(Wo,{children:[e.jsx(Do,{children:rn}),!Ge&&e.jsx(qo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(lo,{})})]}),e.jsxs(Oo,{children:[e.jsx(Ko,{children:j==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(Ho,{}),e.jsx(Uo,{children:_n(je)})]})]}),j==="loading"&&e.jsx(Xe,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),j==="error"&&e.jsxs(Xe,{children:[e.jsxs(Qo,{"data-testid":"buy-error",children:[e.jsx(Vo,{src:co,alt:"",width:64,height:80}),e.jsxs(Go,{children:[e.jsx("b",{children:n("cartCheckout.errorHeadline")})," ",k??(wt?null:n("cartCheckout.errorBody")),wt?e.jsxs(e.Fragment,{children:[k?" ":"",n("cartCheckout.heldLead",{currency:We.name}),e.jsx("b",{children:n("cartCheckout.heldBold")}),n("cartCheckout.heldTail",{currency:We.name})]}):null]})]}),C!==null?e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void lt(C),children:n("buyModal.error.switchAndRetry",{network:Ji(C)})})]}):wt?e.jsx(ut,{children:e.jsx(qe,{"data-variant":"purple","data-full":!0,onClick:s,children:n("cartCheckout.gotIt")})}):e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple",onClick:yt,children:n("cartCheckout.tryAgain")})]})]}),j==="nofunds"&&e.jsxs(Xe,{children:[E&&ee===null&&W>0n?e.jsxs(_t,{"data-testid":"mana-price-unavailable",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.manaPriceUnavailable")})]}):null,l!=null&&l.held?e.jsxs(_t,{"data-testid":"nofunds-held",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.heldExplainer",{credits:l.held.credits,currency:We.name})})]}):null,e.jsxs(_t,{children:[e.jsx(Wt,{}),e.jsxs(Dt,{children:[e.jsx("b",{children:n("buyModal.insufficientFunds")})," ",n("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:n("buyModal.warningCreditsAmount",{count:Math.max(1,fe-je)})})," ",n("buyModal.warningToPurchase",{count:1}),ht()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(Yo,{href:Zi("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Qr,{item:t,priceCredits:fe}),ht()?null:e.jsx(e.Fragment,{children:e.jsx(Jo,{packs:ne,selectedId:i||void 0,onSelect:K})}),e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),ht()?null:e.jsx(qe,{"data-variant":"gradient",onClick:()=>void bt(),children:n("buyModal.buy")})]})]}),j==="ready"&&e.jsxs(Xe,{children:[ae&&e.jsxs(_t,{"data-testid":"price-changed",role:"status",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.priceChanged")})]}),e.jsx(Qr,{item:t,priceCredits:fe}),e.jsx(ut,{children:e.jsx(qe,{"data-variant":"gradient","data-full":!0,onClick:()=>void ot(),children:n("buyModal.buy")})})]}),j==="processing"&&e.jsxs(Xe,{"data-processing":!0,children:[e.jsx(Za,{src:Ja,alt:"",width:61,height:61}),e.jsx(Xa,{children:d?n("buyModal.completingPurchase"):n("buyModal.completingTransaction")}),e.jsx(ei,{"aria-hidden":!0,children:e.jsx(ti,{})})]}),j==="complete"&&e.jsxs(Xe,{children:[e.jsx(vl,{}),e.jsxs(Zo,{children:[e.jsx(Ol,{}),e.jsxs(Xo,{children:[e.jsx("b",{children:n("getCredits.successTitle")})," ",n("buyModal.successBody")]})]}),e.jsxs(ut,{"data-stack":!0,children:[e.jsx(qe,{"data-variant":"outline",onClick:()=>v(Xi([t.category])),children:n("buyModal.myAssets")}),ht()?e.jsx(Nr,{"data-variant":"ruby",href:jl([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Nr,{"data-variant":"ruby",href:kl,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx($l,{})]})]})]})]})})]})}function Qr({item:t,priceCredits:s}){return e.jsxs(el,{children:[e.jsx(tl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(nl,{children:[e.jsxs("div",{children:[e.jsx(rl,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(al,{address:t.creator}):null]}),e.jsxs(il,{children:[e.jsx(sl,{}),e.jsx("span",{children:_n(s)})]})]})]})}function Hl(){const{data:t}=ie({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:ss,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const Ul=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: 16px;
|
|
@@ -3087,4 +3087,4 @@ import{j as e,b as st,r as c,L as Ba,e as Hi,a as _a}from"./react-4P5sGbEq.js";i
|
|
|
3087
3087
|
height: 16px;
|
|
3088
3088
|
border-radius: 6px;
|
|
3089
3089
|
`;function sh(t){return Object.values(Ae.Rarity).includes(t)}function oh(t){return t==="male"?n("itemDetail.genderMale"):t==="female"?n("itemDetail.genderFemale"):t==="unisex"?n("itemDetail.genderUnisex"):null}function Qt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?n("itemDetail.categoryEmote"):n("itemDetail.categoryWearable")}const Na=8;function Wh(){const{pathname:t}=_a();return e.jsx(lh,{},t)}function lh(){var Ir,Sr,Ar;const{contractAddress:t,itemId:s,tokenId:d}=Hi(),o=pn(t),l=Fc(o),p=pn(s),x=pn(d),v=!!x,g=p??Nl(x)??null,$=_a(),h=$.state,j=st(),b=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=ft(),C=St(u=>u.add),A=mo(u=>u.spent),q=St(u=>u.items),M=Fs(u=>u.toggle),{session:y,signIn:H}=rt(),[i,K]=c.useState(()=>{if(h!=null&&h.item){const u={...h.item,tradeId:h.tradeId??h.item.tradeId};return v?{...u,tokenId:x,itemId:u.itemId??g}:{...u,tokenId:void 0,itemId:p??u.itemId}}return{id:`${o}-${x??p}`,name:"",creator:"",contractAddress:o??"",itemId:g,category:"wearable",rarity:"common",network:"MATIC",chainId:nt.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[V,G]=c.useState(!1),[Y,ne]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&G(!0)},[h==null?void 0:h.resumeBuy]);function ee(){const u=i.priceCredits>0?i.priceCredits:null;Z("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:u,cart_value_usd:u===null?null:Js(u)}),G(!0)}function xe(){if(y){ee();return}b||wo({type:"item-buy",path:$.pathname}),H()}const pe=c.useRef(!1);c.useEffect(()=>{if(!y||pe.current)return;const u=go("item-buy");!u||u.path!==$.pathname||(pe.current=!0,ne(!0),ee())},[y]);const le=c.useMemo(()=>i.contractAddress&&(i.itemId??g)?[`${i.contractAddress.toLowerCase()}-${i.itemId??g}`]:void 0,[i.contractAddress,i.itemId,g]),W=Ts(Na,{exclude:le}),E=Es({enabled:W.enabled,hasSignal:W.hasSignal,isLoading:W.isLoading,isError:W.isError,personalized:(Ir=W.result)==null?void 0:Ir.personalized,rowCount:((Sr=W.result)==null?void 0:Sr.data.length)??0}),{items:B,isCollectionOnly:m,siblings:re,siblingsFetched:S}=Rc({id:i.id,contractAddress:i.contractAddress,itemId:i.itemId??g,tokenId:i.tokenId,creator:i.creator}),{data:T,isLoading:z}=ie({queryKey:["shop-item",i.contractAddress,g],enabled:!b&&!v&&!!i.contractAddress&&!!g,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Xs(i.contractAddress,g)}),D=v?void 0:T;c.useEffect(()=>{D&&K(u=>u.tradeId?{...u,tradeId:D.tradeId,priceCredits:D.priceCredits,manaWei:D.manaWei,available:D.available??u.available,acquisition:D.acquisition,wearableCategory:u.wearableCategory??D.wearableCategory}:{...u,...D})},[D]);const[ae,ve]=c.useState(!1),{data:J=""}=ie({queryKey:["item-desc",i.contractAddress,i.itemId],enabled:!!i.contractAddress&&!!i.itemId,staleTime:5*6e4,queryFn:()=>eo(i.contractAddress,i.itemId)}),{data:U,isLoading:X}=ie({queryKey:["collection-meta",i.contractAddress],enabled:!!i.contractAddress,staleTime:5*6e4,queryFn:()=>Oa(i.contractAddress)});c.useEffect(()=>{const u=(D==null?void 0:D.creator)||(U==null?void 0:U.creator);u&&K(se=>se.creator?se:{...se,creator:u})},[D,U]);const fe=c.useMemo(()=>{if(!(v||i.name||D||re.length===0))return(g?re.find(u=>u.itemId===g):void 0)??re.find(u=>u.contractAddress===i.contractAddress)},[v,i.name,i.contractAddress,D,re,g]);c.useEffect(()=>{fe&&K(u=>({...fe,tradeId:u.tradeId??fe.tradeId}))},[fe]);const{data:je,isLoading:ke}=ie({queryKey:["detail-trade",i.id,i.tradeId,i.contractAddress,i.itemId],enabled:!!i.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(i.tradeId)return i.tradeId;if(!v&&i.itemId){const u=await to(i.contractAddress,i.itemId);return(u==null?void 0:u.id)??null}return null}}),{data:Q}=ie({queryKey:["item-traits",i.contractAddress,g],enabled:!!i.contractAddress&&!!g,staleTime:5*6e4,retry:1,queryFn:()=>no(i.contractAddress,g)}),ot=(Q==null?void 0:Q.isSmart)??i.isSmart,Le=(Q==null?void 0:Q.utility)??null,$e=c.useMemo(()=>({...i,wearableCategory:i.wearableCategory??(Q==null?void 0:Q.wearableCategory)??void 0,gender:i.gender??(Q==null?void 0:Q.gender)??null}),[i,Q==null?void 0:Q.wearableCategory,Q==null?void 0:Q.gender]),gt=(Q==null?void 0:Q.urn)??null,{data:At}=ie({queryKey:["item-vrm",gt],enabled:!!gt&&i.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>ro(gt)}),[tn,Mt]=c.useState(!1),{data:bt}=ie({queryKey:["item-video",i.contractAddress,g],enabled:ot&&!!i.contractAddress&&!!g,staleTime:30*6e4,retry:!1,queryFn:()=>Ao(i.contractAddress,g)}),Ce=c.useMemo(()=>i.emoteLoop!==void 0?i:(g?re.find(se=>se.itemId===g):void 0)??i,[i,re,g]),Re=qr(I,i.tradeId)??qr(I,je),nn=i.acquisition==="store"&&(i.available??0)>0,de=!!Re||nn,lt=zs(),{data:Fe=[]}=ie({queryKey:["item-resales",i.contractAddress,i.itemId],enabled:lt&&!b&&!!i.contractAddress&&!!i.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Va(i.contractAddress,i.itemId)}),Ke=Fe.length>0?Fe[0].priceCredits:null,Ve=v&&i.tokenId?Fe.find(u=>u.tokenId===i.tokenId)??null:null,Ie=c.useMemo(()=>{const u=Fe[0];return u?{...u,name:u.name||i.name,thumbnail:u.thumbnail||i.thumbnail,rarity:u.rarity||i.rarity,category:u.category||i.category,wearableCategory:u.wearableCategory??i.wearableCategory,gender:u.gender??i.gender}:null},[Fe,i]),[Pt,yt]=c.useState(null),[wt,Ge]=c.useState(!1),[rn,w]=c.useState(!1),[P,F]=c.useState(!1),R=i.manaWei??null,{data:O}=Qa(b||!!R),te=R&&O?Ns(R,O):null;c.useEffect(()=>{te!=null&&K(u=>u.priceCredits===te?u:{...u,priceCredits:te})},[te,i.priceCredits]);const _=c.useMemo(()=>{if(!b||!(h!=null&&h.item))return null;const u=h.item;return u.manaWei?{tradeId:u.tradeId??u.id,listingType:"primary",contractAddress:u.contractAddress,itemId:u.itemId??"",name:u.name,thumbnail:u.thumbnail,rarity:u.rarity,category:u.category,wearableCategory:u.wearableCategory??null,creator:u.creator,manaWei:u.manaWei,available:1,network:u.network,chainId:u.chainId,createdAt:0}:null},[b,h==null?void 0:h.item]),he=b&&k!=null&&!!O&&!!_,De=Bs({priceCredits:i.priceCredits,compareAtCredits:i.compareAtCredits,saleEndsAt:i.saleEndsAt}),ye=(()=>{var we,ct;if(!De)return null;const u=bo(A,i.coupon),se=Number(((ct=(we=i.coupon)==null?void 0:we.checks)==null?void 0:ct.uses)??0);return se>0&&u<=se?{claimed:u,total:se}:null})(),Lt=(()=>{if(!De||i.saleUnitsLeft==null)return null;const u=ye?ye.total-ye.claimed:1/0;return i.saleUnitsLeft<u?i.saleUnitsLeft:null})(),Te=c.useMemo(()=>({...i,tradeId:Re,id:Re??i.id}),[i,Re]),an=q.some(u=>u.id===Te.id),Rt=!Te.tokenId,Ai=((Ar=q.find(u=>u.id===Te.id))==null?void 0:Ar.quantity)??0,sn=Rt&&typeof i.available=="number"&&Ai>=i.available,{key:Un,faved:Ye}=_s(i),He=Ws(i),Mi=Ua(u=>u.locale),Ft=He===void 0?null:He.toLocaleString(Mi),Qn=Ye?n("assetCard.removeFromFavorites"):n("assetCard.addToFavorites"),Vn=He===void 0?Qn:n("itemDetail.favoriteAria",{action:Qn,count:He}),Gn=c.useRef(null);c.useEffect(()=>{!i.name||ke||Gn.current===i.id||(Gn.current=i.id,Z("Shop Viewed Item",{...Ds(i),for_sale:de}),qs(i))},[i.id,i.name,ke,de]);const Tt=`${o}/${x??p}`,Yn=c.useRef(Tt);c.useEffect(()=>{if(Yn.current!==Tt){if(Yn.current=Tt,h!=null&&h.item){const u={...h.item,tradeId:h.tradeId??h.item.tradeId};K(v?{...u,tokenId:x,itemId:u.itemId??g}:{...u,tokenId:void 0,itemId:p??u.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[Tt]);function Pi(){!de||on||ke||!Rt&&an||sn||C(Te,"item_detail")}const Je=sh(i.rarity)?i.rarity:Ae.Rarity.COMMON,Jn=oh($e.gender),Et=Os($e),Zn=Ks($e.gender),Xn=Gu(i.rarity),er=Yu($e),tr=de&&De,Li=m?n("itemDetail.moreFromCollection"):n("itemDetail.youMightAlsoLike"),on=Hs(i,y==null?void 0:y.address),[Ri,nr]=c.useState(!1),[Fi,rr]=c.useState(!1),[Ti,ar]=c.useState(!1),[Ei,ir]=c.useState(!1),[vt,jt]=c.useState(null),[zi,sr]=c.useState(!1),[or,lr]=c.useState(!1),dr=Gt(y==null?void 0:y.providerType),{data:N,isLoading:zt}=ie({queryKey:["owned-token",i.contractAddress,i.tokenId,y==null?void 0:y.address],enabled:!b&&!!(y!=null&&y.address)&&!!i.contractAddress&&!!i.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>y?Rr(y.address,i.contractAddress,i.tokenId):null});c.useEffect(()=>{N&&K(u=>u.name?{...u,issuedId:u.issuedId??N.issuedId,priceCredits:N.listingPrice??0,tradeId:N.tradeId}:{id:N.id,name:N.name,creator:"",contractAddress:N.contractAddress,itemId:N.itemId,category:N.category,rarity:N.rarity??"common",network:N.network,chainId:N.chainId,thumbnail:N.image,priceCredits:N.listingPrice??0,gender:null,isSmart:!1,tokenId:N.tokenId,issuedId:N.issuedId,tradeId:N.tradeId})},[N]),c.useEffect(()=>{Ve&&K(u=>u.priceCredits===Ve.priceCredits&&u.tradeId?u:{...u,priceCredits:Ve.priceCredits,tradeId:u.tradeId??Ve.tradeId})},[Ve]),c.useEffect(()=>{vt!=null&&N!=null&&N.isOnSale&&N.listingPrice===vt&&jt(null)},[N,vt]);const cr=!b&&!!i.contractAddress&&!!i.tokenId&&!i.name&&!D&&!zt&&!N,{data:ce,isFetched:Ni}=ie({queryKey:["public-token",i.contractAddress,i.tokenId],enabled:cr,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>ao(i.contractAddress,i.tokenId)});c.useEffect(()=>{ce&&K(u=>u.name?u.issuedId?u:{...u,issuedId:ce.issuedId}:{id:ce.id,name:ce.name,creator:"",contractAddress:ce.contractAddress,itemId:ce.itemId,category:ce.category,rarity:ce.rarity??"common",network:ce.network,chainId:ce.chainId,thumbnail:ce.image,priceCredits:ce.listingPrice??0,gender:null,isSmart:!1,tokenId:ce.tokenId,issuedId:ce.issuedId,tradeId:ce.tradeId})},[ce]);const{data:Ee}=ie({queryKey:["publishable-item",i.contractAddress,i.itemId,y==null?void 0:y.address],enabled:on&&!!y&&!!i.itemId,queryFn:async()=>y?(await Mo(y.address,y.identity)).find(se=>se.contractAddress.toLowerCase()===i.contractAddress.toLowerCase()&&se.blockchainItemId===i.itemId)??null:null}),ze=v&&!!N,ln=!v&&on,Ne=!b&&(ln||ze),ur=vt!=null?!0:ze?!!(N!=null&&N.isOnSale):de,Nt=ze?N==null?void 0:N.tradeId:Re,pr=ze?!!N:!!Ee,hr=ln||ze&<,dn=vt??(ze?(N==null?void 0:N.listingPrice)??0:0),{data:xr=0}=ie({queryKey:["owned-item-count",i.contractAddress,p,y==null?void 0:y.address],enabled:!v&&!b&&!!(y!=null&&y.address)&&!!i.contractAddress&&!!p,staleTime:3e4,queryFn:()=>y?io(y.address,i.contractAddress,p):0});async function Ze(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",i.contractAddress,i.tokenId]}),I.invalidateQueries({queryKey:["detail-trade"]}),I.invalidateQueries({queryKey:["shop-item"]}),I.invalidateQueries({queryKey:["collection-sale-state"]}),I.invalidateQueries({queryKey:["shop-items"]}),I.invalidateQueries({queryKey:["catalog-items"]}),I.invalidateQueries({queryKey:["publishable-items"]}),I.invalidateQueries({queryKey:["publishable-item",i.contractAddress,i.itemId]}),I.invalidateQueries({queryKey:["item-resales",i.contractAddress,i.itemId]})])}async function Bi(u){if(!y||!Nt)throw new Error("No listing to take down");const se=await Ha(Nt);await ko({trade:se,signer:y.signer,mode:u.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(ze){if(!i.tokenId)return!1;const we=await Rr(y.address,i.contractAddress,i.tokenId);return we!==null&&!we.isOnSale}return i.itemId?await Zs(i.contractAddress,i.itemId)===null:!1}catch{return!1}},onWaiting:u.onWaiting}}),u.silent||Zt.success(n("myAssets.removedFromSale",{name:i.name})),jt(null),Bl(I,Nt),K(we=>we.tradeId===Nt?{...we,tradeId:void 0}:we),Ze(),hn(I,{address:y.address,contractAddress:i.contractAddress,tokenId:i.tokenId},{kind:"removed"})}const fr=u=>async({payGas:se,onWaiting:we})=>{try{return await Bi({silent:u,payGas:se,onWaiting:we}),"ok"}catch(ct){if(ct instanceof jo)return ct.definitive?"relay-reverted":"relay-pending";throw ct}},mr={currentCredits:dn||i.priceCredits||void 0,canPayGas:dr,cancelCurrent:fr(!0)};function gr({edit:u=!1}={}){u||Z("Shop Started Listing",{listing_type:ze?"secondary":"primary",item_id:i.itemId??i.tokenId??null}),lr(u),ze?nr(!0):rr(!0)}function br(){nr(!1),rr(!1),lr(!1),Ze()}const yr=de?ke?n("itemDetail.checking"):sn?n("itemDetail.maxInCart"):!Rt&&an?n("assetCard.inCart"):n("assetCard.addToCart"):n("itemDetail.notForSale"),kt=i.available??(Q==null?void 0:Q.available)??null,_i=typeof kt=="number"&&kt>0&&!i.tokenId&&!b,wr=!b&&!i.tokenId&&kt===0,vr=i.network==="ETHEREUM",dt=wr&&!Ne&&!!Ie,Bt=!!Ie&&q.some(u=>u.id===Ie.id),Wi=!Ne&&de&&!b,Di=b||!Ne&&(de||dt&&!!Ie||wi()),qi=!i.name&&(!!D||!!N||!!ce||!!fe),jr=z||!!i.contractAddress&&!S||!i.name&&zt||qi||cr&&!Ni,kr=!i.name&&!jr,Oi=!!i.name&&_l({isMarket:b,forSale:de,priceKnown:i.priceCredits>0&&(!R||te!=null)||Ne,stillResolving:jr||!!R&&te==null,manage:Ne,soldOutWithResale:dt,resolvingTrade:ke,isTokenRoute:v,ownedAssetLoading:zt,deepLinkLoading:z}),$r=!i.creator&&(z||X||zt),Cr=!(U!=null&&U.name)&&X,Ki=/^https?:\/\//i.test(i.thumbnail);return Us(kr?{title:n("seo.item.notFoundTitle"),noindex:!0}:i.name?{title:i.name,description:J||n("seo.item.fallbackDescription",{name:i.name,rarity:i.rarity,category:Qt($e),creator:Wn(i.creator)}),image:Ki?i.thumbnail:void 0,type:"product"}:{}),kr?e.jsxs(Fp,{"data-notfound":!0,children:[e.jsx(zp,{name:"cart"}),e.jsx(Np,{children:n("itemDetail.notAvailableTitle")}),e.jsx(Tp,{children:n("itemDetail.notAvailableBody")}),e.jsx(Ep,{variant:"white",onClick:()=>j("/items"),children:n("notFound.cta")})]}):e.jsxs(np,{children:[e.jsxs(rp,{"aria-label":n("itemDetail.breadcrumbAria"),children:[e.jsx(ap,{onClick:()=>j("/items"),children:n("nav.collectibles")}),e.jsx(ip,{children:"/"}),e.jsx(sp,{children:i.name||n("itemDetail.itemFallback")})]}),e.jsxs(op,{style:{"--glow-rgb":Gs(Je),"--glow-core":Vs(Je)},children:[e.jsxs(lp,{"data-testid":"item-preview",children:[i.name?e.jsx(_c,{item:i}):e.jsx(dp,{"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(cp,{className:"skeleton","aria-hidden":!0})}),Un?e.jsxs(ya,{"data-fav-preview":!0,"data-on":Ye||void 0,"data-count":Ft??void 0,onClick:()=>M(i,"item_detail"),"aria-pressed":Ye,"aria-label":Vn,children:[e.jsx(L,{name:Ye?"heart-solid":"heart",size:18}),He!==void 0?e.jsx(wa,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count-preview",children:Ft}):null]}):null,bt?e.jsxs(xp,{"data-play-showcase":!0,onClick:()=>Mt(!0),"data-testid":"play-showcase",children:[e.jsx(L,{name:"play",size:18}),n("itemDetail.playShowcase")]}):null]}),e.jsx(up,{"data-testid":"item-info",children:i.name?e.jsxs(e.Fragment,{children:[tr&&i.compareAtCredits!=null?e.jsx(wp,{pct:Qs(i.compareAtCredits,i.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(pp,{children:[e.jsxs(hp,{children:[i.name,v&&i.issuedId?` #${i.issuedId}`:""]}),Un?e.jsxs(ya,{"data-fav-title":!0,"data-on":Ye||void 0,"data-count":Ft??void 0,onClick:()=>M(i,"item_detail"),"aria-pressed":Ye,"aria-label":Vn,children:[e.jsx(L,{name:Ye?"heart-solid":"heart",size:18}),He!==void 0?e.jsx(wa,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count",children:Ft}):null]}):null]}),e.jsxs(fp,{children:[Xn?e.jsx(qt,{content:Lr(i.rarity),children:e.jsx(Ht,{to:Xn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Pr(Je)},children:i.rarity})}):e.jsx(qt,{content:Lr(i.rarity),children:e.jsx(Be,{"data-variant":"rarity",style:{background:Pr(Je)},children:i.rarity})}),er?e.jsxs(Ht,{to:er,"data-testid":"detail-category-link",title:n("filter.browseByCategory",{category:Qt($e)}),children:[Et?e.jsx(L,{name:Et,size:18}):null,Qt($e)]}):e.jsxs(Be,{children:[Et?e.jsx(L,{name:Et,size:18}):null,Qt($e)]}),Jn?e.jsxs(Be,{children:[Zn?e.jsx(L,{name:Zn,size:18}):null,Jn]}):null,!v&&i.issuedId?e.jsxs(Be,{"data-testid":"detail-issued",children:["#",i.issuedId]}):null,l?e.jsxs(Ht,{to:"/event","data-testid":"detail-event",title:l,children:[e.jsx(L,{name:"star-rounded",size:18}),l]}):null,ot?e.jsxs(Ht,{to:Ju(),"data-testid":"detail-smart",title:n("filter.browseBySmart"),children:[e.jsx(L,{name:"smart",size:18}),n("itemDetail.smart")]}):null,Ce.emoteLoop!==void 0?e.jsxs(Be,{"data-testid":"detail-play-mode",children:[e.jsx(L,{name:Ce.emoteLoop?"play-loop":"play-once",size:18}),Ce.emoteLoop?n("itemDetail.playLoop"):n("itemDetail.playOnce")]}):null,Ce.emoteHasSound?e.jsxs(Be,{"data-testid":"detail-sound",children:[e.jsx(L,{name:"sound",size:18}),n("itemDetail.emoteSound")]}):null,Ce.emoteHasProps?e.jsxs(Be,{"data-testid":"detail-props",children:[e.jsx(L,{name:"props",size:18}),n("itemDetail.emoteProps")]}):null,At?e.jsx(qt,{content:n("itemDetail.exportBlockedTooltip"),children:e.jsxs(Be,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":n("itemDetail.exportBlockedTooltip"),children:[e.jsx(L,{name:"ban",size:16}),n("itemDetail.exportBlocked")]})}):null,Le?e.jsxs(Be,{"data-testid":"detail-utility-chip",children:[e.jsx(L,{name:"utility",size:18}),n("itemDetail.utility")]}):null]}),J||Le?e.jsxs($i,{children:[J?e.jsx(Nn,{children:e.jsxs(zn,{children:[e.jsx(pt,{children:n("itemDetail.description")}),e.jsx(va,{"data-expanded":ae||void 0,children:J}),J.length>140?e.jsx(gp,{className:"link",onClick:()=>ve(u=>!u),children:ae?n("itemDetail.showLess"):n("itemDetail.readMore")}):null]})}):null,Le?e.jsx(Nn,{children:e.jsxs(zn,{"data-testid":"detail-utility",children:[e.jsx(pt,{children:n("itemDetail.utility")}),e.jsx(va,{"data-expanded":!0,children:Le})]})}):null]}):null,!vr&&(i.creator||$r)||U!=null&&U.name||Cr?e.jsxs(Ci,{children:[vr?null:i.creator?e.jsxs(It,{children:[e.jsx(pt,{children:n("itemDetail.creator")}),e.jsx(bp,{address:i.creator,linkToProfile:!0,hidePrefix:!0})]}):$r?e.jsxs(It,{children:[e.jsx(pt,{children:n("itemDetail.creator")}),e.jsxs(Ta,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(Ea,{}),e.jsx(za,{})]})]}):null,U!=null&&U.name?e.jsxs(It,{"data-collection":!0,children:[e.jsx(pt,{children:n("itemDetail.collection")}),e.jsx(yp,{contractAddress:i.contractAddress,name:U.name,items:re})]}):Cr?e.jsxs(It,{"data-collection":!0,children:[e.jsx(pt,{children:n("itemDetail.collection")}),e.jsxs(Ta,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(Ea,{}),e.jsx(za,{})]})]}):null]}):null,e.jsx(Si,{}),Oi?e.jsxs(ah,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(ih,{}),e.jsx(Fa,{}),e.jsx(Fa,{})]}):e.jsxs(e.Fragment,{children:[lt&&!Ne&&!b&&de&&!i.tokenId?e.jsxs(Hp,{"data-testid":"buy-from-creator",children:[e.jsxs(Up,{children:[e.jsx(Qp,{name:"buy-from-creator"}),n("itemDetail.buyFromCreator")]}),e.jsx(Vp,{name:"check-rounded"})]}):null,dt?e.jsxs(Xp,{"data-testid":"sold-out",children:[e.jsxs(Aa,{"data-variant":"original",children:[e.jsxs(Ma,{children:[n("itemDetail.originalPrice"),e.jsxs(Pa,{children:[e.jsx(Pe,{className:"ico"}),e.jsx(La,{children:e.jsx(ge,{credits:i.priceCredits})})]}),e.jsx(Ra,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsx(eh,{"data-testid":"out-of-stock",children:n("itemDetail.soldOut")})]}),e.jsxs(Aa,{"data-variant":"resale",children:[e.jsxs(Ma,{children:[n("itemDetail.resalePrice"),e.jsxs(Pa,{children:[e.jsx(Pe,{className:"ico"}),e.jsx(La,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(Ra,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsxs(th,{children:[n("itemDetail.stock")," ",Fe.length,"/",Ae.Rarity.getMaxSupply(Je).toLocaleString()]})]})]}):e.jsxs(vp,{children:[e.jsxs(jp,{children:[e.jsxs(kp,{children:[b||de?e.jsx(An,{children:n("itemDetail.price")}):null,b?e.jsxs(e.Fragment,{children:[e.jsx($t,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(Ct,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(Cp,{"aria-hidden":!0,children:"≈"}),e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:k})})]})}),e.jsx(Ip,{children:n("assetCard.marketPrice")})]}):de?tr?e.jsxs($t,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:i.priceCredits})}),e.jsx(Ap,{"data-testid":"detail-price-was",children:e.jsx(ge,{credits:i.compareAtCredits})}),e.jsx(So,{until:i.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs($t,{"data-testid":"item-price",children:[e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:i.priceCredits})})]}):ur&&dn?e.jsxs($t,{"data-testid":"item-price",children:[e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:dn})})]}):Ne?null:e.jsxs($t,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:n("itemDetail.notForSale")}),e.jsx(qt,{content:n("itemDetail.notForSaleHint"),children:e.jsx($p,{tabIndex:0,role:"img","aria-label":n("itemDetail.notForSaleHint"),children:e.jsx(L,{name:"info",size:14})})})]})]}),_i?e.jsxs(ja,{children:[e.jsx(An,{children:n("itemDetail.stock")}),e.jsxs(Sn,{children:[(kt??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Je).toLocaleString()]})]}):wr?e.jsxs(ja,{children:[e.jsx(An,{children:n("itemDetail.stock")}),e.jsxs(Sn,{children:[(kt??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Je).toLocaleString()]}),e.jsx(Sn,{"data-out":!0,"data-testid":"out-of-stock",children:n("itemDetail.outOfStock")})]}):null]}),ye?e.jsx(Qu,{claimed:ye.claimed,total:ye.total,testId:"detail-offer-stock"}):null,Lt!=null?e.jsx(Sp,{"data-testid":"detail-units-left",children:n("assetCard.unitsLeftAtThisPrice",{count:Lt})}):null]}),e.jsx(Mp,{"data-buttons":Di||void 0,"data-dual":Wi||void 0,children:b?e.jsxs(Mn,{variant:"purple",onClick:xe,disabled:!he,children:[e.jsx("span",{children:n("assetCard.buyNow")}),k!=null?e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:k})]}):null]}):Ne?e.jsxs(nh,{"data-testid":"manage-actions",children:[ur?e.jsxs(e.Fragment,{children:[hr?e.jsxs(Lp,{onClick:()=>gr({edit:!0}),disabled:!pr,"data-testid":"edit-price",children:[e.jsx(L,{name:"pen",className:"ico"}),e.jsx("span",{children:n("itemDetail.manageUpdatePrice")})]}):null,e.jsx($a,{onClick:()=>sr(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:n("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hr?e.jsx(Pp,{onClick:()=>gr(),disabled:!pr,children:e.jsx("span",{children:n("itemDetail.manageList")})}):null,ze?e.jsxs(e.Fragment,{children:[e.jsx($a,{onClick:()=>ar(!0),children:e.jsx("span",{children:n("itemDetail.manageTransfer")})}),e.jsx(ka,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>w(!0),children:n("itemDetail.manageResell")})]}):null]}),ln&&Ee?e.jsx(ka,{type:"button","data-on-purple":!0,onClick:()=>ir(!0),children:n("itemDetail.manageIssue")}):null,Ke!=null?e.jsx(rh,{children:e.jsx(Bn,{onClick:()=>Ge(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})}):null]}):de?e.jsxs(e.Fragment,{children:[e.jsxs(Mn,{variant:"purple",onClick:xe,disabled:ke,children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:i.priceCredits})]})]}),e.jsxs(Ca,{onClick:Pi,disabled:ke||(Rt?sn:an),"aria-label":yr,children:[e.jsx(L,{name:"cart"}),e.jsx(Ia,{children:yr})]})]}):dt&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Mn,{variant:"purple",onClick:()=>y?yt(Ie):H(),children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:Ie.priceCredits})]})]}),e.jsxs(Ca,{onClick:()=>{Bt||C(Ie,"item_detail")},disabled:Bt,"aria-label":Bt?n("assetCard.inCart"):n("assetCard.addToCart"),children:[e.jsx(L,{name:"cart"}),e.jsx(Ia,{children:Bt?n("assetCard.inCart"):n("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Du,{item:i}),i.itemId?e.jsx(Zp,{onClick:()=>{Z("Shop Clicked Buy Resale",{item_id:i.itemId,contract_address:i.contractAddress,has_shop_resale:!!Ie}),F(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:n("itemDetail.buyResale")}):null]})}),!Ne&&!b&&Ke!=null?e.jsxs(Gp,{"data-testid":"lowest-price","data-centered":dt||void 0,children:[dt?null:e.jsxs(Yp,{children:[n("itemDetail.lowestPrice"),e.jsx(Pe,{className:"ico"}),e.jsx(Jp,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(Bn,{onClick:()=>Ge(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})]}):null,!Ne&&!b&&xr>0?e.jsxs(Rp,{"data-testid":"you-own-note",children:[n("itemDetail.youOwnN",{count:xr})," ",e.jsx(Ba,{to:"/my-items",children:n("nav.myAssets")})]}):null]})]}):e.jsx(dh,{})})]}),e.jsx(Ys,{exclude:le,title:n("itemDetail.becauseYouOwn"),surface:"pdp",first:Na}),E!==null&&e.jsx(yo,{title:Li,items:B,onViewAll:m&&i.contractAddress?()=>j(`/collection/${i.contractAddress}`):void 0}),V&&b&&_&&O?e.jsx(xi,{listing:_,rate:O,onClose:()=>G(!1),onSold:()=>G(!1)}):V&&!b?e.jsx(En,{item:Te,resume:Y,onClose:()=>{G(!1),ne(!1)}}):null,Pt?e.jsx(En,{item:Pt,onClose:()=>{yt(null),Ze()}}):null,lt&&wt&&i.itemId?e.jsx(xu,{item:i,onClose:()=>Ge(!1)}):null,rn&&x?e.jsx(xa,{contractAddress:o??"",tokenId:x,onClose:()=>w(!1)}):null,P&&i.itemId&&o?e.jsx(xa,{variant:"buy",contractAddress:o,itemId:i.itemId,onClose:()=>F(!1)}):null,Ri&&N&&y?e.jsx(md,{asset:N,session:y,creator:i.creator,edit:or?mr:void 0,onListed:(u,se)=>{jt(u),Ze(),hn(I,{address:y.address,contractAddress:i.contractAddress,tokenId:i.tokenId},{kind:"listed",priceCredits:u,tradeId:se})},onClose:br}):null,zi&&y?e.jsx(Bd,{name:i.name,managed:Dn(y),canPayGas:dr,cancel:fr(!1),onClose:()=>sr(!1)}):null,Ti&&y&&i.tokenId?e.jsx(Ed,{item:{contractAddress:i.contractAddress,chainId:i.chainId,tokenId:i.tokenId,name:i.name,thumbnail:i.thumbnail},session:y,onClose:()=>{ar(!1),Ze()},onTransferred:()=>{jt(null),Ze(),hn(I,{address:y.address,contractAddress:i.contractAddress,tokenId:i.tokenId},{kind:"gone"})}}):null,Fi&&Ee&&y?e.jsx(sc,{item:Ee,session:y,edit:or?mr:void 0,onListed:(u,se)=>{jt(u),K(we=>({...we,tradeId:se}))},onClose:br}):null,Ei&&Ee&&y?e.jsx(Ll,{item:{contractAddress:Ee.contractAddress,chainId:nt.chainId,itemId:Ee.blockchainItemId,name:Ee.name,thumbnail:Ee.thumbnail,available:Ee.remainingSupply},session:y,onClose:()=>{ir(!1),Ze()}}):null,tn&&bt?e.jsx(hc,{src:bt,itemName:i.name,onClose:()=>Mt(!1)}):null]})}function dh(){return e.jsxs(Bp,{"aria-hidden":!0,children:[e.jsx(Dp,{className:"skeleton"}),e.jsxs(qp,{children:[e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"})]}),e.jsx($i,{children:[0,1].map(t=>e.jsx(Nn,{children:e.jsxs(zn,{children:[e.jsx(Sa,{className:"skeleton"}),e.jsxs(_p,{children:[e.jsx(Rn,{className:"skeleton"}),e.jsx(Rn,{className:"skeleton"}),e.jsx(Rn,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(Ci,{children:[0,1].map(t=>e.jsxs(It,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Sa,{className:"skeleton"}),e.jsx(Wp,{})]},t))}),e.jsx(Si,{}),e.jsx(Op,{className:"skeleton"}),e.jsx(Kp,{className:"skeleton"})]})}export{lh as ItemDetail,Wh as ItemDetailRoute,lh as default};
|
|
3090
|
-
//# sourceMappingURL=ItemDetail-
|
|
3090
|
+
//# sourceMappingURL=ItemDetail-s3kjESZN.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{r as d,j as c}from"./react-
|
|
1
|
+
import{r as d,j as c}from"./react-LHIQ98KR.js";import{s as p,H as y,t as o}from"./index-Bp3aHt26.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="aeb45bad-8136-4639-a6d3-fde882d0a750",e._sentryDebugIdIdentifier="sentry-dbid-aeb45bad-8136-4639-a6d3-fde882d0a750")}catch{}})();const x=p.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
padding: 28px 0 8px;
|
|
5
5
|
`,g=p(y)`
|
|
6
6
|
min-width: 160px;
|
|
7
7
|
`;function m({hasNextPage:e,isFetching:r,isError:t=!1,onLoadMore:n,auto:s=!0}){const i=d.useRef(null),a=d.useRef(n);return a.current=n,d.useEffect(()=>{const f=i.current;if(!f||!e||r||t||!s)return;const l=new IntersectionObserver(b=>{var u;(u=b[0])!=null&&u.isIntersecting&&a.current()},{rootMargin:"600px 0px"});return l.observe(f),()=>l.disconnect()},[e,r,t,s]),e?c.jsx(x,{ref:i,children:c.jsx(g,{variant:"ghost",onClick:n,disabled:r,children:r?o("loadMore.loading"):t?o("loadMore.retry"):o("loadMore.loadMore")})}):null}export{m as L};
|
|
8
|
-
//# sourceMappingURL=LoadMore-
|
|
8
|
+
//# sourceMappingURL=LoadMore-BRW4riO-.js.map
|