@dcl/shop 1.13.1-35339357506.commit-a201fb1 → 1.13.1-35585926635.commit-02c8d2e

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.
Files changed (248) hide show
  1. package/_assets/{Activity-BZMB4hg5.js → Activity-DoatD7MW.js} +4 -4
  2. package/_assets/{AnimatedBackground-CXVxNT-G.js → AnimatedBackground-dVEk0PGp.js} +6 -6
  3. package/_assets/Assets-CN1LU5Xt.js +980 -0
  4. package/_assets/Cart-Bwf6I0xV.js +748 -0
  5. package/_assets/{Collection-D7LTf_OS.js → Collection-CPZhq7CU.js} +9 -9
  6. package/_assets/{CollectionCarousel-DsJ7L4rs.js → CollectionCarousel-CrMGuIJ3.js} +4 -4
  7. package/_assets/{Confetti-cdj3K_E3.js → Confetti-Bd901H1c.js} +4 -4
  8. package/_assets/{ConstantsUtil-BRm3N2MJ.js → ConstantsUtil-Bk0e9ERj.js} +2 -2
  9. package/_assets/{ContentClient-BuGONJzu.js → ContentClient-CWtagBtE.js} +2 -2
  10. package/_assets/{Creator-DTGBDA7q.js → Creator-pBuqm0Cj.js} +2 -2
  11. package/_assets/{modal.styles-G1Y436F0.js → CreditPackPicker-COb2KClL.js} +83 -50
  12. package/_assets/{DeploymentBuilder-t6QMfSJh.js → DeploymentBuilder-Dg-EXfAY.js} +2 -2
  13. package/_assets/{EmotePlaybackBar-DxozN5dA.js → EmotePlaybackBar-DyYs6qdM.js} +3 -3
  14. package/_assets/{ErrorNotice-Dlh8ddHO.js → ErrorNotice-Cm0KaFyV.js} +2 -2
  15. package/_assets/Event-C9d1J0Kb.js +72 -0
  16. package/_assets/{ExchangeController-CSSF68uc.js → ExchangeController-BzBrR3ZT.js} +2 -2
  17. package/_assets/{Faq-DQCrsGCA.js → Faq-D2noxWN_.js} +2 -2
  18. package/_assets/{Filters-BsZs-9_M.js → Filters-Dw8HD8Ma.js} +2 -2
  19. package/_assets/{GetCredits-DLjX5S-_.js → GetCredits-BmFWdIGx.js} +2 -2
  20. package/_assets/{Grow-CBOQ3rs-.js → Grow-BiGjBqEo.js} +2 -2
  21. package/_assets/{HelpersUtil-ItKIMa0k.js → HelpersUtil-DQga4Ywl.js} +2 -2
  22. package/_assets/ItemDetail-BSwm3WSx.js +3779 -0
  23. package/_assets/{LoadMore-BxuVAL5h.js → LoadMore-i7_riiE5.js} +2 -2
  24. package/_assets/{ManaPricingBanner.styles-dfVXcaNP.js → ManaPricingBanner.styles-Dyx_YmBW.js} +2 -2
  25. package/_assets/{MyAssets-BbWDjYod.js → MyAssets-Bs1a3OD9.js} +2 -2
  26. package/_assets/{MyFavorites-DY192etV.js → MyFavorites-C03JcdtN.js} +2 -2
  27. package/_assets/{MyStore-qM8HV1zc.js → MyStore-ryCuwvDl.js} +2 -2
  28. package/_assets/{NetworkUtil-B4oEt17N.js → NetworkUtil-BbMBxyRo.js} +2 -2
  29. package/_assets/{NotFound-CgcYb0ih.js → NotFound-DOO8Ql2w.js} +2 -2
  30. package/_assets/{NotificationsBell-txLDBZgz.js → NotificationsBell-VR9lnc9P.js} +2 -2
  31. package/_assets/{OutfitDetail-EWQSU1q3.js → OutfitDetail-Co1A4WCO.js} +2 -2
  32. package/_assets/OutfitPreview-Ceha9IWa.js +7 -0
  33. package/_assets/{OutfitStudio-CymFpAjx.js → OutfitStudio-DGibRraW.js} +2 -2
  34. package/_assets/{SaleCountdown-3pApusNf.js → SaleCountdown-NdYuBnTu.js} +2 -2
  35. package/_assets/{Spinner-BhJFlkpV.js → Spinner-B5rI43ql.js} +2 -2
  36. package/_assets/{StoreSettings-CuaXmFqQ.js → StoreSettings-C2dwtV13.js} +2 -2
  37. package/_assets/{Success-oMsLbOWh.js → Success-B6gpri2D.js} +2 -2
  38. package/_assets/{SwapController-DrYUKQJ9.js → SwapController-Di8HGSG3.js} +2 -2
  39. package/_assets/{Tooltip-BIdqgK8V.js → Tooltip-Bj-rfWuS.js} +2 -2
  40. package/_assets/{TradeService-JsADFsSl.js → TradeService-D2dJeuos.js} +2 -2
  41. package/_assets/{W3MFrameProviderSingleton-DvSh92CX.js → W3MFrameProviderSingleton-DwbyBYX9.js} +4 -4
  42. package/_assets/{WebCryptoP256-DgMWbKGz.js → WebCryptoP256-CZzgSMZW.js} +2 -2
  43. package/_assets/{basic-GpwOtGyM.js → basic-C0ccxPdk.js} +2 -2
  44. package/_assets/{biconomy-NuhcX0Yi.js → biconomy-DGsEEV8A.js} +2 -2
  45. package/_assets/{browseLayout.styles-D0MZbKfc.js → browseLayout.styles-Dg021Y7v.js} +2 -2
  46. package/_assets/{browser-CztLWw1I.js → browser-D3mkrR6N.js} +2 -2
  47. package/_assets/{browser-D0dzO3fx.js → browser-DfAY1k2K.js} +2 -2
  48. package/_assets/{browser-ponyfill-BdWvH_If.js → browser-ponyfill-C5RB02M7.js} +2 -2
  49. package/_assets/{buy-ZzigQNxZ.js → buy-Da1E8jgj.js} +2 -2
  50. package/_assets/{buy-gasless-5QIoW0es.js → buy-gasless-CaUM9sxG.js} +2 -2
  51. package/_assets/cart-checkout-uu8usx3x.js +2 -0
  52. package/_assets/{categories-BCcLvB19.js → categories-DeCaTWZU.js} +2 -2
  53. package/_assets/{ccip-CcFd-pp_.js → ccip-CIKPg0_h.js} +2 -2
  54. package/_assets/{ccip-0C-WJ2f3.js → ccip-CIPTk6YK.js} +2 -2
  55. package/_assets/{chains-BoWQ7jDs.js → chains-CWGwszpJ.js} +2 -2
  56. package/_assets/collectionPage.styles-DOzyhn9M.js +41 -0
  57. package/_assets/{common-aEQBU1aZ.js → common-DamPx7zD.js} +2 -2
  58. package/_assets/{controller-BHSkmDDd.js → controller-J7h5zgkf.js} +3 -3
  59. package/_assets/{core-Dnx08t4s.js → core-BILweyMC.js} +5 -5
  60. package/_assets/{createSvgIcon-C3DiORbY.js → createSvgIcon-BOJMqAuj.js} +2 -2
  61. package/_assets/{crumbs.styles-D969n73j.js → crumbs.styles-6TXvIB5e.js} +2 -2
  62. package/_assets/{custom-CyjlH7Cr.js → custom-CtbaVsvz.js} +2 -2
  63. package/_assets/{data-capture-BUt-tqa3.js → data-capture-D_Yc-lFk.js} +2 -2
  64. package/_assets/{dcl-schemas-CyEZVc6x.js → dcl-schemas-Do6ePE9M.js} +2 -2
  65. package/_assets/{decimals-BLhtmmbN.js → decimals-CPcEXrkP.js} +2 -2
  66. package/_assets/{decimals-CiM-QvAk.js → decimals-fY1-YeOV.js} +2 -2
  67. package/_assets/{detectExtension-CdbTZOKn.js → detectExtension-BzGhSQVN.js} +2 -2
  68. package/_assets/{disposePreview-D5v9GkJF.js → disposePreview-BhRqNFqz.js} +2 -2
  69. package/_assets/{email-BGoeypvI.js → email-CDJff6Le.js} +2 -2
  70. package/_assets/{embedded-wallet-Cg2BVqx1.js → embedded-wallet-OlJuY5Lb.js} +2 -2
  71. package/_assets/{emotion-styled.browser.esm-Bc8640ZT.js → emotion-styled.browser.esm-dqXx08M6.js} +2 -2
  72. package/_assets/{engine-BQ4XBK5G.js → engine-Cqgf8_-e.js} +2 -2
  73. package/_assets/{errors-DUBMk1_u.js → errors-COVZQXFS.js} +2 -2
  74. package/_assets/{estimate-l1-fee-Cvh02XjO.js → estimate-l1-fee-cwAe5Vqz.js} +2 -2
  75. package/_assets/{eth_estimateGas-BH-_dHsN.js → eth_estimateGas-Bi2jA3d6.js} +2 -2
  76. package/_assets/{eth_getStorageAt-CHailSu6.js → eth_getStorageAt-Drv0-oaq.js} +2 -2
  77. package/_assets/{eth_getTransactionCount-Ce8ytlz4.js → eth_getTransactionCount-u8vibbIm.js} +2 -2
  78. package/_assets/{ethereum-AiomgAl3.js → ethereum-Mtg8xwT8.js} +2 -2
  79. package/_assets/{ethers-CQbljc2C.js → ethers-DVrorjJ1.js} +2 -2
  80. package/_assets/{events-Ey8xQ1_i.js → events-CcYNTdVN.js} +2 -2
  81. package/_assets/{execute-CcyXPSES.js → execute-CoAxXj0W.js} +3 -3
  82. package/_assets/{extractIPFS-CZpI5_La.js → extractIPFS-DlbP2Osb.js} +2 -2
  83. package/_assets/{features-CW3BJut9.js → features-DNE6dOZ4.js} +2 -2
  84. package/_assets/{fetchTokenMetadata-zQ7k58lq.js → fetchTokenMetadata-CiNffAhl.js} +3 -3
  85. package/_assets/{field.styles-CNumGj8X.js → field.styles-Dsz8I5YB.js} +2 -2
  86. package/_assets/{fortmatic-D7_cu5X7.js → fortmatic-B2QacKOL.js} +2 -2
  87. package/_assets/{get-bytecode-ChEcvuHJ.js → get-bytecode-DCxZ_TJS.js} +2 -2
  88. package/_assets/{get-ecosystem-wallet-info-BXFPDksD.js → get-ecosystem-wallet-info-Dpf1xtjk.js} +2 -2
  89. package/_assets/{getBalance-CdWdKWho.js → getBalance-DacQHsEf.js} +3 -3
  90. package/_assets/{getInstalledModules-Dy7ryxbR.js → getInstalledModules-_KOhu2kj.js} +2 -2
  91. package/_assets/{getNFT-DEIlQj0F.js → getNFT-DLLMJ-N8.js} +2 -2
  92. package/_assets/{getNFT-CVhWquj2.js → getNFT-TgQU4sPn.js} +3 -3
  93. package/_assets/{grid.styles-DGwAy7au.js → grid.styles-zbj0YrVx.js} +2 -2
  94. package/_assets/{hashTypedData-CS0nSVCm.js → hashTypedData-C4V4k80v.js} +2 -2
  95. package/_assets/{hashTypedData-G7W_A13L.js → hashTypedData-CxzAx589.js} +2 -2
  96. package/_assets/{import-C1FMKChQ.js → import-p1kr6qLz.js} +2 -2
  97. package/_assets/{in-app-C03QvI9E.js → in-app-niBzraeI.js} +2 -2
  98. package/_assets/{in-app-wallet-calls-BSt_kW07.js → in-app-wallet-calls-Dyorin4y.js} +2 -2
  99. package/_assets/{index-QkD5v2W0.js → index-B1-eV0Yy.js} +2 -2
  100. package/_assets/{index-CbJaCRxI.js → index-B1DNuJsS.js} +2 -2
  101. package/_assets/{index-B4vPl9JJ.js → index-B39be1Q8.js} +2 -2
  102. package/_assets/{index-P_yp2lGD.js → index-B6iPDUS8.js} +2 -2
  103. package/_assets/{index-CAdxESjh.js → index-BC9VPSaU.js} +2 -2
  104. package/_assets/{index-B9BLMD9v.js → index-BEbVm5wA.js} +2 -2
  105. package/_assets/{index-CRdAPM4e.js → index-BW2_mJUZ.js} +2 -2
  106. package/_assets/{index-DNpS4XJW.js → index-BaeSw32D.js} +3 -3
  107. package/_assets/{index-B_Ukoyjo.js → index-BdTU9iVQ.js} +4 -4
  108. package/_assets/{index-Bx-HA0Fa.js → index-BdhRH7ae.js} +2 -2
  109. package/_assets/{index-TuFs6Mw_.js → index-BgrkbkKX.js} +3 -3
  110. package/_assets/{index-C0q8Kut4.js → index-BhPBG2XL.js} +2 -2
  111. package/_assets/{index-C53nEuU1.css → index-BhSgZf6d.css} +1 -1
  112. package/_assets/{index-SRawa_W1.js → index-Bpbs2w1c.js} +2 -2
  113. package/_assets/{index-WhAOvWl7.js → index-BrTe5eTC.js} +2 -2
  114. package/_assets/{index-CITTAZNc.js → index-BzKWq7pb.js} +2 -2
  115. package/_assets/{index-CZ765edO.js → index-C-cdcYSu.js} +2 -2
  116. package/_assets/{index-DBpSYzZ1.js → index-C9RSadCu.js} +2 -2
  117. package/_assets/{index-CMsQl6_s.js → index-CD44EXbq.js} +2 -2
  118. package/_assets/{index-BGlAHo1V.js → index-CEVRFChv.js} +2 -2
  119. package/_assets/{index-sc9WaH7T.js → index-CEbyUU5H.js} +2 -2
  120. package/_assets/{index-Cq3PcGZS.js → index-CKb-Chs7.js} +2 -2
  121. package/_assets/{index-ovxDr1NO.js → index-CRlpbq5e.js} +2 -2
  122. package/_assets/{index-ZSCJO9rV.js → index-CWE_Bdvd.js} +2 -2
  123. package/_assets/{index-CzzqMKs2.js → index-CWJFyp1v.js} +2 -2
  124. package/_assets/{index-mp9sO-P_.js → index-CWc56QrX.js} +2 -2
  125. package/_assets/{index-DUvDgJtL.js → index-CZEd2SGy.js} +3 -3
  126. package/_assets/{index-DCOfqwFn.js → index-CZmSHbVE.js} +2 -2
  127. package/_assets/{index-DiRK7oEZ.js → index-CcTOkZrG.js} +2 -2
  128. package/_assets/{index-201_pXjD.js → index-Ccey0v_W.js} +2 -2
  129. package/_assets/{index-BWhGWxu6.js → index-CfGsvFRR.js} +2 -2
  130. package/_assets/{index-DvGoWYRw.js → index-ChhJ84F9.js} +2 -2
  131. package/_assets/{index-Bc5rdQrs.js → index-Cn-ULh1k.js} +2 -2
  132. package/_assets/{index-B0G5-1U4.js → index-CpfmSBK0.js} +2 -2
  133. package/_assets/{index-C_MZ3G2Z.js → index-Cq-Etsdf.js} +2 -2
  134. package/_assets/{index-BjTaCUde.js → index-Csp5LciJ.js} +2 -2
  135. package/_assets/{index-DW4iGfw5.js → index-CwA52DzI.js} +2 -2
  136. package/_assets/{index-DbnwTj_J.js → index-CwoMLrsB.js} +2 -2
  137. package/_assets/{index-CseNtOsJ.js → index-CxNh07aM.js} +3 -3
  138. package/_assets/{index-Cbvqh2tB.js → index-CxOzFLm7.js} +2 -2
  139. package/_assets/{index-jG0dKzqZ.js → index-D05bb_h6.js} +2 -2
  140. package/_assets/{index-d0JdYucS.js → index-D8M-5R_3.js} +2 -2
  141. package/_assets/{index-CeBVhm3u.js → index-D8olnnil.js} +2 -2
  142. package/_assets/{index-Bvf3c8I8.js → index-DDb_ETfE.js} +2 -2
  143. package/_assets/{index-D-bvLCMJ.js → index-DLcPHJzx.js} +2 -2
  144. package/_assets/{index-BHRJojA7.js → index-DUaZ1t6t.js} +2 -2
  145. package/_assets/{index-DHAeKuI8.js → index-DXmPq_Kc.js} +2 -2
  146. package/_assets/{index-gx6q3jYb.js → index-D_SCQhiC.js} +2 -2
  147. package/_assets/{index-DzXb9yfS.js → index-Ddqdlsoi.js} +2 -2
  148. package/_assets/{index-DYEzTJ00.js → index-DeaVX3Ga.js} +2 -2
  149. package/_assets/{index-Dr8MILBs.js → index-DjQWTjO5.js} +2 -2
  150. package/_assets/{index-BDhEGVn5.js → index-DpJ4zJ7r.js} +2 -2
  151. package/_assets/{index-CSAbgA1H.js → index-Dpu-M2gs.js} +2 -2
  152. package/_assets/{index-BYpz1U-Z.js → index-DrGWXFkr.js} +2 -2
  153. package/_assets/{index-C8RRvl4w.js → index-Dyy6WQp0.js} +2 -2
  154. package/_assets/{index-Csid9_UU.js → index-DzWgqsYH.js} +2 -2
  155. package/_assets/{index-VVP1Lz5F.js → index-I_W87dfE.js} +2 -2
  156. package/_assets/{index-D7n0Nbcc.js → index-MqPRfHS_.js} +4 -4
  157. package/_assets/{index-DtQZWv2W.js → index-PmcUrVFZ.js} +2 -2
  158. package/_assets/{index-D080sfYK.js → index-U6lik-J8.js} +2 -2
  159. package/_assets/{index-4lxXm67R.js → index-WiX7N7NB.js} +2 -2
  160. package/_assets/{index-CtUq3VAh.js → index-_AZXosO6.js} +2 -2
  161. package/_assets/{index-CVjhybQY.js → index-gg05iP5j.js} +4 -4
  162. package/_assets/{index-rWvX-JNU.js → index-iRDDuzQN.js} +2 -2
  163. package/_assets/{index-Cy_pguIe.js → index-pibLOLKX.js} +2 -2
  164. package/_assets/{index-DmEpmcAI.js → index-rsyTCpy-.js} +2 -2
  165. package/_assets/{index-4y3ole-I.js → index-sTnDYGsF.js} +2 -2
  166. package/_assets/{index-BiR1vPRL.js → index-y9tZLe7Z.js} +13 -13
  167. package/_assets/{index.es-DmJ25C-K.js → index.es-BZZFX7UO.js} +2 -2
  168. package/_assets/{index.es-DF1aG5Z7.js → index.es-CPftFMVM.js} +2 -2
  169. package/_assets/{index.es-B3Zhssg2.js → index.es-CWkiohwA.js} +2 -2
  170. package/_assets/{index.es-CuJy51Rq.js → index.es-p9GOzpcM.js} +5 -5
  171. package/_assets/{items-empty-BAKFq7PT.js → items-empty-D3SdcrUb.js} +2 -2
  172. package/_assets/{jump-BolxKTOM.js → jump-BLEV_WoY.js} +2 -2
  173. package/_assets/{linkAccount-D4jgrDpa.js → linkAccount-DAFP48le.js} +2 -2
  174. package/_assets/{localBatchGatewayRequest-BMvn0i_b.js → localBatchGatewayRequest-dB8Wq4kD.js} +2 -2
  175. package/_assets/{modal.styles-wZfJxa-e.js → modal.styles-C5SxmNLg.js} +2 -2
  176. package/_assets/{native-BS9-NZgY.js → native-CBQhq49N.js} +2 -2
  177. package/_assets/{networks-BuXAUv57.js → networks-8H1PRpMW.js} +2 -2
  178. package/_assets/{onramp-B2gdYmCO.js → onramp-J5H4ebWV.js} +2 -2
  179. package/_assets/{openzeppelin-B_FytaNI.js → openzeppelin-D4p4dWkw.js} +2 -2
  180. package/_assets/{ownerOf-D6JpENJA.js → ownerOf-6NPphff8.js} +2 -2
  181. package/_assets/{parseNft-DiM6gxbM.js → parseNft-CNeONFsP.js} +3 -3
  182. package/_assets/{parseSignature-VwEmUV8h.js → parseSignature-CRChMV-U.js} +2 -2
  183. package/_assets/{parseSignature-BJVq2ShY.js → parseSignature-RdZmR6vg.js} +4 -4
  184. package/_assets/{passkeys-DEiWC5Z7.js → passkeys-asZ3JuTk.js} +2 -2
  185. package/_assets/{pay-with-exchange-C7Nm7Ic2.js → pay-with-exchange-Cv_5xsJB.js} +2 -2
  186. package/_assets/{prepare-contract-call-r6GCr7Mb.js → prepare-contract-call-Bgba2npe.js} +2 -2
  187. package/_assets/{qr-overlay-mbqSXRsy.js → qr-overlay-DkizM6BP.js} +4 -4
  188. package/_assets/{react-DKpLHQl0.js → react-ZT2P9-hV.js} +2 -2
  189. package/_assets/{receive-KMWzb1kT.js → receive-CawQ-n3T.js} +2 -2
  190. package/_assets/{resolveImplementation-NjDCaPa0.js → resolveImplementation-BVnQ0KdI.js} +2 -2
  191. package/_assets/{resume-buy-DRxVLtZn.js → resume-buy-VqFhR9e8.js} +2 -2
  192. package/_assets/{resume-name-m2sdJCvP.js → resume-name-CTz059A2.js} +2 -2
  193. package/_assets/{rpc-C6ONv-35.js → rpc-BJ7rd6au.js} +2 -2
  194. package/_assets/{sales-empty-BJGisiNF.js → sales-empty-l9JLZ5D0.js} +2 -2
  195. package/_assets/{search-empty-DcGDTM8L.js → search-empty-CkXuQVln.js} +2 -2
  196. package/_assets/{secp256k1-ZRJNrIuk.js → secp256k1-BGQ_Uqpo.js} +2 -2
  197. package/_assets/{secp256k1-BhLjMGke.js → secp256k1-BaU6Nn5x.js} +2 -2
  198. package/_assets/{secp256k1-Dogd-wfD.js → secp256k1-Bu5sn1ZV.js} +2 -2
  199. package/_assets/{send-B4t6gmpc.js → send-DONjIfwF.js} +2 -2
  200. package/_assets/{send-batch-transaction-BULbschT.js → send-batch-transaction-C_JYVBkw.js} +2 -2
  201. package/_assets/{send-eip712-transaction-B5q6HGy1.js → send-eip712-transaction-Clelg5Q-.js} +3 -3
  202. package/_assets/{send-gasless-transaction-BW_1tZ59.js → send-gasless-transaction-DNc4O0S0.js} +3 -3
  203. package/_assets/{send-transaction-D5g8ka92.js → send-transaction-pFbo31gg.js} +3 -3
  204. package/_assets/{sendMetaTransaction-BiqdXKVl.js → sendMetaTransaction-BcKatlZr.js} +2 -2
  205. package/_assets/{sendRawTransaction-DHZVBFUc.js → sendRawTransaction-BM57FQWh.js} +4 -4
  206. package/_assets/{sentry-WFsNKO98.js → sentry-qVQnooqM.js} +3 -3
  207. package/_assets/{serializeTransaction-C1OICSTJ.js → serializeTransaction-FdLqYQ-w.js} +2 -2
  208. package/_assets/{session-proposal-C_rldw8k.js → session-proposal-CAm5TVJB.js} +2 -2
  209. package/_assets/{session-request-DRsdGyCL.js → session-request-C8xtyN3L.js} +3 -3
  210. package/_assets/{sha256-YJL3wOOs.js → sha256-CcM85_-b.js} +2 -2
  211. package/_assets/{sha3-DxT-REZ2.js → sha3-FAYNGyBi.js} +2 -2
  212. package/_assets/signin-empty-UN_rVDWL.js +2 -0
  213. package/_assets/{signing-B9DcFwzm.js → signing-FPVJ2eSa.js} +4 -4
  214. package/_assets/{skeleton.styles-C4BBCe2d.js → skeleton.styles-DTLcQB9A.js} +2 -2
  215. package/_assets/{socials-Zki4qksa.js → socials-BHL-s99I.js} +2 -2
  216. package/_assets/{styled-uWbR3175.js → styled-BOKv7XKm.js} +2 -2
  217. package/_assets/{swaps-DiPvT9W6.js → swaps-DDuyuFV1.js} +2 -2
  218. package/_assets/{thirdweb-wDwbIJ1W.js → thirdweb-N4oYmhTQ.js} +4 -4
  219. package/_assets/{to-serializable-transaction-6f6pRX-q.js → to-serializable-transaction-DZXV0RS9.js} +3 -3
  220. package/_assets/{totalSupply-rJ9WcMzs.js → totalSupply-DnoXRYZk.js} +2 -2
  221. package/_assets/{trade-encoding-DcX77zVS.js → trade-encoding-JnGsRcov.js} +2 -2
  222. package/_assets/{transaction-DxXkarJJ.js → transaction-D82LqpKn.js} +2 -2
  223. package/_assets/{transactionReceipt-CxzioWsu.js → transactionReceipt-DEqK-l-5.js} +2 -2
  224. package/_assets/{transactions-BGQTb4VV.js → transactions-1TYNoevC.js} +2 -2
  225. package/_assets/{useCreatorSales-D4BzYp33.js → useCreatorSales-oruupPPN.js} +2 -2
  226. package/_assets/{useInfiniteGrid-BUDyyZZl.js → useInfiniteGrid-56c_34kP.js} +2 -2
  227. package/_assets/{useStore-tid_idJp.js → useStore-CGFjD1j7.js} +3 -3
  228. package/_assets/{useTheme-CRxh5DOu.js → useTheme-J18Pg7gw.js} +2 -2
  229. package/_assets/{utils-Cj21wfvp.js → utils-BE7z1_FY.js} +2 -2
  230. package/_assets/{verifyHash-mzlxS6TY.js → verifyHash-Buuby46g.js} +2 -2
  231. package/_assets/{w3m-modal-BArYWi0C.js → w3m-modal-BU-cBw0Z.js} +2 -2
  232. package/_assets/{w3m-modal-BXpuWB5y.js → w3m-modal-DhWirtG8.js} +2 -2
  233. package/_assets/{wait-for-tx-receipt-DRwGvrwD.js → wait-for-tx-receipt-CG08f_bj.js} +2 -2
  234. package/_assets/{wallets-HjCMtUn8.js → wallets-CMB2i32E.js} +6 -6
  235. package/_assets/{web-connector-15d-OnTN.js → web-connector-BPh_N46m.js} +4 -4
  236. package/_assets/{writeContract-BJQQGUKO.js → writeContract-BcpztdZJ.js} +2 -2
  237. package/_assets/{zora-sepolia-BFYuSeeX.js → zora-sepolia-arxykf8i.js} +2 -2
  238. package/_assets/{zoraTestnet-DdfVMUdb.js → zoraTestnet-DL2ClkoW.js} +2 -2
  239. package/index.html +11 -11
  240. package/package.json +2 -2
  241. package/_assets/Assets-tHTTA31T.js +0 -980
  242. package/_assets/Cart-BTFM7sgI.js +0 -748
  243. package/_assets/Event-B3nuIkGW.js +0 -72
  244. package/_assets/ItemDetail-Bfbuu0cW.js +0 -3779
  245. package/_assets/OutfitPreview-Cj1w-8ou.js +0 -7
  246. package/_assets/cart-checkout-D_rUzOn4.js +0 -2
  247. package/_assets/collectionPage.styles-rZa1BWWK.js +0 -41
  248. package/_assets/signin-empty-DXl1Qpby.js +0 -2
