@dcl/shop 0.1.0-28784714610.commit-5b6e6db → 0.1.0-28784739881.commit-43c3ed7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Assets-DUyVmR7R.js → Assets-gIjjpRy5.js} +1 -1
- package/assets/Cart-C52mFfKE.js +1 -0
- package/assets/{CircularProgress-BS9i5mZv.js → CircularProgress-lGz3QJzY.js} +1 -1
- package/assets/{Collection-BA7pWm0V.js → Collection-cVl5pkqL.js} +1 -1
- package/assets/{Creator-D_FbaRDo.js → Creator-CtFPTv2r.js} +1 -1
- package/assets/{ExchangeController-BJDnp3m2.js → ExchangeController-D_k2b6bN.js} +1 -1
- package/assets/GetCredits-C5tUkBfq.js +2 -0
- package/assets/{HelpersUtil-JjK2Uszl.js → HelpersUtil-Bx9DcGje.js} +1 -1
- package/assets/ImportListings-Cp9c43PW.js +1 -0
- package/assets/ItemDetail-ClAyj4b-.css +1 -0
- package/assets/ItemDetail-QsZRIBMD.js +1 -0
- package/assets/Market-DjUM6Tjh.js +1 -0
- package/assets/MyAssets--T3O0ufz.js +1 -0
- package/assets/MyFavorites-la-Ipzze.js +1 -0
- package/assets/MyPurchases-uj97bMKy.js +1 -0
- package/assets/{NotFound-BK3mhtdy.js → NotFound-DW9xW0V2.js} +1 -1
- package/assets/{RealCheckout-BV33lhv4.js → RealCheckout-WGIqivb-.js} +1 -1
- package/assets/{Success-MOjWWEuh.js → Success-9nbA6ARC.js} +1 -1
- package/assets/{SvgIcon-BmQyJwH3.js → SvgIcon-B-RYlk9D.js} +1 -1
- package/assets/{SwapController-Cdtm6Ssc.js → SwapController-DvqrkWqb.js} +1 -1
- package/assets/{TradeService-BHS-ONCd.js → TradeService-bh07C9CQ.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-Bvn0rHz8.js → W3MFrameProviderSingleton-BcBo86qj.js} +3 -3
- package/assets/{WebCryptoP256-DQOiVEnm.js → WebCryptoP256-C22djMF_.js} +1 -1
- package/assets/{basic-BuZDq-06.js → basic-CvkQ4eMW.js} +1 -1
- package/assets/{biconomy-Csc_C3IC.js → biconomy-BYF4CuCg.js} +1 -1
- package/assets/{buy-BBvDFvUh.js → buy-BhUIEcOv.js} +1 -1
- package/assets/{buy-gasless-B6FX_fq7.js → buy-gasless-Sp2nbDeH.js} +1 -1
- package/assets/{ccip-59XmoM9k.js → ccip-CIC3drWp.js} +1 -1
- package/assets/{ccip-T6J9p1rj.js → ccip-DQo0NqSR.js} +1 -1
- package/assets/collection-CYeLN-mn.js +1 -0
- package/assets/{controller-DSHq7K3y.js → controller-DTGxZ8xF.js} +2 -2
- package/assets/{core-CrE3myER.js → core-ByXkyoai.js} +4 -4
- package/assets/{custom-BUFqlvWj.js → custom-uyVA1bVr.js} +1 -1
- package/assets/{data-capture-CaD6Xenb.js → data-capture-C7YYyGFW.js} +1 -1
- package/assets/{decimals-DROjZaXR.js → decimals-CoCCzTJB.js} +1 -1
- package/assets/decimals-DLIjm7Tv.js +1 -0
- package/assets/{detectExtension-Byo9cHwQ.js → detectExtension-CX-wCFtq.js} +1 -1
- package/assets/{email-B5Kjw71J.js → email-D0SaZ2E-.js} +1 -1
- package/assets/{embedded-wallet-CjU5CMyX.js → embedded-wallet-BwoVxbVF.js} +1 -1
- package/assets/{engine-XbcwkaA2.js → engine-CA8Qop3l.js} +1 -1
- package/assets/{estimate-l1-fee-BRwoaz2E.js → estimate-l1-fee-DZkH0sUH.js} +1 -1
- package/assets/{eth_estimateGas-BZIj-I5b.js → eth_estimateGas-pj61ZTal.js} +1 -1
- package/assets/{eth_getStorageAt-Bl6SN3Gg.js → eth_getStorageAt-hW8hecJw.js} +1 -1
- package/assets/{eth_getTransactionCount-BjoxpRES.js → eth_getTransactionCount-CgTYkq09.js} +1 -1
- package/assets/{extractIPFS-8SlAO4OO.js → extractIPFS-BAo6dLmM.js} +1 -1
- package/assets/{features-cxJBydr2.js → features-DRtFoDzt.js} +1 -1
- package/assets/{fetchTokenMetadata-B3KRqfXP.js → fetchTokenMetadata-DvUQSd7A.js} +2 -2
- package/assets/{generateUtilityClasses-BRQBEf9L.js → generateUtilityClasses-BZqFSfTv.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-BR-v1Uih.js → get-ecosystem-wallet-info-DSu1SiXe.js} +1 -1
- package/assets/{getBalance-Dl-i4Y4C.js → getBalance-CadpLxBV.js} +1 -1
- package/assets/{getInstalledModules-BUabKCOA.js → getInstalledModules-W1h7kV7_.js} +1 -1
- package/assets/{getNFT-CsmOtMPP.js → getNFT-BVVLfQbq.js} +1 -1
- package/assets/{getNFT-D30uH_6i.js → getNFT-Dz57g64e.js} +2 -2
- package/assets/{hashTypedData-Ds968RrS.js → hashTypedData-QpseW5gc.js} +1 -1
- package/assets/{hashTypedData-DV4bilef.js → hashTypedData-nw2pcANT.js} +1 -1
- package/assets/{import-BaLE85Ti.js → import-Dkeo-TN0.js} +1 -1
- package/assets/{in-app-wallet-calls-DgI387PU.js → in-app-wallet-calls-4eFCdDZh.js} +1 -1
- package/assets/{index-pyYpB4kG.js → index-6cNDeqeF.js} +1 -1
- package/assets/{index-C3sv5hnX.js → index-9Psy23oc.js} +1 -1
- package/assets/{index-_rCKMRE-.js → index-B1S_9aHy.js} +1 -1
- package/assets/{index-BMRIz5p4.js → index-B2XvcdGV.js} +1 -1
- package/assets/{index-Cq8uCjbZ.js → index-B79ABZ__.js} +1 -1
- package/assets/{index-BwXE94rO.js → index-B7BzjWLu.js} +1 -1
- package/assets/{index-QYmuM6zW.js → index-BJ1ioTkZ.js} +1 -1
- package/assets/{index-BzmDq0Wh.js → index-BLLxusx7.js} +1 -1
- package/assets/{index-NJmYfDfc.js → index-BktYjWX5.js} +1 -1
- package/assets/{index-CJkbbDUt.js → index-Bpsad0fL.js} +1 -1
- package/assets/{index-BWEyHUH3.js → index-BtHC7Fa4.js} +1 -1
- package/assets/{index-BfXOGdVe.js → index-BxjGkOuB.js} +1 -1
- package/assets/{index-pOV8UEA9.js → index-CAj_rMw8.js} +1 -1
- package/assets/{index-KRoLg_yS.js → index-CCdZbTTX.js} +1 -1
- package/assets/{index-BWOVyjs4.js → index-CK9n2Soe.js} +1 -1
- package/assets/{index-zHNcwTL3.js → index-CL4WxYGH.js} +1 -1
- package/assets/{index-B8tubi9M.js → index-CW4-nT2C.js} +1 -1
- package/assets/{index-DyiKKtwW.js → index-CbjBeTe9.js} +2 -2
- package/assets/{index-BQr5jaXj.js → index-CdP0lCdS.js} +1 -1
- package/assets/{index-CFfNTbcC.js → index-CfFVh2eL.js} +1 -1
- package/assets/{index-7oIFnffg.js → index-Cg0zF20H.js} +1 -1
- package/assets/{index-6hD9Hduu.js → index-CvsStUct.js} +1 -1
- package/assets/{index-CpY5cZEz.js → index-Cw-pbvCZ.js} +1 -1
- package/assets/{index-VPmgmb89.js → index-CxoVorCo.js} +1 -1
- package/assets/{index-BbjheLbR.js → index-D3AFvgbm.js} +1 -1
- package/assets/{index-BIv4DtNp.js → index-D4sCSl3v.js} +1 -1
- package/assets/{index-BrtVGFkT.js → index-D8aVYz6b.js} +2 -2
- package/assets/{index-dAV-AkJi.js → index-DDfYFIH_.js} +27 -27
- package/assets/{index-CKSd6gXx.js → index-DEHAgwh3.js} +1 -1
- package/assets/{index-B21GQ497.js → index-DK8o_-MU.js} +1 -1
- package/assets/{index-D7Zwvata.js → index-DQQ8vcKb.js} +1 -1
- package/assets/{index-Bga2zqu_.js → index-DUnR57bW.js} +1 -1
- package/assets/{index-D2ZmhHDL.js → index-DXtGvB98.js} +1 -1
- package/assets/{index-BsOoOJXI.js → index-Dfkt19BE.js} +2 -2
- package/assets/{index-BEhu8vKA.js → index-DgmIAh0P.js} +1 -1
- package/assets/{index-C-2Ihuft.js → index-DsTotSHt.js} +1 -1
- package/assets/{index-CF-MpEVC.js → index-DzF5BR5O.js} +1 -1
- package/assets/{index-D-fM3KPQ.js → index-HFnpFwSe.js} +1 -1
- package/assets/{index-DY2hN0x0.js → index-KYw0-IT6.js} +1 -1
- package/assets/{index-DPitXhSt.js → index-UoCQV6ME.js} +1 -1
- package/assets/{index-IqOeLPSQ.js → index-W0uLoFxp.js} +1 -1
- package/assets/{index-DPIc2Fgk.js → index-YieljOW_.js} +1 -1
- package/assets/{index-D1_9d5Dg.js → index-YkoyBH8H.js} +1 -1
- package/assets/{index-CXgZaeC4.js → index-ZfDbe-6V.js} +1 -1
- package/assets/{index--5Hj91ms.js → index-eC1YpRrY.js} +1 -1
- package/assets/{index-64JSHk5B.js → index-gKTQuTml.js} +3 -3
- package/assets/{index-3vQYmsDq.js → index-lxqXQ6kn.js} +1 -1
- package/assets/{index-C1sdcOzL.js → index-obSnm-Ia.js} +1 -1
- package/assets/index-pYCoYNtI.css +1 -0
- package/assets/{index-BT_ERmTU.js → index-qITppT9o.js} +1 -1
- package/assets/{index-Psm6XmK6.js → index-y7nKWZtu.js} +3 -3
- package/assets/{index-CaHw8MeD.js → index-yGcwaBGX.js} +1 -1
- package/assets/{index.es-DS4Jg0nl.js → index.es-BafpZUkY.js} +1 -1
- package/assets/{index.es-eclv66nS.js → index.es-fIa_oqRK.js} +4 -4
- package/assets/{index.es-DI6olSvw.js → index.es-m3ocg06j.js} +1 -1
- package/assets/{localBatchGatewayRequest-CGak8xpa.js → localBatchGatewayRequest-CtkYeZDu.js} +1 -1
- package/assets/mana-rate-BmNr7NQv.js +1 -0
- package/assets/network-QMhAzF3Y.js +1 -0
- package/assets/{networks-BpLmtHsW.js → networks-_eWeMDsj.js} +1 -1
- package/assets/{onramp-oK3BFbCF.js → onramp-CGWmiF1J.js} +1 -1
- package/assets/{openzeppelin-CPdS4-4e.js → openzeppelin--5btda16.js} +1 -1
- package/assets/{ownerOf-DY16Ob_P.js → ownerOf-DWiVCMYI.js} +1 -1
- package/assets/{parseNft-QJ9pRt9S.js → parseNft-DXOsgcMp.js} +2 -2
- package/assets/{parseSignature-CQOmQQo9.js → parseSignature-Y0VTeji3.js} +1 -1
- package/assets/{parseSignature-BJ4x-_Qr.js → parseSignature-Ycmpy2nX.js} +3 -3
- package/assets/{pay-with-exchange-Beq0FGNR.js → pay-with-exchange-DmX53QwM.js} +1 -1
- package/assets/{qr-overlay-BsZELLQC.js → qr-overlay-CQHeB4ei.js} +1 -1
- package/assets/{receive-D8MXkvpc.js → receive-B6FzlvkF.js} +1 -1
- package/assets/{resolveImplementation-Y7paL_Mh.js → resolveImplementation-D5Mrnxoa.js} +1 -1
- package/assets/{rpc-D4UM1j6p.js → rpc-DSGD_uZq.js} +1 -1
- package/assets/{secp256k1-CIohhqR7.js → secp256k1-6tsRQRAJ.js} +1 -1
- package/assets/{secp256k1-B1qF46oF.js → secp256k1-B2i0Wftc.js} +1 -1
- package/assets/{secp256k1-BVeK5cpU.js → secp256k1-eid5ygXp.js} +1 -1
- package/assets/{send-CG0WYcS6.js → send-D9ZyDxbV.js} +1 -1
- package/assets/{send-batch-transaction-BctK5uk6.js → send-batch-transaction-Dz6a059B.js} +1 -1
- package/assets/{send-eip712-transaction-C6wYrHDB.js → send-eip712-transaction-Bhe_ladj.js} +2 -2
- package/assets/{send-gasless-transaction-BZ4HwX6x.js → send-gasless-transaction-_2XH2Eaa.js} +2 -2
- package/assets/{sendRawTransaction-4tXgdo4l.js → sendRawTransaction-DYmEcH56.js} +3 -3
- package/assets/{serializeTransaction-0lBrDFRN.js → serializeTransaction-Do4PXTSN.js} +1 -1
- package/assets/{session-proposal-DaP0pJ69.js → session-proposal-DWcvrF7V.js} +1 -1
- package/assets/{session-request-D5nYk0_b.js → session-request-C6sAlwA7.js} +2 -2
- package/assets/{sha256-Cvds8h60.js → sha256-Dd8TUFpB.js} +1 -1
- package/assets/{signing-DEEXQ6Ax.js → signing-D1s1fFYk.js} +4 -4
- package/assets/{socials-CCpTKnyH.js → socials-Crmkp42G.js} +1 -1
- package/assets/{swaps-Dc8wNdim.js → swaps-B4Zg1wD0.js} +1 -1
- package/assets/{thirdweb-CYSwxVNI.js → thirdweb-BYOg3U-4.js} +3 -3
- package/assets/{totalSupply-B27aPc8l.js → totalSupply-DYQLqcrO.js} +1 -1
- package/assets/{transactionReceipt-CzQQaXlM.js → transactionReceipt-BMFv-CWc.js} +1 -1
- package/assets/{transactions-QrdHbcwA.js → transactions-Bue4De3k.js} +1 -1
- package/assets/{useInfiniteGrid-BuyCnBAW.js → useInfiniteGrid-BljM6dNq.js} +1 -1
- package/assets/{verifyHash-Fnp5U_ou.js → verifyHash-CgPvy4KQ.js} +1 -1
- package/assets/{w3m-modal-33eEotf5.js → w3m-modal-jHCkWizs.js} +1 -1
- package/assets/{w3m-modal-I7-YcuT1.js → w3m-modal-mwXP0RL3.js} +1 -1
- package/assets/{wait-for-tx-receipt-DrQ94XVt.js → wait-for-tx-receipt-Cn4cARlz.js} +1 -1
- package/assets/{wallet-kind-BQH-5eU2.js → wallet-kind-DWVcMRCP.js} +1 -1
- package/assets/{wallets-BrUfYn4E.js → wallets-jS_FUEQm.js} +6 -6
- package/assets/{web-connector-Kg6RHLCP.js → web-connector-CAH6CXlP.js} +3 -3
- package/assets/{writeContract-BLs0jZOZ.js → writeContract-CSKFgtPF.js} +1 -1
- package/assets/{zoraTestnet-Dx1CiywV.js → zoraTestnet-CrygtBAa.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/Cart-sMsKz9Ee.js +0 -1
- package/assets/GetCredits-DiJz2XBT.js +0 -2
- package/assets/ImportListings-4UY44_AB.js +0 -1
- package/assets/ItemDetail-Dnl22q9g.css +0 -1
- package/assets/ItemDetail-IG3gYI0Q.js +0 -1
- package/assets/Market-B4c6exR5.js +0 -1
- package/assets/MyAssets-CRi2vJB8.js +0 -1
- package/assets/MyFavorites-DqHxTPlB.js +0 -1
- package/assets/MyPurchases-4qSDwW5-.js +0 -1
- package/assets/collection-BUyamaBP.js +0 -1
- package/assets/decimals-CK8VnClu.js +0 -1
- package/assets/index-BM9AjnmE.css +0 -1
- package/assets/mana-rate-COLq0c3f.js +0 -1
- package/assets/network-GMBxj6Ty.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as K,r as
|
|
1
|
+
import{u as K,r as i,j as e}from"./react-E8ng6RF2.js";import{t as M,C as Q,A as V,f as X}from"./index-DDfYFIH_.js";import{S as F}from"./SkeletonCards-yV2mi4oc.js";import{L as ee}from"./LoadMore-DB6TwvRe.js";import{u as se}from"./useInfiniteGrid-BljM6dNq.js";import"./ethers-DbXGgxrh.js";const re=48,k=[{key:"wearable",label:"Wearables",sub:["Head","Upper Body","Handwear","Lower Body","Feet","Accessories","Skins"]},{key:"emote",label:"Emotes",sub:[]},{key:"ens",label:"Names",sub:[]},{key:"parcel",label:"Lands",sub:[]}],ie={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"]},te=["common","uncommon","rare","epic","legendary","mythic","unique","exotic"],f=[{key:"newest",label:"Newest",server:"newest"},{key:"price-asc",label:"Price: Low to High",server:"cheapest"},{key:"price-desc",label:"Price: High to Low",server:"most_expensive"},{key:"name",label:"Name (A–Z)",server:"name"}];function de(){const[B]=K(),l=(B.get("q")??"").trim().toLowerCase(),[n,C]=i.useState("wearable"),[r,x]=i.useState(null),[t,S]=i.useState([]),[m,w]=i.useState(""),[p,$]=i.useState(""),[u,H]=i.useState("newest"),[a,d]=i.useState(null),h=m&&!Number.isNaN(Number(m))?Number(m):void 0,b=p&&!Number.isNaN(Number(p))?Number(p):void 0,I=r?ie[r]:void 0,q=(f.find(s=>s.key===u)??f[0]).server,A={category:n,rarities:t.length?t:void 0,wearableCategories:I,minPriceCredits:h,maxPriceCredits:b,search:l||void 0,sortBy:q},{items:P,total:y,isLoading:c,error:L,hasNextPage:O,isFetchingNextPage:R,fetchNextPage:T}=se(["listings",A],s=>X({...A,first:re,skip:s})),N=y,E=i.useRef(null);i.useEffect(()=>{c||!l||E.current===l||(E.current=l,M("Shop Searched",{query:l,result_count:N}))},[l,c,N]);const g=i.useRef("__init__");i.useEffect(()=>{if(c)return;const s=JSON.stringify({category:n,subCategory:r,rarities:t,min:h,max:b,sort:u});if(g.current==="__init__"||g.current===s){g.current=s;return}g.current=s,M("Shop Applied Filter",{filters:{category:n,sub_category:r,rarities:t,min_price_credits:h??null,max_price_credits:b??null,sort:u},result_count:N})},[n,r,t,h,b,u,c,N]);function U(s){C(s),x(null)}function G(s){S(o=>o.includes(s)?o.filter(D=>D!==s):[...o,s])}function Z(){C("wearable"),x(null),S([]),w(""),$(""),d(null)}function j(s){d(o=>o===s?null:s)}const J=f.find(s=>s.key===u)??f[0],_=k.find(s=>s.key===n)??k[0],W=r?`${_.label} · ${r}`:_.label,v=!!(h||b),Y=v?`${m||"0"}–${p||"∞"}`:"Price",z=n!=="wearable"||!!r||t.length>0||v;return e.jsxs("div",{className:"browse",children:[a?e.jsx("div",{className:"filterbar__scrim",onClick:()=>d(null),"aria-hidden":!0}):null,e.jsxs("div",{className:"filterbar",children:[e.jsxs("div",{className:"filterbar__filters",children:[e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${a==="section"?" is-open":""}${r||n!=="wearable"?" is-active":""}`,onClick:()=>j("section"),children:[W," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),a==="section"?e.jsxs("div",{className:"filter-pop filter-pop--section",children:[e.jsx("ul",{className:"filter-pop__cats",children:k.map(s=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__cat${n===s.key?" is-active":""}`,onClick:()=>U(s.key),children:s.label})},s.key))}),_.sub.length?e.jsxs("ul",{className:"filter-pop__subs",children:[e.jsx("li",{children:e.jsxs("button",{className:`filter-pop__sub${r?"":" is-active"}`,onClick:()=>{x(null),d(null)},children:["All ",_.label]})}),_.sub.map(s=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__sub${r===s?" is-active":""}`,onClick:()=>{x(o=>o===s?null:s),d(null)},children:s})},s))]}):null]}):null]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${a==="rarity"?" is-open":""}${t.length?" is-active":""}`,onClick:()=>j("rarity"),children:["Rarity ",t.length?e.jsx("span",{className:"filterbar__badge",children:t.length}):null," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),a==="rarity"?e.jsx("div",{className:"filter-pop filter-pop--rarity",children:te.map(s=>e.jsxs("label",{className:"filter-pop__check",children:[e.jsx("input",{type:"checkbox",checked:t.includes(s),onChange:()=>G(s)}),e.jsx("span",{children:s})]},s))}):null]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${a==="price"?" is-open":""}${v?" is-active":""}`,onClick:()=>j("price"),children:[Y," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),a==="price"?e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0","aria-label":"Minimum price",placeholder:"Min",value:m,onChange:s=>w(s.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":"Maximum price",placeholder:"Max",value:p,onChange:s=>$(s.target.value)})]}),e.jsxs("p",{className:"filter-pop__hint",children:["Price in ",Q.name]})]}):null]}),z?e.jsx("button",{className:"filterbar__clear",onClick:Z,children:"Clear all"}):null]}),e.jsxs("div",{className:"filterbar__right",children:[e.jsxs("span",{className:"filterbar__count",children:[c?"…":`${y.toLocaleString()} item${y===1?"":"s"}`,l?` for “${l}”`:""]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__sort${a==="sort"?" is-open":""}`,onClick:()=>j("sort"),children:["Sort by: ",J.label," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),a==="sort"?e.jsx("div",{className:"filter-pop filter-pop--sort",children:f.map(s=>e.jsx("button",{className:`filter-pop__sort${s.key===u?" is-active":""}`,onClick:()=>{H(s.key),d(null)},children:s.label},s.key))}):null]})]})]}),L?e.jsx("p",{className:"error",children:L.message}):null,e.jsx("div",{className:"grid",children:c?e.jsx(F,{count:15}):e.jsxs(e.Fragment,{children:[P.map(s=>e.jsx(V,{item:s},s.id)),R?e.jsx(F,{count:6}):null]})}),e.jsx(ee,{hasNextPage:O,isFetching:R,onLoadMore:()=>T()}),!c&&P.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null]})}export{de as Assets};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as K,r as g,j as e,L as T}from"./react-E8ng6RF2.js";import{k as h,c as $,e as A,l as M,m as O,g as _,C as U,t as b,n as F,i as H,o as V,q as D,r as J,s as I,v as q,w as X,x as Z,y as ee,f as se}from"./index-DDfYFIH_.js";import{f as P}from"./buy-BhUIEcOv.js";import{g as ae,b as te,w as re,G as ce}from"./buy-gasless-Sp2nbDeH.js";import"./ethers-DbXGgxrh.js";import"./index-B7BzjWLu.js";function le(a){const d=a,l=(d.message??"").toLowerCase();return d.code===4001||l.includes("reject")||l.includes("denied")||l.includes("cancel")?"You cancelled the request.":l.includes("insufficient")?`You don't have enough ${U.name} — get more first.`:l.includes("no active listing")?d.message:"Couldn't complete checkout — please try again."}function ne(a){return ee(a.received[0].amount)}function pe(){const a=h(s=>s.items),d=h(s=>s.remove),l=h(s=>s.clear),Y=h(s=>s.add),z=h(s=>s.setFittingOpen),{session:t}=$(),G=a.some(s=>s.category!=="emote"),{data:x}=A({queryKey:["upsell-listings"],queryFn:()=>se({first:40}),staleTime:6e4}),{data:i}=M(t),v=O(),R=K(),[N,p]=g.useState(null),[C,y]=g.useState(null),[o,w]=g.useState(!1),u=a.reduce((s,m)=>s+m.priceCredits,0),B=new Set(a.map(s=>s.id)),k=((x==null?void 0:x.items)??[]).filter(s=>!B.has(s.id)).slice(0,6);async function L(){if(!t){y("Sign in to check out.");return}y(null),w(!0),b("Shop Started Checkout",{cart_size:a.length,cart_value_credits:u,cart_value_usd:F(u),has_sufficient_credits:((i==null?void 0:i.credits)??0)>=u});const s=a.slice(),m=[];let f="authorize",S=!1;try{p("Preparing your order…");const c=[];for(const r of a){const j=r.tradeId?await H(r.tradeId):await V(r.contractAddress,r.itemId??"");if(!j)throw new Error(`No active listing for ${r.name}.`);const Q=ne(j),{credit:E,maxCreditedValue:W}=await D(t.identity,Q,r.tradeId);m.push(E.id),c.push({trade:j,credits:[E],maxCreditedValue:W})}p("Confirming your purchase…"),f="submit";let n=[];if(ae())try{n=await te({purchases:c,buyer:t.address,signer:t.signer}),await Promise.all(n.map(r=>re(r))),S=!0}catch(r){if(!(r instanceof ce))throw r;n=await P({purchases:c,buyer:t.address,signer:t.signer})}else n=await P({purchases:c,buyer:t.address,signer:t.signer});l(),p("Purchased! 🎉"),b("Shop Completed Purchase",{...J(s),payment_type:"credits",no_crypto_step:S,transaction_hash:n[0]??null}),v.invalidateQueries({queryKey:["usd-balance"]}),R("/success",{state:{items:s,txHash:n[0]}})}catch(c){if(I(c)||q(c,{flow:"cart_checkout",step:f,cart_size:a.length}),b(I(c)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:f,error_code:X(c),value_usd:F(u),cart_size:a.length}),m.length){try{await Z(t.identity,m)}catch(n){q(n,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}y(le(c)),p(null)}finally{w(!1)}}return a.length===0?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx("span",{className:"ico ico-cart cart-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"cart-empty__title",children:"Your cart is empty"}),e.jsx("p",{className:"muted",children:"Find something you love and it’ll show up here."}),e.jsx(T,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]}):e.jsxs("div",{className:"cart",children:[e.jsxs("h1",{children:["Cart (",a.length,")"]}),e.jsx("div",{className:"cart__list",children:a.map(s=>e.jsxs("div",{className:"cart__row",children:[e.jsx("div",{className:"cart__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}),e.jsxs("div",{className:"cart__info",children:[e.jsx("div",{className:"cart__name",children:s.name}),e.jsx("div",{className:"muted",children:s.creator?`By ${s.creator}`:""})]}),e.jsxs("div",{className:"cart__price",children:[e.jsx(_,{className:"ccy-mark"})," ",s.priceCredits]}),e.jsx("button",{className:"link",onClick:()=>d(s.id),disabled:o,children:"Remove"})]},s.id))}),e.jsxs("div",{className:"cart__foot",children:[e.jsxs("div",{className:"cart__total",children:[e.jsxs("div",{children:["Total ",e.jsxs("strong",{children:[e.jsx(_,{className:"ccy-mark"})," ",u]})]}),t?e.jsxs("div",{className:"muted cart__balance",children:["Your balance: ",e.jsx(_,{className:"ccy-mark"})," ",(i==null?void 0:i.credits)??0]}):null]}),e.jsxs("div",{className:"cart__actions",children:[G?e.jsx("button",{className:"btn btn--ghost",onClick:()=>z(!0),disabled:o,children:"Try on outfit"}):null,e.jsxs(T,{className:"btn btn--ghost",to:"/credits",children:["Get ",U.name]}),null,e.jsx("button",{className:"btn btn--ghost",onClick:l,disabled:o,children:"Clear"}),e.jsx("button",{className:"btn btn--purple",onClick:L,disabled:o,children:"Checkout"})]})]}),N?e.jsx("p",{className:"muted",style:{marginTop:12},children:N}):null,C?e.jsx("p",{className:"error",style:{marginTop:12},children:C}):null,k.length>0?e.jsxs("div",{className:"cart-upsell",children:[e.jsx("h2",{className:"cart-upsell__title",children:"You might also like"}),e.jsx("div",{className:"cart-upsell__row",children:k.map(s=>e.jsxs("div",{className:"cart-upsell__card",children:[e.jsx("div",{className:"cart-upsell__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}),e.jsx("div",{className:"cart-upsell__name",title:s.name,children:s.name}),e.jsxs("div",{className:"cart-upsell__price",children:[e.jsx(_,{className:"ccy-mark"})," ",s.priceCredits]}),e.jsx("button",{className:"btn btn--sm cart-upsell__add",onClick:()=>Y(s,"upsell"),disabled:o,children:"Add"})]},s.id))})]}):null]})}export{pe as Cart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as N,a as U,u as w,_ as z,b as o,c as E,d as n,e as I,s as v,f as D,k as _}from"./generateUtilityClasses-
|
|
1
|
+
import{g as N,a as U,u as w,_ as z,b as o,c as E,d as n,e as I,s as v,f as D,k as _}from"./generateUtilityClasses-BZqFSfTv.js";import{r as F,j as g}from"./react-E8ng6RF2.js";function K(r){return N("MuiCircularProgress",r)}U("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=_(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,b as h,j as e}from"./react-E8ng6RF2.js";import{a as x,A as j,b as _}from"./index-
|
|
1
|
+
import{a as g,b as h,j as e}from"./react-E8ng6RF2.js";import{a as x,A as j,b as _}from"./index-DDfYFIH_.js";import{A as N}from"./collection-CYeLN-mn.js";import{S as m}from"./SkeletonCards-yV2mi4oc.js";import{L as f}from"./LoadMore-DB6TwvRe.js";import{u as b}from"./useInfiniteGrid-BljM6dNq.js";import"./ethers-DbXGgxrh.js";const C=48;function F(){var i;const{contractAddress:o}=g(),d=h(),{items:s,total:t,isLoading:a,error:c,hasNextPage:p,isFetchingNextPage:n,fetchNextPage:u}=b(["collection-page",o],l=>_(o,{first:C,skip:l}),{enabled:!!o}),r=(i=s[0])==null?void 0:i.creator;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>d("/assets"),children:"Collectibles"}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:"Collection"})]}),e.jsxs("header",{className:"collection-page__head",children:[e.jsx("h1",{className:"collection-page__title",children:"Collection"}),r?e.jsx(x,{address:r,className:"collection-page__creator"}):null,e.jsx("span",{className:"muted collection-page__count",children:a?"…":`${t.toLocaleString()} item${t===1?"":"s"}`})]}),!a&&s.length>0?e.jsx(N,{items:s,source:"collection"}):null,c?e.jsx("p",{className:"error",children:c.message}):null,e.jsx("div",{className:"grid",children:a?e.jsx(m,{count:12}):e.jsxs(e.Fragment,{children:[s.map(l=>e.jsx(j,{item:l},l.id)),n?e.jsx(m,{count:6}):null]})}),e.jsx(f,{hasNextPage:p,isFetching:n,onLoadMore:()=>u()}),!a&&!c&&s.length===0?e.jsx("p",{className:"muted",children:"This collection has no items to show."}):null]})}export{F as Collection,F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,a as g,b as p}from"./react-E8ng6RF2.js";import{
|
|
1
|
+
import{j as e,a as g,b as p}from"./react-E8ng6RF2.js";import{E as i,a as h,A as x,F as j}from"./index-DDfYFIH_.js";import{A as f}from"./collection-CYeLN-mn.js";import{S as m}from"./SkeletonCards-yV2mi4oc.js";import{L as b}from"./LoadMore-DB6TwvRe.js";import{u as N}from"./useInfiniteGrid-BljM6dNq.js";import"./ethers-DbXGgxrh.js";function _({address:s,className:r=""}){const o=i(t=>t.followed.includes(s.toLowerCase())),a=i(t=>t.toggle);return s?e.jsx("button",{type:"button",className:`btn btn--sm ${o?"btn--ghost":"btn--outline"} ${r}`.trim(),"aria-pressed":o,title:o?"Unfollow creator":"Follow creator",onClick:()=>a(s),children:o?"Following":"Follow"}):null}const C=48;function E(){const{address:s}=g(),r=p(),{items:o,total:a,isLoading:t,error:n,hasNextPage:u,isFetchingNextPage:c,fetchNextPage:d}=N(["creator-page",s],l=>j(s,{first:C,skip:l}),{enabled:!!s});return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>r("/assets"),children:"Collectibles"}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:"Creator"})]}),e.jsxs("header",{className:"collection-page__head",children:[s?e.jsx(h,{address:s,className:"collection-page__title-creator"}):null,s?e.jsx(_,{address:s}):null,e.jsx("span",{className:"muted collection-page__count",children:t?"…":`${a.toLocaleString()} item${a===1?"":"s"}`})]}),!t&&o.length>0?e.jsx(f,{items:o,source:"creator"}):null,n?e.jsx("p",{className:"error",children:n.message}):null,e.jsx("div",{className:"grid",children:t?e.jsx(m,{count:12}):e.jsxs(e.Fragment,{children:[o.map(l=>e.jsx(x,{item:l},l.id)),c?e.jsx(m,{count:6}):null]})}),e.jsx(b,{hasNextPage:u,isFetching:c,onLoadMore:()=>d()}),!t&&!n&&o.length===0?e.jsx("p",{className:"muted",children:"This creator has no items to show yet."}):null]})}export{E as Creator,E as default};
|
|
@@ -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-BcBo86qj.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-gKTQuTml.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,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RealCheckout-WGIqivb-.js","assets/react-E8ng6RF2.js","assets/index-DDfYFIH_.js","assets/ethers-DbXGgxrh.js","assets/index-pYCoYNtI.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{O as P,j as y,P as O,c as V,m as F,t as _,v,w as S,C as u,g as N,I as $,_ as Y}from"./index-DDfYFIH_.js";import{b as z,r as l,j as e}from"./react-E8ng6RF2.js";import{C}from"./CircularProgress-lGz3QJzY.js";import"./ethers-DbXGgxrh.js";import"./generateUtilityClasses-BZqFSfTv.js";function R(){return y.shopServerUrl||y.creditsServerUrl}async function K(s,t){const r=await P(`${R()}/credits/checkout`,{method:"POST",identity:t,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:s})});if(!r.ok)throw new Error(`checkout ${r.status}: ${await r.text()}`);const{orderId:a,clientSecret:n}=await r.json();return{orderId:a,clientSecret:n,mock:!1}}async function L(s,t,r={}){const{intervalMs:a=1500,timeoutMs:n=6e4,signal:i}=r,c=Date.now()+n;for(;;){if(i!=null&&i.aborted)throw new DOMException("Aborted","AbortError");const m=await q(s,t,i);if(m.status!=="processing")return m;if(Date.now()>c)return{status:"failed",error:"Timed out waiting for your credits."};await J(a,i)}}async function q(s,t,r){const a=await P(`${R()}/credits/orders/${s}`,{method:"GET",identity:t,metadata:{},signal:r});if(!a.ok)throw new Error(`order status ${a.status}`);return a.json()}function J(s,t){return new Promise((r,a)=>{const n=setTimeout(r,s);t==null||t.addEventListener("abort",()=>{clearTimeout(n),a(new DOMException("Aborted","AbortError"))})})}const Q=.1,G=[{id:"pack_5",usd:5,credits:f(5)},{id:"pack_10",usd:10,credits:f(10)},{id:"pack_25",usd:25,credits:f(25),bestValue:!0},{id:"pack_50",usd:50,credits:f(50)}];function f(s){return Math.round(s/Q)}function T(s){return G.find(t=>t.id===s)}const x="mock_cs_";function M(){return!y.stripePublishableKey||!y.shopServerUrl}async function W(s,t){const r=T(s);if(!r)throw new Error("Unknown pack");if(M())return H(r);if(!(t!=null&&t.identity))throw new Error("Sign in to get credits.");return K(s,t.identity)}async function X(s,t={}){const{intervalMs:r,timeoutMs:a,signal:n,identity:i}=t;if(s.startsWith(x)||M())return Z(s,t);if(!i)throw new Error("Sign in to get credits.");return L(s,i,{intervalMs:r,timeoutMs:a,signal:n})}function H(s){const t=`${x}${s.id}_${Date.now()}`;return I(400).then(()=>({orderId:t,clientSecret:`${x}${s.id}`,mock:!0}))}async function Z(s,t={}){await I(t.intervalMs??900);const r=s.replace(x,"").replace(/_\d+$/,""),a=T(r),n=(a==null?void 0:a.credits)??0;if(t.address&&a)try{const i=await O(t.address,Math.round(a.usd*100));return{status:"credited",creditsGranted:n,newBalance:i.credits}}catch(i){return{status:"failed",error:i.message}}return{status:"credited",creditsGranted:n,newBalance:n}}function I(s,t){return new Promise((r,a)=>{setTimeout(r,s)})}const b=y.shopServerUrl?"stripe":"mock",ee=l.lazy(()=>Y(()=>import("./RealCheckout-WGIqivb-.js"),__vite__mapDeps([0,1,2,3,4])));function E(s){const t=s;if((t==null?void 0:t.name)==="AbortError")return"You cancelled the request.";const r=((t==null?void 0:t.message)??"").toLowerCase();return r.includes("sign in")?`Sign in to get ${u.name}.`:r.includes("timed out")?`This is taking longer than usual — your ${u.name} will appear shortly.`:"Couldn't complete your purchase — please try again."}function de(){const s=z(),{session:t,signIn:r}=V(),a=F(),[n,i]=l.useState("select"),[c,m]=l.useState(null),[p,k]=l.useState(null),[D,w]=l.useState(null),[A,h]=l.useState(null),j=l.useRef(null);l.useEffect(()=>()=>{var o;return(o=j.current)==null?void 0:o.abort()},[]);const B=l.useCallback(async o=>{if(!t){r();return}h(null),m(o),i("paying"),_("Shop Started Buy Credits",{pack_usd:o.usd,credits:o.credits,provider:b});try{const d=await W(o.id,{address:t.address,identity:t.identity});k(d)}catch(d){v(d,{flow:"get_credits",step:"checkout",provider:b}),_("Shop Buy Credits Failed",{step:"checkout",error_code:S(d),pack_usd:o.usd}),h(E(d)),i("error")}},[t,r]),U=l.useCallback(async()=>{if(!p)return;i("processing");const o=new AbortController;j.current=o;try{const d=await X(p.orderId,{signal:o.signal,address:t==null?void 0:t.address,identity:t==null?void 0:t.identity});d.status==="credited"?(w(d.creditsGranted??(c==null?void 0:c.credits)??0),i("success"),_("Shop Completed Buy Credits",{order_id:p.orderId,pack_usd:(c==null?void 0:c.usd)??null,credits:d.creditsGranted??(c==null?void 0:c.credits)??0,provider:b}),a.invalidateQueries({queryKey:["usd-balance"]})):(_("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),h(d.error??`Couldn't add your ${u.name} — please try again.`),i("error"))}catch(d){v(d,{flow:"get_credits",step:"grant",order_id:p.orderId}),_("Shop Buy Credits Failed",{step:"grant",error_code:S(d),pack_usd:(c==null?void 0:c.usd)??null}),h(E(d)),i("error")}},[p,c,t,a]);function g(){var o;(o=j.current)==null||o.abort(),i("select"),m(null),k(null),w(null),h(null)}return e.jsxs("div",{className:"getcredits",children:[e.jsxs("header",{className:"getcredits__head",children:[e.jsxs("h1",{className:"getcredits__title",children:["Get ",u.name]}),e.jsxs("p",{className:"muted",children:["Add ",u.name," to your account to shop. Pay with any card."]})]}),n==="select"&&e.jsx(te,{onSelect:B}),n==="paying"&&c&&e.jsx(se,{pack:c,checkout:p,onPaid:U,onCancel:g}),n==="processing"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(C,{size:40}),e.jsxs("p",{className:"getcredits__status-title",children:["Adding your ",u.name,"…"]}),e.jsx("p",{className:"muted",children:"Payment received. Just a moment while we top up your balance."})]}),n==="success"&&e.jsxs("div",{className:"getcredits__status getcredits__status--ok",role:"status","aria-live":"polite",children:[e.jsx("div",{className:"getcredits__confetti","aria-hidden":!0,children:"🎉"}),e.jsx("p",{className:"getcredits__status-title",children:"You’re all set!"}),e.jsxs("p",{className:"muted",children:[e.jsxs("strong",{children:[e.jsx(N,{className:"ccy-mark"})," ",D]})," ",u.name," added to your account."]}),e.jsxs("div",{className:"getcredits__status-actions",children:[e.jsx("button",{className:"btn",onClick:()=>s("/cart"),children:"Back to cart"}),e.jsxs("button",{className:"btn btn--ghost",onClick:g,children:["Get more ",u.name]})]})]}),n==="error"&&e.jsxs("div",{className:"getcredits__status getcredits__status--err",role:"alert",children:[e.jsx("p",{className:"getcredits__status-title",children:"Something went wrong"}),e.jsx("p",{className:"error",children:A}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn",onClick:g,children:"Try again"})})]})]})}function te({onSelect:s}){return e.jsx("div",{className:"packs",children:G.map(t=>e.jsxs("button",{type:"button",className:`pack${t.bestValue?" pack--best":""}`,onClick:()=>s(t),"aria-label":`Get ${$(t.credits)} for $${t.usd}`,children:[t.bestValue&&e.jsx("span",{className:"pack__ribbon",children:"Best value"}),e.jsxs("span",{className:"pack__credits",children:[e.jsx(N,{className:"pack__credits-ico"}),t.credits]}),e.jsx("span",{className:"pack__label",children:u.name}),e.jsxs("span",{className:"pack__price",children:["$",t.usd]}),e.jsxs("span",{className:"pack__cta",children:["Get ",u.name]})]},t.id))})}function se({pack:s,checkout:t,onPaid:r,onCancel:a}){return e.jsxs("div",{className:"pay",children:[e.jsxs("div",{className:"pay__summary",children:[e.jsx("button",{className:"link",onClick:a,children:"← Choose a different pack"}),e.jsxs("div",{className:"pay__summary-row",children:[e.jsx("span",{children:"You’ll get"}),e.jsxs("strong",{children:[e.jsx(N,{className:"ccy-mark"})," ",$(s.credits)]})]}),e.jsxs("div",{className:"pay__summary-row pay__summary-row--total",children:[e.jsx("span",{children:"You pay"}),e.jsxs("strong",{children:["$",s.usd]})]})]}),e.jsx("div",{className:"pay__form",children:t?t.mock?e.jsx(re,{onPaid:r,amountUsd:s.usd}):e.jsx(l.Suspense,{fallback:e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(C,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]}),children:e.jsx(ee,{clientSecret:t.clientSecret,onComplete:r})}):e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(C,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]})})]})}function re({onPaid:s,amountUsd:t}){const[r,a]=l.useState("4242 4242 4242 4242"),[n,i]=l.useState(!1);function c(){i(!0),setTimeout(()=>s(),700)}return e.jsxs("div",{className:"card-form","aria-label":"Payment details",children:[e.jsx("p",{className:"muted small card-form__note",children:"Demo mode — no real charge is made."}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Card number"}),e.jsx("input",{value:r,onChange:m=>a(m.target.value),disabled:n,inputMode:"numeric"})]}),e.jsxs("div",{className:"card-form__row",children:[e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Expiry"}),e.jsx("input",{defaultValue:"12 / 34",disabled:n})]}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"CVC"}),e.jsx("input",{defaultValue:"123",disabled:n,inputMode:"numeric"})]})]}),e.jsx("button",{className:"btn btn--purple card-form__pay",onClick:c,disabled:n,children:n?"Processing…":`Pay $${t}`})]})}export{de as GetCredits,de 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-lxqXQ6kn.js";import{d as g,r as v}from"./index-gKTQuTml.js";import{C as c}from"./ConstantsUtil-D9t4gp4-.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-BcBo86qj.js";import{au as y}from"./NetworkUtil-CSluj-ND.js";const b=g`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as E,r as d,j as e,L as M}from"./react-E8ng6RF2.js";import{t as Q,v as A,C,g as v,c as K,m as F,e as P,G as R}from"./index-DDfYFIH_.js";import{i as Y,f as W}from"./import-Dkeo-TN0.js";import{s as G}from"./wallet-kind-DWVcMRCP.js";import"./ethers-DbXGgxrh.js";import"./buy-BhUIEcOv.js";import"./index-B7BzjWLu.js";import"./mana-rate-BmNr7NQv.js";function O({queue:n,session:k,onClose:j,onDone:u}){const N=E(),l=G(k.providerType),[c,f]=d.useState(()=>n.map(()=>"pending")),[y,w]=d.useState("running"),I=d.useRef(!1);d.useEffect(()=>{if(I.current)return;I.current=!0;let a=!1;return(async()=>{for(let i=0;i<n.length;i++){if(a)return;f(m=>m.map((p,h)=>h===i?"active":p));try{await Y(n[i].item,n[i].priceCredits,k),Q("Shop Migrated Listing",{item_id:n[i].item.itemId??n[i].item.oldTradeId??null,contract_address:n[i].item.contractAddress,new_price_credits:n[i].priceCredits,new_price_usd:n[i].priceCredits/10}),a||f(m=>m.map((p,h)=>h===i?"done":p))}catch(m){const p=m,h=p.code===4001||/reject|denied|cancel/i.test(p.message??"");h||A(m,{flow:"import_listing",itemId:n[i].item.itemId??n[i].item.oldTradeId}),a||f(S=>S.map((T,t)=>t===i?h?"skipped":"failed":T))}}a||w("finished")})(),()=>{a=!0}},[]);const o=c.filter(a=>a==="done").length,g=c.findIndex(a=>a==="active"),_=Math.round(c.filter(a=>a!=="pending"&&a!=="active").length/n.length*100);function x(){u(),j()}if(y==="finished"){const a=c.filter(i=>i==="skipped"||i==="failed").length;return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal modal--success",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:o>0?"You're in the Shop! 🎉":"Nothing listed"}),e.jsxs("p",{className:"muted",style:{margin:0},children:[o>0?`${o} ${o===1?"item is":"items are"} now for sale with ${C.name}.`:"No items were listed.",a>0?` ${a} skipped — you can try those again anytime.`:""]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:x,children:"Done"}),o>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{u(),j(),N("/assets")},children:"View in Shop"}):null]})]})})}return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal migrate",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx("h2",{className:"modal__title",children:"Listing your items"}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[l?"Confirm each item to add it to the Shop.":"Adding your items to the Shop."," ",g>=0?`${g+1} of ${n.length}`:""]}),e.jsx("div",{className:"migrate__progress",children:e.jsx("div",{className:"migrate__bar",style:{width:`${_}%`}})}),e.jsx("ul",{className:"migrate__list",children:n.map((a,i)=>e.jsxs("li",{className:`migrate__row migrate__row--${c[i]}`,children:[e.jsx("span",{className:"migrate__thumb",children:a.item.thumbnail?e.jsx("img",{src:a.item.thumbnail,alt:""}):null}),e.jsx("span",{className:"migrate__name",title:a.item.name,children:a.item.name||"Item"}),e.jsxs("span",{className:"migrate__price",children:[e.jsx(v,{className:"ccy-mark"})," ",a.priceCredits.toLocaleString()]}),e.jsx("span",{className:"migrate__status",children:c[i]==="active"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner migrate__spin","aria-hidden":!0})," ",l?"Confirm…":"Adding…"]}):c[i]==="done"?e.jsx("span",{className:"migrate__tick",children:"✓"}):c[i]==="skipped"?e.jsx("span",{className:"migrate__skip",children:"Skipped"}):c[i]==="failed"?e.jsx("span",{className:"migrate__skip",children:"Failed"}):e.jsx("span",{className:"migrate__wait",children:"Waiting"})})]},a.item.oldTradeId))}),e.jsx("p",{className:"muted small migrate__hint",children:l?"A quick confirmation pops up for each item. Keep this open.":"This only takes a moment — keep this open."})]})})}const B=[{key:"creations",title:"Your creations",sub:"Items you made. Put them on sale in the Shop."},{key:"owned",title:"Items you own",sub:"Things you've bought elsewhere — resell them in the Shop."}];function q(){const{session:n,signIn:k,restore:j}=K(),u=F(),N=n==null?void 0:n.address;d.useEffect(()=>{j()},[j]);const{data:l,isLoading:c}=P({queryKey:["importable",N],queryFn:()=>W(N),enabled:!!N}),[f,y]=d.useState({}),[w,I]=d.useState(new Set),[o,g]=d.useState(null),_=d.useMemo(()=>[...(l==null?void 0:l.creations)??[],...(l==null?void 0:l.owned)??[]],[l]);d.useEffect(()=>{_.length&&y(t=>{const r={...t};for(const s of _)r[s.oldTradeId]==null&&(r[s.oldTradeId]=s.suggestedCredits);return r})},[_]);const x=t=>!w.has(t),a=t=>f[t.oldTradeId]??t.suggestedCredits,i=_.filter(t=>x(t.oldTradeId)),m=i.reduce((t,r)=>t+a(r),0);function p(t,r){const s=r.replace(/[^\d]/g,"");y(b=>({...b,[t]:s===""?0:parseInt(s,10)}))}function h(t){I(r=>{const s=new Set(r);return s.has(t)?s.delete(t):s.add(t),s})}function S(t){return t.map(r=>({item:r,priceCredits:Math.max(1,a(r))}))}function T(){u.invalidateQueries({queryKey:["importable"]}),u.invalidateQueries({queryKey:["listings"]}),u.invalidateQueries({queryKey:["my-assets"]}),u.invalidateQueries({queryKey:["collection-sale-state"]}),R.success("Your Shop is updated.")}return n?!c&&_.length===0?e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"✨"}),e.jsx("h1",{className:"imp-empty__title",children:"You're all caught up"}),e.jsx("p",{className:"muted",children:"Everything you sell is already in the Shop — nothing to import."}),e.jsx(M,{className:"btn btn--purple",to:"/my-assets",children:"Go to My Assets"})]}):e.jsxs("div",{className:"imp",children:[e.jsxs("header",{className:"imp__head",children:[e.jsx("span",{className:"imp__eyebrow",children:"Import to the Shop"}),e.jsxs("h1",{className:"imp__title",children:["Bring your listings ",e.jsx("span",{className:"imp__grad",children:"into the Shop"})]}),e.jsxs("p",{className:"imp__lede",children:["These items are already for sale elsewhere. We suggested a price in ",C.name," for each — matched to today's rate and rounded up. Adjust anything, then list them."]})]}),e.jsxs("div",{className:"imp__ratebar",children:[e.jsx(v,{className:"ccy-mark imp__diamond"})," 1 ",C.nameSingular," = $0.10 · prices rounded up"]}),c?e.jsx("div",{className:"imp__list",children:Array.from({length:4}).map((t,r)=>e.jsx("div",{className:"imp-row imp-row--skeleton"},r))}):B.map(t=>{const r=(l==null?void 0:l[t.key])??[];return r.length===0?null:e.jsxs("section",{className:"imp__section",children:[e.jsxs("div",{className:"imp__section-head",children:[e.jsx("h2",{className:"imp__section-title",children:t.title}),e.jsx("span",{className:"imp__section-sub",children:t.sub})]}),e.jsx("div",{className:"imp__list",children:r.map(s=>{const b=a(s),L=b!==s.suggestedCredits;return e.jsxs("article",{className:`imp-row${x(s.oldTradeId)?"":" is-off"}`,children:[e.jsx("input",{type:"checkbox",className:"imp-check",checked:x(s.oldTradeId),onChange:()=>h(s.oldTradeId),"aria-label":`Include ${s.name}`}),e.jsx("div",{className:"imp-thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{className:"imp-meta",children:[e.jsx("div",{className:"imp-name",title:s.name,children:s.name||"Item"}),e.jsx("span",{className:"imp-chip",children:s.rarity})]}),e.jsxs("div",{className:"imp-price",children:[e.jsxs("div",{className:"imp-price__field",children:[e.jsx(v,{className:"ccy-mark imp-price__diamond"}),e.jsx("input",{className:"imp-price__input",inputMode:"numeric",value:b.toLocaleString(),onChange:$=>p(s.oldTradeId,$.target.value),"aria-label":`Price in ${C.name} for ${s.name}`})]}),e.jsxs("div",{className:"imp-price__sub",children:[e.jsxs("span",{children:["$",(b*.1).toFixed(2)]}),L?e.jsxs("button",{className:"imp-price__reset",onClick:()=>y($=>({...$,[s.oldTradeId]:s.suggestedCredits})),children:["Reset to ",e.jsx(v,{className:"ccy-mark"}),s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx("div",{className:"imp-action",children:e.jsx("button",{className:"btn btn--sm imp-row__list",disabled:!x(s.oldTradeId),onClick:()=>g(S([s])),children:"List"})})]},s.oldTradeId)})})]},t.key)}),e.jsx("div",{className:"imp-dock",children:e.jsxs("div",{className:"imp-dock__inner",children:[e.jsxs("div",{className:"imp-dock__summary",children:[e.jsxs("div",{className:"imp-dock__total",children:[e.jsx(v,{className:"ccy-mark imp__diamond"})," ",m.toLocaleString()]}),e.jsxs("div",{className:"imp-dock__sub",children:[i.length," item",i.length===1?"":"s"," selected · $",(m*.1).toFixed(2)]})]}),e.jsx("span",{className:"imp-dock__spacer"}),e.jsxs("button",{className:"btn btn--purple imp-dock__cta",disabled:i.length===0,onClick:()=>g(S(i)),children:["List all (",i.length,")"]})]})}),o&&n?e.jsx(O,{queue:o,session:n,onClose:()=>g(null),onDone:T}):null]}):e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"📦"}),e.jsx("h1",{className:"imp-empty__title",children:"Import your listings"}),e.jsx("p",{className:"muted",children:"Sign in to bring the items you already sell into the Shop."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>k(),children:"Sign in"})]})}export{q as ImportListings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.item-detail{max-width:1721px;margin:0 auto}.item-detail__crumbs{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-bottom:22px}.item-detail__crumb-link{background:none;border:0;padding:0;font:inherit;color:var(--muted)}.item-detail__crumb-link:hover{color:var(--text)}.item-detail__crumb-sep{color:var(--muted-2)}.item-detail__crumb-current{color:var(--text);font-weight:600}.item-detail__main{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(320px,522px);gap:40px;align-items:start}@media(max-width:900px){.item-detail__main{grid-template-columns:1fr}}.item-detail__preview{position:relative;height:min(752px,70vh);border-radius:var(--radius-card);overflow:hidden;background:var(--media)}.item-detail__preview iframe,.item-detail__preview>*{width:100%;height:100%;border:0;display:block}.item-detail__info{display:flex;flex-direction:column;gap:14px}.item-detail__info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.item-detail__title{font-size:clamp(24px,2.4vw,34px);font-weight:700;line-height:1.15;color:var(--text)}.item-detail__fav{flex:none;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:#fff;display:grid;place-items:center;color:var(--text)}.item-detail__fav{cursor:pointer;transition:color .12s ease,border-color .12s ease}.item-detail__fav.is-on{color:var(--dcl-red);border-color:var(--dcl-red)}.item-detail__fav .ico-heart{width:18px;height:18px}.item-detail__creator{color:var(--muted);font-size:14px;margin-top:-6px}.item-detail__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.item-detail__card{margin-top:8px;border:1px solid var(--line);border-radius:var(--radius-card);padding:20px;display:flex;flex-direction:column;gap:16px;background:#fff}.item-detail__price-block{display:flex;flex-direction:column;gap:6px}.item-detail__price-label{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}.item-detail__price{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--text-2)}.item-detail__diamond{width:28px;height:28px;color:var(--text-2)}.item-detail__price-value{font-size:34px;line-height:1}.item-detail__price--none{font-size:18px;color:var(--muted)}.item-detail__price--sale{flex-wrap:wrap;gap:10px 14px}.item-detail__price--sale .item-detail__price,.item-detail__price--sale .item-detail__price-value,.item-detail__price--sale .item-detail__diamond{color:var(--dcl-red)}.item-detail__price-was{display:inline-flex;align-items:center;gap:6px;color:var(--muted);text-decoration:line-through;font-weight:600;font-size:20px}.item-detail__diamond--was{width:18px;height:18px;color:var(--muted)}.item-detail__sale-badge{display:inline-flex;align-items:center;background:var(--dcl-red);color:#fff;font-weight:800;font-size:13px;letter-spacing:.03em;text-transform:uppercase;border-radius:6px;padding:4px 10px}.item-detail__countdown{display:inline-flex;align-items:center;gap:5px;background:var(--rarity-bg);color:var(--accent);font-size:13px;font-weight:700;border-radius:6px;padding:4px 10px;white-space:nowrap}.item-detail__countdown .sale-countdown__ico{width:14px;height:14px}.item-detail__balance{font-size:13px}.item-detail__ctas{display:flex;flex-direction:column;gap:12px}.item-detail__cta{width:100%;height:44px;text-align:center}.item-detail__addcart{width:100%;height:44px;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--black-btn);color:var(--soft-white);border:0;border-radius:var(--radius-btn);font-weight:600;font-size:13px;text-transform:uppercase;letter-spacing:.046em}.item-detail__addcart:disabled{opacity:.55;cursor:default}.item-detail__addcart-ico{width:20px;height:20px}.item-detail__status{margin:0;font-size:13px}.collection-carousel{margin-top:56px}.collection-carousel__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.collection-carousel__title{font-size:20px;font-weight:600;color:var(--text)}.collection-carousel__head-right{display:flex;align-items:center;gap:16px}.collection-carousel__viewall{background:none;border:0;padding:0;color:var(--accent);font-weight:600;font-size:13px;cursor:pointer;white-space:nowrap}.collection-carousel__viewall:hover{text-decoration:underline}.collection-carousel__arrows{display:flex;gap:10px}.collection-carousel__arrow{width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:var(--text);font-size:22px;line-height:1;display:grid;place-items:center;box-shadow:0 6px 16px #16151829;transition:transform .12s ease,box-shadow .12s ease}.collection-carousel__arrow:hover{transform:scale(1.06);box-shadow:0 8px 20px #16151833}@media(prefers-reduced-motion:reduce){.collection-carousel__arrow{transition:none}}.collection-carousel__track{display:flex;gap:16px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}.collection-carousel__card{flex:0 0 220px;scroll-snap-align:start;text-align:left;background:#fff;border:1px solid var(--line);border-radius:var(--radius-card);overflow:hidden;padding:0;display:flex;flex-direction:column;transition:box-shadow .15s ease,transform .15s ease}.collection-carousel__card:hover{transform:translateY(-2px);box-shadow:0 0 0 2px var(--brand-violet),0 10px 30px #a524b347}.collection-carousel__card.is-active{box-shadow:0 0 0 2px var(--accent)}.collection-carousel__media{position:relative;aspect-ratio:1 / 1;background:var(--media)}.collection-carousel__img{width:100%;height:100%;object-fit:contain;display:block}.collection-carousel__body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:8px}.collection-carousel__name{font-weight:600;font-size:14px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.collection-carousel__meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.collection-carousel__price{display:flex;align-items:center;gap:5px;font-weight:600;font-size:15px;color:var(--text-2)}.collection-carousel__diamond{width:14px;height:14px;color:var(--text-2)}.collection-carousel__chips{display:flex;align-items:center;gap:6px}.collection-carousel__na{color:var(--muted);font-weight:600;font-size:13px}.collection-carousel__card{cursor:pointer}.collection-carousel__card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.collection-carousel__add{position:absolute;bottom:10px;right:10px;z-index:2;width:34px;height:34px;border-radius:50%;border:0;background:var(--accent);color:#fff;display:grid;place-items:center;box-shadow:0 4px 12px #691fa959;transition:transform .12s ease,background .15s ease}.collection-carousel__add:hover{transform:scale(1.08)}.collection-carousel__add:disabled{background:var(--muted-2);cursor:default;box-shadow:none}.collection-carousel__add .ico{width:18px;height:18px}.item-detail--notfound{min-height:46vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}.item-detail__notfound-ico{width:44px;height:44px;opacity:.4}.item-detail__notfound-title{font-size:22px}.item-detail--notfound .btn{margin-top:6px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as o,a as ue,d as me,b as he}from"./react-E8ng6RF2.js";import{c as O,R as _e,W as fe,z as S,j as H,k as R,g as E,G as pe,u as Y,l as xe,e as q,t as M,S as ve,T as je,U as Ne,a as be,V as z,X as Ie,i as ye,y as ge,q as Ce,r as we,s as D,v as Ae,x as ke,n as Ee,w as Se,C as Te,b as Re,Y as Pe,o as $e}from"./index-DDfYFIH_.js";import{h as K}from"./buy-BhUIEcOv.js";import{g as Fe,a as Be,w as Le,G as qe}from"./buy-gasless-Sp2nbDeH.js";import"./ethers-DbXGgxrh.js";import"./index-B7BzjWLu.js";function Me({item:i}){const c=O(j=>{var N;return(N=j.session)==null?void 0:N.address}),{data:r}=_e(c),u=c&&r?c:"default",m=i.category==="emote";return e.jsx(fe,{id:"shop-item-preview",contractAddress:i.contractAddress,tokenId:i.tokenId??void 0,itemId:i.tokenId?void 0:i.itemId??void 0,profile:u,type:m?void 0:S.PreviewType.AVATAR,emote:m?void 0:S.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:m?1.5:void 0,wheelStart:m?100:void 0,dev:H.chainId===80002,disableFadeEffect:!0},i.id)}function Ue(i){return i==="male"?"♂":i==="female"?"♀":i==="unisex"?"⚥":""}function Ge({title:i,items:c,activeId:r,onSelect:u,onViewAll:m}){const j=o.useRef(null),N=R(a=>a.add),h=R(a=>a.items.map(l=>l.id));if(c.length===0)return null;function y(a){N(a,"carousel"),pe.success(`“${a.name}” added to your cart.`)}function s(a){const l=j.current;l&&l.scrollBy({left:a*Math.round(l.clientWidth*.8),behavior:"smooth"})}return e.jsxs("section",{className:"collection-carousel",children:[e.jsxs("div",{className:"collection-carousel__head",children:[e.jsx("h2",{className:"collection-carousel__title",children:i}),e.jsxs("div",{className:"collection-carousel__head-right",children:[m?e.jsx("button",{className:"collection-carousel__viewall",onClick:m,children:"View all"}):null,e.jsxs("div",{className:"collection-carousel__arrows",children:[e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>s(-1),"aria-label":"Scroll left",children:"‹"}),e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>s(1),"aria-label":"Scroll right",children:"›"})]})]})]}),e.jsx("div",{className:"collection-carousel__track",ref:j,children:c.map(a=>{const l=Ue(a.gender),g=a.id===r,C=a.priceCredits>0,_=h.includes(a.id);return e.jsxs("article",{className:`collection-carousel__card${g?" is-active":""}`,onClick:()=>u(a),role:"button",tabIndex:0,"aria-current":g||void 0,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),u(a))},children:[e.jsxs("div",{className:"collection-carousel__media",children:[a.thumbnail?e.jsx("img",{className:"collection-carousel__img",src:a.thumbnail,alt:a.name,loading:"lazy"}):null,C?e.jsx("button",{className:"collection-carousel__add",disabled:_,"aria-label":_?"In cart":`Add ${a.name} to cart`,title:_?"In cart":"Add to cart",onClick:x=>{x.stopPropagation(),_||y(a)},children:e.jsx("span",{className:`ico ${_?"ico-cart-solid":"ico-cart"}`,"aria-hidden":!0})}):null]}),e.jsxs("div",{className:"collection-carousel__body",children:[e.jsx("div",{className:"collection-carousel__name",title:a.name,children:a.name}),e.jsxs("div",{className:"collection-carousel__meta",children:[C?e.jsxs("span",{className:"collection-carousel__price",children:[e.jsx(E,{className:"collection-carousel__diamond"}),a.priceCredits]}):e.jsx("span",{className:"collection-carousel__price collection-carousel__na",children:"Not listed"}),e.jsxs("span",{className:"collection-carousel__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:a.rarity}),l?e.jsx("span",{className:"chip chip--icon",children:l}):null]})]})]})]},a.id)})})]})}function Ve(i){return Object.values(S.Rarity).includes(i)}function We(i){return i==="male"?"Male":i==="female"?"Female":i==="unisex"?"Unisex":null}function Ye(i){const c=i,r=(c.message??"").toLowerCase();return c.code===4001||r.includes("reject")||r.includes("denied")||r.includes("cancel")?"You cancelled the request.":r.includes("insufficient")?`You don't have enough ${Te.name} — get more first.`:r.includes("no active listing")||r.includes("not for sale")?"This item is not for sale right now.":"Couldn't complete checkout — please try again."}function Xe(){const{contractAddress:i,tokenId:c}=ue(),{state:r}=me(),u=he(),m=R(t=>t.add),j=R(t=>t.items),N=Y(t=>t.toggle),{session:h}=O(),{data:y}=xe(h),[s,a]=o.useState(()=>r!=null&&r.item?{...r.item,tradeId:r.tradeId??r.item.tradeId}:{id:`${i}-${c}`,name:"",creator:"",contractAddress:i??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:H.chainId,thumbnail:"",priceCredits:0,gender:null,tokenId:c??void 0,tradeId:r==null?void 0:r.tradeId}),[l,g]=o.useState(!1),[C,_]=o.useState(null),[x,T]=o.useState(null),{data:b=[],isFetched:Q}=q({queryKey:["collection-items",s.contractAddress],enabled:!!s.contractAddress,queryFn:()=>Re(s.contractAddress,{first:20}).then(t=>t.items)}),{data:P,isLoading:X}=q({queryKey:["shop-item",s.contractAddress,c],enabled:!(r!=null&&r.item)&&!!s.contractAddress&&!!c,queryFn:()=>Pe(s.contractAddress,c)});o.useEffect(()=>{P&&a(t=>t.tradeId?t:{...P})},[P]),o.useEffect(()=>{if(s.name||b.length===0)return;const t=c&&b.find(n=>n.tokenId===c||n.itemId===c)||b.find(n=>n.contractAddress===s.contractAddress);t&&a(n=>({...t,tradeId:n.tradeId??t.tradeId}))},[b]);const Z=o.useMemo(()=>{const t=new Set,n=[];for(const d of b){if(d.id===s.id||s.itemId&&d.itemId===s.itemId||s.tokenId&&d.tokenId===s.tokenId)continue;const k=`${d.contractAddress}-${d.itemId??d.tokenId??d.id}`;t.has(k)||(t.add(k),n.push(d))}return n},[b,s.id,s.itemId,s.tokenId]),{data:J,isLoading:w}=q({queryKey:["detail-trade",s.id,s.tradeId,s.contractAddress,s.itemId],enabled:!!s.contractAddress,queryFn:async()=>{if(s.tradeId)return s.tradeId;if(s.itemId){const t=await $e(s.contractAddress,s.itemId);return(t==null?void 0:t.id)??null}return null}}),v=s.tradeId??J??void 0,f=!!v,A=o.useMemo(()=>({...s,tradeId:v,id:v??s.id}),[s,v]),$=j.some(t=>t.id===A.id),F=Y(t=>!!t.items[s.id]);o.useEffect(()=>{_(null),T(null)},[s.id]);const U=o.useRef(null);o.useEffect(()=>{!s.name||w||U.current===s.id||(U.current=s.id,M("Shop Viewed Item",{...ve(s),for_sale:f}),je(s))},[s.id,s.name,w,f]);function ee(t){a(t);const n=t.tokenId??t.itemId;t.contractAddress&&n&&u(`/item/${t.contractAddress}/${n}`,{replace:!0,state:{item:t}}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}function se(){!f||$||m(A,"item_detail")}async function te(){var k;if(!f||!v)return;if(!h){T("Sign in to check out.");return}T(null),g(!0);let t,n="authorize",d=!1;try{_(`Buying ${s.name||"item"}…`);const p=await ye(v);if(!p)throw new Error("not for sale");const B=(k=p.received)==null?void 0:k[0],de=ge(B==null?void 0:B.amount),{credit:V,maxCreditedValue:oe}=await Ce(h.identity,de,v);t=V.id,n="submit";const L={trade:p,buyer:h.address,signer:h.signer,credits:[V],maxCreditedValue:oe};let I;if(Fe())try{I=await Be(L),await Le(I),d=!0}catch(W){if(!(W instanceof qe))throw W;I=await K(L)}else I=await K(L);t=void 0,M("Shop Completed Purchase",{...we([A]),payment_type:"credits",no_crypto_step:d,transaction_hash:I??null}),u("/success",{state:{items:[A],txHash:I}})}catch(p){D(p)||Ae(p,{flow:"buy",step:n,gasless:d}),t&&ke(h.identity,[t]).catch(()=>{}),M(D(p)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:n,error_code:Se(p),value_usd:Ee(A.priceCredits)}),T(Ye(p)),_(null)}finally{g(!1)}}const ae=Ve(s.rarity)?s.rarity:S.Rarity.COMMON,[ie]=S.Rarity.getGradient(ae),G=We(s.gender),re=f&&Ne({priceCredits:s.priceCredits,compareAtCredits:s.compareAtCredits,saleEndsAt:s.saleEndsAt}),ce="More from this collection",ne=f?$?"In cart":w?"Checking…":"Add to cart":"Not for sale",le=X||!!s.contractAddress&&!Q;return!s.name&&!le?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx("span",{className:"ico ico-cart item-detail__notfound-ico","aria-hidden":!0}),e.jsx("h1",{className:"item-detail__notfound-title",children:"This item isn’t available"}),e.jsx("p",{className:"muted",children:"It may have been delisted or moved. Browse Collectibles for something else."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>u("/assets"),children:"Browse Collectibles"})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>u("/assets"),children:"Collectibles"}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:s.name||"Item"})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsx("div",{className:"item-detail__preview",style:{background:`radial-gradient(circle at 50% 38%, ${ie}33 0%, var(--media) 68%)`},children:e.jsx(Me,{item:s})}),e.jsxs("div",{className:"item-detail__info",children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:s.name||"Loading…"}),e.jsx("button",{className:`item-detail__fav${F?" is-on":""}`,onClick:()=>N(s),"aria-pressed":F,"aria-label":F?"Remove from favorites":"Add to favorites",children:e.jsx("span",{className:"ico ico-heart","aria-hidden":!0})})]}),s.creator?e.jsx(be,{address:s.creator,className:"item-detail__creator",linkToProfile:!0}):null,e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:s.rarity}),e.jsx("span",{className:"chip",children:s.category==="emote"?"Emote":"Wearable"}),G?e.jsx("span",{className:"chip",children:G}):null]}),e.jsxs("div",{className:"item-detail__card",children:[e.jsxs("div",{className:"item-detail__price-block",children:[e.jsx("div",{className:"item-detail__price-label",children:"Price"}),f?re?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(E,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:s.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(E,{className:"item-detail__diamond item-detail__diamond--was"}),s.compareAtCredits]}),z(s.compareAtCredits,s.priceCredits)>0?e.jsxs("span",{className:"item-detail__sale-badge",children:["SALE -",z(s.compareAtCredits,s.priceCredits),"%"]}):null,e.jsx(Ie,{endsAt:s.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(E,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:s.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:"Not for sale"}),h?e.jsxs("div",{className:"item-detail__balance muted",children:["Your balance: ",e.jsx(E,{className:"ccy-mark"})," ",(y==null?void 0:y.credits)??0]}):null]}),e.jsxs("div",{className:"item-detail__ctas",children:[f?e.jsx("button",{className:"btn btn--purple item-detail__cta",onClick:te,disabled:l||w,children:l?"Buying…":"Buy now"}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:se,disabled:!f||$||w||l,children:[e.jsx("span",{className:"ico ico-cart-solid item-detail__addcart-ico","aria-hidden":!0}),ne]})]}),C?e.jsx("p",{className:"muted item-detail__status",children:C}):null,x?e.jsx("p",{className:"error item-detail__status",children:x}):null]})]})]}),e.jsx(Ge,{title:ce,items:Z,activeId:s.id,onSelect:ee,onViewAll:s.contractAddress?()=>u(`/collection/${s.contractAddress}`):void 0})]})}export{Xe as ItemDetail,Xe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as te,r as c,j as e,u as ie}from"./react-E8ng6RF2.js";import{e as ne,j as G,c as le,l as ce,m as V,i as oe,q as de,x as S,t as M,w as H,s as Q,g as T,I as K,C as W,A as ue,J as me}from"./index-DDfYFIH_.js";import{r as he,a as B,m as pe}from"./mana-rate-BmNr7NQv.js";import{S as O}from"./SkeletonCards-yV2mi4oc.js";import{L as fe}from"./LoadMore-DB6TwvRe.js";import{h as Y}from"./buy-BhUIEcOv.js";import{g as _e,a as ye,w as be,G as ke}from"./buy-gasless-Sp2nbDeH.js";import{u as xe}from"./useInfiniteGrid-BljM6dNq.js";import"./ethers-DbXGgxrh.js";import"./index-B7BzjWLu.js";function ge(){return ne({queryKey:["mana-rate",G.chainId],queryFn:()=>he(G.chainId),staleTime:6e4,refetchInterval:6e4,retry:1})}function z(s){const u=s,o=(u.message??"").toLowerCase();return u.code===4001||o.includes("reject")||o.includes("denied")||o.includes("cancel")?"You cancelled the request.":o.includes("insufficient")?`Not enough ${W.name} — get more first.`:o.includes("not found")||o.includes("no active listing")||o.includes("404")?"This item was just sold or removed. Refreshing the market…":"Couldn't complete checkout — please try again."}function je(s){return{id:s.tradeId,tradeId:s.tradeId,name:s.name,creator:s.creator,contractAddress:s.contractAddress,itemId:s.itemId,category:s.category,wearableCategory:s.wearableCategory??void 0,rarity:s.rarity,network:s.network,chainId:s.chainId,thumbnail:s.thumbnail,priceCredits:0,gender:null}}function ve({listing:s,rate:u,onClose:o,onSold:k}){const{session:i}=le(),{data:n}=ce(i),x=V(),m=te(),[N,y]=c.useState("confirm"),[w,h]=c.useState("Locking today’s price…"),[_,g]=c.useState(null),[r,$]=c.useState(null),p=c.useRef(null),E=Math.ceil(B(s.manaWei,u)/10);c.useEffect(()=>{let b=!1;if(!i){y("error"),g("Sign in to check out.");return}return(async()=>{try{const t=await oe(s.tradeId);if(!t)throw new Error("not found");const l=B(s.manaWei,u);if(!Number.isFinite(l)||l<=0)throw new Error("price unavailable");const{credit:d,maxCreditedValue:R,usdCents:P}=await de(i.identity,l,s.tradeId);if(b){S(i.identity,[d.id]).catch(()=>{});return}p.current=d.id,$({trade:t,credit:d,maxCreditedValue:R,usdCents:P,credits:Math.ceil(P/10)}),h("")}catch(t){if(b)return;console.error("[market] authorize failed",t),M(Q(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:H(t),value_usd:Math.round(B(s.manaWei,u))/100}),y("error"),g(z(t))}})(),()=>{b=!0,p.current&&i&&(S(i.identity,[p.current]).catch(()=>{}),p.current=null)}},[]);const j=!!r&&((n==null?void 0:n.credits)??0)<r.credits;async function L(){if(!i||!r)return;if(j){S(i.identity,[r.credit.id]).catch(()=>{}),p.current=null,m("/credits");return}y("working"),g(null);let b=!1;try{h("Confirming your purchase…");const t={trade:r.trade,buyer:i.address,signer:i.signer,credits:[r.credit],maxCreditedValue:r.maxCreditedValue};let l;if(_e())try{l=await ye(t),await be(l),b=!0}catch(d){if(!(d instanceof ke))throw d;l=await Y(t)}else l=await Y(t);p.current=null,M("Shop Completed Purchase",{items:[{item_id:s.itemId??null,contract_address:s.contractAddress,token_id:null,price_usd:r.usdCents/100}],value_credits:r.credits,value_usd:r.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:b,transaction_hash:l??null}),x.invalidateQueries({queryKey:["usd-balance"]}),m("/success",{state:{items:[je(s)],txHash:l}})}catch(t){console.error("[market] buy now failed",t),S(i.identity,[r.credit.id]).catch(()=>{}),p.current=null,M(Q(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:H(t),value_usd:r.usdCents/100}),x.invalidateQueries({queryKey:["usd-balance"]});const l=z(t);g(l),y("error"),/sold or removed/i.test(l)&&k()}}function C(){i&&r&&S(i.identity,[r.credit.id]).catch(()=>{}),p.current=null,o()}const v=N==="working";return e.jsxs("div",{className:"mkt-modal",role:"dialog","aria-modal":"true","aria-label":`Buy ${s.name}`,children:[e.jsx("div",{className:"mkt-modal__scrim",onClick:v?void 0:C,"aria-hidden":!0}),e.jsxs("div",{className:"mkt-modal__card",children:[e.jsxs("div",{className:"mkt-modal__head",children:[e.jsx("div",{className:"mkt-modal__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx("div",{className:"mkt-modal__name",title:s.name,children:s.name||"Item"}),e.jsx("span",{className:"chip chip--rarity",children:s.rarity})]})]}),e.jsx("div",{className:"mkt-modal__price",children:r?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Final price"}),e.jsxs("div",{className:"mkt-modal__price-value",children:[e.jsx(T,{className:"mkt-modal__diamond"}),K(r.credits)]}),e.jsxs("div",{className:"mkt-modal__price-sub muted",children:["Locked for this purchase · $",(r.usdCents/100).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Today’s price"}),e.jsxs("div",{className:"mkt-modal__price-value mkt-modal__price-value--approx",children:[e.jsx("span",{className:"mkt-modal__approx","aria-hidden":!0,children:"≈"}),e.jsx(T,{className:"mkt-modal__diamond"}),K(E)]}),e.jsx("div",{className:"mkt-modal__price-sub muted",children:w||"Locking today’s price…"})]})}),i?e.jsxs("div",{className:"mkt-modal__balance muted",children:["Your balance: ",e.jsx(T,{className:"ccy-mark"})," ",(n==null?void 0:n.credits)??0]}):null,j?e.jsxs("p",{className:"muted mkt-modal__note",children:["You’ll need a few more ",W.name," to buy this."]}):null,w&&N==="working"?e.jsx("p",{className:"muted mkt-modal__note",children:w}):null,_?e.jsx("p",{className:"error mkt-modal__note",children:_}):null,e.jsxs("div",{className:"mkt-modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:C,disabled:v,children:"Cancel"}),e.jsx("button",{className:"btn btn--purple",onClick:L,disabled:v||!r,children:v?"Buying…":j?`Get ${W.name}`:"Confirm purchase"})]})]})]})}const Ce=48,U=[{key:"wearable",label:"Wearables",sub:["Head","Upper Body","Handwear","Lower Body","Feet","Accessories","Skins"]},{key:"emote",label:"Emotes",sub:[]}],Ne={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"]},we=["common","uncommon","rare","epic","legendary","mythic","unique","exotic"],A=[{key:"newest",label:"Newest",server:"newest"},{key:"price-asc",label:"Price: Low to High",server:"cheapest"},{key:"price-desc",label:"Price: High to Low",server:"most_expensive"},{key:"name",label:"Name (A–Z)",server:"name"}];function Ie(s){return{id:s.tradeId,tradeId:s.tradeId,name:s.name,creator:s.creator,contractAddress:s.contractAddress,itemId:s.itemId,category:s.category,wearableCategory:s.wearableCategory??void 0,rarity:s.rarity,network:s.network,chainId:s.chainId,thumbnail:s.thumbnail,priceCredits:0,gender:null}}function Te(){const[s]=ie(),u=(s.get("q")??"").trim().toLowerCase(),o=V(),[k,i]=c.useState("wearable"),[n,x]=c.useState(null),[m,N]=c.useState([]),[y,w]=c.useState("newest"),[h,_]=c.useState(null),[g,r]=c.useState(null),$=n?Ne[n]:void 0,p=(A.find(a=>a.key===y)??A[0]).server,E={category:k,rarities:m.length?m:void 0,wearableCategories:$,search:u||void 0,sortBy:p},{items:j,total:L,isLoading:C,error:v,hasNextPage:b,isFetchingNextPage:t,fetchNextPage:l}=xe(["legacy-listings",E],a=>me({...E,first:Ce,skip:a})),{data:d,isError:R}=ge(),P=a=>d?pe(a.manaWei,d):null;function Z(a){i(a),x(null)}function J(a){N(f=>f.includes(a)?f.filter(q=>q!==a):[...f,a])}function D(){i("wearable"),x(null),N([]),_(null)}function F(a){_(f=>f===a?null:a)}function X(a){const f=j.find(q=>q.tradeId===a.tradeId);f&&r(f)}function ee(){o.invalidateQueries({queryKey:["legacy-listings"]})}const ae=A.find(a=>a.key===y)??A[0],I=U.find(a=>a.key===k)??U[0],se=n?`${I.label} · ${n}`:I.label,re=k!=="wearable"||!!n||m.length>0;return e.jsxs("div",{className:"browse",children:[e.jsxs("div",{className:"market-banner",children:[e.jsx("span",{className:"market-banner__ico","aria-hidden":!0,children:"✨"}),e.jsx("span",{children:"Prices here follow the live market and may shift slightly at checkout."})]}),R?e.jsx("p",{className:"market-banner market-banner--warn",children:"The market price is temporarily unavailable — buying is paused for a moment. Please try again shortly."}):null,h?e.jsx("div",{className:"filterbar__scrim",onClick:()=>_(null),"aria-hidden":!0}):null,e.jsxs("div",{className:"filterbar",children:[e.jsxs("div",{className:"filterbar__filters",children:[e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${h==="section"?" is-open":""}${n||k!=="wearable"?" is-active":""}`,onClick:()=>F("section"),children:[se," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),h==="section"?e.jsxs("div",{className:"filter-pop filter-pop--section",children:[e.jsx("ul",{className:"filter-pop__cats",children:U.map(a=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__cat${k===a.key?" is-active":""}`,onClick:()=>Z(a.key),children:a.label})},a.key))}),I.sub.length?e.jsxs("ul",{className:"filter-pop__subs",children:[e.jsx("li",{children:e.jsxs("button",{className:`filter-pop__sub${n?"":" is-active"}`,onClick:()=>{x(null),_(null)},children:["All ",I.label]})}),I.sub.map(a=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__sub${n===a?" is-active":""}`,onClick:()=>{x(f=>f===a?null:a),_(null)},children:a})},a))]}):null]}):null]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${h==="rarity"?" is-open":""}${m.length?" is-active":""}`,onClick:()=>F("rarity"),children:["Rarity ",m.length?e.jsx("span",{className:"filterbar__badge",children:m.length}):null," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),h==="rarity"?e.jsx("div",{className:"filter-pop filter-pop--rarity",children:we.map(a=>e.jsxs("label",{className:"filter-pop__check",children:[e.jsx("input",{type:"checkbox",checked:m.includes(a),onChange:()=>J(a)}),e.jsx("span",{children:a})]},a))}):null]}),re?e.jsx("button",{className:"filterbar__clear",onClick:D,children:"Clear all"}):null]}),e.jsxs("div",{className:"filterbar__right",children:[e.jsxs("span",{className:"filterbar__count",children:[C?"…":`${L.toLocaleString()} item${L===1?"":"s"}`,u?` for “${u}”`:""]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__sort${h==="sort"?" is-open":""}`,onClick:()=>F("sort"),children:["Sort by: ",ae.label," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),h==="sort"?e.jsx("div",{className:"filter-pop filter-pop--sort",children:A.map(a=>e.jsx("button",{className:`filter-pop__sort${a.key===y?" is-active":""}`,onClick:()=>{w(a.key),_(null)},children:a.label},a.key))}):null]})]})]}),v?e.jsx("p",{className:"error",children:v.message}):null,e.jsx("div",{className:"grid",children:C?e.jsx(O,{count:15}):e.jsxs(e.Fragment,{children:[j.map(a=>e.jsx(ue,{item:Ie(a),mode:"market",marketPriceCredits:P(a),onBuyNow:X},a.tradeId)),t?e.jsx(O,{count:6}):null]})}),e.jsx(fe,{hasNextPage:b,isFetching:t,onLoadMore:()=>l()}),!C&&j.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null,g&&d?e.jsx(ve,{listing:g,rate:d,onClose:()=>r(null),onSold:()=>{r(null),ee()}}):null]})}export{Te as Market,Te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as G,r as m,j as s,L as le}from"./react-E8ng6RF2.js";import{z as ee,j as B,O as ce,m as W,g as T,C,p as se,t as P,G as V,v as H,w as ne,c as oe,e as U,Z as de,i as me,$ as ue}from"./index-DDfYFIH_.js";import{f as he}from"./import-Dkeo-TN0.js";import{a as pe,b as ge,i as be,e as ye,c as xe,d as fe}from"./buy-BhUIEcOv.js";import{s as je}from"./wallet-kind-DWVcMRCP.js";import{L as _e}from"./LoadMore-DB6TwvRe.js";import{u as Ne}from"./useInfiniteGrid-BljM6dNq.js";import"./ethers-DbXGgxrh.js";import"./mana-rate-BmNr7NQv.js";import"./index-B7BzjWLu.js";const D=()=>`${B.builderServerUrl}/v1`;function ae(e){return Array.isArray(e)?e:"results"in e&&Array.isArray(e.results)?e.results:"data"in e&&Array.isArray(e.data)?e.data:[]}async function te(e,i){const a=await ce(e,{method:"GET",identity:i,metadata:{}});if(!a.ok)throw new Error(`builder-server ${a.status}: ${await a.text()}`);const o=await a.json();return o.data??o}function ve(e,i){const a=i-e;return a>0?a:0}function Ie(e){var i,a,o,l,c;return((a=(i=e.data)==null?void 0:i.wearable)==null?void 0:a.category)??((l=(o=e.data)==null?void 0:o.emote)==null?void 0:l.category)??((c=e.data)==null?void 0:c.category)??e.type??"wearable"}function z(e){return`${D()}/storage/contents/${e}`}function $(e,i){if(!e)return"";if(/^https?:\/\//.test(e))return e;const a=i==null?void 0:i[e];return a?z(a):/^(ba|Qm)/.test(e)?z(e):""}async function ke(e,i){try{const a=await fetch(`${D()}/items/${e}/${i}/contents`);if(!a.ok)return{};const o=await a.json();return o.data??o}catch{return{}}}async function we(e,i,a){const o=$(e.thumbnail,e.contents)||$("thumbnail.png",e.contents);if(o)return o;if(i&&a){const l=await ke(i,a);return $(e.thumbnail,l)||$("thumbnail.png",l)||$("image.png",l)}return""}async function Ce(e,i){const a=`${D()}/${e.toLowerCase()}/collections?is_published=true`,o=await te(a,i);return ae(o).filter(l=>l.is_published&&!!l.contract_address).map(l=>({id:l.id,name:l.name,contractAddress:l.contract_address.toLowerCase(),isPublished:l.is_published,isApproved:l.is_approved,minters:(l.minters??[]).map(c=>c.toLowerCase())}))}async function Se(e,i){const a=`${D()}/collections/${e.id}/items`,o=await te(a,i);return(await Promise.all(ae(o).map(async c=>{const I=c.rarity??"common",_=Number(c.total_supply??0)||0;let u=0;try{u=ee.Rarity.getMaxSupply(I)}catch{u=0}const N=(c.contract_address??e.contractAddress).toLowerCase(),p=c.blockchain_item_id??"";return{id:c.id,collectionId:e.id,collectionName:e.name,contractAddress:N,blockchainItemId:p,name:c.name,category:Ie(c),rarity:I,thumbnail:await we(c,N,p),type:c.type??"wearable",isPublished:c.is_published??e.isPublished,isApproved:c.is_approved??e.isApproved,totalSupply:_,maxSupply:u,remainingSupply:ve(_,u),minters:e.minters}}))).filter(Ae)}function Ae(e){return e.isPublished&&e.isApproved&&e.blockchainItemId!==""&&e.blockchainItemId!=null&&e.remainingSupply>0}async function Pe(e,i){const a=await Ce(e,i);return(await Promise.all(a.map(async l=>{try{return await Se(l,i)}catch{return[]}}))).flat()}const $e=1e3*60*60*24*182;function Le(e){const i=e,a=(i.message??"").toLowerCase();return i.code===4001||a.includes("reject")||a.includes("denied")||a.includes("cancel")?"You cancelled the request.":"Couldn't list your item — please try again."}function Ee({asset:e,session:i,onClose:a}){const o=W(),l=G(),[c,I]=m.useState("10"),[_,u]=m.useState(null),[N,p]=m.useState(null),[g,k]=m.useState(!1),[f,j]=m.useState(null);async function S(){p(null);const d=Number(c);if(!Number.isInteger(d)||d<=0){p("Enter a whole number of credits");return}k(!0);try{u("Getting your item ready…"),await pe({signer:i.signer,contractAddress:e.contractAddress,chainId:e.chainId}),u("Listing your item…");const v=await ge({signer:i.signer,nft:{contractAddress:e.contractAddress,tokenId:e.tokenId,network:e.network,chainId:e.chainId},usdPrice:d/10,expiresAtMs:Date.now()+$e});u("Publishing…"),await se(v,i.identity),u(null),j(d),P("Shop Listed Item",{item_id:e.itemId??e.tokenId??null,contract_address:e.contractAddress,price_credits:d,price_usd:d/10,listing_type:"secondary",is_primary:!1}),V.success(`“${e.name}” is now on sale!`),o.invalidateQueries({queryKey:["my-assets",i.address]})}catch(v){H(v,{flow:"list_secondary"}),P("Shop Listing Failed",{listing_type:"secondary",error_code:ne(v)}),p(Le(v)),u(null)}finally{k(!1)}}function x(){a(),l(`/item/${e.contractAddress}/${e.tokenId}`)}return f!==null?s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:[s.jsx(T,{className:"ccy-mark"})," ",f]})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:x,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["List “",e.name,"”"]}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsxs("label",{className:"field",children:[s.jsxs("span",{children:["Price (",C.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:c,onChange:d=>I(d.target.value),disabled:g})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",C.name," (1 ",C.nameSingular," = $0.10)."]}),_?s.jsx("p",{className:"muted",children:_}):null,N?s.jsx("p",{className:"error",children:N}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,disabled:g,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:S,disabled:g,children:g?"Listing…":"Put on sale"})]})]})})}const Me=1e3*60*60*24*182;function qe(e){const i=e,a=(i.message??"").toLowerCase();return i.code===4001||a.includes("reject")||a.includes("denied")||a.includes("cancel")?"You cancelled the request.":"Couldn't publish your item — please try again."}function Fe({item:e,session:i,onClose:a}){const o=W(),l=G(),[c,I]=m.useState("10"),[_,u]=m.useState(null),[N,p]=m.useState(null),[g,k]=m.useState(!1),[f,j]=m.useState(null),[S,x]=m.useState(null),d=B.chainId,v=je(i.providerType);m.useEffect(()=>{let h=!1;return(async()=>{try{const b=await be({contractAddress:e.contractAddress,chainId:d});h||j(b)}catch{h||j(!1)}})(),()=>{h=!0}},[e.contractAddress,d]);async function L(){p(null);const h=Number(c);if(!Number.isInteger(h)||h<=0){p("Enter a whole number of credits");return}k(!0);try{f||(u("Enabling sales for this collection…"),await ye({signer:i.signer,contractAddress:e.contractAddress,chainId:d}),j(!0)),u("Publishing your item…");const b=await xe({signer:i.signer,item:{contractAddress:e.contractAddress,itemId:e.blockchainItemId,network:ee.Network.MATIC,chainId:d},usdPrice:h/10,uses:e.remainingSupply,expiresAtMs:Date.now()+Me});u("Finishing up…"),await se(b,i.identity),u(null),x(h),P("Shop Listed Item",{item_id:e.blockchainItemId,contract_address:e.contractAddress,price_credits:h,price_usd:h/10,listing_type:"primary",is_primary:!0}),V.success(`“${e.name}” is now on sale!`),o.invalidateQueries({queryKey:["publishable-items"]}),o.invalidateQueries({queryKey:["collection-sale-state"]})}catch(b){H(b,{flow:"list_primary"}),P("Shop Listing Failed",{listing_type:"primary",error_code:ne(b)}),p(qe(b)),u(null)}finally{k(!1)}}function K(){a(),l(`/item/${e.contractAddress}/${e.blockchainItemId}`)}const E=g?"Listing…":f===!1?"Enable & put on sale":"Put on sale";return S!==null?s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:[s.jsx(T,{className:"ccy-mark"})," ",S]})," · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:K,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["Publish “",e.name,"”"]}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsxs("p",{className:"muted small",children:["From your collection “",e.collectionName,"” · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("label",{className:"field",children:[s.jsxs("span",{children:["Price (",C.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:c,onChange:h=>I(h.target.value),disabled:g})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",C.name," (1 ",C.nameSingular," = $0.10)."]}),f===!1&&!g?v?s.jsxs("p",{className:"muted small primary-note",children:["First time selling from “",e.collectionName,"”? It needs a one-time approval, then you’ll confirm the listing — two quick confirmations. After this, listing more items from this collection is a single step."]}):s.jsxs("p",{className:"muted small primary-note",children:["First time selling from “",e.collectionName,"”? Setting it up takes a moment — after that, listing more items from this collection is instant."]}):f===!0&&!g?v?s.jsx("p",{className:"muted small primary-note",children:"This collection is ready — publishing is a single confirmation."}):s.jsx("p",{className:"muted small primary-note",children:"This collection is ready — publishing is instant."}):null,_?s.jsx("p",{className:"muted",children:_}):null,N?s.jsx("p",{className:"error",children:N}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,disabled:g,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:L,disabled:g||f===null,children:f===null?"Checking…":E})]})]})})}const Te=48;function J(e){return{id:e.id,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.itemId,category:e.category,rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.image,priceCredits:e.listingPrice??0,gender:null,tokenId:e.tokenId}}function F(e){return{id:`${e.contractAddress}-${e.blockchainItemId}`,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.blockchainItemId,category:e.category,rarity:e.rarity,network:"MATIC",chainId:B.chainId,thumbnail:e.thumbnail,priceCredits:0,gender:null}}function Ve(){const{session:e,error:i,signIn:a,restore:o}=oe(),l=G(),c=W(),[I,_]=m.useState(null),[u,N]=m.useState(null),[p,g]=m.useState(null),[k,f]=m.useState(null);function j(n){const t=n.tokenId??n.itemId??"";!n.contractAddress||!t||l(`/item/${n.contractAddress}/${t}`,{state:{item:n}})}async function S(n,t,r){if(e){f(null),g(r);try{const y=await me(n);await fe({trade:y,signer:e.signer}),V.success(`“${t}” is no longer for sale.`),await c.invalidateQueries({queryKey:["my-assets",e.address]}),await c.invalidateQueries({queryKey:["collection-sale-state"]})}catch(y){const M=y,q=(M.message??"").toLowerCase(),Z=M.code===4001||q.includes("reject")||q.includes("denied");Z||H(y,{flow:"remove-listing",tradeId:n}),f(Z?"You cancelled the request.":"Couldn't remove the listing — please try again.")}finally{g(null)}}}m.useEffect(()=>{o()},[o]);const x=e==null?void 0:e.address,{items:d,isLoading:v,error:L,hasNextPage:K,isFetchingNextPage:E,fetchNextPage:h}=Ne(["my-assets",x],n=>de(x,{first:Te,skip:n}).then(t=>({items:t.assets,total:t.total})),{enabled:!!x}),{data:b}=U({queryKey:["importable",x],queryFn:()=>he(x),enabled:!!x}),O=((b==null?void 0:b.creations.length)??0)+((b==null?void 0:b.owned.length)??0),{data:A,isLoading:ie,isError:re}=U({queryKey:["publishable-items",x],queryFn:()=>Pe(x,e.identity),enabled:!!e,retry:!1}),R=m.useMemo(()=>[...new Set((A??[]).map(n=>n.contractAddress))],[A]),{data:w}=U({queryKey:["collection-sale-state",x,R],enabled:R.length>0,queryFn:async()=>{const n=await Promise.all(R.map(async r=>[r,await ue(r)])),t={};for(const[r,y]of n)for(const[M,q]of Object.entries(y))t[`${r}-${M}`]=q;return t}}),Q=n=>w==null?void 0:w[`${n.contractAddress}-${n.blockchainItemId}`],Y=m.useMemo(()=>(A??[]).filter(n=>{var t;return(t=Q(n))==null?void 0:t.isOnSale}),[A,w]),X=m.useMemo(()=>{var t;const n=new Map;for(const r of A??[]){if((t=w==null?void 0:w[`${r.contractAddress}-${r.blockchainItemId}`])!=null&&t.isOnSale)continue;const y=n.get(r.collectionId)??{id:r.collectionId,name:r.collectionName,items:[]};y.items.push(r),n.set(r.collectionId,y)}return[...n.values()]},[A,w]);return e?s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),O>0?s.jsxs(le,{className:"import-banner",to:"/import",children:[s.jsx("span",{className:"import-banner__ico","aria-hidden":!0,children:"📦"}),s.jsxs("span",{className:"import-banner__text",children:[s.jsx("strong",{children:"Import your listings"}),s.jsxs("span",{className:"import-banner__sub",children:["You have ",O," item",O===1?"":"s"," for sale elsewhere — bring them into the Shop."]})]}),s.jsx("span",{className:"import-banner__cta",children:"Import"})]}):null,s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Items you own"}),s.jsx("p",{className:"myassets__section-sub",children:"Wearables & emotes you’ve bought — resell them in the Shop."})]}),L?s.jsx("p",{className:"error",children:L.message}):null,k?s.jsx("p",{className:"error",children:k}):null,s.jsxs("div",{className:"asset-grid",children:[v?Array.from({length:8}).map((n,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`sk-${t}`)):d.map(n=>s.jsxs("article",{className:"asset-card asset-card--link",onClick:()=>j(J(n)),role:"link",tabIndex:0,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),j(J(n)))},children:[s.jsx("div",{className:"asset-card__img",children:n.image?s.jsx("img",{src:n.image,alt:n.name}):null}),s.jsx("div",{className:"asset-card__name",title:n.name,children:n.name}),n.isOnSale?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"asset-card__listed",children:[s.jsxs("span",{className:"asset-card__price",children:[s.jsx(T,{className:"ccy-mark"})," ",n.listingPrice]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost asset-card__remove",disabled:p===n.id||!n.tradeId,onClick:t=>{t.stopPropagation(),n.tradeId&&S(n.tradeId,n.name,n.id)},children:p===n.id?"Removing…":"Remove listing"})]}):s.jsx("button",{className:"btn btn--sm",onClick:t=>{t.stopPropagation(),P("Shop Started Listing",{listing_type:"secondary",item_id:n.itemId??n.tokenId??null}),_(n)},children:"Put on sale"})]},n.id)),E?Array.from({length:4}).map((n,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`msk-${t}`)):null]}),s.jsx(_e,{hasNextPage:K,isFetching:E,onLoadMore:()=>h()}),!v&&d.length===0?s.jsx("p",{className:"muted",children:"No items in your wardrobe yet."}):null]}),s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Your creations"}),s.jsxs("p",{className:"myassets__section-sub",children:["Items you made. Put them on sale in the Shop — set a price in ",C.name," and buyers pay with ",C.name,"."]})]}),ie?s.jsx("div",{className:"publish-grid",children:Array.from({length:4}).map((n,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`pub-sk-${t}`))}):re?s.jsx("p",{className:"publish-empty",children:"We couldn’t load your collections right now. Please try again in a moment."}):Y.length===0&&X.length===0?s.jsx("p",{className:"publish-empty",children:"You don’t have any items to publish yet."}):s.jsxs(s.Fragment,{children:[Y.length>0?s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:"On sale"}),s.jsx("div",{className:"publish-grid",children:Y.map(n=>{var t;return s.jsxs("article",{className:"publish-card publish-card--link",onClick:()=>j(F(n)),role:"link",tabIndex:0,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),j(F(n)))},children:[s.jsx("div",{className:"publish-card__img",children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:n.name}):null}),s.jsx("div",{className:"publish-card__name",title:n.name,children:n.name}),s.jsxs("div",{className:"publish-card__listed",children:[s.jsxs("span",{className:"publish-card__price",children:[s.jsx(T,{className:"ccy-mark"})," ",((t=Q(n))==null?void 0:t.priceCredits)??0]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost publish-card__cta",disabled:p===n.id,onClick:r=>{r.stopPropagation();const y=Q(n);y!=null&&y.tradeId&&S(y.tradeId,n.name,n.id)},children:p===n.id?"Removing…":"Remove listing"})]},`${n.contractAddress}-${n.blockchainItemId}`)})})]}):null,X.map(n=>s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:n.name}),s.jsx("div",{className:"publish-grid",children:n.items.map(t=>s.jsxs("article",{className:"publish-card publish-card--link",onClick:()=>j(F(t)),role:"link",tabIndex:0,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),j(F(t)))},children:[s.jsx("div",{className:"publish-card__img",children:t.thumbnail?s.jsx("img",{src:t.thumbnail,alt:t.name}):null}),s.jsx("div",{className:"publish-card__name",title:t.name,children:t.name}),s.jsxs("div",{className:"publish-card__meta",children:[s.jsx("span",{className:"publish-chip publish-chip--rarity",children:t.rarity}),s.jsxs("span",{className:"publish-card__supply",children:[t.remainingSupply.toLocaleString()," available"]})]}),s.jsx("button",{className:"btn btn--sm btn--purple publish-card__cta",onClick:r=>{r.stopPropagation(),P("Shop Started Listing",{listing_type:"primary",item_id:t.blockchainItemId}),N(t)},children:"Put on sale"})]},`${t.contractAddress}-${t.blockchainItemId}`))})]},n.id))]})]}),I?s.jsx(Ee,{asset:I,session:e,onClose:()=>_(null)}):null,u?s.jsx(Fe,{item:u,session:e,onClose:()=>N(null)}):null]}):s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),s.jsx("p",{className:"muted",children:"Sign in to sell your items."}),s.jsx("div",{className:"connect-row",children:s.jsx("button",{className:"btn btn--purple",onClick:()=>a(),children:"Sign in"})}),i?s.jsx("p",{className:"error",children:i}):null]})}export{Ve as MyAssets};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,j as s,L as n}from"./react-E8ng6RF2.js";import{u as c,A as l}from"./index-DDfYFIH_.js";import{L as m}from"./LoadMore-DB6TwvRe.js";import"./ethers-DbXGgxrh.js";const i=24;function v(){const t=c(e=>Object.values(e.items)),[a,r]=o.useState(i);return t.length===0?s.jsxs("div",{className:"favorites-empty",children:[s.jsx("span",{className:"ico ico-heart favorites-empty__ico","aria-hidden":!0}),s.jsx("p",{className:"favorites-empty__title",children:"No favorites yet"}),s.jsx("p",{className:"muted",children:"Tap the heart on any item to save it here."}),s.jsx(n,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]}):s.jsxs("section",{className:"favorites",children:[s.jsxs("div",{className:"favorites__head",children:[s.jsx("h1",{children:"My Favorites"}),s.jsxs("span",{className:"favorites__count",children:[t.length," item",t.length>1?"s":""]})]}),s.jsx("div",{className:"grid",children:t.slice(0,a).map(e=>s.jsx(l,{item:e},e.id))}),s.jsx(m,{hasNextPage:a<t.length,isFetching:!1,onLoadMore:()=>r(e=>e+i)})]})}export{v as MyFavorites};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,L as l}from"./react-E8ng6RF2.js";import{c as o,d as u,e as m,g as p,h as x}from"./index-DDfYFIH_.js";import{L as _}from"./LoadMore-DB6TwvRe.js";import{u as j}from"./useInfiniteGrid-BljM6dNq.js";import"./ethers-DbXGgxrh.js";const N=24;function g(s){try{return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function f({status:s}){return s==="PENDING"?e.jsx("span",{className:"purchase__badge purchase__badge--pending",children:"Processing"}):e.jsx("span",{className:"purchase__badge purchase__badge--done",children:"Completed"})}function y({purchase:s}){const{data:a}=m({queryKey:["trade-display",s.tradeId],queryFn:()=>x(s.tradeId),enabled:!!s.tradeId,staleTime:3e5}),t=(a==null?void 0:a.name)??"Item",i=(a==null?void 0:a.thumbnail)??"",n=(a==null?void 0:a.tokenId)??(a==null?void 0:a.itemId)??"",d=a!=null&&a.contractAddress&&n?`/item/${a.contractAddress}/${n}`:void 0,c=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"purchase__thumb",children:i?e.jsx("img",{src:i,alt:t}):null}),e.jsxs("div",{className:"purchase__info",children:[e.jsx("div",{className:"purchase__name",title:t,children:t}),e.jsx("div",{className:"muted purchase__date",children:g(s.createdAt)})]}),e.jsx(f,{status:s.status}),e.jsxs("div",{className:"purchase__price",children:[e.jsx(p,{className:"ccy-mark"})," ",s.credits]})]});return d?e.jsx(l,{className:"purchase",to:d,children:c}):e.jsx("div",{className:"purchase",children:c})}function A(){const{session:s}=o(),{items:a,isLoading:t,hasNextPage:i,isFetchingNextPage:n,fetchNextPage:d}=j(["purchases",s==null?void 0:s.address],r=>u(s.address,s.identity,{first:N,skip:r}),{enabled:!!s});if(!s)return e.jsxs("div",{className:"purchases-empty",children:[e.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"purchases-empty__title",children:"Sign in to see your purchases"}),e.jsx("p",{className:"muted",children:"Your order history shows up here once you sign in."})]});const c=a.filter(r=>r.status!=="EXPIRED");return!t&&c.length===0?e.jsxs("div",{className:"purchases-empty",children:[e.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"purchases-empty__title",children:"No purchases yet"}),e.jsx("p",{className:"muted",children:"When you buy something it’ll appear here."}),e.jsx(l,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]}):e.jsxs("section",{className:"purchases",children:[e.jsxs("div",{className:"purchases__head",children:[e.jsx("h1",{children:"My Purchases"}),t?null:e.jsxs("span",{className:"purchases__count",children:[c.length," order",c.length>1?"s":""]})]}),e.jsx("div",{className:"purchases__list",children:t?Array.from({length:4}).map((r,h)=>e.jsx("div",{className:"purchase purchase--skeleton"},h)):e.jsxs(e.Fragment,{children:[c.map(r=>e.jsx(y,{purchase:r},r.id)),n?Array.from({length:2}).map((r,h)=>e.jsx("div",{className:"purchase purchase--skeleton"},`m-${h}`)):null]})}),e.jsx(_,{hasNextPage:i,isFetching:n,onLoadMore:()=>d()})]})}export{A as MyPurchases};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,L as s}from"./react-E8ng6RF2.js";function t(){return e.jsxs("div",{className:"notfound",children:[e.jsx("span",{className:"ico ico-cart notfound__ico","aria-hidden":!0}),e.jsx("h1",{className:"notfound__title",children:"Page not found"}),e.jsx("p",{className:"muted",children:"The page you’re looking for isn’t here. Let’s get you back to the shop."}),e.jsx(s,{className:"btn btn--purple",to:"/assets",children:"Browse
|
|
1
|
+
import{j as e,L as s}from"./react-E8ng6RF2.js";function t(){return e.jsxs("div",{className:"notfound",children:[e.jsx("span",{className:"ico ico-cart notfound__ico","aria-hidden":!0}),e.jsx("h1",{className:"notfound__title",children:"Page not found"}),e.jsx("p",{className:"muted",children:"The page you’re looking for isn’t here. Let’s get you back to the shop."}),e.jsx(s,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})}export{t as NotFound,t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as Ee,R as a,r as be,j as W}from"./react-E8ng6RF2.js";import{
|
|
1
|
+
import{g as Ee,R as a,r as be,j as W}from"./react-E8ng6RF2.js";import{j as ke}from"./index-DDfYFIH_.js";import"./ethers-DbXGgxrh.js";var q={exports:{}},D,V;function Pe(){if(V)return D;V=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return D=n,D}var B,G;function we(){if(G)return B;G=1;var n=Pe();function e(){}function t(){}return t.resetWarningCache=e,B=function(){function r(u,s,c,y,f,S){if(S!==n){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},B}var J;function Re(){return J||(J=1,q.exports=we()()),q.exports}var xe=Re();const d=Ee(xe);var re="https://js.stripe.com/v3",je=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var Oe=function(){for(var e=document.querySelectorAll('script[src^="'.concat(re,'"]')),t=0;t<e.length;t++){var r=e[t];if(je.test(r.src))return r}return null},z=function(e){var t="",r=document.createElement("script");r.src="".concat(re).concat(t);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},Te=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"4.6.0",startTime:t})},R=null,N=null,L=null,Ae=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},Ne=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}},Le=function(e){return R!==null?R:(R=new Promise(function(t,r){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe){t(window.Stripe);return}try{var o=Oe();if(!(o&&e)){if(!o)o=z(e);else if(o&&L!==null&&N!==null){var i;o.removeEventListener("load",L),o.removeEventListener("error",N),(i=o.parentNode)===null||i===void 0||i.removeChild(o),o=z(e)}}L=Ne(t,r),N=Ae(r),o.addEventListener("load",L),o.addEventListener("error",N)}catch(u){r(u);return}}),R.catch(function(t){return R=null,Promise.reject(t)}))},Ie=function(e,t,r){if(e===null)return null;var o=e.apply(void 0,t);return Te(o,r),o},x,ne=!1,oe=function(){return x||(x=Le(null).catch(function(e){return x=null,Promise.reject(e)}),x)};Promise.resolve().then(function(){return oe()}).catch(function(n){ne||console.warn(n)});var Ue=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];ne=!0;var o=Date.now();return oe().then(function(i){return Ie(i,t,o)})};function H(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function X(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?H(Object(t),!0).forEach(function(r){ie(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function I(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(e){return typeof e}:I=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(n)}function ie(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ae(n,e){return _e(n)||We(n,e)||qe(n,e)||De()}function _e(n){if(Array.isArray(n))return n}function We(n,e){var t=n&&(typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"]);if(t!=null){var r=[],o=!0,i=!1,u,s;try{for(t=t.call(n);!(o=(u=t.next()).done)&&(r.push(u.value),!(e&&r.length===e));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(i)throw s}}return r}}function qe(n,e){if(n){if(typeof n=="string")return Q(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Q(n,e)}}function Q(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C=function(e,t,r){var o=!!r,i=a.useRef(r);a.useEffect(function(){i.current=r},[r]),a.useEffect(function(){if(!o||!e)return function(){};var u=function(){i.current&&i.current.apply(i,arguments)};return e.on(t,u),function(){e.off(t,u)}},[o,t,e,i])},Y=function(e){var t=a.useRef(e);return a.useEffect(function(){t.current=e},[e]),t.current},w=function(e){return e!==null&&I(e)==="object"},Be=function(e){return w(e)&&typeof e.then=="function"},Me=function(e){return w(e)&&typeof e.elements=="function"&&typeof e.createToken=="function"&&typeof e.createPaymentMethod=="function"&&typeof e.confirmCardPayment=="function"},Z="[object Object]",Ye=function n(e,t){if(!w(e)||!w(t))return e===t;var r=Array.isArray(e),o=Array.isArray(t);if(r!==o)return!1;var i=Object.prototype.toString.call(e)===Z,u=Object.prototype.toString.call(t)===Z;if(i!==u)return!1;if(!i&&!r)return e===t;var s=Object.keys(e),c=Object.keys(t);if(s.length!==c.length)return!1;for(var y={},f=0;f<s.length;f+=1)y[s[f]]=!0;for(var S=0;S<c.length;S+=1)y[c[S]]=!0;var m=Object.keys(y);if(m.length!==s.length)return!1;var h=e,k=t,E=function(P){return n(h[P],k[P])};return m.every(E)},Fe=function(e,t,r){return w(e)?Object.keys(e).reduce(function(o,i){var u=!w(t)||!Ye(e[i],t[i]);return r.includes(i)?(u&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),o):u?X(X({},o||{}),{},ie({},i,e[i])):o},null):null},ue="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",ee=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;if(e===null||Me(e))return e;throw new Error(t)},$e=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;if(Be(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(o){return ee(o,t)})};var r=ee(e,t);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Ke=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:"react-stripe-js",version:"2.8.1"}),e.registerAppInfo({name:"react-stripe-js",version:"2.8.1",url:"https://stripe.com/docs/stripe-js/react"}))},ce=a.createContext(null);ce.displayName="ElementsContext";var Ve=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e};d.any,d.object;d.func.isRequired;var se=a.createContext(null);se.displayName="CustomCheckoutSdkContext";var Ge=function(e,t){if(!e)throw new Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CustomCheckoutProvider> provider."));return e},Je=a.createContext(null);Je.displayName="CustomCheckoutContext";d.any,d.shape({clientSecret:d.string.isRequired,elementsOptions:d.object}).isRequired;var te=function(e){var t=a.useContext(se),r=a.useContext(ce);if(t&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CustomCheckoutProvider> and <Elements> providers."));return t?Ge(t,e):Ve(r,e)},ze=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},p=function(e,t){var r="".concat(ze(e),"Element"),o=function(c){var y=c.id,f=c.className,S=c.options,m=S===void 0?{}:S,h=c.onBlur,k=c.onFocus,E=c.onReady,j=c.onChange,P=c.onEscape,le=c.onClick,pe=c.onLoadError,fe=c.onLoaderStart,me=c.onNetworksChange,he=c.onConfirm,ve=c.onCancel,Ce=c.onShippingAddressChange,ye=c.onShippingRateChange,O=te("mounts <".concat(r,">")),T="elements"in O?O.elements:null,A="customCheckoutSdk"in O?O.customCheckoutSdk:null,ge=a.useState(null),$=ae(ge,2),v=$[0],Se=$[1],b=a.useRef(null),U=a.useRef(null);C(v,"blur",h),C(v,"focus",k),C(v,"escape",P),C(v,"click",le),C(v,"loaderror",pe),C(v,"loaderstart",fe),C(v,"networkschange",me),C(v,"confirm",he),C(v,"cancel",ve),C(v,"shippingaddresschange",Ce),C(v,"shippingratechange",ye),C(v,"change",j);var _;E&&(e==="expressCheckout"?_=E:_=function(){E(v)}),C(v,"ready",_),a.useLayoutEffect(function(){if(b.current===null&&U.current!==null&&(T||A)){var g=null;A?g=A.createElement(e,m):T&&(g=T.create(e,m)),b.current=g,Se(g),g&&g.mount(U.current)}},[T,A,m]);var K=Y(m);return a.useEffect(function(){if(b.current){var g=Fe(m,K,["paymentRequest"]);g&&"update"in b.current&&b.current.update(g)}},[m,K]),a.useLayoutEffect(function(){return function(){if(b.current&&typeof b.current.destroy=="function")try{b.current.destroy(),b.current=null}catch{}}},[]),a.createElement("div",{id:y,className:f,ref:U})},i=function(c){te("mounts <".concat(r,">"));var y=c.id,f=c.className;return a.createElement("div",{id:y,className:f})},u=t?i:o;return u.propTypes={id:d.string,className:d.string,onChange:d.func,onBlur:d.func,onFocus:d.func,onReady:d.func,onEscape:d.func,onClick:d.func,onLoadError:d.func,onLoaderStart:d.func,onNetworksChange:d.func,onConfirm:d.func,onCancel:d.func,onShippingAddressChange:d.func,onShippingRateChange:d.func,options:d.object},u.displayName=r,u.__elementType=e,u},l=typeof window>"u",F=a.createContext(null);F.displayName="EmbeddedCheckoutProviderContext";var de=function(){var e=a.useContext(F);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},He="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Xe=function(e){var t=e.stripe,r=e.options,o=e.children,i=a.useMemo(function(){return $e(t,He)},[t]),u=a.useRef(null),s=a.useRef(null),c=a.useState({embeddedCheckout:null}),y=ae(c,2),f=y[0],S=y[1];a.useEffect(function(){if(!(s.current||u.current)){var k=function(j){s.current||u.current||(s.current=j,u.current=s.current.initEmbeddedCheckout(r).then(function(P){S({embeddedCheckout:P})}))};i.tag==="async"&&!s.current&&(r.clientSecret||r.fetchClientSecret)?i.stripePromise.then(function(E){E&&k(E)}):i.tag==="sync"&&!s.current&&(r.clientSecret||r.fetchClientSecret)&&k(i.stripe)}},[i,r,f,s]),a.useEffect(function(){return function(){f.embeddedCheckout?(u.current=null,f.embeddedCheckout.destroy()):u.current&&u.current.then(function(){u.current=null,f.embeddedCheckout&&f.embeddedCheckout.destroy()})}},[f.embeddedCheckout]),a.useEffect(function(){Ke(s)},[s]);var m=Y(t);a.useEffect(function(){m!==null&&m!==t&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[m,t]);var h=Y(r);return a.useEffect(function(){if(h!=null){if(r==null){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}r.clientSecret===void 0&&r.fetchClientSecret===void 0&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),h.clientSecret!=null&&r.clientSecret!==h.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.fetchClientSecret!=null&&r.fetchClientSecret!==h.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.onComplete!=null&&r.onComplete!==h.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),h.onShippingDetailsChange!=null&&r.onShippingDetailsChange!==h.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),h.onLineItemsChange!=null&&r.onLineItemsChange!==h.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[h,r]),a.createElement(F.Provider,{value:f},o)},Qe=function(e){var t=e.id,r=e.className,o=de(),i=o.embeddedCheckout,u=a.useRef(!1),s=a.useRef(null);return a.useLayoutEffect(function(){return!u.current&&i&&s.current!==null&&(i.mount(s.current),u.current=!0),function(){if(u.current&&i)try{i.unmount(),u.current=!1}catch{}}},[i]),a.createElement("div",{ref:s,id:t,className:r})},Ze=function(e){var t=e.id,r=e.className;return de(),a.createElement("div",{id:t,className:r})},et=l?Ze:Qe;p("auBankAccount",l);p("card",l);p("cardNumber",l);p("cardExpiry",l);p("cardCvc",l);p("fpxBank",l);p("iban",l);p("idealBank",l);p("p24Bank",l);p("epsBank",l);p("payment",l);p("expressCheckout",l);p("currencySelector",l);p("paymentRequestButton",l);p("linkAuthentication",l);p("address",l);p("shippingAddress",l);p("paymentMethodMessaging",l);p("affirmMessage",l);p("afterpayClearpayMessage",l);let M=null;function tt(){return M||(M=Ue(ke.stripePublishableKey)),M}function it({clientSecret:n,onComplete:e}){const t=be.useMemo(()=>({clientSecret:n,onComplete:e}),[n,e]);return W.jsx("div",{className:"stripe-embed",children:W.jsx(Xe,{stripe:tt(),options:t,children:W.jsx(et,{})})})}export{it as RealCheckout,it as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,d as _,b as x,N as j}from"./react-E8ng6RF2.js";import{c as v,H as N,W as h,
|
|
1
|
+
import{j as s,d as _,b as x,N as j}from"./react-E8ng6RF2.js";import{c as v,H as N,W as h,z as i,j as t}from"./index-DDfYFIH_.js";import{s as g}from"./wallet-kind-DWVcMRCP.js";import"./ethers-DbXGgxrh.js";function b(){return s.jsxs("div",{className:"success-anim",role:"img","aria-label":"Purchase successful",children:[s.jsxs("svg",{className:"success-anim__svg",viewBox:"0 0 120 120",children:[s.jsx("circle",{className:"success-anim__ring",cx:"60",cy:"60",r:"54"}),s.jsx("path",{className:"success-anim__check",d:"M37 61 l16 16 l30 -34"})]}),s.jsx("span",{className:"success-anim__spark success-anim__spark--1","aria-hidden":!0,children:"✦"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--2","aria-hidden":!0,children:"✦"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--3","aria-hidden":!0,children:"◈"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--4","aria-hidden":!0,children:"✦"})]})}const k=t.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",f=t.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function E(){const{state:c}=_(),o=x(),{session:a}=v(),r=(c==null?void 0:c.items)??[];if(r.length===0)return s.jsx(j,{to:"/assets",replace:!0});const e=r[0],d=(a==null?void 0:a.address)??"default",l=e.category==="emote",m=l?[]:r.map(N).filter(n=>!!n),u=c==null?void 0:c.txHash,p=!!u&&g(a==null?void 0:a.providerType);return s.jsxs("div",{className:"success",children:[s.jsx("div",{className:"success__preview",children:m.length>0?s.jsx(h,{profile:d,urns:m,type:i.PreviewType.AVATAR,emote:i.PreviewEmote.FASHION,background:"ecebed",dev:t.chainId===80002},e.id):s.jsx(h,{contractAddress:e.contractAddress,tokenId:e.tokenId??void 0,itemId:e.tokenId?void 0:e.itemId??void 0,profile:d,type:l?void 0:i.PreviewType.AVATAR,emote:l?void 0:i.PreviewEmote.FASHION,background:"ecebed",dev:t.chainId===80002},e.id)}),s.jsxs("div",{className:"success__panel",children:[s.jsx(b,{}),s.jsx("h1",{className:"success__title",children:"It’s yours!"}),r.length===1?s.jsxs("p",{className:"success__sub",children:[s.jsx("strong",{children:e.name})," is now in your wardrobe."]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"success__sub",children:[r.length," items are now in your wardrobe."]}),s.jsx("ul",{className:"success__list",children:r.map(n=>s.jsx("li",{children:n.name},n.id))})]}),s.jsxs("div",{className:"success__links",children:[s.jsx("button",{className:"success__receipt",onClick:()=>o("/my-purchases"),children:"View order"}),p?s.jsx("a",{className:"success__receipt",href:`${f}${u}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null]}),s.jsxs("div",{className:"success__actions",children:[s.jsx("a",{className:"btn btn--purple",href:k,target:"_blank",rel:"noreferrer",children:"Use it in-world"}),s.jsx("button",{className:"btn btn--ghost",onClick:()=>o("/assets"),children:"Keep shopping"})]})]})]})}export{E as Success,E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a0 as M,a1 as I}from"./index-dAV-AkJi.js";import{b as u,i as V,w as F,T as G,h as z,j as w,r as K,l as Y,m as k,g as x,a as W,u as H,_ as j,c as Q,d as g,e as q,s as J}from"./generateUtilityClasses-BRQBEf9L.js";import{r as O,j as f}from"./react-E8ng6RF2.js";const X="https://wearable-preview.decentraland.zone",Z="https://decentraland.zone/account",tt="https://decentraland.zone/profile",et="https://decentraland.zone/marketplace",nt="https://decentraland.zone/builder",ot="https://decentraland.zone/dao",at="https://decentraland.zone/governance",st="https://decentraland.zone/events",rt="https://decentraland.zone/places",ct="https://decentraland.org/create/",dt="https://docs.decentraland.org/player/",_t="https://decentraland.zone/download/creator-hub/",lt="https://decentraland.zone/download/",Rt="https://decentraland.zone/download_success/",Lt="ea2ybdmmn1kv",Et="master",Ut="18g1DzIyBxvu0steSwKyQr",it="https://cms.decentraland.org",pt="https://decentraland.zone/marketplace/names/claim",St="https://decentraland.zone/marketplace/lands",Ot="https://decentraland.zone/marketplace/account",At="https://decentraland.zone/create/",Tt="https://studios.decentraland.zone/",ht="https://decentraland.zone/builder/collections",Nt="https://decentraland.zone/builder/names",Ct="https://decentraland.zone/builder/worlds?tab=dcl",gt="https://decentraland.zone/builder/land",mt="https://decentraland.zone/events/me/",It="https://decentraland.zone/places/favorites/",ut="https://docs.decentraland.org/player/",Dt="https://docs.decentraland.org/creator/",$t="https://decentraland.zone/blog/",Pt="https://docs.decentraland.org/contributor/",ft="https://decentraland.zone/governance/transparency/",vt="https://decentraland.zone/governance/proposals/",yt="https://decentraland.zone/dao/grants/",Bt="https://decentraland.zone/governance/projects/",bt="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Mt="https://decentraland.zone/marketplace/settings",Vt="https://dcl.gg/discord",Ft="https://reddit.com/r/decentraland",Gt="https://github.com/decentraland",zt="https://x.com/decentraland",wt="https://instagram.com/decentraland_foundation/",Kt="https://youtube.com/@decentraland_foundation",Yt="https://tiktok.com/@decentraland_fdn",kt="https://linkedin.com/company/decentralandorg",xt="https://decentraland.zone/privacy",Wt="https://decentraland.zone/terms",Ht="https://decentraland.zone/content",jt="https://decentraland.zone/ethics",Qt="https://decentraland.org/help",qt="mailto:hello@decentraland.org",Jt="https://docs.decentraland.org/faqs/decentraland-101",Xt="https://docs.decentraland.org",Zt="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",te="https://download-gateway.decentraland.zone",ee="https://decentraland.zone/top-scenes",ne="https://testflight.apple.com/join/KF4r3jlU",oe="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",ae={WEARABLE_PREVIEW_URL:X,ACCOUNT_URL:Z,PROFILE_URL:tt,MARKETPLACE_URL:et,BUILDER_URL:nt,DAO_URL:ot,GOVERNANCE_URL:at,EVENTS_URL:st,PLACES_URL:rt,CREATE_URL:ct,LEARN_URL:dt,CREATOR_HUB_URL:_t,DOWNLOAD_URL:lt,DOWNLOAD_SUCCESS_URL:Rt,CONTENTFUL_SPACE_ID:Lt,CONTENTFUL_ENV:Et,CONTENTFUL_NAVBAR_ENTRY_ID:Ut,CONTENTFUL_CONTENTFUL_CDN_URL:it,MARKETPLACE_NAMES_URL:pt,MARKETPLACE_LANDS_URL:St,MARKETPLACE_MY_ASSETS_URL:Ot,LANDING_CREATORS_URL:At,STUDIOS_URL:Tt,BUILDER_WEARABLE_EMOTES_URL:ht,BUILDER_NAMES_URL:Nt,BUILDER_WORLDS_URL:Ct,BUILDER_LAND_URL:gt,EVENTS_MY_EVENTS:mt,PLACES_MY_FAVORITE_URL:It,DOCS_ABOUT_URL:ut,DOCS_CREATORS_URL:Dt,BLOG_URL:$t,DOCS_CONTRIBUTOR_URL:Pt,GOVERNANCE_TRANSPARENCY_URL:ft,GOVERNANCE_PROPOSALS_URL:vt,DAO_GRANTS_URL:yt,GOVERNANCE_PROJECTS_URL:Bt,DOCS_DAO_URL:bt,MARKETPLACE_SETTINGS_URL:Mt,DISCORD_URL:Vt,REDDIT_URL:Ft,GITHUB_URL:Gt,X_URL:zt,INSTAGRAM_URL:wt,YOUTUBE_URL:Kt,TIKTOK_URL:Yt,LINKEDIN_URL:kt,PRIVACY_POLICY_URL:xt,TERMS_OF_USE_URL:Wt,CONTENT_POLICY_URL:Ht,CODE_OF_ETHICS_URL:jt,SUPPORT_URL:Qt,EMAIL_HELLO_URL:qt,FAQ_URL:Jt,DOCS_URL:Xt,BEEHIV_SUBSCRIPTION_URL:Zt,AUTO_SIGNING_BASE_URL:te,TOP_SCENES_URL:ee,IOS_STORE_URL:ne,ANDROID_STORE_URL:oe},se="https://wearable-preview.decentraland.org",re="https://decentraland.org/account",ce="https://decentraland.org/profile",de="https://decentraland.org/marketplace",_e="https://decentraland.org/builder",le="https://decentraland.org/dao",Re="https://decentraland.org/governance",Le="https://decentraland.org/events",Ee="https://decentraland.org/places",Ue="https://decentraland.org/create/",ie="https://docs.decentraland.org/player/",pe="https://decentraland.org/download/creator-hub/",Se="https://decentraland.org/download/",Oe="https://decentraland.org/download_success/",Ae="ea2ybdmmn1kv",Te="master",he="18g1DzIyBxvu0steSwKyQr",Ne="https://cms.decentraland.org",Ce="https://decentraland.org/marketplace/names/claim",ge="https://decentraland.org/marketplace/lands",me="https://decentraland.org/marketplace/account",Ie="https://decentraland.org/create/",ue="https://studios.decentraland.org/",De="https://decentraland.org/builder/collections",$e="https://decentraland.org/builder/names",Pe="https://decentraland.org/builder/worlds?tab=dcl",fe="https://decentraland.org/builder/land",ve="https://decentraland.org/events/me/",ye="https://decentraland.org/places/favorites/",Be="https://docs.decentraland.org/player/",be="https://docs.decentraland.org/creator/",Me="https://decentraland.org/blog/",Ve="https://docs.decentraland.org/contributor/",Fe="https://decentraland.org/governance/transparency/",Ge="https://decentraland.org/governance/proposals/",ze="https://decentraland.org/dao/grants/",we="https://decentraland.org/governance/projects/",Ke="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Ye="https://decentraland.org/marketplace/settings",ke="https://dcl.gg/discord",xe="https://reddit.com/r/decentraland",We="https://github.com/decentraland",He="https://x.com/decentraland",je="https://instagram.com/decentraland_foundation/",Qe="https://youtube.com/@decentraland_foundation",qe="https://tiktok.com/@decentraland_fdn",Je="https://linkedin.com/company/decentralandorg",Xe="https://decentraland.org/privacy",Ze="https://decentraland.org/terms",tn="https://decentraland.org/content",en="https://decentraland.org/ethics",nn="https://decentraland.org/help",on="mailto:hello@decentraland.org",an="https://docs.decentraland.org/faqs/decentraland-101",sn="https://docs.decentraland.org",rn="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",cn="https://download-gateway.decentraland.org",dn="https://decentraland.org/top-scenes",_n="https://testflight.apple.com/join/KF4r3jlU",ln="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Rn={WEARABLE_PREVIEW_URL:se,ACCOUNT_URL:re,PROFILE_URL:ce,MARKETPLACE_URL:de,BUILDER_URL:_e,DAO_URL:le,GOVERNANCE_URL:Re,EVENTS_URL:Le,PLACES_URL:Ee,CREATE_URL:Ue,LEARN_URL:ie,CREATOR_HUB_URL:pe,DOWNLOAD_URL:Se,DOWNLOAD_SUCCESS_URL:Oe,CONTENTFUL_SPACE_ID:Ae,CONTENTFUL_ENV:Te,CONTENTFUL_NAVBAR_ENTRY_ID:he,CONTENTFUL_CONTENTFUL_CDN_URL:Ne,MARKETPLACE_NAMES_URL:Ce,MARKETPLACE_LANDS_URL:ge,MARKETPLACE_MY_ASSETS_URL:me,LANDING_CREATORS_URL:Ie,STUDIOS_URL:ue,BUILDER_WEARABLE_EMOTES_URL:De,BUILDER_NAMES_URL:$e,BUILDER_WORLDS_URL:Pe,BUILDER_LAND_URL:fe,EVENTS_MY_EVENTS:ve,PLACES_MY_FAVORITE_URL:ye,DOCS_ABOUT_URL:Be,DOCS_CREATORS_URL:be,BLOG_URL:Me,DOCS_CONTRIBUTOR_URL:Ve,GOVERNANCE_TRANSPARENCY_URL:Fe,GOVERNANCE_PROPOSALS_URL:Ge,DAO_GRANTS_URL:ze,GOVERNANCE_PROJECTS_URL:we,DOCS_DAO_URL:Ke,MARKETPLACE_SETTINGS_URL:Ye,DISCORD_URL:ke,REDDIT_URL:xe,GITHUB_URL:We,X_URL:He,INSTAGRAM_URL:je,YOUTUBE_URL:Qe,TIKTOK_URL:qe,LINKEDIN_URL:Je,PRIVACY_POLICY_URL:Xe,TERMS_OF_USE_URL:Ze,CONTENT_POLICY_URL:tn,CODE_OF_ETHICS_URL:en,SUPPORT_URL:nn,EMAIL_HELLO_URL:on,FAQ_URL:an,DOCS_URL:sn,BEEHIV_SUBSCRIPTION_URL:rn,AUTO_SIGNING_BASE_URL:cn,TOP_SCENES_URL:dn,IOS_STORE_URL:_n,ANDROID_STORE_URL:ln},Ln="https://wearable-preview.decentraland.today",En="https://decentraland.today/account",Un="https://decentraland.today/profile",pn="https://decentraland.today/marketplace",Sn="https://decentraland.today/builder",On="https://decentraland.today/dao",An="https://decentraland.today/governance",Tn="https://decentraland.zone/events",hn="https://decentraland.zone/places",Nn="https://decentraland.today/create/",Cn="https://docs.decentraland.org/player/",gn="https://decentraland.today/download/creator-hub/",mn="https://decentraland.today/download/",In="https://decentraland.today/download_success/",un="ea2ybdmmn1kv",Dn="master",$n="18g1DzIyBxvu0steSwKyQr",Pn="https://cms.decentraland.org",fn="https://decentraland.today/marketplace/names/claim",vn="https://decentraland.today/marketplace/lands",yn="https://decentraland.today/marketplace/account",Bn="https://decentraland.today/create/",bn="https://studios.decentraland.today/",Mn="https://decentraland.today/builder/collections",Vn="https://decentraland.today/builder/names",Fn="https://decentraland.today/builder/worlds?tab=dcl",Gn="https://decentraland.today/builder/land",zn="https://decentraland.today/events/me/",wn="https://decentraland.today/places/favorites/",Kn="https://docs.decentraland.org/player/",Yn="https://docs.decentraland.org/creator/",kn="https://decentraland.today/blog/",xn="https://docs.decentraland.org/contributor/",Wn="https://decentraland.today/governance/transparency/",Hn="https://decentraland.today/governance/proposals/",jn="https://decentraland.today/dao/grants/",Qn="https://decentraland.today/governance/projects/",qn="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Jn="https://decentraland.today/marketplace/settings",Xn="https://dcl.gg/discord",Zn="https://reddit.com/r/decentraland",to="https://github.com/decentraland",eo="https://x.com/decentraland",no="https://instagram.com/decentraland_foundation/",oo="https://youtube.com/@decentraland_foundation",ao="https://tiktok.com/@decentraland_fdn",so="https://linkedin.com/company/decentralandorg",ro="https://decentraland.org/privacy",co="https://decentraland.org/terms",_o="https://decentraland.org/content",lo="https://decentraland.org/ethics",Ro="https://decentraland.org/help",Lo="mailto:hello@decentraland.org",Eo="https://docs.decentraland.org/faqs/decentraland-101",Uo="https://docs.decentraland.org",io="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",po="https://download-gateway.decentraland.zone",So="https://decentraland.zone/top-scenes",Oo="https://testflight.apple.com/join/KF4r3jlU",Ao="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",To={WEARABLE_PREVIEW_URL:Ln,ACCOUNT_URL:En,PROFILE_URL:Un,MARKETPLACE_URL:pn,BUILDER_URL:Sn,DAO_URL:On,GOVERNANCE_URL:An,EVENTS_URL:Tn,PLACES_URL:hn,CREATE_URL:Nn,LEARN_URL:Cn,CREATOR_HUB_URL:gn,DOWNLOAD_URL:mn,DOWNLOAD_SUCCESS_URL:In,CONTENTFUL_SPACE_ID:un,CONTENTFUL_ENV:Dn,CONTENTFUL_NAVBAR_ENTRY_ID:$n,CONTENTFUL_CONTENTFUL_CDN_URL:Pn,MARKETPLACE_NAMES_URL:fn,MARKETPLACE_LANDS_URL:vn,MARKETPLACE_MY_ASSETS_URL:yn,LANDING_CREATORS_URL:Bn,STUDIOS_URL:bn,BUILDER_WEARABLE_EMOTES_URL:Mn,BUILDER_NAMES_URL:Vn,BUILDER_WORLDS_URL:Fn,BUILDER_LAND_URL:Gn,EVENTS_MY_EVENTS:zn,PLACES_MY_FAVORITE_URL:wn,DOCS_ABOUT_URL:Kn,DOCS_CREATORS_URL:Yn,BLOG_URL:kn,DOCS_CONTRIBUTOR_URL:xn,GOVERNANCE_TRANSPARENCY_URL:Wn,GOVERNANCE_PROPOSALS_URL:Hn,DAO_GRANTS_URL:jn,GOVERNANCE_PROJECTS_URL:Qn,DOCS_DAO_URL:qn,MARKETPLACE_SETTINGS_URL:Jn,DISCORD_URL:Xn,REDDIT_URL:Zn,GITHUB_URL:to,X_URL:eo,INSTAGRAM_URL:no,YOUTUBE_URL:oo,TIKTOK_URL:ao,LINKEDIN_URL:so,PRIVACY_POLICY_URL:ro,TERMS_OF_USE_URL:co,CONTENT_POLICY_URL:_o,CODE_OF_ETHICS_URL:lo,SUPPORT_URL:Ro,EMAIL_HELLO_URL:Lo,FAQ_URL:Eo,DOCS_URL:Uo,BEEHIV_SUBSCRIPTION_URL:io,AUTO_SIGNING_BASE_URL:po,TOP_SCENES_URL:So,IOS_STORE_URL:Oo,ANDROID_STORE_URL:Ao},Bo=M({[I.DEVELOPMENT]:ae,[I.STAGING]:To,[I.PRODUCTION]:Rn});var ho=V,No=function(t){return t!=="theme"},v=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ho:No},y=function(t,o,a){var e;if(o){var c=o.shouldForwardProp;e=t.__emotion_forwardProp&&c?function(l){return t.__emotion_forwardProp(l)&&c(l)}:c}return typeof e!="function"&&a&&(e=t.__emotion_forwardProp),e},Co=function(t){var o=t.cache,a=t.serialized,e=t.isStringTag;return K(o,a,e),Y(function(){return k(o,a,e)}),null},go=function n(t,o){var a=t.__emotion_real===t,e=a&&t.__emotion_base||t,c,l;o!==void 0&&(c=o.label,l=o.target);var L=y(t,o,a),S=L||v(e),U=!S("as");return function(){var R=arguments,r=a&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(c!==void 0&&r.push("label:"+c+";"),R[0]==null||R[0].raw===void 0)r.push.apply(r,R);else{var E=R[0];r.push(E[0]);for(var p=R.length,_=1;_<p;_++)r.push(R[_],E[_])}var d=F(function(s,i,T){var m=U&&s.as||e,A="",D=[],h=s;if(s.theme==null){h={};for(var $ in s)h[$]=s[$];h.theme=O.useContext(G)}typeof s.className=="string"?A=z(i.registered,D,s.className):s.className!=null&&(A=s.className+" ");var P=w(r.concat(D),i.registered,h);A+=i.key+"-"+P.name,l!==void 0&&(A+=" "+l);var b=U&&L===void 0?v(m):S,N={};for(var C in s)U&&C==="as"||b(C)&&(N[C]=s[C]);return N.className=A,T&&(N.ref=T),O.createElement(O.Fragment,null,O.createElement(Co,{cache:i,serialized:P,isStringTag:typeof m=="string"}),O.createElement(m,N))});return d.displayName=c!==void 0?c:"Styled("+(typeof e=="string"?e:e.displayName||e.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=e,d.__emotion_styles=r,d.__emotion_forwardProp=L,Object.defineProperty(d,"toString",{value:function(){return"."+l}}),d.withComponent=function(s,i){var T=n(s,u({},o,i,{shouldForwardProp:y(d,i,!0)}));return T.apply(void 0,r)},d}},mo=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],B=go.bind(null);mo.forEach(function(n){B[n]=B(n)});function Io(n){return x("MuiSvgIcon",n)}W("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const uo=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Do=n=>{const{color:t,fontSize:o,classes:a}=n,e={root:["root",t!=="inherit"&&`color${g(t)}`,`fontSize${g(o)}`]};return q(e,Io,a)},$o=J("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(n,t)=>{const{ownerState:o}=n;return[t.root,o.color!=="inherit"&&t[`color${g(o.color)}`],t[`fontSize${g(o.fontSize)}`]]}})(({theme:n,ownerState:t})=>{var o,a,e,c,l,L,S,U,R,r,E,p,_;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(o=n.transitions)==null||(a=o.create)==null?void 0:a.call(o,"fill",{duration:(e=n.transitions)==null||(e=e.duration)==null?void 0:e.shorter}),fontSize:{inherit:"inherit",small:((c=n.typography)==null||(l=c.pxToRem)==null?void 0:l.call(c,20))||"1.25rem",medium:((L=n.typography)==null||(S=L.pxToRem)==null?void 0:S.call(L,24))||"1.5rem",large:((U=n.typography)==null||(R=U.pxToRem)==null?void 0:R.call(U,35))||"2.1875rem"}[t.fontSize],color:(r=(E=(n.vars||n).palette)==null||(E=E[t.color])==null?void 0:E.main)!=null?r:{action:(p=(n.vars||n).palette)==null||(p=p.action)==null?void 0:p.active,disabled:(_=(n.vars||n).palette)==null||(_=_.action)==null?void 0:_.disabled,inherit:void 0}[t.color]}}),Po=O.forwardRef(function(t,o){const a=H({props:t,name:"MuiSvgIcon"}),{children:e,className:c,color:l="inherit",component:L="svg",fontSize:S="medium",htmlColor:U,inheritViewBox:R=!1,titleAccess:r,viewBox:E="0 0 24 24"}=a,p=j(a,uo),_=O.isValidElement(e)&&e.type==="svg",d=u({},a,{color:l,component:L,fontSize:S,instanceFontSize:t.fontSize,inheritViewBox:R,viewBox:E,hasSvgAsChild:_}),s={};R||(s.viewBox=E);const i=Do(d);return f.jsxs($o,u({as:L,className:Q(i.root,c),focusable:"false",color:U,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:o},s,p,_&&e.props,{ownerState:d,children:[_?e.props.children:e,r?f.jsx("title",{children:r}):null]}))});Po.muiName="SvgIcon";export{Po as S,Bo as c,B as n};
|
|
1
|
+
import{a0 as M,a1 as I}from"./index-DDfYFIH_.js";import{b as u,i as V,w as F,T as G,h as z,j as w,r as K,l as Y,m as k,g as x,a as W,u as H,_ as j,c as Q,d as g,e as q,s as J}from"./generateUtilityClasses-BZqFSfTv.js";import{r as O,j as f}from"./react-E8ng6RF2.js";const X="https://wearable-preview.decentraland.zone",Z="https://decentraland.zone/account",tt="https://decentraland.zone/profile",et="https://decentraland.zone/marketplace",nt="https://decentraland.zone/builder",ot="https://decentraland.zone/dao",at="https://decentraland.zone/governance",st="https://decentraland.zone/events",rt="https://decentraland.zone/places",ct="https://decentraland.org/create/",dt="https://docs.decentraland.org/player/",_t="https://decentraland.zone/download/creator-hub/",lt="https://decentraland.zone/download/",Rt="https://decentraland.zone/download_success/",Lt="ea2ybdmmn1kv",Et="master",Ut="18g1DzIyBxvu0steSwKyQr",it="https://cms.decentraland.org",pt="https://decentraland.zone/marketplace/names/claim",St="https://decentraland.zone/marketplace/lands",Ot="https://decentraland.zone/marketplace/account",At="https://decentraland.zone/create/",Tt="https://studios.decentraland.zone/",ht="https://decentraland.zone/builder/collections",Nt="https://decentraland.zone/builder/names",Ct="https://decentraland.zone/builder/worlds?tab=dcl",gt="https://decentraland.zone/builder/land",mt="https://decentraland.zone/events/me/",It="https://decentraland.zone/places/favorites/",ut="https://docs.decentraland.org/player/",Dt="https://docs.decentraland.org/creator/",$t="https://decentraland.zone/blog/",Pt="https://docs.decentraland.org/contributor/",ft="https://decentraland.zone/governance/transparency/",vt="https://decentraland.zone/governance/proposals/",yt="https://decentraland.zone/dao/grants/",Bt="https://decentraland.zone/governance/projects/",bt="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Mt="https://decentraland.zone/marketplace/settings",Vt="https://dcl.gg/discord",Ft="https://reddit.com/r/decentraland",Gt="https://github.com/decentraland",zt="https://x.com/decentraland",wt="https://instagram.com/decentraland_foundation/",Kt="https://youtube.com/@decentraland_foundation",Yt="https://tiktok.com/@decentraland_fdn",kt="https://linkedin.com/company/decentralandorg",xt="https://decentraland.zone/privacy",Wt="https://decentraland.zone/terms",Ht="https://decentraland.zone/content",jt="https://decentraland.zone/ethics",Qt="https://decentraland.org/help",qt="mailto:hello@decentraland.org",Jt="https://docs.decentraland.org/faqs/decentraland-101",Xt="https://docs.decentraland.org",Zt="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",te="https://download-gateway.decentraland.zone",ee="https://decentraland.zone/top-scenes",ne="https://testflight.apple.com/join/KF4r3jlU",oe="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",ae={WEARABLE_PREVIEW_URL:X,ACCOUNT_URL:Z,PROFILE_URL:tt,MARKETPLACE_URL:et,BUILDER_URL:nt,DAO_URL:ot,GOVERNANCE_URL:at,EVENTS_URL:st,PLACES_URL:rt,CREATE_URL:ct,LEARN_URL:dt,CREATOR_HUB_URL:_t,DOWNLOAD_URL:lt,DOWNLOAD_SUCCESS_URL:Rt,CONTENTFUL_SPACE_ID:Lt,CONTENTFUL_ENV:Et,CONTENTFUL_NAVBAR_ENTRY_ID:Ut,CONTENTFUL_CONTENTFUL_CDN_URL:it,MARKETPLACE_NAMES_URL:pt,MARKETPLACE_LANDS_URL:St,MARKETPLACE_MY_ASSETS_URL:Ot,LANDING_CREATORS_URL:At,STUDIOS_URL:Tt,BUILDER_WEARABLE_EMOTES_URL:ht,BUILDER_NAMES_URL:Nt,BUILDER_WORLDS_URL:Ct,BUILDER_LAND_URL:gt,EVENTS_MY_EVENTS:mt,PLACES_MY_FAVORITE_URL:It,DOCS_ABOUT_URL:ut,DOCS_CREATORS_URL:Dt,BLOG_URL:$t,DOCS_CONTRIBUTOR_URL:Pt,GOVERNANCE_TRANSPARENCY_URL:ft,GOVERNANCE_PROPOSALS_URL:vt,DAO_GRANTS_URL:yt,GOVERNANCE_PROJECTS_URL:Bt,DOCS_DAO_URL:bt,MARKETPLACE_SETTINGS_URL:Mt,DISCORD_URL:Vt,REDDIT_URL:Ft,GITHUB_URL:Gt,X_URL:zt,INSTAGRAM_URL:wt,YOUTUBE_URL:Kt,TIKTOK_URL:Yt,LINKEDIN_URL:kt,PRIVACY_POLICY_URL:xt,TERMS_OF_USE_URL:Wt,CONTENT_POLICY_URL:Ht,CODE_OF_ETHICS_URL:jt,SUPPORT_URL:Qt,EMAIL_HELLO_URL:qt,FAQ_URL:Jt,DOCS_URL:Xt,BEEHIV_SUBSCRIPTION_URL:Zt,AUTO_SIGNING_BASE_URL:te,TOP_SCENES_URL:ee,IOS_STORE_URL:ne,ANDROID_STORE_URL:oe},se="https://wearable-preview.decentraland.org",re="https://decentraland.org/account",ce="https://decentraland.org/profile",de="https://decentraland.org/marketplace",_e="https://decentraland.org/builder",le="https://decentraland.org/dao",Re="https://decentraland.org/governance",Le="https://decentraland.org/events",Ee="https://decentraland.org/places",Ue="https://decentraland.org/create/",ie="https://docs.decentraland.org/player/",pe="https://decentraland.org/download/creator-hub/",Se="https://decentraland.org/download/",Oe="https://decentraland.org/download_success/",Ae="ea2ybdmmn1kv",Te="master",he="18g1DzIyBxvu0steSwKyQr",Ne="https://cms.decentraland.org",Ce="https://decentraland.org/marketplace/names/claim",ge="https://decentraland.org/marketplace/lands",me="https://decentraland.org/marketplace/account",Ie="https://decentraland.org/create/",ue="https://studios.decentraland.org/",De="https://decentraland.org/builder/collections",$e="https://decentraland.org/builder/names",Pe="https://decentraland.org/builder/worlds?tab=dcl",fe="https://decentraland.org/builder/land",ve="https://decentraland.org/events/me/",ye="https://decentraland.org/places/favorites/",Be="https://docs.decentraland.org/player/",be="https://docs.decentraland.org/creator/",Me="https://decentraland.org/blog/",Ve="https://docs.decentraland.org/contributor/",Fe="https://decentraland.org/governance/transparency/",Ge="https://decentraland.org/governance/proposals/",ze="https://decentraland.org/dao/grants/",we="https://decentraland.org/governance/projects/",Ke="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Ye="https://decentraland.org/marketplace/settings",ke="https://dcl.gg/discord",xe="https://reddit.com/r/decentraland",We="https://github.com/decentraland",He="https://x.com/decentraland",je="https://instagram.com/decentraland_foundation/",Qe="https://youtube.com/@decentraland_foundation",qe="https://tiktok.com/@decentraland_fdn",Je="https://linkedin.com/company/decentralandorg",Xe="https://decentraland.org/privacy",Ze="https://decentraland.org/terms",tn="https://decentraland.org/content",en="https://decentraland.org/ethics",nn="https://decentraland.org/help",on="mailto:hello@decentraland.org",an="https://docs.decentraland.org/faqs/decentraland-101",sn="https://docs.decentraland.org",rn="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",cn="https://download-gateway.decentraland.org",dn="https://decentraland.org/top-scenes",_n="https://testflight.apple.com/join/KF4r3jlU",ln="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Rn={WEARABLE_PREVIEW_URL:se,ACCOUNT_URL:re,PROFILE_URL:ce,MARKETPLACE_URL:de,BUILDER_URL:_e,DAO_URL:le,GOVERNANCE_URL:Re,EVENTS_URL:Le,PLACES_URL:Ee,CREATE_URL:Ue,LEARN_URL:ie,CREATOR_HUB_URL:pe,DOWNLOAD_URL:Se,DOWNLOAD_SUCCESS_URL:Oe,CONTENTFUL_SPACE_ID:Ae,CONTENTFUL_ENV:Te,CONTENTFUL_NAVBAR_ENTRY_ID:he,CONTENTFUL_CONTENTFUL_CDN_URL:Ne,MARKETPLACE_NAMES_URL:Ce,MARKETPLACE_LANDS_URL:ge,MARKETPLACE_MY_ASSETS_URL:me,LANDING_CREATORS_URL:Ie,STUDIOS_URL:ue,BUILDER_WEARABLE_EMOTES_URL:De,BUILDER_NAMES_URL:$e,BUILDER_WORLDS_URL:Pe,BUILDER_LAND_URL:fe,EVENTS_MY_EVENTS:ve,PLACES_MY_FAVORITE_URL:ye,DOCS_ABOUT_URL:Be,DOCS_CREATORS_URL:be,BLOG_URL:Me,DOCS_CONTRIBUTOR_URL:Ve,GOVERNANCE_TRANSPARENCY_URL:Fe,GOVERNANCE_PROPOSALS_URL:Ge,DAO_GRANTS_URL:ze,GOVERNANCE_PROJECTS_URL:we,DOCS_DAO_URL:Ke,MARKETPLACE_SETTINGS_URL:Ye,DISCORD_URL:ke,REDDIT_URL:xe,GITHUB_URL:We,X_URL:He,INSTAGRAM_URL:je,YOUTUBE_URL:Qe,TIKTOK_URL:qe,LINKEDIN_URL:Je,PRIVACY_POLICY_URL:Xe,TERMS_OF_USE_URL:Ze,CONTENT_POLICY_URL:tn,CODE_OF_ETHICS_URL:en,SUPPORT_URL:nn,EMAIL_HELLO_URL:on,FAQ_URL:an,DOCS_URL:sn,BEEHIV_SUBSCRIPTION_URL:rn,AUTO_SIGNING_BASE_URL:cn,TOP_SCENES_URL:dn,IOS_STORE_URL:_n,ANDROID_STORE_URL:ln},Ln="https://wearable-preview.decentraland.today",En="https://decentraland.today/account",Un="https://decentraland.today/profile",pn="https://decentraland.today/marketplace",Sn="https://decentraland.today/builder",On="https://decentraland.today/dao",An="https://decentraland.today/governance",Tn="https://decentraland.zone/events",hn="https://decentraland.zone/places",Nn="https://decentraland.today/create/",Cn="https://docs.decentraland.org/player/",gn="https://decentraland.today/download/creator-hub/",mn="https://decentraland.today/download/",In="https://decentraland.today/download_success/",un="ea2ybdmmn1kv",Dn="master",$n="18g1DzIyBxvu0steSwKyQr",Pn="https://cms.decentraland.org",fn="https://decentraland.today/marketplace/names/claim",vn="https://decentraland.today/marketplace/lands",yn="https://decentraland.today/marketplace/account",Bn="https://decentraland.today/create/",bn="https://studios.decentraland.today/",Mn="https://decentraland.today/builder/collections",Vn="https://decentraland.today/builder/names",Fn="https://decentraland.today/builder/worlds?tab=dcl",Gn="https://decentraland.today/builder/land",zn="https://decentraland.today/events/me/",wn="https://decentraland.today/places/favorites/",Kn="https://docs.decentraland.org/player/",Yn="https://docs.decentraland.org/creator/",kn="https://decentraland.today/blog/",xn="https://docs.decentraland.org/contributor/",Wn="https://decentraland.today/governance/transparency/",Hn="https://decentraland.today/governance/proposals/",jn="https://decentraland.today/dao/grants/",Qn="https://decentraland.today/governance/projects/",qn="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Jn="https://decentraland.today/marketplace/settings",Xn="https://dcl.gg/discord",Zn="https://reddit.com/r/decentraland",to="https://github.com/decentraland",eo="https://x.com/decentraland",no="https://instagram.com/decentraland_foundation/",oo="https://youtube.com/@decentraland_foundation",ao="https://tiktok.com/@decentraland_fdn",so="https://linkedin.com/company/decentralandorg",ro="https://decentraland.org/privacy",co="https://decentraland.org/terms",_o="https://decentraland.org/content",lo="https://decentraland.org/ethics",Ro="https://decentraland.org/help",Lo="mailto:hello@decentraland.org",Eo="https://docs.decentraland.org/faqs/decentraland-101",Uo="https://docs.decentraland.org",io="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",po="https://download-gateway.decentraland.zone",So="https://decentraland.zone/top-scenes",Oo="https://testflight.apple.com/join/KF4r3jlU",Ao="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",To={WEARABLE_PREVIEW_URL:Ln,ACCOUNT_URL:En,PROFILE_URL:Un,MARKETPLACE_URL:pn,BUILDER_URL:Sn,DAO_URL:On,GOVERNANCE_URL:An,EVENTS_URL:Tn,PLACES_URL:hn,CREATE_URL:Nn,LEARN_URL:Cn,CREATOR_HUB_URL:gn,DOWNLOAD_URL:mn,DOWNLOAD_SUCCESS_URL:In,CONTENTFUL_SPACE_ID:un,CONTENTFUL_ENV:Dn,CONTENTFUL_NAVBAR_ENTRY_ID:$n,CONTENTFUL_CONTENTFUL_CDN_URL:Pn,MARKETPLACE_NAMES_URL:fn,MARKETPLACE_LANDS_URL:vn,MARKETPLACE_MY_ASSETS_URL:yn,LANDING_CREATORS_URL:Bn,STUDIOS_URL:bn,BUILDER_WEARABLE_EMOTES_URL:Mn,BUILDER_NAMES_URL:Vn,BUILDER_WORLDS_URL:Fn,BUILDER_LAND_URL:Gn,EVENTS_MY_EVENTS:zn,PLACES_MY_FAVORITE_URL:wn,DOCS_ABOUT_URL:Kn,DOCS_CREATORS_URL:Yn,BLOG_URL:kn,DOCS_CONTRIBUTOR_URL:xn,GOVERNANCE_TRANSPARENCY_URL:Wn,GOVERNANCE_PROPOSALS_URL:Hn,DAO_GRANTS_URL:jn,GOVERNANCE_PROJECTS_URL:Qn,DOCS_DAO_URL:qn,MARKETPLACE_SETTINGS_URL:Jn,DISCORD_URL:Xn,REDDIT_URL:Zn,GITHUB_URL:to,X_URL:eo,INSTAGRAM_URL:no,YOUTUBE_URL:oo,TIKTOK_URL:ao,LINKEDIN_URL:so,PRIVACY_POLICY_URL:ro,TERMS_OF_USE_URL:co,CONTENT_POLICY_URL:_o,CODE_OF_ETHICS_URL:lo,SUPPORT_URL:Ro,EMAIL_HELLO_URL:Lo,FAQ_URL:Eo,DOCS_URL:Uo,BEEHIV_SUBSCRIPTION_URL:io,AUTO_SIGNING_BASE_URL:po,TOP_SCENES_URL:So,IOS_STORE_URL:Oo,ANDROID_STORE_URL:Ao},Bo=M({[I.DEVELOPMENT]:ae,[I.STAGING]:To,[I.PRODUCTION]:Rn});var ho=V,No=function(t){return t!=="theme"},v=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ho:No},y=function(t,o,a){var e;if(o){var c=o.shouldForwardProp;e=t.__emotion_forwardProp&&c?function(l){return t.__emotion_forwardProp(l)&&c(l)}:c}return typeof e!="function"&&a&&(e=t.__emotion_forwardProp),e},Co=function(t){var o=t.cache,a=t.serialized,e=t.isStringTag;return K(o,a,e),Y(function(){return k(o,a,e)}),null},go=function n(t,o){var a=t.__emotion_real===t,e=a&&t.__emotion_base||t,c,l;o!==void 0&&(c=o.label,l=o.target);var L=y(t,o,a),S=L||v(e),U=!S("as");return function(){var R=arguments,r=a&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(c!==void 0&&r.push("label:"+c+";"),R[0]==null||R[0].raw===void 0)r.push.apply(r,R);else{var E=R[0];r.push(E[0]);for(var p=R.length,_=1;_<p;_++)r.push(R[_],E[_])}var d=F(function(s,i,T){var m=U&&s.as||e,A="",D=[],h=s;if(s.theme==null){h={};for(var $ in s)h[$]=s[$];h.theme=O.useContext(G)}typeof s.className=="string"?A=z(i.registered,D,s.className):s.className!=null&&(A=s.className+" ");var P=w(r.concat(D),i.registered,h);A+=i.key+"-"+P.name,l!==void 0&&(A+=" "+l);var b=U&&L===void 0?v(m):S,N={};for(var C in s)U&&C==="as"||b(C)&&(N[C]=s[C]);return N.className=A,T&&(N.ref=T),O.createElement(O.Fragment,null,O.createElement(Co,{cache:i,serialized:P,isStringTag:typeof m=="string"}),O.createElement(m,N))});return d.displayName=c!==void 0?c:"Styled("+(typeof e=="string"?e:e.displayName||e.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=e,d.__emotion_styles=r,d.__emotion_forwardProp=L,Object.defineProperty(d,"toString",{value:function(){return"."+l}}),d.withComponent=function(s,i){var T=n(s,u({},o,i,{shouldForwardProp:y(d,i,!0)}));return T.apply(void 0,r)},d}},mo=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],B=go.bind(null);mo.forEach(function(n){B[n]=B(n)});function Io(n){return x("MuiSvgIcon",n)}W("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const uo=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Do=n=>{const{color:t,fontSize:o,classes:a}=n,e={root:["root",t!=="inherit"&&`color${g(t)}`,`fontSize${g(o)}`]};return q(e,Io,a)},$o=J("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(n,t)=>{const{ownerState:o}=n;return[t.root,o.color!=="inherit"&&t[`color${g(o.color)}`],t[`fontSize${g(o.fontSize)}`]]}})(({theme:n,ownerState:t})=>{var o,a,e,c,l,L,S,U,R,r,E,p,_;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(o=n.transitions)==null||(a=o.create)==null?void 0:a.call(o,"fill",{duration:(e=n.transitions)==null||(e=e.duration)==null?void 0:e.shorter}),fontSize:{inherit:"inherit",small:((c=n.typography)==null||(l=c.pxToRem)==null?void 0:l.call(c,20))||"1.25rem",medium:((L=n.typography)==null||(S=L.pxToRem)==null?void 0:S.call(L,24))||"1.5rem",large:((U=n.typography)==null||(R=U.pxToRem)==null?void 0:R.call(U,35))||"2.1875rem"}[t.fontSize],color:(r=(E=(n.vars||n).palette)==null||(E=E[t.color])==null?void 0:E.main)!=null?r:{action:(p=(n.vars||n).palette)==null||(p=p.action)==null?void 0:p.active,disabled:(_=(n.vars||n).palette)==null||(_=_.action)==null?void 0:_.disabled,inherit:void 0}[t.color]}}),Po=O.forwardRef(function(t,o){const a=H({props:t,name:"MuiSvgIcon"}),{children:e,className:c,color:l="inherit",component:L="svg",fontSize:S="medium",htmlColor:U,inheritViewBox:R=!1,titleAccess:r,viewBox:E="0 0 24 24"}=a,p=j(a,uo),_=O.isValidElement(e)&&e.type==="svg",d=u({},a,{color:l,component:L,fontSize:S,instanceFontSize:t.fontSize,inheritViewBox:R,viewBox:E,hasSvgAsChild:_}),s={};R||(s.viewBox=E);const i=Do(d);return f.jsxs($o,u({as:L,className:Q(i.root,c),focusable:"false",color:U,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:o},s,p,_&&e.props,{ownerState:d,children:[_?e.props.children:e,r?f.jsx("title",{children:r}):null]}))});Po.muiName="SvgIcon";export{Po as S,Bo as c,B as n};
|