@dcl/shop 0.7.0 → 0.7.1

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 (180) hide show
  1. package/_assets/{Activity-Bfm7kRfv.js → Activity-Cnn-lMD9.js} +3 -3
  2. package/_assets/{AnimatedBackground-C-bhqVsp.js → AnimatedBackground-D9QjeeBa.js} +1 -1
  3. package/_assets/{Assets-B55dtQQJ.js → Assets-CRJDmBDB.js} +12 -12
  4. package/_assets/{Assets.styles-NQkvfYq_.js → Assets.styles-BjdmDuEG.js} +1 -1
  5. package/_assets/{Authorizations-CiQtw5K-.js → Authorizations-C-EUi_Ea.js} +1 -1
  6. package/_assets/{Cart-D7wbUiTa.js → Cart-B8YOGJmI.js} +9 -9
  7. package/_assets/{CircularProgress-ZsDKUKD2.js → CircularProgress-Db8orehr.js} +3 -3
  8. package/_assets/{Collection-DwFpgZbC.js → Collection-C2FumsGf.js} +6 -6
  9. package/_assets/{CollectionCarousel-DENDQYmz.js → CollectionCarousel-DL857EZk.js} +6 -6
  10. package/_assets/Creator-WSL6qgqX.js +306 -0
  11. package/_assets/{ErrorNotice-BEc3g8r8.js → ErrorNotice-MWF7JXST.js} +1 -1
  12. package/_assets/{ExchangeController-BCP2fWjj.js → ExchangeController-D0BUEGgM.js} +1 -1
  13. package/_assets/{GetCredits-Vnk46xfQ.js → GetCredits-VgVSObKH.js} +56 -40
  14. package/_assets/{Grow-DuBI26R-.js → Grow-DaJKbNKH.js} +1 -1
  15. package/_assets/{HelpersUtil-ClfhYE3l.js → HelpersUtil-Des1BKsb.js} +1 -1
  16. package/_assets/ItemDetail-DpbhFiHl.js +3497 -0
  17. package/_assets/LazyEmoteControls-COW8eJUD.js +2 -0
  18. package/_assets/{LoadMore-CC_UzQ34.js → LoadMore-CIWThu0V.js} +1 -1
  19. package/_assets/{ManaPricingBanner.styles-BokPI2D_.js → ManaPricingBanner.styles-D7yh-OMv.js} +3 -3
  20. package/_assets/{MyAssets-Bo37jIwn.js → MyAssets-MBEHe0qY.js} +1 -1
  21. package/_assets/{MyFavorites-B2TJaZUB.js → MyFavorites-Cer-5MAy.js} +1 -1
  22. package/_assets/{NotFound-DLx8jzvN.js → NotFound-CuiJHtW_.js} +1 -1
  23. package/_assets/{NotificationsBell-BtCXxoM8.js → NotificationsBell-BneUIyzO.js} +1 -1
  24. package/_assets/OutfitDetail-B1WI3yDq.js +334 -0
  25. package/_assets/{OutfitPreview-D5_qH5Ln.js → OutfitPreview-C2-ueSaA.js} +2 -2
  26. package/_assets/{OutfitStudio-qONuf5K7.js → OutfitStudio-DYdoL9fR.js} +7 -7
  27. package/_assets/{StoreSettings-vN3UO986.js → StoreSettings-DuuOxmdV.js} +9 -9
  28. package/_assets/{Success-f5eJlnKx.js → Success-CEH1MUQt.js} +1 -1
  29. package/_assets/{SwapController-B9sRrkAK.js → SwapController-CIXsGZBK.js} +1 -1
  30. package/_assets/{Tooltip-D1ZBIqYA.js → Tooltip-jfo7edQn.js} +1 -1
  31. package/_assets/{TradeService-DvFVQpxx.js → TradeService-DiOUxFwj.js} +1 -1
  32. package/_assets/{W3MFrameProviderSingleton-mcKRqTfP.js → W3MFrameProviderSingleton-D_hwynnp.js} +3 -3
  33. package/_assets/{WebCryptoP256-B7MhXWuH.js → WebCryptoP256-DFE3V2WS.js} +1 -1
  34. package/_assets/{authorizations-D_1liO7d.js → authorizations-CboNrOcr.js} +1 -1
  35. package/_assets/{basic-CqEh5duU.js → basic-DvU1J3w8.js} +1 -1
  36. package/_assets/{biconomy-D_Y6_R5H.js → biconomy-DTTg16ds.js} +1 -1
  37. package/_assets/builder-C3uRVotE.js +1 -0
  38. package/_assets/{buy-D5A2EHRt.js → buy-BYu3r4d1.js} +1 -1
  39. package/_assets/{buy-gasless-DOjyxrOK.js → buy-gasless-BpGXC11T.js} +1 -1
  40. package/_assets/{categories-2VrlGaC_.js → categories-B-ttqFdP.js} +1 -1
  41. package/_assets/{ccip-BOQWcrsE.js → ccip-B5qgpEOa.js} +1 -1
  42. package/_assets/{ccip-Bmb04-XK.js → ccip-Chjvzuo3.js} +1 -1
  43. package/_assets/{collectionPage.styles-DaKP3DX-.js → collectionPage.styles-Cqc0qEsV.js} +4 -4
  44. package/_assets/{controller-BQ-e2rGO.js → controller-D65h4JHM.js} +2 -2
  45. package/_assets/{core-CTr2fRUy.js → core-DQrWR_KU.js} +4 -4
  46. package/_assets/{createSvgIcon-BhCc-35g.js → createSvgIcon-CIAc53Uf.js} +3 -3
  47. package/_assets/{custom-DG1qkiJE.js → custom-CXFEHrtn.js} +1 -1
  48. package/_assets/{data-capture-Ba2U2y5O.js → data-capture-CyNw1tR6.js} +1 -1
  49. package/_assets/disposePreview-8oEf57G7.js +1 -0
  50. package/_assets/{email-Wxqgx6Lj.js → email-BSFpn-mK.js} +1 -1
  51. package/_assets/{embedded-wallet-DR6Si6kV.js → embedded-wallet-DUt0q64F.js} +1 -1
  52. package/_assets/{emotion-styled.browser.esm-Ce_kaTO_.js → emotion-styled.browser.esm-MB_ZnWA0.js} +1 -1
  53. package/_assets/{engine-CT5J10tT.js → engine-CWoVWkrK.js} +1 -1
  54. package/_assets/{errors-BQ78iy4c.js → errors-CspB8iK7.js} +1 -1
  55. package/_assets/{estimate-l1-fee-BWX6n2wW.js → estimate-l1-fee-CctWCWaJ.js} +1 -1
  56. package/_assets/{execute-C6tBpvgs.js → execute-CqdEBDWF.js} +2 -2
  57. package/_assets/{features-BmPELMhg.js → features-1-FLWkh7.js} +1 -1
  58. package/_assets/{fetchTokenMetadata-Mg3wjHG6.js → fetchTokenMetadata-BaQpNTHG.js} +2 -2
  59. package/_assets/{field.styles-5z9eWAwV.js → field.styles-O-FhYRsZ.js} +1 -1
  60. package/_assets/{get-ecosystem-wallet-info-Blc_71v0.js → get-ecosystem-wallet-info-efBvwCgh.js} +1 -1
  61. package/_assets/{getBalance-mM7D97ev.js → getBalance-B6jNJqou.js} +1 -1
  62. package/_assets/{getNFT-zt_0lqjp.js → getNFT-BLha6TEN.js} +1 -1
  63. package/_assets/{getNFT-CbZgRluJ.js → getNFT-CEFWuq38.js} +1 -1
  64. package/_assets/{grid.styles-B1gNJ9t8.js → grid.styles-9axjWKOh.js} +1 -1
  65. package/_assets/{hashTypedData-BmTdbBr7.js → hashTypedData-DRoLgz93.js} +1 -1
  66. package/_assets/{hashTypedData-xC0RrFzF.js → hashTypedData-DU5frjBz.js} +1 -1
  67. package/_assets/{in-app-D6xPBmdK.js → in-app-B7r-w8-I.js} +1 -1
  68. package/_assets/{in-app-wallet-calls-DRD1x_CO.js → in-app-wallet-calls-DikRiAsm.js} +1 -1
  69. package/_assets/{index-B9ZWePj8.js → index--d9L6VlZ.js} +3 -3
  70. package/_assets/{index-p6LU--BY.js → index-B7llCCrg.js} +3 -3
  71. package/_assets/{index-Dtczzkr-.js → index-BLcuFifQ.js} +1 -1
  72. package/_assets/{index-Cu7cZeif.js → index-BMoopm2-.js} +1 -1
  73. package/_assets/{index-C1UOaaoO.js → index-BReAWJ34.js} +1 -1
  74. package/_assets/{index-D-lT6ZHp.js → index-BTadlrEf.js} +1 -1
  75. package/_assets/{index-GiJ7q8m3.js → index-BVyKLj9g.js} +1 -1
  76. package/_assets/{index-8jpO9R0L.js → index-BWwETmQE.js} +1 -1
  77. package/_assets/{index-BnRijaO7.js → index-Bfbnmm19.js} +2 -2
  78. package/_assets/{index-dwg60Gnv.js → index-BgabQb2i.js} +1 -1
  79. package/_assets/{index-pNEW50qZ.js → index-Bggu5dcK.js} +1 -1
  80. package/_assets/{index-CFCPlMvn.js → index-BkzAB4dC.js} +1 -1
  81. package/_assets/{index-CrA-gT12.js → index-BlFmY0PY.js} +2 -2
  82. package/_assets/{index-Cx2Xs8TS.js → index-BvC5hvQr.js} +1 -1
  83. package/_assets/{index-CVRID3Zs.js → index-Bw8RegM3.js} +1 -1
  84. package/_assets/{index-DmJ1WEe8.js → index-ByXn6qsZ.js} +1 -1
  85. package/_assets/{index-BQt-UtVW.js → index-C2dqHPFe.js} +1 -1
  86. package/_assets/{index-Cqx_iE06.js → index-C2gCqG5-.js} +1 -1
  87. package/_assets/{index-CakvWn8X.js → index-C5Q9tbiE.js} +2 -2
  88. package/_assets/{index-BG_zxl6p.js → index-C7mQXKdO.js} +1 -1
  89. package/_assets/{index-Ds0nhWl1.js → index-CIuQobaT.js} +1 -1
  90. package/_assets/{index-DzF05fXw.js → index-CKY-zq6_.js} +1 -1
  91. package/_assets/{index-AUd3llLa.js → index-CMFFdWaD.js} +3 -3
  92. package/_assets/{index-B47z7qMq.js → index-COXs6Mhj.js} +1 -1
  93. package/_assets/{index-Qgfkcf-Z.js → index-CSMohmqH.js} +1 -1
  94. package/_assets/{index-D6orrgpK.js → index-CaO4BbgL.js} +1 -1
  95. package/_assets/{index-CxFaiS6B.js → index-Cgl5oOLN.js} +1 -1
  96. package/_assets/{index-CYAsq_LJ.js → index-D4Z2JmNT.js} +1 -1
  97. package/_assets/{index-HfSTYCId.js → index-DDKTVZmj.js} +1 -1
  98. package/_assets/{index-Cpx6YfS5.js → index-DLLktYWt.js} +1 -1
  99. package/_assets/{index-Db5yIiwQ.js → index-DPQIOv9u.js} +1 -1
  100. package/_assets/{index-By7h7Ees.js → index-DR68c_Xf.js} +1 -1
  101. package/_assets/{index-DUxAD7Ds.js → index-DZlNnXl_.js} +2 -2
  102. package/_assets/{index-B3IuheKM.js → index-D_FVnuvd.js} +1 -1
  103. package/_assets/{index-CXdifgIh.js → index-Dcv3uBNj.js} +1 -1
  104. package/_assets/{index-SH2zEbyV.js → index-DkxuiR0U.js} +1 -1
  105. package/_assets/{index-CdIpnfG_.js → index-DrK9O1Pz.js} +1 -1
  106. package/_assets/index-DvGpQtXK.js +3378 -0
  107. package/_assets/{index-D56APiYW.js → index-Iv9CW07E.js} +1 -1
  108. package/_assets/{index-4odeU1-q.js → index-KGamvf3R.js} +8 -8
  109. package/_assets/{index-C2GswxH6.js → index-KzbPGO4w.js} +1 -1
  110. package/_assets/{index-DqLl5DCg.js → index-LuVJpw9c.js} +1 -1
  111. package/_assets/{index-CRwuFsYT.js → index-XPa69X9v.js} +1 -1
  112. package/_assets/{index-GeaRFVYH.js → index-Y3M9UhW1.js} +3 -3
  113. package/_assets/{index-xhul-9iX.js → index-Zvh0r5Lt.js} +1 -1
  114. package/_assets/{index-nBe_oU0G.js → index-cPbHgYyr.js} +1 -1
  115. package/_assets/{index-CgAxepZC.js → index-fUWjTMSy.js} +1 -1
  116. package/_assets/{index--2hu34yL.js → index-kngovSRn.js} +1 -1
  117. package/_assets/{index-Dmg93p28.js → index-rSQnRqcs.js} +1 -1
  118. package/_assets/{index-Bmjy2mpL.js → index-uRRgUqn2.js} +1 -1
  119. package/_assets/{index-MmMSnATW.js → index-xqlURRt6.js} +1 -1
  120. package/_assets/{index-eU7Hyz9Z.js → index-z_VEn6An.js} +1 -1
  121. package/_assets/{index.es-DHidcgy5.js → index.es-ClGX6azd.js} +1 -1
  122. package/_assets/{index.es-Cn1zNa1z.js → index.es-DEd0yiWT.js} +4 -4
  123. package/_assets/{index.es-GVwle0q7.js → index.es-DUY_zrrQ.js} +1 -1
  124. package/_assets/{localBatchGatewayRequest-VWgW7Rrx.js → localBatchGatewayRequest-DN2xsMJ_.js} +1 -1
  125. package/_assets/{networks-CDvdXnK2.js → networks-CDFMzeLC.js} +1 -1
  126. package/_assets/{onramp-DLXpeqxV.js → onramp-BW3vCZnx.js} +1 -1
  127. package/_assets/{openzeppelin-F7uG1PQF.js → openzeppelin-CUcdj_sx.js} +1 -1
  128. package/_assets/{parseNft-D-HVZytL.js → parseNft-G6_xBphx.js} +2 -2
  129. package/_assets/{parseSignature-Ck0-hAYX.js → parseSignature-CIXTBJVX.js} +1 -1
  130. package/_assets/{parseSignature-Bajk-MJ2.js → parseSignature-DRZnwzny.js} +3 -3
  131. package/_assets/{passkeys-DTp9eXzY.js → passkeys-Kq30ZnPW.js} +1 -1
  132. package/_assets/{pay-with-exchange-B7T027Na.js → pay-with-exchange-wv1lVt88.js} +1 -1
  133. package/_assets/{qr-overlay-D24Rmf2y.js → qr-overlay-BNvjvuvd.js} +1 -1
  134. package/_assets/{receive-Dpi-pR18.js → receive-BU-20CjU.js} +1 -1
  135. package/_assets/{resolveImplementation-zRiJR6hj.js → resolveImplementation-C-p0Txrw.js} +1 -1
  136. package/_assets/{rpc-DBs1enVe.js → rpc-D0gBTa6Z.js} +1 -1
  137. package/_assets/{secp256k1-DlBFD_9l.js → secp256k1-B3k0VS5Y.js} +1 -1
  138. package/_assets/{secp256k1-CFlVBTcQ.js → secp256k1-C_-lAZcz.js} +1 -1
  139. package/_assets/{secp256k1-D988VQxR.js → secp256k1-YCpzKzUb.js} +1 -1
  140. package/_assets/{send-C--S0H3a.js → send-BRaIAbAO.js} +1 -1
  141. package/_assets/{send-batch-transaction-BsTouWWn.js → send-batch-transaction-Bab8Fd2d.js} +1 -1
  142. package/_assets/{send-eip712-transaction-CVPyso6U.js → send-eip712-transaction-CKAs5XET.js} +2 -2
  143. package/_assets/{send-gasless-transaction-B_ncM11b.js → send-gasless-transaction-CiFZmQQQ.js} +2 -2
  144. package/_assets/{send-transaction-CQNEiR4D.js → send-transaction-DOvrVTQH.js} +2 -2
  145. package/_assets/{sendMetaTransaction-BkMNQLKq.js → sendMetaTransaction-D69U0yOu.js} +1 -1
  146. package/_assets/{sendRawTransaction-eF-4-IOR.js → sendRawTransaction-Cnl8KhyZ.js} +3 -3
  147. package/_assets/{serializeTransaction-E8IX_hjf.js → serializeTransaction--73AW1zM.js} +1 -1
  148. package/_assets/{session-proposal-B5Vbxh9X.js → session-proposal-DYdwdKre.js} +1 -1
  149. package/_assets/{session-request-YtoGiiaC.js → session-request-Dme0ul41.js} +2 -2
  150. package/_assets/{signing-ChPpUSja.js → signing-Bd3rbnSj.js} +3 -3
  151. package/_assets/{socials-OPF-4Wmw.js → socials-VohiP86p.js} +1 -1
  152. package/_assets/{styled-CI0T6-yj.js → styled-CvsbVgfF.js} +2 -2
  153. package/_assets/{swaps-D9XgTxrT.js → swaps-DKu-ROps.js} +1 -1
  154. package/_assets/{thirdweb-CJavbJGB.js → thirdweb-BMXspv9l.js} +3 -3
  155. package/_assets/{to-serializable-transaction-Capw1hGa.js → to-serializable-transaction-CX8P98IC.js} +2 -2
  156. package/_assets/{trade-encoding-CS-l5HWK.js → trade-encoding-BD8tpz7m.js} +1 -1
  157. package/_assets/{transactionReceipt-DoRy-YCC.js → transactionReceipt-C3xmpECX.js} +1 -1
  158. package/_assets/{transactions-DlPEEm5e.js → transactions-8lwN2rpf.js} +1 -1
  159. package/_assets/{useCreditPacks-_PiP2Q_K.js → useCreditPacks-B-QtC7sA.js} +1 -1
  160. package/_assets/{useImportable-Dur9WNgJ.js → useImportable-zF3kPKFU.js} +1 -1
  161. package/_assets/{useInfiniteGrid-OWa5mJdJ.js → useInfiniteGrid-Drc6luef.js} +1 -1
  162. package/_assets/{useTheme-DpoJyopi.js → useTheme-BXrN5D9V.js} +1 -1
  163. package/_assets/{verifyHash-BZZQrCdK.js → verifyHash-B5Ov596i.js} +1 -1
  164. package/_assets/{w3m-modal-BurrNe_2.js → w3m-modal-BfUiYkFq.js} +1 -1
  165. package/_assets/{w3m-modal-DVcmDyvT.js → w3m-modal-BiPLqXgA.js} +1 -1
  166. package/_assets/{wait-for-tx-receipt-DABDEQLt.js → wait-for-tx-receipt-DZxMxn7p.js} +1 -1
  167. package/_assets/{wallets-DsQIZNUu.js → wallets-ZPwMzIt3.js} +5 -5
  168. package/_assets/{web-connector-CBr7K2EN.js → web-connector-Dsb7R1Dr.js} +3 -3
  169. package/_assets/{writeContract-Clw7zVob.js → writeContract-BLACgB36.js} +1 -1
  170. package/_assets/{zoraTestnet-Dofh77OY.js → zoraTestnet-BCAU7V7m.js} +1 -1
  171. package/index.html +22 -12
  172. package/package.json +2 -2
  173. package/sitemap.xml +7 -6
  174. package/_assets/Creator-CVJd5TOb.js +0 -306
  175. package/_assets/ItemDetail-CacEb2nn.js +0 -3392
  176. package/_assets/LazyEmoteControls-DOn7IxHq.js +0 -2
  177. package/_assets/OutfitDetail-CSx4d1E1.js +0 -334
  178. package/_assets/builder-dRN2Kgse.js +0 -1
  179. package/_assets/disposePreview-DIA1G1eQ.js +0 -1
  180. package/_assets/index-CpUnpBQ7.js +0 -3378
