@dcl/shop 0.1.0-29942574523.commit-573f25e → 0.1.0-29944279663.commit-001b5a7
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/{AnimatedBackground-CzCwcFdY.js → AnimatedBackground-CPcXx1BG.js} +3 -3
- package/assets/{Assets-BTdyC00C.js → Assets-AjWSopj2.js} +1 -1
- package/assets/{Assets.styles-eeqx94WS.js → Assets.styles-BldKbSnl.js} +26 -27
- package/assets/{Authorizations-BZhmfDD4.js → Authorizations-DN5rReSr.js} +1 -1
- package/assets/Cart-BOomZzFA.js +3 -0
- package/assets/{Cart-Ep_4Wxpy.css → Cart-BqMUti_3.css} +1 -1
- package/assets/{CircularProgress-BivMeg1W.js → CircularProgress-B7vK7bWC.js} +1 -1
- package/assets/{Collection-DQAOAaC9.js → Collection-Op3SrGcQ.js} +1 -1
- package/assets/CollectionCarousel-C2R0_DIx.js +1 -0
- package/assets/{Creator-X75Qvpr4.js → Creator-BXkmnq6l.js} +1 -1
- package/assets/{CssVarsProvider-C0ny30E-.js → CssVarsProvider-CbqPuVyv.js} +1 -1
- package/assets/{ExchangeController-D0l6M3tj.js → ExchangeController-CkwXcZrE.js} +1 -1
- package/assets/GetCredits-DyYrVUsB.js +1 -0
- package/assets/{HelpersUtil-hamZLlhX.js → HelpersUtil-Cd6Cz7k6.js} +1 -1
- package/assets/{ImportListings-BFIpuuBM.js → ImportListings-BqaE2RRj.js} +1 -1
- package/assets/ItemDetail-CXntx0dm.js +78 -0
- package/assets/{LoadMore-BLy9p9ul.js → LoadMore-wolzH5ER.js} +1 -1
- package/assets/MarketCheckout-D_f5rC4e.js +3 -0
- package/assets/MyAssets-CBQJfW0w.js +258 -0
- package/assets/{MyFavorites-Dul-WC6l.js → MyFavorites-DtHDd-wr.js} +1 -1
- package/assets/{MyPurchases-DI0zzNTZ.js → MyPurchases-BBRP2pOD.js} +1 -1
- package/assets/{NotFound-Bdg_iIpB.js → NotFound-CJzX5KFi.js} +1 -1
- package/assets/PrimaryListModal-Bfe2jEqA.js +1 -0
- package/assets/{StoreSettings-2cViRT0c.js → StoreSettings-CCjyP-1z.js} +5 -5
- package/assets/Success-DgDiikPg.js +4 -0
- package/assets/{SwapController-DKBIcDPA.js → SwapController-CtlOMvk3.js} +1 -1
- package/assets/{Tooltip-DJ7HtAmB.js → Tooltip-BtGlCRjR.js} +1 -1
- package/assets/{TradeService-BpWgN8zg.js → TradeService-OKrfHBNk.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-B40OWK0h.js → W3MFrameProviderSingleton-BFTt2bWv.js} +3 -3
- package/assets/{WebCryptoP256-Ccr1DsYO.js → WebCryptoP256-CNNq2h94.js} +1 -1
- package/assets/{authorizations-sU14ILrd.js → authorizations-ChRb35xG.js} +1 -1
- package/assets/{basic-DaSuNoEa.js → basic-O1kzoE_h.js} +1 -1
- package/assets/{biconomy-DmmBzkXG.js → biconomy-NJyzVP4P.js} +1 -1
- package/assets/{buy-BRLq1STf.js → buy-CNc4Y8CN.js} +1 -1
- package/assets/{buy-gasless-hR2bH0iR.js → buy-gasless-wrR0AjfW.js} +1 -1
- package/assets/{cart-checkout-CifIjL1z.js → cart-checkout-BAUaf92R.js} +1 -1
- package/assets/{categories-BPU8ySTe.js → categories-BKqMpg3a.js} +1 -1
- package/assets/{ccip-C1DhAmlP.js → ccip-DzP3mwwB.js} +1 -1
- package/assets/{ccip-pv6qu637.js → ccip-S_59ofbi.js} +1 -1
- package/assets/collection-4y6zy3OY.js +1 -0
- package/assets/{controller-DBPpBNi9.js → controller-CyymDuZ1.js} +2 -2
- package/assets/{core-CftjJZSY.js → core-DpgBxh1f.js} +4 -4
- package/assets/{custom-CLjHEVcz.js → custom-CUYXqRFz.js} +1 -1
- package/assets/{data-capture-ClKTWWBL.js → data-capture-DEtSxXU7.js} +1 -1
- package/assets/{email-Dx9BSTtw.js → email-CZBKdtTz.js} +1 -1
- package/assets/{embedded-wallet-CCKNmFwm.js → embedded-wallet-DI5q9f92.js} +1 -1
- package/assets/{emotion-styled.browser.esm-B6FBNgF3.js → emotion-styled.browser.esm-DSDqSITi.js} +1 -1
- package/assets/{engine-1UaDNb6s.js → engine-H6XTP7Hg.js} +1 -1
- package/assets/{errors-DKFg2ql0.js → errors-gKUnErEU.js} +1 -1
- package/assets/{estimate-l1-fee-cQM6_GVS.js → estimate-l1-fee-CRLseeHD.js} +1 -1
- package/assets/{execute-BuVfiwvM.js → execute-DnoTKwUA.js} +2 -2
- package/assets/{features-ieqkL6m1.js → features-DsCWYm7t.js} +1 -1
- package/assets/{fetchTokenMetadata-D8OWz4cP.js → fetchTokenMetadata-D8xF6Tp2.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-LZLHBFVZ.js → get-ecosystem-wallet-info-eeuY73_c.js} +1 -1
- package/assets/{getBalance-Ck1YHbUL.js → getBalance-D4FtfBuc.js} +1 -1
- package/assets/{getNFT-DYxVn0Et.js → getNFT-CCUV8jjB.js} +1 -1
- package/assets/{getNFT-DnYNAiji.js → getNFT-DsBG7sol.js} +1 -1
- package/assets/{getOverlayAlpha-Jb_9sPPd.js → getOverlayAlpha-DD0MBenH.js} +1 -1
- package/assets/{hashTypedData-BHOeb4kN.js → hashTypedData-D4XcfX8m.js} +1 -1
- package/assets/{hashTypedData-Bqz6FRnB.js → hashTypedData-DY9RW77q.js} +1 -1
- package/assets/{import-CyzZeEcP.js → import-C4A0dOmT.js} +1 -1
- package/assets/{in-app-yMA-tvKO.js → in-app-miryaTIx.js} +1 -1
- package/assets/{in-app-wallet-calls-BJRqCE4k.js → in-app-wallet-calls-BNAeRkM1.js} +1 -1
- package/assets/{index-Dx4oKUoK.js → index-5BCUAQ7G.js} +1 -1
- package/assets/{index-B7YJ2-NC.js → index-B-lOuLL_.js} +1 -1
- package/assets/{index-YX1mo09T.js → index-B0f3YMv0.js} +1 -1
- package/assets/{index-3c-o1deN.js → index-B2KZdX5l.js} +1 -1
- package/assets/{index-LMkzNUyd.js → index-B7Aw3qxP.js} +1 -1
- package/assets/{index-Dil5ESgb.js → index-BHgNE80I.js} +1 -1
- package/assets/{index-Df4qngsG.js → index-BMxVktKR.js} +1 -1
- package/assets/{index-BLpc0PAw.js → index-BPTCeB75.js} +1 -1
- package/assets/{index-LQPmlKJw.js → index-BR9EQbWB.js} +1 -1
- package/assets/{index-BgMPhDEY.js → index-BVDwZ7ux.js} +1 -1
- package/assets/{index-B6Hb0r15.js → index-BaEQqKh7.js} +1 -1
- package/assets/{index-Chx72aoA.js → index-Bd6HRkkM.js} +1 -1
- package/assets/{index-D0tMQ_oG.js → index-BeDPwdIU.js} +1 -1
- package/assets/{index-C0MEN305.js → index-BeF4PcAs.js} +1 -1
- package/assets/{index-DHzasbYL.js → index-Bnxb7s2U.js} +1 -1
- package/assets/index-Bw9Y53F1.css +1 -0
- package/assets/index-C1yBaAe9.js +289 -0
- package/assets/{index-uESxdvPf.js → index-CAtCo41a.js} +1 -1
- package/assets/{index-B55KertC.js → index-CJ72HArz.js} +1 -1
- package/assets/{index-zfsFyt-v.js → index-CKain9CR.js} +1 -1
- package/assets/{index-CO9CUrPm.js → index-CNUSWwhT.js} +2 -2
- package/assets/{index-mc7xea6T.js → index-CS_YGkJS.js} +1 -1
- package/assets/{index-Cenx9VIL.js → index-CUapata6.js} +1 -1
- package/assets/{index-DM6cwvvh.js → index-CW4WLUXF.js} +1 -1
- package/assets/{index-BVjayAtf.js → index-CaKtCSoO.js} +1 -1
- package/assets/{index-0C8jHF02.js → index-CchI9mHk.js} +1 -1
- package/assets/{index-B8PSEU0f.js → index-Cd8SstNC.js} +1 -1
- package/assets/{index-Bxu_HZv7.js → index-Cglxr6xq.js} +1 -1
- package/assets/{index-0Z5nkscP.js → index-CitxiVaF.js} +1 -1
- package/assets/{index-fvb_2ePt.js → index-CpUzfl0K.js} +1 -1
- package/assets/{index-CqYieDft.js → index-CryDMiQl.js} +1 -1
- package/assets/{index-nmCuLAGG.js → index-CvSuJFRB.js} +1 -1
- package/assets/{index-DwFc8v1Z.js → index-D-u-hSI3.js} +1 -1
- package/assets/{index-Dszgr0BR.js → index-D15jEYwr.js} +1 -1
- package/assets/{index-B_fPkyQt.js → index-D4MR9O_F.js} +1 -1
- package/assets/{index-CWcMLN9O.js → index-DBt6hDgv.js} +1 -1
- package/assets/{index-Dc1nvyn9.js → index-DNxKrdux.js} +1 -1
- package/assets/{index-a_8ZLAR0.js → index-DSw2AqET.js} +1 -1
- package/assets/{index-D18uHh6f.js → index-DWxI9Hlb.js} +1 -1
- package/assets/{index-Bc63dzBj.js → index-DXtL9zpK.js} +3 -3
- package/assets/{index-CCr2J09y.js → index-DbySRbMy.js} +2 -2
- package/assets/{index-DSbcS8Gm.js → index-DpDqOxel.js} +1 -1
- package/assets/{index-DPjEYQhJ.js → index-DsrJfyy3.js} +1 -1
- package/assets/{index-BEOJi3Jo.js → index-G8bd0RHd.js} +1 -1
- package/assets/{index-xFOezD9a.js → index-KOeN6JEM.js} +1 -1
- package/assets/{index-CstoEHiD.js → index-U4GunfhO.js} +1 -1
- package/assets/{index-WrHr3vKs.js → index-ZiBxg6FP.js} +2 -2
- package/assets/{index-BlKccc7B.js → index-dBhDm5QH.js} +1 -1
- package/assets/{index-KyO7a8ne.js → index-iruECcYS.js} +3 -3
- package/assets/{index-O1MAeCt1.js → index-k4CkTGxw.js} +1 -1
- package/assets/{index-DJEb_i4T.js → index-rbNc96Al.js} +1 -1
- package/assets/{index-DPm2T7me.js → index-sXacIDUz.js} +3 -3
- package/assets/{index-CVG4mg1H.js → index-wJEgDopC.js} +1 -1
- package/assets/{index.es-CP2cNM9F.js → index.es-BxcQA2dU.js} +1 -1
- package/assets/{index.es-Dy8PEmK4.js → index.es-Cl_XwBUi.js} +4 -4
- package/assets/{index.es-B-uJmNhd.js → index.es-DIuzDiOd.js} +1 -1
- package/assets/{localBatchGatewayRequest-Dg8trW1f.js → localBatchGatewayRequest-DInd0cLm.js} +1 -1
- package/assets/{mana-rate-DtQ8WpoI.js → mana-rate-CQNKlfL0.js} +1 -1
- package/assets/{networks-BaSDToU0.js → networks-Cov5QiMG.js} +1 -1
- package/assets/{onramp-D6REu-OE.js → onramp-hb5ff0As.js} +1 -1
- package/assets/{openzeppelin-DsZ0ZpWh.js → openzeppelin-Bjn2nu6_.js} +1 -1
- package/assets/{parseNft-BrwItloF.js → parseNft-D9LBoQtO.js} +2 -2
- package/assets/{parseSignature-C67g8Ikn.js → parseSignature-L1A1P3GM.js} +1 -1
- package/assets/{parseSignature-CtBPNsAi.js → parseSignature-ePtMgMiu.js} +3 -3
- package/assets/{passkeys-CkVvpC6F.js → passkeys-DmsGOzkI.js} +1 -1
- package/assets/{pay-with-exchange-DDftQXGa.js → pay-with-exchange-AEyKwlqz.js} +1 -1
- package/assets/{qr-overlay-CHyDfEfF.js → qr-overlay-DyUlpaIC.js} +1 -1
- package/assets/{receive-BqeMp3_k.js → receive-DXQR7h-2.js} +1 -1
- package/assets/{resolveImplementation-D6GNwvZn.js → resolveImplementation-BXX46XHe.js} +1 -1
- package/assets/{rpc-D1wZc4pd.js → rpc-DpwEotT8.js} +1 -1
- package/assets/{secp256k1-Cu8gqKOi.js → secp256k1-CAtCZ-Xr.js} +1 -1
- package/assets/{secp256k1-DKdkwurr.js → secp256k1-DXm6hl-z.js} +1 -1
- package/assets/{secp256k1-tM-HU4Wb.js → secp256k1-IsXW7STM.js} +1 -1
- package/assets/{send-C5LlTSZw.js → send-CbWz9hcp.js} +1 -1
- package/assets/{send-batch-transaction-2M20mpyd.js → send-batch-transaction-9mR-y7h4.js} +1 -1
- package/assets/{send-eip712-transaction-DxCA-Uwd.js → send-eip712-transaction-CM2oNuUv.js} +2 -2
- package/assets/{send-gasless-transaction-VjwN2uQK.js → send-gasless-transaction-Dt3TrVjF.js} +2 -2
- package/assets/{send-transaction-Bb0Q9hmN.js → send-transaction-BZ4LJjTi.js} +2 -2
- package/assets/{sendRawTransaction-CED77ONZ.js → sendRawTransaction--x3C4a4M.js} +3 -3
- package/assets/{serializeTransaction-7yAEy3FU.js → serializeTransaction-DkNQBPpa.js} +1 -1
- package/assets/{session-proposal-DGrkZ9Ix.js → session-proposal-C_7oJg4v.js} +1 -1
- package/assets/{session-request-Dg8cFRll.js → session-request-BswrUDyz.js} +2 -2
- package/assets/{signing-DuUwyfpZ.js → signing-Ci_N7XnZ.js} +3 -3
- package/assets/{socials-cbGvEEpM.js → socials-Cy0uuEjD.js} +1 -1
- package/assets/{swaps-EURvYFti.js → swaps-CJefGDGP.js} +1 -1
- package/assets/{thirdweb-D4Tt3SPK.js → thirdweb-_jeY-8oo.js} +3 -3
- package/assets/{to-serializable-transaction-Dh5bAtyQ.js → to-serializable-transaction-z3rODop-.js} +2 -2
- package/assets/{trade-encoding-0IFZ39Tk.js → trade-encoding-DQ3zNCj8.js} +1 -1
- package/assets/{transactionReceipt-DIw9ApVw.js → transactionReceipt-CmnDZJIN.js} +1 -1
- package/assets/{transactions-xAqHSp91.js → transactions-C19bGnmB.js} +1 -1
- package/assets/useCreditPacks-Caur-2iX.js +1 -0
- package/assets/{useInfiniteGrid-BbeLTVdN.js → useInfiniteGrid-CRDFn4if.js} +1 -1
- package/assets/{useStore-PWA7dbNJ.js → useStore-DjC0Mzyl.js} +1 -1
- package/assets/useTheme-4G-3zKnL.js +1 -0
- package/assets/{useTheme-BHtz4hyG.js → useTheme-YjNnj0AZ.js} +1 -1
- package/assets/{verifyHash-sv4aRvH_.js → verifyHash-C_4O6fWL.js} +1 -1
- package/assets/{w3m-modal-D1RMqW5z.js → w3m-modal-C8bpYQNG.js} +1 -1
- package/assets/{w3m-modal-BoTSPCYe.js → w3m-modal-Ckpscz46.js} +1 -1
- package/assets/{wait-for-tx-receipt-CnoUxMtV.js → wait-for-tx-receipt-FMU2_8T4.js} +1 -1
- package/assets/{wallets-Cuqbvnoy.js → wallets-DdObuep1.js} +5 -5
- package/assets/{web-connector-0FomZsHS.js → web-connector-CnDHaN6b.js} +3 -3
- package/assets/{writeContract-Bicvfabo.js → writeContract-C9X9RN9V.js} +1 -1
- package/assets/{zoraTestnet-4QPNkDlh.js → zoraTestnet-d3v06Qdp.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Cart-BicSZMzV.js +0 -3
- package/assets/CollectionCarousel-D_udpdxX.js +0 -1
- package/assets/GetCredits-CMdoboQp.js +0 -1
- package/assets/ItemDetail-C0Sm18Me.js +0 -78
- package/assets/MarketCheckout-DSl7Bl-M.js +0 -3
- package/assets/MyAssets-UFPrjPwu.js +0 -258
- package/assets/PrimaryListModal-CnlMOkG5.js +0 -1
- package/assets/Success-D9l7pr2K.js +0 -4
- package/assets/collection-DhudRI2A.js +0 -1
- package/assets/index-CJ4mXolB.js +0 -289
- package/assets/index-CqYr0ABc.css +0 -1
- package/assets/useCreditPacks-DO-uyk4N.js +0 -1
- package/assets/useTheme-Ciqd957r.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-BrLDncxD.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
1
|
+
import{r as l,j as v}from"./react-BrLDncxD.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-29944279663.commit-001b5a7/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-29944279663.commit-001b5a7/assets/DCL_LogoPattern-BryBPc3d.png",b=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
5
5
|
v_uv = a_position * 0.5 + 0.5;
|
|
6
6
|
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,U=`
|
|
9
9
|
precision highp float;
|
|
10
10
|
|
|
11
11
|
uniform float u_time;
|
|
@@ -77,4 +77,4 @@ void main() {
|
|
|
77
77
|
|
|
78
78
|
gl_FragColor = result;
|
|
79
79
|
}
|
|
80
|
-
`;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,
|
|
80
|
+
`;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,b),c=g(e,e.FRAGMENT_SHADER,U);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ke,r as p,j as e,b as Qe}from"./react-BrLDncxD.js";import{c as F,w as Ze,q as Je,
|
|
1
|
+
import{a as Ke,r as p,j as e,b as Qe}from"./react-BrLDncxD.js";import{c as F,w as Ze,q as Je,L as Xe,s,F as t,d as Te,n as Ye,o as ze,j as Ie,e as et,t as o,I as z,g as B,v as pe,x as D,y as tt,z as nt,u as Ne,G as st,A as K,au as ot,av as it}from"./index-C1yBaAe9.js";import{r as rt,a as at,m as _e}from"./mana-rate-CQNKlfL0.js";import{u as Ae,M as lt}from"./MarketCheckout-D_f5rC4e.js";import{g as ct,h as dt,i as ft,j as pt,k as ut,C as xt,l as ht,o as mt,m as gt,n as bt,M as yt}from"./Assets.styles-BldKbSnl.js";import{d as ue,R as wt,F as vt,S as xe,b as jt}from"./categories-BKqMpg3a.js";import{L as $t}from"./LoadMore-wolzH5ER.js";import{u as Ct}from"./useInfiniteGrid-CRDFn4if.js";import{E as kt}from"./ErrorNotice-BDH9xoG4.js";import{d as St}from"./dcl-schemas-BICTSpB5.js";import{u as Rt,G as Et,w as Tt,S as zt}from"./buy-gasless-wrR0AjfW.js";import{s as It}from"./buy-CNc4Y8CN.js";import{h as Nt}from"./trade-encoding-DQ3zNCj8.js";import{f as _t}from"./errors-gKUnErEU.js";import{J as At,C as Pt,B as ne}from"./ethers-CLB2z3On.js";import{l as Mt}from"./loader-logo-BzY9EKdC.js";import{n as Lt}from"./emotion-CSxEP8yM.js";import"./sentry-DYZXk5O5.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./Tooltip-BtGlCRjR.js";import"./authorizations-ChRb35xG.js";function Q(n){const i=n.source??"item",f=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${i}:${f}`}const W="100000000000000000000",Pe=2,V=15,Bt=/^[a-zA-Z0-9]+$/;function he(n){const i=n.trim();return i.length===0?{ok:!1,reason:"empty"}:Bt.test(i)?i.length<Pe?{ok:!1,reason:"too-short"}:i.length>V?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Ft(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,V)}const Wt=["function available(string _subdomain) view returns (bool)"],me={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Ht(){return F.chainId===St.ChainId.MATIC_MAINNET?me.mainnet:me.sepolia}async function Ut(n,i={}){var d;const{rpc:f,address:u}=Ht(),l=new At(f),c=new Pt(u,Wt,l);console.info(`[names] availability check → DCLRegistrar(${u}).available("${n}") on ${f}`);const x=await c.available(n);if((d=i.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const Ot="https://app.across.to/api";class Me extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Gt(n){return at(W,n)}async function qt(n,i,f={}){var d;const u=f.chainId??F.chainId,l=f.provider??"across",c=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${u}&provider=${l}`,x=await Xe(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let a;try{a=(d=await x.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Me:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function Dt(n,i){const f=ne.from(n.availableAmount),l=ne.from(W).sub(f);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:Nt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:W}}async function Vt(n,i={}){const f=Ot,u=i.intervalMs??1e4,l=i.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const d=await fetch(`${f}/deposit/status?originChainId=137&depositTxHash=${n}`);if(d.ok){const a=await d.json(),m=(a.status??"pending").toLowerCase(),w=a.fillTx??a.fillTxnRef??null,y=a.actionsSucceeded!==!1;if(m==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:y};if(m==="refunded"||m==="expired")return{status:m,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:y}}}catch{}x<l-1&&await new Promise(d=>setTimeout(d,u))}return c}async function Kt(n){const{name:i,identity:f,signer:u}=n,l=n.chainId??F.chainId,c=n.provider??"across",x=(n.beneficiary??await u.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:i,buyer:x,chainId:l,provider:c});try{const m=await rt(l),w=Gt(m);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:m});const y=await qt(f,i,{chainId:l,provider:c});console.info("[names] step 2/6 route fetched",{target:y.externalCall.target,selector:y.externalCall.selector,provider:y.provider,quoteId:y.quoteId});const v=await Ze(f,w);if(d=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),ne.from(v.maxCreditedValue).lt(W))throw new Error("Credit under-sized for the name price");const C=Dt(v.credit,y);let h;try{h=await Rt({chainId:l,buyer:x,signer:u,args:C})}catch(b){if(!(b instanceof Et))throw b;h=await It(l,C,u)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:h}),await Tt(h),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:h}),c==="across"){const b=await Vt(h,n.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:h};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:h,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:h}}catch(m){if(console.error("[names] register failed — raw error:",m,{name:i,buyer:x,originConfirmed:a}),m instanceof zt)return{status:"pending",originTxHash:m.txHash};throw d&&!a&&await Je(f,[d]).catch(()=>{}),m instanceof Me?m:new Error(_t(m,"Couldn't register the name. Please try again.",{sale:!0}))}}const Qt=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as y,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c as ne}from"./categories-BKqMpg3a.js";import{T as se}from"./Tooltip-BtGlCRjR.js";import{F as e,s as o,I as m,t as s,G as re,C as v}from"./index-C1yBaAe9.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
5
5
|
width: 100%;
|
|
6
|
-
`,
|
|
6
|
+
`,k=o.div`
|
|
7
7
|
height: 1px;
|
|
8
8
|
background: ${e.colors.media};
|
|
9
9
|
width: 100%;
|
|
@@ -59,7 +59,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
59
59
|
${e.media.up("lg")} {
|
|
60
60
|
display: none;
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,he=o("p",c("desktopHidden"))`
|
|
63
63
|
margin: 0;
|
|
64
64
|
padding: 0 4px 4px;
|
|
65
65
|
font-family: ${e.font.sans};
|
|
@@ -70,7 +70,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
70
70
|
text-transform: capitalize;
|
|
71
71
|
|
|
72
72
|
${({desktopHidden:i})=>i?`${e.media.up("lg")} { display: none; }`:""}
|
|
73
|
-
`,
|
|
73
|
+
`,xe=o("div",c("open","desktopStatic"))`
|
|
74
74
|
display: grid;
|
|
75
75
|
grid-template-rows: ${({open:i})=>i?"1fr":"0fr"};
|
|
76
76
|
transition: grid-template-rows 0.22s ease;
|
|
@@ -83,7 +83,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
83
83
|
`,ge=o.div`
|
|
84
84
|
overflow: hidden;
|
|
85
85
|
min-height: 0;
|
|
86
|
-
`,
|
|
86
|
+
`,me=o.div`
|
|
87
87
|
display: flex;
|
|
88
88
|
align-items: flex-end;
|
|
89
89
|
justify-content: center;
|
|
@@ -100,7 +100,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
100
100
|
font-weight: 400;
|
|
101
101
|
font-size: 12px;
|
|
102
102
|
color: ${e.colors.muted};
|
|
103
|
-
`,
|
|
103
|
+
`,F=o.span`
|
|
104
104
|
display: flex;
|
|
105
105
|
align-items: center;
|
|
106
106
|
gap: 4px;
|
|
@@ -113,7 +113,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
113
113
|
&:focus-within {
|
|
114
114
|
border-color: ${e.rarities.epic};
|
|
115
115
|
}
|
|
116
|
-
`,
|
|
116
|
+
`,P=o(m)`
|
|
117
117
|
width: 16px;
|
|
118
118
|
height: 16px;
|
|
119
119
|
color: ${e.colors.rarity};
|
|
@@ -135,7 +135,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
135
135
|
-webkit-appearance: none;
|
|
136
136
|
margin: 0;
|
|
137
137
|
}
|
|
138
|
-
`,
|
|
138
|
+
`,ue=o.span`
|
|
139
139
|
padding-bottom: 12px;
|
|
140
140
|
color: ${e.colors.text};
|
|
141
141
|
font-family: ${e.font.sans};
|
|
@@ -196,7 +196,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
196
196
|
box-shadow: 0 1px 3px rgba(22, 21, 24, 0.25);
|
|
197
197
|
cursor: pointer;
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
`,$e=o.div`
|
|
200
200
|
display: flex;
|
|
201
201
|
align-items: center;
|
|
202
202
|
justify-content: space-between;
|
|
@@ -208,11 +208,11 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
208
208
|
font-family: ${e.font.sans};
|
|
209
209
|
font-size: 13px;
|
|
210
210
|
color: ${e.colors.text};
|
|
211
|
-
`,D=o(
|
|
211
|
+
`,D=o(m)`
|
|
212
212
|
width: 16px;
|
|
213
213
|
height: 16px;
|
|
214
214
|
color: ${e.colors.text};
|
|
215
|
-
|
|
215
|
+
`,ye=o.div`
|
|
216
216
|
display: flex;
|
|
217
217
|
flex-wrap: wrap;
|
|
218
218
|
gap: 12px;
|
|
@@ -238,14 +238,14 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
238
238
|
outline: 2px solid ${e.colors.accent};
|
|
239
239
|
outline-offset: 2px;
|
|
240
240
|
}
|
|
241
|
-
`,
|
|
241
|
+
`,ke=o("span",c("color"))`
|
|
242
242
|
position: relative;
|
|
243
243
|
width: 16px;
|
|
244
244
|
height: 16px;
|
|
245
245
|
border-radius: 4px;
|
|
246
246
|
background: ${({color:i})=>i};
|
|
247
247
|
flex: none;
|
|
248
|
-
`,
|
|
248
|
+
`,je=o(m)`
|
|
249
249
|
position: absolute;
|
|
250
250
|
inset: 0;
|
|
251
251
|
width: 16px;
|
|
@@ -300,7 +300,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
300
300
|
display: flex;
|
|
301
301
|
align-items: center;
|
|
302
302
|
gap: 6px;
|
|
303
|
-
`,
|
|
303
|
+
`,Fe=o(m)`
|
|
304
304
|
width: 14px;
|
|
305
305
|
height: 14px;
|
|
306
306
|
color: ${e.colors.text};
|
|
@@ -309,7 +309,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
309
309
|
width: 16px;
|
|
310
310
|
height: 16px;
|
|
311
311
|
}
|
|
312
|
-
`,
|
|
312
|
+
`,Pe=o.span`
|
|
313
313
|
font-family: ${e.font.sans};
|
|
314
314
|
font-weight: 600;
|
|
315
315
|
font-size: 14px;
|
|
@@ -322,7 +322,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
322
322
|
${e.media.down("lg")} {
|
|
323
323
|
font-size: 16px;
|
|
324
324
|
}
|
|
325
|
-
`,Ie=o(
|
|
325
|
+
`,Ie=o(m)`
|
|
326
326
|
width: 12px;
|
|
327
327
|
height: 12px;
|
|
328
328
|
color: ${e.colors.muted2};
|
|
@@ -367,7 +367,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
367
367
|
height: 18px;
|
|
368
368
|
left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
|
|
369
369
|
}
|
|
370
|
-
`,d=1e5;function De(i){var l;for(const
|
|
370
|
+
`,d=1e5;function De(i){var l;for(const x of ie){const p=(l=x.subs)==null?void 0:l.find(r=>r.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:x,summary:p,desktopStatic:r,headerTestId:h,headerAria:u,children:f}){const g=t.jsx(ne,{up:l,size:24,color:"var(--text)"});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:r,onClick:x,"aria-expanded":l,"aria-label":u,"data-testid":h,children:[t.jsx(de,{children:i}),r?t.jsx(pe,{children:g}):g]}),!l&&p?t.jsx(he,{desktopHidden:r,children:p}):null,t.jsx(xe,{open:l,desktopStatic:r,children:t.jsx(ge,{children:f})})]})}function Me({category:i,subCategory:l,onCategory:x,onSub:p,priceMin:r,priceMax:h,onPriceMin:u,onPriceMax:f,rarities:g,onToggleRarity:E,status:S,onStatus:L,smart:b,onSmart:O}){const[_,Y]=y.useState(!0),[M,B]=y.useState(!0),[G,K]=y.useState(!1),[U,W]=y.useState(!0),R=r&&!Number.isNaN(Number(r))?Number(r):void 0,C=h&&!Number.isNaN(Number(h))?Number(h):void 0,w=R!=null?Math.min(R,d):0,$=C!=null?Math.min(C,d):d,V=w/d*100,X=$/d*100;function q(n){const a=Math.min(n,$);u(a<=0?"":String(a))}function J(n){const a=Math.max(n,w);f(a>=d?"":String(a))}const Q=l?De(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||C!=null?`${r||"0"}-${h||"∞"}`:"",ee=z.filter(n=>g.includes(n)).map(re).join(", "),te=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(ae,{children:[t.jsx(j,{title:s("assets.category"),open:_,onToggle:()=>Y(n=>!n),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:x,onSub:p})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:M,onToggle:()=>B(n=>!n),summary:Z,desktopStatic:!0,children:[t.jsxs(me,{children:[t.jsxs(T,{children:[t.jsx(N,{children:s("assets.min")}),t.jsxs(F,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:r,onChange:n=>u(n.target.value)})]})]}),t.jsx(ue,{children:s("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(N,{children:s("assets.max")}),t.jsxs(F,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:h,onChange:n=>f(n.target.value)})]})]})]}),t.jsxs(fe,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:V,maxPct:X,"aria-hidden":!0}),t.jsx(A,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>q(Number(n.target.value))}),t.jsx(A,{type:"range",min:0,max:d,value:$,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>J(Number(n.target.value))})]}),t.jsxs($e,{children:[t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),$.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:G,onToggle:()=>K(n=>!n),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx(ye,{"data-testid":"rarity-filter",children:z.map(n=>{const a=g.includes(n);return t.jsxs(ve,{type:"button",selected:a,"aria-pressed":a,onClick:()=>E(n),"data-testid":"rarity-filter-check",children:[t.jsx(ke,{color:e.rarities[n],children:a?t.jsx(je,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:a,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:U,onToggle:()=>W(n=>!n),summary:te,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,a])=>t.jsxs(Re,{children:[t.jsx(Ce,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>L(n)}),t.jsx(ze,{children:a})]},n))}),t.jsx(k,{}),t.jsxs(Te,{children:[t.jsxs(Ne,{children:[t.jsx(Fe,{name:"smart","aria-hidden":!0}),t.jsx(Pe,{children:s("filter.smart")}),t.jsx(se,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ie,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0})})]}),t.jsx(Ae,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>O(!b),children:t.jsx(He,{on:b})})]})]})}const Be=o.div`
|
|
371
371
|
position: relative;
|
|
372
372
|
display: flex;
|
|
373
373
|
gap: 32px;
|
|
@@ -404,12 +404,13 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
404
404
|
/* Reserve the scrollbar gutter so revealing the bar on hover doesn't shift the filter content. */
|
|
405
405
|
scrollbar-gutter: stable;
|
|
406
406
|
|
|
407
|
-
/*
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
/* Subtle scrollbar (matches the cart scroll list). The track width is reserved CONSTANTLY — the same
|
|
408
|
+
8px at rest and on hover — so revealing the scrollbar never consumes space and pushes the sidebar
|
|
409
|
+
content left. Only the THUMB fades in on hover; at rest both thumb and track are transparent, so
|
|
410
|
+
the gutter is invisible but its space is already held. Firefox keeps scrollbar-width: thin (not
|
|
411
|
+
none -> thin, which would also shift) and just recolours the thumb on hover. */
|
|
412
|
+
scrollbar-width: thin;
|
|
411
413
|
scrollbar-color: transparent transparent;
|
|
412
|
-
transition: scrollbar-color 0.2s ease;
|
|
413
414
|
&::-webkit-scrollbar {
|
|
414
415
|
width: 8px;
|
|
415
416
|
}
|
|
@@ -421,9 +422,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
421
422
|
border-radius: 8px;
|
|
422
423
|
transition: background 0.2s ease;
|
|
423
424
|
}
|
|
424
|
-
|
|
425
425
|
&:hover {
|
|
426
|
-
scrollbar-width: thin;
|
|
427
426
|
scrollbar-color: ${e.colors.muted2} transparent;
|
|
428
427
|
}
|
|
429
428
|
&:hover::-webkit-scrollbar-thumb {
|
|
@@ -455,7 +454,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
455
454
|
visibility: visible;
|
|
456
455
|
}
|
|
457
456
|
}
|
|
458
|
-
`,
|
|
457
|
+
`,Ue=o.div`
|
|
459
458
|
${e.media.down("lg")} {
|
|
460
459
|
flex: 1;
|
|
461
460
|
min-height: 0;
|
|
@@ -463,7 +462,7 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
463
462
|
/* Room so the last filter row clears the sticky "Show items" bar (Figma bottom bar). */
|
|
464
463
|
padding-bottom: 24px;
|
|
465
464
|
}
|
|
466
|
-
`,
|
|
465
|
+
`,We=o.div`
|
|
467
466
|
position: fixed;
|
|
468
467
|
inset: 0;
|
|
469
468
|
z-index: 9998;
|
|
@@ -544,4 +543,4 @@ import{r as $,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c a
|
|
|
544
543
|
outline: 2px solid ${e.colors.accent};
|
|
545
544
|
outline-offset: 2px;
|
|
546
545
|
}
|
|
547
|
-
`;export{qe as C,
|
|
546
|
+
`;export{qe as C,k as D,j as F,Ge as M,ye as R,Re as S,ve as a,ke as b,je as c,Se as d,Ce as e,ze as f,Be as g,We as h,Ke as i,Ve as j,Xe as k,Ue as l,Je as m,Qe as n,Me as o};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,L as R,r as L}from"./react-BrLDncxD.js";import{s as a,B as q,F as e,M as B,u as D,t as i,d as N,e as F,I as x,
|
|
1
|
+
import{j as t,L as R,r as L}from"./react-BrLDncxD.js";import{s as a,B as q,F as e,M as B,u as D,t as i,d as N,e as F,I as x,g as G,m as A,o as H,c as M,J as y,E as Q,H as z}from"./index-C1yBaAe9.js";import{g as K,a as W,s as J,b as O}from"./authorizations-ChRb35xG.js";import{f as P}from"./errors-gKUnErEU.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-CLB2z3On.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";const X=B`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,U=a.section`
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{j as e,r as y,a as qe,u as Ie,L as se}from"./react-BrLDncxD.js";import{t as a,g as R,j as J,u as Te,ae as v,a as ue,d as Fe,m as Re,n as Ae,o as Be,I as F,h as Le,e as Ue,x as D,ag as he,ah as We,E as U,s as ze,B as $e,C as Ke,w as Qe,q as me,ai as Oe,z as _e,y as Ge,aj as De}from"./index-C1yBaAe9.js";import{a as ye}from"./buy-CNc4Y8CN.js";import{g as He,a as Je,w as Ve,S as Ye,G as Xe}from"./buy-gasless-wrR0AjfW.js";import{R as H,r as Ze}from"./cart-checkout-BAUaf92R.js";import{u as es,M as ss,c as as}from"./useCreditPacks-Caur-2iX.js";import{W as ts,C as rs,a as cs}from"./CollectionCarousel-C2R0_DIx.js";import{l as ns}from"./loader-logo-BzY9EKdC.js";import{i as is,a as ls}from"./errors-gKUnErEU.js";import{E as os}from"./ErrorNotice-BDH9xoG4.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-CLB2z3On.js";import"./intl-CBcMB1D2.js";import"./authorizations-ChRb35xG.js";import"./index-HN6Rk25C.js";import"./trade-encoding-DQ3zNCj8.js";import"./address-DrURAr9O.js";const ds="https://cdn.decentraland.org/@dcl/shop/0.1.0-29944279663.commit-001b5a7/assets/buy-error-22UunaPC.png";function us(r){const{phase:n,balanceCredits:u,onClose:h}=r,C=n==="processing",w=n==="error"?a("cartCheckout.errorTitle"):n==="nofunds"?a("cartCheckout.titleNoFunds"):a("cartCheckout.titleBuy"),S=n==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:C?void 0:h,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${S?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:w}),!C&&e.jsx("button",{className:"buy-modal__x",onClick:h,"aria-label":a("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:n==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(R,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:J(u)})]})]}),n==="processing"&&e.jsx(hs,{stage:r.stage??"reserving",step:r.step??1,total:r.total??1,isSelfCustody:!!r.isSelfCustody}),n==="nofunds"&&e.jsx(ms,{lines:r.lines??[],shortfallCredits:r.shortfallCredits??0,packs:r.packs??[],selectedPack:r.selectedPack??"",onSelectPack:r.onSelectPack??(()=>{}),onBuyPacks:r.onBuyPacks??(()=>{}),onCancel:h}),n==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-error",children:[e.jsx("img",{className:"buy-error__art",src:ds,alt:"",width:64,height:80}),e.jsxs("p",{className:"buy-error__text",children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:h,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--purple",onClick:r.onRetry??h,children:a("cartCheckout.tryAgain")})]})]})]})]})}function hs({stage:r,step:n,total:u,isSelfCustody:h}){const C=r==="reserving",w=u>0?Math.min(100,Math.round(n/u*100)):0,S=r==="awaiting-signature"?h?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):r==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:ns,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:S}),C?e.jsxs("div",{className:"cart-checkout__progress-row",children:[e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill buy-modal__progress-fill--step",style:{width:`${w}%`}})}),u>1?e.jsxs("span",{className:"cart-checkout__step",children:[n,"/",u]}):null]}):e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]})}function ms({lines:r,shortfallCredits:n,packs:u,selectedPack:h,onSelectPack:C,onBuyPacks:w,onCancel:S}){const N=u.find(t=>t.id===h),V=r.reduce((t,m)=>t+(m.quantity??1),0);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsx(ts,{className:"buy-modal__warning-ico"}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,n)})})," ",a("buyModal.warningToPurchase",{count:V})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:r.map(t=>{const m=t.quantity??1;return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:t.item.thumbnail?e.jsx("img",{src:t.item.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"buy-modal__asset-name",title:t.item.name,children:[t.item.name||a("buyModal.itemFallback"),m>1?e.jsx("span",{className:"cart-checkout__qty-tag",children:a("cartCheckout.qty",{count:m})}):null]}),t.item.creator?e.jsx(rs,{address:t.item.creator,className:"buy-modal__asset-creator"}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(R,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:J(t.priceCredits*m)})]})]})]},t.item.id)})}),e.jsx("div",{className:"buy-modal__packs",children:u.map(t=>{const m=t.id===h;return e.jsxs("button",{className:`buy-modal__pack${m?" buy-modal__pack--on":""}`,onClick:()=>C(t.id),children:[e.jsx(R,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:J(t.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",t.usd.toFixed(2),")"]})]},t.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(R,{className:"buy-modal__total-ico"}),e.jsx("span",{children:J((N==null?void 0:N.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((N==null?void 0:N.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:S,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:w,children:a("buyModal.buy")})]})]})}const _s=ze($e)`
|
|
2
|
+
margin-top: 12px;
|
|
3
|
+
`;function pe(r){if(is(r))return a("errors.rejected");const n=(r.message??"").toLowerCase();return n.includes("insufficient")?a("cart.error.insufficient",{currency:Ke.name}):n.includes("no active listing")||n.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const ys=12e4;function ps(r){const n=[];return r.unavailable.length&&n.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&n.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:n.join(` ${a("cart.drop.and")} `)})}const be=r=>r.reduce((n,u)=>n+u.priceCredits*u.quantity,0),bs=r=>r.flatMap(n=>Array.from({length:n.quantity},()=>({...n,quantity:1})));function As(){Te({title:a("nav.cart"),noindex:!0});const r=v(s=>s.items),n=v(s=>s.remove),u=v(s=>s.increment),h=v(s=>s.decrement),C=v(s=>s.clear),w=v(s=>s.restore),S=v(s=>s.setFittingOpen),N=ue(s=>s.items),V=ue(s=>s.toggle),{session:t}=Fe(),m=es().packs.slice(0,ss);y.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const ge=r.some(s=>s.category!=="emote"),{data:Y}=Re({queryKey:["upsell-listings"],queryFn:()=>De({first:40}),staleTime:6e4}),{data:A}=Ae(t),W=Be(),z=qe(),{state:M}=Ie(),[ae,B]=y.useState(null),[fe,E]=y.useState(null),[te,$]=y.useState(null),[xe,P]=y.useState(!1),[f,L]=y.useState(null),re=y.useRef(0),[o,j]=y.useState(null),[X,ce]=y.useState(""),Z=y.useRef(null),je=r.reduce((s,c)=>s+c.priceCredits*c.quantity,0),ne=r.reduce((s,c)=>s+c.quantity,0),ke=f?f.liveTotalCredits:je,ve=new Set(r.map(s=>s.id)),ie=((Y==null?void 0:Y.items)??[]).filter(s=>!ve.has(s.id)).slice(0,12),Ce=new Map(f==null?void 0:f.buyable.map(s=>[s.item.id,s])),K=(A==null?void 0:A.credits)??0,Ne=We;function Q(s){s(),L(null),$(null),E(null)}function we(){j(null),P(!1)}function le(s){const c=be(s),i=Math.max(0,c-K),p=m.find(d=>d.credits>=i)??m[m.length-1];ce(p.id),D("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:c,credits_balance:K,shortfall:i}),j({phase:"nofunds",lines:s.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:i}),P(!1)}async function Se(s){if(!t||s.length===0)return;const c=bs(s),i=c.map(l=>({...l.item,priceCredits:l.priceCredits})),p=s.map(l=>({...l.item,priceCredits:l.priceCredits,quantity:l.quantity})),d=[];let k="authorize",G=!1;j({phase:"processing",stage:"reserving",step:1,total:c.length});try{const l=[];for(let x=0;x<c.length;x++){const T=c[x];j({phase:"processing",stage:"reserving",step:x+1,total:c.length});try{const{credit:_,maxCreditedValue:ee}=await Qe(t.identity,T.usdCents,T.trade.id);d.push(_.id),l.push({trade:T.trade,credits:[_],maxCreditedValue:ee})}catch(_){if(ls(_)){if(d.length){try{await me(t.identity,d)}catch(ee){U(ee,{flow:"cart_checkout",step:"release"})}W.invalidateQueries({queryKey:["usd-balance"]})}le(s);return}throw _}}k="submit";const b=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});let g=[];if(He())try{g=await Je({purchases:l,buyer:t.address,signer:t.signer,onSigned:b});const T=(await Promise.allSettled(g.map(_=>Ve(_)))).flatMap(_=>_.status==="rejected"?[_.reason]:[]);if(T.length&&!T.some(_=>_ instanceof Ye))throw T[0];G=!0}catch(x){if(!(x instanceof Xe))throw x;g=await ye({purchases:l,buyer:t.address,signer:t.signer,onSigned:b})}else g=await ye({purchases:l,buyer:t.address,signer:t.signer});s.forEach(x=>n(x.item.id)),L(null),D("Shop Completed Purchase",{...Oe(i),payment_type:"credits",no_crypto_step:G,transaction_hash:g[0]??null}),W.invalidateQueries({queryKey:["usd-balance"]});const I=Z.current;Z.current=null,j(null),P(!1);const Pe={items:p,txHash:g[0]??void 0,settled:!0,...I?{creditsAdded:I}:{}};z("/success",{state:Pe,replace:!0})}catch(l){if(_e(l)||U(l,{flow:"cart_checkout",step:k,cart_size:s.length}),D(_e(l)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:k,error_code:Ge(l),value_usd:he(i.reduce((b,g)=>b+g.priceCredits,0)),cart_size:c.length}),d.length){try{await me(t.identity,d)}catch(b){U(b,{flow:"cart_checkout",step:"release"})}W.invalidateQueries({queryKey:["usd-balance"]})}j({phase:"error",message:pe(l)})}}function oe(s){const c=be(s);if(A!=null&&A.credits<c){le(s);return}Se(s)}async function O(){if(!t){E(a("buyModal.signInToCheckout"));return}const s=v.getState().items;if(s.length===0)return;E(null),$(null),P(!0);const c=s.reduce((i,p)=>i+p.priceCredits*p.quantity,0);D("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:he(c),has_sufficient_credits:K>=c});try{B(a("cart.status.reviewing"));const i=await Ze(s,t.address,Ne),p=[...i.unavailable,...i.own];if(p.length&&(p.forEach(d=>n(d.id)),$(ps(i))),i.buyable.length===0){E(a("cart.error.noneAvailable")),L(null),B(null);return}if(i.orderChanged){L(i),re.current=Date.now(),B(null);return}B(null),oe(i.buyable)}catch(i){U(i,{flow:"cart_checkout",step:"review",cart_size:s.length}),E(pe(i)),B(null)}finally{P(!1)}}async function Me(){if(f){if(!t){E(a("buyModal.signInToCheckout"));return}if(Date.now()-re.current>ys){L(null),$(null),await O();return}E(null),oe(f.buyable)}}async function Ee(){if(X){try{sessionStorage.setItem(H,JSON.stringify(v.getState().items))}catch{}P(!0);try{const s=await as(X,t?{address:t.address,identity:t.identity}:void 0);if(s.url){window.location.href=s.url;return}z("/credits")}catch(s){try{sessionStorage.removeItem(H)}catch{}U(s,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{P(!1)}}}const de=y.useRef(!1);y.useEffect(()=>{if(!(M!=null&&M.resumeCheckout)||de.current)return;de.current=!0,Z.current=M.creditsAdded??null;try{const c=sessionStorage.getItem(H);if(c){sessionStorage.removeItem(H);const i=JSON.parse(c);Array.isArray(i)&&i.length&&w(i)}}catch{}W.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void O(),0);return()=>clearTimeout(s)},[M==null?void 0:M.resumeCheckout]);const q=xe||(o==null?void 0:o.phase)==="processing";return r.length===0&&!o?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx(F,{name:"cart",size:44,color:"var(--muted-2)"}),e.jsx("p",{className:"cart-empty__title",children:a("cart.empty.title")}),e.jsx("p",{className:"muted",children:a("cart.empty.body")}),e.jsx(_s,{as:se,to:"/assets",variant:"purple",children:a("cart.empty.cta")})]}):e.jsxs("div",{className:"checkout",children:[e.jsxs("div",{className:"checkout__top",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>z(-1),type:"button",children:[e.jsx(F,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs("div",{className:"checkout__body",children:[e.jsxs("div",{className:"checkout__left",children:[e.jsxs("div",{className:"checkout__head-card",children:[e.jsx("button",{className:"checkout__panel-back",onClick:()=>z(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(F,{name:"arrow-left"})}),e.jsx("h1",{className:"checkout__panel-title",children:a("cart.panelTitle",{count:ne})}),ge?e.jsxs("button",{className:"checkout__fitting",onClick:()=>S(!0),disabled:q,children:[e.jsx(F,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs("section",{className:"checkout__panel",children:[e.jsx("div",{className:"checkout__list",children:r.map(s=>{const c=Ce.get(s.id),i=c?c.priceCredits:s.priceCredits,p=!!c&&c.priceCredits!==s.priceCredits,d=!s.tokenId,k=s.quantity,G=typeof s.available=="number"&&k>=s.available,l=i*k,b=!!N[s.id],g=s.tokenId??s.itemId,I=s.contractAddress&&g?`/item/${s.contractAddress}/${g}`:null;return e.jsxs("div",{className:"checkout__card",children:[e.jsxs("div",{className:"checkout__thumb",children:[I?e.jsx(se,{className:"checkout__thumb-link",to:I,state:{item:s,tradeId:s.tradeId},"aria-label":s.name,children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}):s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null,e.jsx("span",{className:"checkout__thumb-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"checkout__info",children:[e.jsxs("div",{className:"checkout__desc",children:[I?e.jsx(se,{className:"checkout__name",to:I,state:{item:s,tradeId:s.tradeId},title:s.name,children:s.name}):e.jsx("div",{className:"checkout__name",title:s.name,children:s.name}),s.creator?e.jsx(Le,{address:s.creator,className:"checkout__creator",linkToProfile:!0}):null]}),e.jsxs("div",{className:"checkout__foot",children:[d?e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>Q(()=>h(s.id)),disabled:q||k<=1,"aria-label":a("cart.decreaseQuantity",{name:s.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx("span",{className:"checkout__qty",children:k}),e.jsx("button",{className:"checkout__step",onClick:()=>Q(()=>u(s.id)),disabled:q||G,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs("div",{className:"checkout__price",children:[e.jsx(R,{className:"checkout__price-ico"})," ",l,p?e.jsx("span",{className:"checkout__price-was",children:s.priceCredits*k}):null]})]})]}),e.jsxs("div",{className:"checkout__actions",children:[e.jsx("button",{className:`checkout__fav${b?" is-on":""}`,onClick:()=>V(s),"aria-label":b?a("cart.removeFromFavorites",{name:s.name}):a("cart.addToFavorites",{name:s.name}),title:b?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(F,{name:b?"heart-solid":"heart"})}),e.jsx("button",{className:"checkout__remove",onClick:()=>Q(()=>n(s.id)),disabled:q,"aria-label":a("cart.remove",{name:s.name}),title:a("cart.removeTitle"),children:e.jsx(F,{name:"trash",size:24})})]})]},s.id)})}),e.jsx("div",{className:"checkout__utils",children:e.jsx("button",{className:"link",onClick:()=>Q(C),disabled:q,children:a("cart.clearCart")})})]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:a("cart.purchaseSummary")}),e.jsxs("div",{className:"checkout__summary-body",children:[e.jsxs("div",{className:"checkout__total-line",children:[e.jsx("span",{className:"checkout__total-label",children:a("cart.totalItems",{count:ne})}),e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(R,{className:"checkout__total-ico"})," ",ke]})]}),e.jsx("button",{className:"checkout__cta",onClick:()=>void(f?Me():O()),disabled:q,children:q?a("cart.working"):f?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),f?e.jsx("p",{className:"muted checkout__msg",children:a("cart.priceChanged")}):null,te?e.jsx("p",{className:"muted checkout__msg",children:te}):null,ae?e.jsx("p",{className:"muted checkout__msg",children:ae}):null,e.jsx(os,{message:fe,className:"checkout__msg"})]})]})]})]}),ie.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(cs,{title:a("cart.youMightAlsoLike"),items:ie})}):null,o?e.jsx(us,{phase:o.phase,balanceCredits:K,onClose:we,stage:o.phase==="processing"?o.stage:void 0,step:o.phase==="processing"?o.step:void 0,total:o.phase==="processing"?o.total:void 0,isSelfCustody:Ue(t==null?void 0:t.providerType),lines:o.phase==="nofunds"?o.lines:void 0,shortfallCredits:o.phase==="nofunds"?o.shortfall:void 0,packs:m,selectedPack:X,onSelectPack:ce,onBuyPacks:()=>void Ee(),message:o.phase==="error"?o.message:void 0,onRetry:()=>void O()}):null]})}export{As as Cart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
body.shop-cart-bg{background:var(--media)}.checkout{max-width:1510px;margin:0 auto}.checkout__top{position:relative}.checkout__back{display:inline-flex;align-items:center;gap:6px;margin:0 0 16px;padding:0;border:0;background:none;color:var(--text-2);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;cursor:pointer;transition:color .15s ease}.checkout__back:hover{color:var(--accent)}.checkout__back .ico{width:18px;height:18px}.checkout__body{display:grid;grid-template-columns:minmax(0,1fr) 615px;gap:24px;align-items:start}.checkout__left{min-width:0;display:flex;flex-direction:column;gap:12px}.checkout__head-card{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-radius:16px;padding:12px 12px 12px 24px}.checkout__panel{min-width:0;background:#fff;border-radius:16px;padding:24px}.checkout__panel-back{display:none}.checkout__panel-title{margin:0;font-size:14px;font-weight:600;line-height:1.57;color:var(--text)}.checkout__fitting{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 12px;border:2px solid transparent;border-radius:8px;background:linear-gradient(#fff,#fff) padding-box,var(--amethyst) border-box;color:var(--accent);font-size:13px;font-weight:600;line-height:24px;letter-spacing:.46px;text-transform:uppercase;white-space:nowrap;cursor:pointer;transition:box-shadow .15s ease,filter .15s ease}.checkout__fitting:hover:not(:disabled){box-shadow:0 0 8px #a524b359}.checkout__fitting:active:not(:disabled){filter:brightness(.97)}.checkout__fitting:disabled{opacity:.55;cursor:default}.checkout__fitting-ico{width:24px;height:24px}.checkout__list{display:flex;flex-direction:column;gap:24px}.checkout__card{position:relative;display:flex;align-items:stretch;gap:12px;background:#fff;border:1px solid #cfcdd4;border-radius:12px;overflow:hidden}.checkout__thumb{position:relative;flex-shrink:0;width:137.5px;height:137px;background:var(--media);border-radius:12px;display:grid;place-items:center;overflow:hidden}.checkout__thumb-link{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center}.checkout__thumb img{width:83%;height:83%;object-fit:contain;filter:drop-shadow(.56px 2.25px 2.8px rgba(0,0,0,.1))}.checkout__thumb-check{position:absolute;top:7.5px;left:7.5px;width:20px;height:20px;border-radius:50%;background:#34ce77;display:grid;place-items:center}.checkout__info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:8px;padding:16px 8px}.checkout__desc{display:flex;flex-direction:column;gap:4px;min-width:0;padding-right:64px}.checkout__name{display:block;font-size:16px;font-weight:600;line-height:1.2;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a.checkout__name:hover{color:var(--accent)}.checkout__creator{font-size:10px;line-height:1.43;color:var(--muted)}.checkout__creator [data-avatar]{display:none}.checkout__creator [data-testid=creator-name]{font-size:10px;line-height:1.43}.checkout__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:8px}.checkout__stepper{display:inline-flex;align-items:center;gap:8px;padding:6px;border:.5px solid var(--muted-2);border-radius:50px}.checkout__step{display:grid;place-items:center;width:16px;height:16px;padding:0;border:0;background:none;color:var(--text);cursor:pointer}.checkout__step:disabled{color:var(--muted-2);cursor:default}.checkout__step svg{width:16px;height:16px}.checkout__qty{min-width:12px;font-size:14px;font-weight:500;line-height:1.2;color:var(--text);text-align:center}.checkout__price{display:inline-flex;align-items:center;gap:4px;margin-left:auto;font-size:24px;font-weight:600;color:var(--text-2)}.checkout__price-ico{width:24px;height:24px;background:var(--accent)}.checkout__price-was{margin-left:6px;font-size:14px;font-weight:500;color:var(--muted);text-decoration:line-through}.checkout__actions{position:absolute;top:9px;right:7px;display:flex;align-items:flex-start;gap:12px}.checkout__fav,.checkout__remove{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;background:none;color:var(--muted);cursor:pointer;transition:color .12s ease}.checkout__fav:hover:not(:disabled){color:var(--text)}.checkout__fav.is-on{color:var(--dcl-red)}.checkout__remove:hover:not(:disabled){color:var(--dcl-red)}.checkout__fav:disabled,.checkout__remove:disabled{opacity:.5;cursor:default}.checkout__utils{display:flex;gap:20px;margin-top:16px}.checkout__utils .link{font-size:13px;color:var(--muted);font-weight:600}.checkout__utils .link:hover:not(:disabled){color:var(--text)}.checkout__summary{position:sticky;top:172px;display:flex;flex-direction:column;background:#fff;box-shadow:0 1px 3px #1615180f;border-radius:16px;padding:16px}.checkout__summary-title{margin:0 0 24px;padding-bottom:16px;border-bottom:1px solid #cfcdd4;font-size:24px;font-weight:600;color:var(--text)}.checkout__summary-body{display:flex;flex-direction:column;gap:12px}.checkout__total-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.checkout__total-label{font-size:16px;font-weight:400;color:var(--muted)}.checkout__total-value{display:inline-flex;align-items:center;gap:8px;font-size:24px;font-weight:600;color:var(--text-2)}.checkout__total-ico{width:30px;height:30px;background:var(--accent)}.checkout__cta{width:100%;height:56px;border:0;border-radius:8px;background:var(--amethyst);color:var(--soft-white);font-size:15px;font-weight:600;letter-spacing:.046em;text-transform:uppercase;cursor:pointer;transition:background .15s ease,filter .15s ease}.checkout__cta:hover:not(:disabled){background:var(--accent)}.checkout__cta:active:not(:disabled){filter:brightness(.95)}.checkout__cta:disabled{opacity:.6;cursor:default}.checkout__msg{margin:0;font-size:13px}.cart-upsell{position:relative;padding:40px 0 24px}.cart-upsell:before{content:"";position:absolute;top:0;bottom:-80px;left:50%;width:100vw;transform:translate(-50%);background:var(--bg);z-index:0}.cart-upsell>*{position:relative;z-index:1}@media(max-width:1080px){.checkout__body{grid-template-columns:1fr}.checkout__summary{position:static}}@media(max-width:880px){.checkout{padding-bottom:188px}.checkout__back{display:none}.checkout__panel{padding:16px}.checkout__panel-head{margin-bottom:16px;gap:8px}.checkout__panel-back{display:inline-flex;align-items:center;flex-shrink:0;border:0;background:none;padding:0;color:var(--text);cursor:pointer}.checkout__panel-back .ico{width:20px;height:20px}.checkout__panel-title{flex:1;min-width:0;font-size:16px}.checkout__fitting{height:36px;padding:0 10px;font-size:12px}.checkout__fitting-ico{width:20px;height:20px}.checkout__thumb{width:120px;height:120px}.checkout__info{padding:12px 4px 12px 0}.checkout__name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.checkout__price{font-size:20px}.checkout__price-ico{width:20px;height:20px}.checkout__summary{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:30;border:0;border-radius:16px 16px 0 0;box-shadow:0 -4px 20px #1615181f}.checkout__summary-title{margin-bottom:12px;padding-bottom:12px}}.cart-checkout__progress-row{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.cart-checkout__step{font-size:16px;line-height:22px;color:var(--text-2);text-transform:capitalize;white-space:nowrap}.cart-checkout__scroll{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow-y:auto;width:100%;scrollbar-width:thin;scrollbar-color:#a2a2a2 var(--media)}.cart-checkout__scroll::-webkit-scrollbar{width:8px}.cart-checkout__scroll::-webkit-scrollbar-track{background:var(--media);border-radius:10px}.cart-checkout__scroll::-webkit-scrollbar-thumb{background:#a2a2a2;border-radius:8px}.cart-checkout__done{display:flex;flex-direction:column;border:1px solid var(--muted-2);border-radius:16px;padding:24px}.cart-checkout__done-scroll{display:flex;flex-direction:column;gap:12px;max-height:320px;overflow-y:auto}.cart-checkout__done-row{display:flex;align-items:center;gap:12px}.cart-checkout__done-row+.cart-checkout__done-row{border-top:1px solid var(--line);padding-top:12px}.cart-checkout__done-thumb{position:relative;flex-shrink:0;width:96px;height:96px;background:var(--media);border:.13px solid var(--muted-2);border-radius:8px;display:grid;place-items:center;overflow:hidden}.cart-checkout__done-thumb img{width:83%;height:83%;object-fit:contain}.cart-checkout__done-check{position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:4px;background:var(--dcl-red);display:grid;place-items:center}.cart-checkout__done-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding:8px;overflow:hidden}.cart-checkout__done-name{font-size:20px;font-weight:600;line-height:1.4;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__qty-tag{margin-left:6px;font-size:12px;font-weight:600;color:var(--muted)}.cart-checkout__done-creator{font-size:10px;line-height:1.43;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-price{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;padding-right:4px;font-size:24px;font-weight:600;color:var(--text-2)}.cart-checkout__done-price-ico{width:24px;height:24px;background:var(--accent)}.cart-checkout__done-body{display:flex;flex-direction:column;gap:12px}.cart-checkout__done-body .buy-modal__success{flex-direction:row;align-items:center;gap:24px;padding:16px 24px}.cart-checkout__done-body .buy-modal__success-text{text-align:left;font-size:18px}.cart-checkout__done-body .buy-modal__btn{min-width:0}@media(max-width:600px){.cart-checkout__done-body .buy-modal__success{flex-direction:column;gap:12px;padding:16px}.cart-checkout__done-body .buy-modal__success-text{text-align:center}.cart-checkout__done{padding:16px}.cart-checkout__done-thumb{width:72px;height:72px}.cart-checkout__done-name{font-size:16px}.cart-checkout__done-price{font-size:20px}.cart-checkout__done-price-ico{width:20px;height:20px}}
|
|
1
|
+
body.shop-cart-bg{background:var(--media)}.checkout{max-width:1510px;margin:0 auto}.checkout__top{position:relative}.checkout__back{display:inline-flex;align-items:center;gap:6px;margin:0 0 16px;padding:0;border:0;background:none;color:var(--text-2);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;cursor:pointer;transition:color .15s ease}.checkout__back:hover{color:var(--accent)}.checkout__back .ico{width:18px;height:18px}.checkout__body{display:grid;grid-template-columns:minmax(0,1fr) 615px;gap:24px;align-items:start}.checkout__left{min-width:0;display:flex;flex-direction:column;gap:12px}.checkout__head-card{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-radius:16px;padding:12px 12px 12px 24px}.checkout__panel{min-width:0;background:#fff;border-radius:16px;padding:24px}.checkout__panel-back{display:none}.checkout__panel-title{margin:0;font-size:14px;font-weight:600;line-height:1.57;color:var(--text)}.checkout__fitting{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 12px;border:2px solid transparent;border-radius:8px;background:linear-gradient(#fff,#fff) padding-box,var(--amethyst) border-box;color:var(--accent);font-size:13px;font-weight:600;line-height:24px;letter-spacing:.46px;text-transform:uppercase;white-space:nowrap;cursor:pointer;transition:box-shadow .15s ease,filter .15s ease}.checkout__fitting:hover:not(:disabled){box-shadow:0 0 8px #a524b359}.checkout__fitting:active:not(:disabled){filter:brightness(.97)}.checkout__fitting:disabled{opacity:.55;cursor:default}.checkout__fitting-ico{width:24px;height:24px}.checkout__list{display:flex;flex-direction:column;gap:24px}.checkout__card{position:relative;display:flex;align-items:stretch;gap:12px;background:#fff;border:1px solid #cfcdd4;border-radius:12px;overflow:hidden}.checkout__thumb{position:relative;flex-shrink:0;width:137.5px;height:137px;background:var(--media);border-radius:12px;display:grid;place-items:center;overflow:hidden}.checkout__thumb-link{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center}.checkout__thumb img{width:83%;height:83%;object-fit:contain;filter:drop-shadow(.56px 2.25px 2.8px rgba(0,0,0,.1))}.checkout__thumb-check{position:absolute;top:7.5px;left:7.5px;width:20px;height:20px;border-radius:50%;background:#34ce77;display:grid;place-items:center}.checkout__info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:8px;padding:16px 8px}.checkout__desc{display:flex;flex-direction:column;gap:4px;min-width:0;padding-right:64px}.checkout__name{display:block;font-size:16px;font-weight:600;line-height:1.2;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a.checkout__name:hover{color:var(--accent)}.checkout__creator{font-size:10px;line-height:1.43;color:var(--muted)}.checkout__creator [data-avatar]{display:none}.checkout__creator [data-testid=creator-name]{font-size:10px;line-height:1.43}.checkout__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:8px}.checkout__stepper{display:inline-flex;align-items:center;gap:8px;padding:6px;border:.5px solid var(--muted-2);border-radius:50px}.checkout__step{display:grid;place-items:center;width:16px;height:16px;padding:0;border:0;background:none;color:var(--text);cursor:pointer}.checkout__step:disabled{color:var(--muted-2);cursor:default}.checkout__step svg{width:16px;height:16px}.checkout__qty{min-width:12px;font-size:14px;font-weight:500;line-height:1.2;color:var(--text);text-align:center}.checkout__price{display:inline-flex;align-items:center;gap:4px;margin-left:auto;font-size:24px;font-weight:600;color:var(--text-2)}.checkout__price-ico{width:24px;height:24px;background:var(--accent)}.checkout__price-was{margin-left:6px;font-size:14px;font-weight:500;color:var(--muted);text-decoration:line-through}.checkout__actions{position:absolute;top:9px;right:7px;display:flex;align-items:flex-start;gap:12px}.checkout__fav,.checkout__remove{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;background:none;color:var(--muted);cursor:pointer;transition:color .12s ease}.checkout__fav:hover:not(:disabled){color:var(--text)}.checkout__fav.is-on{color:var(--dcl-red)}.checkout__remove:hover:not(:disabled){color:var(--dcl-red)}.checkout__fav:disabled,.checkout__remove:disabled{opacity:.5;cursor:default}.checkout__utils{display:flex;gap:20px;margin-top:16px}.checkout__utils .link{font-size:13px;color:var(--muted);font-weight:600}.checkout__utils .link:hover:not(:disabled){color:var(--text)}.checkout__summary{position:sticky;top:172px;display:flex;flex-direction:column;background:#fff;box-shadow:0 1px 3px #1615180f;border-radius:16px;padding:16px}.checkout__summary-title{margin:0 0 24px;padding-bottom:16px;border-bottom:1px solid #cfcdd4;font-size:24px;font-weight:600;color:var(--text)}.checkout__summary-body{display:flex;flex-direction:column;gap:12px}.checkout__total-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.checkout__total-label{font-size:16px;font-weight:400;color:var(--muted)}.checkout__total-value{display:inline-flex;align-items:center;gap:8px;font-size:24px;font-weight:600;color:var(--text-2)}.checkout__total-ico{width:30px;height:30px;background:var(--accent)}.checkout__cta{width:100%;height:56px;border:0;border-radius:8px;background:var(--amethyst);color:var(--soft-white);font-size:15px;font-weight:600;letter-spacing:.046em;text-transform:uppercase;cursor:pointer;transition:background .15s ease,filter .15s ease}.checkout__cta:hover:not(:disabled){background:var(--accent)}.checkout__cta:active:not(:disabled){filter:brightness(.95)}.checkout__cta:disabled{opacity:.6;cursor:default}.checkout__msg{margin:0;font-size:13px}.cart-upsell{position:relative;padding:47px 0 24px}.cart-upsell .collection-carousel{margin-top:0}.cart-upsell:before{content:"";position:absolute;top:0;bottom:-80px;left:50%;width:100vw;transform:translate(-50%);background:var(--bg);z-index:0}.cart-upsell>*{position:relative;z-index:1}@media(max-width:1080px){.checkout__body{grid-template-columns:1fr}.checkout__summary{position:static}}@media(max-width:880px){.checkout{padding-bottom:188px}.checkout__back{display:none}.checkout__panel{padding:16px}.checkout__panel-head{margin-bottom:16px;gap:8px}.checkout__panel-back{display:inline-flex;align-items:center;flex-shrink:0;border:0;background:none;padding:0;color:var(--text);cursor:pointer}.checkout__panel-back .ico{width:20px;height:20px}.checkout__panel-title{flex:1;min-width:0;font-size:16px}.checkout__fitting{height:36px;padding:0 10px;font-size:12px}.checkout__fitting-ico{width:20px;height:20px}.checkout__thumb{width:120px;height:120px}.checkout__info{padding:12px 4px 12px 0}.checkout__name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.checkout__price{font-size:20px}.checkout__price-ico{width:20px;height:20px}.checkout__summary{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:30;border:0;border-radius:16px 16px 0 0;box-shadow:0 -4px 20px #1615181f}.checkout__summary-title{margin-bottom:12px;padding-bottom:12px}}.cart-checkout__progress-row{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.cart-checkout__step{font-size:16px;line-height:22px;color:var(--text-2);text-transform:capitalize;white-space:nowrap}.cart-checkout__scroll{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow-y:auto;width:100%;scrollbar-width:thin;scrollbar-color:#a2a2a2 var(--media)}.cart-checkout__scroll::-webkit-scrollbar{width:8px}.cart-checkout__scroll::-webkit-scrollbar-track{background:var(--media);border-radius:10px}.cart-checkout__scroll::-webkit-scrollbar-thumb{background:#a2a2a2;border-radius:8px}.cart-checkout__done{display:flex;flex-direction:column;border:1px solid var(--muted-2);border-radius:16px;padding:24px}.cart-checkout__done-scroll{display:flex;flex-direction:column;gap:12px;max-height:320px;overflow-y:auto}.cart-checkout__done-row{display:flex;align-items:center;gap:12px}.cart-checkout__done-row+.cart-checkout__done-row{border-top:1px solid var(--line);padding-top:12px}.cart-checkout__done-thumb{position:relative;flex-shrink:0;width:96px;height:96px;background:var(--media);border:.13px solid var(--muted-2);border-radius:8px;display:grid;place-items:center;overflow:hidden}.cart-checkout__done-thumb img{width:83%;height:83%;object-fit:contain}.cart-checkout__done-check{position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:4px;background:var(--dcl-red);display:grid;place-items:center}.cart-checkout__done-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding:8px;overflow:hidden}.cart-checkout__done-name{font-size:20px;font-weight:600;line-height:1.4;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__qty-tag{margin-left:6px;font-size:12px;font-weight:600;color:var(--muted)}.cart-checkout__done-creator{font-size:10px;line-height:1.43;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-price{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;padding-right:4px;font-size:24px;font-weight:600;color:var(--text-2)}.cart-checkout__done-price-ico{width:24px;height:24px;background:var(--accent)}.cart-checkout__done-body{display:flex;flex-direction:column;gap:12px}.cart-checkout__done-body .buy-modal__success{flex-direction:row;align-items:center;gap:24px;padding:16px 24px}.cart-checkout__done-body .buy-modal__success-text{text-align:left;font-size:18px}.cart-checkout__done-body .buy-modal__btn{min-width:0}@media(max-width:600px){.cart-checkout__done-body .buy-modal__success{flex-direction:column;gap:12px;padding:16px}.cart-checkout__done-body .buy-modal__success-text{text-align:center}.cart-checkout__done{padding:16px}.cart-checkout__done-thumb{width:72px;height:72px}.cart-checkout__done-name{font-size:16px}.cart-checkout__done-price{font-size:20px}.cart-checkout__done-price-ico{width:20px;height:20px}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N,O as U,P as w,Q as z,R as o,S as E,U as c,V as I,W as g,X as D,M}from"./index-
|
|
1
|
+
import{N,O as U,P as w,Q as z,R as o,S as E,U as c,V as I,W as g,X as D,M}from"./index-C1yBaAe9.js";import{r as W,j as v}from"./react-BrLDncxD.js";function F(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const K=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,S,b,$;const t=44,V=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as p,d as Q,a as Y}from"./react-BrLDncxD.js";import{F as N,s as v,
|
|
1
|
+
import{j as e,r as p,d as Q,a as Y}from"./react-BrLDncxD.js";import{F as N,s as v,ak as Z,I as J,t,c as V,E as W,m as X,u as ee,A as ae,ao as te,C as re,ap as se}from"./index-C1yBaAe9.js";import{E as oe}from"./ErrorNotice-BDH9xoG4.js";import{d as ie,g as ce,a as ne,A as le}from"./collection-4y6zy3OY.js";import{u as de}from"./useStore-DjC0Mzyl.js";import{s as E}from"./address-DrURAr9O.js";import{d as F,a as me,F as pe,e as ue,S as R,b as ge}from"./categories-BKqMpg3a.js";import{L as xe}from"./LoadMore-wolzH5ER.js";import{u as he}from"./useInfiniteGrid-CRDFn4if.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-CLB2z3On.js";import"./intl-CBcMB1D2.js";import"./emotion-CSxEP8yM.js";const be=v.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${N.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as o}from"./react-BrLDncxD.js";import{ak as b,G as N,t as n,I as E,al as _,A as W}from"./index-C1yBaAe9.js";import{s as A}from"./address-DrURAr9O.js";function M({address:c,className:i}){const{data:l}=b(c),s=l!=null&&l.name?N(l.name):A(c);return e.jsx("div",{className:i,children:n("search.byCreator",{name:s})})}function P({className:c}){return e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:c,children:[e.jsx("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"#691fa9",strokeWidth:"1.8"}),e.jsx("path",{d:"M12 7v6",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"16.5",r:"1.1",fill:"#691fa9"})]})}function z({title:c,items:i,onViewAll:l}){const s=o.useRef(null),[d,v]=o.useState(1),[h,j]=o.useState(0),[g,k]=o.useState(!0),[p,C]=o.useState(!1),a=o.useCallback(()=>{const r=s.current;if(!r)return;const{scrollLeft:t,scrollWidth:f,clientWidth:u}=r,x=Math.max(1,Math.ceil(f/u));v(x),j(Math.min(x-1,Math.round(t/u))),k(t<=1),C(t+u>=f-1)},[]);if(o.useEffect(()=>{a();const r=s.current;if(r)return r.addEventListener("scroll",a,{passive:!0}),window.addEventListener("resize",a),()=>{r.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[a,i.length]),i.length===0)return null;function m(r){const t=s.current;t&&t.scrollBy({left:r*t.clientWidth,behavior:"smooth"})}function w(r){const t=s.current;t&&t.scrollTo({left:r*t.clientWidth,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:c}),l?e.jsxs("button",{className:"collection-carousel__viewall",onClick:l,children:[n("collectionCarousel.viewAll"),e.jsx(E,{name:"chevron-down",size:16,className:"collection-carousel__viewall-ico"})]}):null]}),e.jsxs("div",{className:"collection-carousel__viewport",children:[e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--left",onClick:()=>m(-1),"aria-label":n("collectionCarousel.scrollLeft"),disabled:g,children:e.jsx("img",{src:_,alt:"","aria-hidden":!0})}),e.jsx("div",{className:"collection-carousel__track",ref:s,children:i.map(r=>e.jsx(W,{item:r},r.id))}),e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--right",onClick:()=>m(1),"aria-label":n("collectionCarousel.scrollRight"),disabled:p,children:e.jsx("img",{src:_,alt:"","aria-hidden":!0})})]}),d>1?e.jsx("div",{className:"collection-carousel__dots","aria-label":n("collectionCarousel.pages"),children:Array.from({length:d}).map((r,t)=>e.jsx("button",{className:`collection-carousel__dot${t===h?" is-active":""}`,"aria-label":n("collectionCarousel.goToPage",{page:t+1}),"aria-current":t===h?"true":void 0,onClick:()=>w(t)},t))}):null]})}export{M as C,P as W,z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K,j as e,L as re,d as se,b as te,r as
|
|
1
|
+
import{a as K,j as e,L as re,d as se,b as te,r as N}from"./react-BrLDncxD.js";import{aq as oe,ar as ce,h as le,t as a,as as E,B as ne,ak as D,d as ie,I,c as de,u as me,A as ue,aj as he,at as ge,C as xe}from"./index-C1yBaAe9.js";import{d as _e,g as pe,a as je,A as Ne}from"./collection-4y6zy3OY.js";import{u as be,L as fe}from"./useStore-DjC0Mzyl.js";import{s as O}from"./address-DrURAr9O.js";import{d as $,a as ve,S as w,F as Ce,e as we,b as ke}from"./categories-BKqMpg3a.js";import{L as B}from"./LoadMore-wolzH5ER.js";import{u as R}from"./useInfiniteGrid-CRDFn4if.js";import{E as T}from"./ErrorNotice-BDH9xoG4.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-CLB2z3On.js";import"./intl-CBcMB1D2.js";import"./emotion-CSxEP8yM.js";function Pe({collection:t,cover:r,itemCount:o}){const n=K(),{contractAddress:m,name:g,creator:x}=t,j=r==null||o==null,{data:i}=oe(m,j),p=r==null?(i==null?void 0:i.items)??[]:[],h=o??(i==null?void 0:i.total);function _(){n(`/collection/${m}`)}return e.jsxs("article",{className:"coll-card",role:"link",tabIndex:0,onClick:_,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),_())},children:[e.jsx("div",{className:"coll-card__media",children:r?e.jsx("img",{className:"coll-card__img","data-testid":"coll-card-img",src:r,alt:"",loading:"lazy"}):p.length>0?e.jsx(ce,{items:p,className:"coll-card__cover"}):null}),e.jsxs("div",{className:"coll-card__body",children:[e.jsx("h3",{className:"coll-card__name",title:g,children:g}),e.jsxs("div",{className:"coll-card__meta",children:[x?e.jsx(le,{address:x,className:"coll-card__creator",linkToProfile:!0}):e.jsx("span",{className:"coll-card__creator",children:" "}),e.jsx("span",{className:"coll-card__count",children:h==null?"…":a("collectionCard.itemCount",{count:h})})]}),e.jsx("button",{className:"coll-card__view",onClick:d=>{d.stopPropagation(),_()},tabIndex:-1,children:a("collectionCard.viewCollection")})]})]})}function Se({address:t,className:r=""}){const o=E(m=>m.followed.includes(t.toLowerCase())),n=E(m=>m.toggle);return t?e.jsx(ne,{type:"button",size:"sm",variant:o?"ghost":"outline",className:r||void 0,"aria-pressed":o,title:o?a("creator.unfollowTitle"):a("creator.followTitle"),onClick:()=>n(t),children:o?a("creator.following"):a("creator.follow")}):null}const ye={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Le({address:t}){var d,b;const{data:r}=D(t),{data:o}=be(t),n=ie(l=>{var f;return(f=l.session)==null?void 0:f.address}),m=!!n&&n.toLowerCase()===t.toLowerCase(),g=(r==null?void 0:r.name)||O(t),x=(b=(d=r==null?void 0:r.avatar)==null?void 0:d.snapshots)==null?void 0:b.face256,j=(o==null?void 0:o.cover)||_e,i=o==null?void 0:o.description,p=`${de.profileUrl}/${t}`,h=fe.filter(l=>o==null?void 0:o.links[l]),_=pe(je({name:r==null?void 0:r.name,hasClaimedName:r==null?void 0:r.hasClaimedName,ethAddress:(r==null?void 0:r.ethAddress)??t}));return e.jsxs("section",{className:"creator-hero","aria-label":`${g} storefront`,children:[e.jsxs("div",{className:"creator-hero__cover",children:[e.jsx("img",{className:"creator-hero__cover-img",src:j,alt:"",loading:"eager"}),e.jsx("div",{className:"creator-hero__scrim","aria-hidden":!0})]}),(h.length>0||m)&&e.jsxs("div",{className:"creator-hero__links",children:[h.map(l=>e.jsx("a",{className:"creator-hero__link","data-testid":"creator-hero-link",href:(o==null?void 0:o.links[l])??"",target:"_blank",rel:"noopener noreferrer",title:a(`creator.link.${l}`),"aria-label":a(`creator.link.${l}`),children:e.jsx(I,{name:ye[l]})},l)),m&&e.jsx(re,{className:"creator-hero__link creator-hero__edit",to:"/store-settings",title:a("creator.editStore"),"aria-label":a("creator.editStore"),children:e.jsx(I,{name:"pen"})})]}),e.jsxs("div",{className:"creator-hero__body",children:[x?e.jsx("img",{className:"creator-hero__ava",src:x,alt:"",loading:"eager",style:{backgroundColor:_}}):e.jsx("span",{className:"creator-hero__ava creator-hero__ava--ph","aria-hidden":!0,style:{backgroundColor:_}}),e.jsxs("div",{children:[e.jsx("h2",{className:"creator-hero__name",children:g}),i?e.jsx("p",{className:"creator-hero__desc",children:i}):null]}),e.jsxs("div",{className:"creator-hero__actions",children:[e.jsx("a",{className:"creator-hero__view","data-testid":"creator-hero-view",href:p,target:"_blank",rel:"noopener noreferrer",children:a("creator.viewProfile")}),e.jsx(Se,{address:t,className:"creator-hero__follow"})]})]})]})}const U=48;function Ge(){const{address:t}=se(),r=K(),[o]=te(),n=o.has("collections"),{data:m}=D(t),g=(m==null?void 0:m.name)||(t?O(t):a("creator.fallbackName"));me({title:g,description:a("seo.creator.description",{name:g})});const[x,j]=N.useState("wearable"),[i,p]=N.useState(null),[h,_]=N.useState([]),[d,b]=N.useState(""),[l,f]=N.useState(""),[P,z]=N.useState("newest"),S=d&&!Number.isNaN(Number(d))?Number(d):void 0,y=l&&!Number.isNaN(Number(l))?Number(l):void 0,G=i?ke[i]:void 0,H=($.find(s=>s.key===P)??$[0]).server,L={creator:t,category:x,rarities:h.length?h:void 0,wearableCategories:G,minPriceCredits:S,maxPriceCredits:y,sortBy:H},{items:v,total:Y,isLoading:C,error:A,hasNextPage:q,isFetchingNextPage:F,fetchNextPage:W}=R(["creator-listings",L],s=>he({...L,first:U,skip:s}),{enabled:!!t&&!n}),u=R(["creator-collections",t],s=>ge(t,{first:U,skip:s}).then(c=>({items:c.collections,total:c.total})),{enabled:!!t&&n});function Z(s){j(s),p(null),n&&M()}function M(){const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}`:""},{replace:!0})}function J(){if(n){M();return}const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}&collections`:"?collections"},{replace:!0})}function Q(s){_(c=>c.includes(s)?c.filter(ae=>ae!==s):[...c,s])}function V(){j("wearable"),p(null),_([]),b(""),f("")}const k=!!(S||y),X=k?`${d||"0"}–${l||"∞"}`:a("filter.price"),ee=x!=="wearable"||!!i||h.length>0||k;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":a("creator.breadcrumbAria"),children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>r("/assets"),children:a("creator.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:g})]}),t?e.jsx(Le,{address:t}):null,!n&&!C&&v.length>0?e.jsx(Ne,{items:v,source:"creator"}):null,e.jsxs("div",{className:"browse browse--sidebar",children:[e.jsx("aside",{className:"browse__sidebar",children:e.jsx(ve,{category:x,subCategory:i,onCategory:Z,onSub:p,title:a("creator.category"),flat:!0,collections:n,onCollections:J})}),e.jsx("div",{className:"browse__main",children:n?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"creator-collections__bar",children:e.jsx("span",{className:"assets__count",children:u.isLoading?"…":a("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(T,{message:a("creator.error")}):null,e.jsx("div",{className:"grid grid--collections",children:u.isLoading?e.jsx(w,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(s=>e.jsx(Pe,{collection:s,itemCount:s.itemCount},s.contractAddress)),u.isFetchingNextPage?e.jsx(w,{count:6}):null]})}),e.jsx(B,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx("p",{className:"muted",children:a("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Ce,{rarities:h,onToggleRarity:Q,sort:P,onSort:z,total:Y,loading:C,anyActive:ee,onClear:V,renderTrailing:s=>e.jsx(we,{panelKey:"price",label:X,active:k,panel:s,children: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","aria-label":a("creator.priceMin"),placeholder:a("creator.priceMinPlaceholder"),value:d,onChange:c=>b(c.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("creator.priceMax"),placeholder:a("creator.priceMaxPlaceholder"),value:l,onChange:c=>f(c.target.value)})]}),e.jsx("p",{className:"filter-pop__hint",children:a("creator.priceHint",{currency:xe.name})})]})})}),A?e.jsx(T,{message:a("creator.error")}):null,e.jsx("div",{className:"grid",children:C?e.jsx(w,{count:15}):e.jsxs(e.Fragment,{children:[v.map(s=>e.jsx(ue,{item:s},s.id)),F?e.jsx(w,{count:6}):null]})}),e.jsx(B,{hasNextPage:q,isFetching:F,onLoadMore:()=>void W()}),!C&&!A&&v.length===0?e.jsx("p",{className:"muted",children:a("creator.empty")}):null]})})]})]})}export{Ge as Creator,Ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b7 as U,b8 as Ue,R as C,b9 as qe,ba as Ye,$ as Qe,bb as Je,aW as Xe,Q as R,a$ as K,a_ as Te,bc as a,bd as Ze,be as Le,T as et,b5 as tt}from"./index-
|
|
1
|
+
import{b7 as U,b8 as Ue,R as C,b9 as qe,ba as Ye,$ as Qe,bb as Je,aW as Xe,Q as R,a$ as K,a_ as Te,bc as a,bd as Ze,be as Le,T as et,b5 as tt}from"./index-C1yBaAe9.js";import{R as rt,g as ot}from"./getOverlayAlpha-DD0MBenH.js";import{j as T,r as y}from"./react-BrLDncxD.js";import{u as nt,a as Be}from"./useTheme-YjNnj0AZ.js";function ne(r){const o=Ue(r);return r!==o&&o.styles?(o.styles.match(/^@layer\s+[^{]*$/)||(o.styles=`@layer global{${o.styles}}`),o):r}function at({styles:r,themeId:o,defaultTheme:n={}}){const i=nt(n),s=o&&i[o]||i;let l=typeof r=="function"?r(s):r;return s.modularCssLayers&&(Array.isArray(l)?l=l.map(d=>ne(typeof d=="function"?d(s):d)):l=ne(l)),T.jsx(U,{styles:l})}const Ee=y.createContext(null);function se(){return y.useContext(Ee)}const it=typeof Symbol=="function"&&Symbol.for,st=it?Symbol.for("mui.nested"):"__THEME_NESTED__";function lt(r,o){return typeof o=="function"?o(r):C({},r,o)}function ct(r){const{children:o,theme:n}=r,i=se(),s=y.useMemo(()=>{const l=i===null?n:lt(i,n);return l!=null&&(l[st]=i!==null),l},[n,i]);return T.jsx(Ee.Provider,{value:s,children:o})}function dt(r){const o=Be(),n=qe()||"",{modularCssLayers:i}=r;let s="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!i||o!==null?s="":typeof i=="string"?s=i.replace(/mui(?!\.)/g,s):s=`@layer ${s};`,Ye(()=>{const l=document.querySelector("head");if(!l)return;const d=l.firstChild;if(s){var m;if(d&&(m=d.hasAttribute)!=null&&m.call(d,"data-mui-layer-order")&&d.getAttribute("data-mui-layer-order")===n)return;const S=document.createElement("style");S.setAttribute("data-mui-layer-order",n),S.textContent=s,l.prepend(S)}else{var f;(f=l.querySelector(`style[data-mui-layer-order="${n}"]`))==null||f.remove()}},[s,n]),s?T.jsx(at,{styles:s}):null}const $e={};function xe(r,o,n,i=!1){return y.useMemo(()=>{const s=r&&o[r]||o;if(typeof n=="function"){const l=n(s),d=r?C({},o,{[r]:l}):l;return i?()=>d:d}return r?C({},o,{[r]:n}):C({},o,n)},[r,o,n,i])}function ut(r){const{children:o,theme:n,themeId:i}=r,s=Be($e),l=se()||$e,d=xe(i,s,n),m=xe(i,l,n,!0),f=d.direction==="rtl",S=dt(d);return T.jsx(ct,{theme:m,children:T.jsx(Qe.Provider,{value:d,children:T.jsx(rt,{value:f,children:T.jsxs(Je,{value:d==null?void 0:d.components,children:[S,o]})})})})}const le="mode",ce="color-scheme",Ie="data-color-scheme";function mt(r){const{defaultMode:o="light",defaultLightColorScheme:n="light",defaultDarkColorScheme:i="dark",modeStorageKey:s=le,colorSchemeStorageKey:l=ce,attribute:d=Ie,colorSchemeNode:m="document.documentElement",nonce:f}=r||{};return T.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(function() {
|
|
2
2
|
try {
|
|
3
3
|
var mode = localStorage.getItem('${s}') || '${o}';
|
|
4
4
|
var colorScheme = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-
|
|
1
|
+
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-BFTt2bWv.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-iruECcYS.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as $,b as q,r as i,j as e}from"./react-BrLDncxD.js";import{u as H,t as s,d as Q,o as V,x as g,C as d,E as P,y as I,g as W,r as z}from"./index-C1yBaAe9.js";import{R as G}from"./resume-buy-Bf0zIH7y.js";import{R as D}from"./cart-checkout-BAUaf92R.js";import{l as J}from"./loader-logo-BzY9EKdC.js";import{u as Z,p as X,c as ee,i as se}from"./useCreditPacks-Caur-2iX.js";import{C as te}from"./CircularProgress-B7vK7bWC.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-CLB2z3On.js";import"./intl-CBcMB1D2.js";const j="https://cdn.decentraland.org/@dcl/shop/0.1.0-29944279663.commit-001b5a7/assets/pack-chips--HnOpf5U.webp",re="https://cdn.decentraland.org/@dcl/shop/0.1.0-29944279663.commit-001b5a7/assets/credit-coin-CmcTCd5i.webp",ae="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",x=se()?"mock":"stripe",ce={pack_5:j,pack_10:j,pack_25:j,pack_50:j},ne="https://docs.decentraland.org";function M(l){const r=l;if((r==null?void 0:r.name)==="AbortError")return s("getCredits.errorCanceled");const m=((r==null?void 0:r.message)??"").toLowerCase();return m.includes("sign in")?s("getCredits.errorSignIn",{currency:d.name}):m.includes("timed out")?s("getCredits.errorTimeout",{currency:d.name}):s("getCredits.errorGeneric")}function je(){H({title:s("nav.getCredits",{currency:d.name}),noindex:!0});const l=$(),{session:r,signIn:m}=Q(),n=V(),[N,w]=q(),{packs:F,isLoading:T}=Z(),[p,o]=i.useState("select"),[c,E]=i.useState(null),[R,L]=i.useState(null),[U,h]=i.useState(null),[K,f]=i.useState(!1),b=i.useRef(null);i.useEffect(()=>()=>{var t;return(t=b.current)==null?void 0:t.abort()},[]);const A=i.useCallback(()=>{w(t=>{const a=new URLSearchParams(t);return a.delete("order"),a.delete("canceled"),a},{replace:!0})},[w]),y=i.useCallback(async t=>{o("processing");const a=new AbortController;b.current=a;try{const u=await X(t,{signal:a.signal,address:r==null?void 0:r.address,identity:r==null?void 0:r.identity});if(u.status==="credited"){const _=u.creditsGranted??(c==null?void 0:c.credits)??0;L(_>0?_:null),o("success"),g("Shop Completed Buy Credits",{order_id:t,pack_usd:(c==null?void 0:c.usd)??null,credits:_>0?_:null,provider:x}),n.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(D)){const k={resumeCheckout:!0,..._>0?{creditsAdded:_}:{}};l("/cart",{state:k});return}}catch{}try{const k=sessionStorage.getItem(G);if(k){sessionStorage.removeItem(G);const C=JSON.parse(k),B=C.tokenId??C.itemId;if(C.contractAddress&&B){l(`/item/${C.contractAddress}/${B}`,{state:{item:C,resumeBuy:!0}});return}}}catch{}}else u.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),n.invalidateQueries({queryKey:["usd-balance"]}),o("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),h(u.error??s("getCredits.errorGrant",{currency:d.name})),o("error"))}catch(u){P(u,{flow:"get_credits",step:"grant",order_id:t}),g("Shop Buy Credits Failed",{step:"grant",error_code:I(u),pack_usd:(c==null?void 0:c.usd)??null}),h(M(u)),o("error")}},[c,r,n,l]),O=i.useCallback(async t=>{if(!r){m();return}h(null),f(!1),E(t),o(x==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:t.usd,credits:t.credits,provider:x});try{const a=await ee(t.id,{address:r.address,identity:r.identity});if(a.mock)y(a.orderId);else if(a.url)g("Shop Redirected To Stripe",{order_id:a.orderId,pack_usd:t.usd,credits:t.credits}),window.location.href=a.url;else throw new Error("Checkout did not return a redirect url")}catch(a){P(a,{flow:"get_credits",step:"checkout",provider:x}),g("Shop Buy Credits Failed",{step:"checkout",error_code:I(a),pack_usd:t.usd}),h(M(a)),o("error")}},[r,m,y]),v=i.useRef(!1);i.useEffect(()=>{if(v.current)return;const t=N.get("order");if(N.get("canceled")!=null){v.current=!0,g("Shop Buy Credits Cancelled",{order_id:t,provider:x}),A(),f(!0),o("select");return}t&&(o("processing"),r&&(v.current=!0,A(),y(t)))},[N,r]);function S(){var t;(t=b.current)==null||t.abort(),o("select"),E(null),L(null),h(null),f(!1)}const Y=p==="select";return e.jsxs("div",{className:"getcredits",children:[Y&&e.jsxs("header",{className:"getcredits__head",children:[e.jsx("h1",{className:"getcredits__title",children:s("getCredits.title",{currency:d.name})}),e.jsxs("p",{className:"getcredits__sub",children:[s("getCredits.subtitle",{currency:d.name})," ",e.jsxs("a",{className:"getcredits__learn",href:ne,target:"_blank",rel:"noreferrer",children:[s("getCredits.learnMore"),e.jsxs("svg",{className:"getcredits__learn-ico",viewBox:"0 0 13 13","aria-hidden":!0,fill:"none",children:[e.jsx("path",{d:"M4 2h7v7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M11 2 2 11",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})]}),p==="select"&&e.jsxs(e.Fragment,{children:[K&&e.jsx("p",{className:"getcredits__note muted",role:"status",children:s("getCredits.canceledNote")}),e.jsx(ie,{packs:F,loading:T,onSelect:t=>void O(t)})]}),p==="redirecting"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(te,{size:32}),e.jsx("p",{className:"muted",children:s("getCredits.redirecting")})]}),p==="processing"&&e.jsxs("div",{className:"gc-processing",role:"status","aria-live":"polite",children:[e.jsx("img",{className:"gc-processing__logo",src:J,alt:"",width:61,height:61}),e.jsxs("div",{className:"gc-processing__body",children:[e.jsxs("p",{className:"gc-processing__title",children:[e.jsx("strong",{children:s("getCredits.processing")}),"…"]}),e.jsxs("div",{className:"gc-progress","aria-hidden":!0,children:[e.jsx("span",{className:"gc-progress__track",children:e.jsx("span",{className:"gc-progress__fill"})}),e.jsx("span",{className:"gc-progress__count",children:"1/1"})]})]})]}),p==="success"&&e.jsxs("div",{className:"gc-success",role:"status","aria-live":"polite",children:[e.jsxs("div",{className:"gc-banner",children:[e.jsx("img",{className:"gc-banner__icon",src:ae,alt:"",width:60,height:60}),e.jsxs("p",{className:"gc-banner__text",children:[e.jsx("strong",{children:s("getCredits.successTitle")})," ",s("getCredits.successBody",{currency:d.name})]})]}),R!=null&&e.jsx("div",{className:"gc-credits",children:e.jsxs("div",{className:"gc-credits__row",children:[e.jsx("img",{className:"gc-credits__coin",src:re,alt:"",width:93,height:93}),e.jsxs("p",{className:"gc-credits__text",children:[e.jsx(W,{className:"gc-credits__diamond"}),e.jsxs("span",{children:[e.jsx("strong",{className:"gc-credits__amount",children:s("getCredits.creditsAmount",{credits:R,currency:d.name})})," ",e.jsx("span",{className:"gc-credits__added",children:s("getCredits.creditsAdded")})]})]})]})}),e.jsxs("div",{className:"gc-actions",children:[e.jsx("button",{className:"gc-actions__btn gc-actions__btn--outline",onClick:S,children:s("getCredits.buyMore",{currency:d.name})}),e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:()=>l("/assets"),children:s("getCredits.startShopping")})]})]}),p==="pending"&&e.jsxs("div",{className:"gc-status",role:"status","aria-live":"polite",children:[e.jsx("p",{className:"gc-status__title",children:s("getCredits.pendingTitle",{currency:d.name})}),e.jsx("p",{className:"muted",children:s("getCredits.pendingBody")}),e.jsxs("div",{className:"gc-status__actions",children:[e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:()=>l("/assets"),children:s("getCredits.startShopping")}),e.jsx("button",{className:"gc-actions__btn gc-actions__btn--outline",onClick:S,children:s("getCredits.done")})]})]}),p==="error"&&e.jsxs("div",{className:"gc-status gc-status--err",role:"alert",children:[e.jsx("p",{className:"gc-status__title",children:s("getCredits.errorTitle")}),e.jsx("p",{className:"error",children:U}),e.jsx("div",{className:"gc-status__actions",children:e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:S,children:s("getCredits.tryAgain")})})]})]})}function ie({packs:l,loading:r,onSelect:m}){return r?e.jsx("div",{className:"packs","aria-busy":"true","aria-label":s("getCredits.packsLoading",{currency:d.name}),children:[0,1,2,3].map(n=>e.jsx("div",{className:"pack pack--skeleton","aria-hidden":!0,children:e.jsxs("span",{className:"pack__inner",children:[e.jsx("span",{className:"skeleton pack__label-sk"}),e.jsx("span",{className:"skeleton pack__art-sk"}),e.jsx("span",{className:"skeleton pack__cta-sk"})]})},n))}):e.jsx("div",{className:"packs",children:l.map(n=>e.jsxs("button",{type:"button",className:`pack${n.bestValue?" pack--best":""}`,"data-testid":"pack",onClick:()=>m(n),"aria-label":s("getCredits.packAria",{amount:z(n.credits),usd:n.usd}),children:[n.bestValue&&e.jsx("span",{className:"pack__badge",children:s("getCredits.packBadge")}),e.jsxs("span",{className:"pack__inner",children:[e.jsx("span",{className:"pack__label",children:s("getCredits.creditsAmount",{credits:n.credits,currency:d.name})}),e.jsx("span",{className:"pack__art",children:e.jsx("img",{src:ce[n.id]??j,alt:"",loading:"lazy"})}),e.jsx("span",{className:"pack__cta-wrap",children:e.jsxs("span",{className:"pack__cta",children:["$",n.usd.toFixed(2)]})})]})]},n.id))})}export{je as GetCredits,je as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-
|
|
1
|
+
import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-CryDMiQl.js";import{d as g,r as v}from"./index-iruECcYS.js";import{C as c}from"./ConstantsUtil-DO6FyoSW.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-BFTt2bWv.js";import{au as y}from"./NetworkUtil-BGlQiKvg.js";const b=g`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|