@dcl/shop 0.1.0-28661536077.commit-c5e8ad5 → 0.1.0-28703787617.commit-d117df8
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/Assets-FLrOHysp.js +1 -0
- package/assets/Cart-74G7u3M0.js +1 -0
- package/assets/{CircularProgress-DGwI2EN6.js → CircularProgress-D-iaLmF3.js} +1 -1
- package/assets/Collection-AO4XdOKU.js +1 -0
- package/assets/{ConstantsUtil-4Wiw99iz.js → ConstantsUtil-CkFCQ14z.js} +1 -1
- package/assets/Creator-8VyZOUv7.js +1 -0
- package/assets/{ExchangeController-zdGbkpDw.js → ExchangeController-D7DGcIN0.js} +1 -1
- package/assets/GetCredits-BQyEYRN1.js +2 -0
- package/assets/{HelpersUtil-C-HlMh2E.js → HelpersUtil-CWaTGhBJ.js} +1 -1
- package/assets/ImportListings-DT4n0cu0.js +1 -0
- package/assets/ItemDetail-Dxzb-zAN.js +1 -0
- package/assets/ItemDetail-yNwYjl_l.css +1 -0
- package/assets/Market-DahFqRly.js +1 -0
- package/assets/MyAssets-QhQumAsS.js +1 -0
- package/assets/{MyFavorites-C8VF3wpf.js → MyFavorites-CU6la9k8.js} +1 -1
- package/assets/MyPurchases-BNqJ6kya.js +1 -0
- package/assets/{NetworkUtil-mKiGb5Li.js → NetworkUtil-DRBYr7tG.js} +1 -1
- package/assets/NotFound-BK3mhtdy.js +1 -0
- package/assets/{RealCheckout-Df7L_Xxc.js → RealCheckout-DyqEWKbw.js} +1 -1
- package/assets/Success-ytt79-xY.js +1 -0
- package/assets/{SvgIcon-QHzcyq_c.js → SvgIcon-CqOcU2_R.js} +1 -1
- package/assets/{SwapController-BO0XUPjk.js → SwapController-BAvEAFso.js} +1 -1
- package/assets/{TradeService-3h9JUVn6.js → TradeService-DqHp35f0.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-AoTKwfu7.js → W3MFrameProviderSingleton-C9eN6p7c.js} +3 -3
- package/assets/{WebCryptoP256-wHkiJKyS.js → WebCryptoP256-DMw8pfkw.js} +1 -1
- package/assets/{basic-DUypXmlM.js → basic-O8asjnC_.js} +1 -1
- package/assets/{biconomy-Ck4AyQiM.js → biconomy-DRAo41DQ.js} +1 -1
- package/assets/{browser-ponyfill-l3wX528D.js → browser-ponyfill-DgNUJw98.js} +1 -1
- package/assets/{browser-DgBqnGcY.js → browser-tNtPL9tA.js} +1 -1
- package/assets/{buy-BBAUmAfR.js → buy-DdbFtykN.js} +1 -1
- package/assets/{buy-gasless-NviXjZ0f.js → buy-gasless-KC8nGxjE.js} +1 -1
- package/assets/{ccip-Dlq9umjU.js → ccip-BJ7oys_I.js} +1 -1
- package/assets/{ccip-DeKQauhT.js → ccip-CiM7ro0m.js} +1 -1
- package/assets/{chains-BZnWnQvl.js → chains-BvaNJh8k.js} +1 -1
- package/assets/collection-Bp-GjNsA.css +1 -0
- package/assets/collections-F5S4KOPA.js +1 -0
- package/assets/{common-DRglK3kR.js → common-nfYPFMcM.js} +1 -1
- package/assets/{controller-Bgx9211-.js → controller-DFV5C_Bj.js} +2 -2
- package/assets/{core-Cki3FCQh.js → core-DoHB-Fsq.js} +4 -4
- package/assets/{custom-xEKfNNsJ.js → custom-CHMO6DAH.js} +1 -1
- package/assets/{data-capture-Uz1HkKqY.js → data-capture-C0KcKXM2.js} +1 -1
- package/assets/decimals-BF3lya9z.js +1 -0
- package/assets/{decimals-dZeJ2OUx.js → decimals-D2DxCA74.js} +1 -1
- package/assets/{detectExtension-BC3UKuJR.js → detectExtension-BgXbwH_B.js} +1 -1
- package/assets/{email-B4jWVAso.js → email-BCwmDy2I.js} +1 -1
- package/assets/{embedded-wallet-Gve5MDWK.js → embedded-wallet-Bt4p5ewN.js} +1 -1
- package/assets/{engine-B4nb2cpG.js → engine-B9SUxJLQ.js} +1 -1
- package/assets/{estimate-l1-fee-Bi_voOoR.js → estimate-l1-fee-DBKkdttH.js} +1 -1
- package/assets/eth_estimateGas-CgtMLqRU.js +1 -0
- package/assets/{eth_getStorageAt-CAD8m7vv.js → eth_getStorageAt-DOrCpfo7.js} +1 -1
- package/assets/eth_getTransactionCount-C5pT27ll.js +1 -0
- package/assets/{ethereum-rOnUivvy.js → ethereum-DymVJL-H.js} +1 -1
- package/assets/{ethers-g2M4Ny1y.js → ethers-BxoDGoYp.js} +1 -1
- package/assets/{extractIPFS-B1Y_qYYI.js → extractIPFS-BOd_GXbf.js} +1 -1
- package/assets/{features-BxjM9Oqa.js → features-NGIu4mkR.js} +1 -1
- package/assets/{fetchTokenMetadata-BYtXvAQ3.js → fetchTokenMetadata-CkXgTWUT.js} +2 -2
- package/assets/{fortmatic-BkOjsQRr.js → fortmatic-fqRJiMUL.js} +1 -1
- package/assets/{generateUtilityClasses-Bkw0uvCo.js → generateUtilityClasses-sji8XAMf.js} +1 -1
- package/assets/get-ecosystem-wallet-info-DphiBsfW.js +1 -0
- package/assets/{getBalance-Bd1PYOq-.js → getBalance-CsoixpqV.js} +2 -2
- package/assets/{getInstalledModules-D6GohJR0.js → getInstalledModules-BYiXEbWK.js} +1 -1
- package/assets/{getNFT-DfYeTU_3.js → getNFT-Bylv_Kez.js} +2 -2
- package/assets/{getNFT-DjbNgozj.js → getNFT-YvHp8dfS.js} +1 -1
- package/assets/{hashTypedData-PGCpbthX.js → hashTypedData-COanhsEe.js} +1 -1
- package/assets/{hashTypedData-CkyTd8hd.js → hashTypedData-EVHZYlMo.js} +1 -1
- package/assets/import-D0C6XMTV.js +1 -0
- package/assets/{in-app-wallet-calls-Cwc8dXWH.js → in-app-wallet-calls-Drs5geFM.js} +1 -1
- package/assets/{index-Dd_mETVS.js → index--Vhvv8yH.js} +1 -1
- package/assets/{index-JiIXuUkn.js → index-2H94zSx1.js} +1 -1
- package/assets/{index-BNPOkjv5.js → index-48EHi-ha.js} +2 -2
- package/assets/{index-BJA0fGtl.js → index-6zaqIgnj.js} +1 -1
- package/assets/{index-BXrDMTU7.js → index-B1w_z5D2.js} +1 -1
- package/assets/{index-BSaXeP16.js → index-B3EyEzJm.js} +1 -1
- package/assets/{index-CDOD9uhi.js → index-B4sUKZKp.js} +1 -1
- package/assets/{index-DI8Unuup.js → index-B5_18Sy2.js} +1 -1
- package/assets/{index-DPFS0ct7.js → index-B5lBgsVo.js} +1 -1
- package/assets/{index-DvlW6z_K.js → index-BLNMzhpw.js} +1 -1
- package/assets/{index-jKY6hIGu.js → index-BNNismVl.js} +1 -1
- package/assets/{index-CbRsU3xQ.js → index-BP1uw9cy.js} +1 -1
- package/assets/{index-qM5H3DJK.js → index-BRKGO65_.js} +1 -1
- package/assets/{index-DpBhY8x7.js → index-BTiODZa8.js} +1 -1
- package/assets/{index-DPE1tooR.js → index-Bh15xqDM.js} +2 -2
- package/assets/{index-Cm6_R4ib.js → index-BicpyvoP.js} +1 -1
- package/assets/{index-CIqwUqUC.js → index-BirCCUh-.js} +1 -1
- package/assets/{index-FMZPlqM7.js → index-Biyjc0Ff.js} +1 -1
- package/assets/{index-Br3wJENI.js → index-Bjv1adIg.js} +1 -1
- package/assets/{index-DoUrSumr.js → index-BkOpRLMc.js} +1 -1
- package/assets/{index-DJAdlrXV.js → index-BplHQIa9.js} +2 -2
- package/assets/{index-BRL3bL9K.js → index-Bs2y7HT-.js} +1 -1
- package/assets/{index-D0hFzIFj.js → index-BwWuCRvy.js} +1 -1
- package/assets/{index-CdmgbuiF.js → index-BzWM88M9.js} +1 -1
- package/assets/{index-BHSgamRG.css → index-C--hbOLp.css} +1 -1
- package/assets/{index-Bwcqqbyi.js → index-C1uMNxxv.js} +1 -1
- package/assets/{index-CPaODTpw.js → index-C4zSCX_Z.js} +1 -1
- package/assets/{index-D2AOkPG1.js → index-C9iIs3VH.js} +1 -1
- package/assets/{index-CLRnYK1L.js → index-CBg9-0F-.js} +1 -1
- package/assets/{index-B23tJeMl.js → index-CR1VOdeC.js} +1 -1
- package/assets/{index-BIqiBFIC.js → index-CWIz0pK9.js} +1 -1
- package/assets/{index-BlUGwcMm.js → index-Cai7byJp.js} +3 -3
- package/assets/{index-0i5TDv0S.js → index-Cb1dH7Tg.js} +1 -1
- package/assets/{index-sg-VA8-W.js → index-CfFGLMLx.js} +1 -1
- package/assets/index-ChPBLIHl.js +1 -0
- package/assets/{index-Ckzv_oD_.js → index-Cly18UAC.js} +1 -1
- package/assets/{index-CEkgM83J.js → index-CmK1m9NK.js} +3 -3
- package/assets/{index-Ch2PE2ae.js → index-Cmy99N4f.js} +1 -1
- package/assets/{index-Bi-fY-OR.js → index-Co35w_CM.js} +1 -1
- package/assets/{index-C4JUM8rg.js → index-CuCnO4yR.js} +1 -1
- package/assets/{index-YDZW54NO.js → index-D1ZA4_ZB.js} +1 -1
- package/assets/{index-DFG39jUy.js → index-D8nMMSJq.js} +1 -1
- package/assets/{index-BF_U2wGF.js → index-DE61TJeV.js} +1 -1
- package/assets/{index-CiWbPrh3.js → index-DEeUUTUO.js} +1 -1
- package/assets/{index-nFhfTGAX.js → index-DGaYORdB.js} +1 -1
- package/assets/{index-DFz5_KEt.js → index-DHapZH9R.js} +1 -1
- package/assets/{index-BiJCK9Ts.js → index-DK0GKs7C.js} +1 -1
- package/assets/{index-jDSI8VUV.js → index-DLMdWJlR.js} +1 -1
- package/assets/{index-BdjP3WGz.js → index-DN4ZXuvL.js} +1 -1
- package/assets/{index-CX_lEX5Y.js → index-DUMku6a-.js} +1 -1
- package/assets/{index-s9PTMkSR.js → index-DVCPdKkJ.js} +1 -1
- package/assets/{index-CGCwGu_A.js → index-DblYPgYx.js} +1 -1
- package/assets/{index-DRxN3xGb.js → index-Dl9W3POH.js} +1 -1
- package/assets/{index-DK4ayCPs.js → index-DsKgUXPz.js} +2 -2
- package/assets/{index-njBZQFZk.js → index-DuKV08mq.js} +1 -1
- package/assets/{index-BDfhJESf.js → index-MxzGamB6.js} +15 -15
- package/assets/{index-BnMS896q.js → index-VE0M5Mr2.js} +1 -1
- package/assets/{index-BdmcyQvB.js → index-w8EkaS6t.js} +1 -1
- package/assets/{index.es-D2IFOg8C.js → index.es-BClJ76hs.js} +4 -4
- package/assets/{index.es-vvIbuDyz.js → index.es-DDd1J_nF.js} +1 -1
- package/assets/{index.es-CN64oUnh.js → index.es-DUW0sNV5.js} +1 -1
- package/assets/{localBatchGatewayRequest-0IAQv7Hi.js → localBatchGatewayRequest-BEscwULf.js} +1 -1
- package/assets/mana-rate-WQsbGubC.js +1 -0
- package/assets/{native-DaeP4CfJ.js → native-Df5jPT-i.js} +1 -1
- package/assets/network-DkdfbH4K.js +1 -0
- package/assets/{networks-2cU5JCTv.js → networks-D5LcG5gv.js} +1 -1
- package/assets/{onramp-DWqR-bWo.js → onramp-DzxiiMC8.js} +1 -1
- package/assets/{openzeppelin-Dz3V59Rq.js → openzeppelin-BCsPynaY.js} +1 -1
- package/assets/{ownerOf-BET-RRRT.js → ownerOf-DwzcsL2q.js} +1 -1
- package/assets/{parseNft-3prrq-4r.js → parseNft-CzLvm9ef.js} +2 -2
- package/assets/{parseSignature-BTvNPey1.js → parseSignature-B4doFBao.js} +3 -3
- package/assets/{parseSignature-Dl1rB15w.js → parseSignature-CinRawwX.js} +1 -1
- package/assets/{pay-with-exchange-CgCzas_y.js → pay-with-exchange-tMWgDDnR.js} +1 -1
- package/assets/{qr-overlay-D-OO9gcT.js → qr-overlay-C94LVOqT.js} +3 -3
- package/assets/{react-DwvsoSSx.js → react-E8ng6RF2.js} +1 -1
- package/assets/{receive-CBFW9m3h.js → receive-B0FD5_ig.js} +1 -1
- package/assets/{resolveImplementation-2FBdn2ht.js → resolveImplementation-C9bzQXlL.js} +1 -1
- package/assets/{rpc-De0vEv9l.js → rpc-CUaqpDHe.js} +1 -1
- package/assets/{secp256k1-C7fI5S9N.js → secp256k1-BLKhahcf.js} +1 -1
- package/assets/{secp256k1-C197fkYo.js → secp256k1-BmWwfDR7.js} +1 -1
- package/assets/{secp256k1-ChUNYBFm.js → secp256k1-GlWdSmTG.js} +1 -1
- package/assets/{send-batch-transaction-DShk-gcV.js → send-batch-transaction-D42bEH3M.js} +1 -1
- package/assets/{send-eip712-transaction-SFPP_gAi.js → send-eip712-transaction-DHldBunY.js} +2 -2
- package/assets/{send-gasless-transaction-Docv48io.js → send-gasless-transaction-DAsf2gzP.js} +2 -2
- package/assets/{send-SuqMdrHd.js → send-vszzHyZQ.js} +1 -1
- package/assets/{sendRawTransaction-BPfXMToY.js → sendRawTransaction-BJNSpFJo.js} +3 -3
- package/assets/{serializeTransaction-DMHBLi5b.js → serializeTransaction-Cu2FW0RG.js} +1 -1
- package/assets/{session-proposal-Dt64bUB6.js → session-proposal-CM8vBqao.js} +1 -1
- package/assets/{session-request-DYGsWMHu.js → session-request-CUSobHcI.js} +2 -2
- package/assets/{sha256-BOpGQYDd.js → sha256-jSuq_fL-.js} +1 -1
- package/assets/{signing-C3nvaDy6.js → signing-BhKuxj3M.js} +5 -5
- package/assets/{socials-DJtq6WhW.js → socials-C7Mn2teg.js} +1 -1
- package/assets/{swaps-C4XWvhCd.js → swaps-B3b3BPhb.js} +1 -1
- package/assets/{thirdweb-J8jOmvLe.js → thirdweb-CCaFaDhE.js} +3 -3
- package/assets/{totalSupply-DbaD9nSb.js → totalSupply-Dx-7-6sN.js} +1 -1
- package/assets/{transactionReceipt-PlxEQk-r.js → transactionReceipt-CJdji8HT.js} +1 -1
- package/assets/{transactions-kz-SBtvJ.js → transactions-BtFsRzN5.js} +1 -1
- package/assets/{utils-BbN_2WlV.js → utils-CtSpY5KY.js} +1 -1
- package/assets/{verifyHash-07I5JeUS.js → verifyHash-Bah8UUrJ.js} +1 -1
- package/assets/{w3m-modal-BNZMxn_5.js → w3m-modal-DmKuKuqr.js} +1 -1
- package/assets/{w3m-modal-tB0F86UK.js → w3m-modal-Dy2dzDqd.js} +1 -1
- package/assets/{wait-for-tx-receipt-BMQ-5ARo.js → wait-for-tx-receipt-YXpaJpa1.js} +1 -1
- package/assets/wallet-kind-B3ypFsr7.js +1 -0
- package/assets/{wallets-CiOgCIFj.js → wallets-lynKKcfc.js} +6 -6
- package/assets/{web-connector-Bw0rJWzG.js → web-connector-CRAHa7Tf.js} +3 -3
- package/assets/{writeContract-BqMgtGlJ.js → writeContract-Bvo9In1F.js} +1 -1
- package/assets/{zora-sepolia-BVtVAb15.js → zora-sepolia-9dBUmZVP.js} +1 -1
- package/assets/{zoraTestnet-BbrL5ebv.js → zoraTestnet-0zqjhwdj.js} +1 -1
- package/index.html +9 -10
- package/package.json +2 -2
- package/assets/Assets-ChJgKBH1.js +0 -1
- package/assets/Cart-D6GSuO0K.js +0 -1
- package/assets/GetCredits-Cu6_MyGi.js +0 -2
- package/assets/ImportListings-DmbE9jhc.js +0 -1
- package/assets/ItemDetail-CB3Wmm_G.css +0 -1
- package/assets/ItemDetail-Cb0yRx1Q.js +0 -1
- package/assets/MyAssets-C8Z-Q5EP.js +0 -1
- package/assets/MyPurchases-mx8kVa-5.js +0 -1
- package/assets/Success-BARddMAw.js +0 -1
- package/assets/decimals-C-SFGRlr.js +0 -1
- package/assets/eth_estimateGas-Dt91G8LZ.js +0 -1
- package/assets/eth_getTransactionCount-BjU7s2Kb.js +0 -1
- package/assets/get-ecosystem-wallet-info-B_w9A9F7.js +0 -1
- package/assets/import-DzdYI7x9.js +0 -1
- package/assets/index-7IV-CwwO.js +0 -1
- package/assets/network-Cql6J8Ku.js +0 -1
package/index.html
CHANGED
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
<meta name="author" content="Decentraland" />
|
|
16
16
|
<link rel="canonical" href="https://shop.decentraland.zone/" />
|
|
17
17
|
|
|
18
|
-
<!--
|
|
19
|
-
<link rel="icon" type="image/
|
|
20
|
-
<link rel="
|
|
21
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28661536077.commit-c5e8ad5/apple-touch-icon.png" />
|
|
18
|
+
<!-- Favicon: the Decentraland mark (same as the marketplace). -->
|
|
19
|
+
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/favicon.ico" sizes="16x16 32x32 48x48" />
|
|
20
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/apple-touch-icon.png" />
|
|
22
21
|
<meta name="apple-mobile-web-app-title" content="DCL Shop" />
|
|
23
|
-
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
22
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/site.webmanifest" />
|
|
24
23
|
|
|
25
24
|
<!-- Open Graph -->
|
|
26
25
|
<meta property="og:type" content="website" />
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
<meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
|
|
50
49
|
|
|
51
50
|
<!-- Sitemap -->
|
|
52
|
-
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
51
|
+
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/sitemap.xml" />
|
|
53
52
|
|
|
54
53
|
<!-- Warm the 3D preview / fonts -->
|
|
55
54
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
@@ -61,10 +60,10 @@
|
|
|
61
60
|
<link rel="preconnect" href="https://wearable-preview.decentraland.org" />
|
|
62
61
|
<link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
|
|
63
62
|
<link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
|
|
64
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
65
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
66
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
67
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
63
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/assets/index-MxzGamB6.js"></script>
|
|
64
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/assets/react-E8ng6RF2.js">
|
|
65
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/assets/ethers-BxoDGoYp.js">
|
|
66
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-28703787617.commit-d117df8/assets/index-C--hbOLp.css">
|
|
68
67
|
</head>
|
|
69
68
|
<body>
|
|
70
69
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/shop",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-28703787617.commit-d117df8",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Decentraland",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/decentraland/shop.git"
|
|
10
10
|
},
|
|
11
|
-
"commit": "
|
|
11
|
+
"commit": "d117df8c478596d60c1daec5fa23bb6e17453e07"
|
|
12
12
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as U,r as t,j as e}from"./react-DwvsoSSx.js";import{u as D,A as G,k as K,f as Q}from"./index-BDfhJESf.js";import"./ethers-g2M4Ny1y.js";const j=[{key:"wearable",label:"Wearables",sub:["Head","Upper Body","Handwear","Lower Body","Feet","Accessories","Skins"]},{key:"emote",label:"Emotes",sub:[]},{key:"ens",label:"NAMEs",sub:[]},{key:"parcel",label:"Lands",sub:[]}],W={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"]},Z=["common","uncommon","rare","epic","legendary","mythic","unique","exotic"],p=[{key:"newest",label:"Newest",server:"newest"},{key:"price-asc",label:"Price: Low to High",server:"cheapest"},{key:"price-desc",label:"Price: High to Low",server:"most_expensive"},{key:"name",label:"Name (A–Z)",server:"name"}];function X(){const[P]=U(),_=(P.get("q")??"").trim().toLowerCase(),[c,v]=t.useState("wearable"),[i,m]=t.useState(null),[l,g]=t.useState([]),[o,k]=t.useState(""),[d,C]=t.useState(""),[x,L]=t.useState("newest"),[r,n]=t.useState(null),w=o&&!Number.isNaN(Number(o))?Number(o):void 0,S=d&&!Number.isNaN(Number(d))?Number(d):void 0,M=i?W[i]:void 0,R=(p.find(s=>s.key===x)??p[0]).server,$={category:c,rarities:l.length?l:void 0,wearableCategories:M,minPriceCredits:w,maxPriceCredits:S,search:_||void 0,sortBy:R,first:200},{data:f,isLoading:y,error:A}=D({queryKey:["listings",$],queryFn:()=>Q($),placeholderData:K}),h=(f==null?void 0:f.items)??[];function E(s){v(s),m(null)}function B(s){g(a=>a.includes(s)?a.filter(O=>O!==s):[...a,s])}function H(){v("wearable"),m(null),g([]),k(""),C(""),n(null)}function b(s){n(a=>a===s?null:s)}const q=p.find(s=>s.key===x)??p[0],u=j.find(s=>s.key===c)??j[0],T=i?`${u.label} · ${i}`:u.label,N=!!(w||S),F=N?`${o||"0"}–${d||"∞"}`:"Price",I=c!=="wearable"||!!i||l.length>0||N;return e.jsxs("div",{className:"browse",children:[r?e.jsx("div",{className:"filterbar__scrim",onClick:()=>n(null),"aria-hidden":!0}):null,e.jsxs("div",{className:"filterbar",children:[e.jsxs("div",{className:"filterbar__filters",children:[e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${r==="section"?" is-open":""}${i||c!=="wearable"?" is-active":""}`,onClick:()=>b("section"),children:[T," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),r==="section"?e.jsxs("div",{className:"filter-pop filter-pop--section",children:[e.jsx("ul",{className:"filter-pop__cats",children:j.map(s=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__cat${c===s.key?" is-active":""}`,onClick:()=>E(s.key),children:s.label})},s.key))}),u.sub.length?e.jsxs("ul",{className:"filter-pop__subs",children:[e.jsx("li",{children:e.jsxs("button",{className:`filter-pop__sub${i?"":" is-active"}`,onClick:()=>{m(null),n(null)},children:["All ",u.label]})}),u.sub.map(s=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__sub${i===s?" is-active":""}`,onClick:()=>{m(a=>a===s?null:s),n(null)},children:s})},s))]}):null]}):null]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${r==="rarity"?" is-open":""}${l.length?" is-active":""}`,onClick:()=>b("rarity"),children:["Rarity ",l.length?e.jsx("span",{className:"filterbar__badge",children:l.length}):null," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),r==="rarity"?e.jsx("div",{className:"filter-pop filter-pop--rarity",children:Z.map(s=>e.jsxs("label",{className:"filter-pop__check",children:[e.jsx("input",{type:"checkbox",checked:l.includes(s),onChange:()=>B(s)}),e.jsx("span",{children:s})]},s))}):null]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${r==="price"?" is-open":""}${N?" is-active":""}`,onClick:()=>b("price"),children:[F," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),r==="price"?e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0",placeholder:"Min",value:o,onChange:s=>k(s.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0",placeholder:"Max",value:d,onChange:s=>C(s.target.value)})]}),e.jsx("p",{className:"filter-pop__hint",children:"Price in credits"})]}):null]}),I?e.jsx("button",{className:"filterbar__clear",onClick:H,children:"Clear all"}):null]}),e.jsxs("div",{className:"filterbar__right",children:[e.jsxs("span",{className:"filterbar__count",children:[y?"…":`${h.length.toLocaleString()} item${h.length===1?"":"s"}`,_?` for “${_}”`:""]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__sort${r==="sort"?" is-open":""}`,onClick:()=>b("sort"),children:["Sort by: ",q.label," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),r==="sort"?e.jsx("div",{className:"filter-pop filter-pop--sort",children:p.map(s=>e.jsx("button",{className:`filter-pop__sort${s.key===x?" is-active":""}`,onClick:()=>{L(s.key),n(null)},children:s.label},s.key))}):null]})]})]}),A?e.jsx("p",{className:"error",children:A.message}):null,e.jsx("div",{className:"grid",children:y?Array.from({length:15}).map((s,a)=>e.jsx("div",{className:"card card--skeleton"},a)):h.map(s=>e.jsx(G,{item:s},s.id))}),!y&&h.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null]})}export{X as Assets};
|
package/assets/Cart-D6GSuO0K.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as F,r as f,j as e,L as N}from"./react-DwvsoSSx.js";import{h as m,b as Y,u as B,i as G,j as L,e as Q,l as K,m as P,n as U,o as W,f as A}from"./index-BDfhJESf.js";import{f as C}from"./buy-BBAUmAfR.js";import{g as M,b as R,w as $,G as z}from"./buy-gasless-NviXjZ0f.js";import"./ethers-g2M4Ny1y.js";import"./index-BIqiBFIC.js";function V(t){const i=t,c=(i.message??"").toLowerCase();return i.code===4001||c.includes("reject")||c.includes("denied")||c.includes("cancel")?"You cancelled the request.":c.includes("insufficient")?"You don't have enough credits — get more first.":c.includes("no active listing")?i.message:"Couldn't complete checkout — please try again."}function D(t){return W(t.received[0].amount)}function se(){const t=m(s=>s.items),i=m(s=>s.remove),c=m(s=>s.clear),w=m(s=>s.add),{session:r}=Y(),{data:h}=B({queryKey:["upsell-listings"],queryFn:()=>A({first:40}),staleTime:6e4}),{data:p}=G(r),j=L(),k=F(),[_,o]=f.useState(null),[b,x]=f.useState(null),[u,y]=f.useState(!1),E=t.reduce((s,l)=>s+l.priceCredits,0),S=new Set(t.map(s=>s.id)),v=((h==null?void 0:h.items)??[]).filter(s=>!S.has(s.id)).slice(0,6);async function T(){if(!r){x("Sign in to check out.");return}x(null),y(!0);const s=t.slice(),l=[];try{o("Preparing your order…");const n=[];for(const a of t){const d=a.tradeId?await Q(a.tradeId):await K(a.contractAddress,a.itemId??"");if(!d)throw new Error(`No active listing for ${a.name}.`);const q=D(d),{credit:g,maxCreditedValue:I}=await P(r.identity,q,a.tradeId);l.push(g.id),n.push({trade:d,credits:[g],maxCreditedValue:I})}if(o("Confirming your purchase…"),M())try{const a=await R({purchases:n,buyer:r.address,signer:r.signer});await Promise.all(a.map(d=>$(d)))}catch(a){if(!(a instanceof z))throw a;await C({purchases:n,buyer:r.address,signer:r.signer})}else await C({purchases:n,buyer:r.address,signer:r.signer});c(),o("Purchased! 🎉"),j.invalidateQueries({queryKey:["usd-balance"]}),k("/success",{state:{items:s}})}catch(n){if(console.error("[checkout] failed",n),l.length){try{await U(r.identity,l)}catch(a){console.error("[checkout] release failed",a)}j.invalidateQueries({queryKey:["usd-balance"]})}x(V(n)),o(null)}finally{y(!1)}}return t.length===0?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx("span",{className:"ico ico-cart cart-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"cart-empty__title",children:"Your cart is empty"}),e.jsx("p",{className:"muted",children:"Find something you love and it’ll show up here."}),e.jsx(N,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]}):e.jsxs("div",{className:"cart",children:[e.jsxs("h1",{children:["Cart (",t.length,")"]}),e.jsx("div",{className:"cart__list",children:t.map(s=>e.jsxs("div",{className:"cart__row",children:[e.jsx("div",{className:"cart__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}),e.jsxs("div",{className:"cart__info",children:[e.jsx("div",{className:"cart__name",children:s.name}),e.jsx("div",{className:"muted",children:s.creator?`By ${s.creator}`:""})]}),e.jsxs("div",{className:"cart__price",children:["◈ ",s.priceCredits]}),e.jsx("button",{className:"link",onClick:()=>i(s.id),disabled:u,children:"Remove"})]},s.id))}),e.jsxs("div",{className:"cart__foot",children:[e.jsxs("div",{className:"cart__total",children:[e.jsxs("div",{children:["Total ",e.jsxs("strong",{children:["◈ ",E]})]}),r?e.jsxs("div",{className:"muted cart__balance",children:["Your balance: ◈ ",(p==null?void 0:p.credits)??0]}):null]}),e.jsxs("div",{className:"cart__actions",children:[e.jsx(N,{className:"btn btn--ghost",to:"/credits",children:"Get credits"}),null,e.jsx("button",{className:"btn btn--ghost",onClick:c,disabled:u,children:"Clear"}),e.jsx("button",{className:"btn btn--purple",onClick:T,disabled:u,children:"Checkout"})]})]}),_?e.jsx("p",{className:"muted",style:{marginTop:12},children:_}):null,b?e.jsx("p",{className:"error",style:{marginTop:12},children:b}):null,v.length>0?e.jsxs("div",{className:"cart-upsell",children:[e.jsx("h2",{className:"cart-upsell__title",children:"You might also like"}),e.jsx("div",{className:"cart-upsell__row",children:v.map(s=>e.jsxs("div",{className:"cart-upsell__card",children:[e.jsx("div",{className:"cart-upsell__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}),e.jsx("div",{className:"cart-upsell__name",title:s.name,children:s.name}),e.jsxs("div",{className:"cart-upsell__price",children:["◈ ",s.priceCredits]}),e.jsx("button",{className:"btn btn--sm cart-upsell__add",onClick:()=>w(s),disabled:u,children:"Add"})]},s.id))})]}):null]})}export{se as Cart};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RealCheckout-Df7L_Xxc.js","assets/react-DwvsoSSx.js","assets/index-BDfhJESf.js","assets/ethers-g2M4Ny1y.js","assets/index-BHSgamRG.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{q as E,b as $,j as G,_ as M}from"./index-BDfhJESf.js";import{a as R,r as i,j as e}from"./react-DwvsoSSx.js";import{C as y}from"./CircularProgress-DGwI2EN6.js";import"./ethers-g2M4Ny1y.js";import"./generateUtilityClasses-Bkw0uvCo.js";const T=.1,b=[{id:"pack_5",usd:5,credits:_(5)},{id:"pack_10",usd:10,credits:_(10)},{id:"pack_25",usd:25,credits:_(25),bestValue:!0},{id:"pack_50",usd:50,credits:_(50)}];function _(t){return Math.round(t/T)}function C(t){return b.find(s=>s.id===t)}const p="mock_cs_";function I(){return!0}async function V(t,s){const r=C(t);if(!r)throw new Error("Unknown pack");return D(r)}async function A(t,s={}){const{intervalMs:r,timeoutMs:c,signal:a,identity:n}=s;if(t.startsWith(p)||I())return B(t,s)}function D(t){const s=`${p}${t.id}_${Date.now()}`;return k(400).then(()=>({orderId:s,clientSecret:`${p}${t.id}`,mock:!0}))}async function B(t,s={}){await k(s.intervalMs??900);const r=t.replace(p,"").replace(/_\d+$/,""),c=C(r),a=(c==null?void 0:c.credits)??0;if(s.address&&c)try{const n=await E(s.address,Math.round(c.usd*100));return{status:"credited",creditsGranted:a,newBalance:n.credits}}catch(n){return{status:"failed",error:n.message}}return{status:"credited",creditsGranted:a,newBalance:a}}function k(t,s){return new Promise((r,c)=>{setTimeout(r,t)})}const U=i.lazy(()=>M(()=>import("./RealCheckout-Df7L_Xxc.js"),__vite__mapDeps([0,1,2,3,4])));function N(t){const s=t;if((s==null?void 0:s.name)==="AbortError")return"You cancelled the request.";const r=((s==null?void 0:s.message)??"").toLowerCase();return r.includes("sign in")?"Sign in to get credits.":r.includes("timed out")?"This is taking longer than usual — your credits will appear shortly.":"Couldn't complete your purchase — please try again."}function W(){const t=R(),{session:s,signIn:r}=$(),c=G(),[a,n]=i.useState("select"),[o,m]=i.useState(null),[h,g]=i.useState(null),[v,f]=i.useState(null),[w,u]=i.useState(null),x=i.useRef(null);i.useEffect(()=>()=>{var l;return(l=x.current)==null?void 0:l.abort()},[]);const P=i.useCallback(async l=>{if(!s){r();return}u(null),m(l),n("paying");try{const d=await V(l.id,{address:s.address,identity:s.identity});g(d)}catch(d){console.error(d),u(N(d)),n("error")}},[s,r]),S=i.useCallback(async()=>{if(!h)return;n("processing");const l=new AbortController;x.current=l;try{const d=await A(h.orderId,{signal:l.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});d.status==="credited"?(f(d.creditsGranted??(o==null?void 0:o.credits)??0),n("success"),c.invalidateQueries({queryKey:["usd-balance"]})):(u(d.error??"Couldn't add your credits — please try again."),n("error"))}catch(d){console.error(d),u(N(d)),n("error")}},[h,o,s,c]);function j(){var l;(l=x.current)==null||l.abort(),n("select"),m(null),g(null),f(null),u(null)}return e.jsxs("div",{className:"getcredits",children:[e.jsxs("header",{className:"getcredits__head",children:[e.jsx("h1",{className:"getcredits__title",children:"Get credits"}),e.jsx("p",{className:"muted",children:"Add credits to your account to shop. Pay with any card."})]}),a==="select"&&e.jsx(q,{onSelect:P}),a==="paying"&&o&&e.jsx(z,{pack:o,checkout:h,onPaid:S,onCancel:j}),a==="processing"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(y,{size:40}),e.jsx("p",{className:"getcredits__status-title",children:"Adding your credits…"}),e.jsx("p",{className:"muted",children:"Payment received. Just a moment while we top up your balance."})]}),a==="success"&&e.jsxs("div",{className:"getcredits__status getcredits__status--ok",role:"status","aria-live":"polite",children:[e.jsx("div",{className:"getcredits__confetti","aria-hidden":!0,children:"🎉"}),e.jsx("p",{className:"getcredits__status-title",children:"You’re all set!"}),e.jsxs("p",{className:"muted",children:[e.jsxs("strong",{children:["◈ ",v]})," credits added to your account."]}),e.jsxs("div",{className:"getcredits__status-actions",children:[e.jsx("button",{className:"btn",onClick:()=>t("/cart"),children:"Back to cart"}),e.jsx("button",{className:"btn btn--ghost",onClick:j,children:"Get more credits"})]})]}),a==="error"&&e.jsxs("div",{className:"getcredits__status getcredits__status--err",role:"alert",children:[e.jsx("p",{className:"getcredits__status-title",children:"Something went wrong"}),e.jsx("p",{className:"error",children:w}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn",onClick:j,children:"Try again"})})]})]})}function q({onSelect:t}){return e.jsx("div",{className:"packs",children:b.map(s=>e.jsxs("button",{type:"button",className:`pack${s.bestValue?" pack--best":""}`,onClick:()=>t(s),"aria-label":`Get ${s.credits} credits for $${s.usd}`,children:[s.bestValue&&e.jsx("span",{className:"pack__ribbon",children:"Best value"}),e.jsxs("span",{className:"pack__credits",children:[e.jsx("span",{className:"ico ico-credits pack__credits-ico","aria-hidden":!0}),s.credits]}),e.jsx("span",{className:"pack__label",children:"credits"}),e.jsxs("span",{className:"pack__price",children:["$",s.usd]}),e.jsx("span",{className:"pack__cta",children:"Get credits"})]},s.id))})}function z({pack:t,checkout:s,onPaid:r,onCancel:c}){return e.jsxs("div",{className:"pay",children:[e.jsxs("div",{className:"pay__summary",children:[e.jsx("button",{className:"link",onClick:c,children:"← Choose a different pack"}),e.jsxs("div",{className:"pay__summary-row",children:[e.jsx("span",{children:"You’ll get"}),e.jsxs("strong",{children:["◈ ",t.credits," credits"]})]}),e.jsxs("div",{className:"pay__summary-row pay__summary-row--total",children:[e.jsx("span",{children:"You pay"}),e.jsxs("strong",{children:["$",t.usd]})]})]}),e.jsx("div",{className:"pay__form",children:s?s.mock?e.jsx(Y,{onPaid:r,amountUsd:t.usd}):e.jsx(i.Suspense,{fallback:e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(y,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]}),children:e.jsx(U,{clientSecret:s.clientSecret,onComplete:r})}):e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(y,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]})})]})}function Y({onPaid:t,amountUsd:s}){const[r,c]=i.useState("4242 4242 4242 4242"),[a,n]=i.useState(!1);function o(){n(!0),setTimeout(()=>t(),700)}return e.jsxs("div",{className:"card-form","aria-label":"Payment details",children:[e.jsx("p",{className:"muted small card-form__note",children:"Demo mode — no real charge is made."}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Card number"}),e.jsx("input",{value:r,onChange:m=>c(m.target.value),disabled:a,inputMode:"numeric"})]}),e.jsxs("div",{className:"card-form__row",children:[e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Expiry"}),e.jsx("input",{defaultValue:"12 / 34",disabled:a})]}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"CVC"}),e.jsx("input",{defaultValue:"123",disabled:a,inputMode:"numeric"})]})]}),e.jsx("button",{className:"btn btn--purple card-form__pay",onClick:o,disabled:a,children:a?"Processing…":`Pay $${s}`})]})}export{W as GetCredits,W as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as $,r as d,j as e,L}from"./react-DwvsoSSx.js";import{b as E,j as M,u as Q,t as K}from"./index-BDfhJESf.js";import{i as F,f as P}from"./import-DzdYI7x9.js";import"./ethers-g2M4Ny1y.js";import"./buy-BBAUmAfR.js";import"./index-BIqiBFIC.js";function A({queue:r,session:k,onClose:x,onDone:m}){const g=$(),[t,_]=d.useState(()=>r.map(()=>"pending")),[S,j]=d.useState("running"),y=d.useRef(!1);d.useEffect(()=>{if(y.current)return;y.current=!0;let i=!1;return(async()=>{for(let n=0;n<r.length;n++){if(i)return;_(c=>c.map((o,u)=>u===n?"active":o));try{await F(r[n].item,r[n].priceCredits,k),i||_(c=>c.map((o,u)=>u===n?"done":o))}catch(c){const o=c,u=o.code===4001||/reject|denied|cancel/i.test(o.message??"");i||_(I=>I.map((v,w)=>w===n?u?"skipped":"failed":v))}}i||j("finished")})(),()=>{i=!0}},[]);const p=t.filter(i=>i==="done").length,N=t.findIndex(i=>i==="active"),f=Math.round(t.filter(i=>i!=="pending"&&i!=="active").length/r.length*100);function h(){m(),x()}if(S==="finished"){const i=t.filter(n=>n==="skipped"||n==="failed").length;return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal modal--success",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:p>0?"You're in the Shop! 🎉":"Nothing listed"}),e.jsxs("p",{className:"muted",style:{margin:0},children:[p>0?`${p} ${p===1?"item is":"items are"} now for sale with credits.`:"No items were listed.",i>0?` ${i} skipped — you can try those again anytime.`:""]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:h,children:"Done"}),p>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{m(),x(),g("/assets")},children:"View in Shop"}):null]})]})})}return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal migrate",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx("h2",{className:"modal__title",children:"Listing your items"}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:["Confirm each item to add it to the Shop. ",N>=0?`${N+1} of ${r.length}`:""]}),e.jsx("div",{className:"migrate__progress",children:e.jsx("div",{className:"migrate__bar",style:{width:`${f}%`}})}),e.jsx("ul",{className:"migrate__list",children:r.map((i,n)=>e.jsxs("li",{className:`migrate__row migrate__row--${t[n]}`,children:[e.jsx("span",{className:"migrate__thumb",children:i.item.thumbnail?e.jsx("img",{src:i.item.thumbnail,alt:""}):null}),e.jsx("span",{className:"migrate__name",title:i.item.name,children:i.item.name||"Item"}),e.jsxs("span",{className:"migrate__price",children:["◈ ",i.priceCredits.toLocaleString()]}),e.jsx("span",{className:"migrate__status",children:t[n]==="active"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner migrate__spin","aria-hidden":!0})," Confirm…"]}):t[n]==="done"?e.jsx("span",{className:"migrate__tick",children:"✓"}):t[n]==="skipped"?e.jsx("span",{className:"migrate__skip",children:"Skipped"}):t[n]==="failed"?e.jsx("span",{className:"migrate__skip",children:"Failed"}):e.jsx("span",{className:"migrate__wait",children:"Waiting"})})]},i.item.oldTradeId))}),e.jsx("p",{className:"muted small migrate__hint",children:"A quick confirmation pops up for each item. Keep this open."})]})})}const Y=[{key:"creations",title:"Your creations",sub:"Items you made. Put them on sale in the Shop."},{key:"owned",title:"Items you own",sub:"Things you've bought elsewhere — resell them in the Shop."}];function G(){const{session:r,signIn:k,restore:x}=E(),m=M(),g=r==null?void 0:r.address;d.useEffect(()=>{x()},[x]);const{data:t,isLoading:_}=Q({queryKey:["importable",g],queryFn:()=>P(g),enabled:!!g}),[S,j]=d.useState({}),[y,p]=d.useState(new Set),[N,f]=d.useState(null),h=d.useMemo(()=>[...(t==null?void 0:t.creations)??[],...(t==null?void 0:t.owned)??[]],[t]);d.useEffect(()=>{h.length&&j(a=>{const l={...a};for(const s of h)l[s.oldTradeId]==null&&(l[s.oldTradeId]=s.suggestedCredits);return l})},[h]);const i=a=>!y.has(a),n=a=>S[a.oldTradeId]??a.suggestedCredits,c=h.filter(a=>i(a.oldTradeId)),o=c.reduce((a,l)=>a+n(l),0);function u(a,l){const s=l.replace(/[^\d]/g,"");j(b=>({...b,[a]:s===""?0:parseInt(s,10)}))}function I(a){p(l=>{const s=new Set(l);return s.has(a)?s.delete(a):s.add(a),s})}function v(a){return a.map(l=>({item:l,priceCredits:Math.max(1,n(l))}))}function w(){m.invalidateQueries({queryKey:["importable"]}),m.invalidateQueries({queryKey:["listings"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["collection-sale-state"]}),K.success("Your Shop is updated.")}return r?!_&&h.length===0?e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"✨"}),e.jsx("h1",{className:"imp-empty__title",children:"You're all caught up"}),e.jsx("p",{className:"muted",children:"Everything you sell is already in the Shop — nothing to import."}),e.jsx(L,{className:"btn btn--purple",to:"/my-assets",children:"Go to My Assets"})]}):e.jsxs("div",{className:"imp",children:[e.jsxs("header",{className:"imp__head",children:[e.jsx("span",{className:"imp__eyebrow",children:"Import to the Shop"}),e.jsxs("h1",{className:"imp__title",children:["Bring your listings ",e.jsx("span",{className:"imp__grad",children:"into the Shop"})]}),e.jsx("p",{className:"imp__lede",children:"These items are already for sale elsewhere. We suggested a price in credits for each — matched to today's rate and rounded up. Adjust anything, then list them."})]}),e.jsxs("div",{className:"imp__ratebar",children:[e.jsx("span",{className:"imp__diamond",children:"◈"})," 1 credit = $0.10 · prices rounded up"]}),_?e.jsx("div",{className:"imp__list",children:Array.from({length:4}).map((a,l)=>e.jsx("div",{className:"imp-row imp-row--skeleton"},l))}):Y.map(a=>{const l=(t==null?void 0:t[a.key])??[];return l.length===0?null:e.jsxs("section",{className:"imp__section",children:[e.jsxs("div",{className:"imp__section-head",children:[e.jsx("h2",{className:"imp__section-title",children:a.title}),e.jsx("span",{className:"imp__section-sub",children:a.sub})]}),e.jsx("div",{className:"imp__list",children:l.map(s=>{const b=n(s),T=b!==s.suggestedCredits;return e.jsxs("article",{className:`imp-row${i(s.oldTradeId)?"":" is-off"}`,children:[e.jsx("input",{type:"checkbox",className:"imp-check",checked:i(s.oldTradeId),onChange:()=>I(s.oldTradeId),"aria-label":`Include ${s.name}`}),e.jsx("div",{className:"imp-thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{className:"imp-meta",children:[e.jsx("div",{className:"imp-name",title:s.name,children:s.name||"Item"}),e.jsx("span",{className:"imp-chip",children:s.rarity})]}),e.jsxs("div",{className:"imp-price",children:[e.jsxs("div",{className:"imp-price__field",children:[e.jsx("span",{className:"imp-price__diamond","aria-hidden":!0,children:"◈"}),e.jsx("input",{className:"imp-price__input",inputMode:"numeric",value:b.toLocaleString(),onChange:C=>u(s.oldTradeId,C.target.value),"aria-label":`Price in credits for ${s.name}`})]}),e.jsxs("div",{className:"imp-price__sub",children:[e.jsxs("span",{children:["$",(b*.1).toFixed(2)]}),T?e.jsxs("button",{className:"imp-price__reset",onClick:()=>j(C=>({...C,[s.oldTradeId]:s.suggestedCredits})),children:["Reset to ◈",s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx("div",{className:"imp-action",children:e.jsx("button",{className:"btn btn--sm imp-row__list",disabled:!i(s.oldTradeId),onClick:()=>f(v([s])),children:"List"})})]},s.oldTradeId)})})]},a.key)}),e.jsx("div",{className:"imp-dock",children:e.jsxs("div",{className:"imp-dock__inner",children:[e.jsxs("div",{className:"imp-dock__summary",children:[e.jsxs("div",{className:"imp-dock__total",children:[e.jsx("span",{className:"imp__diamond",children:"◈"})," ",o.toLocaleString()]}),e.jsxs("div",{className:"imp-dock__sub",children:[c.length," item",c.length===1?"":"s"," selected · $",(o*.1).toFixed(2)]})]}),e.jsx("span",{className:"imp-dock__spacer"}),e.jsxs("button",{className:"btn btn--purple imp-dock__cta",disabled:c.length===0,onClick:()=>f(v(c)),children:["List all (",c.length,")"]})]})}),N&&r?e.jsx(A,{queue:N,session:r,onClose:()=>f(null),onDone:w}):null]}):e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"📦"}),e.jsx("h1",{className:"imp-empty__title",children:"Import your listings"}),e.jsx("p",{className:"muted",children:"Sign in to bring the items you already sell into the Shop."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>k(),children:"Sign in"})]})}export{G as ImportListings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.item-detail{max-width:1721px;margin:0 auto}.item-detail__crumbs{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-bottom:22px}.item-detail__crumb-link{background:none;border:0;padding:0;font:inherit;color:var(--muted)}.item-detail__crumb-link:hover{color:var(--text)}.item-detail__crumb-sep{color:var(--muted-2)}.item-detail__crumb-current{color:var(--text);font-weight:600}.item-detail__main{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(320px,522px);gap:40px;align-items:start}@media(max-width:900px){.item-detail__main{grid-template-columns:1fr}}.item-detail__preview{position:relative;height:min(752px,70vh);border-radius:var(--radius-card);overflow:hidden;background:var(--media)}.item-detail__preview iframe,.item-detail__preview>*{width:100%;height:100%;border:0;display:block}.item-detail__info{display:flex;flex-direction:column;gap:14px}.item-detail__info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.item-detail__title{font-size:clamp(24px,2.4vw,34px);font-weight:700;line-height:1.15;color:var(--text)}.item-detail__fav{flex:none;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:#fff;display:grid;place-items:center;color:var(--text)}.item-detail__fav .ico-heart{width:18px;height:18px}.item-detail__creator{color:var(--muted);font-size:14px;margin-top:-6px}.item-detail__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.item-detail__card{margin-top:8px;border:1px solid var(--line);border-radius:var(--radius-card);padding:20px;display:flex;flex-direction:column;gap:16px;background:#fff}.item-detail__price-block{display:flex;flex-direction:column;gap:6px}.item-detail__price-label{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}.item-detail__price{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--text-2)}.item-detail__diamond{width:28px;height:28px;color:var(--text-2)}.item-detail__price-value{font-size:34px;line-height:1}.item-detail__price--none{font-size:18px;color:var(--muted)}.item-detail__balance{font-size:13px}.item-detail__ctas{display:flex;flex-direction:column;gap:12px}.item-detail__cta{width:100%;height:44px;text-align:center}.item-detail__addcart{width:100%;height:44px;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--black-btn);color:var(--soft-white);border:0;border-radius:var(--radius-btn);font-weight:600;font-size:13px;text-transform:uppercase;letter-spacing:.046em}.item-detail__addcart:disabled{opacity:.55;cursor:default}.item-detail__addcart-ico{width:20px;height:20px}.item-detail__status{margin:0;font-size:13px}.collection-carousel{margin-top:56px}.collection-carousel__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.collection-carousel__title{font-size:20px;font-weight:600;color:var(--text)}.collection-carousel__arrows{display:flex;gap:10px}.collection-carousel__arrow{width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:var(--text);font-size:22px;line-height:1;display:grid;place-items:center;box-shadow:0 6px 16px #16151829;transition:transform .12s ease,box-shadow .12s ease}.collection-carousel__arrow:hover{transform:scale(1.06);box-shadow:0 8px 20px #16151833}@media(prefers-reduced-motion:reduce){.collection-carousel__arrow{transition:none}}.collection-carousel__track{display:flex;gap:16px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}.collection-carousel__card{flex:0 0 220px;scroll-snap-align:start;text-align:left;background:#fff;border:1px solid var(--line);border-radius:var(--radius-card);overflow:hidden;padding:0;display:flex;flex-direction:column;transition:box-shadow .15s ease,transform .15s ease}.collection-carousel__card:hover{transform:translateY(-2px);box-shadow:0 0 0 2px var(--brand-violet),0 10px 30px #a524b347}.collection-carousel__card.is-active{box-shadow:0 0 0 2px var(--accent)}.collection-carousel__media{position:relative;aspect-ratio:1 / 1;background:var(--media)}.collection-carousel__img{width:100%;height:100%;object-fit:contain;display:block}.collection-carousel__body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:8px}.collection-carousel__name{font-weight:600;font-size:14px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.collection-carousel__meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.collection-carousel__price{display:flex;align-items:center;gap:5px;font-weight:600;font-size:15px;color:var(--text-2)}.collection-carousel__diamond{width:14px;height:14px;color:var(--text-2)}.collection-carousel__chips{display:flex;align-items:center;gap:6px}.collection-carousel__na{color:var(--muted);font-weight:600;font-size:13px}.collection-carousel__card{cursor:pointer}.collection-carousel__card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.collection-carousel__add{position:absolute;bottom:10px;right:10px;z-index:2;width:34px;height:34px;border-radius:50%;border:0;background:var(--accent);color:#fff;display:grid;place-items:center;box-shadow:0 4px 12px #691fa959;transition:transform .12s ease,background .15s ease}.collection-carousel__add:hover{transform:scale(1.08)}.collection-carousel__add:disabled{background:var(--muted-2);cursor:default;box-shadow:none}.collection-carousel__add .ico{width:18px;height:18px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as h,d as H,b as Q,a as Z}from"./react-DwvsoSSx.js";import{g as B,b as P,v as J,W as X,s as v,h as C,t as ee,i as te,u as L,C as ae,e as se,o as ie,m as re,w as ne,l as ce}from"./index-BDfhJESf.js";import{h as M}from"./buy-BBAUmAfR.js";import{g as le,a as oe,w as de,G as ue}from"./buy-gasless-NviXjZ0f.js";import{f as me}from"./ethers-g2M4Ny1y.js";import"./index-BIqiBFIC.js";function he(t){if(!t)return 0;try{return Math.floor(Number(me(t))*10)}catch{return 0}}function fe(t){if(!t||t.length===0)return null;const n=t.some(c=>c.includes("Male")),s=t.some(c=>c.includes("Female"));return n&&s?"unisex":n?"male":s?"female":null}function _e(t){var n,s,c,o,_,d;return{id:t.id,name:t.name,creator:t.creator??"",contractAddress:t.contractAddress,itemId:t.itemId??null,category:t.category,wearableCategory:((s=(n=t.data)==null?void 0:n.wearable)==null?void 0:s.category)??((o=(c=t.data)==null?void 0:c.emote)==null?void 0:o.category),rarity:t.rarity??"common",network:t.network,chainId:t.chainId,thumbnail:t.thumbnail??"",priceCredits:he(t.price??t.minPrice),gender:fe((d=(_=t.data)==null?void 0:_.wearable)==null?void 0:d.bodyShapes)}}async function pe(t,{first:n=20}={}){const s=new URLSearchParams({contractAddress:t,first:String(n),includeSocialEmotes:"false"}),c=await fetch(`${B.nftApiUrl}/v1/items?${s.toString()}`);if(!c.ok)throw new Error(`fetchCollectionItems ${c.status}`);const{data:o}=await c.json();return(o??[]).map(_e)}function Ie({item:t}){const n=P(_=>{var d;return(d=_.session)==null?void 0:d.address}),{data:s}=J(n),c=n&&s?n:"default",o=t.category==="emote";return e.jsx(X,{id:"shop-item-preview",contractAddress:t.contractAddress,tokenId:t.tokenId??void 0,itemId:t.tokenId?void 0:t.itemId??void 0,profile:c,type:o?void 0:v.PreviewType.AVATAR,emote:o?void 0:v.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:o?1.5:void 0,wheelStart:o?100:void 0,dev:B.chainId===80002,disableFadeEffect:!0},t.id)}function xe(t){return t==="male"?"♂":t==="female"?"♀":t==="unisex"?"⚥":""}function ye({title:t,items:n,activeId:s,onSelect:c}){const o=h.useRef(null),_=C(i=>i.add),d=C(i=>i.items.map(u=>u.id));if(n.length===0)return null;function b(i){_(i),ee.success(`“${i.name}” added to your cart.`)}function a(i){const u=o.current;u&&u.scrollBy({left:i*Math.round(u.clientWidth*.8),behavior:"smooth"})}return e.jsxs("section",{className:"collection-carousel",children:[e.jsxs("div",{className:"collection-carousel__head",children:[e.jsx("h2",{className:"collection-carousel__title",children:t}),e.jsxs("div",{className:"collection-carousel__arrows",children:[e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>a(-1),"aria-label":"Scroll left",children:"‹"}),e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>a(1),"aria-label":"Scroll right",children:"›"})]})]}),e.jsx("div",{className:"collection-carousel__track",ref:o,children:n.map(i=>{const u=xe(i.gender),j=i.id===s,N=i.priceCredits>0,f=d.includes(i.id);return e.jsxs("article",{className:`collection-carousel__card${j?" is-active":""}`,onClick:()=>c(i),role:"button",tabIndex:0,"aria-current":j||void 0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),c(i))},children:[e.jsxs("div",{className:"collection-carousel__media",children:[i.thumbnail?e.jsx("img",{className:"collection-carousel__img",src:i.thumbnail,alt:i.name,loading:"lazy"}):null,N?e.jsx("button",{className:"collection-carousel__add",disabled:f,"aria-label":f?"In cart":`Add ${i.name} to cart`,title:f?"In cart":"Add to cart",onClick:p=>{p.stopPropagation(),f||b(i)},children:e.jsx("span",{className:`ico ${f?"ico-cart-solid":"ico-cart"}`,"aria-hidden":!0})}):null]}),e.jsxs("div",{className:"collection-carousel__body",children:[e.jsx("div",{className:"collection-carousel__name",title:i.name,children:i.name}),e.jsxs("div",{className:"collection-carousel__meta",children:[N?e.jsxs("span",{className:"collection-carousel__price",children:[e.jsx("span",{className:"ico ico-credits collection-carousel__diamond","aria-hidden":!0}),i.priceCredits]}):e.jsx("span",{className:"collection-carousel__price collection-carousel__na",children:"Not listed"}),e.jsxs("span",{className:"collection-carousel__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:i.rarity}),u?e.jsx("span",{className:"chip chip--icon",children:u}):null]})]})]})]},i.id)})})]})}function be(t){return Object.values(v.Rarity).includes(t)}function je(t){return t==="male"?"Male":t==="female"?"Female":t==="unisex"?"Unisex":null}function Ne(t){const n=t,s=(n.message??"").toLowerCase();return n.code===4001||s.includes("reject")||s.includes("denied")||s.includes("cancel")?"You cancelled the request.":s.includes("insufficient")?"You don't have enough credits — get more first.":s.includes("no active listing")||s.includes("not for sale")?"This item is not for sale right now.":"Couldn't complete checkout — please try again."}function Ee(){const{contractAddress:t,tokenId:n}=H(),{state:s}=Q(),c=Z(),o=C(r=>r.add),_=C(r=>r.items),{session:d}=P(),{data:b}=te(d),[a,i]=h.useState(()=>s!=null&&s.item?{...s.item,tradeId:s.tradeId??s.item.tradeId}:{id:`${t}-${n}`,name:"",creator:"",contractAddress:t??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:B.chainId,thumbnail:"",priceCredits:0,gender:null,tokenId:n??void 0,tradeId:s==null?void 0:s.tradeId}),[u,j]=h.useState(!1),[N,f]=h.useState(null),[p,g]=h.useState(null),{data:x=[]}=L({queryKey:["collection-items",a.contractAddress],enabled:!!a.contractAddress,queryFn:()=>pe(a.contractAddress,{first:20})}),{data:A}=L({queryKey:["shop-item",a.contractAddress,n],enabled:!(s!=null&&s.item)&&!!a.contractAddress&&!!n,queryFn:()=>ne(a.contractAddress,n)});h.useEffect(()=>{A&&i(r=>r.tradeId?r:{...A})},[A]),h.useEffect(()=>{if(a.name||x.length===0)return;const r=n&&x.find(l=>l.tokenId===n||l.itemId===n)||x.find(l=>l.contractAddress===a.contractAddress);r&&i(l=>({...r,tradeId:l.tradeId??r.tradeId}))},[x]);const q=h.useMemo(()=>{const r=new Set,l=[];for(const m of x){if(m.id===a.id||a.itemId&&m.itemId===a.itemId||a.tokenId&&m.tokenId===a.tokenId)continue;const w=`${m.contractAddress}-${m.itemId??m.tokenId??m.id}`;r.has(w)||(r.add(w),l.push(m))}return l},[x,a.id,a.itemId,a.tokenId]),{data:R,isLoading:E}=L({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(a.itemId){const r=await ce(a.contractAddress,a.itemId);return(r==null?void 0:r.id)??null}return null}}),I=a.tradeId??R??void 0,y=!!I,S=h.useMemo(()=>({...a,tradeId:I,id:I??a.id}),[a,I]),$=_.some(r=>r.id===S.id);h.useEffect(()=>{f(null),g(null)},[a.id]);function W(r){i(r);const l=r.tokenId??r.itemId??"";c(`/item/${r.contractAddress}/${l}`,{replace:!0,state:{item:r}}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}function G(){!y||$||o(S)}async function U(){var r;if(!(!y||!I)){if(!d){g("Log in to check out.");return}g(null),j(!0);try{f(`Buying ${a.name||"item"}…`);const l=await se(I);if(!l)throw new Error("not for sale");const m=(r=l.received)==null?void 0:r[0],w=ie(m==null?void 0:m.amount),{credit:Y,maxCreditedValue:z}=await re(d.identity,w,I),T={trade:l,buyer:d.address,signer:d.signer,credits:[Y],maxCreditedValue:z};if(le())try{const k=await oe(T);await de(k)}catch(k){if(!(k instanceof ue))throw k;await M(T)}else await M(T);c("/success",{state:{items:[S]}})}catch(l){console.error("[detail] buy now failed:",l),g(Ne(l)),f(null)}finally{j(!1)}}}const K=be(a.rarity)?a.rarity:v.Rarity.COMMON,[O]=v.Rarity.getGradient(K),F=je(a.gender),D="More from this collection",V=y?$?"In cart":E?"Checking…":"Add to cart":"Not for sale";return e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>c("/assets"),children:"Collectibles"}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:a.name||"Item"})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsx("div",{className:"item-detail__preview",style:{background:`radial-gradient(circle at 50% 38%, ${O}33 0%, var(--media) 68%)`},children:e.jsx(Ie,{item:a})}),e.jsxs("div",{className:"item-detail__info",children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:a.name||"Loading…"}),e.jsx("button",{className:"item-detail__fav","aria-label":"Add to favorites",children:e.jsx("span",{className:"ico ico-heart","aria-hidden":!0})})]}),a.creator?e.jsx(ae,{address:a.creator,className:"item-detail__creator"}):null,e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:a.rarity}),e.jsx("span",{className:"chip",children:a.category==="emote"?"Emote":"Wearable"}),F?e.jsx("span",{className:"chip",children:F}):null]}),e.jsxs("div",{className:"item-detail__card",children:[e.jsxs("div",{className:"item-detail__price-block",children:[e.jsx("div",{className:"item-detail__price-label",children:"Price"}),y?e.jsxs("div",{className:"item-detail__price",children:[e.jsx("span",{className:"ico ico-credits item-detail__diamond","aria-hidden":!0}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:"Not for sale"}),d?e.jsxs("div",{className:"item-detail__balance muted",children:["Your balance: ◈ ",(b==null?void 0:b.credits)??0]}):null]}),e.jsxs("div",{className:"item-detail__ctas",children:[y?e.jsx("button",{className:"btn btn--purple item-detail__cta",onClick:U,disabled:u||E,children:u?"Working…":"Buy now"}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:G,disabled:!y||$||E||u,children:[e.jsx("span",{className:"ico ico-cart-solid item-detail__addcart-ico","aria-hidden":!0}),V]})]}),N?e.jsx("p",{className:"muted item-detail__status",children:N}):null,p?e.jsx("p",{className:"error item-detail__status",children:p}):null]})]})]}),e.jsx(ye,{title:D,items:q,activeId:a.id,onSelect:W})]})}export{Ee as ItemDetail,Ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as F,r as u,j as s,L as J}from"./react-DwvsoSSx.js";import{s as W,g as O,x as Z,j as U,p as V,t as Q,b as ee,u as E,e as se,y as ne,z as ae}from"./index-BDfhJESf.js";import{f as te}from"./import-DzdYI7x9.js";import{a as le,b as ie,i as re,e as ce,c as oe,d as de}from"./buy-BBAUmAfR.js";import"./ethers-g2M4Ny1y.js";import"./index-BIqiBFIC.js";const q=()=>`${O.builderServerUrl}/v1`;function G(e){return Array.isArray(e)?e:"results"in e&&Array.isArray(e.results)?e.results:"data"in e&&Array.isArray(e.data)?e.data:[]}async function H(e,l){const a=await Z(e,{method:"GET",identity:l,metadata:{}});if(!a.ok)throw new Error(`builder-server ${a.status}: ${await a.text()}`);const o=await a.json();return o.data??o}function ue(e,l){const a=l-e;return a>0?a:0}function me(e){var l,a,o,r,c;return((a=(l=e.data)==null?void 0:l.wearable)==null?void 0:a.category)??((r=(o=e.data)==null?void 0:o.emote)==null?void 0:r.category)??((c=e.data)==null?void 0:c.category)??e.type??"wearable"}function B(e){return`${q()}/storage/contents/${e}`}function A(e,l){if(!e)return"";if(/^https?:\/\//.test(e))return e;const a=l==null?void 0:l[e];return a?B(a):/^(ba|Qm)/.test(e)?B(e):""}async function he(e,l){try{const a=await fetch(`${q()}/items/${e}/${l}/contents`);if(!a.ok)return{};const o=await a.json();return o.data??o}catch{return{}}}async function pe(e,l,a){const o=A(e.thumbnail,e.contents)||A("thumbnail.png",e.contents);if(o)return o;if(l&&a){const r=await he(l,a);return A(e.thumbnail,r)||A("thumbnail.png",r)||A("image.png",r)}return""}async function be(e,l){const a=`${q()}/${e.toLowerCase()}/collections?is_published=true`,o=await H(a,l);return G(o).filter(r=>r.is_published&&!!r.contract_address).map(r=>({id:r.id,name:r.name,contractAddress:r.contract_address.toLowerCase(),isPublished:r.is_published,isApproved:r.is_approved,minters:(r.minters??[]).map(c=>c.toLowerCase())}))}async function ge(e,l){const a=`${q()}/collections/${e.id}/items`,o=await H(a,l);return(await Promise.all(G(o).map(async c=>{const v=c.rarity??"common",N=Number(c.total_supply??0)||0;let m=0;try{m=W.Rarity.getMaxSupply(v)}catch{m=0}const _=(c.contract_address??e.contractAddress).toLowerCase(),p=c.blockchain_item_id??"";return{id:c.id,collectionId:e.id,collectionName:e.name,contractAddress:_,blockchainItemId:p,name:c.name,category:me(c),rarity:v,thumbnail:await pe(c,_,p),type:c.type??"wearable",isPublished:c.is_published??e.isPublished,isApproved:c.is_approved??e.isApproved,totalSupply:N,maxSupply:m,remainingSupply:ue(N,m),minters:e.minters}}))).filter(ye)}function ye(e){return e.isPublished&&e.isApproved&&e.blockchainItemId!==""&&e.blockchainItemId!=null&&e.remainingSupply>0}async function xe(e,l){const a=await be(e,l);return(await Promise.all(a.map(async r=>{try{return await ge(r,l)}catch{return[]}}))).flat()}const je=1e3*60*60*24*182;function fe(e){const l=e,a=(l.message??"").toLowerCase();return l.code===4001||a.includes("reject")||a.includes("denied")||a.includes("cancel")?"You cancelled the request.":"Couldn't list your item — please try again."}function Ne({asset:e,session:l,onClose:a}){const o=U(),r=F(),[c,v]=u.useState("1"),[N,m]=u.useState(null),[_,p]=u.useState(null),[b,I]=u.useState(!1),[j,f]=u.useState(null);async function S(){p(null);const d=Number(c);if(!d||d<=0){p("Enter a valid price");return}I(!0);try{m("Getting your item ready…"),await le({signer:l.signer,contractAddress:e.contractAddress,chainId:e.chainId}),m("Listing your item…");const k=await ie({signer:l.signer,nft:{contractAddress:e.contractAddress,tokenId:e.tokenId,network:e.network,chainId:e.chainId},usdPrice:d,expiresAtMs:Date.now()+je});m("Publishing…"),await V(k,l.identity),m(null),f(Math.round(d*10)),Q.success(`“${e.name}” is now on sale!`),o.invalidateQueries({queryKey:["my-assets",l.address]})}catch(k){console.error(k),p(fe(k)),m(null)}finally{I(!1)}}function g(){a(),r(`/item/${e.contractAddress}/${e.tokenId}`)}return j!==null?s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:["◈ ",j]})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:g,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["List “",e.name,"”"]}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsxs("label",{className:"field",children:[s.jsx("span",{children:"Price (USD)"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:c,onChange:d=>v(d.target.value),disabled:b})]}),s.jsx("p",{className:"muted small",children:"Priced in USD. Buyers pay with credits."}),N?s.jsx("p",{className:"muted",children:N}):null,_?s.jsx("p",{className:"error",children:_}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,disabled:b,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:S,disabled:b,children:b?"Working…":"List for sale"})]})]})})}const _e=1e3*60*60*24*182;function ve(e){const l=e,a=(l.message??"").toLowerCase();return l.code===4001||a.includes("reject")||a.includes("denied")||a.includes("cancel")?"You cancelled the request.":"Couldn't publish your item — please try again."}function ke({item:e,session:l,onClose:a}){const o=U(),r=F(),[c,v]=u.useState("1"),[N,m]=u.useState(null),[_,p]=u.useState(null),[b,I]=u.useState(!1),[j,f]=u.useState(null),[S,g]=u.useState(null),d=O.chainId;u.useEffect(()=>{let h=!1;return(async()=>{try{const y=await re({contractAddress:e.contractAddress,chainId:d});h||f(y)}catch{h||f(!1)}})(),()=>{h=!0}},[e.contractAddress,d]);async function k(){p(null);const h=Number(c);if(!h||h<=0){p("Enter a valid price");return}I(!0);try{j||(m("Enabling sales for this collection…"),await ce({signer:l.signer,contractAddress:e.contractAddress,chainId:d}),f(!0)),m("Publishing your item…");const y=await oe({signer:l.signer,item:{contractAddress:e.contractAddress,itemId:e.blockchainItemId,network:W.Network.MATIC,chainId:d},usdPrice:h,uses:e.remainingSupply,expiresAtMs:Date.now()+_e});m("Finishing up…"),await V(y,l.identity),m(null),g(Math.round(h*10)),Q.success(`“${e.name}” is now on sale!`),o.invalidateQueries({queryKey:["publishable-items"]}),o.invalidateQueries({queryKey:["collection-sale-state"]})}catch(y){console.error(y),p(ve(y)),m(null)}finally{I(!1)}}function P(){a(),r(`/item/${e.contractAddress}/${e.blockchainItemId}`)}const C=b?"Working…":j===!1?"Enable & publish":"Publish for sale";return S!==null?s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:["◈ ",S]})," · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:P,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["Publish “",e.name,"”"]}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsxs("p",{className:"muted small",children:["From your collection “",e.collectionName,"” · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("label",{className:"field",children:[s.jsx("span",{children:"Price (USD)"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:c,onChange:h=>v(h.target.value),disabled:b})]}),s.jsx("p",{className:"muted small",children:"Priced in USD. Buyers pay with credits."}),j===!1&&!b?s.jsxs("p",{className:"muted small primary-note",children:["First time selling from “",e.collectionName,"”? It needs a one-time approval, then you’ll confirm the listing — two quick confirmations. After this, listing more items from this collection is a single step."]}):j===!0&&!b?s.jsx("p",{className:"muted small primary-note",children:"This collection is ready — publishing is a single confirmation."}):null,N?s.jsx("p",{className:"muted",children:N}):null,_?s.jsx("p",{className:"error",children:_}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,disabled:b,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:k,disabled:b||j===null,children:j===null?"Checking…":C})]})]})})}function Y(e){return{id:e.id,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.itemId,category:e.category,rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.image,priceCredits:e.listingPrice??0,gender:null,tokenId:e.tokenId}}function M(e){return{id:`${e.contractAddress}-${e.blockchainItemId}`,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.blockchainItemId,category:e.category,rarity:e.rarity,network:"MATIC",chainId:O.chainId,thumbnail:e.thumbnail,priceCredits:0,gender:null}}function $e(){const{session:e,error:l,signIn:a,restore:o}=ee(),r=F(),c=U(),[v,N]=u.useState(null),[m,_]=u.useState(null),[p,b]=u.useState(null),[I,j]=u.useState(null);function f(n){const t=n.tokenId??n.itemId??"";!n.contractAddress||!t||r(`/item/${n.contractAddress}/${t}`,{state:{item:n}})}async function S(n,t,i){if(e){j(null),b(i);try{const x=await se(n);await de({trade:x,signer:e.signer}),Q.success(`“${t}” is no longer for sale.`),await c.invalidateQueries({queryKey:["my-assets",e.address]}),await c.invalidateQueries({queryKey:["collection-sale-state"]})}catch(x){const $=x,L=($.message??"").toLowerCase();j($.code===4001||L.includes("reject")||L.includes("denied")?"You cancelled the request.":"Couldn't remove the listing — please try again.")}finally{b(null)}}}u.useEffect(()=>{o()},[o]);const g=e==null?void 0:e.address,{data:d,isLoading:k,error:P}=E({queryKey:["my-assets",g],queryFn:()=>ne(g),enabled:!!g}),{data:C}=E({queryKey:["importable",g],queryFn:()=>te(g),enabled:!!g}),h=((C==null?void 0:C.creations.length)??0)+((C==null?void 0:C.owned.length)??0),{data:y,isLoading:X,isError:z}=E({queryKey:["publishable-items",g],queryFn:()=>xe(g,e.identity),enabled:!!e,retry:!1}),D=u.useMemo(()=>[...new Set((y??[]).map(n=>n.contractAddress))],[y]),{data:w}=E({queryKey:["collection-sale-state",g,D],enabled:D.length>0,queryFn:async()=>{const n=await Promise.all(D.map(async i=>[i,await ae(i)])),t={};for(const[i,x]of n)for(const[$,L]of Object.entries(x))t[`${i}-${$}`]=L;return t}}),K=n=>w==null?void 0:w[`${n.contractAddress}-${n.blockchainItemId}`],T=u.useMemo(()=>(y??[]).filter(n=>{var t;return(t=K(n))==null?void 0:t.isOnSale}),[y,w]),R=u.useMemo(()=>{var t;const n=new Map;for(const i of y??[]){if((t=w==null?void 0:w[`${i.contractAddress}-${i.blockchainItemId}`])!=null&&t.isOnSale)continue;const x=n.get(i.collectionId)??{id:i.collectionId,name:i.collectionName,items:[]};x.items.push(i),n.set(i.collectionId,x)}return[...n.values()]},[y,w]);return e?s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),h>0?s.jsxs(J,{className:"import-banner",to:"/import",children:[s.jsx("span",{className:"import-banner__ico","aria-hidden":!0,children:"📦"}),s.jsxs("span",{className:"import-banner__text",children:[s.jsx("strong",{children:"Import your listings"}),s.jsxs("span",{className:"import-banner__sub",children:["You have ",h," item",h===1?"":"s"," for sale elsewhere — bring them into the Shop."]})]}),s.jsx("span",{className:"import-banner__cta",children:"Import"})]}):null,s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Items you own"}),s.jsx("p",{className:"myassets__section-sub",children:"Wearables & emotes you’ve bought — resell them in the Shop."})]}),P?s.jsx("p",{className:"error",children:P.message}):null,I?s.jsx("p",{className:"error",children:I}):null,s.jsx("div",{className:"asset-grid",children:k?Array.from({length:8}).map((n,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`sk-${t}`)):d==null?void 0:d.assets.map(n=>s.jsxs("article",{className:"asset-card asset-card--link",onClick:()=>f(Y(n)),role:"link",tabIndex:0,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),f(Y(n)))},children:[s.jsx("div",{className:"asset-card__img",children:n.image?s.jsx("img",{src:n.image,alt:n.name}):null}),s.jsx("div",{className:"asset-card__name",title:n.name,children:n.name}),n.isOnSale?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"asset-card__listed",children:[s.jsxs("span",{className:"asset-card__price",children:["◈ ",n.listingPrice]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost asset-card__remove",disabled:p===n.id||!n.tradeId,onClick:t=>{t.stopPropagation(),n.tradeId&&S(n.tradeId,n.name,n.id)},children:p===n.id?"Removing…":"Remove listing"})]}):s.jsx("button",{className:"btn btn--sm",onClick:t=>{t.stopPropagation(),N(n)},children:"List for sale"})]},n.id))}),!k&&d&&d.assets.length===0?s.jsx("p",{className:"muted",children:"No items in your inventory yet."}):null]}),s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Your creations"}),s.jsx("p",{className:"myassets__section-sub",children:"Items you made. Put them on sale in the Shop — set a price in credits and buyers pay with credits."})]}),X?s.jsx("div",{className:"publish-grid",children:Array.from({length:4}).map((n,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`pub-sk-${t}`))}):z?s.jsx("p",{className:"publish-empty",children:"We couldn’t load your collections right now. Please try again in a moment."}):T.length===0&&R.length===0?s.jsx("p",{className:"publish-empty",children:"You don’t have any items to publish yet."}):s.jsxs(s.Fragment,{children:[T.length>0?s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:"On sale"}),s.jsx("div",{className:"publish-grid",children:T.map(n=>{var t;return s.jsxs("article",{className:"publish-card publish-card--link",onClick:()=>f(M(n)),role:"link",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),f(M(n)))},children:[s.jsx("div",{className:"publish-card__img",children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:n.name}):null}),s.jsx("div",{className:"publish-card__name",title:n.name,children:n.name}),s.jsxs("div",{className:"publish-card__listed",children:[s.jsxs("span",{className:"publish-card__price",children:["◈ ",((t=K(n))==null?void 0:t.priceCredits)??0]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost publish-card__cta",disabled:p===n.id,onClick:i=>{i.stopPropagation();const x=K(n);x!=null&&x.tradeId&&S(x.tradeId,n.name,n.id)},children:p===n.id?"Removing…":"Remove listing"})]},`${n.contractAddress}-${n.blockchainItemId}`)})})]}):null,R.map(n=>s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:n.name}),s.jsx("div",{className:"publish-grid",children:n.items.map(t=>s.jsxs("article",{className:"publish-card publish-card--link",onClick:()=>f(M(t)),role:"link",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),f(M(t)))},children:[s.jsx("div",{className:"publish-card__img",children:t.thumbnail?s.jsx("img",{src:t.thumbnail,alt:t.name}):null}),s.jsx("div",{className:"publish-card__name",title:t.name,children:t.name}),s.jsxs("div",{className:"publish-card__meta",children:[s.jsx("span",{className:"publish-chip publish-chip--rarity",children:t.rarity}),s.jsxs("span",{className:"publish-card__supply",children:[t.remainingSupply.toLocaleString()," available"]})]}),s.jsx("button",{className:"btn btn--sm btn--purple publish-card__cta",onClick:i=>{i.stopPropagation(),_(t)},children:"Put on sale"})]},`${t.contractAddress}-${t.blockchainItemId}`))})]},n.id))]})]}),v?s.jsx(Ne,{asset:v,session:e,onClose:()=>N(null)}):null,m?s.jsx(ke,{item:m,session:e,onClose:()=>_(null)}):null]}):s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),s.jsx("p",{className:"muted",children:"Sign in to sell your items."}),s.jsx("div",{className:"connect-row",children:s.jsx("button",{className:"btn btn--purple",onClick:()=>a(),children:"Sign in"})}),l?s.jsx("p",{className:"error",children:l}):null]})}export{$e as MyAssets};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,L as i}from"./react-DwvsoSSx.js";import{b as h,u as d,c as u,d as l}from"./index-BDfhJESf.js";import"./ethers-g2M4Ny1y.js";function o(s){try{return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function m({status:s}){return s==="PENDING"?e.jsx("span",{className:"purchase__badge purchase__badge--pending",children:"Processing"}):e.jsx("span",{className:"purchase__badge purchase__badge--done",children:"Completed"})}function p({purchase:s}){const{data:a}=d({queryKey:["trade-display",s.tradeId],queryFn:()=>u(s.tradeId),enabled:!!s.tradeId,staleTime:3e5}),t=(a==null?void 0:a.name)??"Item",c=(a==null?void 0:a.thumbnail)??"",r=a!=null&&a.contractAddress?`/item/${a.contractAddress}/${a.tokenId??a.itemId??""}`:void 0,n=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"purchase__thumb",children:c?e.jsx("img",{src:c,alt:t}):null}),e.jsxs("div",{className:"purchase__info",children:[e.jsx("div",{className:"purchase__name",title:t,children:t}),e.jsx("div",{className:"muted purchase__date",children:o(s.createdAt)})]}),e.jsx(m,{status:s.status}),e.jsxs("div",{className:"purchase__price",children:["◈ ",s.credits]})]});return r?e.jsx(i,{className:"purchase",to:r,children:n}):e.jsx("div",{className:"purchase",children:n})}function N(){const{session:s}=h(),{data:a,isLoading:t}=d({queryKey:["purchases",s==null?void 0:s.address],queryFn:()=>l(s.address,s.identity),enabled:!!s});if(!s)return e.jsxs("div",{className:"purchases-empty",children:[e.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"purchases-empty__title",children:"Sign in to see your purchases"}),e.jsx("p",{className:"muted",children:"Your order history shows up here once you sign in."})]});const c=(a??[]).filter(r=>r.status!=="EXPIRED");return!t&&c.length===0?e.jsxs("div",{className:"purchases-empty",children:[e.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"purchases-empty__title",children:"No purchases yet"}),e.jsx("p",{className:"muted",children:"When you buy something it’ll appear here."}),e.jsx(i,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]}):e.jsxs("section",{className:"purchases",children:[e.jsxs("div",{className:"purchases__head",children:[e.jsx("h1",{children:"My Purchases"}),t?null:e.jsxs("span",{className:"purchases__count",children:[c.length," order",c.length>1?"s":""]})]}),e.jsx("div",{className:"purchases__list",children:t?Array.from({length:4}).map((r,n)=>e.jsx("div",{className:"purchase purchase--skeleton"},n)):c.map(r=>e.jsx(p,{purchase:r},r.id))})]})}export{N as MyPurchases};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s,b as d,a as o,N as u}from"./react-DwvsoSSx.js";import{b as m,W as _,s as i,g as h}from"./index-BDfhJESf.js";import"./ethers-g2M4Ny1y.js";function p(){return s.jsxs("div",{className:"success-anim",role:"img","aria-label":"Purchase successful",children:[s.jsxs("svg",{className:"success-anim__svg",viewBox:"0 0 120 120",children:[s.jsx("circle",{className:"success-anim__ring",cx:"60",cy:"60",r:"54"}),s.jsx("path",{className:"success-anim__check",d:"M37 61 l16 16 l30 -34"})]}),s.jsx("span",{className:"success-anim__spark success-anim__spark--1","aria-hidden":!0,children:"✦"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--2","aria-hidden":!0,children:"✦"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--3","aria-hidden":!0,children:"◈"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--4","aria-hidden":!0,children:"✦"})]})}const x="https://play.decentraland.zone";function g(){const{state:c}=d(),t=o(),{session:n}=m(),a=(c==null?void 0:c.items)??[];if(a.length===0)return s.jsx(u,{to:"/assets",replace:!0});const e=a[0],l=(n==null?void 0:n.address)??"default";return s.jsxs("div",{className:"success",children:[s.jsx("div",{className:"success__preview",children:s.jsx(_,{contractAddress:e.contractAddress,tokenId:e.tokenId??void 0,itemId:e.tokenId?void 0:e.itemId??void 0,profile:l,type:i.PreviewType.AVATAR,emote:i.PreviewEmote.FASHION,background:"ecebed",dev:h.chainId===80002},e.id)}),s.jsxs("div",{className:"success__panel",children:[s.jsx(p,{}),s.jsx("h1",{className:"success__title",children:"It’s yours!"}),a.length===1?s.jsxs("p",{className:"success__sub",children:[s.jsx("strong",{children:e.name})," is now in your wardrobe."]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"success__sub",children:[a.length," items are now in your wardrobe."]}),s.jsx("ul",{className:"success__list",children:a.map(r=>s.jsx("li",{children:r.name},r.id))})]}),s.jsxs("div",{className:"success__actions",children:[s.jsx("a",{className:"btn btn--purple",href:x,target:"_blank",rel:"noreferrer",children:"Use it in-world"}),s.jsx("button",{className:"btn btn--ghost",onClick:()=>t("/assets"),children:"Keep shopping"})]})]})]})}export{g as Success,g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as r}from"./utils-BbN_2WlV.js";import{d as a}from"./decimals-dZeJ2OUx.js";import"./ethers-g2M4Ny1y.js";import"./react-DwvsoSSx.js";import"./signing-C3nvaDy6.js";import"./index-BDfhJESf.js";async function s(c){return r(()=>a(c),{cacheKey:`${c.contract.chain.id}:${c.contract.address}:decimals`,cacheTime:Number.POSITIVE_INFINITY})}export{s as decimals};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as i}from"./signing-C3nvaDy6.js";import"./utils-BbN_2WlV.js";import"./ethers-g2M4Ny1y.js";import"./react-DwvsoSSx.js";import"./index-BDfhJESf.js";async function n(t,e){const a=await t({method:"eth_estimateGas",params:[e]});return i(a)}export{n as eth_estimateGas};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,a as r}from"./signing-C3nvaDy6.js";import"./utils-BbN_2WlV.js";import"./ethers-g2M4Ny1y.js";import"./react-DwvsoSSx.js";import"./index-BDfhJESf.js";async function b(t,o){const n=await t({method:"eth_getTransactionCount",params:[o.address,o.blockNumber?e(o.blockNumber):o.blockTag||"pending"]});return r(n)}export{b as eth_getTransactionCount};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as n}from"./wallets-CiOgCIFj.js";import"./signing-C3nvaDy6.js";import"./utils-BbN_2WlV.js";import"./ethers-g2M4Ny1y.js";import"./react-DwvsoSSx.js";import"./index-BDfhJESf.js";import"./store-CraP4F4Y.js";import"./hashTypedData-PGCpbthX.js";import"./index-DK4ayCPs.js";import"./index-s9PTMkSR.js";import"./index-D0hFzIFj.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-njBZQFZk.js";import"./ethereum-rOnUivvy.js";async function w(o){const l=await n(o);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:o,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{w as getEcosystemWalletInfo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as g,e as f,g as d}from"./index-BDfhJESf.js";import{e as p,c as m,a as I,b as h,d as A}from"./buy-BBAUmAfR.js";import{g as y,C as k}from"./index-BIqiBFIC.js";import{J as C,C as l}from"./ethers-g2M4Ny1y.js";const u=1e3*60*60*24*182,w=10n**17n;async function v(t){const s=y(k.OffChainMarketplaceV2,t),a=new C(d.rpcUrl),i=await new l(s.address,["function manaUsdAggregator() view returns (address)"],a).manaUsdAggregator(),n=new l(i,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],a),c=await n.decimals(),e=await n.latestRoundData();return{rate:BigInt(e[1].toString()),decimals:Number(c)}}function U(t,s,a){let r;try{r=BigInt(t)*s/10n**BigInt(a)}catch{return 1}const i=r/w,n=r%w>0n?i+1n:i,c=Number(n);return c<1?1:c}async function D(t){const s=await fetch(`${d.marketplaceServerUrl}/v3/catalog/importable?seller=${t.toLowerCase()}`);if(!s.ok)throw new Error(`fetchImportable ${s.status}`);const{data:a}=await s.json(),r=a??[];if(r.length===0)return{creations:[],owned:[]};const i=r[0].chainId||d.chainId,{rate:n,decimals:c}=await v(i),e=r.map(o=>({...o,suggestedCredits:U(o.manaWei,n,c)}));return{creations:e.filter(o=>o.listingType==="primary"),owned:e.filter(o=>o.listingType==="secondary")}}async function P(t,s,a,r={}){const i=s/10,n=t.chainId,c=t.network;if(t.listingType==="primary"){await p({signer:a.signer,contractAddress:t.contractAddress,chainId:n});const e=await m({signer:a.signer,item:{contractAddress:t.contractAddress,itemId:t.itemId??"",network:c,chainId:n},usdPrice:i,uses:t.available,expiresAtMs:Date.now()+u});await g(e,a.identity)}else{await I({signer:a.signer,contractAddress:t.contractAddress,chainId:n});const e=await h({signer:a.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId??"",network:c,chainId:n},usdPrice:i,expiresAtMs:Date.now()+u});await g(e,a.identity)}if(r.cancelOld){const e=await f(t.oldTradeId).catch(()=>null);e&&await A({trade:e,signer:a.signer})}}export{D as f,P as i};
|
package/assets/index-7IV-CwwO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t}from"./react-DwvsoSSx.js";import{r}from"./index-COjgItKg.js";var e=r();const i=t(e);export{i as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r}from"./index-BDfhJESf.js";var e=r();export{e as n};
|