@@ -1,4 +1,4 @@
1
- import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bk as ee,W as te,y as z,bl as ae,bm as oe,I as ie,d as a,c as re,A as se,n as ne,q as ce,e as le,ai as F,aj as de,bn as pe,bo as xe}from"./index-CpUnpBQ7.js";import{E as me}from"./ErrorNotice-BEc3g8r8.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-DaKP3DX-.js";import{S as L,C as je,F as ye,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-2VrlGaC_.js";import{L as Ae}from"./LoadMore-CC_UzQ34.js";import{u as Pe}from"./useInfiniteGrid-OWa5mJdJ.js";import{G as Se}from"./grid.styles-B1gNJ9t8.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Me=s.section`
1
+ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bm as ee,W as te,y as z,bn as ae,bo as oe,I as ie,d as a,c as re,A as se,n as ne,q as ce,e as le,ak as F,al as de,bp as pe,bq as xe}from"./index-DvGpQtXK.js";import{E as me}from"./ErrorNotice-MWF7JXST.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-Cqc0qEsV.js";import{S as L,C as ye,F as je,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-B-ttqFdP.js";import{L as Ae}from"./LoadMore-CIWThu0V.js";import{u as Pe}from"./useInfiniteGrid-Drc6luef.js";import{G as Se}from"./grid.styles-9axjWKOh.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Me=s.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;
@@ -116,7 +116,7 @@ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bk
116
116
  background: ${c.accent};
117
117
  color: ${c.white};
118
118
  }
119
- `;function _e({address:o}){var v,l;const{data:t}=te(o),[n,d]=h.useState(!1);if(!o)return null;const p=(t==null?void 0:t.name)||z(o),u=(l=(v=t==null?void 0:t.avatar)==null?void 0:v.snapshots)==null?void 0:l.face256,g=`${re.profileUrl}/${o}`,f=ae(oe({name:t==null?void 0:t.name,hasClaimedName:t==null?void 0:t.hasClaimedName,ethAddress:(t==null?void 0:t.ethAddress)??o}));async function x(){try{await navigator.clipboard.writeText(o),d(!0),window.setTimeout(()=>d(!1),1500)}catch(y){se(y,{flow:"copy_creator_address"})}}return e.jsxs(Le,{"data-testid":"creator-card",children:[u?e.jsx(B,{src:u,alt:"",loading:"eager",style:{backgroundColor:f}}):e.jsx(B,{as:"span","aria-hidden":!0,style:{backgroundColor:f}}),e.jsx(Be,{title:p,children:p}),e.jsxs(Ie,{type:"button",onClick:()=>void x(),title:n?a("collection.copied"):a("collection.copyAddress"),"aria-label":n?a("collection.copied"):a("collection.copyAddress"),children:[e.jsx("span",{children:z(o)}),e.jsx(ie,{name:"copy",size:16})]}),e.jsx(We,{"data-testid":"creator-card-view",href:g,target:"_blank",rel:"noopener noreferrer",children:a("collection.viewProfile")})]})}const{colors:Ge,media:$}=b,He=s.div`
119
+ `;function _e({address:o}){var v,l;const{data:t}=te(o),[n,d]=h.useState(!1);if(!o)return null;const p=(t==null?void 0:t.name)||z(o),u=(l=(v=t==null?void 0:t.avatar)==null?void 0:v.snapshots)==null?void 0:l.face256,g=`${re.profileUrl}/${o}`,f=ae(oe({name:t==null?void 0:t.name,hasClaimedName:t==null?void 0:t.hasClaimedName,ethAddress:(t==null?void 0:t.ethAddress)??o}));async function x(){try{await navigator.clipboard.writeText(o),d(!0),window.setTimeout(()=>d(!1),1500)}catch(j){se(j,{flow:"copy_creator_address"})}}return e.jsxs(Le,{"data-testid":"creator-card",children:[u?e.jsx(B,{src:u,alt:"",loading:"eager",style:{backgroundColor:f}}):e.jsx(B,{as:"span","aria-hidden":!0,style:{backgroundColor:f}}),e.jsx(Be,{title:p,children:p}),e.jsxs(Ie,{type:"button",onClick:()=>void x(),title:n?a("collection.copied"):a("collection.copyAddress"),"aria-label":n?a("collection.copied"):a("collection.copyAddress"),children:[e.jsx("span",{children:z(o)}),e.jsx(ie,{name:"copy",size:16})]}),e.jsx(We,{"data-testid":"creator-card-view",href:g,target:"_blank",rel:"noopener noreferrer",children:a("collection.viewProfile")})]})}const{colors:qe,media:$}=b,Ge=s.div`
120
120
  position: relative;
121
121
  display: flex;
122
122
  gap: 32px;
@@ -125,14 +125,14 @@ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bk
125
125
  ${$.maxWidth("lg")} {
126
126
  display: block;
127
127
  }
128
- `,Ue=s.div`
128
+ `,He=s.div`
129
129
  flex: 1;
130
130
  min-width: 0;
131
131
 
132
132
  ${$.maxWidth("lg")} {
133
133
  width: 100%;
134
134
  }
135
- `,qe=s.aside`
135
+ `,Ue=s.aside`
136
136
  flex: none;
137
137
  width: 265px;
138
138
 
@@ -146,7 +146,7 @@ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bk
146
146
  width: 100%;
147
147
  max-height: 88vh;
148
148
  border-radius: 16px 16px 0 0;
149
- background: ${Ge.white};
149
+ background: ${qe.white};
150
150
  padding: 0 16px;
151
151
  overflow-y: auto;
152
152
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
@@ -159,4 +159,4 @@ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bk
159
159
  visibility: visible;
160
160
  }
161
161
  }
162
- `,Ye=48;function it(){var T;const{contractAddress:o}=J(),t=X(),[n,d]=h.useState("wearable"),[p,u]=h.useState(null),[g,f]=h.useState([]),[x,v]=h.useState(""),[l,y]=h.useState(""),[k,W]=h.useState("newest"),N=x&&!Number.isNaN(Number(x))?Number(x):void 0,A=l&&!Number.isNaN(Number(l))?Number(l):void 0,_=p?Ne[p]:void 0,G=(L.find(i=>i.key===k)??L[0]).server,P={category:n,rarities:g.length?g:void 0,wearableCategories:_,minPriceCredits:N,maxPriceCredits:A,sortBy:G},{items:j,total:H,isLoading:w,error:S,hasNextPage:U,isFetchingNextPage:M,isFetchNextPageError:q,fetchNextPage:Y}=Pe(["collection-page",o,P],i=>pe(o,{...P,first:Ye,skip:i}),{enabled:!!o}),{data:r}=ne({queryKey:["collection-meta",o],queryFn:()=>xe(o),enabled:!!o,staleTime:5*6e4}),E=(r==null?void 0:r.name)||a("collection.fallbackTitle");ce({title:r==null?void 0:r.name,description:r!=null&&r.name?a("seo.collection.description",{name:r.name}):void 0});const R=(r==null?void 0:r.creator)||((T=j[0])==null?void 0:T.creator);function K(i){d(i),u(null)}function D(i){f(m=>m.includes(i)?m.filter(Z=>Z!==i):[...m,i])}function O(){d("wearable"),u(null),f([]),v(""),y("")}const C=!!(N||A),Q=C?`${x||"0"}–${l||"∞"}`:a("filter.price"),V=n!=="wearable"||!!p||g.length>0||C;return e.jsxs(ue,{"data-testid":"collection-page",children:[e.jsxs(ge,{"aria-label":a("collection.breadcrumbAria"),children:[e.jsx(be,{onClick:()=>t("/items"),children:a("collection.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(fe,{children:E})]}),e.jsx(Fe,{name:E,creator:R}),e.jsxs(He,{"data-testid":"browse",children:[e.jsxs(qe,{"data-testid":"browse-sidebar",children:[e.jsx(_e,{address:R}),e.jsx(je,{category:n,subCategory:p,onCategory:K,onSub:u,title:a("collection.category"),flat:!0})]}),e.jsxs(Ue,{children:[!w&&j.length>0?e.jsx(ve,{items:j,source:"collection"}):null,e.jsx(ye,{rarities:g,onToggleRarity:D,sort:k,onSort:W,total:H,loading:w,anyActive:V,onClear:O,renderTrailing:i=>e.jsx(we,{panelKey:"price",label:Q,active:C,panel:i,children:e.jsxs(Ce,{"data-variant":"price",children:[e.jsxs($e,{children:[e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMin"),placeholder:a("collection.priceMinPlaceholder"),value:x,onChange:m=>v(m.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMax"),placeholder:a("collection.priceMaxPlaceholder"),value:l,onChange:m=>y(m.target.value)})]}),e.jsx(ke,{children:a("collection.priceHint",{currency:le.name})})]})})}),S?e.jsx(me,{message:a("collection.error")}):null,e.jsx(Se,{"data-testid":"grid",children:w?e.jsx(F,{count:15}):e.jsxs(e.Fragment,{children:[j.map(i=>e.jsx(de,{item:i},i.id)),M?e.jsx(F,{count:6}):null]})}),e.jsx(Ae,{hasNextPage:U,isFetching:M,isError:q,onLoadMore:()=>void Y()}),!w&&!S&&j.length===0?e.jsx("p",{className:"muted",children:a("collection.empty")}):null]})]})]})}export{it as Collection,it as default};
162
+ `,Ye=48;function it(){var T;const{contractAddress:o}=J(),t=X(),[n,d]=h.useState("wearable"),[p,u]=h.useState(null),[g,f]=h.useState([]),[x,v]=h.useState(""),[l,j]=h.useState(""),[k,W]=h.useState("newest"),N=x&&!Number.isNaN(Number(x))?Number(x):void 0,A=l&&!Number.isNaN(Number(l))?Number(l):void 0,_=p?Ne[p]:void 0,q=(L.find(i=>i.key===k)??L[0]).server,P={category:n,rarities:g.length?g:void 0,wearableCategories:_,minPriceCredits:N,maxPriceCredits:A,sortBy:q},{items:y,total:G,isLoading:w,error:S,hasNextPage:H,isFetchingNextPage:M,isFetchNextPageError:U,fetchNextPage:Y}=Pe(["collection-page",o,P],i=>pe(o,{...P,first:Ye,skip:i}),{enabled:!!o}),{data:r}=ne({queryKey:["collection-meta",o],queryFn:()=>xe(o),enabled:!!o,staleTime:5*6e4}),E=(r==null?void 0:r.name)||a("collection.fallbackTitle");ce({title:r==null?void 0:r.name,description:r!=null&&r.name?a("seo.collection.description",{name:r.name}):void 0});const R=(r==null?void 0:r.creator)||((T=y[0])==null?void 0:T.creator);function K(i){d(i),u(null)}function D(i){f(m=>m.includes(i)?m.filter(Z=>Z!==i):[...m,i])}function O(){d("wearable"),u(null),f([]),v(""),j("")}const C=!!(N||A),Q=C?`${x||"0"}–${l||"∞"}`:a("filter.price"),V=n!=="wearable"||!!p||g.length>0||C;return e.jsxs(ue,{"data-testid":"collection-page",children:[e.jsxs(ge,{"aria-label":a("collection.breadcrumbAria"),children:[e.jsx(be,{onClick:()=>t("/items"),children:a("collection.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(fe,{children:E})]}),e.jsx(Fe,{name:E,creator:R}),e.jsxs(Ge,{"data-testid":"browse",children:[e.jsxs(Ue,{"data-testid":"browse-sidebar",children:[e.jsx(_e,{address:R}),e.jsx(ye,{category:n,subCategory:p,onCategory:K,onSub:u,title:a("collection.category"),flat:!0})]}),e.jsxs(He,{children:[!w&&y.length>0?e.jsx(ve,{items:y,source:"collection"}):null,e.jsx(je,{rarities:g,onToggleRarity:D,sort:k,onSort:W,total:G,loading:w,anyActive:V,onClear:O,renderTrailing:i=>e.jsx(we,{panelKey:"price",label:Q,active:C,panel:i,children:e.jsxs(Ce,{"data-variant":"price",children:[e.jsxs($e,{children:[e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMin"),placeholder:a("collection.priceMinPlaceholder"),value:x,onChange:m=>v(m.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMax"),placeholder:a("collection.priceMaxPlaceholder"),value:l,onChange:m=>j(m.target.value)})]}),e.jsx(ke,{children:a("collection.priceHint",{currency:le.name})})]})})}),S?e.jsx(me,{message:a("collection.error")}):null,e.jsx(Se,{"data-testid":"grid",children:w?e.jsx(F,{count:15}):e.jsxs(e.Fragment,{children:[y.map(i=>e.jsx(de,{item:i},i.id)),M?e.jsx(F,{count:6}):null]})}),e.jsx(Ae,{hasNextPage:H,isFetching:M,isError:U,onLoadMore:()=>void Y()}),!w&&!S&&y.length===0?e.jsx("p",{className:"muted",children:a("collection.empty")}):null]})]})]})}export{it as Collection,it as default};
@@ -1,4 +1,4 @@
1
- import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as k,ax as j,bF as C,e as G,o as Y,I as Q,A as X,g as W,C as B,a as Z,a1 as J,bP as F,aj as q}from"./index-CpUnpBQ7.js";import{s as ee,i as U,A as H,g as K,r as te,m as ne,c as ae,M as ie,e as oe}from"./authorizations-D_1liO7d.js";import{i as se}from"./errors-BQ78iy4c.js";import{E as re}from"./ErrorNotice-BEc3g8r8.js";import{a as ce}from"./buy-D5A2EHRt.js";import{g as de,a as le}from"./trade-encoding-CS-l5HWK.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-BkMNQLKq.js";import{I as xe,C as ge}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",fe=900*1e3;function dt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function lt(a){let n;try{n=sessionStorage.getItem(R)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(R)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function pt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,m=be(d,n,s);l>=m&&c.push({method:"combined",creditsCents:i,manaWei:m})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,u=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:u}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function ht(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function M(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ut(a,n){return a.options.find(i=>i.method===n)??null}function xt(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",we=e.div`
1
+ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as k,az as j,bH as C,e as G,o as Y,I as Q,A as X,g as W,C as B,a as Z,a3 as J,bR as F,al as q}from"./index-DvGpQtXK.js";import{s as ee,i as H,A as U,g as K,r as te,m as ne,c as ae,M as ie,e as oe}from"./authorizations-CboNrOcr.js";import{i as se}from"./errors-CspB8iK7.js";import{E as re}from"./ErrorNotice-MWF7JXST.js";import{a as ce}from"./buy-BYu3r4d1.js";import{g as de,a as le}from"./trade-encoding-BD8tpz7m.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-D69U0yOu.js";import{I as xe,C as ge}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",fe=900*1e3;function dt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function lt(a){let n;try{n=sessionStorage.getItem(R)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(R)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function pt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,m=be(d,n,s);l>=m&&c.push({method:"combined",creditsCents:i,manaWei:m})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,u=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:u}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function ht(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function M(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ut(a,n){return a.options.find(i=>i.method===n)??null}function xt(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",we=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -289,10 +289,10 @@ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as
289
289
  @media (prefers-reduced-motion: reduce) {
290
290
  animation: none;
291
291
  }
292
- `;function mt({auth:a,signer:n,title:i,reason:s,name:l,image:c,icon:p,onAuthorized:x,onCancel:u,onClose:b}){const[y,w]=v.useState(!1),[d,m]=v.useState(null);async function $(){w(!0),m(null);try{await ee({auth:a,signer:n,active:!0}),x()}catch(h){se(h)?m(f("authorizeStep.errorRejected")):(X(h,{flow:"authorize_step",kind:a.kind}),m(f("authorizeStep.errorGeneric"))),w(!1)}}return t.jsx(ze,{onClick:y?void 0:b,role:"presentation",children:t.jsxs(Ae,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[t.jsxs(We,{children:[t.jsx(Ie,{children:i}),t.jsx(Se,{onClick:b,disabled:y,"aria-label":f("authorizeStep.close"),children:t.jsx(Q,{name:"close",className:"ico"})})]}),t.jsxs(Te,{"data-testid":"authorize-step-row",children:[t.jsx(Ne,{children:c?t.jsx("img",{src:c,alt:""}):p}),t.jsxs(Ee,{children:[t.jsx(Be,{title:l,children:l}),t.jsx(Re,{children:s})]})]}),t.jsx(Le,{children:f("authorizeStep.note")}),t.jsx(re,{message:d}),t.jsxs(Pe,{children:[t.jsx(Fe,{type:"button",onClick:u,disabled:y,children:f("authorizeStep.cancel")}),t.jsx(Ke,{type:"button","data-testid":"authorize-step-action",onClick:()=>void $(),disabled:y,children:y?t.jsxs(t.Fragment,{children:[t.jsx(De,{"aria-hidden":!0}),f("authorizeStep.authorizing")]}):f("authorizeStep.authorize")})]})]})})}async function bt(a){const[n]=await Qe({...a,trades:[a.trade]});return n}async function Qe(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a;if(n.length===0)throw new Error("No items to buy");const c=new Map;for(const x of n){const u=`${x.chainId}:${x.contract.toLowerCase()}`,b=c.get(u);b?b.push(x):c.set(u,[x])}const p=[];for(const x of c.values())p.push(await Ue({trades:x,buyer:i,signer:s,onSigned:l}));return p}async function Ue(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a,c=n[0],p=W(Z(c.contract),c.chainId),x=W(B.MANAToken,c.chainId);await U({auth:{kind:H.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:c.chainId},signer:s});const u=n.map(d=>de(d,i));if(K.enabled)try{const d=new xe(p.abi).encodeFunctionData("accept",[u]),m=te(),$=ne(s.provider,m),h=await pe($,m,d,p,{serverURL:K.relayerUrl});return l==null||l(),await ae(h,"the MANA purchase"),h}catch(d){if(d instanceof he&&d.code===ue.USER_DENIED||d instanceof ie)throw d;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",d)}await oe(s.provider,c.chainId);const y=await new ge(p.address,p.abi,s).accept(u,le(c.chainId));return l==null||l(),(await y.wait()).transactionHash}async function yt(a){const{trade:n,buyer:i,signer:s,credits:l,manaGapWei:c,onBroadcast:p,onReverted:x}=a;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(c<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const u=W(B.MANAToken,n.chainId),b=W(B.CreditsManager,n.chainId);await U({auth:{kind:H.Allowance,contractAddress:u.address,spenderAddress:b.address,chainId:n.chainId},signer:s});const w=(l.reduce((d,m)=>d+BigInt(m.availableAmount),0n)+c).toString();return ce({trade:n,buyer:i,signer:s,credits:l,maxCreditedValue:w,onBroadcast:p,onReverted:x})}function wt(a){return t.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...a,children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function vt(a){return t.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,...a,children:[t.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),t.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),t.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]})}const{colors:r,gradients:O,radius:V,z:He}=o,kt=e.div`
292
+ `;function mt({auth:a,signer:n,title:i,reason:s,name:l,image:c,icon:p,onAuthorized:x,onCancel:u,onClose:b}){const[y,w]=v.useState(!1),[d,m]=v.useState(null);async function $(){w(!0),m(null);try{await ee({auth:a,signer:n,active:!0}),x()}catch(h){se(h)?m(f("authorizeStep.errorRejected")):(X(h,{flow:"authorize_step",kind:a.kind}),m(f("authorizeStep.errorGeneric"))),w(!1)}}return t.jsx(ze,{onClick:y?void 0:b,role:"presentation",children:t.jsxs(Ae,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[t.jsxs(We,{children:[t.jsx(Ie,{children:i}),t.jsx(Se,{onClick:b,disabled:y,"aria-label":f("authorizeStep.close"),children:t.jsx(Q,{name:"close",className:"ico"})})]}),t.jsxs(Te,{"data-testid":"authorize-step-row",children:[t.jsx(Ne,{children:c?t.jsx("img",{src:c,alt:""}):p}),t.jsxs(Ee,{children:[t.jsx(Be,{title:l,children:l}),t.jsx(Re,{children:s})]})]}),t.jsx(Le,{children:f("authorizeStep.note")}),t.jsx(re,{message:d}),t.jsxs(Pe,{children:[t.jsx(Fe,{type:"button",onClick:u,disabled:y,children:f("authorizeStep.cancel")}),t.jsx(Ke,{type:"button","data-testid":"authorize-step-action",onClick:()=>void $(),disabled:y,children:y?t.jsxs(t.Fragment,{children:[t.jsx(De,{"aria-hidden":!0}),f("authorizeStep.authorizing")]}):f("authorizeStep.authorize")})]})]})})}async function bt(a){const[n]=await Qe({...a,trades:[a.trade]});return n}async function Qe(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a;if(n.length===0)throw new Error("No items to buy");const c=new Map;for(const x of n){const u=`${x.chainId}:${x.contract.toLowerCase()}`,b=c.get(u);b?b.push(x):c.set(u,[x])}const p=[];for(const x of c.values())p.push(await He({trades:x,buyer:i,signer:s,onSigned:l}));return p}async function He(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a,c=n[0],p=W(Z(c.contract),c.chainId),x=W(B.MANAToken,c.chainId);await H({auth:{kind:U.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:c.chainId},signer:s});const u=n.map(d=>de(d,i));if(K.enabled)try{const d=new xe(p.abi).encodeFunctionData("accept",[u]),m=te(),$=ne(s.provider,m),h=await pe($,m,d,p,{serverURL:K.relayerUrl});return l==null||l(),await ae(h,"the MANA purchase"),h}catch(d){if(d instanceof he&&d.code===ue.USER_DENIED||d instanceof ie)throw d;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",d)}await oe(s.provider,c.chainId);const y=await new ge(p.address,p.abi,s).accept(u,le(c.chainId));return l==null||l(),(await y.wait()).transactionHash}async function yt(a){const{trade:n,buyer:i,signer:s,credits:l,manaGapWei:c,onBroadcast:p,onReverted:x}=a;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(c<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const u=W(B.MANAToken,n.chainId),b=W(B.CreditsManager,n.chainId);await H({auth:{kind:U.Allowance,contractAddress:u.address,spenderAddress:b.address,chainId:n.chainId},signer:s});const w=(l.reduce((d,m)=>d+BigInt(m.availableAmount),0n)+c).toString();return ce({trade:n,buyer:i,signer:s,credits:l,maxCreditedValue:w,onBroadcast:p,onReverted:x})}function wt(a){return t.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...a,children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function vt(a){return t.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,...a,children:[t.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),t.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),t.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]})}const{colors:r,gradients:O,radius:V,z:Ue}=o,kt=e.div`
293
293
  position: fixed;
294
294
  inset: 0;
295
- z-index: ${He.overlay};
295
+ z-index: ${Ue.overlay};
296
296
  display: flex;
297
297
  overflow-y: auto;
298
298
  padding: 20px;
@@ -458,10 +458,10 @@ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as
458
458
  & b {
459
459
  font-weight: 700;
460
460
  }
461
- `,Ut=e.div`
461
+ `,Ht=e.div`
462
462
  display: flex;
463
463
  gap: 12px;
464
- `,Ht=e.button`
464
+ `,Ut=e.button`
465
465
  flex: 1;
466
466
  height: 109px;
467
467
  border: 1px solid ${r.muted2};
@@ -801,4 +801,4 @@ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as
801
801
  opacity: 1;
802
802
  transform: scale(1.1);
803
803
  }
804
- `;function ln({title:a,items:n,onViewAll:i}){const s=v.useRef(null),[l,c]=v.useState(1),[p,x]=v.useState(0),[u,b]=v.useState(!0),[y,w]=v.useState(!1),d=v.useCallback(()=>{const h=s.current;if(!h)return;const{scrollLeft:g,scrollWidth:L,clientWidth:S}=h,P=Math.max(1,Math.ceil(L/S));c(P),x(Math.min(P-1,Math.round(g/S))),b(g<=1),w(g+S>=L-1)},[]);if(v.useEffect(()=>{d();const h=s.current;if(h)return h.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{h.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[d,n.length]),n.length===0)return null;function m(h){const g=s.current;g&&g.scrollBy({left:h*g.clientWidth,behavior:"smooth"})}function $(h){const g=s.current;g&&g.scrollTo({left:h*g.clientWidth,behavior:"smooth"})}return t.jsxs(_e,{children:[t.jsxs(Oe,{children:[t.jsx(Ve,{children:a}),i?t.jsxs(Ge,{onClick:i,children:[f("collectionCarousel.viewAll"),t.jsx(Ye,{name:"chevron-down",size:16})]}):null]}),t.jsxs(Xe,{children:[t.jsx(D,{"data-side":"left",onClick:()=>m(-1),"aria-label":f("collectionCarousel.scrollLeft"),disabled:u,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})}),t.jsx(Ze,{ref:s,children:n.map(h=>t.jsx(q,{item:h},h.id))}),t.jsx(D,{"data-side":"right",onClick:()=>m(1),"aria-label":f("collectionCarousel.scrollRight"),disabled:y,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?t.jsx(Je,{"aria-label":f("collectionCarousel.pages"),children:Array.from({length:l}).map((h,g)=>t.jsx(qe,{"data-active":g===p||void 0,"aria-label":f("collectionCarousel.goToPage",{page:g+1}),"aria-current":g===p?"true":void 0,onClick:()=>$(g)},g))}):null]})}export{M as $,Et as A,Wt as B,jt as C,Ot as D,Vt as E,Gt as F,Yt as G,Ct as H,Xt as I,Zt as J,pt as K,en as L,kt as M,lt as N,ln as O,gt as P,mt as Q,T as R,$t as S,zt as T,dt as U,ft as V,Dt as W,At as X,Qe as Y,ht as Z,be as _,Mt as a,cn as a0,dn as a1,bt as a2,ut as a3,yt as a4,wt as b,It as c,St as d,Tt as e,Nt as f,tn as g,nn as h,an as i,Jt as j,qt as k,on as l,xt as m,sn as n,rn as o,vt as p,Qt as q,Bt as r,Rt as s,Lt as t,Pt as u,Ft as v,Kt as w,Ut as x,Ht as y,_t as z};
804
+ `;function ln({title:a,items:n,onViewAll:i}){const s=v.useRef(null),[l,c]=v.useState(1),[p,x]=v.useState(0),[u,b]=v.useState(!0),[y,w]=v.useState(!1),d=v.useCallback(()=>{const h=s.current;if(!h)return;const{scrollLeft:g,scrollWidth:L,clientWidth:S}=h,P=Math.max(1,Math.ceil(L/S));c(P),x(Math.min(P-1,Math.round(g/S))),b(g<=1),w(g+S>=L-1)},[]);if(v.useEffect(()=>{d();const h=s.current;if(h)return h.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{h.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[d,n.length]),n.length===0)return null;function m(h){const g=s.current;g&&g.scrollBy({left:h*g.clientWidth,behavior:"smooth"})}function $(h){const g=s.current;g&&g.scrollTo({left:h*g.clientWidth,behavior:"smooth"})}return t.jsxs(_e,{children:[t.jsxs(Oe,{children:[t.jsx(Ve,{children:a}),i?t.jsxs(Ge,{onClick:i,children:[f("collectionCarousel.viewAll"),t.jsx(Ye,{name:"chevron-down",size:16})]}):null]}),t.jsxs(Xe,{children:[t.jsx(D,{"data-side":"left",onClick:()=>m(-1),"aria-label":f("collectionCarousel.scrollLeft"),disabled:u,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})}),t.jsx(Ze,{ref:s,children:n.map(h=>t.jsx(q,{item:h},h.id))}),t.jsx(D,{"data-side":"right",onClick:()=>m(1),"aria-label":f("collectionCarousel.scrollRight"),disabled:y,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?t.jsx(Je,{"aria-label":f("collectionCarousel.pages"),children:Array.from({length:l}).map((h,g)=>t.jsx(qe,{"data-active":g===p||void 0,"aria-label":f("collectionCarousel.goToPage",{page:g+1}),"aria-current":g===p?"true":void 0,onClick:()=>$(g)},g))}):null]})}export{M as $,Et as A,Wt as B,jt as C,Ot as D,Vt as E,Gt as F,Yt as G,Ct as H,Xt as I,Zt as J,pt as K,en as L,kt as M,lt as N,ln as O,gt as P,mt as Q,T as R,$t as S,zt as T,dt as U,ft as V,Dt as W,At as X,Qe as Y,ht as Z,be as _,Mt as a,cn as a0,dn as a1,bt as a2,ut as a3,yt as a4,wt as b,It as c,St as d,Tt as e,Nt as f,tn as g,nn as h,an as i,Jt as j,qt as k,on as l,xt as m,sn as n,rn as o,vt as p,Qt as q,Bt as r,Rt as s,Lt as t,Pt as u,Ft as v,Kt as w,Ht as x,Ut as y,_t as z};
@@ -0,0 +1,306 @@
1
+ import{d as me,j as e,L as Le,u as Ae,e as Ie,r as f}from"./react-DehiWSvs.js";import{t as xe,G as Re,J as ee,H as te,s,bI as Me,ay as ze,bJ as Be,d as o,bK as _e,bL as oe,B as Te,af as ue,W as pe,bm as We,k as De,y as ge,bt as Ge,bn as Oe,bo as Ke,I as re,c as He,q as Ue,n as qe,ag as Ve,ak as A,al as ie,bM as se,bN as Je}from"./index-DvGpQtXK.js";import{d as Qe,P as Ye,C as Ze,a as Xe,b as et,A as tt,c as ot,e as rt}from"./collectionPage.styles-Cqc0qEsV.js";import{g as it,h as st,i as at,j as nt,k as lt,C as ct,l as dt,o as ht,m as mt,n as xt,M as ut,E as pt,p as gt,q as ft,r as bt,s as wt,t as vt}from"./Assets.styles-BjdmDuEG.js";import{S as ae,R as jt,F as yt,e as Ct}from"./categories-B-ttqFdP.js";import{L as ne}from"./LoadMore-CIWThu0V.js";import{u as le}from"./useInfiniteGrid-Drc6luef.js";import{E as W}from"./ErrorNotice-MWF7JXST.js";import{G as ce}from"./grid.styles-9axjWKOh.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./Tooltip-jfo7edQn.js";function kt(r){const{gridLoading:i,gridError:a,gridCount:n,baselinePending:l,baselineError:c,baselineCount:m}=r;return i?"skeletons":a?"error":n>0?"items":l?"skeletons":c?"error":m===0?"no-creations":"filters"}const{colors:b,radius:fe,media:$t}=xe,St=s.article`
2
+ height: 300px;
3
+ background: ${b.bg};
4
+ border-radius: ${fe.card};
5
+ overflow: hidden;
6
+ position: relative;
7
+ isolation: isolate;
8
+ display: flex;
9
+ flex-direction: column;
10
+ cursor: pointer;
11
+ transition: box-shadow 0.15s ease;
12
+
13
+ &::after {
14
+ ${Re};
15
+ }
16
+
17
+ &:focus-visible {
18
+ ${ee};
19
+ }
20
+ &:focus-visible::after {
21
+ ${te};
22
+ }
23
+
24
+ // The swap is a pointer affordance only: keyboard focus must not hide the creator row, whose profile
25
+ // link is focusable (visibility: hidden would drop it from the tab order). Enter/Space on the card
26
+ // already opens the collection.
27
+ @media (hover: hover) {
28
+ &:hover {
29
+ ${ee};
30
+ }
31
+ &:hover::after {
32
+ ${te};
33
+ }
34
+ &:hover [data-view] {
35
+ visibility: visible;
36
+ }
37
+ &:hover [data-meta] {
38
+ visibility: hidden;
39
+ }
40
+ }
41
+ `,Nt=s.div`
42
+ position: relative;
43
+ flex: 1;
44
+ min-height: 0;
45
+ background: ${b.media};
46
+ overflow: hidden;
47
+ `,Pt=s.img`
48
+ width: 100%;
49
+ height: 100%;
50
+ object-fit: cover;
51
+ display: block;
52
+ `,Et=s(Me)`
53
+ & [data-testid='coll-thumb-cell'] img {
54
+ object-fit: contain;
55
+ padding: 10px;
56
+ }
57
+ `,Ft=s.div`
58
+ flex: 0 0 102px;
59
+ height: 102px;
60
+ padding: 12px 14px;
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 8px;
64
+ `,Lt=s.h3`
65
+ margin: 0;
66
+ font-weight: 700;
67
+ font-size: 18px;
68
+ line-height: 1.3;
69
+ color: ${b.text};
70
+ white-space: nowrap;
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+
74
+ ${$t.maxWidth("mobile")} {
75
+ font-size: 16px;
76
+ }
77
+ `,At=s.div`
78
+ flex: 1;
79
+ min-height: 0;
80
+ display: grid;
81
+ grid-template-areas: 'stack';
82
+ align-items: center;
83
+
84
+ & > * {
85
+ grid-area: stack;
86
+ }
87
+ `,It=s.div`
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: space-between;
91
+ gap: 10px;
92
+ `,Rt=s(ze)`
93
+ min-width: 0;
94
+ color: ${b.muted};
95
+
96
+ & [data-avatar] {
97
+ width: 24px;
98
+ height: 24px;
99
+ }
100
+ & [data-testid='creator-name'] {
101
+ font-size: 14px;
102
+ }
103
+ & [data-testid='creator-display'] {
104
+ color: ${b.dclRed};
105
+ font-weight: 700;
106
+ }
107
+ `,Mt=s.span`
108
+ min-width: 0;
109
+ `,zt=s.span`
110
+ flex: none;
111
+ color: ${b.text};
112
+ font-weight: 600;
113
+ font-size: 14px;
114
+ white-space: nowrap;
115
+ `,Bt=s.button`
116
+ visibility: hidden;
117
+ width: 100%;
118
+ height: 44px;
119
+ display: flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ background: ${b.accent};
123
+ color: ${b.softWhite};
124
+ border: 0;
125
+ border-radius: ${fe.btn};
126
+ font-weight: 700;
127
+ font-size: 13px;
128
+ text-transform: uppercase;
129
+ letter-spacing: 0.046em;
130
+ transition: background 0.15s ease;
131
+
132
+ &:hover {
133
+ background: ${b.accentHover};
134
+ }
135
+ &:active {
136
+ background: ${b.accentActive};
137
+ }
138
+ `;function _t({collection:r,cover:i,itemCount:a}){const n=me(),{contractAddress:l,name:c,creator:m}=r,C=i==null||a==null,{data:x}=Be(l,C),v=i==null?(x==null?void 0:x.items)??[]:[],g=a??(x==null?void 0:x.total);function w(){n(`/collection/${l}`)}return e.jsxs(St,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:w,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),w())},children:[e.jsx(Nt,{children:i?e.jsx(Pt,{"data-testid":"coll-card-img",src:i,alt:"",loading:"lazy"}):v.length>0?e.jsx(Et,{items:v,tinted:!1}):null}),e.jsxs(Ft,{children:[e.jsx(Lt,{title:c,children:c}),e.jsxs(At,{children:[e.jsxs(It,{"data-meta":!0,"data-testid":"coll-card-meta",children:[m?e.jsx(Rt,{address:m,linkToProfile:!0}):e.jsx(Mt,{children:" "}),e.jsx(zt,{children:g==null?"…":o("collectionCard.itemCount",{count:g})})]}),e.jsx(Bt,{"data-view":!0,"data-testid":"coll-card-view",onClick:u=>{u.stopPropagation(),w()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})]})}function Tt({address:r,className:i=""}){const a=_e(),n=oe(c=>c.followed.includes(r.toLowerCase())),l=oe(c=>c.toggle);return!a||!r?null:e.jsx(Te,{type:"button",size:"sm",variant:n?"ghost":"outline",className:i||void 0,"data-testid":"follow-button","aria-pressed":n,title:n?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>l(r),children:n?o("creator.following"):o("creator.follow")})}const{colors:y,radius:be,media:j}=xe,we=ue`
139
+ display: inline-flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ height: 44px;
143
+ padding: 0 28px;
144
+ border: 2px solid ${y.white};
145
+ border-radius: ${be.btn};
146
+ background: transparent;
147
+ color: ${y.white};
148
+ font-weight: 600;
149
+ font-size: 13px;
150
+ text-transform: uppercase;
151
+ letter-spacing: 0.046em;
152
+ text-decoration: none;
153
+ `,Wt=s.section`
154
+ position: relative;
155
+ border-radius: ${be.card};
156
+ overflow: hidden;
157
+ margin-bottom: 24px;
158
+ min-height: 360px;
159
+ display: flex;
160
+ align-items: center;
161
+ justify-content: center;
162
+
163
+ && .creator-hero__follow {
164
+ ${we};
165
+ }
166
+ && .creator-hero__follow:hover:not(:disabled) {
167
+ background: rgba(255, 255, 255, 0.14);
168
+ }
169
+
170
+ ${j.maxWidth("mobile")} {
171
+ min-height: 260px;
172
+ }
173
+ `,Dt=s.div`
174
+ position: absolute;
175
+ inset: 0;
176
+ z-index: 0;
177
+ `,Gt=s.img`
178
+ width: 100%;
179
+ height: 100%;
180
+ object-fit: cover;
181
+ display: block;
182
+ `,Ot=s.div`
183
+ position: absolute;
184
+ inset: 0;
185
+ background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
186
+ `,Kt=s.div`
187
+ position: absolute;
188
+ top: 16px;
189
+ right: 16px;
190
+ z-index: 2;
191
+ display: flex;
192
+ align-items: center;
193
+ gap: 8px;
194
+
195
+ ${j.maxWidth("mobile")} {
196
+ top: 12px;
197
+ right: 12px;
198
+ gap: 6px;
199
+ }
200
+ `,ve=ue`
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: center;
204
+ color: ${y.white};
205
+ transition: opacity 0.15s linear;
206
+
207
+ &:hover {
208
+ opacity: 0.8;
209
+ }
210
+ & .ico {
211
+ width: 36px;
212
+ height: 36px;
213
+ }
214
+ ${j.maxWidth("mobile")} {
215
+ & .ico {
216
+ width: 30px;
217
+ height: 30px;
218
+ }
219
+ }
220
+ `,Ht=s.a`
221
+ ${ve};
222
+ `,Ut=s(Le)`
223
+ ${ve};
224
+ width: 32px;
225
+ height: 32px;
226
+ border-radius: 50%;
227
+ border: 2px solid ${y.white};
228
+ transition: background-color 0.15s linear;
229
+
230
+ &:hover {
231
+ opacity: 1;
232
+ background: rgba(255, 255, 255, 0.24);
233
+ }
234
+ & .ico {
235
+ width: 16px;
236
+ height: 16px;
237
+ }
238
+ ${j.maxWidth("mobile")} {
239
+ width: 28px;
240
+ height: 28px;
241
+ & .ico {
242
+ width: 14px;
243
+ height: 14px;
244
+ }
245
+ }
246
+ `,qt=s.div`
247
+ position: relative;
248
+ z-index: 1;
249
+ display: flex;
250
+ flex-direction: column;
251
+ align-items: center;
252
+ text-align: center;
253
+ gap: 24px;
254
+ padding: 32px 20px;
255
+
256
+ ${j.maxWidth("mobile")} {
257
+ padding: 56px 16px 24px;
258
+ }
259
+ `,de=s.img`
260
+ display: block;
261
+ width: 112px;
262
+ height: 112px;
263
+ border-radius: 50%;
264
+ object-fit: cover;
265
+ border: 4px solid ${y.white};
266
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
267
+ background: #ff4bed;
268
+
269
+ ${j.maxWidth("mobile")} {
270
+ width: 88px;
271
+ height: 88px;
272
+ }
273
+ `,Vt=s.h2`
274
+ margin: 0;
275
+ font-size: 18px;
276
+ font-weight: 700;
277
+ color: ${y.white};
278
+ line-height: 1.6;
279
+
280
+ ${j.maxWidth("mobile")} {
281
+ font-size: 16px;
282
+ }
283
+ `,Jt=s.p`
284
+ margin: 0;
285
+ font-size: 15px;
286
+ color: ${y.white};
287
+ line-height: 1.6;
288
+ max-width: 520px;
289
+
290
+ ${j.maxWidth("mobile")} {
291
+ font-size: 14px;
292
+ }
293
+ `,Qt=s.div`
294
+ display: flex;
295
+ align-items: center;
296
+ gap: 12px;
297
+ flex-wrap: wrap;
298
+ justify-content: center;
299
+ `,Yt=s.a`
300
+ ${we};
301
+ transition: background 0.15s ease;
302
+
303
+ &:hover {
304
+ background: rgba(255, 255, 255, 0.14);
305
+ }
306
+ `,Zt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Xt({address:r}){var u,k;const{data:i}=pe(r),{data:a}=We(r),n=De(d=>{var $;return($=d.session)==null?void 0:$.address}),l=!!n&&n.toLowerCase()===r.toLowerCase(),c=(i==null?void 0:i.name)||ge(r),m=(k=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:k.face256,C=(a==null?void 0:a.cover)||Qe,x=a==null?void 0:a.description,v=`${He.profileUrl}/${r}`,g=Ge.filter(d=>a==null?void 0:a.links[d]),w=Oe(Ke({name:i==null?void 0:i.name,hasClaimedName:i==null?void 0:i.hasClaimedName,ethAddress:(i==null?void 0:i.ethAddress)??r}));return e.jsxs(Wt,{"aria-label":`${c} storefront`,children:[e.jsxs(Dt,{children:[e.jsx(Gt,{src:C,alt:"",loading:"eager"}),e.jsx(Ot,{"aria-hidden":!0})]}),(g.length>0||l)&&e.jsxs(Kt,{children:[g.map(d=>e.jsx(Ht,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[d])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${d}`),"aria-label":o(`creator.link.${d}`),children:e.jsx(re,{name:Zt[d]})},d)),l&&e.jsx(Ut,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(re,{name:"pen"})})]}),e.jsxs(qt,{children:[m?e.jsx(de,{src:m,alt:"",loading:"eager",style:{backgroundColor:w}}):e.jsx(de,{as:"span","aria-hidden":!0,style:{backgroundColor:w}}),e.jsxs("div",{children:[e.jsx(Vt,{children:c}),x?e.jsx(Jt,{children:x}):null]}),e.jsxs(Qt,{children:[e.jsx(Yt,{"data-testid":"creator-hero-view",href:v,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Tt,{address:r,className:"creator-hero__follow"})]})]})]})}const he=48;function po(){var Z,X;const{address:r}=Ae(),i=me(),[a]=Ie(),n=a.has("collections"),{data:l}=pe(r),c=(l==null?void 0:l.name)||(r?ge(r):o("creator.fallbackName"));Ue({title:c,description:o("seo.creator.description",{name:c}),image:(X=(Z=l==null?void 0:l.avatar)==null?void 0:Z.snapshots)==null?void 0:X.face256});const[m,C]=f.useState("all"),[x,v]=f.useState(null),[g,w]=f.useState([]),[u,k]=f.useState(""),[d,$]=f.useState(""),[N,I]=f.useState("all"),[R,M]=f.useState(!1),[D,je]=f.useState("newest"),[E,P]=f.useState(!1);f.useEffect(()=>{if(!E)return;const t=T=>{T.key==="Escape"&&P(!1)};document.addEventListener("keydown",t);const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=h}},[E]);const G=u&&!Number.isNaN(Number(u))?Number(u):void 0,O=d&&!Number.isNaN(Number(d))?Number(d):void 0,ye=x?Ct[x]:void 0,Ce=(ae.find(t=>t.key===D)??ae[0]).server,K={creator:r,category:m,rarities:g.length?g:void 0,wearableCategories:ye,minPriceCredits:G,maxPriceCredits:O,isWearableSmart:R||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:Ce},{items:z,total:ke,isLoading:$e,isPlaceholderData:Se,error:H,hasNextPage:Ne,isFetchingNextPage:U,isFetchNextPageError:Pe,fetchNextPage:Ee}=le(["creator-items",K],t=>se({...K,first:he,skip:t}),{enabled:!!r&&!n}),F=qe({queryKey:["creator-item-count",r],queryFn:()=>se({creator:r,first:1}).then(t=>t.total),enabled:!!r}),p=le(["creator-collections",r],t=>Je(r,{first:he,skip:t}).then(h=>({items:h.collections,total:h.total})),{enabled:!!r&&n});function q(t){C(t),v(null),n&&V()}function V(){const t=new URLSearchParams(a);t.delete("collections");const h=t.toString();i({search:h?`?${h}`:""},{replace:!0})}function Fe(){if(n){V();return}const t=new URLSearchParams(a);t.delete("collections");const h=t.toString();i({search:h?`?${h}&collections`:"?collections"},{replace:!0})}function J(t){w(h=>h.includes(t)?h.filter(T=>T!==t):[...h,t])}function Q(){C("all"),v(null),w([]),k(""),$(""),I("all"),M(!1)}const S=[];(m==="wearable"||m==="emote")&&S.push({key:"category",label:o(m==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>q("all")}),(G!=null||O!=null)&&S.push({key:"price",label:o("filter.price"),onRemove:()=>{k(""),$("")}});for(const t of jt)g.includes(t)&&S.push({key:`rarity-${t}`,label:Ve(t),onRemove:()=>J(t)});R&&S.push({key:"smart",label:o("filter.smart"),onRemove:()=>M(!1)}),N!=="all"&&S.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>I("all")});const L=kt({gridLoading:$e||Se,gridError:!!H,gridCount:z.length,baselinePending:F.isPending,baselineError:F.isError,baselineCount:F.data}),B=L==="skeletons",Y=z.filter(t=>t.priceCredits>0),_=L==="items"||L==="skeletons"?null:L;return e.jsxs(Ye,{children:[e.jsxs(Ze,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(Xe,{onClick:()=>i("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(et,{children:c})]}),r?e.jsx(Xt,{address:r}):null,!n&&!B&&Y.length>0?e.jsx(tt,{items:Y,source:"creator"}):null,e.jsxs(it,{children:[E?e.jsx(st,{onClick:()=>P(!1),"aria-hidden":!0}):null,e.jsxs(at,{"data-open":E||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(nt,{children:[e.jsx(lt,{children:o("assets.filters")}),e.jsx(ct,{onClick:()=>P(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(dt,{children:e.jsx(ht,{category:m,subCategory:x,onCategory:q,onSub:v,priceMin:u,priceMax:d,onPriceMin:k,onPriceMax:$,rarities:g,onToggleRarity:J,status:N,onStatus:I,smart:R,onSmart:M,hideNames:!0,collections:n,onCollections:Fe})}),e.jsx(mt,{children:e.jsx(xt,{type:"button",onClick:()=>P(!1),children:o("assets.showItems")})})]}),e.jsx(ut,{children:n?e.jsxs(e.Fragment,{children:[e.jsx(ot,{children:e.jsx(rt,{children:p.isLoading?"…":o("creator.collectionsCount",{count:p.total})})}),p.error?e.jsx(W,{message:o("creator.error")}):null,e.jsx(ce,{"data-variant":"collections",children:p.isLoading?e.jsx(A,{count:9}):e.jsxs(e.Fragment,{children:[p.items.map(t=>e.jsx(_t,{collection:t,itemCount:t.itemCount},t.contractAddress)),p.isFetchingNextPage?e.jsx(A,{count:6}):null]})}),e.jsx(ne,{hasNextPage:p.hasNextPage,isFetching:p.isFetchingNextPage,isError:p.isFetchNextPageError,onLoadMore:()=>void p.fetchNextPage()}),!p.isLoading&&!p.error&&p.items.length===0?e.jsx("p",{className:"muted",children:o("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(yt,{sort:D,onSort:je,total:ke,loading:B,onOpenFilters:()=>P(!0),chips:S,onClearChips:Q}),H?e.jsx(W,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(ce,{"data-testid":"creator-grid",children:B?e.jsx(A,{count:15}):e.jsxs(e.Fragment,{children:[z.map(t=>t.priceCredits>0?e.jsx(ie,{item:t},t.id):e.jsx(ie,{item:t,mode:"view"},t.id)),U?e.jsx(A,{count:6}):null]})}),e.jsx(ne,{hasNextPage:Ne,isFetching:U,isError:Pe,onLoadMore:()=>void Ee()}),_==="error"?e.jsx(W,{message:o("creator.error"),testId:"creator-empty-error"}):_==="no-creations"?e.jsx("p",{className:"muted","data-testid":"creator-empty-none",children:o("creator.emptyNoCreations")}):_==="filters"?e.jsxs(pt,{"data-testid":"creator-empty-filters",children:[e.jsxs(gt,{children:[e.jsx(ft,{children:o("creator.emptyFilters.title")}),e.jsx(bt,{children:o("creator.emptyFilters.body",{count:F.data??0})})]}),e.jsx(wt,{children:e.jsx(vt,{type:"button",onClick:Q,children:o("filterBar.clearAll")})})]}):null]})})]})]})}export{po as Creator,po as default};
@@ -1 +1 @@
1
- import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-CpUnpBQ7.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
1
+ import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-DvGpQtXK.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
@@ -1 +1 @@
1
- import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-mcKRqTfP.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-AUd3llLa.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
1
+ import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-D_hwynnp.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-CMFFdWaD.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};