@@ -1,3779 +0,0 @@
1
- import{r as c,j as e,b as lt,L as ir,e as hs,a as ar}from"./react-DKpLHQl0.js";import{s as a,a as n,aG as Qe,t as i,I as P,a1 as xs,z as ve,F as Ge,C as ze,bh as zi,be as en,c as st,x as ot,bk as rr,bl as fs,aK as dt,bv as ms,bw as gs,O as X,bD as $e,bC as we,bE as Fn,l as ue,bB as pn,bA as sr,i as bs,d as ys,E as gt,bj as ws,bi as or,G as vs,bx as js,by as ks,d9 as $s,da as Cs,db as Is,dc as Ss,w as te,bg as As,a2 as tn,ba as nn,bL as On,bb as rt,p as lr,aT as Pt,cc as dr,H as Je,aq as ye,dd as Ms,M as zs,h as Rs,j as Ps,n as wt,aE as hn,a9 as cr,de as Ri,cY as Ls,f as ur,aF as Ts,df as Es,cb as Fs,dg as Bs,bO as Ns,dh as Ws,di as Ds,k as Os,af as Rt,b2 as qs,dj as Ks,a5 as Hs,dk as Us,b4 as Qs,dl as Gs,P as pr,W as hr,dm as xr,dn as _s,dp as Vs,aC as fr,dq as Js,dr as Ys,ds as Xs,dt as Zs,ch as eo,A as to,du as xn,V as no,bn as io,bo as ao,y as ro,m as so,dv as oo,dw as lo,dx as co,dy as uo,dz as po,ar as ho,as as xo,dA as fo,B as mo,dB as go,av as Pi,au as Li,dC as bo,dD as yo,Z as wo,bu as vo,dE as Ti,dF as jo,dG as ko,dH as $o,dI as Co,dJ as Io,dK as So,dL as Ao,dM as Mo}from"./index-BiR1vPRL.js";import{d as Ae}from"./dcl-schemas-CyEZVc6x.js";import{c as Ei,p as zo,i as Ro,A as mr,C as Po,b as Lo,h as Fi,j as To,k as Eo,l as Fo,n as Bo,m as No,t as Wo,a as Do,s as Oo}from"./CollectionCarousel-DsJ7L4rs.js";import{d as Bi,t as qo,e as Ni,G as Ko,c as Ho}from"./buy-ZzigQNxZ.js";import{c as Uo,i as an,D as Qo,S as Go,a as _o,b as Vo,f as Jo}from"./SaleCountdown-3pApusNf.js";import{u as Yo,M as Xo,f as Zo,b as el,c as tl}from"./cart-checkout-D_rUzOn4.js";import{m as Wi}from"./mana-matic-CEqvSwrJ.js";import{m as nl}from"./mana-matic-light-Bl5duieC.js";import{M as il,S as al,C as rl,H as sl,a as ol,T as ll,X as dl,B as cl,b as ul,c as pl,d as hl,e as at,f as xl,g as fl,h as ml,i as ft,j as De,W as Ut,m as Qt,n as Gt,o as gl,v as bl,w as yl,x as wl,y as vl,z as jl,D as kl,E as $l,F as Cl,G as Il,I as Sl,L as gr,P as br,k as yr,l as wr,J as Al,K as Ml,N as Di,A as zl,p as Rl,q as Pl,r as Ll,s as Tl,t as El,u as Fl}from"./modal.styles-G1Y436F0.js";import{q as vr,g as jr,t as Bl,s as Nl,a as Oi,b as Wl,d as Dl,i as Ol,e as ql,c as Kl,f as kr,m as Hl,k as Ul,r as Ql,n as Gl,p as _l}from"./trade-encoding-DcX77zVS.js";import{J as Vl,p as Jl,C as Yl,I as Xl}from"./ethers-CQbljc2C.js";import{a as Zl,w as $r,S as Cr,G as Ir,c as ed}from"./buy-gasless-5QIoW0es.js";import{R as qi}from"./resume-buy-DRxVLtZn.js";import{a as td,f as _e,i as yt}from"./errors-DUBMk1_u.js";import{C as nd}from"./Confetti-cdj3K_E3.js";import{b as id,J as ad,a as rd}from"./jump-BolxKTOM.js";import{p as Sr}from"./import-C1FMKChQ.js";import{E as Ve}from"./ErrorNotice-Dlh8ddHO.js";import{L as Ki,M as sd,B as od,H as ld,T as dd,A as cd}from"./modal.styles-wZfJxa-e.js";import{S as ud}from"./Spinner-BhJFlkpV.js";import{M as pd,E as hd,s as xd}from"./sendMetaTransaction-BiqdXKVl.js";import{E as fd}from"./EmotePlaybackBar-DxozN5dA.js";import{d as md}from"./disposePreview-D5v9GkJF.js";import{T as _t}from"./Tooltip-BIdqgK8V.js";import{S as gd}from"./categories-BCcLvB19.js";import{c as bd}from"./crumbs.styles-D969n73j.js";import"./sentry-WFsNKO98.js";import"./intl-AKLEHPeO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="f72bf9ac-921e-49c5-9532-4c28386c4b34",t._sentryDebugIdIdentifier="sentry-dbid-f72bf9ac-921e-49c5-9532-4c28386c4b34")}catch{}})();const Ar=216n,yd=(1n<<Ar)-1n;function wd(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>Ar).toString(),issuedId:(s&yd).toString()}}function vd(t){if(!t)return null;try{return wd(t).itemId}catch{return null}}const Mr=["cancelled-listings"];function jd(t,s){s&&t.setQueryData(Mr,l=>l!=null&&l.includes(s)?l:[...l??[],s])}function Hi(t,s){var l;if(s)return(l=t.getQueryData(Mr))!=null&&l.includes(s)?void 0:s}function Ui(t,s){return s.kind==="listed"?{...t,isOnSale:!0,listingPrice:s.priceCredits,tradeId:s.tradeId??t.tradeId}:{...t,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function fn(t,s,l){const{address:o,contractAddress:d,tokenId:u}=s;if(!d||!u)return;const x=`${d}-${u}`;t.cancelQueries({queryKey:["owned-token",d,u]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const m=l.kind==="gone";t.setQueriesData({queryKey:["owned-token",d,u]},$=>$&&(m?null:Ui($,l)));const y=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:y},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(m){const g=h.items.filter(w=>!(w.contractAddress===d&&w.tokenId===u));return{...h,items:g,total:Math.max(0,h.total-(h.items.length-g.length))}}return{...h,items:h.items.map(g=>g.contractAddress===d&&g.tokenId===u?Ui(g,l):g)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var g;if(!$)return $;const h={...$};return l.kind==="removed"||l.kind==="gone"?delete h[x]:h[x]={priceCredits:l.priceCredits,tradeId:l.tradeId??((g=h[x])==null?void 0:g.tradeId)??""},h})}function kd(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}const $d="data:image/webp;base64,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",Cd="data:image/webp;base64,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",Id=a.div`
2
- display: flex;
3
- flex-direction: column;
4
- gap: 24px;
5
- padding: 12px 16px 16px;
6
- min-height: 0;
7
- overflow-y: auto;
8
- `,Sd=a.div`
9
- display: flex;
10
- align-items: center;
11
- justify-content: space-between;
12
- gap: 8px;
13
- padding-bottom: 16px;
14
- border-bottom: 1px solid ${n.colors.gray4};
15
- `,Ad=a.h2`
16
- margin: 0;
17
- font-family: ${n.font.sans};
18
- font-weight: 600;
19
- font-size: 20px;
20
- line-height: 1.6;
21
- color: ${n.colors.text};
22
- `,Md=a.button`
23
- flex: none;
24
- display: grid;
25
- place-items: center;
26
- width: 18.535px;
27
- height: 18.535px;
28
- border: 0;
29
- background: none;
30
- cursor: pointer;
31
- color: ${n.colors.text};
32
-
33
- &:disabled {
34
- opacity: 0.4;
35
- cursor: default;
36
- }
37
- &:focus-visible {
38
- outline: 2px solid ${n.colors.accent};
39
- outline-offset: 2px;
40
- }
41
- `,zd=a.div`
42
- display: flex;
43
- align-items: center;
44
- gap: 12px;
45
- `,Rd=a.div`
46
- flex: none;
47
- display: grid;
48
- place-items: center;
49
- width: 180.465px;
50
- height: 179.763px;
51
- border-radius: 15.746px;
52
- background: ${n.colors.media};
53
- border: 0.176px solid ${n.colors.muted2};
54
- overflow: hidden;
55
-
56
- img {
57
- width: 149.568px;
58
- height: 148.866px;
59
- object-fit: contain;
60
- filter: drop-shadow(0.736px 2.945px 3.682px rgba(0, 0, 0, 0.1));
61
- }
62
-
63
- ${n.media.maxWidth("mobile")} {
64
- width: 120px;
65
- height: 120px;
66
- }
67
- `,Pd=a.div`
68
- flex: 1 1 0;
69
- min-width: 0;
70
- display: flex;
71
- flex-direction: column;
72
- gap: 32px;
73
- padding: 8px;
74
- `,Ld=a.p`
75
- margin: 0;
76
- font-family: ${n.font.sans};
77
- font-weight: 600;
78
- font-size: 20px;
79
- line-height: 1.57;
80
- color: ${n.colors.text};
81
- overflow: hidden;
82
- text-overflow: ellipsis;
83
- `,Td=a.div`
84
- > div {
85
- font-family: ${n.font.sans};
86
- font-size: 10px;
87
- line-height: 1.43;
88
- color: ${n.colors.muted};
89
- }
90
- `,Ed=a.div`
91
- display: flex;
92
- align-items: center;
93
- gap: 4px;
94
-
95
- /* A 24px slot holding a 19.855px glyph — keep both boxes rather than one flat size. */
96
- .ico {
97
- width: 24px;
98
- height: 24px;
99
- background: ${n.colors.text2};
100
- -webkit-mask-size: 19.855px 19.855px;
101
- mask-size: 19.855px 19.855px;
102
- -webkit-mask-position: left center;
103
- mask-position: left center;
104
- }
105
- span {
106
- font-family: ${n.font.sans};
107
- font-weight: 600;
108
- font-size: 24px;
109
- color: ${n.colors.text2};
110
- }
111
- `,Fd=a.div`
112
- display: flex;
113
- flex-direction: column;
114
- gap: 12px;
115
- `,Qi=a.button`
116
- position: relative;
117
- display: flex;
118
- align-items: center;
119
- justify-content: space-between;
120
- width: 100%;
121
- padding: 12px 12px 12px 0;
122
- border-radius: 12px;
123
- border: 0;
124
- background: ${n.colors.white};
125
- cursor: pointer;
126
- text-align: left;
127
- font-family: ${n.font.sans};
128
-
129
- &::after {
130
- content: '';
131
- position: absolute;
132
- inset: 0;
133
- border-radius: inherit;
134
- border: 0.5px solid ${n.colors.muted};
135
- pointer-events: none;
136
- }
137
-
138
- &[data-selected='true'] {
139
- background: ${n.colors.media};
140
- }
141
- /* The gradient is masked to the border band alone, so the ring paints over nothing: a padding-box fill
142
- here would sit on top of the row's content, since this layer is above it. */
143
- &[data-selected='true']::after {
144
- border: 3px solid transparent;
145
- background: ${n.gradients.flare} border-box;
146
- -webkit-mask:
147
- linear-gradient(#000 0 0) padding-box,
148
- linear-gradient(#000 0 0);
149
- -webkit-mask-composite: xor;
150
- mask-composite: exclude;
151
- }
152
- &[data-disabled='true'] {
153
- cursor: not-allowed;
154
- opacity: 0.55;
155
- }
156
- &:focus-visible {
157
- outline: 2px solid ${n.colors.accent};
158
- outline-offset: 2px;
159
- }
160
- `,Gi=a.div`
161
- flex: none;
162
- display: flex;
163
- align-items: center;
164
- justify-content: center;
165
- min-width: 36px;
166
- /* 12px on the left (per review) so the control clears the row's rounded corner; 9px elsewhere. */
167
- padding: 9px 9px 9px 12px;
168
- `,_i=a.span`
169
- display: grid;
170
- place-items: center;
171
- width: 20px;
172
- height: 20px;
173
- border-radius: 4px;
174
- border: 2px solid ${n.colors.muted2};
175
- background: ${n.colors.white};
176
-
177
- &[data-checked='true'] {
178
- border-color: ${n.colors.text};
179
- background: ${n.colors.text};
180
- }
181
- .ico {
182
- width: 14px;
183
- height: 14px;
184
- background: ${n.colors.white};
185
- }
186
- `,Vi=a.div`
187
- flex: 1 1 0;
188
- min-width: 0;
189
- display: flex;
190
- align-items: center;
191
- justify-content: space-between;
192
- gap: 8px;
193
- `,Ji=a.div`
194
- display: flex;
195
- align-items: center;
196
- gap: 13px;
197
- min-width: 0;
198
- `,Yi=a.span`
199
- flex: none;
200
- display: grid;
201
- place-items: center;
202
- `,Xi=a.img`
203
- flex: none;
204
- display: block;
205
- width: ${({w:t})=>t}px;
206
- height: ${({h:t})=>t}px;
207
- object-fit: contain;
208
- `,Zi=a.div`
209
- display: flex;
210
- flex-direction: column;
211
- min-width: 0;
212
- `,ea=a.span`
213
- text-transform: capitalize;
214
- font-family: ${n.font.sans};
215
- font-weight: 700;
216
- font-size: 15px;
217
- line-height: 26px;
218
- letter-spacing: -0.2px;
219
- color: ${n.colors.text2};
220
- `,ta=a.span`
221
- display: flex;
222
- align-items: center;
223
- gap: 4px;
224
- font-family: ${n.font.sans};
225
- font-size: 12px;
226
- line-height: 1;
227
- color: ${n.colors.muted1};
228
-
229
- /* A 13px slot holding a 10.4px glyph. */
230
- .ico {
231
- width: 13px;
232
- height: 13px;
233
- background: ${n.colors.text};
234
- -webkit-mask-size: 10.4px 10.4px;
235
- mask-size: 10.4px 10.4px;
236
- -webkit-mask-position: left center;
237
- mask-position: left center;
238
- }
239
- `,na=a.span`
240
- font-size: 10.4px;
241
- color: ${n.colors.text};
242
- `;a.span`
243
- font-family: ${n.font.sans};
244
- font-size: 12px;
245
- font-weight: 600;
246
- color: ${n.colors.dclRed};
247
- `;const ia=a.div`
248
- flex: none;
249
- display: flex;
250
- align-items: center;
251
- gap: 6px;
252
-
253
- .ico {
254
- width: 24px;
255
- height: 24px;
256
- background: ${n.colors.text2};
257
- -webkit-mask-size: 19.855px 19.855px;
258
- mask-size: 19.855px 19.855px;
259
- -webkit-mask-position: left center;
260
- mask-position: left center;
261
- }
262
- span {
263
- font-family: ${n.font.sans};
264
- font-weight: 600;
265
- font-size: 20px;
266
- color: ${n.colors.text2};
267
- }
268
- `,aa=a.div`
269
- flex: none;
270
- display: flex;
271
- flex-direction: column;
272
- align-items: flex-end;
273
- gap: 2px;
274
- `,Bd=a.button`
275
- width: 100%;
276
- height: 46px;
277
- border: 0;
278
- border-radius: 12px;
279
- cursor: pointer;
280
- background: ${n.gradients.amethyst};
281
- color: ${n.colors.softWhite};
282
- font-family: ${n.font.sans};
283
- font-weight: 600;
284
- font-size: 15px;
285
- line-height: 24px;
286
- letter-spacing: 0.46px;
287
- text-transform: uppercase;
288
-
289
- &:hover:not(:disabled) {
290
- filter: brightness(1.05);
291
- }
292
- &:focus-visible {
293
- outline: 2px solid ${n.colors.accent};
294
- outline-offset: 2px;
295
- }
296
- &:disabled {
297
- opacity: 0.6;
298
- cursor: default;
299
- }
300
- `,Nd=a.img`
301
- width: 13px;
302
- height: 13px;
303
- display: block;
304
- `,Wd=a.img`
305
- width: 24px;
306
- height: 24px;
307
- display: block;
308
- `;a.span`
309
- flex: none;
310
- width: 32px;
311
- display: grid;
312
- gap: 2px;
313
- place-items: center;
314
-
315
- .ico {
316
- width: 15px;
317
- height: 15px;
318
- background: ${n.colors.text2};
319
- }
320
- img {
321
- width: 15px;
322
- height: 15px;
323
- display: block;
324
- }
325
- `;a.div`
326
- flex: none;
327
- display: flex;
328
- align-items: center;
329
- gap: 4px;
330
-
331
- .ico {
332
- width: 18px;
333
- height: 18px;
334
- background: ${n.colors.text2};
335
- }
336
- img {
337
- width: 18px;
338
- height: 18px;
339
- display: block;
340
- }
341
- span {
342
- font-family: ${n.font.sans};
343
- font-weight: 600;
344
- font-size: 17px;
345
- color: ${n.colors.text2};
346
- }
347
- `;a.span`
348
- font-family: ${n.font.sans};
349
- font-weight: 600;
350
- font-size: 15px;
351
- color: ${n.colors.muted};
352
- `;const Dd=a.span`
353
- font-family: ${n.font.sans};
354
- font-size: 11px;
355
- line-height: 1.35;
356
- color: ${n.colors.muted};
357
- `,Od=a.p`
358
- display: flex;
359
- align-items: flex-start;
360
- gap: 12px;
361
- margin: 0;
362
- background: rgba(255, 162, 90, 0.3);
363
- border-radius: ${n.radius.btn};
364
- padding: 16px;
365
- font-family: ${n.font.sans};
366
- font-size: 14px;
367
- line-height: 1.334;
368
- color: ${n.colors.text2};
369
- `;function qd({item:t,priceCredits:s,priceCents:l,options:o,priceManaWei:d,balanceCredits:u,manaBalanceWei:x,onBuy:m,onClose:y,busy:$=!1,notice:h}){const g=o.find(A=>A.method==="credits")??null,w=o.find(A=>A.method==="mana")??null,k=o.find(A=>A.method==="combined")??null,[I,C]=c.useState(()=>g?new Set(["credits"]):k?new Set(["credits","mana"]):w?new Set(["mana"]):new Set),S=!!g||!!k,B=!!w||!!k;c.useEffect(()=>{C(A=>{const R=new Set(A);return R.has("credits")&&!S&&R.delete("credits"),R.has("mana")&&!B&&R.delete("mana"),R.size===A.size?A:R})},[S,B]);const f=I.has("credits"),N=I.has("mana"),r=f&&N?k?"combined":null:f?g?"credits":null:N&&w?"mana":null,E=r==="combined"&&k?k.credits:(g==null?void 0:g.credits)??Qe(l),Y=r==="combined"&&k?k.manaWei:(w==null?void 0:w.manaWei)??d;function U(A){C(R=>{const K=new Set(R);return K.has(A)?K.delete(A):K.add(A),K})}return e.jsxs(Id,{children:[e.jsxs(Sd,{children:[e.jsx(Ad,{children:i("buyModal.choosePayment")}),e.jsx(Md,{onClick:y,disabled:$,"aria-label":i("buyModal.close"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsxs(zd,{children:[e.jsx(Rd,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(Pd,{children:[e.jsxs("div",{children:[e.jsx(Ld,{title:t.name,children:t.name||i("buyModal.itemFallback")}),t.creator?e.jsx(Td,{children:e.jsx(xs,{address:t.creator})}):null]}),e.jsxs(Ed,{children:[e.jsx(ve,{}),e.jsx("span",{children:Ge(s)})]})]})]}),e.jsxs(Fd,{children:[e.jsxs(Qi,{type:"button","data-testid":"pay-with-credits","data-selected":f,"data-disabled":!S,disabled:$||!S,"aria-pressed":f,onClick:()=>U("credits"),children:[e.jsx(Gi,{children:e.jsx(_i,{"data-checked":f,children:e.jsx(P,{name:"check",className:"ico"})})}),e.jsxs(Vi,{children:[e.jsxs(Ji,{children:[e.jsx(Yi,{children:e.jsx(Xi,{src:$d,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),e.jsxs(Zi,{children:[e.jsx(ea,{children:ze.name}),e.jsxs(ta,{children:[i("buyModal.creditsBalanceLabel"),e.jsx(ve,{}),e.jsx(na,{children:Ge(u)})]})]})]}),e.jsx(aa,{children:e.jsxs(ia,{children:[e.jsx(ve,{}),e.jsx("span",{children:Ge(E)})]})})]})]}),e.jsxs(Qi,{type:"button","data-testid":"pay-with-mana","data-selected":N,"data-disabled":!B,disabled:$||!B,"aria-pressed":N,onClick:()=>U("mana"),children:[e.jsx(Gi,{children:e.jsx(_i,{"data-checked":N,children:e.jsx(P,{name:"check",className:"ico"})})}),e.jsxs(Vi,{children:[e.jsxs(Ji,{children:[e.jsx(Yi,{children:e.jsx(Xi,{src:Cd,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),e.jsxs(Zi,{children:[e.jsx(ea,{children:i("buyModal.methodMana")}),e.jsxs(ta,{children:[i("buyModal.manaBalanceLabel"),e.jsx(Nd,{src:Wi,alt:"","aria-hidden":!0}),e.jsx(na,{children:zi(x)})]})]})]}),e.jsx(aa,{children:B?e.jsx(e.Fragment,{children:e.jsxs(ia,{children:[e.jsx(Wd,{src:Wi,alt:"","aria-hidden":!0}),e.jsx("span",{children:zi(Y)})]})}):e.jsx(Dd,{"data-testid":"mana-shortfall-note",children:i("buyModal.notEnoughMana")})})]})]})]}),h?e.jsx(Od,{"data-testid":"price-changed",role:"status",children:h}):null,e.jsx(Bd,{type:"button","data-testid":"confirm-payment",disabled:$||r===null,onClick:()=>r&&m(r),children:i("buyModal.buy")})]})}function zr(){const t=new Map,s=new Set,l=new Set,o=new Set;return{submitStarted:d=>{o.add(d)},submitFinished:d=>{o.delete(d)},broadcast:(d,u)=>{const x=t.get(d);x?x.add(u):t.set(d,new Set([u]))},reverted:d=>{s.add(d)},unobservable:d=>{l.add(d)},isInFlight:d=>o.has(d),mayBeConsumed:d=>{if(l.has(d))return!0;const u=t.get(d);if(!u)return!1;for(const x of u)if(!s.has(x))return!0;return!1}}}const Kd=Jl("0.05");async function Hd(t){try{return(await new Vl(st.rpcUrl).getBalance(t)).gte(Kd)}catch{return!1}}async function Ud(t,s){return en(t)?Hd(s):!1}function Qd({size:t=64,...s}){return e.jsxs("svg",{viewBox:"0 0 64 64",width:t,height:t,"aria-hidden":!0,...s,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Gd=t=>ks(t.contractAddress,String(t.itemId));async function ra(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return $s(await Cs(t.trade),t.coupon)}catch(l){return s.reportFailure!==!1&&ue(l,{flow:"buy",step:"mana_price"}),null}}function sa(t){return t.kind==="trade"?t.trade.id:void 0}function oa(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function Bn({item:t,onClose:s,resume:l=!1}){var Nt,$t;const{session:o}=ot(),{data:d}=rr(o),{data:u}=fs(o),x=dt(),m=lt();async function y(){try{return await x.fetchQuery(js())}catch{return}}async function $(){if(u!=null)return u;if(!o)return 0n;try{const b=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>Ss(o.address),staleTime:3e4});return ee(b),b}catch{return 0n}}const h=Yo().packs.slice(0,Xo),[g,w]=c.useState("loading"),[k,I]=c.useState(null),[C,S]=c.useState(null),[B,f]=c.useState(!1),[N,r]=c.useState(0),[E,Y]=c.useState(""),[U,A]=c.useState(t.priceCredits),R=Math.max(0,U-((d==null?void 0:d.credits)??0)),K=(()=>{if(R<=0)return h;const b=h.filter(M=>M.credits>=R);return b.length>0?b:h})(),[G,ne]=c.useState(null),[de,ee]=c.useState(null),_=u??de??0n,[O,H]=c.useState(!1),[v,fe]=c.useState(null),[L,F]=c.useState(0),[z,se]=c.useState(null),[ie,xe]=c.useState(!1),Q=c.useRef(null),oe=c.useRef(!1),Z=c.useRef(zr()),Ce=(z==null?void 0:z.credits)??U,ce=(d==null?void 0:d.credits)??0;c.useEffect(()=>(oe.current=!1,()=>{oe.current=!0}),[]);async function V(b,M,T,W){const J=await $();if(W!=null&&W())return;const ae=J>0n,D=ae?await ra(M):null;if(W!=null&&W())return;D!=null?ne(D):ae&&H(!0);const Se=Ei({priceCents:T,priceManaWei:D??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:J}).options.some(pt=>pt.method==="mana"||pt.method==="combined"),Re=b-((d==null?void 0:d.credits)??0),ut=h.find(pt=>pt.credits>=Re)??h[h.length-1];Y(ut.id),Se||X("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:b,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,Re)}),w("nofunds")}c.useEffect(()=>{let b=!1;if(!o){w("error"),I(i("buyModal.signInToCheckout"));return}return(async()=>{try{const M=await Zo(t,o.address,ms,await y(),Gd,gs);if(M.status==="own")throw new Error("You can't buy your own listing.");if(M.status==="no-price")throw new Error("price unavailable");if(M.status!=="buyable")throw new Error("not for sale");const T=el(M.line),W=M.line.usdCents,J=Qe(W);if(b)return;if(A(J),fe(T),F(W),d!=null&&d.credits<J){await V(J,T,W,()=>b);return}l?qe({sale:T,usdCents:W}):w("ready")}catch(M){if(b)return;X(we(M)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:$e(M)}),Ne(M)}})(),()=>{b=!0,Q.current&&o&&(on([Q.current]),Q.current=null)}},[N]),c.useEffect(()=>{const b=(z==null?void 0:z.sale)??v;if(!b||g!=="ready"&&g!=="nofunds"||_<=0n||G!==null)return;let M=!1;return ra(b,{reportFailure:!O}).then(T=>{M||(T!=null?ne(T):H(!0))}),()=>{M=!0}},[g,z,v,_,G,O]);const Be=Ei({priceCents:L,priceManaWei:G??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:_});async function qe(b){const M=(z==null?void 0:z.sale)??(b==null?void 0:b.sale)??v,T=(z==null?void 0:z.usdCents)??(b==null?void 0:b.usdCents)??L;if(!o||!M||T<=0)return;w("processing"),I(null),xe(!1);let W=z;if(!W)try{const{credit:D,maxCreditedValue:pe,usdCents:Se}=await Fn(o.identity,T,sa(M),oa(t));if(oe.current){be([D.id]);return}Q.current=D.id,x.invalidateQueries({queryKey:["usd-balance"]});const Re=Qe(Se);if(W={sale:M,credit:D,maxCreditedValue:pe,usdCents:Se,credits:Re},se(W),Re!==Qe(T)){A(Re),F(Se),xe(!0),w("ready");return}}catch(D){if(td(D)){x.invalidateQueries({queryKey:["usd-balance"]}),await V(Qe(T),M,T);return}we(D)||ue(D,{flow:"buy",step:"authorize"}),X(we(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:$e(D)}),I(_e(D,i("buyModal.error.generic"),{sale:!0})),w("error");return}if(!W)return;let J=!1,ae;try{const D={purchase:zo(W.sale,[W.credit],W.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:pe})=>Z.current.broadcast(W.credit.id,pe),onReverted:({txHash:pe})=>{pe&&Z.current.reverted(pe)}};if(Z.current.submitStarted(W.credit.id),vr())try{ae=await Zl(D),Z.current.broadcast(W.credit.id,ae),await $r(ae),J=!0}catch(pe){if(pe instanceof Cr)J=!0;else if(pe instanceof Ir){if(pe.reason==="relayer-unreachable")throw Z.current.unobservable(W.credit.id),pe;if(!en(o.providerType))throw pe;ae=await Bi(D)}else throw ae&&Z.current.reverted(ae),pe}else ae=await Bi(D)}catch(D){Z.current.submitFinished(W.credit.id),we(D)||ue(D,{flow:"buy",step:"submit",gasless:J}),Xe([W.credit.id]),Q.current=null,X(we(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(D)}),x.invalidateQueries({queryKey:["usd-balance"]}),Ne(D);return}Z.current.submitFinished(W.credit.id),Q.current=null;try{Ro(x,t),X("Shop Completed Purchase",{...pn([t]),payment_type:"credits",no_crypto_step:J,transaction_hash:ae??null})}catch(D){ue(D,{flow:"buy",step:"post_purchase"})}w("complete")}function be(b){if(!o||b.length===0)return Promise.resolve(!1);const M=b.filter(T=>!Z.current.mayBeConsumed(T));return M.length===0?Promise.resolve(!1):sr(o.identity,M).then(()=>!0,()=>!0)}function Xe(b){f(!0),be(b).then(M=>{M||f(!1)})}function on(b){return be(b.filter(M=>!Z.current.isInFlight(M)))}function Lt(){x.invalidateQueries({queryKey:["mana-balance"]}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["detail-trade"]}),x.invalidateQueries({queryKey:["shop-item"]}),x.invalidateQueries({queryKey:["owned-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["public-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),x.invalidateQueries({queryKey:["shop-items"]}),x.invalidateQueries({queryKey:["catalog-items"]}),x.invalidateQueries({queryKey:["my-assets"]}),x.invalidateQueries({queryKey:["purchases"]}),x.invalidateQueries({queryKey:["owned-item-count"]}),x.invalidateQueries({queryKey:["overview-listings"]}),x.invalidateQueries({queryKey:["upsell-listings"]})}async function Tt(){var M;const b=(z==null?void 0:z.sale)??v;if(!(!o||!b)){Q.current&&(Xe([Q.current]),Q.current=null),w("processing"),I(null);try{const T=(M=Fi(Be,"mana"))==null?void 0:M.manaWei,W=b.kind==="trade"?await To({trade:b.trade,coupon:b.coupon,buyer:o.address,signer:o.signer,manaWei:T}):await Eo({mint:b.mint,buyer:o.address,signer:o.signer,manaWei:T});X("Shop Completed Purchase",{...pn([t]),payment_type:"mana",transaction_hash:W??null}),Lt(),w("complete")}catch(T){we(T)||ue(T,{flow:"buy_mana",step:"submit"}),X(we(T)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(T)}),Ne(T)}}}async function vt(){const b=(z==null?void 0:z.sale)??v,M=Fi(Be,"combined");if(!o||!b||!M)return;w("processing"),I(null),Q.current&&(await be([Q.current])&&f(!0),Q.current=null);let T=null,W;try{const{credit:J}=await Fn(o.identity,M.creditsCents,sa(b),oa(t));T=J.id,Z.current.submitStarted(J.id);const ae={buyer:o.address,signer:o.signer,credits:[J],manaGapWei:M.manaWei,providerType:o.providerType,onBroadcast:({txHash:D})=>Z.current.broadcast(J.id,D),onReverted:({txHash:D})=>{D&&Z.current.reverted(D)},onUnobservable:()=>Z.current.unobservable(J.id)};W=b.kind==="trade"?await Fo({trade:b.trade,coupon:b.coupon,...ae}):await Bo({mint:b.mint,...ae})}catch(J){T&&Z.current.submitFinished(T),T&&Xe([T]),we(J)||ue(J,{flow:"buy_credits_and_mana",step:"submit"}),X(we(J)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(J)}),x.invalidateQueries({queryKey:["usd-balance"]}),Ne(J);return}T&&Z.current.submitFinished(T);try{Lt(),X("Shop Completed Purchase",{...pn([t]),payment_type:"credits_and_mana",transaction_hash:W??null})}catch(J){ue(J,{flow:"buy_credits_and_mana",step:"post_purchase"})}w("complete")}async function Ze(){if(!(!E||!o)){try{sessionStorage.setItem(qi,JSON.stringify(t))}catch{}Q.current&&(be([Q.current]),Q.current=null),se(null),w("loading");try{const b=await tl(E,{address:o.address,identity:o.identity});if(b.url){window.location.href=b.url;return}m("/credits")}catch(b){ue(b,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(qi)}catch{}I(i("buyModal.error.creditsCheckout")),w("error")}}}const[ke,ct]=c.useState(null);function me(b,M){const{spender:T,chainId:W}=No(b,M);return Nl(W,T)}function Ne(b){if(I(_e(b,i("buyModal.error.generic"),{sale:!0})),w("error"),!bs(b)||!o)return;const M=b.required;(async()=>{if(await Ud(o.providerType,o.address)){S(M);return}I(i("buyModal.error.relayDownNoRail"))})()}async function Ke(b){if(o){S(null);try{await Is(o.web3Provider,b)}catch(M){we(M)||ue(M,{flow:"buy",step:"switch_chain"}),S(b);return}Ft()}}function He(b){b==="mana"?Tt():b==="combined"?vt():qe()}const We=c.useRef(!1);async function Ie(b){var M;if(!We.current){We.current=!0;try{const T=(z==null?void 0:z.sale)??v;if(b==="credits"||!T||!o){He(b);return}const W=me(b,T),J=((M=Be.options.find(D=>D.method===b))==null?void 0:M.manaWei)??0n,ae=await jr(W,o.address,J).catch(()=>!0);if(Bl(o.providerType,ae)){ct({auth:W,rail:b});return}He(b)}finally{We.current=!1}}}const jt=Be.options.some(b=>b.method==="mana"||b.method==="combined"),Et=g==="ready"&&(jt||Be.manaShortfall!=null)||g==="nofunds"&&jt;function Ft(){I(null),se(null),xe(!1),f(!1),w("loading"),r(b=>b+1)}const et=g==="error"&&C===null&&(!!Q.current||B),kt=g==="processing",Bt=g==="complete"?i("buyModal.titleComplete"):g==="error"?i("cartCheckout.errorTitle"):g==="nofunds"?i("buyModal.titleNoFunds"):i("buyModal.titleBuy");return ke&&o?e.jsx(mr,{auth:ke.auth,signer:o.signer,title:i(ke.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:i(ke.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:i(ke.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:nl,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:b}=ke;ct(null),He(b)},onCancel:()=>ct(null),onClose:()=>{ct(null),s()}}):e.jsxs(il,{role:"dialog","aria-modal":"true","aria-label":i("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(al,{onClick:kt?void 0:s,"aria-hidden":!0}),e.jsx(rl,{"data-tall":g==="processing"||g==="loading"||void 0,children:Et?e.jsx(qd,{item:t,priceCredits:Ce,priceCents:L,options:Be.options,priceManaWei:G??0n,balanceCredits:ce,manaBalanceWei:_,onBuy:b=>void Ie(b),onClose:s,busy:kt,notice:ie?i("buyModal.priceChanged"):d!=null&&d.held?i("buyModal.heldExplainer",{credits:d.held.credits,currency:ze.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(sl,{children:[e.jsxs(ol,{children:[e.jsx(ll,{children:Bt}),!kt&&e.jsx(dl,{onClick:s,"aria-label":i("buyModal.close"),children:e.jsx(Po,{})})]}),e.jsxs(cl,{children:[e.jsx(ul,{children:g==="nofunds"?i("buyModal.dclBalance"):i("buyModal.myCreditsBalance")}),e.jsx(pl,{}),e.jsx(hl,{children:Ge(ce)})]})]}),g==="loading"&&e.jsx(at,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),g==="error"&&e.jsxs(at,{children:[e.jsxs(xl,{"data-testid":"buy-error",children:[e.jsx(fl,{src:Lo,alt:"",width:64,height:80}),e.jsxs(ml,{children:[e.jsx("b",{children:i("cartCheckout.errorHeadline")})," ",k??(et?null:i("cartCheckout.errorBody")),et?e.jsxs(e.Fragment,{children:[k?" ":"",i("cartCheckout.heldLead",{currency:ze.name}),e.jsx("b",{children:i("cartCheckout.heldBold")}),i("cartCheckout.heldTail",{currency:ze.name})]}):null]})]}),C!==null?e.jsxs(ft,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),e.jsx(De,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void Ke(C),children:i("buyModal.error.switchAndRetry",{network:ys(C)})})]}):et?e.jsx(ft,{children:e.jsx(De,{"data-variant":"purple","data-full":!0,onClick:s,children:i("cartCheckout.gotIt")})}):e.jsxs(ft,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),e.jsx(De,{"data-variant":"purple",onClick:Ft,children:i("cartCheckout.tryAgain")})]})]}),g==="nofunds"&&e.jsxs(at,{children:[O&&G===null&&_>0n?e.jsxs(Ut,{"data-testid":"mana-price-unavailable",children:[e.jsx(Qt,{}),e.jsx(Gt,{children:i("buyModal.manaPriceUnavailable")})]}):null,d!=null&&d.held?e.jsxs(Ut,{"data-testid":"nofunds-held",children:[e.jsx(Qt,{}),e.jsx(Gt,{children:i("buyModal.heldExplainer",{credits:d.held.credits,currency:ze.name})})]}):null,e.jsxs(Ut,{children:[e.jsx(Qt,{}),e.jsxs(Gt,{children:[e.jsx("b",{children:i("buyModal.insufficientFunds")})," ",i("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:i("buyModal.warningCreditsAmount",{count:Math.max(1,Ce-ce)})})," ",i("buyModal.warningToPurchase",{count:1}),gt()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(gl,{href:ws("/credits"),target:"_blank",rel:"noopener noreferrer",children:i("buyModal.warningLearnMore")})]})]})]}),e.jsx(la,{item:t,priceCredits:Ce}),gt()?null:e.jsxs(e.Fragment,{children:[e.jsx(bl,{"data-testid":"credit-packs",children:K.map(b=>{const M=b.credits,T=b.id===E;return e.jsxs(yl,{"data-on":T||void 0,onClick:()=>Y(b.id),children:[e.jsx(wl,{src:vl,alt:""}),e.jsx(jl,{children:Ge(M)}),e.jsxs(kl,{children:["($",b.usd.toFixed(2),")"]})]},b.id)})}),e.jsxs($l,{children:[e.jsxs(Cl,{children:[e.jsx(Il,{}),e.jsx("span",{children:Ge(((Nt=K.find(b=>b.id===E))==null?void 0:Nt.credits)??0)})]}),e.jsxs(Sl,{children:["$",((($t=K.find(b=>b.id===E))==null?void 0:$t.usd)??0).toFixed(2)]})]})]}),e.jsxs(ft,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),gt()?null:e.jsx(De,{"data-variant":"gradient",onClick:()=>void Ze(),children:i("buyModal.buy")})]})]}),g==="ready"&&e.jsxs(at,{children:[ie&&e.jsxs(Ut,{"data-testid":"price-changed",role:"status",children:[e.jsx(Qt,{}),e.jsx(Gt,{children:i("buyModal.priceChanged")})]}),e.jsx(la,{item:t,priceCredits:Ce}),e.jsx(ft,{children:e.jsx(De,{"data-variant":"gradient","data-full":!0,onClick:()=>void qe(),children:i("buyModal.buy")})})]}),g==="processing"&&e.jsxs(at,{"data-processing":!0,children:[e.jsx(gr,{src:or,alt:"",width:61,height:61}),e.jsx(br,{children:l?i("buyModal.completingPurchase"):i("buyModal.completingTransaction")}),e.jsx(yr,{"aria-hidden":!0,children:e.jsx(wr,{})})]}),g==="complete"&&e.jsxs(at,{children:[e.jsx(nd,{}),e.jsxs(Al,{children:[e.jsx(Qd,{}),e.jsxs(Ml,{children:[e.jsx("b",{children:i("getCredits.successTitle")})," ",i("buyModal.successBody")]})]}),e.jsxs(ft,{"data-stack":!0,children:[e.jsx(De,{"data-variant":"outline",onClick:()=>m(vs([t.category])),children:i("buyModal.myAssets")}),gt()?e.jsx(Di,{"data-variant":"ruby",href:id([t]),onClick:s,children:i("success.goToBackpack")}):e.jsxs(Di,{"data-variant":"ruby",href:ad,target:"_blank",rel:"noreferrer",onClick:s,children:[i("buyModal.tryInWorld"),e.jsx(rd,{})]})]})]})]})})]})}function la({item:t,priceCredits:s}){return e.jsxs(zl,{children:[e.jsx(Rl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(Pl,{children:[e.jsxs("div",{children:[e.jsx(Ll,{title:t.name,children:t.name||i("buyModal.itemFallback")}),t.creator?e.jsx(Tl,{address:t.creator}):null]}),e.jsxs(El,{children:[e.jsx(Fl,{}),e.jsx("span",{children:Ge(s)})]})]})]})}function _d(){const{data:t}=te({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:As,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const Vd=a.div`
370
- display: flex;
371
- align-items: center;
372
- gap: 16px;
373
- width: 100%;
374
- max-width: 456px;
375
- `,Jd=a.span`
376
- flex: none;
377
- font-family: ${n.font.sans};
378
- font-size: 18px;
379
- color: ${n.colors.muted};
380
- `,Yd=a.p`
381
- margin: 0;
382
- font-family: ${n.font.sans};
383
- font-size: 13px;
384
- line-height: 1.5;
385
- color: ${n.colors.muted};
386
- text-align: center;
387
- `,Xd=a.p`
388
- margin: 0;
389
- font-family: ${n.font.sans};
390
- font-size: 13px;
391
- line-height: 1.5;
392
- color: ${n.colors.text};
393
- `;function Rr(t,s){const[l,o]=c.useState(!1),[d,u]=c.useState(!1),[x,m]=c.useState(null),y=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return y.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||l)return!0;m(null);try{const g=await t.cancelCurrent({payGas:h,onWaiting:w=>u(w>2e4)});return g!=="ok"?(m(g==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(g){return ue(g,{flow:"edit_price_cancel"}),s(_e(g,i("listingEdit.cancelFailed"))),!1}finally{u(!1)}}return{cancelDone:l,slow:d,cancelFailed:x,setCancelFailed:m,cancelCurrent:$,signal:()=>{var h;return(h=y.current)==null?void 0:h.signal}}}function qn({state:t,canPayGas:s,busy:l,onPayGas:o,onLater:d,testId:u="edit-cancel-relay-failed"}){return e.jsxs(Xd,{"data-testid":u,children:[s?t==="reverted"?i("itemDetail.cancelRelayReverted"):i("itemDetail.cancelRelayFailed"):i("itemDetail.cancelRelayRetry"),s?e.jsxs(e.Fragment,{children:[" ",e.jsx(Ki,{type:"button","data-testid":"cancel-pay-gas",onClick:o,disabled:l,children:i("itemDetail.cancelPayGas")}),d?e.jsxs(e.Fragment,{children:[" ",e.jsx(Ki,{type:"button","data-testid":"cancel-later",onClick:d,disabled:l,children:i("itemDetail.cancelLater")})]}):null]}):null]})}function Pr({phase:t,managed:s,slow:l}){const d=t==="list"?2:1,u=`listingEdit.${s?"step":"confirm"}${t==="list"?"New":"Removal"}`;return e.jsxs(at,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[e.jsx(gr,{src:or,alt:"",width:61,height:61}),e.jsx(br,{children:i(u)}),e.jsxs(Vd,{children:[e.jsx(yr,{"aria-hidden":!0,children:e.jsx(wr,{})}),e.jsxs(Jd,{"data-testid":"listing-steps-count",children:[d,"/",2]})]}),l?e.jsx(Yd,{"data-testid":"listing-steps-slow",children:i("listingEdit.slow")}):null]})}const mn=a.div`
394
- position: fixed;
395
- inset: 0;
396
- z-index: 10000;
397
- display: flex;
398
- align-items: center;
399
- justify-content: center;
400
- padding: 16px;
401
- background: rgba(22, 21, 24, 0.55);
402
- `,gn=a.div`
403
- width: 560px;
404
- max-width: 100%;
405
- max-height: 92vh;
406
- overflow-y: auto;
407
- background: ${n.colors.white};
408
- border-radius: 16px;
409
- padding: 12px 16px 16px;
410
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
411
- display: flex;
412
- flex-direction: column;
413
- gap: 24px;
414
- `,bn=a.div`
415
- display: flex;
416
- align-items: center;
417
- justify-content: space-between;
418
- gap: 8px;
419
- padding-bottom: 16px;
420
- border-bottom: 1px solid ${n.colors.gray4};
421
- `,yn=a.h2`
422
- margin: 0;
423
- font-family: ${n.font.sans};
424
- font-weight: 600;
425
- font-size: 20px;
426
- line-height: 1.6;
427
- color: ${n.colors.text};
428
- `,wn=a.button`
429
- flex: none;
430
- display: grid;
431
- place-items: center;
432
- width: 24px;
433
- height: 24px;
434
- border: 0;
435
- background: none;
436
- cursor: pointer;
437
- color: ${n.colors.text};
438
-
439
- .ico {
440
- width: 18px;
441
- height: 18px;
442
- }
443
- &:disabled {
444
- opacity: 0.4;
445
- cursor: default;
446
- }
447
- &:focus-visible {
448
- outline: 2px solid ${n.colors.accent};
449
- outline-offset: 2px;
450
- }
451
- `,Zd=a.p`
452
- margin: 0;
453
- font-family: ${n.font.sans};
454
- font-size: 14px;
455
- line-height: 1.57;
456
- color: ${n.colors.text};
457
- text-align: left;
458
- `,ec=a.div`
459
- display: flex;
460
- align-items: center;
461
- gap: 12px;
462
- `,tc=a.div`
463
- flex: none;
464
- display: grid;
465
- place-items: center;
466
- width: 180px;
467
- height: 180px;
468
- border-radius: 16px;
469
- background: ${n.colors.media};
470
- border: 1px solid ${n.colors.gray4};
471
- overflow: hidden;
472
-
473
- img {
474
- width: 150px;
475
- height: 150px;
476
- object-fit: contain;
477
- filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
478
- }
479
-
480
- ${n.media.maxWidth("mobile")} {
481
- width: 120px;
482
- height: 120px;
483
-
484
- img {
485
- width: 100px;
486
- height: 100px;
487
- }
488
- }
489
- `,nc=a.div`
490
- flex: 1 1 0;
491
- min-width: 0;
492
- display: flex;
493
- flex-direction: column;
494
- gap: 4px;
495
- padding: 8px;
496
- `,ic=a.p`
497
- margin: 0;
498
- font-family: ${n.font.sans};
499
- font-weight: 600;
500
- font-size: 20px;
501
- line-height: 1.57;
502
- color: ${n.colors.text};
503
- `,ac=a.p`
504
- margin: 0;
505
- font-family: ${n.font.sans};
506
- font-size: 10px;
507
- line-height: 1.43;
508
- color: ${n.colors.muted};
509
- `,rc=a.div`
510
- display: flex;
511
- gap: 12px;
512
-
513
- ${n.media.maxWidth("mobile")} {
514
- flex-direction: column;
515
- }
516
- `,da=a.label`
517
- flex: 1 1 0;
518
- min-width: 0;
519
- display: flex;
520
- flex-direction: column;
521
- gap: 4px;
522
- `,ca=a.span`
523
- font-family: ${n.font.sans};
524
- font-size: 12px;
525
- color: ${n.colors.muted};
526
- `,sc=a.div`
527
- display: flex;
528
- align-items: center;
529
- justify-content: space-between;
530
- gap: 4px;
531
- height: 42px;
532
- padding: 0 8px;
533
- border: 0.5px solid ${n.colors.text};
534
- border-radius: 8px;
535
- background: ${n.colors.white};
536
-
537
- &:focus-within {
538
- border-color: ${n.colors.magenta};
539
- }
540
- &[aria-invalid='true'] {
541
- border-color: ${n.colors.err};
542
- }
543
-
544
- .ccy {
545
- flex: none;
546
- width: 22px;
547
- height: 22px;
548
- color: ${n.colors.rarity};
549
- }
550
- .cal {
551
- flex: none;
552
- width: 18px;
553
- height: 18px;
554
- color: ${n.colors.text};
555
- }
556
- `,oc=a.input`
557
- flex: 1 1 auto;
558
- min-width: 0;
559
- border: 0;
560
- outline: none;
561
- background: transparent;
562
- font-family: ${n.font.sans};
563
- font-size: 13px;
564
- color: ${n.colors.text};
565
-
566
- &::placeholder {
567
- color: ${n.colors.muted2};
568
- }
569
- /* Strip the number spinners — the glyph + USD hint carry the affordance. */
570
- &::-webkit-outer-spin-button,
571
- &::-webkit-inner-spin-button {
572
- -webkit-appearance: none;
573
- margin: 0;
574
- }
575
- &[type='number'] {
576
- -moz-appearance: textfield;
577
- appearance: textfield;
578
- }
579
- `,lc=a.span`
580
- flex: none;
581
- font-family: ${n.font.sans};
582
- font-size: 10px;
583
- color: ${n.colors.muted2};
584
- `,dc=a.div`
585
- .react-datepicker-wrapper {
586
- display: block;
587
- width: 100%;
588
- }
589
- .react-datepicker__input-container {
590
- display: flex;
591
- align-items: center;
592
- }
593
- .react-datepicker__input-container input {
594
- width: 100%;
595
- height: 42px;
596
- padding: 0 8px;
597
- border: 0.5px solid ${n.colors.text};
598
- border-radius: 8px;
599
- background: ${n.colors.white};
600
- font-family: ${n.font.sans};
601
- font-size: 13px;
602
- color: ${n.colors.text};
603
- outline: none;
604
- }
605
- .react-datepicker__input-container input:focus {
606
- border-color: ${n.colors.magenta};
607
- }
608
- &[data-invalid='true'] .react-datepicker__input-container input {
609
- border-color: ${n.colors.err};
610
- }
611
- /* The showIcon calendar glyph inside the field. */
612
- .react-datepicker__calendar-icon {
613
- fill: ${n.colors.text};
614
- opacity: 0.85;
615
- }
616
-
617
- ${Uo}
618
- `,cc=a.button`
619
- width: 100%;
620
- height: 48px;
621
- border: 0;
622
- border-radius: 16px;
623
- cursor: pointer;
624
- background: ${n.colors.accent};
625
- color: ${n.colors.white};
626
- font-family: ${n.font.sans};
627
- font-weight: 600;
628
- font-size: 15px;
629
- line-height: 24px;
630
- letter-spacing: 0.46px;
631
- text-transform: uppercase;
632
-
633
- &:hover:not(:disabled) {
634
- background: ${n.colors.accentHover};
635
- }
636
- &:focus-visible {
637
- outline: 2px solid ${n.colors.accent};
638
- outline-offset: 2px;
639
- }
640
- &:disabled {
641
- cursor: not-allowed;
642
- background: rgba(105, 31, 169, 0.2);
643
- color: ${n.colors.white};
644
- }
645
- `;a.p`
646
- margin: 0;
647
- font-family: ${n.font.sans};
648
- font-size: 13px;
649
- color: ${n.colors.muted};
650
- text-align: center;
651
- `;const uc=a.p`
652
- margin: 0;
653
- font-family: ${n.font.sans};
654
- font-size: 12px;
655
- line-height: 1.5;
656
- color: ${n.colors.muted};
657
- `,pc=a.div`
658
- display: flex;
659
- flex-direction: column;
660
- align-items: center;
661
- gap: 16px;
662
- padding: 24px 16px;
663
- border-radius: 16px;
664
- background: rgba(193, 238, 207, 0.5);
665
- text-align: center;
666
- `,hc=a.div`
667
- display: grid;
668
- place-items: center;
669
- width: 64px;
670
- height: 64px;
671
- border-radius: 50%;
672
- background: ${n.colors.ok};
673
- color: ${n.colors.white};
674
-
675
- .ico {
676
- width: 34px;
677
- height: 34px;
678
- }
679
- `,xc=a.p`
680
- margin: 0;
681
- font-family: ${n.font.sans};
682
- font-size: 20px;
683
- line-height: 1.334;
684
- color: ${n.colors.text2};
685
-
686
- b {
687
- font-weight: 700;
688
- }
689
- `,fc=a.div`
690
- display: flex;
691
- gap: 12px;
692
-
693
- ${n.media.maxWidth("mobile")} {
694
- flex-direction: column-reverse;
695
- }
696
- `,mc=a.button`
697
- flex: 1 1 0;
698
- height: 48px;
699
- border: 2px solid ${n.colors.accent};
700
- border-radius: 12px;
701
- background: transparent;
702
- color: ${n.colors.accent};
703
- cursor: pointer;
704
- font-family: ${n.font.sans};
705
- font-weight: 600;
706
- font-size: 13px;
707
- line-height: 24px;
708
- letter-spacing: 0.46px;
709
- text-transform: uppercase;
710
-
711
- &:hover {
712
- background: rgba(105, 31, 169, 0.06);
713
- }
714
- &:focus-visible {
715
- outline: 2px solid ${n.colors.accent};
716
- outline-offset: 2px;
717
- }
718
- `,gc=a.button`
719
- flex: 1 1 0;
720
- height: 48px;
721
- border: 0;
722
- border-radius: 12px;
723
- background: ${n.colors.accent};
724
- color: ${n.colors.softWhite};
725
- cursor: pointer;
726
- font-family: ${n.font.sans};
727
- font-weight: 600;
728
- font-size: 13px;
729
- line-height: 24px;
730
- letter-spacing: 0.46px;
731
- text-transform: uppercase;
732
-
733
- &:hover {
734
- background: ${n.colors.accentHover};
735
- }
736
- &:focus-visible {
737
- outline: 2px solid ${n.colors.accent};
738
- outline-offset: 2px;
739
- }
740
- `,bc=30;function ua(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function yc({asset:t,session:s,creator:l,edit:o,onListed:d,onClose:u}){const x=dt(),m=lt(),y=_d(),{data:$}=te({queryKey:["collection-meta",t.contractAddress],enabled:!l&&!!t.contractAddress,staleTime:5*6e4,queryFn:()=>dr(t.contractAddress)}),h=l||($==null?void 0:$.creator),{data:g}=tn(h),w=h?g!=null&&g.name?nn(g.name):On(h):null,[k,I]=c.useState(o!=null&&o.currentCredits?String(o.currentCredits):"10"),[C,S]=c.useState(()=>ua(bc)),[B,f]=c.useState(null),[N,r]=c.useState(!1),[E,Y]=c.useState(null),[U,A]=c.useState("form"),R=c.useRef({}),{cancelDone:K,slow:G,cancelFailed:ne,setCancelFailed:de,cancelCurrent:ee,signal:_}=Rr(o,f),O=an(s),H=Number(k),v=Number.isInteger(H)&&H>0,fe=!!o&&!K&&H===o.currentCredits,L=C?C.getTime():NaN,F=!!C&&L>Date.now(),z=ua(1),se=v?`$${rt(H).toFixed(2)}`:"$0";async function ie(oe={}){if(f(null),!v){f(i("sellModal.errorWholeNumber"));return}if(!F){f(i("sellModal.invalidDate"));return}if(!O){r(!0);try{const Z=Oi(t.contractAddress,t.chainId),Ce=await jr(Z,s.address);if(r(!1),!Ce){R.current=oe,A("authorize");return}}catch{r(!1)}}await xe(oe)}async function xe(oe={}){var Z,Ce;if(f(null),!v){f(i("sellModal.errorWholeNumber"));return}if(!F){f(i("sellModal.invalidDate"));return}r(!0);try{if(!await ee(oe.payGas))return;await Wl({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const ce=await Dl({signer:s.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId,network:t.network,chainId:t.chainId},usdPrice:rt(H),expiresAtMs:L}),V=await(o?Sr(ce,s.identity,{signal:_()}):lr(ce,s.identity));(Z=_())==null||Z.throwIfAborted(),Y(H),X("Shop Listed Item",{item_id:t.itemId??t.tokenId??null,contract_address:t.contractAddress,price_credits:H,price_usd:rt(H),listing_type:"secondary",is_primary:!1}),Pt.success(i(o?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:t.name})),x.invalidateQueries({queryKey:["my-assets",s.address]}),d==null||d(H,V.id)}catch(ce){if((Ce=_())!=null&&Ce.aborted)return;ue(ce,{flow:"list_secondary"}),X("Shop Listing Failed",{listing_type:"secondary",error_code:$e(ce)}),f(_e(ce,i(o?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{r(!1)}}function Q(){u(),m("/my-items")}return E!==null?e.jsx(mn,{onClick:u,role:"presentation",children:e.jsxs(gn,{onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(o?"listingEdit.successHeader":"sellModal.successHeader"),children:[e.jsxs(bn,{children:[e.jsx(yn,{children:i(o?"listingEdit.successHeader":"sellModal.successHeader")}),e.jsx(wn,{onClick:u,"aria-label":i("getCredits.done"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsxs(pc,{children:[e.jsx(hc,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsxs(xc,{children:[e.jsx("b",{children:i(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",i("sellModal.successManage")]})]}),e.jsxs(fc,{children:[e.jsx(mc,{onClick:Q,children:i("sellModal.myItems")}),e.jsx(gc,{onClick:u,children:i("getCredits.done")})]})]})}):U==="authorize"?e.jsx(mr,{auth:Oi(t.contractAddress,t.chainId),signer:s.signer,title:i("authorizeStep.sellTitle"),name:t.name,image:t.image,icon:e.jsx(P,{name:"pen",className:"ico"}),reason:i("authorizeStep.sellReason",{name:t.name}),onAuthorized:()=>{A("form"),xe(R.current)},onCancel:()=>A("form"),onClose:u}):o&&N?e.jsx(mn,{role:"presentation",children:e.jsxs(gn,{onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(bn,{children:[e.jsx(yn,{children:i("listingEdit.title")}),e.jsx(wn,{disabled:!0,"aria-label":i("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(Pr,{phase:K?"list":"cancel",managed:O,slow:G})]})}):e.jsx(mn,{onClick:N?void 0:u,role:"presentation",children:e.jsxs(gn,{"data-testid":"modal",onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(o?"listingEdit.title":"sellModal.sellProduct"),children:[e.jsxs(bn,{children:[e.jsx(yn,{children:i(o?"listingEdit.title":"sellModal.sellProduct")}),e.jsx(wn,{onClick:u,disabled:N,"aria-label":i("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(Zd,{children:i(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(ec,{children:[e.jsx(tc,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(nc,{children:[e.jsx(ic,{children:t.name}),w?e.jsx(ac,{children:i("sellModal.byCreator",{name:w})}):null]})]}),e.jsxs(rc,{children:[e.jsxs(da,{children:[e.jsx(ca,{children:i("sellModal.priceShort")}),e.jsxs(sc,{"aria-invalid":k.length>0&&!v,children:[e.jsx(ve,{className:"ccy"}),e.jsx(oc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:k,onChange:oe=>I(oe.target.value),disabled:N,"aria-label":i("sellModal.priceLabel",{currency:"credits"})}),e.jsx(lc,{"aria-hidden":!0,children:se})]})]}),e.jsxs(da,{children:[e.jsx(ca,{children:i("sellModal.expirationLabel")}),e.jsx(dc,{"data-invalid":!!C&&!F,children:e.jsx(Qo,{selected:C,onChange:S,minDate:z,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:N,showIcon:!0,showPopperArrow:!1,todayButton:i("sellModal.today"),ariaLabelledBy:void 0,"aria-label":i("sellModal.expirationLabel")})})]})]}),y&&v?e.jsx(uc,{children:i("sellModal.proceedsCredits",{count:H})}):null,ne?e.jsx(qn,{state:ne,canPayGas:!!(o!=null&&o.canPayGas),busy:N,onPayGas:()=>void ie({payGas:!0}),onLater:()=>de(null)}):null,e.jsx(Ve,{message:B}),e.jsx(cc,{onClick:()=>void ie(),disabled:N||fe||ne==="pending"||!v||!F,"data-testid":"list-submit",children:o?i(K?"sellModal.putUpForSale":"listingEdit.submit"):N?O?i("sellModal.puttingOnSale"):i("sellModal.confirmListing"):i("sellModal.putUpForSale")})]})})}const wc=a.div`
741
- position: fixed;
742
- inset: 0;
743
- z-index: 10000;
744
- display: flex;
745
- align-items: center;
746
- justify-content: center;
747
- padding: 16px;
748
- background: rgba(22, 21, 24, 0.55);
749
- `,vc=a.div`
750
- width: 560px;
751
- max-width: 100%;
752
- max-height: 92vh;
753
- overflow-y: auto;
754
- background: ${n.colors.white};
755
- border-radius: 16px;
756
- padding: 12px 16px 16px;
757
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
758
- display: flex;
759
- flex-direction: column;
760
- gap: 24px;
761
-
762
- ${n.media.maxWidth("mobile")} {
763
- padding: 12px 16px 16px;
764
- }
765
- `,jc=a.div`
766
- display: flex;
767
- flex-direction: column;
768
- gap: 4px;
769
- padding-bottom: 16px;
770
- border-bottom: 1px solid ${n.colors.gray4};
771
- `,kc=a.div`
772
- display: flex;
773
- align-items: center;
774
- justify-content: space-between;
775
- gap: 8px;
776
- `,$c=a.h2`
777
- margin: 0;
778
- font-family: ${n.font.sans};
779
- font-weight: 600;
780
- font-size: 20px;
781
- line-height: 1.6;
782
- color: ${n.colors.text};
783
- `,Cc=a.button`
784
- flex: none;
785
- display: grid;
786
- place-items: center;
787
- width: 24px;
788
- height: 24px;
789
- border: 0;
790
- background: none;
791
- cursor: pointer;
792
- color: ${n.colors.text};
793
-
794
- .ico {
795
- width: 18px;
796
- height: 18px;
797
- }
798
- &:disabled {
799
- opacity: 0.4;
800
- cursor: default;
801
- }
802
- &:focus-visible {
803
- outline: 2px solid ${n.colors.accent};
804
- outline-offset: 2px;
805
- }
806
- `,Ic=a.div`
807
- display: flex;
808
- align-items: center;
809
- gap: 12px;
810
- `,Sc=a.img`
811
- flex: none;
812
- width: 72px;
813
- height: 72px;
814
- border-radius: 12px;
815
- object-fit: cover;
816
- background: ${n.colors.media};
817
- `,Ac=a.p`
818
- margin: 0;
819
- font-family: ${n.font.sans};
820
- font-weight: 600;
821
- font-size: 18px;
822
- line-height: 1.4;
823
- color: ${n.colors.text};
824
- `,Mc=a.label`
825
- display: flex;
826
- flex-direction: column;
827
- gap: 6px;
828
- `,zc=a.span`
829
- font-family: ${n.font.sans};
830
- font-size: 12px;
831
- color: ${n.colors.muted};
832
- `,Rc=a.input`
833
- width: 100%;
834
- height: 44px;
835
- padding: 0 12px;
836
- border: 1px solid ${n.colors.text};
837
- border-radius: 8px;
838
- background: ${n.colors.white};
839
- font-family: ${n.font.sans};
840
- font-size: 14px;
841
- color: ${n.colors.text};
842
-
843
- &::placeholder {
844
- color: ${n.colors.muted2};
845
- }
846
- &:focus-visible {
847
- outline: none;
848
- border-color: ${n.colors.magenta};
849
- }
850
- &[aria-invalid='true'] {
851
- border-color: ${n.colors.err};
852
- }
853
- &:disabled {
854
- opacity: 0.6;
855
- }
856
- `,Pc=a.p`
857
- margin: 0;
858
- padding: 12px 14px;
859
- border-radius: 10px;
860
- background: rgba(255, 45, 85, 0.1);
861
- font-family: ${n.font.sans};
862
- font-size: 13px;
863
- line-height: 1.5;
864
- color: ${n.colors.text2};
865
- `,pa=a.div`
866
- display: flex;
867
- gap: 12px;
868
-
869
- ${n.media.maxWidth("mobile")} {
870
- flex-direction: column-reverse;
871
- }
872
- `,Lc=a.button`
873
- flex: 1;
874
- height: 48px;
875
- border: 2px solid ${n.colors.blackBtn};
876
- border-radius: 16px;
877
- background: transparent;
878
- color: ${n.colors.text};
879
- cursor: pointer;
880
- font-family: ${n.font.sans};
881
- font-weight: 600;
882
- font-size: 15px;
883
- line-height: 24px;
884
- letter-spacing: 0.46px;
885
- text-transform: uppercase;
886
-
887
- &:hover:not(:disabled) {
888
- background: rgba(36, 33, 41, 0.06);
889
- }
890
- &:focus-visible {
891
- outline: 2px solid ${n.colors.accent};
892
- outline-offset: 2px;
893
- }
894
- &:disabled {
895
- opacity: 0.5;
896
- cursor: default;
897
- }
898
- `,ha=a.button`
899
- flex: 1;
900
- display: inline-flex;
901
- align-items: center;
902
- justify-content: center;
903
- gap: 8px;
904
- height: 48px;
905
- border: 0;
906
- border-radius: 16px;
907
- background: ${n.colors.blackBtn};
908
- color: ${n.colors.softWhite};
909
- cursor: pointer;
910
- font-family: ${n.font.sans};
911
- font-weight: 600;
912
- font-size: 15px;
913
- line-height: 24px;
914
- letter-spacing: 0.46px;
915
- text-transform: uppercase;
916
-
917
- &:hover:not(:disabled) {
918
- filter: brightness(1.35);
919
- }
920
- &:focus-visible {
921
- outline: 2px solid ${n.colors.accent};
922
- outline-offset: 2px;
923
- }
924
- &:disabled {
925
- opacity: 0.55;
926
- cursor: default;
927
- }
928
- `,Tc=a.div`
929
- display: flex;
930
- flex-direction: column;
931
- align-items: center;
932
- gap: 16px;
933
- padding: 24px 16px;
934
- border-radius: 16px;
935
- background: rgba(193, 238, 207, 0.5);
936
- text-align: center;
937
- `,Ec=a.div`
938
- display: grid;
939
- place-items: center;
940
- width: 64px;
941
- height: 64px;
942
- border-radius: 50%;
943
- background: ${n.colors.ok};
944
- color: ${n.colors.white};
945
-
946
- .ico {
947
- width: 34px;
948
- height: 34px;
949
- }
950
- `,Fc=a.p`
951
- margin: 0;
952
- font-family: ${n.font.sans};
953
- font-size: 16px;
954
- line-height: 1.34;
955
- color: ${n.colors.text2};
956
-
957
- b {
958
- font-weight: 700;
959
- }
960
- `;function Bc(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function Nc({item:t,session:s,onClose:l,onTransferred:o}){const[d,u]=c.useState(""),[x,m]=c.useState(!1),[y,$]=c.useState(null),[h,g]=c.useState(!1),w=d.trim(),k=Bc(w),I=k&&w.toLowerCase()===s.address.toLowerCase(),C=w.length===0?null:k?I?i("transfer.selfAddress"):null:i("transfer.invalidAddress"),S=k&&!I&&!x;async function B(){if(S){$(null),m(!0);try{await qo({contractAddress:t.contractAddress,chainId:t.chainId,tokenId:t.tokenId,to:w,signer:s.signer}),X("Shop Transferred Item",{contract_address:t.contractAddress,token_id:t.tokenId}),g(!0),Pt.success(i("transfer.toastSuccess",{name:t.name})),o==null||o()}catch(f){yt(f)||ue(f,{flow:"transfer-item",tokenId:t.tokenId}),X("Shop Transfer Failed",{error_code:$e(f)}),$(yt(f)?i("getCredits.errorCanceled"):_e(f,i("transfer.errorGeneric")))}finally{m(!1)}}}return e.jsx(wc,{onClick:x?void 0:l,role:"presentation",children:e.jsxs(vc,{onClick:f=>f.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("transfer.title"),children:[e.jsx(jc,{children:e.jsxs(kc,{children:[e.jsx($c,{children:i("transfer.title")}),e.jsx(Cc,{onClick:l,disabled:x,"aria-label":i("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]})}),h?e.jsxs(e.Fragment,{children:[e.jsxs(Tc,{children:[e.jsx(Ec,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsx(Fc,{children:i("transfer.successBody",{name:t.name})})]}),e.jsx(pa,{children:e.jsx(ha,{onClick:l,children:i("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Ic,{children:[t.thumbnail?e.jsx(Sc,{src:t.thumbnail,alt:""}):null,e.jsx(Ac,{children:t.name})]}),e.jsxs(Mc,{children:[e.jsx(zc,{children:i("transfer.addressLabel")}),e.jsx(Rc,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:d,onChange:f=>u(f.target.value),disabled:x,"aria-invalid":!!C,"aria-label":i("transfer.addressLabel")}),C?e.jsx(Ve,{message:C}):null]}),e.jsx(Pc,{children:i("transfer.warning")}),e.jsx(Ve,{message:y}),e.jsxs(pa,{children:[e.jsx(Lc,{onClick:l,disabled:x,children:i("sellModal.cancel")}),e.jsx(ha,{onClick:()=>void B(),disabled:!S,children:x?i("transfer.transferring"):i("transfer.transfer")})]})]})]})})}const Wc=a(sd)`
961
- width: min(500px, 92vw);
962
- gap: 20px;
963
-
964
- ${n.media.maxWidth("mobile")} {
965
- [data-actions] {
966
- flex-direction: column-reverse;
967
- }
968
- [data-actions] > * {
969
- width: 100%;
970
- }
971
- }
972
- `,Dc=a(Je)`
973
- background: ${n.colors.accent};
974
- color: ${n.colors.white};
975
- text-transform: uppercase;
976
- letter-spacing: 0.046em;
977
- font-size: 13px;
978
-
979
- &:hover:not(:disabled) {
980
- background: ${n.colors.accentHover};
981
- }
982
- `;function Oc({name:t,managed:s,canPayGas:l,cancel:o,onClose:d}){const[u,x]=c.useState(!1),[m,y]=c.useState(!1),[$,h]=c.useState(null),[g,w]=c.useState(null);async function k(I){h(null),w(null),x(!0);try{const C=await o({payGas:I,onWaiting:S=>y(S>2e4)});C==="ok"?d():w(C==="relay-reverted"?"reverted":"pending")}catch(C){const S=yt(C);S||ue(C,{flow:"remove-listing"});const B=i("myAssets.removeListingError");h(s?B:S?i("getCredits.errorCanceled"):_e(C,B))}finally{x(!1),y(!1)}}return e.jsx(od,{onClick:u?void 0:d,role:"presentation",children:e.jsxs(Wc,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(ld,{children:e.jsx(dd,{children:i("removeListing.title")})}),e.jsx("p",{className:"muted",style:{margin:0},children:i("removeListing.body",{name:t})}),u&&m?e.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:i(l?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")}):null,g?e.jsx(qn,{state:g,canPayGas:l,busy:u,onPayGas:()=>void k(!0),testId:"cancel-gasless-failed"}):null,e.jsx(Ve,{message:$}),e.jsxs(cd,{"data-actions":!0,children:[e.jsx(Je,{variant:"outline",onClick:d,disabled:u,children:i("sellModal.cancel")}),e.jsx(Dc,{onClick:()=>void k(),disabled:u||g==="pending","data-testid":"remove-confirm",children:u?e.jsx(ud,{size:"small"}):i("itemDetail.manageRemove")})]})]})})}const vn=a.div`
983
- position: fixed;
984
- inset: 0;
985
- z-index: 10000;
986
- display: flex;
987
- align-items: center;
988
- justify-content: center;
989
- padding: 16px;
990
- background: rgba(22, 21, 24, 0.55);
991
- `,jn=a.div`
992
- width: 560px;
993
- max-width: 100%;
994
- max-height: 92vh;
995
- overflow-y: auto;
996
- background: ${n.colors.white};
997
- border-radius: 16px;
998
- padding: 12px 16px 16px;
999
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1000
- display: flex;
1001
- flex-direction: column;
1002
- gap: 24px;
1003
- `,kn=a.div`
1004
- display: flex;
1005
- align-items: center;
1006
- justify-content: space-between;
1007
- gap: 8px;
1008
- padding-bottom: 16px;
1009
- border-bottom: 1px solid ${n.colors.gray4};
1010
- `,$n=a.h2`
1011
- margin: 0;
1012
- font-family: ${n.font.sans};
1013
- font-weight: 600;
1014
- font-size: 20px;
1015
- line-height: 1.6;
1016
- color: ${n.colors.text};
1017
- `,Cn=a.button`
1018
- flex: none;
1019
- display: grid;
1020
- place-items: center;
1021
- width: 24px;
1022
- height: 24px;
1023
- border: 0;
1024
- background: none;
1025
- cursor: pointer;
1026
- color: ${n.colors.text};
1027
-
1028
- .ico {
1029
- width: 18px;
1030
- height: 18px;
1031
- }
1032
- &:disabled {
1033
- opacity: 0.4;
1034
- cursor: default;
1035
- }
1036
- &:focus-visible {
1037
- outline: 2px solid ${n.colors.accent};
1038
- outline-offset: 2px;
1039
- }
1040
- `,qc=a.p`
1041
- margin: 0;
1042
- font-family: ${n.font.sans};
1043
- font-size: 14px;
1044
- line-height: 1.57;
1045
- color: ${n.colors.text};
1046
- text-align: left;
1047
- `,Kc=a.div`
1048
- display: flex;
1049
- align-items: center;
1050
- gap: 12px;
1051
- `,Hc=a.div`
1052
- flex: none;
1053
- display: grid;
1054
- place-items: center;
1055
- width: 180px;
1056
- height: 180px;
1057
- border-radius: 16px;
1058
- background: ${n.colors.media};
1059
- border: 1px solid ${n.colors.gray4};
1060
- overflow: hidden;
1061
-
1062
- img {
1063
- width: 150px;
1064
- height: 150px;
1065
- object-fit: contain;
1066
- filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
1067
- }
1068
-
1069
- ${n.media.maxWidth("mobile")} {
1070
- width: 120px;
1071
- height: 120px;
1072
-
1073
- img {
1074
- width: 100px;
1075
- height: 100px;
1076
- }
1077
- }
1078
- `,Uc=a.div`
1079
- flex: 1 1 0;
1080
- min-width: 0;
1081
- display: flex;
1082
- flex-direction: column;
1083
- gap: 4px;
1084
- padding: 8px;
1085
- `,Qc=a.p`
1086
- margin: 0;
1087
- font-family: ${n.font.sans};
1088
- font-weight: 600;
1089
- font-size: 20px;
1090
- line-height: 1.57;
1091
- color: ${n.colors.text};
1092
- `,Gc=a.p`
1093
- margin: 0;
1094
- font-family: ${n.font.sans};
1095
- font-size: 10px;
1096
- line-height: 1.43;
1097
- color: ${n.colors.muted};
1098
- `,_c=a.label`
1099
- display: flex;
1100
- flex-direction: column;
1101
- gap: 4px;
1102
- `,Vc=a.span`
1103
- font-family: ${n.font.sans};
1104
- font-size: 12px;
1105
- color: ${n.colors.muted};
1106
- `,Jc=a.div`
1107
- display: flex;
1108
- align-items: center;
1109
- justify-content: space-between;
1110
- gap: 4px;
1111
- height: 42px;
1112
- padding: 0 8px;
1113
- border: 0.5px solid ${n.colors.text};
1114
- border-radius: 8px;
1115
- background: ${n.colors.white};
1116
-
1117
- &:focus-within {
1118
- border-color: ${n.colors.magenta};
1119
- }
1120
- &[aria-invalid='true'] {
1121
- border-color: ${n.colors.err};
1122
- }
1123
-
1124
- .ccy {
1125
- flex: none;
1126
- width: 22px;
1127
- height: 22px;
1128
- color: ${n.colors.rarity};
1129
- }
1130
- `,Yc=a.input`
1131
- flex: 1 1 auto;
1132
- min-width: 0;
1133
- border: 0;
1134
- outline: none;
1135
- background: transparent;
1136
- font-family: ${n.font.sans};
1137
- font-size: 13px;
1138
- color: ${n.colors.text};
1139
-
1140
- &::placeholder {
1141
- color: ${n.colors.muted2};
1142
- }
1143
- /* Strip the number spinners — the glyph + USD hint carry the affordance. */
1144
- &::-webkit-outer-spin-button,
1145
- &::-webkit-inner-spin-button {
1146
- -webkit-appearance: none;
1147
- margin: 0;
1148
- }
1149
- &[type='number'] {
1150
- -moz-appearance: textfield;
1151
- appearance: textfield;
1152
- }
1153
- `,Xc=a.span`
1154
- flex: none;
1155
- font-family: ${n.font.sans};
1156
- font-size: 10px;
1157
- color: ${n.colors.muted2};
1158
- `,Vt=a.p`
1159
- margin: 0;
1160
- font-family: ${n.font.sans};
1161
- font-size: 12px;
1162
- line-height: 1.5;
1163
- color: ${n.colors.muted};
1164
- `,Zc=a.button`
1165
- width: 100%;
1166
- height: 48px;
1167
- border: 0;
1168
- border-radius: 16px;
1169
- cursor: pointer;
1170
- background: ${n.colors.accent};
1171
- color: ${n.colors.white};
1172
- font-family: ${n.font.sans};
1173
- font-weight: 600;
1174
- font-size: 15px;
1175
- line-height: 24px;
1176
- letter-spacing: 0.46px;
1177
- text-transform: uppercase;
1178
-
1179
- &:hover:not(:disabled) {
1180
- background: ${n.colors.accentHover};
1181
- }
1182
- &:focus-visible {
1183
- outline: 2px solid ${n.colors.accent};
1184
- outline-offset: 2px;
1185
- }
1186
- &:disabled {
1187
- cursor: not-allowed;
1188
- background: rgba(105, 31, 169, 0.2);
1189
- color: ${n.colors.white};
1190
- }
1191
- `,eu=a.p`
1192
- margin: 0;
1193
- font-family: ${n.font.sans};
1194
- font-size: 13px;
1195
- color: ${n.colors.muted};
1196
- text-align: center;
1197
- `,tu=a.div`
1198
- display: flex;
1199
- flex-direction: column;
1200
- align-items: center;
1201
- gap: 16px;
1202
- padding: 24px 16px;
1203
- border-radius: 16px;
1204
- background: rgba(193, 238, 207, 0.5);
1205
- text-align: center;
1206
- `,nu=a.div`
1207
- display: grid;
1208
- place-items: center;
1209
- width: 64px;
1210
- height: 64px;
1211
- border-radius: 50%;
1212
- background: ${n.colors.ok};
1213
- color: ${n.colors.white};
1214
-
1215
- .ico {
1216
- width: 34px;
1217
- height: 34px;
1218
- }
1219
- `,iu=a.p`
1220
- margin: 0;
1221
- font-family: ${n.font.sans};
1222
- font-size: 20px;
1223
- line-height: 1.334;
1224
- color: ${n.colors.text2};
1225
-
1226
- b {
1227
- font-weight: 700;
1228
- }
1229
- `,au=a.p`
1230
- margin: 0;
1231
- display: inline-flex;
1232
- align-items: center;
1233
- gap: 4px;
1234
- font-family: ${n.font.sans};
1235
- font-size: 14px;
1236
- line-height: 1.43;
1237
- color: ${n.colors.text2};
1238
-
1239
- strong {
1240
- display: inline-flex;
1241
- align-items: center;
1242
- gap: 4px;
1243
- font-weight: 700;
1244
- }
1245
- .ccy-mark {
1246
- width: 18px;
1247
- height: 18px;
1248
- color: ${n.colors.rarity};
1249
- }
1250
- `,ru=a.div`
1251
- display: flex;
1252
- gap: 12px;
1253
-
1254
- ${n.media.maxWidth("mobile")} {
1255
- flex-direction: column-reverse;
1256
- }
1257
- `,su=a.button`
1258
- flex: 1 1 0;
1259
- height: 48px;
1260
- border: 2px solid ${n.colors.accent};
1261
- border-radius: 12px;
1262
- background: transparent;
1263
- color: ${n.colors.accent};
1264
- cursor: pointer;
1265
- font-family: ${n.font.sans};
1266
- font-weight: 600;
1267
- font-size: 13px;
1268
- line-height: 24px;
1269
- letter-spacing: 0.46px;
1270
- text-transform: uppercase;
1271
-
1272
- &:hover {
1273
- background: rgba(105, 31, 169, 0.06);
1274
- }
1275
- &:focus-visible {
1276
- outline: 2px solid ${n.colors.accent};
1277
- outline-offset: 2px;
1278
- }
1279
- `,ou=a.button`
1280
- flex: 1 1 0;
1281
- height: 48px;
1282
- border: 0;
1283
- border-radius: 12px;
1284
- background: ${n.colors.accent};
1285
- color: ${n.colors.softWhite};
1286
- cursor: pointer;
1287
- font-family: ${n.font.sans};
1288
- font-weight: 600;
1289
- font-size: 13px;
1290
- line-height: 24px;
1291
- letter-spacing: 0.46px;
1292
- text-transform: uppercase;
1293
-
1294
- &:hover {
1295
- background: ${n.colors.accentHover};
1296
- }
1297
- &:focus-visible {
1298
- outline: 2px solid ${n.colors.accent};
1299
- outline-offset: 2px;
1300
- }
1301
- `,lu=1e3*60*60*24*182;function du({item:t,session:s,edit:l,onListed:o,onClose:d}){const u=dt(),x=lt(),[m,y]=c.useState(l!=null&&l.currentCredits?String(l.currentCredits):"10"),[$,h]=c.useState(null),[g,w]=c.useState(null),[k,I]=c.useState(!1),[C,S]=c.useState(null),[B,f]=c.useState(null),{cancelDone:N,slow:r,cancelFailed:E,setCancelFailed:Y,cancelCurrent:U,signal:A}=Rr(l,w),R=st.chainId,K=an(s),{data:G}=tn(s.address),ne=G!=null&&G.name?nn(G.name):On(s.address),de=Number(m),ee=Number.isInteger(de)&&de>0,_=!!l&&!N&&de===l.currentCredits,O=ee?`$${rt(de).toFixed(2)}`:"$0";c.useEffect(()=>{let L=!1;return(async()=>{try{const F=await Ol({contractAddress:t.contractAddress,chainId:R});L||S(F)}catch{L||S(!1)}})(),()=>{L=!0}},[t.contractAddress,R]);async function H(L={}){var z,se;w(null);const F=Number(m);if(!Number.isInteger(F)||F<=0){w(i("primaryList.errorWholeNumber"));return}I(!0);try{if(!await U(L.payGas))return;C||(h(i("primaryList.statusEnabling")),await ql({signer:s.signer,contractAddress:t.contractAddress,chainId:R}),S(!0)),h(i("primaryList.statusPublishing"));const ie=await Kl({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:R},usdPrice:rt(F),uses:t.remainingSupply,expiresAtMs:Date.now()+lu});h(i("primaryList.statusFinishing"));const xe=await(l?Sr(ie,s.identity,{signal:A()}):lr(ie,s.identity));(z=A())==null||z.throwIfAborted(),h(null),f(F),X("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:F,price_usd:rt(F),listing_type:"primary",is_primary:!0}),Pt.success(i(l?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(F,xe.id),u.invalidateQueries({queryKey:["publishable-items"]}),u.invalidateQueries({queryKey:["collection-sale-state"]}),u.invalidateQueries({queryKey:["shop-items"]}),u.invalidateQueries({queryKey:["catalog-items"]}),u.invalidateQueries({queryKey:["overview-listings"]}),u.invalidateQueries({queryKey:["upsell-listings"]})}catch(ie){if((se=A())!=null&&se.aborted)return;ue(ie,{flow:"list_primary"}),X("Shop Listing Failed",{listing_type:"primary",error_code:$e(ie)}),w(_e(ie,i(l?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),h(null)}finally{I(!1)}}function v(){d(),x(Ms(t.contractAddress,t.blockchainItemId))}const fe=C===null?i("primaryList.checking"):l?i(N?"primaryList.putOnSale":"listingEdit.submit"):k?K?i("primaryList.publishing"):i("primaryList.confirmListing"):C===!1?i("primaryList.enableAndPutOnSale"):i("primaryList.putOnSale");return B!==null?e.jsx(vn,{onClick:d,role:"presentation",children:e.jsxs(jn,{onClick:L=>L.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(l?"listingEdit.successHeader":"primaryList.successTitle"),children:[e.jsxs(kn,{children:[e.jsx($n,{children:i(l?"listingEdit.successHeader":"primaryList.successTitle")}),e.jsx(Cn,{onClick:d,"aria-label":i("getCredits.done"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsxs(tu,{children:[e.jsx(nu,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsx(iu,{children:e.jsx("b",{children:t.name})}),e.jsxs(au,{children:[i("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(ve,{className:"ccy-mark"})," ",e.jsx(ye,{credits:B})]})," ",i("primaryList.dotAvailable",{count:t.remainingSupply})]})]}),e.jsxs(ru,{children:[e.jsx(su,{onClick:d,children:i("getCredits.done")}),e.jsx(ou,{onClick:v,children:i("primaryList.viewInShop")})]})]})}):l&&k?e.jsx(vn,{role:"presentation",children:e.jsxs(jn,{onClick:L=>L.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(kn,{children:[e.jsx($n,{children:i("listingEdit.title")}),e.jsx(Cn,{disabled:!0,"aria-label":i("primaryList.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(Pr,{phase:N?"list":"cancel",managed:K,slow:r})]})}):e.jsx(vn,{onClick:k?void 0:d,role:"presentation",children:e.jsxs(jn,{"data-testid":"modal",onClick:L=>L.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":l?i("listingEdit.title"):i("primaryList.publishTitle",{name:t.name}),children:[e.jsxs(kn,{children:[e.jsx($n,{children:l?i("listingEdit.title"):i("primaryList.publishTitle",{name:t.name})}),e.jsx(Cn,{onClick:d,disabled:k,"aria-label":i("primaryList.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(qc,{children:i("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(Kc,{children:[e.jsx(Hc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(Uc,{children:[e.jsx(Qc,{children:t.name}),ne?e.jsx(Gc,{children:i("primaryList.byCreator",{name:ne})}):null]})]}),e.jsxs(_c,{children:[e.jsx(Vc,{children:i("primaryList.priceShort")}),e.jsxs(Jc,{"aria-invalid":m.length>0&&!ee,children:[e.jsx(ve,{className:"ccy"}),e.jsx(Yc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:m,onChange:L=>y(L.target.value),disabled:k,"aria-label":i("primaryList.priceLabel",{currency:ze.name})}),e.jsx(Xc,{"aria-hidden":!0,children:O})]})]}),e.jsx(Vt,{children:i("primaryList.pricedInWhole",{currency:ze.name,currencySingular:ze.nameSingular})}),l?!k&&!N?e.jsx(Vt,{children:i("listingEdit.subtitle")}):null:C===!1&&!k?e.jsx(Vt,{children:K?i("primaryList.firstTimeManaged",{collectionName:t.collectionName}):i("primaryList.firstTimeConfirm",{collectionName:t.collectionName})}):C===!0&&!k?e.jsx(Vt,{children:K?i("primaryList.readyManaged"):i("primaryList.readyConfirm")}):null,E?e.jsx(qn,{state:E,canPayGas:!!(l!=null&&l.canPayGas),busy:k,onPayGas:()=>void H({payGas:!0}),onLater:()=>Y(null)}):null,$&&!l?e.jsx(eu,{children:$}):null,e.jsx(Ve,{message:g}),e.jsx(Zc,{onClick:()=>void H(),disabled:k||_||E==="pending"||C===null||!ee,"data-testid":"list-submit",children:fe})]})})}const Lr=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function Tr(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function Er(t){return t.reduce((s,l)=>s+Math.max(0,Math.floor(l.amount||0)),0)}function cu(t,s){const l=t.filter(d=>d.address.trim().length>0||(d.amount||0)>0);if(l.length===0)return!1;for(const d of l)if(!Tr(d.address)||!Number.isInteger(d.amount)||d.amount<1)return!1;const o=Er(l);return o>=1&&o<=s}function uu(t,s){const l=[],o=[];for(const d of t){const u=d.address.trim(),x=Math.max(0,Math.floor(d.amount||0));if(!(!u||x===0))for(let m=0;m<x;m++)l.push(u),o.push(s)}return{beneficiaries:l,itemIds:o}}async function pu(t){const{contractAddress:s,chainId:l,beneficiaries:o,itemIds:d,signer:u}=t,x={...Rs(Ps.ERC721CollectionV2,l),address:s},m=new Xl(Lr).encodeFunctionData("issueTokens",[o,d]),y=Ql(),$=Gl(u.provider,y),h=await xd($,y,m,x,{serverURL:kr.relayerUrl});return await _l(h,"the mint"),h}async function hu(t){const{signer:s,contractAddress:l,chainId:o,entries:d,itemId:u}=t,{beneficiaries:x,itemIds:m}=uu(d,u);if(x.length===0)throw new Error("No copies to issue");if(kr.enabled)try{return await pu({contractAddress:l,chainId:o,beneficiaries:x,itemIds:m,signer:s})}catch(g){if(g instanceof pd&&g.code===hd.USER_DENIED||g instanceof Hl)throw g;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",g)}return await zs(s.provider,o),(await(await new Yl(l,Lr,s).issueTokens(x,m,Ul(o))).wait()).transactionHash}const xu=a.div`
1302
- position: fixed;
1303
- inset: 0;
1304
- z-index: 10000;
1305
- display: flex;
1306
- align-items: center;
1307
- justify-content: center;
1308
- padding: 16px;
1309
- background: rgba(22, 21, 24, 0.55);
1310
- `,fu=a.div`
1311
- width: 560px;
1312
- max-width: 100%;
1313
- max-height: 92vh;
1314
- overflow-y: auto;
1315
- background: ${n.colors.white};
1316
- border-radius: 16px;
1317
- padding: 12px 16px 16px;
1318
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1319
- display: flex;
1320
- flex-direction: column;
1321
- gap: 20px;
1322
- `,mu=a.div`
1323
- display: flex;
1324
- align-items: center;
1325
- justify-content: space-between;
1326
- gap: 8px;
1327
- padding-bottom: 16px;
1328
- border-bottom: 1px solid ${n.colors.gray4};
1329
- `,gu=a.h2`
1330
- margin: 0;
1331
- font-family: ${n.font.sans};
1332
- font-weight: 600;
1333
- font-size: 20px;
1334
- line-height: 1.6;
1335
- color: ${n.colors.text};
1336
- `,bu=a.button`
1337
- flex: none;
1338
- display: grid;
1339
- place-items: center;
1340
- width: 24px;
1341
- height: 24px;
1342
- border: 0;
1343
- background: none;
1344
- cursor: pointer;
1345
- color: ${n.colors.text};
1346
-
1347
- .ico {
1348
- width: 18px;
1349
- height: 18px;
1350
- }
1351
- &:disabled {
1352
- opacity: 0.4;
1353
- cursor: default;
1354
- }
1355
- &:focus-visible {
1356
- outline: 2px solid ${n.colors.accent};
1357
- outline-offset: 2px;
1358
- }
1359
- `,yu=a.p`
1360
- margin: 0;
1361
- font-family: ${n.font.sans};
1362
- font-size: 14px;
1363
- line-height: 1.57;
1364
- color: ${n.colors.text};
1365
- text-align: left;
1366
- `,wu=a.div`
1367
- display: flex;
1368
- align-items: center;
1369
- gap: 12px;
1370
- `,vu=a.div`
1371
- flex: none;
1372
- display: grid;
1373
- place-items: center;
1374
- width: 56px;
1375
- height: 56px;
1376
- border-radius: 12px;
1377
- background: ${n.colors.media};
1378
- border: 1px solid ${n.colors.gray4};
1379
- overflow: hidden;
1380
-
1381
- img {
1382
- width: 48px;
1383
- height: 48px;
1384
- object-fit: contain;
1385
- filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
1386
- }
1387
- `,ju=a.p`
1388
- margin: 0;
1389
- font-family: ${n.font.sans};
1390
- font-weight: 600;
1391
- font-size: 16px;
1392
- line-height: 1.4;
1393
- color: ${n.colors.text};
1394
- `,ku=a.div`
1395
- display: flex;
1396
- flex-direction: column;
1397
- gap: 10px;
1398
- `,$u=a.div`
1399
- display: flex;
1400
- align-items: flex-start;
1401
- gap: 8px;
1402
- `,Cu=a.label`
1403
- flex: 1 1 auto;
1404
- min-width: 0;
1405
- display: flex;
1406
- flex-direction: column;
1407
- gap: 4px;
1408
- `,Iu=a.label`
1409
- flex: none;
1410
- width: 96px;
1411
- display: flex;
1412
- flex-direction: column;
1413
- gap: 4px;
1414
- `,xa=a.span`
1415
- font-family: ${n.font.sans};
1416
- font-size: 12px;
1417
- color: ${n.colors.muted};
1418
- `,fa=a.input`
1419
- height: 42px;
1420
- padding: 0 10px;
1421
- border: 0.5px solid ${n.colors.text};
1422
- border-radius: 8px;
1423
- background: ${n.colors.white};
1424
- font-family: ${n.font.sans};
1425
- font-size: 13px;
1426
- color: ${n.colors.text};
1427
- outline: none;
1428
-
1429
- &::placeholder {
1430
- color: ${n.colors.muted2};
1431
- }
1432
- &:focus {
1433
- border-color: ${n.colors.magenta};
1434
- }
1435
- &[aria-invalid='true'] {
1436
- border-color: ${n.colors.err};
1437
- }
1438
- /* Strip the number spinners on the amount input. */
1439
- &::-webkit-outer-spin-button,
1440
- &::-webkit-inner-spin-button {
1441
- -webkit-appearance: none;
1442
- margin: 0;
1443
- }
1444
- &[type='number'] {
1445
- -moz-appearance: textfield;
1446
- appearance: textfield;
1447
- }
1448
- `,Su=a.button`
1449
- flex: none;
1450
- margin-top: 22px;
1451
- display: grid;
1452
- place-items: center;
1453
- width: 42px;
1454
- height: 42px;
1455
- border: 0.5px solid ${n.colors.gray4};
1456
- border-radius: 8px;
1457
- background: ${n.colors.white};
1458
- color: ${n.colors.muted};
1459
- cursor: pointer;
1460
-
1461
- .ico {
1462
- width: 16px;
1463
- height: 16px;
1464
- }
1465
- &:hover:not(:disabled) {
1466
- color: ${n.colors.err};
1467
- border-color: ${n.colors.err};
1468
- }
1469
- &:disabled {
1470
- opacity: 0.35;
1471
- cursor: default;
1472
- }
1473
- &:focus-visible {
1474
- outline: 2px solid ${n.colors.accent};
1475
- outline-offset: 2px;
1476
- }
1477
- `,Au=a.button`
1478
- align-self: flex-start;
1479
- display: inline-flex;
1480
- align-items: center;
1481
- gap: 6px;
1482
- border: 0;
1483
- background: none;
1484
- padding: 0;
1485
- cursor: pointer;
1486
- font-family: ${n.font.sans};
1487
- font-weight: 600;
1488
- font-size: 13px;
1489
- color: ${n.colors.accent};
1490
-
1491
- .ico {
1492
- width: 16px;
1493
- height: 16px;
1494
- }
1495
- &:disabled {
1496
- opacity: 0.4;
1497
- cursor: default;
1498
- }
1499
- &:focus-visible {
1500
- outline: 2px solid ${n.colors.accent};
1501
- outline-offset: 2px;
1502
- }
1503
- `,Mu=a.p`
1504
- margin: 0;
1505
- font-family: ${n.font.sans};
1506
- font-size: 13px;
1507
- line-height: 1.5;
1508
- color: ${t=>t.over?n.colors.err:n.colors.text};
1509
-
1510
- strong {
1511
- font-weight: 700;
1512
- }
1513
- `,zu=a.p`
1514
- margin: 0;
1515
- font-family: ${n.font.sans};
1516
- font-size: 12px;
1517
- line-height: 1.5;
1518
- color: ${n.colors.muted};
1519
- `;a.p`
1520
- margin: 0;
1521
- font-family: ${n.font.sans};
1522
- font-size: 13px;
1523
- color: ${n.colors.muted};
1524
- text-align: center;
1525
- `;const Ru=a.p`
1526
- margin: 0;
1527
- font-family: ${n.font.sans};
1528
- font-size: 11px;
1529
- color: ${n.colors.err};
1530
- `,ma=a.div`
1531
- display: flex;
1532
- gap: 12px;
1533
-
1534
- ${n.media.maxWidth("mobile")} {
1535
- flex-direction: column-reverse;
1536
- }
1537
- `,Pu=a.button`
1538
- flex: 1 1 0;
1539
- height: 48px;
1540
- border: 2px solid ${n.colors.accent};
1541
- border-radius: 12px;
1542
- background: transparent;
1543
- color: ${n.colors.accent};
1544
- cursor: pointer;
1545
- font-family: ${n.font.sans};
1546
- font-weight: 600;
1547
- font-size: 13px;
1548
- line-height: 24px;
1549
- letter-spacing: 0.46px;
1550
- text-transform: uppercase;
1551
-
1552
- &:hover:not(:disabled) {
1553
- background: rgba(105, 31, 169, 0.06);
1554
- }
1555
- &:disabled {
1556
- opacity: 0.5;
1557
- cursor: not-allowed;
1558
- }
1559
- &:focus-visible {
1560
- outline: 2px solid ${n.colors.accent};
1561
- outline-offset: 2px;
1562
- }
1563
- `,ga=a.button`
1564
- flex: 1 1 0;
1565
- height: 48px;
1566
- border: 0;
1567
- border-radius: 12px;
1568
- cursor: pointer;
1569
- background: ${n.colors.accent};
1570
- color: ${n.colors.white};
1571
- font-family: ${n.font.sans};
1572
- font-weight: 600;
1573
- font-size: 13px;
1574
- line-height: 24px;
1575
- letter-spacing: 0.46px;
1576
- text-transform: uppercase;
1577
-
1578
- &:hover:not(:disabled) {
1579
- background: ${n.colors.accentHover};
1580
- }
1581
- &:focus-visible {
1582
- outline: 2px solid ${n.colors.accent};
1583
- outline-offset: 2px;
1584
- }
1585
- &:disabled {
1586
- cursor: not-allowed;
1587
- background: rgba(105, 31, 169, 0.2);
1588
- color: ${n.colors.white};
1589
- }
1590
- `,Lu=a.div`
1591
- display: flex;
1592
- flex-direction: column;
1593
- align-items: center;
1594
- gap: 16px;
1595
- padding: 24px 16px;
1596
- border-radius: 16px;
1597
- background: rgba(193, 238, 207, 0.5);
1598
- text-align: center;
1599
- `,Tu=a.div`
1600
- display: grid;
1601
- place-items: center;
1602
- width: 64px;
1603
- height: 64px;
1604
- border-radius: 50%;
1605
- background: ${n.colors.ok};
1606
- color: ${n.colors.white};
1607
-
1608
- .ico {
1609
- width: 34px;
1610
- height: 34px;
1611
- }
1612
- `,Eu=a.p`
1613
- margin: 0;
1614
- font-family: ${n.font.sans};
1615
- font-size: 20px;
1616
- line-height: 1.334;
1617
- color: ${n.colors.text2};
1618
-
1619
- b {
1620
- font-weight: 700;
1621
- }
1622
- `;function Fu(t){return t.map(s=>({address:s.address,amount:Number(s.amount)}))}function Bu({item:t,session:s,onClose:l,onIssued:o}){const d=dt(),[u,x]=c.useState([{address:"",amount:"1"}]),[m,y]=c.useState(!1),[$,h]=c.useState(null),[g,w]=c.useState(null),k=c.useRef(null),I=an(s),C=Fu(u),S=Er(C),B=cu(C,t.available),f=S>t.available;c.useEffect(()=>{var R;(R=k.current)==null||R.focus();function A(K){K.key==="Escape"&&!m&&l()}return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[m,l]);function N(A,R){x(K=>K.map((G,ne)=>ne===A?{...G,...R}:G))}function r(){x(A=>[...A,{address:"",amount:"1"}])}function E(A){x(R=>R.length<=1?R:R.filter((K,G)=>G!==A))}async function Y(){if(!(!B||m)){h(null),y(!0);try{await hu({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId,entries:C,itemId:t.itemId}),X("Shop Issued Item",{contract_address:t.contractAddress,item_id:t.itemId,recipients:C.filter(A=>A.address.trim().length>0).length,copies:S}),w(S),Pt.success(i("issue.toastSuccess",{count:S,name:t.name})),d.invalidateQueries({queryKey:["publishable-item"]}),d.invalidateQueries({queryKey:["publishable-items"]}),o==null||o()}catch(A){yt(A)||ue(A,{flow:"issue-item",itemId:t.itemId}),X("Shop Issue Failed",{error_code:$e(A)}),h(yt(A)?i("getCredits.errorCanceled"):_e(A,i("issue.errorGeneric")))}finally{y(!1)}}}const U=m?I?i("issue.issuing"):i("issue.confirm"):S>0?i("issue.issueCount",{count:S}):i("issue.issue");return e.jsx(xu,{onClick:m?void 0:l,role:"presentation",children:e.jsxs(fu,{ref:k,tabIndex:-1,"data-testid":"issue-modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("issue.title"),children:[e.jsxs(mu,{children:[e.jsx(gu,{children:i("issue.title")}),e.jsx(bu,{onClick:l,disabled:m,"aria-label":i("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),g!==null?e.jsxs(e.Fragment,{children:[e.jsxs(Lu,{children:[e.jsx(Tu,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsx(Eu,{children:i("issue.successBody",{count:g,name:t.name})})]}),e.jsx(ma,{children:e.jsx(ga,{onClick:l,children:i("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(wu,{children:[e.jsx(vu,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsx(ju,{children:t.name})]}),e.jsx(yu,{children:i("issue.subtitle")}),e.jsx(ku,{children:u.map((A,R)=>{const K=A.address.trim(),G=K.length>0&&!Tr(K),ne=Number(A.amount),de=A.amount.length>0&&(!Number.isInteger(ne)||ne<1);return e.jsxs($u,{children:[e.jsxs(Cu,{children:[e.jsx(xa,{children:i("issue.addressLabel")}),e.jsx(fa,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:A.address,onChange:ee=>N(R,{address:ee.target.value}),disabled:m,"aria-invalid":G,"aria-label":i("issue.addressLabel")}),G?e.jsx(Ru,{children:i("issue.invalidAddress")}):null]}),e.jsxs(Iu,{children:[e.jsx(xa,{children:i("issue.amountLabel")}),e.jsx(fa,{type:"number",min:"1",step:"1",inputMode:"numeric",value:A.amount,onChange:ee=>N(R,{amount:ee.target.value}),disabled:m,"aria-invalid":de,"aria-label":i("issue.amountLabel")})]}),e.jsx(Su,{onClick:()=>E(R),disabled:m||u.length<=1,"aria-label":i("issue.removeRow"),children:e.jsx(P,{name:"close",className:"ico"})})]},R)})}),e.jsxs(Au,{onClick:r,disabled:m,children:[e.jsx(P,{name:"plus",className:"ico"}),i("issue.addRow")]}),e.jsxs(Mu,{over:f,"aria-live":"polite",children:[e.jsx("strong",{children:S})," / ",t.available," ",i("issue.itemsToIssue")]}),f?e.jsx(zu,{children:i("issue.overCap",{available:t.available})}):null,e.jsx(Ve,{message:$}),e.jsxs(ma,{children:[e.jsx(Pu,{onClick:l,disabled:m,children:i("sellModal.cancel")}),e.jsx(ga,{onClick:()=>void Y(),disabled:!B||m,children:U})]})]})]})})}const Nu=a.div`
1623
- position: fixed;
1624
- inset: 0;
1625
- z-index: 10000;
1626
- display: flex;
1627
- align-items: center;
1628
- justify-content: center;
1629
- padding: 16px;
1630
- background: rgba(22, 21, 24, 0.55);
1631
- `,Wu=a.div`
1632
- width: 760px;
1633
- max-width: 100%;
1634
- background: ${n.colors.white};
1635
- border-radius: 16px;
1636
- padding: 12px 16px 16px;
1637
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1638
- display: flex;
1639
- flex-direction: column;
1640
- gap: 16px;
1641
- `,Du=a.div`
1642
- display: flex;
1643
- align-items: center;
1644
- justify-content: space-between;
1645
- gap: 8px;
1646
- padding-bottom: 16px;
1647
- border-bottom: 1px solid ${n.colors.gray4};
1648
- `,Ou=a.h2`
1649
- margin: 0;
1650
- font-family: ${n.font.sans};
1651
- font-weight: 600;
1652
- font-size: 20px;
1653
- line-height: 1.6;
1654
- color: ${n.colors.text};
1655
- `,qu=a.button`
1656
- flex: none;
1657
- display: grid;
1658
- place-items: center;
1659
- width: 24px;
1660
- height: 24px;
1661
- border: 0;
1662
- background: none;
1663
- cursor: pointer;
1664
- color: ${n.colors.text};
1665
-
1666
- .ico {
1667
- width: 18px;
1668
- height: 18px;
1669
- }
1670
- &:focus-visible {
1671
- outline: 2px solid ${n.colors.accent};
1672
- outline-offset: 2px;
1673
- }
1674
- `,Ku=a.video`
1675
- display: block;
1676
- width: 100%;
1677
- max-height: 70vh;
1678
- border-radius: 12px;
1679
- background: ${n.colors.blackBtn};
1680
- `;function Hu({src:t,itemName:s,onClose:l}){const o=c.useRef(null);return c.useEffect(()=>{var u;(u=o.current)==null||u.focus();function d(x){x.key==="Escape"&&l()}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[l]),e.jsx(Nu,{onClick:l,role:"presentation",children:e.jsxs(Wu,{ref:o,tabIndex:-1,onClick:d=>d.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":i("itemDetail.showcaseTitle"),children:[e.jsxs(Du,{children:[e.jsx(Ou,{children:s||i("itemDetail.showcaseTitle")}),e.jsx(qu,{onClick:l,"aria-label":i("itemDetail.showcaseClose"),children:e.jsx(P,{name:"close",size:18})})]}),e.jsx(Ku,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:Uu}=n,Qu=a.div`
1681
- position: fixed;
1682
- inset: 0;
1683
- z-index: 60;
1684
- display: grid;
1685
- place-items: center;
1686
- padding: 20px;
1687
- `,Gu=a.div`
1688
- position: absolute;
1689
- inset: 0;
1690
- background: rgba(22, 21, 24, 0.45);
1691
- `,_u=a.div`
1692
- position: relative;
1693
- z-index: 1;
1694
- width: 100%;
1695
- max-width: 420px;
1696
- background: ${Oe.white};
1697
- border-radius: ${Uu.banner};
1698
- padding: 24px;
1699
- box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
1700
- animation: cart-pop-in 0.16s ease;
1701
- `,Vu=a.div`
1702
- display: flex;
1703
- align-items: center;
1704
- gap: 14px;
1705
- margin-bottom: 18px;
1706
- `,Ju=a.div`
1707
- width: 64px;
1708
- height: 64px;
1709
- flex: none;
1710
- border-radius: 12px;
1711
- overflow: hidden;
1712
- background: ${Oe.media};
1713
-
1714
- & img {
1715
- width: 100%;
1716
- height: 100%;
1717
- object-fit: contain;
1718
- }
1719
- `,Yu=a.div`
1720
- font-weight: 700;
1721
- font-size: 16px;
1722
- color: ${Oe.text};
1723
- margin-bottom: 6px;
1724
- `,Xu=a.div`
1725
- background: ${Oe.panel};
1726
- border-radius: 14px;
1727
- padding: 16px;
1728
- margin-bottom: 14px;
1729
- `,ba=a.div`
1730
- color: ${Oe.muted};
1731
- font-size: 13px;
1732
- font-weight: 600;
1733
- margin-bottom: 6px;
1734
- `,ya=a.div`
1735
- display: flex;
1736
- align-items: center;
1737
- gap: 8px;
1738
- font-weight: 700;
1739
- font-size: 24px;
1740
- color: ${Oe.text};
1741
-
1742
- &[data-approx] {
1743
- color: ${Oe.text2};
1744
- }
1745
- `,Zu=a.span`
1746
- color: ${Oe.muted};
1747
- `,wa=a(ve)`
1748
- width: 20px;
1749
- height: 20px;
1750
- color: ${Oe.text};
1751
- `,va=a.div`
1752
- margin-top: 6px;
1753
- font-size: 13px;
1754
- `,ep=a.div`
1755
- font-size: 13px;
1756
- margin-bottom: 6px;
1757
- `,Fr=wt`
1758
- margin: 6px 0 0;
1759
- font-size: 13px;
1760
- `,In=a.p`
1761
- ${Fr};
1762
- `,tp=a(Ve)`
1763
- ${Fr};
1764
- `,np=a.div`
1765
- display: flex;
1766
- gap: 10px;
1767
- margin-top: 18px;
1768
- `,ja=a(Je)`
1769
- flex: 1;
1770
- `;function Sn(t){if(yt(t))return i("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?i("marketCheckout.error.insufficient",{currency:ze.name}):s.includes("not found")||s.includes("no active listing")||s.includes("404")?i("marketCheckout.error.soldOrRemoved"):s.includes("your own listing")?i("errors.cantBuyOwn"):i("marketCheckout.error.generic")}function ip(t){return{id:t.tradeId,tradeId:t.tradeId,name:t.name,creator:t.creator,contractAddress:t.contractAddress,itemId:t.itemId,category:t.category,wearableCategory:t.wearableCategory??void 0,rarity:t.rarity,network:t.network,chainId:t.chainId,thumbnail:t.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function Br({listing:t,rate:s,onClose:l,onSold:o}){const{session:d}=ot(),{data:u,isError:x}=rr(d),m=dt(),y=lt(),[$,h]=c.useState("confirm"),[g,w]=c.useState(i("marketCheckout.checkingListing")),[k,I]=c.useState(null),[C,S]=c.useState(null),[B,f]=c.useState(null),[N,r]=c.useState(!1),E=c.useRef(null),Y=c.useRef(!1),U=c.useRef(zr());c.useEffect(()=>(Y.current=!1,()=>{Y.current=!0}),[]);const A=Qe(hn(t.manaWei,s));c.useEffect(()=>{let _=!1;if(!d){h("error"),I(i("buyModal.signInToCheckout"));return}return(async()=>{try{const H=await ur(t.tradeId);if(!H)throw new Error("not found");if(Ts(H,d.address))throw new Error("You can't buy your own listing.");const v=hn(t.manaWei,s);if(!Number.isFinite(v)||v<=0)throw new Error("price unavailable");if(_)return;S({trade:H,usdCents:v,credits:Qe(v)}),w("")}catch(H){if(_)return;console.error("[market] listing check failed",H),X(we(H)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:$e(H),value_usd:Math.round(hn(t.manaWei,s))/100}),h("error"),I(Sn(H))}})(),()=>{_=!0,E.current&&d&&(ne([E.current]),E.current=null)}},[]);const R=!!C&&u!=null&&u.credits<C.credits;async function K(){if(!d||!C)return;if(R){X("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:C.credits,credits_balance:(u==null?void 0:u.credits)??0,shortfall:Math.max(0,C.credits-((u==null?void 0:u.credits)??0))}),E.current&&(await G([E.current])&&f(null),E.current=null),y("/credits");return}h("working"),I(null),r(!1);let _=B;if(!_){w(i("marketCheckout.lockingPrice"));try{const{credit:L,maxCreditedValue:F,usdCents:z}=await Fn(d.identity,C.usdCents,t.tradeId);if(Y.current){G([L.id]);return}E.current=L.id,m.invalidateQueries({queryKey:["usd-balance"]});const se=Qe(z);if(_={trade:C.trade,credit:L,maxCreditedValue:F,usdCents:z,credits:se},f(_),se!==C.credits){S({trade:C.trade,usdCents:z,credits:se}),r(!0),w(""),h("confirm");return}}catch(L){console.error("[market] authorize failed",L),we(L)||ue(L,{flow:"market_buy_now",step:"authorize"}),X(we(L)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:$e(L),value_usd:C.usdCents/100}),w(""),I(Sn(L)),h("error");return}}if(!_)return;const O=_;let H=!1,v;try{w(i("marketCheckout.confirming"));const L={trade:O.trade,buyer:d.address,signer:d.signer,credits:[O.credit],maxCreditedValue:O.maxCreditedValue,onBroadcast:({txHash:F})=>U.current.broadcast(O.credit.id,F),onReverted:({txHash:F})=>{F&&U.current.reverted(F)}};if(U.current.submitStarted(O.credit.id),vr())try{v=await ed(L),U.current.broadcast(O.credit.id,v),await $r(v),H=!0}catch(F){if(F instanceof Cr)H=!0;else if(F instanceof Ir){if(F.reason==="relayer-unreachable")throw U.current.unobservable(O.credit.id),F;if(!en(d.providerType))throw F;v=await Ni(L)}else throw v&&U.current.reverted(v),F}else v=await Ni(L)}catch(L){U.current.submitFinished(O.credit.id),console.error("[market] buy now failed",L),await G([O.credit.id])&&f(null),E.current=null,X(we(L)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(L),value_usd:O.usdCents/100}),m.invalidateQueries({queryKey:["usd-balance"]}),I(Sn(L)),h("error");const F=(L.message??"").toLowerCase();(F.includes("not found")||F.includes("no active listing")||F.includes("404"))&&o();return}U.current.submitFinished(O.credit.id),E.current=null;try{m.invalidateQueries({queryKey:["usd-balance"]}),X("Shop Completed Purchase",{items:[{item_id:t.itemId??null,contract_address:t.contractAddress,token_id:null,price_usd:O.usdCents/100,category:t.category,is_smart:!1}],value_credits:O.credits,value_usd:O.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:H,transaction_hash:v??null}),m.invalidateQueries({queryKey:["detail-trade"]}),m.invalidateQueries({queryKey:["shop-item"]}),m.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["purchases"]})}catch(L){ue(L,{flow:"market_buy_now",step:"post_purchase"})}const fe={items:[ip(t)],txHash:v};y("/success",{state:fe})}async function G(_){if(!d||_.length===0)return!1;const O=_.filter(H=>!U.current.mayBeConsumed(H));if(O.length===0)return!1;try{return await sr(d.identity,O),!0}catch{return!1}}function ne(_){G(_.filter(O=>!U.current.isInFlight(O)))}function de(){d&&B&&G([B.credit.id]),E.current=null,l()}const ee=$==="working";return e.jsxs(Qu,{role:"dialog","aria-modal":"true","aria-label":i("buyModal.dialogAria",{name:t.name}),children:[e.jsx(Gu,{onClick:ee?void 0:de,"aria-hidden":!0}),e.jsxs(_u,{children:[e.jsxs(Vu,{children:[e.jsx(Ju,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(Yu,{title:t.name,children:t.name||i("buyModal.itemFallback")}),e.jsx(cr,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(Xu,{children:C?e.jsxs(e.Fragment,{children:[e.jsx(ba,{children:i("marketCheckout.finalPrice")}),e.jsxs(ya,{children:[e.jsx(wa,{}),e.jsx(ye,{credits:C.credits})," ",Ri(C.credits)]}),e.jsxs(va,{className:"muted",children:["$",rt(C.credits).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ba,{children:i("marketCheckout.todaysPrice")}),e.jsxs(ya,{"data-approx":!0,children:[e.jsx(Zu,{"aria-hidden":!0,children:"≈"}),e.jsx(wa,{}),e.jsx(ye,{credits:A})," ",Ri(A)]}),e.jsx(va,{className:"muted",children:g||i("marketCheckout.checkingListing")})]})}),d?e.jsxs(ep,{className:"muted",children:[i("marketCheckout.yourBalance")," ",e.jsx(ve,{className:"ccy-mark"})," ",Ls(u,x)]}):null,R?e.jsx(In,{className:"muted",children:i("marketCheckout.needMore",{currency:ze.name})}):null,N?e.jsx(In,{"data-testid":"price-changed",role:"status",children:i("buyModal.priceChanged")}):null,g&&$==="working"?e.jsx(In,{className:"muted",children:g}):null,e.jsx(tp,{message:k}),e.jsxs(np,{children:[e.jsx(ja,{variant:"ghost",onClick:de,disabled:ee,children:i("buyModal.cancel")}),e.jsx(ja,{variant:"purple",onClick:()=>void K(),disabled:ee||!C||R&&gt(),children:ee?i("marketCheckout.buying"):R&&!gt()?i("nav.getCredits",{currency:ze.name}):i("marketCheckout.confirmPurchase")})]})]})]})}function ap(t,s,{enabled:l=!0,first:o}={}){const{data:d,isFetched:u}=te({queryKey:["related-items",t,s,o],enabled:l&&!!t&&!!s,staleTime:3e5,queryFn:()=>Es(t,s,{first:o})});return{items:d??[],isFetched:u}}const Nr=15;function rp(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function sp(t,s){return!!(s.id&&t.id===s.id||s.itemId&&t.itemId===s.itemId&&ka(t,s)||s.tokenId&&t.tokenId===s.tokenId&&ka(t,s))}function ka(t,s){var l;return s.contractAddress?((l=t.contractAddress)==null?void 0:l.toLowerCase())===s.contractAddress.toLowerCase():!1}function An(t,s,l=Nr){const o=new Set,d=[];function u(m,y){for(const $ of m){if(d.length>=y)return;if(sp($,s))continue;const h=rp($);o.has(h)||(o.add(h),d.push($))}}u(t.collection,1/0);const x=d.length;return u(t.creator??[],l),u(t.related??[],l),{items:d,isCollectionOnly:d.length>0&&d.length===x}}const op=20,lp=30,$a=[];function dp(t,s=Nr){const{id:l,contractAddress:o,itemId:d,tokenId:u,creator:x}=t,m=c.useMemo(()=>({id:l,contractAddress:o,itemId:d,tokenId:u}),[l,o,d,u]),{data:y=$a,isFetched:$}=te({queryKey:["collection-items",o],enabled:!!o,queryFn:()=>Bs(o,{first:op}).then(r=>r.items)}),h=c.useMemo(()=>An({collection:y},m,s).items.length,[y,m,s]),g=$&&h<s,w=g&&!!x,k=te({queryKey:["suggestions-creator",x],enabled:w,staleTime:5*6e4,queryFn:()=>Ns({creator:x,isOnSale:!0,first:lp}).then(r=>r.items)}),I=k.data??$a,C=!w||k.isSuccess||k.isError,S=c.useMemo(()=>An({collection:y,creator:I},m,s).items.length,[y,I,m,s]),{items:B}=ap(o,d??null,{enabled:g&&C&&S<s,first:s}),f=c.useMemo(()=>An({collection:y,creator:I,related:B},m,s),[y,I,B,m,s]),N=Fs(f.items);return{...f,items:N,siblings:y,siblingsFetched:$}}function cp(t){const s=Ws();return!s||!Ds(s.contracts,t)?null:s.label}const{colors:Fe,media:Kn}=n,up=Os`
1771
- to {
1772
- transform: rotate(360deg);
1773
- }
1774
- `,pp=a.div``,hp=a.span`
1775
- width: 34px;
1776
- height: 34px;
1777
- border-radius: 50%;
1778
- border: 3px solid ${Fe.line};
1779
- border-top-color: ${Fe.accent};
1780
- animation: ${up} 0.8s linear infinite;
1781
-
1782
- @media (prefers-reduced-motion: reduce) {
1783
- animation-duration: 2.4s;
1784
- }
1785
- `,xp=a.p``,fp=a.div``,Ca=a.button`
1786
- border: 0;
1787
- background: none;
1788
- cursor: pointer;
1789
- padding: 6px 16px;
1790
- border-radius: 999px;
1791
- font-weight: 600;
1792
- font-size: 12px;
1793
- text-transform: uppercase;
1794
- letter-spacing: 0.04em;
1795
- color: ${Fe.muted};
1796
- transition:
1797
- background 0.12s ease,
1798
- color 0.12s ease;
1799
-
1800
- &[data-active] {
1801
- background: ${Fe.text};
1802
- color: ${Fe.white};
1803
- }
1804
- &:not([data-active]):hover {
1805
- color: ${Fe.text};
1806
- }
1807
-
1808
- ${Kn.maxWidth("lg")} {
1809
- padding: 6px 12px;
1810
- border-radius: 0;
1811
- background: ${Fe.white};
1812
- color: ${Fe.text2};
1813
-
1814
- &[data-active] {
1815
- background: ${Fe.text};
1816
- color: ${Fe.white};
1817
- }
1818
- &:first-of-type {
1819
- border-top-left-radius: 999px;
1820
- border-bottom-left-radius: 999px;
1821
- }
1822
- &:last-of-type {
1823
- border-top-right-radius: 999px;
1824
- border-bottom-right-radius: 999px;
1825
- }
1826
- }
1827
- `,Ia=a.span`
1828
- ${Kn.maxWidth("lg")} {
1829
- display: none;
1830
- }
1831
- `,Sa=a(P)`
1832
- display: none;
1833
-
1834
- ${Kn.maxWidth("lg")} {
1835
- display: block;
1836
- }
1837
- `,Aa="shop-item-preview";function mp({item:t}){const s=ot(R=>{var K;return(K=R.session)==null?void 0:K.address}),{data:l,isLoading:o}=tn(s),d=s&&l?s:"default",u=t.category==="emote",[x,m]=c.useState("avatar"),y=!u&&x==="item",$=y||!o,h=Rt(R=>R.fittingOpen),{ref:g,active:w}=qs(),k=$&&w&&!h,[I,C]=c.useState(!0);c.useEffect(()=>{C(!0)},[t.id,y]),c.useEffect(()=>{k&&C(!0)},[k]);const S=c.useRef(null);c.useEffect(()=>{if(k)return()=>{md(S.current),S.current=null}},[k]);const[B,f]=c.useState(Ae.PreviewRenderer.UNITY),N=B===Ae.PreviewRenderer.BABYLON,r=!!s&&!!l,E=r&&Ks(t,Hs(l)),Y=Us(t)[0],U=r&&!E&&!u,A=t.urn?{urns:[t.urn]}:{contractAddress:t.contractAddress,tokenId:t.tokenId??void 0,itemId:t.tokenId?void 0:t.itemId??void 0};return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:g,"data-preview-viewport":!0,"aria-hidden":!0}),k?e.jsx(Qs,{id:Aa,...A,profile:y?void 0:E?d:"default",bodyShape:y||E?void 0:Y,type:u?void 0:y?Ae.PreviewType.WEARABLE:Ae.PreviewType.AVATAR,emote:u||y?void 0:Ae.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:u?1.5:void 0,wheelStart:u?100:void 0,onRenderer:f,onLoad:()=>{var R;C(!1),S.current=((R=document.getElementById(Aa))==null?void 0:R.contentWindow)??null}}):null,!k||I?e.jsx(pp,{"data-preview-loading":!0,"aria-busy":"true","aria-label":i("itemPreview.loading"),children:e.jsx(hp,{"aria-hidden":!0})}):null,U&&!y?e.jsx(xp,{"data-preview-note":!0,children:i("itemPreview.shownOnBody",{shape:Gs(Y)})}):null,!N||!u?null:e.jsx(fd,{previewId:"shop-item-preview"}),!N||u?null:e.jsxs(fp,{"data-preview-toggle":!0,role:"group","aria-label":i("itemPreview.previewMode"),children:[e.jsxs(Ca,{type:"button","data-active":x==="avatar"||void 0,"aria-pressed":x==="avatar","aria-label":i("itemPreview.onAvatar"),onClick:()=>m("avatar"),children:[e.jsx(Sa,{name:"view-avatar",size:18}),e.jsx(Ia,{children:i("itemPreview.onAvatar")})]}),e.jsxs(Ca,{type:"button","data-active":x==="item"||void 0,"aria-pressed":x==="item","aria-label":i("itemPreview.item"),onClick:()=>m("item"),children:[e.jsx(Sa,{name:"view-item",size:18}),e.jsx(Ia,{children:i("itemPreview.item")})]})]})]})}const gp=a.div`
1838
- position: fixed;
1839
- inset: 0;
1840
- z-index: 10000;
1841
- display: flex;
1842
- align-items: center;
1843
- justify-content: center;
1844
- padding: 16px;
1845
- background: rgba(22, 21, 24, 0.55);
1846
- `,bp=a.div`
1847
- display: flex;
1848
- flex-direction: column;
1849
- gap: 12px;
1850
- width: 1128px;
1851
- max-width: 100%;
1852
- max-height: 92vh;
1853
- background: ${n.colors.white};
1854
- border-radius: 16px;
1855
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1856
-
1857
- &:focus {
1858
- outline: none;
1859
- }
1860
- `,yp=a.div`
1861
- flex: none;
1862
- display: flex;
1863
- align-items: center;
1864
- gap: 8px;
1865
- padding: 16px;
1866
- border-bottom: 1px solid ${n.colors.gray4};
1867
- `,wp=a.h2`
1868
- flex: 1 1 auto;
1869
- min-width: 0;
1870
- margin: 0;
1871
- font-family: ${n.font.sans};
1872
- font-weight: 600;
1873
- font-size: 20px;
1874
- line-height: 1.6;
1875
- color: ${n.colors.text};
1876
- `,vp=a.button`
1877
- flex: none;
1878
- display: grid;
1879
- place-items: center;
1880
- width: 18.5px;
1881
- height: 18.5px;
1882
- padding: 0;
1883
- border: 0;
1884
- background: none;
1885
- cursor: pointer;
1886
- color: ${n.colors.text};
1887
-
1888
- .ico {
1889
- width: 18.5px;
1890
- height: 18.5px;
1891
- }
1892
- &:focus-visible {
1893
- outline: 2px solid ${n.colors.accent};
1894
- outline-offset: 4px;
1895
- }
1896
- `,jp=a.div`
1897
- flex: 1 1 auto;
1898
- min-height: 0;
1899
- overflow-y: auto;
1900
- display: flex;
1901
- flex-direction: column;
1902
- gap: 8px;
1903
- padding: 0 16px 24px;
1904
- `,kp=a.div`
1905
- position: sticky;
1906
- top: 0;
1907
- z-index: 1;
1908
- display: flex;
1909
- align-items: center;
1910
- justify-content: space-between;
1911
- gap: 8px;
1912
- padding-bottom: 8px;
1913
- background: ${n.colors.white};
1914
- `,$p=a.p`
1915
- margin: 0;
1916
- font-family: ${n.font.sans};
1917
- font-size: 14px;
1918
- line-height: 1.43;
1919
- color: ${n.colors.muted};
1920
- `,Cp=a.div`
1921
- position: relative;
1922
- flex: none;
1923
- display: inline-flex;
1924
- align-items: center;
1925
- padding: 4px 4px 4px 12px;
1926
- border: 0.5px solid ${n.colors.lineStrong};
1927
- border-radius: 8px;
1928
- background: ${n.colors.white};
1929
-
1930
- select {
1931
- appearance: none;
1932
- /* 24px design gap + the 24px chevron that sits on top of it. */
1933
- padding: 0 48px 0 0;
1934
- border: 0;
1935
- background: none;
1936
- font-family: ${n.font.sans};
1937
- font-weight: 500;
1938
- font-size: 12px;
1939
- line-height: 1.43;
1940
- color: ${n.colors.text2};
1941
- cursor: pointer;
1942
- outline: none;
1943
- }
1944
- select:focus-visible {
1945
- outline: 2px solid ${n.colors.accent};
1946
- outline-offset: 2px;
1947
- border-radius: 4px;
1948
- }
1949
- .chev {
1950
- position: absolute;
1951
- right: 4px;
1952
- width: 24px;
1953
- height: 24px;
1954
- color: ${n.colors.text2};
1955
- pointer-events: none;
1956
- }
1957
- `,Ip=a.div`
1958
- flex: none;
1959
- border: 1px solid ${n.colors.lineStrong};
1960
- border-radius: 16px;
1961
- /* The four equal columns need the design width to hold their content, so a narrower modal scrolls
1962
- the table here rather than letting the page scroll sideways. */
1963
- overflow-x: auto;
1964
- overflow-y: hidden;
1965
- background: ${n.colors.white};
1966
- `,Sp=a.table`
1967
- width: 100%;
1968
- min-width: 1096px;
1969
- table-layout: fixed;
1970
- border-collapse: collapse;
1971
-
1972
- th {
1973
- height: 48px;
1974
- padding: 8px 8px 8px 16px;
1975
- text-align: left;
1976
- vertical-align: middle;
1977
- background: ${n.colors.media};
1978
- border-right: 0.5px solid ${n.colors.lineStrong};
1979
- font-family: ${n.font.sans};
1980
- font-weight: 600;
1981
- font-size: 16px;
1982
- line-height: 1.5;
1983
- color: ${n.colors.text};
1984
- text-transform: capitalize;
1985
- }
1986
- th:last-of-type {
1987
- border-right: 0;
1988
- }
1989
-
1990
- td {
1991
- height: 56px;
1992
- padding: 8px 8px 8px 16px;
1993
- vertical-align: middle;
1994
- border-right: 0.5px solid ${n.colors.lineStrong};
1995
- border-bottom: 0.5px solid ${n.colors.lineStrong};
1996
- font-family: ${n.font.sans};
1997
- font-size: 14px;
1998
- line-height: 1.43;
1999
- color: ${n.colors.text2};
2000
- }
2001
- td:last-of-type {
2002
- border-right: 0;
2003
- }
2004
-
2005
- tbody tr:hover,
2006
- tbody tr:focus-within {
2007
- background: ${n.colors.media};
2008
- }
2009
- tbody tr:hover td,
2010
- tbody tr:focus-within td {
2011
- border-bottom-color: ${n.colors.media};
2012
- }
2013
-
2014
- /* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
2015
- carried on each cell's data-label so it survives translation. */
2016
- ${n.media.maxWidth("mobile")} {
2017
- min-width: 0;
2018
-
2019
- thead {
2020
- display: none;
2021
- }
2022
- tr {
2023
- display: block;
2024
- border-bottom: 0.5px solid ${n.colors.lineStrong};
2025
- }
2026
- tr:last-of-type {
2027
- border-bottom: 0;
2028
- }
2029
- td {
2030
- display: block;
2031
- height: auto;
2032
- padding: 8px 16px;
2033
- border-right: 0;
2034
- border-bottom: 0;
2035
- }
2036
- td:first-of-type {
2037
- padding-top: 12px;
2038
- }
2039
- td:last-of-type {
2040
- padding-bottom: 12px;
2041
- }
2042
- td[data-label]::before {
2043
- content: attr(data-label);
2044
- display: block;
2045
- margin-bottom: 2px;
2046
- font-size: 12px;
2047
- line-height: 1.43;
2048
- color: ${n.colors.muted};
2049
- text-transform: capitalize;
2050
- }
2051
- tbody tr:hover td,
2052
- tbody tr:focus-within td {
2053
- border-bottom-color: transparent;
2054
- }
2055
- }
2056
- `,Wr=`
2057
- display: flex;
2058
- align-items: center;
2059
- gap: 10px;
2060
- min-width: 0;
2061
-
2062
- .owner-ava {
2063
- flex: none;
2064
- display: inline-grid;
2065
- place-items: center;
2066
- width: 32px;
2067
- height: 32px;
2068
- border: 2.286px solid rgba(255, 255, 255, 0.5);
2069
- border-radius: 50%;
2070
- background: ${n.colors.media};
2071
- object-fit: cover;
2072
- overflow: hidden;
2073
- color: ${n.colors.white};
2074
- font-weight: 700;
2075
- font-size: 13px;
2076
- }
2077
- .owner-name {
2078
- min-width: 0;
2079
- overflow: hidden;
2080
- text-overflow: ellipsis;
2081
- white-space: nowrap;
2082
- font-family: ${n.font.sans};
2083
- font-size: 14px;
2084
- line-height: 1.43;
2085
- color: ${n.colors.text2};
2086
- }
2087
- `,Ap=a.div`
2088
- ${Wr}
2089
- `,Mp=a.button`
2090
- ${Wr}
2091
- padding: 0;
2092
- border: 0;
2093
- background: none;
2094
- font: inherit;
2095
- text-align: left;
2096
- cursor: pointer;
2097
-
2098
- &:hover .owner-name {
2099
- text-decoration: underline;
2100
- }
2101
- &:focus-visible {
2102
- outline: 2px solid ${n.colors.accent};
2103
- outline-offset: 2px;
2104
- border-radius: 4px;
2105
- }
2106
- `,Ma=a.span`
2107
- color: ${n.colors.muted};
2108
- `,zp=a.div`
2109
- display: flex;
2110
- align-items: center;
2111
- justify-content: space-between;
2112
- gap: 4px;
2113
-
2114
- .amount {
2115
- display: inline-flex;
2116
- align-items: center;
2117
- gap: 4px;
2118
- font-family: ${n.font.sans};
2119
- font-weight: 600;
2120
- font-size: 16px;
2121
- line-height: 1.5;
2122
- color: ${n.colors.text2};
2123
- }
2124
- /* The credits mark is always near-black here — never the violet accent. */
2125
- .amount .ccy {
2126
- flex: none;
2127
- width: 22px;
2128
- height: 22px;
2129
- color: ${n.colors.text2};
2130
- }
2131
- .approx {
2132
- color: ${n.colors.muted};
2133
- font-weight: 600;
2134
- }
2135
- `,Rp=a.div`
2136
- flex: none;
2137
- display: flex;
2138
- align-items: center;
2139
- gap: 8px;
2140
- opacity: 0;
2141
- transition: opacity 0.12s ease;
2142
-
2143
- tr:hover &,
2144
- tr:focus-within &,
2145
- &[data-persistent='true'] {
2146
- opacity: 1;
2147
- }
2148
-
2149
- @media (hover: none) {
2150
- opacity: 1;
2151
- }
2152
- ${n.media.maxWidth("mobile")} {
2153
- opacity: 1;
2154
- }
2155
- `,Dr=`
2156
- display: inline-flex;
2157
- align-items: center;
2158
- justify-content: center;
2159
- gap: 8px;
2160
- height: 40px;
2161
- padding: 0 12px;
2162
- border: 0;
2163
- border-radius: 12px;
2164
- cursor: pointer;
2165
- font-family: ${n.font.sans};
2166
- font-weight: 600;
2167
- font-size: 13px;
2168
- line-height: 24px;
2169
- letter-spacing: 0.46px;
2170
- text-transform: uppercase;
2171
- text-align: center;
2172
- white-space: nowrap;
2173
-
2174
- .ico {
2175
- width: 20px;
2176
- height: 20px;
2177
- }
2178
- &:focus-visible {
2179
- outline: 2px solid ${n.colors.accent};
2180
- outline-offset: 2px;
2181
- }
2182
- `,Pp=a.button`
2183
- ${Dr}
2184
- min-width: 106px;
2185
- background: ${n.colors.text2};
2186
- color: ${n.colors.softWhite};
2187
-
2188
- &:hover:not(:disabled) {
2189
- filter: brightness(1.35);
2190
- }
2191
- &:disabled {
2192
- opacity: 0.55;
2193
- cursor: default;
2194
- }
2195
- `,za=a.button`
2196
- ${Dr}
2197
- background: ${n.colors.accent};
2198
- color: ${n.colors.softWhite};
2199
-
2200
- &:hover:not(:disabled) {
2201
- background: ${n.colors.accentHover};
2202
- }
2203
- `,Lp=a.span`
2204
- display: inline-flex;
2205
- align-items: center;
2206
- height: 40px;
2207
- padding: 0 12px;
2208
- border-radius: 12px;
2209
- background: ${n.colors.chip};
2210
- font-family: ${n.font.sans};
2211
- font-weight: 600;
2212
- font-size: 13px;
2213
- line-height: 24px;
2214
- color: ${n.colors.muted};
2215
- white-space: nowrap;
2216
- `,Tp=a.div`
2217
- flex: none;
2218
- display: flex;
2219
- align-items: center;
2220
- justify-content: flex-end;
2221
- gap: 8px;
2222
- `,Ep=a.p`
2223
- margin: 0;
2224
- font-family: ${n.font.sans};
2225
- font-size: 12px;
2226
- line-height: 1;
2227
- color: ${n.colors.gray0};
2228
- `,Ra=a.button`
2229
- display: grid;
2230
- place-items: center;
2231
- padding: 10px;
2232
- border: 1px solid ${n.colors.text2};
2233
- border-radius: 4px;
2234
- background: ${n.colors.white};
2235
- color: ${n.colors.text2};
2236
- cursor: pointer;
2237
-
2238
- /* One chevron glyph turned into ‹ / › so no extra asset is needed. */
2239
- .ico {
2240
- width: 11px;
2241
- height: 11px;
2242
- transform: rotate(-90deg);
2243
- }
2244
- &[data-dir='prev'] .ico {
2245
- transform: rotate(90deg);
2246
- }
2247
- &:disabled {
2248
- border-color: ${n.colors.lineStrong};
2249
- color: ${n.colors.lineStrong};
2250
- cursor: default;
2251
- }
2252
- &:focus-visible {
2253
- outline: 2px solid ${n.colors.accent};
2254
- outline-offset: 2px;
2255
- }
2256
- `,Fp=a.p`
2257
- margin: 0;
2258
- padding: 32px 0;
2259
- font-family: ${n.font.sans};
2260
- font-size: 14px;
2261
- line-height: 1.43;
2262
- color: ${n.colors.muted};
2263
- text-align: center;
2264
- `;a.div`
2265
- display: flex;
2266
- flex-direction: column;
2267
- gap: 8px;
2268
- margin-top: 16px;
2269
-
2270
- .classic-title {
2271
- font-family: ${n.font.sans};
2272
- font-weight: 600;
2273
- font-size: 15px;
2274
- color: ${n.colors.text2};
2275
- }
2276
- .classic-note {
2277
- font-family: ${n.font.sans};
2278
- font-size: 13px;
2279
- color: ${n.colors.muted};
2280
- }
2281
- `;a.span`
2282
- display: inline-flex;
2283
- align-items: center;
2284
- padding: 2px 8px;
2285
- border-radius: ${n.radius.chip};
2286
- background: ${n.colors.chip};
2287
- font-family: ${n.font.sans};
2288
- font-size: 11px;
2289
- letter-spacing: 0.4px;
2290
- text-transform: uppercase;
2291
- color: ${n.colors.muted};
2292
- `;a.a`
2293
- display: inline-flex;
2294
- align-items: center;
2295
- gap: 6px;
2296
- height: 40px;
2297
- padding: 0 14px;
2298
- border: 1px solid ${n.colors.lineStrong};
2299
- border-radius: 12px;
2300
- color: ${n.colors.accent};
2301
- font-family: ${n.font.sans};
2302
- font-weight: 600;
2303
- font-size: 13px;
2304
- text-decoration: none;
2305
-
2306
- &:hover {
2307
- background: ${n.colors.chip};
2308
- }
2309
- .ico {
2310
- width: 14px;
2311
- height: 14px;
2312
- }
2313
- `;const Jt=10,Bp=!1;function Np(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function Wp(t){let s=0;for(let l=0;l<t.length;l++)s=s*31+t.charCodeAt(l)>>>0;return`hsl(${s%360}, 52%, 45%)`}function Dp(t,s){var l;return(((l=t==null?void 0:t.trim())==null?void 0:l[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function Op(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function qp(t,s){const l=new Date(t);return Number.isNaN(l.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(l)} ${l.getDate()}${Op(l.getDate())}, ${l.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(l)}function Kp(t){return{tradeId:t.tradeId??t.id,listingType:"primary",contractAddress:t.contractAddress,itemId:t.itemId??"",name:t.name,thumbnail:t.thumbnail,rarity:t.rarity,category:t.category,wearableCategory:t.wearableCategory??null,creator:t.creator,manaWei:t.manaWei??"0",available:1,network:t.network,chainId:t.chainId,createdAt:0}}function Hp({r:t,seller:s,issuedId:l,labels:o,locale:d,isOwn:u,isLegacy:x,inCart:m,fallbackImage:y,onAdd:$,onBuyNative:h,onBuyLegacy:g}){var E,Y;const w=lt(),{data:k}=tn(s),I=(Y=(E=k==null?void 0:k.avatar)==null?void 0:E.snapshots)==null?void 0:Y.face256,[C,S]=c.useState(!1);c.useEffect(()=>S(!1),[I]);const B=!!I&&!C,f=s?k!=null&&k.name?nn(k.name):Np(s):void 0,N=B?e.jsx("img",{className:"owner-ava",src:I,alt:"",loading:"lazy",onError:()=>S(!0)}):s?e.jsx("span",{className:"owner-ava",style:{backgroundColor:Wp(s)},"aria-hidden":!0,children:Dp(k==null?void 0:k.name,s)}):y?e.jsx("img",{className:"owner-ava",src:y,alt:"","aria-hidden":!0}):e.jsx("span",{className:"owner-ava","aria-hidden":!0}),r=e.jsxs(e.Fragment,{children:[N,f?e.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:f}):null]});return e.jsxs("tr",{"data-testid":"resale-row","data-source":t.source,"data-own":u?"true":void 0,children:[e.jsx("td",{"data-label":o.owner,children:s?e.jsx(Mp,{type:"button",onClick:()=>w(`/items/creator/${s}`),children:r}):e.jsx(Ap,{children:r})}),e.jsx("td",{"data-label":o.itemNumber,children:l?e.jsxs("span",{"data-testid":"resale-issued",children:["#",l]}):e.jsx(Ma,{children:"—"})}),e.jsx("td",{"data-label":o.expiration,children:t.saleEndsAt?qp(t.saleEndsAt,d):e.jsx(Ma,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(zp,{children:[e.jsxs("span",{className:"amount",children:[x?e.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,e.jsx(ve,{className:"ccy"}),e.jsx("span",{children:Ge(t.priceCredits)})]}),e.jsx(Rp,{"data-persistent":u?"true":void 0,children:u?e.jsx(Lp,{"data-testid":"resale-own",children:i("resales.yourListing")}):x?e.jsx(za,{onClick:g,"aria-label":i("assetCard.buyNow"),"data-testid":"resale-buy",children:i("resales.buy")}):e.jsxs(e.Fragment,{children:[e.jsxs(Pp,{onClick:$,disabled:m,"aria-label":m?i("assetCard.inCart"):i("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(P,{name:"cart",className:"ico"}),e.jsx("span",{children:m?i("assetCard.inCart"):i("resales.add")})]}),e.jsx(za,{onClick:h,"aria-label":i("assetCard.buyNow"),"data-testid":"resale-buy",children:i("resales.buy")})]})})]})})]})}function Up({item:t,onClose:s}){var H;const l=t.contractAddress,o=t.itemId,d=dt(),u=Rt(v=>v.add),x=Rt(v=>v.items),{session:m}=ot(),y=pr(v=>v.locale),$=(H=m==null?void 0:m.address)==null?void 0:H.toLowerCase(),h=c.useRef(null),[g,w]=c.useState(null),[k,I]=c.useState(null),[C,S]=c.useState("cheapest"),[B,f]=c.useState(0),N=!!g||!!k;c.useEffect(()=>{var v;(v=h.current)==null||v.focus()},[]),c.useEffect(()=>{function v(L){L.key==="Escape"&&!N&&s()}window.addEventListener("keydown",v);const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",v),document.body.style.overflow=fe}},[N,s]);const{data:r=[],isLoading:E}=te({queryKey:["item-resales",l,o],enabled:!!l&&!!o,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>xr(l,o)}),Y=c.useMemo(()=>C==="cheapest"?r:[...r].sort((v,fe)=>fe.priceCredits-v.priceCredits),[r,C]),U=Math.max(1,Math.ceil(Y.length/Jt)),A=Math.min(B,U-1),R=Y.slice(A*Jt,A*Jt+Jt),K=R.filter(v=>!v.seller||!v.issuedId).map(v=>v.tokenId).filter(v=>!!v),{data:G={}}=te({queryKey:["resale-token-info",l,K.join(",")],enabled:!!l&&K.length>0,staleTime:6e4,queryFn:()=>_s(l,K)}),{data:ne=[]}=te({queryKey:["item-classic-orders",l,o],enabled:Bp,queryFn:()=>Vs(l,o)}),de=r.some(v=>v.source==="legacy"),{data:ee}=hr(de);function _(){d.invalidateQueries({queryKey:["item-resales",l,o]})}const O={owner:i("resales.colOwner"),itemNumber:i("resales.colItemNumber"),expiration:i("resales.colExpiration"),price:i("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(gp,{onClick:N?void 0:s,role:"presentation",children:e.jsxs(bp,{ref:h,tabIndex:-1,onClick:v=>v.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("resales.modalTitle"),"data-testid":"resellers-modal",children:[e.jsxs(yp,{children:[e.jsx(wp,{children:i("resales.modalTitle")}),e.jsx(vp,{onClick:s,"aria-label":i("resales.close"),"data-testid":"resellers-close",children:e.jsx(P,{name:"close"})})]}),e.jsxs(jp,{children:[e.jsxs(kp,{children:[e.jsx($p,{"data-testid":"resales-count",children:i("resales.count",{count:r.length})}),e.jsxs(Cp,{children:[e.jsxs("select",{value:C,onChange:v=>{S(v.target.value),f(0)},"aria-label":i("resales.sortLabel"),"data-testid":"resales-sort",children:[e.jsx("option",{value:"cheapest",children:i("resales.sortCheapest")}),e.jsx("option",{value:"most_expensive",children:i("resales.sortExpensive")})]}),e.jsx(P,{name:"chevron-down",className:"chev"})]})]}),E?null:Y.length===0?e.jsx(Fp,{"data-testid":"resales-empty",children:i("resales.empty")}):null,Y.length>0?e.jsxs(e.Fragment,{children:[e.jsx(Ip,{children:e.jsxs(Sp,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:O.owner}),e.jsx("th",{scope:"col",children:O.itemNumber}),e.jsx("th",{scope:"col",children:O.expiration}),e.jsx("th",{scope:"col",children:O.price})]})}),e.jsx("tbody",{children:R.map(v=>{const fe=v.source==="legacy",L=x.some(Q=>Q.id===v.id),F=v.tokenId&&G[v.tokenId]||{},z=v.issuedId??F.issuedId,se=v.seller??F.seller,ie={...v,name:v.name||t.name,thumbnail:v.thumbnail||t.thumbnail,rarity:v.rarity||t.rarity,category:v.category||t.category,wearableCategory:v.wearableCategory??t.wearableCategory,gender:v.gender??t.gender},xe=!!se&&!!$&&se.toLowerCase()===$;return e.jsx(Hp,{r:ie,seller:se,issuedId:z,labels:O,locale:y,isOwn:xe,isLegacy:fe,inCart:L,fallbackImage:ie.thumbnail,onAdd:()=>u(ie,"item_detail"),onBuyNative:()=>w(ie),onBuyLegacy:()=>I(Kp(ie))},v.tradeId??v.id)})})]})}),U>1?e.jsxs(Tp,{children:[e.jsx(Ra,{"data-dir":"prev",onClick:()=>f(v=>Math.max(0,v-1)),disabled:A===0,"aria-label":i("resales.prevPage"),"data-testid":"resale-prev-page",children:e.jsx(P,{name:"chevron-down"})}),e.jsx(Ep,{"data-testid":"resale-page-label",children:i("resales.page",{page:A+1,total:U})}),e.jsx(Ra,{onClick:()=>f(v=>Math.min(U-1,v+1)),disabled:A>=U-1,"aria-label":i("resales.nextPage"),"data-testid":"resale-next-page",children:e.jsx(P,{name:"chevron-down"})})]}):null]}):null,null]})]})}),g?e.jsx(Bn,{item:g,onClose:()=>{w(null),_()}}):null,k&&ee?e.jsx(Br,{listing:k,rate:ee,onClose:()=>I(null),onSold:()=>{I(null),_()}}):null]})}const Qp="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='76'%20height='76'%20viewBox='0%200%2076%2076'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='weui:shop-outlined'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.3333%2022.1667V19C25.3333%2015.6406%2026.6679%2012.4188%2029.0433%2010.0433C31.4188%207.66785%2034.6406%206.33333%2038%206.33333C41.3594%206.33333%2044.5812%207.66785%2046.9567%2010.0433C49.3321%2012.4188%2050.6667%2015.6406%2050.6667%2019V22.1667H60.1667C61.9147%2022.1667%2063.3333%2023.5885%2063.3333%2025.3555V63.3587C63.3333%2066.842%2060.4992%2069.6667%2057.019%2069.6667H18.981C17.3074%2069.6667%2015.7023%2069.0023%2014.5183%2067.8195C13.3343%2066.6367%2012.6683%2065.0322%2012.6667%2063.3587V25.3587C12.6667%2023.5917%2014.0758%2022.1667%2015.8333%2022.1667H25.3333ZM29.1333%2022.1667H46.8667V19C46.8667%2016.6484%2045.9325%2014.3931%2044.2697%2012.7303C42.6069%2011.0675%2040.3516%2010.1333%2038%2010.1333C35.6484%2010.1333%2033.3931%2011.0675%2031.7303%2012.7303C30.0675%2014.3931%2029.1333%2016.6484%2029.1333%2019V22.1667ZM25.3333%2025.9667H16.4667V63.3587C16.4667%2064.7393%2017.594%2065.8667%2018.981%2065.8667H57.019C57.6847%2065.8667%2058.3233%2065.6026%2058.7947%2065.1325C59.266%2064.6623%2059.5317%2064.0244%2059.5333%2063.3587V25.9667H50.6667V34.8333H46.8667V25.9667H29.1333V34.8333H25.3333V25.9667Z'%20fill='url(%23paint0_linear_0_226)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_226'%20x1='36.6705'%20y1='6.33333'%20x2='32.2014'%20y2='69.3597'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF7439'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",{colors:ge,font:Or,radius:Hn,z:Gp}=n,_p=a.div`
2314
- position: fixed;
2315
- inset: 0;
2316
- z-index: ${Gp.overlay};
2317
- display: flex;
2318
- align-items: center;
2319
- justify-content: center;
2320
- overflow-y: auto;
2321
- padding: 16px;
2322
- background: rgba(22, 21, 24, 0.55);
2323
- `,Vp=a.div`
2324
- width: 560px;
2325
- max-width: 100%;
2326
- max-height: 100%;
2327
- overflow-y: auto;
2328
- padding: 12px 16px 16px;
2329
- border-radius: ${Hn.modal};
2330
- background: ${ge.white};
2331
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
2332
- display: flex;
2333
- flex-direction: column;
2334
- gap: 24px;
2335
- font-family: ${Or.sans};
2336
-
2337
- /* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
2338
- &:focus {
2339
- outline: none;
2340
- }
2341
- `,Jp=a.div`
2342
- display: flex;
2343
- align-items: center;
2344
- justify-content: space-between;
2345
- gap: 8px;
2346
- padding-bottom: 16px;
2347
- border-bottom: 1px solid ${ge.gray4};
2348
- `,Yp=a.h2`
2349
- margin: 0;
2350
- font-weight: 600;
2351
- font-size: 20px;
2352
- line-height: 1.6;
2353
- color: ${ge.text};
2354
- `,Xp=a.button`
2355
- position: relative;
2356
- flex: none;
2357
- display: grid;
2358
- place-items: center;
2359
- width: 18.535px;
2360
- height: 18.535px;
2361
- padding: 0;
2362
- border: 0;
2363
- background: none;
2364
- cursor: pointer;
2365
- color: ${ge.text};
2366
-
2367
- .ico {
2368
- width: 100%;
2369
- height: 100%;
2370
- }
2371
- /* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
2372
- &::after {
2373
- content: '';
2374
- position: absolute;
2375
- inset: -11px;
2376
- }
2377
- &:focus-visible {
2378
- outline: 2px solid ${ge.accent};
2379
- outline-offset: 2px;
2380
- }
2381
- `,Zp=a.div`
2382
- padding: 24px 16px;
2383
- border-radius: ${Hn.modal};
2384
- background: ${ge.promptLilac};
2385
- display: flex;
2386
- flex-direction: column;
2387
- align-items: center;
2388
- gap: 16px;
2389
- text-align: center;
2390
- `,eh=a.img`
2391
- flex: none;
2392
- width: 76px;
2393
- height: 76px;
2394
- `,th=a.h3`
2395
- margin: 0;
2396
- font-weight: 700;
2397
- font-size: 20px;
2398
- line-height: 1.334;
2399
- color: ${ge.text2};
2400
- `,Pa=a.p`
2401
- margin: 0;
2402
- font-weight: 400;
2403
- font-size: 16px;
2404
- line-height: 1.334;
2405
- color: ${ge.text2};
2406
- `,nh=a.div`
2407
- display: flex;
2408
- align-items: center;
2409
- gap: 12px;
2410
- `,qr=`
2411
- flex: 1 1 0;
2412
- min-width: 0;
2413
- display: inline-flex;
2414
- align-items: center;
2415
- justify-content: center;
2416
- gap: 12px;
2417
- height: 46px;
2418
- padding: 0 12px;
2419
- border-radius: ${Hn.card};
2420
- font-family: ${Or.sans};
2421
- font-weight: 600;
2422
- font-size: 13px;
2423
- line-height: 24px;
2424
- letter-spacing: 0.46px;
2425
- text-transform: uppercase;
2426
- cursor: pointer;
2427
- transition:
2428
- background 0.15s ease,
2429
- color 0.15s ease;
2430
-
2431
- &:focus-visible {
2432
- outline: 2px solid ${ge.accent};
2433
- outline-offset: 2px;
2434
- }
2435
- `,ih=a.button`
2436
- ${qr};
2437
- border: 0.5px solid ${ge.text};
2438
- background: ${ge.white};
2439
- color: ${ge.text2};
2440
-
2441
- &:hover {
2442
- background: ${ge.panel};
2443
- }
2444
- `,ah=a.a`
2445
- ${qr};
2446
- border: 0;
2447
- background: ${ge.dclRed};
2448
- color: ${ge.softWhite};
2449
- text-decoration: none;
2450
-
2451
- &:hover {
2452
- filter: brightness(1.08);
2453
- }
2454
- `,rh=a.span`
2455
- flex: none;
2456
- display: grid;
2457
- place-items: center;
2458
- width: 24px;
2459
- height: 24px;
2460
-
2461
- .ico {
2462
- width: 100%;
2463
- height: 100%;
2464
- }
2465
- `;function sh(t,s){return`${st.marketplaceUrl}/contracts/${t}/tokens/${s}`}function oh(t,s){return`${st.marketplaceUrl}/contracts/${t}/items/${s}`}function La(t){const{contractAddress:s,onClose:l}=t,o=t.variant==="buy",d=t.variant==="buy"?t.itemId:null,u=t.variant==="buy"?null:t.tokenId,x=t.variant==="buy"?oh(s,t.itemId):sh(s,t.tokenId),m=c.useRef(null),y=c.useRef(l);return y.current=l,c.useEffect(()=>{var h;(h=m.current)==null||h.focus();function $(g){g.key==="Escape"&&y.current()}return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),e.jsx(_p,{role:"presentation",onClick:l,children:e.jsxs(Vp,{ref:m,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":i("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(Jp,{children:[e.jsx(Yp,{children:i("marketplaceRedirect.title")}),e.jsx(Xp,{onClick:l,"aria-label":i("marketplaceRedirect.close"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsxs(Zp,{children:[e.jsx(eh,{src:Qp,alt:"","aria-hidden":!0}),e.jsx(th,{children:i("marketplaceRedirect.heading")}),e.jsx(Pa,{children:o?i("marketplaceRedirect.buyBody"):i("marketplaceRedirect.body")}),o?e.jsx(Pa,{children:i("marketplaceRedirect.buyCurrencyNote")}):null]}),e.jsxs(nh,{children:[e.jsx(ih,{onClick:l,"data-testid":"marketplace-redirect-cancel",children:i("marketplaceRedirect.cancel")}),e.jsxs(ah,{href:x,target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",onClick:()=>X("Shop Redirected To Marketplace",{direction:o?"buy":"resell",contract_address:s,item_id:d,token_id:u}),children:[i("marketplaceRedirect.continue"),e.jsx(rh,{"aria-hidden":!0,children:e.jsx(P,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function Un(){return st.shopServerUrl||null}function Kr(){return!!Un()}async function lh(t,s,l){const o=Un();if(!o)return{subscribed:!1};const d=new URLSearchParams({contractAddress:t,itemId:s}),u=`${o}/notify-requests?${d.toString()}`,x=await fr(u,{method:"GET",identity:l,metadata:{}});if(!x.ok)throw new Error(`getNotifyRequest ${x.status}`);return ch(x,"getNotifyRequest")}async function dh(t,s){const l=Un();if(!l)throw new Error("createNotifyRequest: no shop-server host configured");const o=`${l}/notify-requests`,d=await fr(o,{method:"POST",identity:s,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!d.ok)throw new Error(`createNotifyRequest ${d.status}: ${await d.text()}`);const u=await d.text();if(u.trim()&&!uh(u))throw new Error("createNotifyRequest: response was not JSON")}async function ch(t,s){try{return await t.json()}catch{throw new Error(`${s}: response was not JSON`)}}function uh(t){try{return JSON.parse(t),!0}catch{return!1}}const{colors:Me,radius:Hr}=n,Ur=wt`
2466
- display: flex;
2467
- flex-direction: column;
2468
- gap: 8px;
2469
- width: 100%;
2470
- `,ph=a.form`
2471
- ${Ur};
2472
- `,Ta=a.div`
2473
- ${Ur};
2474
-
2475
- &[data-done] {
2476
- flex-direction: row;
2477
- align-items: center;
2478
- gap: 16px;
2479
- padding: 12px;
2480
- border-radius: 16px;
2481
- background: #c1d8c9;
2482
- }
2483
- `,hh=a.label`
2484
- font-size: 14px;
2485
- color: ${Me.softWhite};
2486
- `,xh=a.div`
2487
- display: flex;
2488
- align-items: stretch;
2489
- gap: 8px;
2490
- `,fh=a.input`
2491
- flex: 1;
2492
- min-width: 0;
2493
- height: 42px;
2494
- padding: 0 16px;
2495
- border: 1px solid ${Me.fieldBorder};
2496
- border-radius: ${Hr.btn};
2497
- background: rgba(255, 255, 255, 0.1);
2498
- font-size: 16px;
2499
- color: ${Me.softWhite};
2500
-
2501
- &::placeholder {
2502
- color: ${Me.gray4};
2503
- }
2504
- &:focus-visible {
2505
- outline: none;
2506
- border-color: ${Me.white};
2507
- box-shadow: 0 0 0 1px ${Me.white};
2508
- }
2509
- `,Ea=a.button`
2510
- flex-shrink: 0;
2511
- height: 40px;
2512
- padding: 0 12px;
2513
- border: 0;
2514
- border-radius: ${Hr.card};
2515
- background: ${Me.softWhite};
2516
- color: ${Me.text};
2517
- font-weight: 600;
2518
- font-size: 15px;
2519
- line-height: 24px;
2520
- text-transform: uppercase;
2521
- letter-spacing: 0.46px;
2522
- cursor: pointer;
2523
- transition: background 0.15s ease;
2524
-
2525
- &[data-full] {
2526
- width: 100%;
2527
- flex-shrink: 1;
2528
- }
2529
- &:hover:not(:disabled) {
2530
- background: ${Me.white};
2531
- }
2532
- &:disabled {
2533
- opacity: 0.5;
2534
- cursor: default;
2535
- }
2536
- `,mh=a.span`
2537
- display: inline-flex;
2538
- align-items: center;
2539
- justify-content: center;
2540
- flex-shrink: 0;
2541
- width: 20px;
2542
- height: 20px;
2543
- border-radius: 50%;
2544
- background: #34ce76;
2545
- color: ${Me.white};
2546
- `,gh=a.span`
2547
- font-size: 16px;
2548
- line-height: 1.5;
2549
- color: ${Me.text2};
2550
- `;function Fa(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function bh({item:t}){const s=ot(S=>S.session),l=ot(S=>S.signIn),[o,d]=c.useState(""),[u,x]=c.useState(!1),[m,y]=c.useState(!1),[$,h]=c.useState(null),g=Kr(),w=g&&!!s&&!!t.contractAddress&&!!t.itemId,{data:k}=te({queryKey:["notify-request",t.contractAddress,t.itemId,s==null?void 0:s.address],enabled:w,queryFn:()=>lh(t.contractAddress,t.itemId,s.identity)});c.useEffect(()=>{k!=null&&k.email&&d(S=>S||k.email)},[k==null?void 0:k.email]),c.useEffect(()=>{if(!s||!g)return;let S=!1;return Js().then(B=>{!S&&B&&d(f=>f||B)}),()=>{S=!0}},[g,s]);const I=m||!!(k!=null&&k.subscribed);async function C(S){if(S.preventDefault(),!(!s||!t.itemId||!Fa(o)||u)){x(!0),h(null);try{await dh({contractAddress:t.contractAddress,itemId:t.itemId,chainId:t.chainId,email:o.trim()},s.identity),y(!0),X("Shop Requested Notify",{item_id:t.itemId,contract_address:t.contractAddress})}catch(B){ue(B,{flow:"notify-me",contractAddress:t.contractAddress,itemId:t.itemId}),h(i("notifyMe.error"))}finally{x(!1)}}}return g?s?I?e.jsxs(Ta,{"data-done":!0,"data-testid":"notify-subscribed",children:[e.jsx(mh,{"aria-hidden":!0,children:e.jsx(P,{name:"check",size:12})}),e.jsx(gh,{children:i("notifyMe.subscribedBody")})]}):e.jsxs(ph,{onSubmit:S=>void C(S),"data-testid":"notify",children:[e.jsx(hh,{htmlFor:"notify-email",children:i("notifyMe.label")}),e.jsxs(xh,{children:[e.jsx(fh,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:i("notifyMe.placeholder"),value:o,onChange:S=>d(S.target.value),"data-testid":"notify-email"}),e.jsx(Ea,{type:"submit",disabled:!Fa(o)||u,"data-testid":"notify-submit",children:u?i("notifyMe.working"):i("notifyMe.cta")})]}),e.jsx(Ve,{message:$})]}):e.jsx(Ta,{"data-testid":"notify",children:e.jsx(Ea,{type:"button","data-full":!0,onClick:l,"data-testid":"notify-signin",children:i("notifyMe.signInCta")})}):null}const yh=a.div`
2551
- display: flex;
2552
- flex-direction: column;
2553
- gap: 4px;
2554
- width: 100%;
2555
- font-family: ${n.font.sans};
2556
- `,wh=a.div`
2557
- display: flex;
2558
- align-items: flex-start;
2559
- justify-content: space-between;
2560
- gap: 12px;
2561
- font-size: 12px;
2562
- `,vh=a.span`
2563
- font-weight: 600;
2564
- line-height: 1.57;
2565
- color: ${n.colors.muted2};
2566
- /* Drawn in caps, like the PRICE and STOCK labels beside it. Cased here rather than in the string so a
2567
- translation is not forced to shout in a language where that reads badly. */
2568
- text-transform: uppercase;
2569
- white-space: nowrap;
2570
- `,Ba=a.span`
2571
- /* Sized here, not inherited from the head row: the same element also sits UNDER the bar, outside it. */
2572
- font-size: 12px;
2573
- font-weight: 400;
2574
- line-height: 22px;
2575
- color: ${n.colors.softWhite};
2576
- text-transform: lowercase;
2577
- white-space: nowrap;
2578
- `,jh=a.div`
2579
- position: relative;
2580
- width: 100%;
2581
- height: 10px;
2582
- border-radius: 100px;
2583
- background: rgba(255, 255, 255, 0.2);
2584
- /* The fill is a child with its own radius; clipping here keeps a full bar's ends round. */
2585
- overflow: hidden;
2586
- `,kh=a.div`
2587
- position: absolute;
2588
- left: 0;
2589
- top: 0;
2590
- height: 10px;
2591
- border-radius: 100px;
2592
- background: ${n.colors.dclRed};
2593
- transition: width 0.3s ease;
2594
-
2595
- @media (prefers-reduced-motion: reduce) {
2596
- transition: none;
2597
- }
2598
- `;function $h({claimed:t,total:s,className:l,testId:o}){if(!Number.isFinite(t)||!Number.isFinite(s)||s<=0)return null;const d=Math.min(s,Math.max(0,t)),u=Math.round(d/s*100);return e.jsxs(yh,{className:l,"data-testid":o,children:[e.jsxs(wh,{children:[e.jsx(vh,{children:i("offerStock.label")}),e.jsx(Ba,{children:i("offerStock.claimed",{claimed:d,total:s})})]}),e.jsx(jh,{role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":d,"aria-label":i("offerStock.claimed",{claimed:d,total:s}),children:e.jsx(kh,{style:{width:`${u}%`}})}),e.jsx(Ba,{children:i("offerStock.percent",{pct:u})})]})}const Ch=new Map(Object.entries(gd).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),bt="/items";function Ih(t){return t?`${bt}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function Sh(t){const s=t.wearableCategory;if(s){const l=Ch.get(s);return l?`${bt}?category=wearable&subCategory=${encodeURIComponent(l)}`:`${bt}?category=wearable`}return t.category==="emote"?`${bt}?category=emote`:t.category==="wearable"?`${bt}?category=wearable`:null}function Ah(){return`${bt}?smart=true`}const Mh=a(Ys)`
2599
- display: flex;
2600
- flex-direction: column;
2601
- overflow: hidden;
2602
- gap: 1px;
2603
- background: ${n.colors.lineStrong};
2604
-
2605
- /* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
2606
- full height. */
2607
- & [data-collage-row] {
2608
- display: flex;
2609
- flex: 1 1 50%;
2610
- min-height: 0;
2611
- gap: 1px;
2612
- }
2613
- & [data-collage-row][data-full] {
2614
- flex-basis: 100%;
2615
- }
2616
- & [data-collage-row] img {
2617
- flex: 1 1 0;
2618
- min-width: 0;
2619
- width: 100%;
2620
- height: 100%;
2621
- object-fit: cover;
2622
- display: block;
2623
- }
2624
- `;function zh({contractAddress:t,name:s,items:l,className:o}){const d=lt();if(!t||!s)return null;const u=(l??[]).map(y=>y.thumbnail).filter(y=>!!y).slice(0,4),x=u.slice(0,2),m=u.slice(2,4);return e.jsxs(Xs,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:y=>{y.stopPropagation(),d(`/collection/${t}`)},children:[u.length>0?e.jsxs(Mh,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{"data-collage-row":!0,"data-full":m.length===0||void 0,children:x.map((y,$)=>e.jsx("img",{src:y,alt:""},$))}),m.length>0?e.jsx("span",{"data-collage-row":!0,children:m.map((y,$)=>e.jsx("img",{src:y,alt:""},$))}):null]}):null,e.jsx(Zs,{"data-testid":"creator-name",children:nn(s)})]})}const{colors:j,radius:Ye,media:le,font:Rh,gradients:Ph}=n,Lh=a.div`
2625
- max-width: 1721px;
2626
- margin: 0 auto;
2627
-
2628
- ${le.maxWidth("lg")} {
2629
- padding-bottom: 88px;
2630
- }
2631
- `,Th=a.nav`
2632
- display: flex;
2633
- align-items: center;
2634
- gap: 8px;
2635
- font-size: 13px;
2636
- color: ${j.gray4};
2637
- margin-bottom: 24px;
2638
- ${bd};
2639
- `,Eh=a.button`
2640
- background: none;
2641
- border: 0;
2642
- padding: 0;
2643
- font: inherit;
2644
- color: ${j.gray4};
2645
-
2646
- &:hover {
2647
- color: ${j.white};
2648
- }
2649
- `,Fh=a.span`
2650
- color: ${j.muted2};
2651
- `,Bh=a.span`
2652
- color: ${j.softWhite};
2653
- font-weight: 600;
2654
- `,Nh=a.div`
2655
- position: relative;
2656
- /* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
2657
- isolation: isolate;
2658
- display: grid;
2659
- grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
2660
- gap: 48px;
2661
- align-items: start;
2662
-
2663
- /* Preview column width, re-derived from the tracks above so the glow's pivot cannot drift. */
2664
- --preview-col-w: calc((100% - 48px) * 1045 / 1559);
2665
- /* Oversized so the glow reaches past the frame while the gradient still finishes fading inside its
2666
- own box: the radii cannot exceed 50% without ending outside the box and painting a hard rectangle. */
2667
- --glow-box: 1.76;
2668
-
2669
- /* Avatar glow, hung off the grid container because the preview frame clips its own overflow. Sits
2670
- under the frame and, by document order, above the body symbols on the same z-index. */
2671
- &::before {
2672
- content: '';
2673
- position: absolute;
2674
- z-index: -1;
2675
- pointer-events: none;
2676
- top: 0;
2677
- left: calc(var(--preview-col-w) / 2);
2678
- width: calc(var(--preview-col-w) * var(--glow-box));
2679
- aspect-ratio: 1045 / 752;
2680
- transform: translate(-50%, calc(50% / var(--glow-box) - 50%));
2681
- background: radial-gradient(
2682
- 50% 50% at 50% 52%,
2683
- rgb(var(--glow-core, ${j.glowCyanRgb})) 0%,
2684
- rgb(var(--glow-rgb, ${j.glowCyanRgb}) / 0.9) 20%,
2685
- 45%,
2686
- rgb(var(--glow-rgb, ${j.glowCyanRgb}) / 0) 100%
2687
- );
2688
- }
2689
-
2690
- ${le.maxWidth("lg")} {
2691
- grid-template-columns: 1fr;
2692
- gap: 24px;
2693
-
2694
- /* The track maths is desktop-only; one column puts the pivot nowhere meaningful. */
2695
- &::before {
2696
- display: none;
2697
- }
2698
- }
2699
- `,Wh=a.div`
2700
- position: relative;
2701
- aspect-ratio: 1045 / 752;
2702
- border-radius: ${Ye.banner};
2703
- overflow: hidden;
2704
-
2705
- /* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
2706
- shell's gutter instead of sitting inside it. No transform, which would make this the containing block
2707
- for the absolutely-positioned controls below. */
2708
- ${le.maxWidth("lg")} {
2709
- aspect-ratio: 1 / 1;
2710
- width: 100vw;
2711
- margin-left: calc(-50vw + 50%);
2712
- border-radius: 0;
2713
- }
2714
-
2715
- & iframe,
2716
- & > * {
2717
- width: 100%;
2718
- height: 100%;
2719
- border: 0;
2720
- display: block;
2721
- }
2722
-
2723
- /* Soft edges so legs and the cast shadow dissolve instead of being sliced by the overflow clip — on the
2724
- iframe alone, so the pills and note stay crisp, and intersected linears rather than one radial, which
2725
- would round the corners. The bands stay clear of the controls aang draws ~40px inside its canvas. */
2726
- & iframe {
2727
- -webkit-mask-image:
2728
- linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2729
- linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2730
- -webkit-mask-composite: source-in;
2731
- mask-image:
2732
- linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2733
- linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2734
- mask-composite: intersect;
2735
- }
2736
-
2737
- /* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
2738
- Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
2739
- above) nor blocks the preview controls. */
2740
- & > [data-preview-viewport] {
2741
- position: absolute;
2742
- inset: 0;
2743
- pointer-events: none;
2744
- z-index: 0;
2745
- }
2746
-
2747
- & > [data-preview-toggle] {
2748
- position: absolute;
2749
- top: 16px;
2750
- left: 16px;
2751
- z-index: 2;
2752
- width: auto;
2753
- height: auto;
2754
- display: inline-flex;
2755
- gap: 2px;
2756
- padding: 3px;
2757
- background: rgba(255, 255, 255, 0.92);
2758
- border: 1px solid ${j.line};
2759
- border-radius: 999px;
2760
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
2761
-
2762
- /* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
2763
- container carries no fill, gap or padding of its own there. */
2764
- ${le.maxWidth("lg")} {
2765
- top: auto;
2766
- left: auto;
2767
- right: 16px;
2768
- bottom: 16px;
2769
- gap: 0;
2770
- padding: 0;
2771
- background: none;
2772
- border: 0;
2773
- box-shadow: none;
2774
- overflow: hidden;
2775
- }
2776
- }
2777
-
2778
- & > [data-preview-note] {
2779
- position: absolute;
2780
- bottom: 14px;
2781
- left: 50%;
2782
- transform: translateX(-50%);
2783
- z-index: 2;
2784
- width: auto;
2785
- height: auto;
2786
- max-width: 88%;
2787
- margin: 0;
2788
- text-align: center;
2789
- background: rgba(22, 21, 24, 0.78);
2790
- color: ${j.white};
2791
- font-size: 12px;
2792
- font-weight: 500;
2793
- padding: 6px 12px;
2794
- border-radius: 999px;
2795
- }
2796
-
2797
- & > [data-preview-loading] {
2798
- position: absolute;
2799
- inset: 0;
2800
- z-index: 1;
2801
- display: flex;
2802
- align-items: center;
2803
- justify-content: center;
2804
- width: 100%;
2805
- height: 100%;
2806
- background: transparent;
2807
- }
2808
-
2809
- & > [data-fav-preview] {
2810
- display: none;
2811
- }
2812
-
2813
- /* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
2814
- wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
2815
- & > [data-play-showcase] {
2816
- position: absolute;
2817
- bottom: 16px;
2818
- left: 16px;
2819
- z-index: 2;
2820
- width: auto;
2821
- height: auto;
2822
- }
2823
-
2824
- ${le.maxWidth("lg")} {
2825
- & > [data-preview-toggle] {
2826
- top: auto;
2827
- left: auto;
2828
- bottom: 12px;
2829
- right: 12px;
2830
- gap: 0;
2831
- padding: 0;
2832
- background: transparent;
2833
- border: 0;
2834
- box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2835
- overflow: hidden;
2836
- }
2837
- & > [data-fav-preview] {
2838
- display: inline-flex;
2839
- position: absolute;
2840
- top: 12px;
2841
- right: 12px;
2842
- z-index: 3;
2843
- width: auto;
2844
- min-width: 40px;
2845
- height: 40px;
2846
- background: rgba(255, 255, 255, 0.92);
2847
- box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2848
- }
2849
- & > [data-fav-preview]:hover {
2850
- background: ${j.white};
2851
- }
2852
- }
2853
- `,Dh=a.div``,Oh=a.span`
2854
- position: absolute;
2855
- inset: 0;
2856
- width: 100%;
2857
- height: 100%;
2858
- border-radius: inherit;
2859
- `,qh=a.div`
2860
- display: flex;
2861
- flex-direction: column;
2862
- gap: 0;
2863
- `,Kh=a.div`
2864
- display: flex;
2865
- align-items: flex-start;
2866
- justify-content: space-between;
2867
- gap: 12px;
2868
-
2869
- ${le.maxWidth("lg")} {
2870
- order: 0;
2871
- }
2872
- `,Hh=a.h1`
2873
- font-size: 28px;
2874
- font-weight: 600;
2875
- line-height: 34px;
2876
- color: ${j.softWhite};
2877
-
2878
- ${le.maxWidth("lg")} {
2879
- font-size: 20px;
2880
- line-height: 24px;
2881
- }
2882
- `,Na=a.button`
2883
- flex: none;
2884
- min-width: 40px;
2885
- height: 40px;
2886
- padding: 0;
2887
- border-radius: ${Ye.pill};
2888
- border: 0;
2889
- background: rgba(255, 255, 255, 0.16);
2890
- display: inline-flex;
2891
- align-items: center;
2892
- justify-content: center;
2893
- gap: 6px;
2894
- color: ${j.softWhite};
2895
- cursor: pointer;
2896
- transition:
2897
- color 0.12s ease,
2898
- background 0.12s ease;
2899
-
2900
- &[data-count] {
2901
- padding: 0 14px 0 12px;
2902
- }
2903
- &:hover {
2904
- background: rgba(255, 255, 255, 0.28);
2905
- }
2906
- &[data-on] {
2907
- color: ${j.dclRed};
2908
- }
2909
-
2910
- ${le.maxWidth("lg")} {
2911
- color: ${j.text};
2912
- &[data-fav-title] {
2913
- display: none;
2914
- }
2915
- }
2916
- `,Wa=a.span`
2917
- font-size: 13px;
2918
- font-weight: 600;
2919
- line-height: 1;
2920
- color: ${j.softWhite};
2921
-
2922
- ${le.maxWidth("lg")} {
2923
- color: ${j.text};
2924
- }
2925
- `,Uh=a.button`
2926
- display: inline-flex;
2927
- align-items: center;
2928
- gap: 8px;
2929
- padding: 8px 14px;
2930
- border: 1px solid ${j.line};
2931
- border-radius: ${Ye.pill};
2932
- background: rgba(255, 255, 255, 0.94);
2933
- backdrop-filter: blur(6px);
2934
- box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
2935
- color: ${j.text};
2936
- font-size: 13px;
2937
- font-weight: 600;
2938
- cursor: pointer;
2939
- transition: background 0.12s ease;
2940
-
2941
- &:hover {
2942
- background: ${j.white};
2943
- }
2944
- &:focus-visible {
2945
- outline: 2px solid ${j.accent};
2946
- outline-offset: 2px;
2947
- }
2948
- `,mt=a.div`
2949
- display: inline-flex;
2950
- align-items: center;
2951
- gap: 5px;
2952
- font-size: 12px;
2953
- font-weight: 500;
2954
- text-transform: uppercase;
2955
- letter-spacing: 0;
2956
- color: ${j.gray4};
2957
- `,Qh=a.div`
2958
- display: flex;
2959
- align-items: center;
2960
- gap: 8px;
2961
- flex-wrap: wrap;
2962
- margin-top: 12px;
2963
-
2964
- ${le.maxWidth("lg")} {
2965
- order: 1;
2966
- margin-top: 10px;
2967
- }
2968
- `,Ee=a(cr)`
2969
- height: 24px;
2970
- padding: 0 8px;
2971
- gap: 3px;
2972
- font-size: 13px;
2973
- font-weight: 500;
2974
- border-radius: 4px;
2975
- letter-spacing: 0.02em;
2976
- text-transform: uppercase;
2977
- background: rgba(255, 255, 255, 0.14);
2978
- color: ${j.softWhite};
2979
-
2980
- & .ico {
2981
- color: ${j.softWhite};
2982
- }
2983
- &[data-variant='cat'] {
2984
- background: rgba(255, 255, 255, 0.14);
2985
- color: ${j.softWhite};
2986
- }
2987
-
2988
- /* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
2989
- #ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
2990
- one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
2991
- &[data-variant='blocked'] {
2992
- background: rgba(255, 116, 57, 0.2);
2993
- color: #ff7439;
2994
- cursor: help;
2995
- }
2996
- &[data-variant='blocked']:focus-visible {
2997
- outline: 2px solid #ff7439;
2998
- outline-offset: 2px;
2999
- }
3000
- `,Yt=a(Ee.withComponent(ir))`
3001
- text-decoration: none;
3002
- cursor: pointer;
3003
- transition: background 0.15s ease;
3004
-
3005
- &:hover,
3006
- &:focus-visible {
3007
- background: rgba(255, 255, 255, 0.26);
3008
- }
3009
-
3010
- /* The rarity chip carries its own colour inline, so a background hover would be overridden and the
3011
- chip would look inert. It gets a ring instead, which reads on any fill. */
3012
- &[data-variant='rarity']:hover,
3013
- &[data-variant='rarity']:focus-visible {
3014
- box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
3015
- }
3016
- `,Gh=a.div`
3017
- display: flex;
3018
- flex-direction: column;
3019
- align-items: flex-start;
3020
- gap: 8px;
3021
- `,Nn=a(Gh)`
3022
- gap: 11px;
3023
- `,Da=a.p`
3024
- margin: 0;
3025
- color: ${j.softWhite};
3026
- font-size: 14px;
3027
- line-height: 30px;
3028
- display: -webkit-box;
3029
- -webkit-box-orient: vertical;
3030
- -webkit-line-clamp: 4;
3031
- overflow: hidden;
3032
-
3033
- &[data-expanded] {
3034
- -webkit-line-clamp: unset;
3035
- overflow: visible;
3036
- }
3037
- `,_h=a.button`
3038
- font-size: 13px;
3039
- align-self: flex-start;
3040
- `,Qr=wt`
3041
- display: grid;
3042
- grid-template-columns: 1fr 1fr;
3043
- gap: 16px;
3044
- `,Gr=a.div`
3045
- ${Qr};
3046
- /* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
3047
- description belongs to the heading block it follows, the creator/collection pair is a new subject. */
3048
- margin-top: 24px;
3049
-
3050
- ${le.maxWidth("lg")} {
3051
- order: 3;
3052
- grid-template-columns: 1fr;
3053
- /* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
3054
- gap: 20px;
3055
- margin-top: 20px;
3056
- }
3057
- `,Wn=a.div`
3058
- min-width: 0;
3059
- `,_r=a.div`
3060
- ${Qr};
3061
- margin-top: 32px;
3062
-
3063
- ${le.maxWidth("lg")} {
3064
- order: 2;
3065
- margin-top: 20px;
3066
- }
3067
- `,zt=a.div`
3068
- display: flex;
3069
- flex-direction: column;
3070
- gap: 15px;
3071
- min-width: 0;
3072
-
3073
- &[data-collection] {
3074
- align-items: flex-start;
3075
- }
3076
- `,Vr=wt`
3077
- &[data-testid='creator'] {
3078
- color: ${j.softWhite};
3079
- font-size: 14px;
3080
- gap: 12px;
3081
- }
3082
- [data-avatar] {
3083
- width: 48px;
3084
- height: 48px;
3085
- }
3086
- [data-letter] {
3087
- font-size: 18px;
3088
- }
3089
- [data-testid='creator-name'] {
3090
- color: ${j.softWhite};
3091
- font-weight: 500;
3092
- text-decoration: underline;
3093
- }
3094
- &[data-link]:hover [data-testid='creator-name'] {
3095
- color: ${j.gray4};
3096
- }
3097
- `,Vh=a(to)`
3098
- ${Vr}
3099
- `,Jh=a(zh)`
3100
- ${Vr}
3101
- `,Jr=a.hr`
3102
- border: 0;
3103
- border-top: 1px solid rgba(255, 255, 255, 0.3);
3104
- margin: 24px 0 0;
3105
- width: 100%;
3106
-
3107
- /* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
3108
- so it closes the price rather than separating it from the description. */
3109
- ${le.maxWidth("lg")} {
3110
- order: 5;
3111
- margin-top: 16px;
3112
- }
3113
- `,Yh=a(eo)`
3114
- margin-bottom: 12px;
3115
- `,Xh=a.div`
3116
- margin-top: 16px;
3117
- /* The design's Pricing frame stacks its rows 16px apart; without it the stock scale sat against the
3118
- underside of the price and read as part of it. */
3119
- display: flex;
3120
- flex-direction: column;
3121
- gap: 16px;
3122
-
3123
- ${le.maxWidth("lg")} {
3124
- order: 4;
3125
- margin-top: 16px;
3126
- }
3127
- `,Zh=a.div`
3128
- display: flex;
3129
- align-items: flex-start;
3130
- gap: 16px;
3131
- width: 100%;
3132
- `,ex=a.div`
3133
- flex: 1 1 auto;
3134
- min-width: 0;
3135
- display: flex;
3136
- flex-direction: column;
3137
- gap: 8px;
3138
- `,Oa=a.div`
3139
- flex: 0 0 auto;
3140
- display: flex;
3141
- flex-direction: column;
3142
- align-items: flex-end;
3143
- gap: 8px;
3144
- text-align: right;
3145
- `,Mn=a.div`
3146
- font-size: 18px;
3147
- font-weight: 500;
3148
- line-height: 1;
3149
- color: ${j.softWhite};
3150
-
3151
- &[data-out] {
3152
- font-size: 14px;
3153
- font-weight: 600;
3154
- text-transform: uppercase;
3155
- letter-spacing: 0.02em;
3156
- color: ${j.gray4};
3157
- }
3158
- `,zn=a.div`
3159
- font-size: 14px;
3160
- font-weight: 600;
3161
- text-transform: uppercase;
3162
- letter-spacing: 0;
3163
- color: ${j.muted2};
3164
- `,At=a.div`
3165
- display: flex;
3166
- align-items: center;
3167
- gap: 8px;
3168
- font-weight: 700;
3169
- color: ${j.softWhite};
3170
-
3171
- /* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
3172
- &[data-variant='none'] {
3173
- display: inline-flex;
3174
- align-items: center;
3175
- gap: 6px;
3176
- font-size: 14px;
3177
- font-weight: 600;
3178
- color: ${j.softWhite};
3179
- }
3180
- /*
3181
- * White, not red. The tag above the title is what announces the discount; painting the number red too
3182
- * said it a second time and left the price itself the least legible thing in its own row.
3183
- */
3184
- &[data-variant='sale'] {
3185
- flex-wrap: wrap;
3186
- gap: 4px 8px;
3187
- color: ${j.white};
3188
- }
3189
- `;a.span`
3190
- display: flex;
3191
- align-items: center;
3192
- gap: 10px;
3193
- font-weight: 700;
3194
- color: ${j.dclRed};
3195
- `;const Mt=a.span`
3196
- font-size: 30px;
3197
- line-height: 1;
3198
- `,tx=a.span`
3199
- display: inline-flex;
3200
- color: ${j.muted2};
3201
- cursor: help;
3202
-
3203
- &:focus-visible {
3204
- outline: 2px solid ${j.accent};
3205
- outline-offset: 2px;
3206
- border-radius: ${Ye.chip};
3207
- }
3208
- `,nx=a.span`
3209
- font-size: 24px;
3210
- font-weight: 700;
3211
- color: ${j.softWhite};
3212
- margin-right: -2px;
3213
- `,ix=a.div`
3214
- font-size: 13px;
3215
- margin-top: 6px;
3216
- color: ${j.gray4};
3217
- `;a.div`
3218
- flex-basis: 100%;
3219
- display: flex;
3220
- align-items: center;
3221
- flex-wrap: wrap;
3222
- gap: 8px 12px;
3223
- `;const ax=a.div`
3224
- font-size: 13px;
3225
- font-weight: 600;
3226
- color: ${j.dclRed};
3227
- `,rx=a.span`
3228
- display: inline-flex;
3229
- align-items: center;
3230
- color: ${j.muted2};
3231
- text-decoration: line-through;
3232
- font-weight: 400;
3233
- font-size: 20px;
3234
- `;a.span`
3235
- display: inline-flex;
3236
- align-items: center;
3237
- background: ${j.dclRed};
3238
- color: ${j.white};
3239
- font-weight: 800;
3240
- font-size: 13px;
3241
- letter-spacing: 0.03em;
3242
- text-transform: uppercase;
3243
- border-radius: 6px;
3244
- padding: 4px 10px;
3245
- `;a(Go)`
3246
- display: inline-flex;
3247
- align-items: center;
3248
- gap: 5px;
3249
- background: ${j.rarityBg};
3250
- color: ${j.accent};
3251
- font-size: 13px;
3252
- font-weight: 700;
3253
- border-radius: 6px;
3254
- padding: 4px 10px;
3255
- white-space: nowrap;
3256
- `;const sx=a.div`
3257
- display: flex;
3258
- flex-direction: column;
3259
- gap: 12px;
3260
- margin-top: 20px;
3261
-
3262
- ${le.maxWidth("lg")} {
3263
- order: 6;
3264
-
3265
- &[data-buttons] {
3266
- position: fixed;
3267
- left: 0;
3268
- right: 0;
3269
- bottom: 0;
3270
- z-index: 40;
3271
- margin-top: 0;
3272
- padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
3273
- background: #2b0e44;
3274
- box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
3275
- }
3276
- &[data-dual] {
3277
- flex-direction: row;
3278
- align-items: stretch;
3279
- gap: 12px;
3280
- }
3281
- }
3282
- `,rn=wt`
3283
- && {
3284
- width: 100%;
3285
- height: 48px;
3286
- border-radius: 16px;
3287
- padding: 0 12px;
3288
- display: flex;
3289
- align-items: center;
3290
- justify-content: center;
3291
- gap: 8px;
3292
- font-size: 15px;
3293
- font-weight: 600;
3294
- line-height: 24px;
3295
- letter-spacing: 0.46px;
3296
- text-transform: uppercase;
3297
- }
3298
- `,Rn=a(Je)`
3299
- ${rn};
3300
- /* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
3301
- cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
3302
- sampled off the flattened render rather than the node's fill. */
3303
- && {
3304
- background: ${Ph.buyBtn};
3305
- }
3306
- &&::before {
3307
- content: none;
3308
- }
3309
- &&:hover:not(:disabled) {
3310
- background-image: linear-gradient(${j.dclRed}, ${j.dclRed});
3311
- }
3312
-
3313
- ${le.maxWidth("lg")} {
3314
- [data-dual] && {
3315
- flex: 1 1 auto;
3316
- width: auto;
3317
- }
3318
- }
3319
- `,ox=a(Je)`
3320
- ${rn};
3321
- && {
3322
- background: ${j.blackBtn};
3323
- color: ${j.softWhite};
3324
- border: 0;
3325
-
3326
- .ico {
3327
- width: 20px;
3328
- height: 20px;
3329
- }
3330
- }
3331
- &&:hover:not(:disabled) {
3332
- background: ${j.blackBtn};
3333
- filter: brightness(1.35);
3334
- }
3335
- `,qa=a.button`
3336
- align-self: center;
3337
- border: 0;
3338
- background: none;
3339
- padding: 8px 0;
3340
- color: ${n.colors.accent};
3341
- font-weight: 600;
3342
- font-size: 13px;
3343
- line-height: 24px;
3344
- letter-spacing: 0.46px;
3345
- text-transform: uppercase;
3346
- text-decoration: underline;
3347
- cursor: pointer;
3348
-
3349
- /* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
3350
- but invisible against it. Not a change to the shared colour: the other uses live inside
3351
- GaslessNotice, whose light fill is what that accent was picked for. */
3352
- &[data-on-purple] {
3353
- color: ${n.colors.white};
3354
- }
3355
-
3356
- &:disabled {
3357
- opacity: 0.5;
3358
- cursor: default;
3359
- }
3360
- `,lx=a(Je)`
3361
- ${rn};
3362
- && {
3363
- background: rgba(255, 255, 255, 0.2);
3364
- color: ${j.softWhite};
3365
- border: 0;
3366
-
3367
- .ico {
3368
- width: 20px;
3369
- height: 20px;
3370
- }
3371
- }
3372
- &&:hover:not(:disabled) {
3373
- background: rgba(255, 255, 255, 0.3);
3374
- }
3375
- &&:disabled {
3376
- opacity: 0.5;
3377
- }
3378
- `,Ka=a(Je)`
3379
- ${rn};
3380
- && {
3381
- background: rgba(0, 0, 0, 0.4);
3382
- color: ${j.white};
3383
- border: 0;
3384
- }
3385
- &&:hover:not(:disabled) {
3386
- background: rgba(0, 0, 0, 0.55);
3387
- }
3388
- &&:disabled {
3389
- opacity: 0.5;
3390
- }
3391
- `,Pn=a.span`
3392
- display: none;
3393
- align-items: center;
3394
- gap: 6px;
3395
-
3396
- ${le.maxWidth("lg")} {
3397
- [data-dual] & {
3398
- display: inline-flex;
3399
- }
3400
- }
3401
- `,Ha=a.button`
3402
- width: 100%;
3403
- height: 48px;
3404
- display: flex;
3405
- align-items: center;
3406
- justify-content: center;
3407
- gap: 8px;
3408
- /* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
3409
- treatment as the card's ADD TO CART. */
3410
- background: rgba(255, 255, 255, 0.2);
3411
- color: ${j.softWhite};
3412
- border: 0;
3413
- border-radius: 16px;
3414
- font-weight: 600;
3415
- font-size: 15px;
3416
- text-transform: uppercase;
3417
- letter-spacing: 0.46px;
3418
- cursor: pointer;
3419
- transition: background 0.15s ease;
3420
-
3421
- &:hover:not(:disabled) {
3422
- background: ${j.softWhite};
3423
- color: ${j.text2};
3424
- }
3425
- &:disabled {
3426
- background: rgba(255, 255, 255, 0.12);
3427
- color: rgba(252, 252, 252, 0.7);
3428
- cursor: default;
3429
- }
3430
-
3431
- ${le.maxWidth("lg")} {
3432
- [data-dual] & {
3433
- flex: 0 0 auto;
3434
- width: 56px;
3435
- padding: 0;
3436
- }
3437
- [data-dual] & .ico {
3438
- margin: 0;
3439
- }
3440
- }
3441
- `,Ua=a.span`
3442
- ${le.maxWidth("lg")} {
3443
- [data-dual] & {
3444
- display: none;
3445
- }
3446
- }
3447
- `,dx=a.p`
3448
- margin: 12px 0 0;
3449
- font-size: 13px;
3450
- color: ${j.gray4};
3451
-
3452
- & a {
3453
- color: ${j.softWhite};
3454
- font-weight: 600;
3455
- }
3456
- `;a.p`
3457
- margin: 4px 0 0;
3458
- font-size: 13px;
3459
- color: ${j.gray4};
3460
-
3461
- & a {
3462
- color: ${j.accent};
3463
- font-weight: 600;
3464
- }
3465
- `;const cx=a.div`
3466
- max-width: 1721px;
3467
- margin: 0 auto;
3468
- min-height: 46vh;
3469
- display: flex;
3470
- flex-direction: column;
3471
- align-items: center;
3472
- justify-content: center;
3473
- text-align: center;
3474
- gap: 14px;
3475
- color: ${j.softWhite};
3476
- `,ux=a.p`
3477
- margin: 0;
3478
- color: ${j.gray4};
3479
- `,px=a(Je)`
3480
- margin-top: 6px;
3481
- `,hx=a(P)`
3482
- opacity: 0.4;
3483
- `,xx=a.h1`
3484
- font-size: 22px;
3485
- `,fx=a.div`
3486
- display: flex;
3487
- flex-direction: column;
3488
- `,Qa=a.span`
3489
- display: block;
3490
- height: 15px;
3491
- width: 84px;
3492
- border-radius: 4px;
3493
- `,mx=a.div`
3494
- display: flex;
3495
- flex-direction: column;
3496
- align-self: stretch;
3497
- gap: 16px;
3498
- padding: 8px 0;
3499
- `,gx=a.span`
3500
- display: inline-flex;
3501
- align-items: center;
3502
- height: 48px;
3503
- gap: 10px;
3504
- background: none !important;
3505
-
3506
- &::before,
3507
- &::after {
3508
- content: '';
3509
- display: block;
3510
- }
3511
- &::before {
3512
- width: 40px;
3513
- height: 40px;
3514
- border-radius: 50%;
3515
- background: ${j.media};
3516
- }
3517
- &::after {
3518
- width: 96px;
3519
- height: 14px;
3520
- border-radius: 6px;
3521
- background: ${j.media};
3522
- }
3523
- `,bx=a.span`
3524
- height: 34px;
3525
- width: 70%;
3526
- margin: 3px 0;
3527
- border-radius: 8px;
3528
- `,yx=a.div`
3529
- display: flex;
3530
- gap: 8px;
3531
- /* Same as Chips above, so the row does not move when the real chips arrive. */
3532
- margin-top: 12px;
3533
- `,Ln=a.span`
3534
- height: 24px;
3535
- width: 88px;
3536
- border-radius: 6px;
3537
- `,Tn=a.span`
3538
- height: 14px;
3539
- width: 100%;
3540
- border-radius: 6px;
3541
-
3542
- &[data-short] {
3543
- width: 55%;
3544
- }
3545
- `,wx=a.span`
3546
- display: block;
3547
- height: 30px;
3548
- width: 40%;
3549
- margin: 16px 0 13px;
3550
- border-radius: 8px;
3551
- `,vx=a.span`
3552
- display: block;
3553
- height: 42px;
3554
- width: 100%;
3555
- border-radius: 8px;
3556
- margin-top: 20px;
3557
- `,Xt=a(ve)`
3558
- width: 30px;
3559
- height: 30px;
3560
- color: ${j.softWhite};
3561
-
3562
- &[data-was] {
3563
- width: 20px;
3564
- height: 20px;
3565
- color: ${j.gray4};
3566
- }
3567
- `,En=a(ve)`
3568
- width: 20px;
3569
- height: 20px;
3570
- `,jx=a.div`
3571
- display: flex;
3572
- align-items: center;
3573
- justify-content: space-between;
3574
- gap: 8px;
3575
- padding: 8px;
3576
- margin: 16px 0;
3577
- border-radius: ${Ye.btn};
3578
- background: rgba(22, 21, 24, 0.55);
3579
- `,kx=a.span`
3580
- display: flex;
3581
- align-items: center;
3582
- gap: 8px;
3583
- font-size: 14px;
3584
- line-height: 14px;
3585
- color: ${j.softWhite};
3586
- `,$x=a(P)`
3587
- width: 20px;
3588
- height: 20px;
3589
- color: ${j.softWhite};
3590
- `,Cx=a(P)`
3591
- width: 24px;
3592
- height: 24px;
3593
- color: ${j.white};
3594
- `,Ix=a.div`
3595
- display: flex;
3596
- align-items: center;
3597
- justify-content: space-between;
3598
- gap: 8px;
3599
- width: 100%;
3600
- margin-top: 16px;
3601
-
3602
- &[data-centered] {
3603
- justify-content: center;
3604
- }
3605
- `,Sx=a.span`
3606
- display: flex;
3607
- align-items: center;
3608
- gap: 2px;
3609
- font-size: 14px;
3610
- font-weight: 600;
3611
- color: ${j.gray4};
3612
-
3613
- & .ico {
3614
- width: 20px;
3615
- height: 20px;
3616
- color: ${j.gray4};
3617
- }
3618
- `,Ax=a.span`
3619
- font-size: 16px;
3620
- font-weight: 700;
3621
- padding-left: 2px;
3622
- `,Dn=a.button`
3623
- border: 0;
3624
- background: none;
3625
- padding: 0;
3626
- cursor: pointer;
3627
- font-family: ${Rh.sans};
3628
- font-size: 13px;
3629
- font-weight: 600;
3630
- letter-spacing: 0.46px;
3631
- text-transform: uppercase;
3632
- text-decoration: underline;
3633
- color: ${j.softWhite};
3634
-
3635
- &:hover {
3636
- color: ${j.gray4};
3637
- }
3638
- &:focus-visible {
3639
- outline: 2px solid ${j.white};
3640
- outline-offset: 2px;
3641
- border-radius: ${Ye.chip};
3642
- }
3643
- `,Mx=a(Dn)`
3644
- width: 100%;
3645
- height: 40px;
3646
- text-align: center;
3647
- border-radius: ${Ye.card};
3648
-
3649
- /* Hover is a translucent fill with the label left alone (Figma 868:67246), not the colour shift
3650
- ResellersLink uses. That one is an inline link sitting beside a price, where dimming the text is the
3651
- only surface there is; this is a full-width button, so the button itself is what should react. */
3652
- &:hover {
3653
- color: ${j.softWhite};
3654
- background: ${j.glass};
3655
- }
3656
- `,zx=a.div`
3657
- display: flex;
3658
- flex-direction: column;
3659
- gap: 16px;
3660
- width: 100%;
3661
- padding: 16px 0;
3662
- `,Ga=a.div`
3663
- display: flex;
3664
- align-items: center;
3665
- justify-content: space-between;
3666
- gap: 8px;
3667
- width: 100%;
3668
-
3669
- &[data-variant='original'] {
3670
- color: ${j.muted2};
3671
- }
3672
- `,_a=a.span`
3673
- display: flex;
3674
- align-items: center;
3675
- gap: 4px;
3676
- font-size: 14px;
3677
- font-weight: 600;
3678
-
3679
- [data-variant='original'] & {
3680
- color: ${j.muted2};
3681
- }
3682
- [data-variant='resale'] & {
3683
- color: ${j.text};
3684
- }
3685
- `,Va=a.span`
3686
- display: flex;
3687
- align-items: center;
3688
- gap: 2px;
3689
- padding: 0 2px;
3690
-
3691
- [data-variant='original'] & .ico {
3692
- width: 20px;
3693
- height: 20px;
3694
- color: ${j.muted2};
3695
- }
3696
- [data-variant='resale'] & .ico {
3697
- width: 24px;
3698
- height: 24px;
3699
- color: ${j.rarity};
3700
- }
3701
- `,Ja=a.span`
3702
- [data-variant='original'] & {
3703
- font-size: 16px;
3704
- font-weight: 700;
3705
- text-decoration: line-through;
3706
- }
3707
- [data-variant='resale'] & {
3708
- font-size: 25px;
3709
- font-weight: 700;
3710
- color: ${j.text};
3711
- }
3712
- `,Rx=a.span`
3713
- font-size: 14px;
3714
- font-weight: 600;
3715
-
3716
- [data-variant='original'] & {
3717
- color: ${j.muted2};
3718
- }
3719
- `,Px=a.span`
3720
- font-size: 14px;
3721
- font-weight: 600;
3722
- color: ${j.text2};
3723
- `,Ya=a.span`
3724
- display: inline-flex;
3725
- width: 12px;
3726
- height: 12px;
3727
- color: ${j.muted2};
3728
- `,Lx=a.div`
3729
- display: flex;
3730
- flex-direction: column;
3731
- gap: 12px;
3732
- width: 100%;
3733
- `,Tx=a.div`
3734
- display: flex;
3735
- justify-content: center;
3736
- `,sn=wt`
3737
- display: block;
3738
- background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
3739
- background-size: 200% 100%;
3740
- animation: shimmer 1.4s infinite linear;
3741
-
3742
- @media (prefers-reduced-motion: reduce) {
3743
- animation: none;
3744
- }
3745
- `,Ex=a.div`
3746
- display: flex;
3747
- flex-direction: column;
3748
- gap: 12px;
3749
- width: 100%;
3750
- /* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
3751
- padding-top: 4px;
3752
- `,Fx=a.span`
3753
- ${sn};
3754
- width: 120px;
3755
- height: 30px;
3756
- border-radius: ${Ye.btn};
3757
- margin-bottom: 4px;
3758
- `,Xa=a.span`
3759
- ${sn};
3760
- width: 100%;
3761
- height: 48px;
3762
- border-radius: 16px;
3763
- `,Za=a.div`
3764
- display: flex;
3765
- align-items: center;
3766
- gap: 12px;
3767
- `,er=a.span`
3768
- ${sn};
3769
- flex: none;
3770
- width: 48px;
3771
- height: 48px;
3772
- border-radius: 50%;
3773
- `,tr=a.span`
3774
- ${sn};
3775
- width: 96px;
3776
- height: 16px;
3777
- border-radius: 6px;
3778
- `;function Bx(t){return Object.values(Ae.Rarity).includes(t)}function Nx(t){return t==="male"?i("itemDetail.genderMale"):t==="female"?i("itemDetail.genderFemale"):t==="unisex"?i("itemDetail.genderUnisex"):null}function Zt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?i("itemDetail.categoryEmote"):i("itemDetail.categoryWearable")}const nr=8;function gf(){const{pathname:t}=ar();return e.jsx(Wx,{},t)}function Wx(){var Ii,Si,Ai;const{contractAddress:t,itemId:s,tokenId:l}=hs(),o=xn(t),d=cp(o),u=xn(s),x=xn(l),m=!!x,y=u??vd(x)??null,$=ar(),h=$.state,g=lt(),w=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=dt(),C=Rt(p=>p.add),S=Rt(p=>p.items),B=no(p=>p.toggle),{session:f,signIn:N}=ot(),[r,E]=c.useState(()=>{if(h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};return m?{...p,tokenId:x,itemId:p.itemId??y}:{...p,tokenId:void 0,itemId:u??p.itemId}}return{id:`${o}-${x??u}`,name:"",creator:"",contractAddress:o??"",itemId:y,category:"wearable",rarity:"common",network:"MATIC",chainId:st.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[Y,U]=c.useState(!1),[A,R]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&U(!0)},[h==null?void 0:h.resumeBuy]);function K(){const p=r.priceCredits>0?r.priceCredits:null;X("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:p,cart_value_usd:p===null?null:vo(p)}),U(!0)}function G(){if(f){K();return}w||Oo({type:"item-buy",path:$.pathname}),N()}const ne=c.useRef(!1);c.useEffect(()=>{if(!f||ne.current)return;const p=Wo("item-buy");!p||p.path!==$.pathname||(ne.current=!0,R(!0),K())},[f]);const de=c.useMemo(()=>r.contractAddress&&(r.itemId??y)?[`${r.contractAddress.toLowerCase()}-${r.itemId??y}`]:void 0,[r.contractAddress,r.itemId,y]),ee=io(nr,{exclude:de}),_=ao({enabled:ee.enabled,hasSignal:ee.hasSignal,isLoading:ee.isLoading,isError:ee.isError,personalized:(Ii=ee.result)==null?void 0:Ii.personalized,rowCount:((Si=ee.result)==null?void 0:Si.data.length)??0}),{items:O,isCollectionOnly:H,siblings:v,siblingsFetched:fe}=dp({id:r.id,contractAddress:r.contractAddress,itemId:r.itemId??y,tokenId:r.tokenId,creator:r.creator}),{data:L,isLoading:F}=te({queryKey:["shop-item",r.contractAddress,y],enabled:!w&&!m&&!!r.contractAddress&&!!y,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>ko(r.contractAddress,y)}),z=m?void 0:L;c.useEffect(()=>{z&&E(p=>p.tradeId?{...p,tradeId:z.tradeId,priceCredits:z.priceCredits,manaWei:z.manaWei,available:z.available??p.available,acquisition:z.acquisition,wearableCategory:p.wearableCategory??z.wearableCategory}:{...p,...z})},[z]);const[se,ie]=c.useState(!1),{data:xe=""}=te({queryKey:["item-desc",r.contractAddress,r.itemId],enabled:!!r.contractAddress&&!!r.itemId,staleTime:5*6e4,queryFn:()=>$o(r.contractAddress,r.itemId)}),{data:Q,isLoading:oe}=te({queryKey:["collection-meta",r.contractAddress],enabled:!!r.contractAddress,staleTime:5*6e4,queryFn:()=>dr(r.contractAddress)});c.useEffect(()=>{const p=(z==null?void 0:z.creator)||(Q==null?void 0:Q.creator);p&&E(re=>re.creator?re:{...re,creator:p})},[z,Q]);const Z=c.useMemo(()=>{if(!(m||r.name||z||v.length===0))return(y?v.find(p=>p.itemId===y):void 0)??v.find(p=>p.contractAddress===r.contractAddress)},[m,r.name,r.contractAddress,z,v,y]);c.useEffect(()=>{Z&&E(p=>({...Z,tradeId:p.tradeId??Z.tradeId}))},[Z]);const{data:Ce,isLoading:ce}=te({queryKey:["detail-trade",r.id,r.tradeId,r.contractAddress,r.itemId],enabled:!!r.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(r.tradeId)return r.tradeId;if(!m&&r.itemId){const p=await Co(r.contractAddress,r.itemId);return(p==null?void 0:p.id)??null}return null}}),{data:V}=te({queryKey:["item-traits",r.contractAddress,y],enabled:!!r.contractAddress&&!!y,staleTime:5*6e4,retry:1,queryFn:()=>Io(r.contractAddress,y)}),Be=(V==null?void 0:V.isSmart)??r.isSmart,qe=(V==null?void 0:V.utility)??null,be=c.useMemo(()=>({...r,wearableCategory:r.wearableCategory??(V==null?void 0:V.wearableCategory)??void 0,gender:r.gender??(V==null?void 0:V.gender)??null}),[r,V==null?void 0:V.wearableCategory,V==null?void 0:V.gender]),Xe=(V==null?void 0:V.urn)??null,{data:on}=te({queryKey:["item-vrm",Xe],enabled:!!Xe&&r.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>So(Xe)}),[Lt,Tt]=c.useState(!1),{data:vt}=te({queryKey:["item-video",r.contractAddress,y],enabled:Be&&!!r.contractAddress&&!!y,staleTime:30*6e4,retry:!1,queryFn:()=>Vo(r.contractAddress,y)}),Ze=c.useMemo(()=>r.emoteLoop!==void 0?r:(y?v.find(re=>re.itemId===y):void 0)??r,[r,v,y]),ke=Hi(I,r.tradeId)??Hi(I,Ce),ct=r.acquisition==="store"&&(r.available??0)>0,me=!!ke||ct,Ne=ro(),{data:Ke=[]}=te({queryKey:["item-resales",r.contractAddress,r.itemId],enabled:Ne&&!w&&!!r.contractAddress&&!!r.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>xr(r.contractAddress,r.itemId)}),He=Ke.length>0?Ke[0].priceCredits:null,We=m&&r.tokenId?Ke.find(p=>p.tokenId===r.tokenId)??null:null,Ie=c.useMemo(()=>{const p=Ke[0];return p?{...p,name:p.name||r.name,thumbnail:p.thumbnail||r.thumbnail,rarity:p.rarity||r.rarity,category:p.category||r.category,wearableCategory:p.wearableCategory??r.wearableCategory,gender:p.gender??r.gender}:null},[Ke,r]),[jt,Et]=c.useState(null),[Ft,et]=c.useState(!1),[kt,Bt]=c.useState(!1),[Nt,$t]=c.useState(!1),b=r.manaWei??null,{data:M}=hr(w||!!b),T=b&&M?so(b,M):null;c.useEffect(()=>{T!=null&&E(p=>p.priceCredits===T?p:{...p,priceCredits:T})},[T,r.priceCredits]);const W=c.useMemo(()=>{if(!w||!(h!=null&&h.item))return null;const p=h.item;return p.manaWei?{tradeId:p.tradeId??p.id,listingType:"primary",contractAddress:p.contractAddress,itemId:p.itemId??"",name:p.name,thumbnail:p.thumbnail,rarity:p.rarity,category:p.category,wearableCategory:p.wearableCategory??null,creator:p.creator,manaWei:p.manaWei,available:1,network:p.network,chainId:p.chainId,createdAt:0}:null},[w,h==null?void 0:h.item]),J=w&&k!=null&&!!M&&!!W,ae=oo({priceCredits:r.priceCredits,compareAtCredits:r.compareAtCredits,saleEndsAt:r.saleEndsAt}),D=(()=>{var je,xt,Mi;if(!ae)return null;const p=((je=r.coupon)==null?void 0:je.used)??0,re=Number(((Mi=(xt=r.coupon)==null?void 0:xt.checks)==null?void 0:Mi.uses)??0);return re>0&&p<=re?{claimed:p,total:re}:null})(),pe=(()=>{if(!ae||r.saleUnitsLeft==null)return null;const p=D?D.total-D.claimed:1/0;return r.saleUnitsLeft<p?r.saleUnitsLeft:null})(),Se=c.useMemo(()=>({...r,tradeId:ke,id:ke??r.id}),[r,ke]),Re=S.some(p=>p.id===Se.id),ut=!Se.tokenId,pt=((Ai=S.find(p=>p.id===Se.id))==null?void 0:Ai.quantity)??0,ln=ut&&typeof r.available=="number"&&pt>=r.available,{key:Qn,faved:tt}=lo(r),Ue=co(r),Yr=pr(p=>p.locale),Wt=Ue===void 0?null:Ue.toLocaleString(Yr),Gn=tt?i("assetCard.removeFromFavorites"):i("assetCard.addToFavorites"),_n=Ue===void 0?Gn:i("itemDetail.favoriteAria",{action:Gn,count:Ue}),Vn=c.useRef(null);c.useEffect(()=>{!r.name||ce||Vn.current===r.id||(Vn.current=r.id,X("Shop Viewed Item",{...uo(r),for_sale:me}),po(r))},[r.id,r.name,ce,me]);const Dt=`${o}/${x??u}`,Jn=c.useRef(Dt);c.useEffect(()=>{if(Jn.current!==Dt){if(Jn.current=Dt,h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};E(m?{...p,tokenId:x,itemId:p.itemId??y}:{...p,tokenId:void 0,itemId:u??p.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[Dt]);function Xr(){!me||dn||ce||!ut&&Re||ln||C(Se,"item_detail")}const nt=Bx(r.rarity)?r.rarity:Ae.Rarity.COMMON,Yn=Nx(be.gender),Ot=ho(be),Xn=xo(be.gender),Zn=Ih(r.rarity),ei=Sh(be),ti=me&&ae,Zr=H?i("itemDetail.moreFromCollection"):i("itemDetail.youMightAlsoLike"),dn=fo(r,f==null?void 0:f.address),[es,ni]=c.useState(!1),[ts,ii]=c.useState(!1),[ns,ai]=c.useState(!1),[is,ri]=c.useState(!1),[Ct,It]=c.useState(null),[as,si]=c.useState(!1),[oi,li]=c.useState(!1),di=en(f==null?void 0:f.providerType),{data:q,isLoading:qt}=te({queryKey:["owned-token",r.contractAddress,r.tokenId,f==null?void 0:f.address],enabled:!w&&!!(f!=null&&f.address)&&!!r.contractAddress&&!!r.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>f?Ti(f.address,r.contractAddress,r.tokenId):null});c.useEffect(()=>{q&&E(p=>p.name?{...p,issuedId:p.issuedId??q.issuedId,priceCredits:q.listingPrice??0,tradeId:q.tradeId}:{id:q.id,name:q.name,creator:"",contractAddress:q.contractAddress,itemId:q.itemId,category:q.category,rarity:q.rarity??"common",network:q.network,chainId:q.chainId,thumbnail:q.image,priceCredits:q.listingPrice??0,gender:null,isSmart:!1,tokenId:q.tokenId,issuedId:q.issuedId,tradeId:q.tradeId})},[q]),c.useEffect(()=>{We&&E(p=>p.priceCredits===We.priceCredits&&p.tradeId?p:{...p,priceCredits:We.priceCredits,tradeId:p.tradeId??We.tradeId})},[We]),c.useEffect(()=>{Ct!=null&&q!=null&&q.isOnSale&&q.listingPrice===Ct&&It(null)},[q,Ct]);const ci=!w&&!!r.contractAddress&&!!r.tokenId&&!r.name&&!z&&!qt&&!q,{data:he,isFetched:rs}=te({queryKey:["public-token",r.contractAddress,r.tokenId],enabled:ci,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Ao(r.contractAddress,r.tokenId)});c.useEffect(()=>{he&&E(p=>p.name?p.issuedId?p:{...p,issuedId:he.issuedId}:{id:he.id,name:he.name,creator:"",contractAddress:he.contractAddress,itemId:he.itemId,category:he.category,rarity:he.rarity??"common",network:he.network,chainId:he.chainId,thumbnail:he.image,priceCredits:he.listingPrice??0,gender:null,isSmart:!1,tokenId:he.tokenId,issuedId:he.issuedId,tradeId:he.tradeId})},[he]);const{data:Pe}=te({queryKey:["publishable-item",r.contractAddress,r.itemId,f==null?void 0:f.address],enabled:dn&&!!f&&!!r.itemId,queryFn:async()=>f?(await Jo(f.address,f.identity)).find(re=>re.contractAddress.toLowerCase()===r.contractAddress.toLowerCase()&&re.blockchainItemId===r.itemId)??null:null}),Le=m&&!!q,cn=!m&&dn,Te=!w&&(cn||Le),ui=Ct!=null?!0:Le?!!(q!=null&&q.isOnSale):me,Kt=Le?q==null?void 0:q.tradeId:ke,pi=Le?!!q:!!Pe,hi=cn||Le&&Ne,un=Ct??(Le?(q==null?void 0:q.listingPrice)??0:0),{data:xi=0}=te({queryKey:["owned-item-count",r.contractAddress,u,f==null?void 0:f.address],enabled:!m&&!w&&!!(f!=null&&f.address)&&!!r.contractAddress&&!!u,staleTime:3e4,queryFn:()=>f?Mo(f.address,r.contractAddress,u):0});async function it(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",r.contractAddress,r.tokenId]}),I.invalidateQueries({queryKey:["detail-trade"]}),I.invalidateQueries({queryKey:["shop-item"]}),I.invalidateQueries({queryKey:["collection-sale-state"]}),I.invalidateQueries({queryKey:["shop-items"]}),I.invalidateQueries({queryKey:["catalog-items"]}),I.invalidateQueries({queryKey:["publishable-items"]}),I.invalidateQueries({queryKey:["publishable-item",r.contractAddress,r.itemId]}),I.invalidateQueries({queryKey:["item-resales",r.contractAddress,r.itemId]})])}async function ss(p){if(!f||!Kt)throw new Error("No listing to take down");const re=await ur(Kt);await Ho({trade:re,signer:f.signer,mode:p.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(Le){if(!r.tokenId)return!1;const je=await Ti(f.address,r.contractAddress,r.tokenId);return je!==null&&!je.isOnSale}return r.itemId?await jo(r.contractAddress,r.itemId)===null:!1}catch{return!1}},onWaiting:p.onWaiting}}),p.silent||Pt.success(i("myAssets.removedFromSale",{name:r.name})),It(null),jd(I,Kt),E(je=>je.tradeId===Kt?{...je,tradeId:void 0}:je),it(),fn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"removed"})}const fi=p=>async({payGas:re,onWaiting:je})=>{try{return await ss({silent:p,payGas:re,onWaiting:je}),"ok"}catch(xt){if(xt instanceof Ko)return xt.definitive?"relay-reverted":"relay-pending";throw xt}},mi={currentCredits:un||r.priceCredits||void 0,canPayGas:di,cancelCurrent:fi(!0)};function gi({edit:p=!1}={}){p||X("Shop Started Listing",{listing_type:Le?"secondary":"primary",item_id:r.itemId??r.tokenId??null}),li(p),Le?ni(!0):ii(!0)}function bi(){ni(!1),ii(!1),li(!1),it()}const yi=me?ce?i("itemDetail.checking"):ln?i("itemDetail.maxInCart"):!ut&&Re?i("assetCard.inCart"):i("assetCard.addToCart"):i("itemDetail.notForSale"),St=r.available??(V==null?void 0:V.available)??null,os=typeof St=="number"&&St>0&&!r.tokenId&&!w,wi=!w&&!r.tokenId&&St===0,vi=r.network==="ETHEREUM",ht=wi&&!Te&&!!Ie,Ht=!!Ie&&S.some(p=>p.id===Ie.id),ls=!Te&&me&&!w,ds=w||!Te&&(me||ht&&!!Ie||Kr()),cs=!r.name&&(!!z||!!q||!!he||!!Z),ji=F||!!r.contractAddress&&!fe||!r.name&&qt||cs||ci&&!rs,ki=!r.name&&!ji,us=!!r.name&&kd({isMarket:w,forSale:me,priceKnown:r.priceCredits>0&&(!b||T!=null)||Te,stillResolving:ji||!!b&&T==null,manage:Te,soldOutWithResale:ht,resolvingTrade:ce,isTokenRoute:m,ownedAssetLoading:qt,deepLinkLoading:F}),$i=!r.creator&&(F||oe||qt),Ci=!(Q!=null&&Q.name)&&oe,ps=/^https?:\/\//i.test(r.thumbnail);return mo(ki?{title:i("seo.item.notFoundTitle"),noindex:!0}:r.name?{title:r.name,description:xe||i("seo.item.fallbackDescription",{name:r.name,rarity:r.rarity,category:Zt(be),creator:On(r.creator)}),image:ps?r.thumbnail:void 0,type:"product"}:{}),ki?e.jsxs(cx,{"data-notfound":!0,children:[e.jsx(hx,{name:"cart"}),e.jsx(xx,{children:i("itemDetail.notAvailableTitle")}),e.jsx(ux,{children:i("itemDetail.notAvailableBody")}),e.jsx(px,{variant:"white",onClick:()=>g("/items"),children:i("notFound.cta")})]}):e.jsxs(Lh,{children:[e.jsxs(Th,{"aria-label":i("itemDetail.breadcrumbAria"),children:[e.jsx(Eh,{onClick:()=>g("/items"),children:i("nav.collectibles")}),e.jsx(Fh,{children:"/"}),e.jsx(Bh,{children:r.name||i("itemDetail.itemFallback")})]}),e.jsxs(Nh,{style:{"--glow-rgb":yo(nt),"--glow-core":bo(nt)},children:[e.jsxs(Wh,{"data-testid":"item-preview",children:[r.name?e.jsx(mp,{item:r}):e.jsx(Dh,{"aria-busy":"true","aria-label":i("itemPreview.loading"),children:e.jsx(Oh,{className:"skeleton","aria-hidden":!0})}),Qn?e.jsxs(Na,{"data-fav-preview":!0,"data-on":tt||void 0,"data-count":Wt??void 0,onClick:()=>B(r,"item_detail"),"aria-pressed":tt,"aria-label":_n,children:[e.jsx(P,{name:tt?"heart-solid":"heart",size:18}),Ue!==void 0?e.jsx(Wa,{title:i("itemDetail.savedCount",{count:Ue}),"data-testid":"fav-count-preview",children:Wt}):null]}):null,vt?e.jsxs(Uh,{"data-play-showcase":!0,onClick:()=>Tt(!0),"data-testid":"play-showcase",children:[e.jsx(P,{name:"play",size:18}),i("itemDetail.playShowcase")]}):null]}),e.jsx(qh,{"data-testid":"item-info",children:r.name?e.jsxs(e.Fragment,{children:[ti&&r.compareAtCredits!=null?e.jsx(Yh,{pct:go(r.compareAtCredits,r.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(Kh,{children:[e.jsxs(Hh,{children:[r.name,m&&r.issuedId?` #${r.issuedId}`:""]}),Qn?e.jsxs(Na,{"data-fav-title":!0,"data-on":tt||void 0,"data-count":Wt??void 0,onClick:()=>B(r,"item_detail"),"aria-pressed":tt,"aria-label":_n,children:[e.jsx(P,{name:tt?"heart-solid":"heart",size:18}),Ue!==void 0?e.jsx(Wa,{title:i("itemDetail.savedCount",{count:Ue}),"data-testid":"fav-count",children:Wt}):null]}):null]}),e.jsxs(Qh,{children:[Zn?e.jsx(_t,{content:Li(r.rarity),children:e.jsx(Yt,{to:Zn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Pi(nt)},children:r.rarity})}):e.jsx(_t,{content:Li(r.rarity),children:e.jsx(Ee,{"data-variant":"rarity",style:{background:Pi(nt)},children:r.rarity})}),ei?e.jsxs(Yt,{to:ei,"data-testid":"detail-category-link",title:i("filter.browseByCategory",{category:Zt(be)}),children:[Ot?e.jsx(P,{name:Ot,size:18}):null,Zt(be)]}):e.jsxs(Ee,{children:[Ot?e.jsx(P,{name:Ot,size:18}):null,Zt(be)]}),Yn?e.jsxs(Ee,{children:[Xn?e.jsx(P,{name:Xn,size:18}):null,Yn]}):null,!m&&r.issuedId?e.jsxs(Ee,{"data-testid":"detail-issued",children:["#",r.issuedId]}):null,d?e.jsxs(Yt,{to:"/event","data-testid":"detail-event",title:d,children:[e.jsx(P,{name:"star-rounded",size:18}),d]}):null,Be?e.jsxs(Yt,{to:Ah(),"data-testid":"detail-smart",title:i("filter.browseBySmart"),children:[e.jsx(P,{name:"smart",size:18}),i("itemDetail.smart")]}):null,Ze.emoteLoop!==void 0?e.jsxs(Ee,{"data-testid":"detail-play-mode",children:[e.jsx(P,{name:Ze.emoteLoop?"play-loop":"play-once",size:18}),Ze.emoteLoop?i("itemDetail.playLoop"):i("itemDetail.playOnce")]}):null,Ze.emoteHasSound?e.jsxs(Ee,{"data-testid":"detail-sound",children:[e.jsx(P,{name:"sound",size:18}),i("itemDetail.emoteSound")]}):null,Ze.emoteHasProps?e.jsxs(Ee,{"data-testid":"detail-props",children:[e.jsx(P,{name:"props",size:18}),i("itemDetail.emoteProps")]}):null,on?e.jsx(_t,{content:i("itemDetail.exportBlockedTooltip"),children:e.jsxs(Ee,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":i("itemDetail.exportBlockedTooltip"),children:[e.jsx(P,{name:"ban",size:16}),i("itemDetail.exportBlocked")]})}):null,qe?e.jsxs(Ee,{"data-testid":"detail-utility-chip",children:[e.jsx(P,{name:"utility",size:18}),i("itemDetail.utility")]}):null]}),xe||qe?e.jsxs(Gr,{children:[xe?e.jsx(Wn,{children:e.jsxs(Nn,{children:[e.jsx(mt,{children:i("itemDetail.description")}),e.jsx(Da,{"data-expanded":se||void 0,children:xe}),xe.length>140?e.jsx(_h,{className:"link",onClick:()=>ie(p=>!p),children:se?i("itemDetail.showLess"):i("itemDetail.readMore")}):null]})}):null,qe?e.jsx(Wn,{children:e.jsxs(Nn,{"data-testid":"detail-utility",children:[e.jsx(mt,{children:i("itemDetail.utility")}),e.jsx(Da,{"data-expanded":!0,children:qe})]})}):null]}):null,!vi&&(r.creator||$i)||Q!=null&&Q.name||Ci?e.jsxs(_r,{children:[vi?null:r.creator?e.jsxs(zt,{children:[e.jsx(mt,{children:i("itemDetail.creator")}),e.jsx(Vh,{address:r.creator,linkToProfile:!0,hidePrefix:!0})]}):$i?e.jsxs(zt,{children:[e.jsx(mt,{children:i("itemDetail.creator")}),e.jsxs(Za,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(er,{}),e.jsx(tr,{})]})]}):null,Q!=null&&Q.name?e.jsxs(zt,{"data-collection":!0,children:[e.jsx(mt,{children:i("itemDetail.collection")}),e.jsx(Jh,{contractAddress:r.contractAddress,name:Q.name,items:v})]}):Ci?e.jsxs(zt,{"data-collection":!0,children:[e.jsx(mt,{children:i("itemDetail.collection")}),e.jsxs(Za,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(er,{}),e.jsx(tr,{})]})]}):null]}):null,e.jsx(Jr,{}),us?e.jsxs(Ex,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(Fx,{}),e.jsx(Xa,{}),e.jsx(Xa,{})]}):e.jsxs(e.Fragment,{children:[Ne&&!Te&&!w&&me&&!r.tokenId?e.jsxs(jx,{"data-testid":"buy-from-creator",children:[e.jsxs(kx,{children:[e.jsx($x,{name:"buy-from-creator"}),i("itemDetail.buyFromCreator")]}),e.jsx(Cx,{name:"check-rounded"})]}):null,ht?e.jsxs(zx,{"data-testid":"sold-out",children:[e.jsxs(Ga,{"data-variant":"original",children:[e.jsxs(_a,{children:[i("itemDetail.originalPrice"),e.jsxs(Va,{children:[e.jsx(ve,{className:"ico"}),e.jsx(Ja,{children:e.jsx(ye,{credits:r.priceCredits})})]}),e.jsx(Ya,{"aria-hidden":!0,children:e.jsx(P,{name:"info",size:12})})]}),e.jsx(Rx,{"data-testid":"out-of-stock",children:i("itemDetail.soldOut")})]}),e.jsxs(Ga,{"data-variant":"resale",children:[e.jsxs(_a,{children:[i("itemDetail.resalePrice"),e.jsxs(Va,{children:[e.jsx(ve,{className:"ico"}),e.jsx(Ja,{children:e.jsx(ye,{credits:He})})]}),e.jsx(Ya,{"aria-hidden":!0,children:e.jsx(P,{name:"info",size:12})})]}),e.jsxs(Px,{children:[i("itemDetail.stock")," ",Ke.length,"/",Ae.Rarity.getMaxSupply(nt).toLocaleString()]})]})]}):e.jsxs(Xh,{children:[e.jsxs(Zh,{children:[e.jsxs(ex,{children:[w||me?e.jsx(zn,{children:i("itemDetail.price")}):null,w?e.jsxs(e.Fragment,{children:[e.jsx(At,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(Mt,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(nx,{"aria-hidden":!0,children:"≈"}),e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:k})})]})}),e.jsx(ix,{children:i("assetCard.marketPrice")})]}):me?ti?e.jsxs(At,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:r.priceCredits})}),e.jsx(rx,{"data-testid":"detail-price-was",children:e.jsx(ye,{credits:r.compareAtCredits})}),e.jsx(_o,{until:r.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs(At,{"data-testid":"item-price",children:[e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:r.priceCredits})})]}):ui&&un?e.jsxs(At,{"data-testid":"item-price",children:[e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:un})})]}):Te?null:e.jsxs(At,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:i("itemDetail.notForSale")}),e.jsx(_t,{content:i("itemDetail.notForSaleHint"),children:e.jsx(tx,{tabIndex:0,role:"img","aria-label":i("itemDetail.notForSaleHint"),children:e.jsx(P,{name:"info",size:14})})})]})]}),os?e.jsxs(Oa,{children:[e.jsx(zn,{children:i("itemDetail.stock")}),e.jsxs(Mn,{children:[(St??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(nt).toLocaleString()]})]}):wi?e.jsxs(Oa,{children:[e.jsx(zn,{children:i("itemDetail.stock")}),e.jsxs(Mn,{children:[(St??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(nt).toLocaleString()]}),e.jsx(Mn,{"data-out":!0,"data-testid":"out-of-stock",children:i("itemDetail.outOfStock")})]}):null]}),D?e.jsx($h,{claimed:D.claimed,total:D.total,testId:"detail-offer-stock"}):null,pe!=null?e.jsx(ax,{"data-testid":"detail-units-left",children:i("assetCard.unitsLeftAtThisPrice",{count:pe})}):null]}),e.jsx(sx,{"data-buttons":ds||void 0,"data-dual":ls||void 0,children:w?e.jsxs(Rn,{variant:"purple",onClick:G,disabled:!J,children:[e.jsx("span",{children:i("assetCard.buyNow")}),k!=null?e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:k})]}):null]}):Te?e.jsxs(Lx,{"data-testid":"manage-actions",children:[ui?e.jsxs(e.Fragment,{children:[hi?e.jsxs(lx,{onClick:()=>gi({edit:!0}),disabled:!pi,"data-testid":"edit-price",children:[e.jsx(P,{name:"pen",className:"ico"}),e.jsx("span",{children:i("itemDetail.manageUpdatePrice")})]}):null,e.jsx(Ka,{onClick:()=>si(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:i("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hi?e.jsx(ox,{onClick:()=>gi(),disabled:!pi,children:e.jsx("span",{children:i("itemDetail.manageList")})}):null,Le?e.jsxs(e.Fragment,{children:[e.jsx(Ka,{onClick:()=>ai(!0),children:e.jsx("span",{children:i("itemDetail.manageTransfer")})}),e.jsx(qa,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>Bt(!0),children:i("itemDetail.manageResell")})]}):null]}),cn&&Pe?e.jsx(qa,{type:"button","data-on-purple":!0,onClick:()=>ri(!0),children:i("itemDetail.manageIssue")}):null,He!=null?e.jsx(Tx,{children:e.jsx(Dn,{onClick:()=>et(!0),"data-testid":"view-resellers",children:i("itemDetail.viewAllResellers")})}):null]}):me?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:G,disabled:ce,children:[e.jsx("span",{children:i("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:r.priceCredits})]})]}),e.jsxs(Ha,{onClick:Xr,disabled:ce||(ut?ln:Re),"aria-label":yi,children:[e.jsx(P,{name:"cart"}),e.jsx(Ua,{children:yi})]})]}):ht&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:()=>f?Et(Ie):N(),children:[e.jsx("span",{children:i("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:Ie.priceCredits})]})]}),e.jsxs(Ha,{onClick:()=>{Ht||C(Ie,"item_detail")},disabled:Ht,"aria-label":Ht?i("assetCard.inCart"):i("assetCard.addToCart"),children:[e.jsx(P,{name:"cart"}),e.jsx(Ua,{children:Ht?i("assetCard.inCart"):i("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(bh,{item:r}),r.itemId?e.jsx(Mx,{onClick:()=>{X("Shop Clicked Buy Resale",{item_id:r.itemId,contract_address:r.contractAddress,has_shop_resale:!!Ie}),$t(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:i("itemDetail.buyResale")}):null]})}),!Te&&!w&&He!=null?e.jsxs(Ix,{"data-testid":"lowest-price","data-centered":ht||void 0,children:[ht?null:e.jsxs(Sx,{children:[i("itemDetail.lowestPrice"),e.jsx(ve,{className:"ico"}),e.jsx(Ax,{children:e.jsx(ye,{credits:He})})]}),e.jsx(Dn,{onClick:()=>et(!0),"data-testid":"view-resellers",children:i("itemDetail.viewAllResellers")})]}):null,!Te&&!w&&xi>0?e.jsxs(dx,{"data-testid":"you-own-note",children:[i("itemDetail.youOwnN",{count:xi})," ",e.jsx(ir,{to:"/my-items",children:i("nav.myAssets")})]}):null]})]}):e.jsx(Dx,{})})]}),e.jsx(wo,{exclude:de,title:i("itemDetail.becauseYouOwn"),surface:"pdp",first:nr}),_!==null&&e.jsx(Do,{title:Zr,items:O,onViewAll:H&&r.contractAddress?()=>g(`/collection/${r.contractAddress}`):void 0}),Y&&w&&W&&M?e.jsx(Br,{listing:W,rate:M,onClose:()=>U(!1),onSold:()=>U(!1)}):Y&&!w?e.jsx(Bn,{item:Se,resume:A,onClose:()=>{U(!1),R(!1)}}):null,jt?e.jsx(Bn,{item:jt,onClose:()=>{Et(null),it()}}):null,Ne&&Ft&&r.itemId?e.jsx(Up,{item:r,onClose:()=>et(!1)}):null,kt&&x?e.jsx(La,{contractAddress:o??"",tokenId:x,onClose:()=>Bt(!1)}):null,Nt&&r.itemId&&o?e.jsx(La,{variant:"buy",contractAddress:o,itemId:r.itemId,onClose:()=>$t(!1)}):null,es&&q&&f?e.jsx(yc,{asset:q,session:f,creator:r.creator,edit:oi?mi:void 0,onListed:(p,re)=>{It(p),it(),fn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"listed",priceCredits:p,tradeId:re})},onClose:bi}):null,as&&f?e.jsx(Oc,{name:r.name,managed:an(f),canPayGas:di,cancel:fi(!1),onClose:()=>si(!1)}):null,ns&&f&&r.tokenId?e.jsx(Nc,{item:{contractAddress:r.contractAddress,chainId:r.chainId,tokenId:r.tokenId,name:r.name,thumbnail:r.thumbnail},session:f,onClose:()=>{ai(!1),it()},onTransferred:()=>{It(null),it(),fn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"gone"})}}):null,ts&&Pe&&f?e.jsx(du,{item:Pe,session:f,edit:oi?mi:void 0,onListed:(p,re)=>{It(p),E(je=>({...je,tradeId:re}))},onClose:bi}):null,is&&Pe&&f?e.jsx(Bu,{item:{contractAddress:Pe.contractAddress,chainId:st.chainId,itemId:Pe.blockchainItemId,name:Pe.name,thumbnail:Pe.thumbnail,available:Pe.remainingSupply},session:f,onClose:()=>{ri(!1),it()}}):null,Lt&&vt?e.jsx(Hu,{src:vt,itemName:r.name,onClose:()=>Tt(!1)}):null]})}function Dx(){return e.jsxs(fx,{"aria-hidden":!0,children:[e.jsx(bx,{className:"skeleton"}),e.jsxs(yx,{children:[e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"})]}),e.jsx(Gr,{children:[0,1].map(t=>e.jsx(Wn,{children:e.jsxs(Nn,{children:[e.jsx(Qa,{className:"skeleton"}),e.jsxs(mx,{children:[e.jsx(Tn,{className:"skeleton"}),e.jsx(Tn,{className:"skeleton"}),e.jsx(Tn,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(_r,{children:[0,1].map(t=>e.jsxs(zt,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Qa,{className:"skeleton"}),e.jsx(gx,{})]},t))}),e.jsx(Jr,{}),e.jsx(wx,{className:"skeleton"}),e.jsx(vx,{className:"skeleton"})]})}export{Wx as ItemDetail,gf as ItemDetailRoute,Wx as default};
3779
- //# sourceMappingURL=ItemDetail-Bfbuu0cW.js.map