@dcl/shop 0.1.0-30565861644.commit-86fa62d → 0.1.0-30631213700.commit-6a36b1d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Activity-YIu0M1Kf.js → Activity-9H_Nw9g2.js} +1 -1
- package/assets/{AnimatedBackground-BrxVl8X0.js → AnimatedBackground-Dl4OPt3I.js} +1 -1
- package/assets/{Assets-Dwlho6_C.js → Assets-hIVs4QX5.js} +7 -7
- package/assets/{Assets.styles-CfTWTkg9.js → Assets.styles-DxYgoIuy.js} +1 -1
- package/assets/{Authorizations-BMPo5lsC.js → Authorizations-7_r3pX8t.js} +1 -1
- package/assets/Cart-D0AduPfq.js +695 -0
- package/assets/{CircularProgress-BrgD7rFE.js → CircularProgress-4d3-DQmu.js} +1 -1
- package/assets/{Collection-wJlJYfNj.js → Collection-jJGlXbaI.js} +1 -1
- package/assets/{CollectionCarousel-Bns794gp.js → CollectionCarousel-Cf-VTi1F.js} +1 -1
- package/assets/{Creator-Bz4Ol9VJ.js → Creator-C7C3IC7M.js} +2 -2
- package/assets/{ErrorNotice-Z0D8os9s.js → ErrorNotice-B02EvdVc.js} +1 -1
- package/assets/{ExchangeController-DWJqUlaQ.js → ExchangeController-_mEAVfMP.js} +1 -1
- package/assets/{GetCredits-DaqSIDEt.js → GetCredits-DATwdND2.js} +97 -60
- package/assets/{HelpersUtil-BmEt66tk.js → HelpersUtil-B9-8MjrT.js} +1 -1
- package/assets/{ImportListings-tR_OXub1.js → ImportListings-Brvy0E2Q.js} +8 -8
- package/assets/{ItemDetail-n9hpow28.js → ItemDetail-iIR1rraN.js} +3 -3
- package/assets/{LoadMore-DI4Wyn-C.js → LoadMore-DmJy1HhZ.js} +1 -1
- package/assets/{MenuList-CYC3zRYf.js → MenuList-DaaQcK3Y.js} +1 -1
- package/assets/{MyAssets-CRBhFPGQ.js → MyAssets-BNDWBTvM.js} +1 -1
- package/assets/{MyFavorites-B6grtRZj.js → MyFavorites-DsQJRQwa.js} +1 -1
- package/assets/{NotFound-0L1xj8db.js → NotFound-DLfA3_kx.js} +1 -1
- package/assets/{NotificationsBell-B5Q9EIqa.js → NotificationsBell-BFpFtQ3R.js} +1 -1
- package/assets/{StoreSettings-CUyzwheq.js → StoreSettings-g8hG7Zop.js} +1 -1
- package/assets/Success-MIHHTcKK.js +276 -0
- package/assets/{SwapController-CP6wYtUi.js → SwapController-DR2uYAaA.js} +1 -1
- package/assets/{Tooltip-BbHzoPIy.js → Tooltip-gJZXgo0b.js} +1 -1
- package/assets/{TradeService-CbR5e6j8.js → TradeService-CY3xpaff.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-CAciSeGb.js → W3MFrameProviderSingleton-DSb_b_EZ.js} +3 -3
- package/assets/{WebCryptoP256-BJObUJ75.js → WebCryptoP256-CDxnkGVK.js} +1 -1
- package/assets/{authorizations-B6wWjXdQ.js → authorizations-BPcNtN-P.js} +1 -1
- package/assets/{basic-PrtqXBMx.js → basic-C5_ZcnK9.js} +1 -1
- package/assets/{biconomy-CXoNqd-Z.js → biconomy-CvmOdG97.js} +1 -1
- package/assets/{browseLayout.styles-B_NNL83E.js → browseLayout.styles-C9FVX_ZJ.js} +5 -5
- package/assets/{builder-DJzcrQAM.js → builder-CLIpwOL9.js} +1 -1
- package/assets/buy-B0vN0t4_.js +1 -0
- package/assets/{buy-gasless-CmOMFX1L.js → buy-gasless-DLYP_J55.js} +1 -1
- package/assets/{categories-CX6i4K78.js → categories-Ci0NfrXM.js} +1 -1
- package/assets/{ccip-Dd-dexDO.js → ccip-EF1o04u9.js} +1 -1
- package/assets/{ccip-w3FPfxqw.js → ccip-kyPwi4iD.js} +1 -1
- package/assets/{clsx-BRGjhjlu.js → clsx-CPW1aX4x.js} +2 -2
- package/assets/{controller-DwX-jKZc.js → controller-DC-xBsw3.js} +2 -2
- package/assets/{core-D2eU58P9.js → core-C7azBZfw.js} +4 -4
- package/assets/{createSvgIcon-BVcvIe2E.js → createSvgIcon-CE_QXUPt.js} +3 -3
- package/assets/{custom-C8kunAUg.js → custom-C7OSaKW8.js} +1 -1
- package/assets/{data-capture-5SXe7x0r.js → data-capture-D90UA04z.js} +1 -1
- package/assets/{email-Bn0Sv8j4.js → email-DdwMxrSu.js} +1 -1
- package/assets/{embedded-wallet-C8c_78Uv.js → embedded-wallet-CLTSxZAJ.js} +1 -1
- package/assets/{emotion-styled.browser.esm-3ejjGoWk.js → emotion-styled.browser.esm-C4PVOCRF.js} +1 -1
- package/assets/{engine-CNGw5SdF.js → engine-D-dAvXbf.js} +1 -1
- package/assets/{errors-BYKPLdNJ.js → errors-BSoF7pTC.js} +1 -1
- package/assets/{estimate-l1-fee-BrG1mArn.js → estimate-l1-fee-Cw86yh3k.js} +1 -1
- package/assets/{execute-BuBESW09.js → execute-CiNfIIwI.js} +2 -2
- package/assets/{features-DJEePSdY.js → features-CrsLW0vi.js} +1 -1
- package/assets/{fetchTokenMetadata-DbJ4fJYd.js → fetchTokenMetadata-DdYtEXX-.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-BVDQHXZz.js → get-ecosystem-wallet-info-B9Lyre9K.js} +1 -1
- package/assets/{getBalance-Dwa97iHq.js → getBalance-C-EmBEJE.js} +1 -1
- package/assets/{getNFT-KnOGHpCx.js → getNFT-BQlxSGM2.js} +1 -1
- package/assets/{getNFT-8vTqe5mx.js → getNFT-ytL1936_.js} +1 -1
- package/assets/{getThemeProps-BkCaIJdf.js → getThemeProps-BGg8uFXd.js} +1 -1
- package/assets/{grid.styles-Cflo-ZKg.js → grid.styles-DMgsxY7L.js} +1 -1
- package/assets/{hashTypedData-ByA_PXdL.js → hashTypedData-BasXuEvC.js} +1 -1
- package/assets/{hashTypedData-zHAZUnlP.js → hashTypedData-j5fdDs4Y.js} +1 -1
- package/assets/{import-Da_I6gAZ.js → import-Dm0CsIi0.js} +1 -1
- package/assets/{in-app-DAfU34Xj.js → in-app-BEVydnuY.js} +1 -1
- package/assets/{in-app-wallet-calls-C8MSEj6u.js → in-app-wallet-calls-BY3W5GQ0.js} +1 -1
- package/assets/{index-Dla9ohqE.js → index-1J_FpndO.js} +2 -2
- package/assets/{index-IEBvb9g0.js → index-8VXxtKF1.js} +1 -1
- package/assets/{index-CRiWMT-r.js → index-B13XAdNZ.js} +1 -1
- package/assets/{index-Azrqm6Av.js → index-B1aFfP1l.js} +1 -1
- package/assets/{index-I6AhOucd.js → index-B3KRDhro.js} +1 -1
- package/assets/{index-vQ_2c6zv.js → index-B7JR23Ob.js} +1 -1
- package/assets/{index-Ddw9OYjW.js → index-BAljEUxu.js} +1 -1
- package/assets/{index-Q9aqPNo3.js → index-BE79xpUL.js} +1 -1
- package/assets/{index-CzKTIGRh.js → index-BFDvoquz.js} +2 -2
- package/assets/{index-DX8GIl1w.js → index-BLchEKaw.js} +2 -2
- package/assets/{index-DJk-Gyy6.js → index-BO8tonq1.js} +1 -1
- package/assets/{index-DeUn3r_V.js → index-BO95Zc7f.js} +1 -1
- package/assets/{index-DWsuciPI.js → index-BOKR1ZSE.js} +1 -1
- package/assets/{index-CkshIr8A.js → index-BRa-XcLg.js} +1 -1
- package/assets/{index-SG2QR9w5.js → index-BSBIVFxM.js} +3 -3
- package/assets/{index-Kl09Ztwk.js → index-BUmLgBCF.js} +1 -1
- package/assets/{index-DTtN3FMo.js → index-B_OIhLt0.js} +1 -1
- package/assets/{index-MmxQtN7S.js → index-Be7WGkuv.js} +1 -1
- package/assets/{index-BnWc8jyR.js → index-BgUZsiWa.js} +1 -1
- package/assets/{index-D34PBlHH.js → index-BkTT5bsx.js} +1 -1
- package/assets/{index-CkqeusMi.js → index-BwKYmXD4.js} +1 -1
- package/assets/{index-DMlJeY00.js → index-C1XoasUk.js} +1 -1
- package/assets/{index-BCGTwY9C.js → index-C9UOpi9s.js} +1 -1
- package/assets/{index-CGd-1UpW.js → index-CBgMGilO.js} +1 -1
- package/assets/{index-B6EsaBwe.js → index-CQm9diQZ.js} +1 -1
- package/assets/{index-DQwfF15K.js → index-CVglB0vh.js} +1 -1
- package/assets/{index-Dltarl5j.js → index-CYLjPyy6.js} +1 -1
- package/assets/{index-1YMH7MTk.js → index-CaRubzmQ.js} +1 -1
- package/assets/{index-DTvh0ZYF.js → index-CcaSnuYK.js} +1 -1
- package/assets/{index-MBO4iF-x.js → index-Ce4-q8Tn.js} +1 -1
- package/assets/{index-Dl_EomMH.js → index-ChgR_gSr.js} +1 -1
- package/assets/{index-DhHGVFYf.js → index-Cm1rAYH-.js} +1 -1
- package/assets/{index-BkQsw_6m.js → index-CqHixIDx.js} +1 -1
- package/assets/{index-Bvsc2jDb.js → index-CtyORnm3.js} +1 -1
- package/assets/{index-BOei64ey.js → index-D4au8-Sv.js} +1 -1
- package/assets/{index-CSAUfzci.js → index-D8fCyz4G.js} +1 -1
- package/assets/{index-CgmlJw-S.js → index-DCMoy5ft.js} +1 -1
- package/assets/{index-DiUDVsbw.js → index-DCNmX8Jr.js} +3 -3
- package/assets/{index-CkzcSx5U.js → index-DSjn_4OZ.js} +1 -1
- package/assets/{index-BzmmiLep.js → index-D_M6bHMQ.js} +1 -1
- package/assets/{index-BRBJXQFj.js → index-Df6G0l6L.js} +3 -3
- package/assets/{index-CuYL-Baw.js → index-DjDUzcsH.js} +2 -2
- package/assets/{index-BnbwrW-6.js → index-DzVTWEvS.js} +252 -252
- package/assets/{index-CVY0sxwP.js → index-I1HziGSE.js} +1 -1
- package/assets/{index-CfiHgp7t.js → index-NfzBgkBr.js} +2 -2
- package/assets/{index-BFQ3WGPq.js → index-O4GwlnrF.js} +1 -1
- package/assets/{index-BKmu2o-E.js → index-RrRV6pR_.js} +1 -1
- package/assets/{index-CvD8tr1x.js → index-S4WGeB0l.js} +1 -1
- package/assets/{index-DmUPrDg1.js → index-g7wbqJm1.js} +1 -1
- package/assets/{index-BBHWbqVq.js → index-t2owpKkf.js} +1 -1
- package/assets/{index-DHNHHzGW.js → index-uOJSYwZG.js} +1 -1
- package/assets/{index.es-Dcl8xzFM.js → index.es-B3rSZSDt.js} +4 -4
- package/assets/{index.es-1Eex98-c.js → index.es-DM2qW0lw.js} +1 -1
- package/assets/{index.es-8mJw4ztI.js → index.es-Dienktq9.js} +1 -1
- package/assets/{localBatchGatewayRequest-DLZcpxp5.js → localBatchGatewayRequest-DuHrf2MN.js} +1 -1
- package/assets/{mana-convert-Bc7WVBn5.js → mana-convert-CHkCsdrS.js} +1 -1
- package/assets/{mana-rate-CFfqtCHS.js → mana-rate-Dt1fufbZ.js} +1 -1
- package/assets/{networks-C9v8SYzv.js → networks-KCk_6KCy.js} +1 -1
- package/assets/{onramp-vHeI0Bdi.js → onramp-DIsBeuYv.js} +1 -1
- package/assets/{openzeppelin-yMR9b1FL.js → openzeppelin-DNjbwrBL.js} +1 -1
- package/assets/{parseNft-DOgBlFyM.js → parseNft-BftD-FxK.js} +2 -2
- package/assets/{parseSignature-CCtT275H.js → parseSignature-BWVrkDRs.js} +3 -3
- package/assets/{parseSignature-B_BQDXEi.js → parseSignature-znC0lvc7.js} +1 -1
- package/assets/{passkeys-DC9ui3MW.js → passkeys-BJPRW0V_.js} +1 -1
- package/assets/{pay-with-exchange-DzS3VV5h.js → pay-with-exchange-oV9YjYRd.js} +1 -1
- package/assets/{qr-overlay-DBMFsWbT.js → qr-overlay-BYTSXp-R.js} +1 -1
- package/assets/{receive-DL6eap6Y.js → receive-DWXEUP1p.js} +1 -1
- package/assets/{resolveImplementation-CbIwAEHk.js → resolveImplementation-D6NoPFBv.js} +1 -1
- package/assets/{rpc-4rFMN8E0.js → rpc-BRol_aMy.js} +1 -1
- package/assets/{secp256k1-CJEeTac_.js → secp256k1-BIRnWaVR.js} +1 -1
- package/assets/{secp256k1-7K_lKgAG.js → secp256k1-DnitHy6K.js} +1 -1
- package/assets/{secp256k1-Cc-OBcqq.js → secp256k1-xEJ152PU.js} +1 -1
- package/assets/{send-LziflfC8.js → send-IjXisfbb.js} +1 -1
- package/assets/{send-batch-transaction-cPuMc9MS.js → send-batch-transaction-DPQqc2pa.js} +1 -1
- package/assets/{send-eip712-transaction-DrVlY4sm.js → send-eip712-transaction-D0KKXrDM.js} +2 -2
- package/assets/{send-gasless-transaction-C7GQuNPZ.js → send-gasless-transaction-DEZ5jsUe.js} +2 -2
- package/assets/{send-transaction-DsHae-07.js → send-transaction-DSWW1MHr.js} +2 -2
- package/assets/{sendMetaTransaction-DVALeVb8.js → sendMetaTransaction-Ci7WU1n2.js} +1 -1
- package/assets/{sendRawTransaction-BwoXNrfy.js → sendRawTransaction-BhLbtdw6.js} +3 -3
- package/assets/{serializeTransaction-HjwgZYgE.js → serializeTransaction-BpvjoWlt.js} +1 -1
- package/assets/{session-proposal-D2B7jyYw.js → session-proposal-CySo5Ayx.js} +1 -1
- package/assets/{session-request-qG7jHYd4.js → session-request-CcKMNi2Y.js} +2 -2
- package/assets/{signing-2d-SxI7E.js → signing-1MEhDZTe.js} +3 -3
- package/assets/{socials-C5lHDsWb.js → socials-BxeqgBhJ.js} +1 -1
- package/assets/{swaps-D-FCeao1.js → swaps-gmJBWPLn.js} +1 -1
- package/assets/{thirdweb-BzCYZVQU.js → thirdweb-D1mOG5l6.js} +3 -3
- package/assets/{to-serializable-transaction-mtITaKz7.js → to-serializable-transaction-B0ueqSml.js} +2 -2
- package/assets/trade-encoding-8_nNixrP.js +1 -0
- package/assets/{transactionReceipt-C0Zt7siR.js → transactionReceipt-C4bedM4w.js} +1 -1
- package/assets/{transactions-3oKW7X2A.js → transactions-OfZRD4zD.js} +1 -1
- package/assets/useCreditPacks-By64V7Im.js +1 -0
- package/assets/{useInfiniteGrid-DxkPmxZ9.js → useInfiniteGrid-BRS4FUdG.js} +1 -1
- package/assets/useManaRate-B_yvKRm8.js +1 -0
- package/assets/{useSecondarySales-uafEfAWN.js → useSecondarySales-DvaILn1P.js} +1 -1
- package/assets/{useStore-HaFF1p2U.js → useStore-DT6_uEJ5.js} +1 -1
- package/assets/{useTheme-DVLL-c1A.js → useTheme-DxD5b5GX.js} +1 -1
- package/assets/{verifyHash-DR9pCFUe.js → verifyHash-B6ZBhWEY.js} +1 -1
- package/assets/{w3m-modal-B4U6A0YE.js → w3m-modal-BDgG1mEs.js} +1 -1
- package/assets/{w3m-modal-CaY0gxk7.js → w3m-modal-cY_JeRk0.js} +1 -1
- package/assets/{wait-for-tx-receipt-BDXxYIXq.js → wait-for-tx-receipt-BtuweTJB.js} +1 -1
- package/assets/{wallets-Y1872Ad0.js → wallets-7MiPMysL.js} +5 -5
- package/assets/{web-connector-CYEfuYp5.js → web-connector-UMu-oPn4.js} +3 -3
- package/assets/{writeContract-DrFAVNON.js → writeContract-Byuqugox.js} +1 -1
- package/assets/{zoraTestnet-CZflXjbY.js → zoraTestnet-CkN0XqkJ.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Cart-DS3i-ZcL.js +0 -695
- package/assets/Success-DXPvtMrB.js +0 -276
- package/assets/buy-D3hY4JG8.js +0 -1
- package/assets/trade-encoding-ZhCceq00.js +0 -1
- package/assets/useCreditPacks-DTZSsQrR.js +0 -1
- package/assets/useManaRate-DJlj41tJ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as N,N as U,O as o,P as n,H as D,x as M}from"./index-
|
|
1
|
+
import{M as N,N as U,O as o,P as n,H as D,x as M}from"./index-DzVTWEvS.js";import{r as w,j as g}from"./react-vyZjIDcS.js";import{g as z,a as E,c as I,b as F,s as v}from"./clsx-CPW1aX4x.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=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 m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,af as J,ag as z,I as X,e as a,c as ee,l as te,u as ae,m as re,h as oe,S as E,A as ie,ah as se,ai as ne}from"./index-
|
|
1
|
+
import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,af as J,ag as z,I as X,e as a,c as ee,l as te,u as ae,m as re,h as oe,S as E,A as ie,ah as se,ai as ne}from"./index-DzVTWEvS.js";import{E as ce}from"./ErrorNotice-B02EvdVc.js";import{d as le,g as de,a as pe,P as xe,C as ue,b as me,c as ge,B as he,S as be,M as fe,A as je}from"./browseLayout.styles-C9FVX_ZJ.js";import{u as ve}from"./useStore-DT6_uEJ5.js";import{c as F,a as ye,F as Ce,d as we,P as Se,e as ke,H as Ae,S as Ne}from"./categories-Ci0NfrXM.js";import{L as $e}from"./LoadMore-DmJy1HhZ.js";import{u as Pe}from"./useInfiniteGrid-BRS4FUdG.js";import{G as Me}from"./grid.styles-DMgsxY7L.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";const Re=c.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${v.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,e as g,z as k,J as j,
|
|
1
|
+
import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,e as g,z as k,J as j,bd as C,h as G,x as Y,I as Q,l as X,a as W,C as B,b as J,be as Z,bf as F,A as q}from"./index-DzVTWEvS.js";import{s as ee,h as U,A as H,g as K,r as te,m as ne,e as ae}from"./authorizations-BPcNtN-P.js";import{i as ie}from"./errors-BSoF7pTC.js";import{E as oe}from"./ErrorNotice-B02EvdVc.js";import{a as se}from"./buy-B0vN0t4_.js";import{g as re,d as ce}from"./trade-encoding-8_nNixrP.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-Ci7WU1n2.js";import{I as he,C as ue}from"./ethers-CXBJm_wN.js";const L="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(L,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(a){let n;try{n=sessionStorage.getItem(L)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(L)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(a){var m,f,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,d=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const l=n-i,b=fe(l,n,s);d>=b&&c.push({method:"combined",creditsCents:i,manaWei:b})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((m=c.find(l=>l.method==="credits"))==null?void 0:m.method)??((f=c.find(l=>l.method==="combined"))==null?void 0:f.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,y=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:y}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",be=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";import{t as Z,
|
|
1
|
+
import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";import{t as Z,aB as we,aC as R,aD as _,s as a,aE as je,G as ve,aF as Ce,e as t,aG as W,B as ye,H as q,af as J,n as $e,ag as Q,I as T,c as ke,m as Ne,S,h as Pe,A as Se,aA as Le,aH as Ae}from"./index-DzVTWEvS.js";import{d as Me,g as Fe,a as ze,P as Be,C as Ee,b as Ie,c as Re,A as _e,B as We,S as Te,M as He,e as Ge,f as Ue}from"./browseLayout.styles-C9FVX_ZJ.js";import{u as De,L as Ke}from"./useStore-DT6_uEJ5.js";import{c as H,a as Oe,F as Ve,d as Ye,P as Ze,e as qe,H as Je,S as Qe}from"./categories-Ci0NfrXM.js";import{L as G}from"./LoadMore-DmJy1HhZ.js";import{u as U}from"./useInfiniteGrid-BRS4FUdG.js";import{E as D}from"./ErrorNotice-B02EvdVc.js";import{G as K}from"./grid.styles-DMgsxY7L.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";const{colors:m,radius:X,media:Xe}=Z,et=a.article`
|
|
2
2
|
height: 300px;
|
|
3
3
|
background: ${m.bg};
|
|
4
4
|
border-radius: ${X.card};
|
|
@@ -303,4 +303,4 @@ import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";im
|
|
|
303
303
|
&:hover {
|
|
304
304
|
background: rgba(255, 255, 255, 0.14);
|
|
305
305
|
}
|
|
306
|
-
`,Nt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Pt({address:r}){var h,$;const{data:i}=J(r),{data:n}=De(r),l=$e(c=>{var k;return(k=c.session)==null?void 0:k.address}),x=!!l&&l.toLowerCase()===r.toLowerCase(),u=(i==null?void 0:i.name)||Q(r),f=($=(h=i==null?void 0:i.avatar)==null?void 0:h.snapshots)==null?void 0:$.face256,C=(n==null?void 0:n.cover)||Me,d=n==null?void 0:n.description,w=`${ke.profileUrl}/${r}`,g=Ke.filter(c=>n==null?void 0:n.links[c]),b=ze(
|
|
306
|
+
`,Nt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Pt({address:r}){var h,$;const{data:i}=J(r),{data:n}=De(r),l=$e(c=>{var k;return(k=c.session)==null?void 0:k.address}),x=!!l&&l.toLowerCase()===r.toLowerCase(),u=(i==null?void 0:i.name)||Q(r),f=($=(h=i==null?void 0:i.avatar)==null?void 0:h.snapshots)==null?void 0:$.face256,C=(n==null?void 0:n.cover)||Me,d=n==null?void 0:n.description,w=`${ke.profileUrl}/${r}`,g=Ke.filter(c=>n==null?void 0:n.links[c]),b=Fe(ze({name:i==null?void 0:i.name,hasClaimedName:i==null?void 0:i.hasClaimedName,ethAddress:(i==null?void 0:i.ethAddress)??r}));return e.jsxs(gt,{"aria-label":`${u} storefront`,children:[e.jsxs(mt,{children:[e.jsx(ut,{src:C,alt:"",loading:"eager"}),e.jsx(ft,{"aria-hidden":!0})]}),(g.length>0||x)&&e.jsxs(bt,{children:[g.map(c=>e.jsx(wt,{"data-testid":"creator-hero-link",href:(n==null?void 0:n.links[c])??"",target:"_blank",rel:"noopener noreferrer",title:t(`creator.link.${c}`),"aria-label":t(`creator.link.${c}`),children:e.jsx(T,{name:Nt[c]})},c)),x&&e.jsx(jt,{to:"/store-settings",title:t("creator.editStore"),"aria-label":t("creator.editStore"),children:e.jsx(T,{name:"pen"})})]}),e.jsxs(vt,{children:[f?e.jsx(O,{src:f,alt:"",loading:"eager",style:{backgroundColor:b}}):e.jsx(O,{as:"span","aria-hidden":!0,style:{backgroundColor:b}}),e.jsxs("div",{children:[e.jsx(Ct,{children:u}),d?e.jsx(yt,{children:d}):null]}),e.jsxs($t,{children:[e.jsx(kt,{"data-testid":"creator-hero-view",href:w,target:"_blank",rel:"noopener noreferrer",children:t("creator.viewProfile")}),e.jsx(pt,{address:r,className:"creator-hero__follow"})]})]})]})}const V=48;function Ht(){const{address:r}=fe(),i=Y(),[n]=be(),l=n.has("collections"),{data:x}=J(r),u=(x==null?void 0:x.name)||(r?Q(r):t("creator.fallbackName"));Ne({title:u,description:t("seo.creator.description",{name:u})});const[f,C]=y.useState("wearable"),[d,w]=y.useState(null),[g,b]=y.useState([]),[h,$]=y.useState(""),[c,k]=y.useState(""),[A,oe]=y.useState("newest"),M=h&&!Number.isNaN(Number(h))?Number(h):void 0,F=c&&!Number.isNaN(Number(c))?Number(c):void 0,ae=d?Qe[d]:void 0,re=(H.find(o=>o.key===A)??H[0]).server,z={creator:r,category:f,rarities:g.length?g:void 0,wearableCategories:ae,minPriceCredits:M,maxPriceCredits:F,sortBy:re},{items:N,total:ne,isLoading:P,error:B,hasNextPage:se,isFetchingNextPage:E,fetchNextPage:ce}=U(["creator-listings",z],o=>Le({...z,first:V,skip:o}),{enabled:!!r&&!l}),p=U(["creator-collections",r],o=>Ae(r,{first:V,skip:o}).then(s=>({items:s.collections,total:s.total})),{enabled:!!r&&l});function le(o){C(o),w(null),l&&I()}function I(){const o=new URLSearchParams(n);o.delete("collections");const s=o.toString();i({search:s?`?${s}`:""},{replace:!0})}function de(){if(l){I();return}const o=new URLSearchParams(n);o.delete("collections");const s=o.toString();i({search:s?`?${s}&collections`:"?collections"},{replace:!0})}function he(o){b(s=>s.includes(o)?s.filter(me=>me!==o):[...s,o])}function xe(){C("wearable"),w(null),b([]),$(""),k("")}const L=!!(M||F),pe=L?`${h||"0"}–${c||"∞"}`:t("filter.price"),ge=f!=="wearable"||!!d||g.length>0||L;return e.jsxs(Be,{children:[e.jsxs(Ee,{"aria-label":t("creator.breadcrumbAria"),children:[e.jsx(Ie,{onClick:()=>i("/assets"),children:t("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(Re,{children:u})]}),r?e.jsx(Pt,{address:r}):null,!l&&!P&&N.length>0?e.jsx(_e,{items:N,source:"creator"}):null,e.jsxs(We,{children:[e.jsx(Te,{children:e.jsx(Oe,{category:f,subCategory:d,onCategory:le,onSub:w,title:t("creator.category"),flat:!0,collections:l,onCollections:de})}),e.jsx(He,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(Ge,{children:e.jsx(Ue,{children:p.isLoading?"…":t("creator.collectionsCount",{count:p.total})})}),p.error?e.jsx(D,{message:t("creator.error")}):null,e.jsx(K,{"data-variant":"collections",children:p.isLoading?e.jsx(S,{count:9}):e.jsxs(e.Fragment,{children:[p.items.map(o=>e.jsx(xt,{collection:o,itemCount:o.itemCount},o.contractAddress)),p.isFetchingNextPage?e.jsx(S,{count:6}):null]})}),e.jsx(G,{hasNextPage:p.hasNextPage,isFetching:p.isFetchingNextPage,onLoadMore:()=>void p.fetchNextPage()}),!p.isLoading&&!p.error&&p.items.length===0?e.jsx("p",{className:"muted",children:t("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Ve,{rarities:g,onToggleRarity:he,sort:A,onSort:oe,total:ne,loading:P,anyActive:ge,onClear:xe,renderTrailing:o=>e.jsx(Ye,{panelKey:"price",label:pe,active:L,panel:o,children:e.jsxs(Ze,{"data-variant":"price",children:[e.jsxs(qe,{children:[e.jsx("input",{type:"number",min:"0","aria-label":t("creator.priceMin"),placeholder:t("creator.priceMinPlaceholder"),value:h,onChange:s=>$(s.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":t("creator.priceMax"),placeholder:t("creator.priceMaxPlaceholder"),value:c,onChange:s=>k(s.target.value)})]}),e.jsx(Je,{children:t("creator.priceHint",{currency:Pe.name})})]})})}),B?e.jsx(D,{message:t("creator.error")}):null,e.jsx(K,{children:P?e.jsx(S,{count:15}):e.jsxs(e.Fragment,{children:[N.map(o=>e.jsx(Se,{item:o},o.id)),E?e.jsx(S,{count:6}):null]})}),e.jsx(G,{hasNextPage:se,isFetching:E,onLoadMore:()=>void ce()}),!P&&!B&&N.length===0?e.jsx("p",{className:"muted",children:t("creator.empty")}):null]})})]})]})}export{Ht as Creator,Ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-
|
|
1
|
+
import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-DzVTWEvS.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
|
|
@@ -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-DSb_b_EZ.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-DCNmX8Jr.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};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as xe,u as ue,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t as e,x as T,m as he,e as r,h as p,n as ge,E as fe,ar as f,ap as me,l as N,az as H,I as re,aj as K,z as E,aR as D}from"./index-DzVTWEvS.js";import{R as O}from"./resume-buy-Bf0zIH7y.js";import{u as be,p as we,R as ye,c as ke,i as Ce,a as je}from"./useCreditPacks-By64V7Im.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./mana-convert-CHkCsdrS.js";const P="https://cdn.decentraland.org/@dcl/shop/0.1.0-30631213700.commit-6a36b1d/assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.1.0-30631213700.commit-6a36b1d/assets/pack-stacks-D-V2jSHW.webp",se="https://cdn.decentraland.org/@dcl/shop/0.1.0-30631213700.commit-6a36b1d/assets/pack-chest-BX_j84xW.webp",$e="https://cdn.decentraland.org/@dcl/shop/0.1.0-30631213700.commit-6a36b1d/assets/credit-coin-CmcTCd5i.webp",ve="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",Se="https://cdn.decentraland.org/@dcl/shop/0.1.0-30631213700.commit-6a36b1d/assets/packs-backdrop-BcXiUPeP.webp",Y="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Pe=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 24px;
|
|
5
|
-
`,
|
|
5
|
+
`,Re=i.section`
|
|
6
6
|
position: relative;
|
|
7
7
|
isolation: isolate;
|
|
8
8
|
display: flex;
|
|
@@ -18,17 +18,17 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
18
18
|
${e.media.maxWidth("mobile")} {
|
|
19
19
|
padding: 32px 16px 40px;
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,_e=i.div`
|
|
22
22
|
position: absolute;
|
|
23
23
|
inset: 0;
|
|
24
24
|
z-index: -1;
|
|
25
25
|
opacity: 0.9;
|
|
26
26
|
pointer-events: none;
|
|
27
|
-
background-image: url(${
|
|
27
|
+
background-image: url(${Se});
|
|
28
28
|
background-size: cover;
|
|
29
29
|
background-position: 50% 96%;
|
|
30
30
|
background-repeat: no-repeat;
|
|
31
|
-
`,
|
|
31
|
+
`,ze=i.div`
|
|
32
32
|
width: 100%;
|
|
33
33
|
max-width: 1478px;
|
|
34
34
|
display: flex;
|
|
@@ -40,14 +40,14 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
40
40
|
${e.media.maxWidth("lg")} {
|
|
41
41
|
gap: 32px;
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
43
|
+
`,Ae=i.header`
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
46
46
|
align-items: center;
|
|
47
47
|
gap: 12px;
|
|
48
48
|
width: 100%;
|
|
49
49
|
text-align: center;
|
|
50
|
-
`,
|
|
50
|
+
`,Be=i.h1`
|
|
51
51
|
margin: 0;
|
|
52
52
|
font-family: ${e.font.sans};
|
|
53
53
|
font-size: 40px;
|
|
@@ -65,7 +65,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
65
65
|
align-items: center;
|
|
66
66
|
justify-content: center;
|
|
67
67
|
gap: 8px;
|
|
68
|
-
`,
|
|
68
|
+
`,Te=i.p`
|
|
69
69
|
margin: 0;
|
|
70
70
|
font-family: ${e.font.sans};
|
|
71
71
|
font-size: 24px;
|
|
@@ -76,7 +76,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
76
76
|
${e.media.maxWidth("mobile")} {
|
|
77
77
|
font-size: 16px;
|
|
78
78
|
}
|
|
79
|
-
`,
|
|
79
|
+
`,Fe=i.a`
|
|
80
80
|
display: inline-flex;
|
|
81
81
|
align-items: center;
|
|
82
82
|
gap: 2px;
|
|
@@ -110,7 +110,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
110
110
|
height: 18px;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
`,
|
|
113
|
+
`,Le=i.p`
|
|
114
114
|
margin: 0;
|
|
115
115
|
padding: 10px 16px;
|
|
116
116
|
border-radius: ${e.radius.btn};
|
|
@@ -120,7 +120,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
120
120
|
line-height: 1.6;
|
|
121
121
|
color: ${e.colors.media};
|
|
122
122
|
text-align: center;
|
|
123
|
-
`,
|
|
123
|
+
`,V=i.div`
|
|
124
124
|
display: grid;
|
|
125
125
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
126
126
|
gap: 24px;
|
|
@@ -136,7 +136,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
136
136
|
gap: 12px;
|
|
137
137
|
row-gap: 24px;
|
|
138
138
|
}
|
|
139
|
-
`,
|
|
139
|
+
`,X=i.button`
|
|
140
140
|
position: relative;
|
|
141
141
|
display: flex;
|
|
142
142
|
flex-direction: column;
|
|
@@ -162,9 +162,9 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
162
162
|
position: absolute;
|
|
163
163
|
border-radius: inherit;
|
|
164
164
|
pointer-events: none;
|
|
165
|
-
-webkit-mask: ${
|
|
165
|
+
-webkit-mask: ${Y};
|
|
166
166
|
-webkit-mask-composite: xor;
|
|
167
|
-
mask: ${
|
|
167
|
+
mask: ${Y};
|
|
168
168
|
mask-composite: exclude;
|
|
169
169
|
transition: opacity 0.15s ease;
|
|
170
170
|
}
|
|
@@ -221,7 +221,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
221
221
|
${e.media.maxWidth("mobile")} {
|
|
222
222
|
gap: 24px;
|
|
223
223
|
}
|
|
224
|
-
`,
|
|
224
|
+
`,We=i.span`
|
|
225
225
|
position: absolute;
|
|
226
226
|
top: -18px;
|
|
227
227
|
left: 50%;
|
|
@@ -256,7 +256,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
256
256
|
height: 18px;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
`,
|
|
259
|
+
`,q=i.span`
|
|
260
260
|
display: flex;
|
|
261
261
|
flex-direction: column;
|
|
262
262
|
align-items: center;
|
|
@@ -266,7 +266,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
266
266
|
${e.media.maxWidth("mobile")} {
|
|
267
267
|
padding-top: 16px;
|
|
268
268
|
}
|
|
269
|
-
`,
|
|
269
|
+
`,Q=i.span`
|
|
270
270
|
display: flex;
|
|
271
271
|
flex-direction: column;
|
|
272
272
|
align-items: center;
|
|
@@ -282,20 +282,57 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
282
282
|
height: 29.79px;
|
|
283
283
|
color: ${e.colors.softWhite};
|
|
284
284
|
}
|
|
285
|
-
`,
|
|
285
|
+
`,Me=i.span`
|
|
286
286
|
font-family: ${e.font.sans};
|
|
287
287
|
font-size: 40px;
|
|
288
288
|
font-weight: 800;
|
|
289
289
|
line-height: 30px;
|
|
290
290
|
color: ${e.colors.white};
|
|
291
|
-
`,
|
|
291
|
+
`,Ge=i.span`
|
|
292
292
|
font-family: ${e.font.sans};
|
|
293
293
|
font-size: 20px;
|
|
294
294
|
font-weight: 500;
|
|
295
295
|
line-height: 15px;
|
|
296
296
|
color: ${e.colors.media};
|
|
297
297
|
text-transform: uppercase;
|
|
298
|
-
`,
|
|
298
|
+
`,Ue=i.span`
|
|
299
|
+
display: flex;
|
|
300
|
+
align-items: center;
|
|
301
|
+
justify-content: center;
|
|
302
|
+
gap: 8px;
|
|
303
|
+
|
|
304
|
+
&[data-empty='true'] {
|
|
305
|
+
visibility: hidden;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.ico {
|
|
309
|
+
width: 17px;
|
|
310
|
+
height: 18px;
|
|
311
|
+
color: ${e.colors.softWhite};
|
|
312
|
+
opacity: 0.55;
|
|
313
|
+
}
|
|
314
|
+
`,Ne=i.span`
|
|
315
|
+
font-family: ${e.font.sans};
|
|
316
|
+
font-size: 22px;
|
|
317
|
+
font-weight: 600;
|
|
318
|
+
line-height: 24px;
|
|
319
|
+
color: rgba(255, 255, 255, 0.55);
|
|
320
|
+
text-decoration: line-through;
|
|
321
|
+
text-decoration-thickness: 2px;
|
|
322
|
+
`,He=i.span`
|
|
323
|
+
display: inline-flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
padding: 3px 10px;
|
|
326
|
+
border-radius: ${e.radius.pill};
|
|
327
|
+
background: rgba(255, 255, 255, 0.16);
|
|
328
|
+
border: 1px solid rgba(255, 255, 255, 0.28);
|
|
329
|
+
font-family: ${e.font.sans};
|
|
330
|
+
font-size: 13px;
|
|
331
|
+
font-weight: 700;
|
|
332
|
+
line-height: 18px;
|
|
333
|
+
color: ${e.colors.white};
|
|
334
|
+
white-space: nowrap;
|
|
335
|
+
`,Ke=i.span`
|
|
299
336
|
display: block;
|
|
300
337
|
width: 253.5px;
|
|
301
338
|
max-width: 100%;
|
|
@@ -312,7 +349,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
312
349
|
@media (max-width: 520px) {
|
|
313
350
|
width: 200px;
|
|
314
351
|
}
|
|
315
|
-
`,
|
|
352
|
+
`,De=i.span`
|
|
316
353
|
display: flex;
|
|
317
354
|
align-items: center;
|
|
318
355
|
justify-content: center;
|
|
@@ -328,11 +365,11 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
328
365
|
letter-spacing: 0.46px;
|
|
329
366
|
color: ${e.colors.text2};
|
|
330
367
|
text-transform: uppercase;
|
|
331
|
-
`,
|
|
368
|
+
`,Oe=T`
|
|
332
369
|
to {
|
|
333
370
|
background-position: -200% 0;
|
|
334
371
|
}
|
|
335
|
-
`,
|
|
372
|
+
`,F=i.span`
|
|
336
373
|
display: block;
|
|
337
374
|
background: linear-gradient(
|
|
338
375
|
100deg,
|
|
@@ -341,29 +378,29 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
341
378
|
rgba(255, 255, 255, 0.08) 70%
|
|
342
379
|
);
|
|
343
380
|
background-size: 200% 100%;
|
|
344
|
-
animation: ${
|
|
381
|
+
animation: ${Oe} 1.4s infinite linear;
|
|
345
382
|
|
|
346
383
|
@media (prefers-reduced-motion: reduce) {
|
|
347
384
|
animation: none;
|
|
348
385
|
}
|
|
349
|
-
`,
|
|
386
|
+
`,Ye=i(F)`
|
|
350
387
|
width: 60%;
|
|
351
388
|
height: 30px;
|
|
352
389
|
border-radius: ${e.radius.chip};
|
|
353
|
-
`,
|
|
390
|
+
`,Ve=i(F)`
|
|
354
391
|
width: 253.5px;
|
|
355
392
|
max-width: 100%;
|
|
356
393
|
aspect-ratio: 1;
|
|
357
394
|
border-radius: 16px;
|
|
358
|
-
`,
|
|
395
|
+
`,Xe=i(F)`
|
|
359
396
|
width: 100%;
|
|
360
397
|
height: 48px;
|
|
361
398
|
border-radius: ${e.radius.card};
|
|
362
|
-
`,
|
|
399
|
+
`,qe=i.p`
|
|
363
400
|
margin: 0;
|
|
364
401
|
font-family: ${e.font.sans};
|
|
365
402
|
color: ${e.colors.muted};
|
|
366
|
-
`,
|
|
403
|
+
`,Qe=i.div`
|
|
367
404
|
position: absolute;
|
|
368
405
|
inset: 0;
|
|
369
406
|
z-index: 1;
|
|
@@ -374,13 +411,13 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
374
411
|
gap: 24px;
|
|
375
412
|
padding: 24px;
|
|
376
413
|
text-align: center;
|
|
377
|
-
`,
|
|
414
|
+
`,Ze=i.p`
|
|
378
415
|
margin: 0;
|
|
379
416
|
font-family: ${e.font.sans};
|
|
380
417
|
font-size: 16px;
|
|
381
418
|
line-height: 1.4;
|
|
382
419
|
color: rgba(255, 255, 255, 0.88);
|
|
383
|
-
`,
|
|
420
|
+
`,Je=T`
|
|
384
421
|
0%, 100% {
|
|
385
422
|
transform: scale(1);
|
|
386
423
|
opacity: 1;
|
|
@@ -389,7 +426,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
389
426
|
transform: scale(0.88);
|
|
390
427
|
opacity: 0.7;
|
|
391
428
|
}
|
|
392
|
-
`,
|
|
429
|
+
`,et=i.div`
|
|
393
430
|
display: flex;
|
|
394
431
|
flex-direction: column;
|
|
395
432
|
align-items: center;
|
|
@@ -397,23 +434,23 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
397
434
|
gap: 32px;
|
|
398
435
|
padding: 64px 24px;
|
|
399
436
|
min-height: 42vh;
|
|
400
|
-
`,
|
|
437
|
+
`,oe=i.img`
|
|
401
438
|
width: 61px;
|
|
402
439
|
height: 61px;
|
|
403
|
-
animation: ${
|
|
440
|
+
animation: ${Je} 1.2s ease-in-out infinite;
|
|
404
441
|
|
|
405
442
|
@media (prefers-reduced-motion: reduce) {
|
|
406
443
|
animation: none;
|
|
407
444
|
}
|
|
408
|
-
`,
|
|
445
|
+
`,tt=i(oe)`
|
|
409
446
|
width: 72px;
|
|
410
447
|
height: 72px;
|
|
411
|
-
`,
|
|
448
|
+
`,it=i.div`
|
|
412
449
|
display: flex;
|
|
413
450
|
flex-direction: column;
|
|
414
451
|
align-items: center;
|
|
415
452
|
gap: 8px;
|
|
416
|
-
`,
|
|
453
|
+
`,rt=i.p`
|
|
417
454
|
margin: 0;
|
|
418
455
|
font-family: ${e.font.sans};
|
|
419
456
|
font-size: 20px;
|
|
@@ -423,18 +460,18 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
423
460
|
strong {
|
|
424
461
|
font-weight: 700;
|
|
425
462
|
}
|
|
426
|
-
`,
|
|
463
|
+
`,nt=i.div`
|
|
427
464
|
display: flex;
|
|
428
465
|
align-items: center;
|
|
429
466
|
gap: 8px;
|
|
430
|
-
`,
|
|
467
|
+
`,st=T`
|
|
431
468
|
0% {
|
|
432
469
|
left: -40%;
|
|
433
470
|
}
|
|
434
471
|
100% {
|
|
435
472
|
left: 100%;
|
|
436
473
|
}
|
|
437
|
-
`,
|
|
474
|
+
`,ot=i.span`
|
|
438
475
|
position: relative;
|
|
439
476
|
width: 456px;
|
|
440
477
|
max-width: 60vw;
|
|
@@ -442,7 +479,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
442
479
|
border-radius: ${e.radius.pill};
|
|
443
480
|
background: ${e.colors.chip};
|
|
444
481
|
overflow: hidden;
|
|
445
|
-
`,
|
|
482
|
+
`,at=i.span`
|
|
446
483
|
position: absolute;
|
|
447
484
|
top: 0;
|
|
448
485
|
left: -40%;
|
|
@@ -450,25 +487,25 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
450
487
|
height: 100%;
|
|
451
488
|
border-radius: ${e.radius.pill};
|
|
452
489
|
background: ${e.gradients.amethyst};
|
|
453
|
-
animation: ${
|
|
490
|
+
animation: ${st} 1.4s ease-in-out infinite;
|
|
454
491
|
|
|
455
492
|
@media (prefers-reduced-motion: reduce) {
|
|
456
493
|
left: 0;
|
|
457
494
|
width: 30%;
|
|
458
495
|
animation: none;
|
|
459
496
|
}
|
|
460
|
-
`,
|
|
497
|
+
`,dt=i.span`
|
|
461
498
|
font-family: ${e.font.sans};
|
|
462
499
|
font-size: 16px;
|
|
463
500
|
line-height: 22px;
|
|
464
501
|
color: ${e.colors.text2};
|
|
465
|
-
`,
|
|
502
|
+
`,ct=i.div`
|
|
466
503
|
display: flex;
|
|
467
504
|
flex-direction: column;
|
|
468
505
|
gap: 12px;
|
|
469
506
|
max-width: 895px;
|
|
470
507
|
margin: 0 auto;
|
|
471
|
-
`,
|
|
508
|
+
`,lt=i.div`
|
|
472
509
|
display: flex;
|
|
473
510
|
align-items: center;
|
|
474
511
|
gap: 16px;
|
|
@@ -481,11 +518,11 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
481
518
|
flex-direction: column;
|
|
482
519
|
text-align: center;
|
|
483
520
|
}
|
|
484
|
-
`,
|
|
521
|
+
`,pt=i.img`
|
|
485
522
|
flex: none;
|
|
486
523
|
width: 60px;
|
|
487
524
|
height: 60px;
|
|
488
|
-
`,
|
|
525
|
+
`,xt=i.p`
|
|
489
526
|
flex: 1;
|
|
490
527
|
margin: 0;
|
|
491
528
|
font-family: ${e.font.sans};
|
|
@@ -497,12 +534,12 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
497
534
|
strong {
|
|
498
535
|
font-weight: 700;
|
|
499
536
|
}
|
|
500
|
-
`,
|
|
537
|
+
`,ut=i.div`
|
|
501
538
|
padding: 24px;
|
|
502
539
|
border-radius: 16px;
|
|
503
540
|
background: ${e.colors.white};
|
|
504
541
|
border: 1px solid ${e.colors.gray4};
|
|
505
|
-
`,
|
|
542
|
+
`,ht=i.div`
|
|
506
543
|
position: relative;
|
|
507
544
|
display: flex;
|
|
508
545
|
align-items: center;
|
|
@@ -526,7 +563,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
526
563
|
gap: 10px;
|
|
527
564
|
padding: 120px 16px 16px;
|
|
528
565
|
}
|
|
529
|
-
`,
|
|
566
|
+
`,gt=i.img`
|
|
530
567
|
position: absolute;
|
|
531
568
|
left: 35px;
|
|
532
569
|
top: 50%;
|
|
@@ -540,7 +577,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
540
577
|
top: 16px;
|
|
541
578
|
transform: translateX(-50%);
|
|
542
579
|
}
|
|
543
|
-
`,
|
|
580
|
+
`,ft=i.p`
|
|
544
581
|
display: inline-flex;
|
|
545
582
|
align-items: center;
|
|
546
583
|
gap: 8px;
|
|
@@ -553,21 +590,21 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
553
590
|
height: 30px;
|
|
554
591
|
color: ${e.colors.text};
|
|
555
592
|
}
|
|
556
|
-
`,
|
|
593
|
+
`,mt=i.strong`
|
|
557
594
|
font-size: 24px;
|
|
558
595
|
font-weight: 700;
|
|
559
596
|
text-transform: capitalize;
|
|
560
|
-
`,
|
|
597
|
+
`,bt=i.span`
|
|
561
598
|
font-size: 14px;
|
|
562
599
|
font-weight: 400;
|
|
563
|
-
`,
|
|
600
|
+
`,wt=i.div`
|
|
564
601
|
display: flex;
|
|
565
602
|
gap: 12px;
|
|
566
603
|
|
|
567
604
|
@media (max-width: 560px) {
|
|
568
605
|
flex-direction: column;
|
|
569
606
|
}
|
|
570
|
-
`,
|
|
607
|
+
`,C=i.button`
|
|
571
608
|
flex: 1;
|
|
572
609
|
display: inline-flex;
|
|
573
610
|
align-items: center;
|
|
@@ -604,7 +641,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
604
641
|
outline: 2px solid ${e.colors.accent};
|
|
605
642
|
outline-offset: 2px;
|
|
606
643
|
}
|
|
607
|
-
`,
|
|
644
|
+
`,Z=i.div`
|
|
608
645
|
display: flex;
|
|
609
646
|
flex-direction: column;
|
|
610
647
|
align-items: center;
|
|
@@ -613,7 +650,7 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
613
650
|
margin: 0 auto;
|
|
614
651
|
padding: 48px 24px;
|
|
615
652
|
text-align: center;
|
|
616
|
-
`,
|
|
653
|
+
`,J=i.p`
|
|
617
654
|
margin: 0;
|
|
618
655
|
font-family: ${e.font.sans};
|
|
619
656
|
font-size: 20px;
|
|
@@ -623,12 +660,12 @@ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t a
|
|
|
623
660
|
&[data-tone='error'] {
|
|
624
661
|
color: ${e.colors.err};
|
|
625
662
|
}
|
|
626
|
-
`,
|
|
663
|
+
`,ee=i.div`
|
|
627
664
|
display: flex;
|
|
628
665
|
gap: 12px;
|
|
629
666
|
margin-top: 16px;
|
|
630
|
-
`,
|
|
667
|
+
`,yt=i.p`
|
|
631
668
|
margin: 0;
|
|
632
669
|
font-family: ${e.font.sans};
|
|
633
670
|
color: ${e.colors.err};
|
|
634
|
-
`,
|
|
671
|
+
`,j=Ce()?"mock":"stripe",te=[P,P,ne,se],kt={pack_5:P,pack_10:P,pack_25:ne,pack_50:se};function ae(a,s){return kt[a.id]??te[s%te.length]}function Ct(a,s){return a.artUrl??ae(a,s)}const jt="https://docs.decentraland.org";function ie(a){const s=a;if((s==null?void 0:s.name)==="AbortError")return r("getCredits.errorCanceled");const m=((s==null?void 0:s.message)??"").toLowerCase();return m.includes("sign in")?r("getCredits.errorSignIn",{currency:p.name}):m.includes("timed out")?r("getCredits.errorTimeout",{currency:p.name}):r("getCredits.errorGeneric")}function Tt(){var M;he({title:r("nav.getCredits",{currency:p.name}),noindex:!0});const a=xe(),{session:s,signIn:m}=ge(),o=fe(),[b,x]=ue(),{packs:$,isLoading:y}=be(),[h,u]=l.useState("select"),[c,L]=l.useState(null),[v,W]=l.useState(null),de=(v!=null?(M=$.find(n=>n.credits===v))==null?void 0:M.artUrl:void 0)??$e,[ce,k]=l.useState(null),[le,R]=l.useState(!1),_=l.useRef(null);l.useEffect(()=>()=>{var n;return(n=_.current)==null?void 0:n.abort()},[]);const I=l.useCallback(()=>{x(n=>{const d=new URLSearchParams(n);return d.delete("order"),d.delete("canceled"),d},{replace:!0})},[x]),z=l.useCallback(async n=>{u("processing");const d=new AbortController;_.current=d;try{const g=await we(n,{signal:d.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(g.status==="credited"){const w=g.creditsGranted??(c==null?void 0:c.credits)??0;W(w>0?w:null),u("success"),f("Shop Completed Buy Credits",{order_id:n,pack_usd:(c==null?void 0:c.usd)??null,credits:w>0?w:null,provider:j}),o.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(ye)){const S={resumeCheckout:!0,...w>0?{creditsAdded:w}:{}};a("/cart",{state:S});return}}catch{}try{const S=sessionStorage.getItem(O);if(S){sessionStorage.removeItem(O);const G=JSON.parse(S),U=me(G);if(U){a(U,{state:{item:G,resumeBuy:!0}});return}}}catch{}}else g.status==="pending"?(f("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),o.invalidateQueries({queryKey:["usd-balance"]}),u("pending")):(f("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),k(g.error??r("getCredits.errorGrant",{currency:p.name})),u("error"))}catch(g){N(g,{flow:"get_credits",step:"grant",order_id:n}),f("Shop Buy Credits Failed",{step:"grant",error_code:H(g),pack_usd:(c==null?void 0:c.usd)??null}),k(ie(g)),u("error")}},[c,s,o,a]),pe=l.useCallback(async n=>{if(!s){m();return}k(null),R(!1),L(n),u(j==="mock"?"processing":"redirecting"),f("Shop Started Buy Credits",{pack_usd:n.usd,credits:n.credits,provider:j});try{const d=await ke(n.id,{address:s.address,identity:s.identity});if(d.mock)z(d.orderId);else if(d.url)f("Shop Redirected To Stripe",{order_id:d.orderId,pack_usd:n.usd,credits:n.credits}),window.location.href=d.url;else throw new Error("Checkout did not return a redirect url")}catch(d){N(d,{flow:"get_credits",step:"checkout",provider:j}),f("Shop Buy Credits Failed",{step:"checkout",error_code:H(d),pack_usd:n.usd}),k(ie(d)),u("error")}},[s,m,z]),A=l.useRef(!1);l.useEffect(()=>{if(A.current)return;const n=b.get("order");if(b.get("canceled")!=null){A.current=!0,f("Shop Buy Credits Cancelled",{order_id:n,provider:j}),I(),R(!0),u("select");return}n&&(u("processing"),s&&(A.current=!0,I(),z(n)))},[b,s]);function B(){var n;(n=_.current)==null||n.abort(),u("select"),L(null),W(null),k(null),R(!1)}return t.jsxs(Pe,{children:[(h==="select"||h==="redirecting")&&t.jsxs(Re,{"data-testid":"credits-hero",children:[t.jsx(_e,{"aria-hidden":!0}),t.jsxs(ze,{$hidden:h==="redirecting",children:[t.jsxs(Ae,{children:[t.jsx(Be,{children:r("getCredits.title",{currency:p.name})}),t.jsxs(Ee,{children:[t.jsx(Te,{children:r("getCredits.subtitle",{currency:p.nameSingular})}),t.jsxs(Fe,{href:jt,target:"_blank",rel:"noreferrer",children:[r("getCredits.learnMore"),t.jsx(re,{name:"link-out"})]})]})]}),le&&t.jsx(Le,{role:"status",children:r("getCredits.canceledNote")}),t.jsx($t,{packs:$,loading:y,onSelect:n=>void pe(n)})]}),h==="redirecting"&&t.jsxs(Qe,{role:"status","aria-live":"polite",children:[t.jsx(tt,{src:K,alt:"",width:72,height:72}),t.jsx(Ze,{children:r("getCredits.redirecting")})]})]}),h==="processing"&&t.jsxs(et,{role:"status","aria-live":"polite",children:[t.jsx(oe,{src:K,alt:"",width:61,height:61}),t.jsxs(it,{children:[t.jsxs(rt,{children:[t.jsx("strong",{children:r("getCredits.processing")}),"…"]}),t.jsxs(nt,{"aria-hidden":!0,children:[t.jsx(ot,{children:t.jsx(at,{})}),t.jsx(dt,{children:"1/1"})]})]})]}),h==="success"&&t.jsxs(ct,{role:"status","aria-live":"polite",children:[t.jsxs(lt,{children:[t.jsx(pt,{src:ve,alt:"",width:60,height:60}),t.jsxs(xt,{children:[t.jsx("strong",{children:r("getCredits.successTitle")})," ",r("getCredits.successBody",{currency:p.name})]})]}),v!=null&&t.jsx(ut,{children:t.jsxs(ht,{children:[t.jsx(gt,{src:de,alt:"",width:93,height:93}),t.jsxs(ft,{children:[t.jsx(E,{}),t.jsxs("span",{children:[t.jsx(mt,{children:r("getCredits.creditsAmount",{credits:v,currency:p.name})})," ",t.jsx(bt,{children:r("getCredits.creditsAdded")})]})]})]})}),t.jsxs(wt,{children:[t.jsx(C,{"data-variant":"outline",onClick:B,children:r("getCredits.buyMore",{currency:p.name})}),t.jsx(C,{onClick:()=>a("/assets"),children:r("getCredits.startShopping")})]})]}),h==="pending"&&t.jsxs(Z,{role:"status","aria-live":"polite",children:[t.jsx(J,{children:r("getCredits.pendingTitle",{currency:p.name})}),t.jsx(qe,{children:r("getCredits.pendingBody")}),t.jsxs(ee,{children:[t.jsx(C,{onClick:()=>a("/assets"),children:r("getCredits.startShopping")}),t.jsx(C,{"data-variant":"outline",onClick:B,children:r("getCredits.done")})]})]}),h==="error"&&t.jsxs(Z,{role:"alert",children:[t.jsx(J,{"data-tone":"error",children:r("getCredits.errorTitle")}),t.jsx(yt,{children:ce}),t.jsx(ee,{children:t.jsx(C,{onClick:B,children:r("getCredits.tryAgain")})})]})]})}function $t({packs:a,loading:s,onSelect:m}){return s?t.jsx(V,{"aria-busy":"true","aria-label":r("getCredits.packsLoading",{currency:p.name}),children:[0,1,2,3].map(o=>t.jsxs(X,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(q,{children:[t.jsx(Q,{children:t.jsx(Ye,{})}),t.jsx(Ve,{})]}),t.jsx(Xe,{})]},o))}):t.jsx(V,{children:a.map((o,b)=>{const x=je(o,a);return t.jsxs(X,{type:"button","data-testid":"pack","data-best":o.bestValue?"true":void 0,onClick:()=>m(o),"aria-label":x?r("getCredits.packAriaBonus",{amount:D(o.credits),usd:o.usd,bonus:x.bonus,baseline:x.baseline}):r("getCredits.packAria",{amount:D(o.credits),usd:o.usd}),children:[o.bestValue&&t.jsxs(We,{children:[t.jsx(re,{name:"star-rounded"}),r("getCredits.packBadge")]}),t.jsxs(q,{children:[t.jsxs(Q,{children:[t.jsxs(Ie,{children:[t.jsx(E,{}),t.jsx(Me,{children:o.credits})]}),t.jsx(Ge,{children:r("getCredits.packUnit",{currency:p.name})}),t.jsxs(Ue,{"data-empty":x?void 0:"true","aria-hidden":!0,children:[t.jsx(E,{}),t.jsx(Ne,{children:x?x.baseline:0}),x&&t.jsx(He,{children:r("getCredits.packBonus",{bonus:x.bonus})})]})]}),t.jsx(Ke,{children:t.jsx("img",{src:Ct(o,b),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const y=$.currentTarget;y.dataset.artFallback||(y.dataset.artFallback="done",y.src=ae(o,b))}})})]}),t.jsxs(De,{children:["$",o.usd.toFixed(2)]})]},o.id)})})}export{Tt as GetCredits,Tt 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-g7wbqJm1.js";import{d as g,r as v}from"./index-DCNmX8Jr.js";import{C as c}from"./ConstantsUtil-Dfwpy1eP.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-DSb_b_EZ.js";import{au as y}from"./NetworkUtil-HlUKXKcF.js";const b=g`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|