@dcl/shop 0.6.1 → 0.6.2-30958394678.commit-3968c2a

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 (183) hide show
  1. package/_assets/{Activity-CCVwnN-d.js → Activity-3zyI1IRX.js} +3 -3
  2. package/_assets/{AnimatedBackground-CNn-Vax_.js → AnimatedBackground-nIupuP8l.js} +1 -1
  3. package/_assets/{Assets-BPgkfGkc.js → Assets-BI3c9ohq.js} +8 -8
  4. package/_assets/{Assets.styles-BAy3by3Z.js → Assets.styles-9ki_t5x3.js} +1 -1
  5. package/_assets/{Authorizations-CdqHugnL.js → Authorizations-DXc8lpwm.js} +1 -1
  6. package/_assets/{Cart-CzNOpZkY.js → Cart-DuHl9E6I.js} +2 -2
  7. package/_assets/{CircularProgress-DqLGsuLk.js → CircularProgress-U_mjuju1.js} +3 -3
  8. package/_assets/{Collection-DmrD6mAW.js → Collection-CIcLTFPZ.js} +1 -1
  9. package/_assets/{CollectionCarousel-BpMj1RRH.js → CollectionCarousel-B7TB_OMj.js} +7 -7
  10. package/_assets/{Creator-DYPK74k6.js → Creator-BFMpAq2T.js} +7 -7
  11. package/_assets/{ErrorNotice-6j32LCd-.js → ErrorNotice-B5gvtysl.js} +1 -1
  12. package/_assets/{ExchangeController-CjtWowut.js → ExchangeController-Chujc587.js} +1 -1
  13. package/_assets/{GetCredits-9nCD-_vL.js → GetCredits-DUE68Ofv.js} +17 -17
  14. package/_assets/{HelpersUtil-6C8PzEL7.js → HelpersUtil-DzsKL2ac.js} +1 -1
  15. package/_assets/{ItemDetail-lJyiLtT6.js → ItemDetail-Ch7JVJ39.js} +193 -194
  16. package/_assets/LazyEmoteControls-BwHr8-X7.js +2 -0
  17. package/_assets/{LoadMore-C6sUcyIf.js → LoadMore-BO9-NgF0.js} +1 -1
  18. package/_assets/{ManaPricingBanner.styles-zp0428S7.js → ManaPricingBanner.styles-LfXG3P0z.js} +3 -3
  19. package/_assets/{MenuList-BTdUxA4D.js → MenuList-BX6yO7Ac.js} +2 -2
  20. package/_assets/{MyAssets-BbmsS4SI.js → MyAssets-DVZ_pZXb.js} +1 -1
  21. package/_assets/{MyFavorites-B_Mv89Yf.js → MyFavorites-CbvKYAiN.js} +35 -24
  22. package/_assets/{NotFound-0lsOfC5s.js → NotFound-B3230xyR.js} +1 -1
  23. package/_assets/NotificationsBell-x9qG4JAm.js +34 -0
  24. package/_assets/OutfitDetail-DQa5i9Jk.js +334 -0
  25. package/_assets/OutfitPreview-D4-9krF1.js +6 -0
  26. package/_assets/OutfitStudio-8RdjVeCY.js +537 -0
  27. package/_assets/{StoreSettings-BxTLlxHn.js → StoreSettings-DWBD4fbU.js} +1 -1
  28. package/_assets/{Success-DMCTT33h.js → Success-Couk7Hdv.js} +5 -5
  29. package/_assets/{SwapController-Ci7sPB_-.js → SwapController-k6QIzYEE.js} +1 -1
  30. package/_assets/{Tooltip-BZ-qUO0l.js → Tooltip-BQX-SlPA.js} +1 -1
  31. package/_assets/{TradeService-Cu6fpwnh.js → TradeService-mV7WtrBG.js} +1 -1
  32. package/_assets/{W3MFrameProviderSingleton-8GeYldkk.js → W3MFrameProviderSingleton-DrpRVilu.js} +3 -3
  33. package/_assets/{WebCryptoP256-fMzbuVHl.js → WebCryptoP256-CMlkql0I.js} +1 -1
  34. package/_assets/{authorizations-DOwEBZw0.js → authorizations-CtiOXVNn.js} +1 -1
  35. package/_assets/{basic-CNB5RbBM.js → basic-DdbQHLj0.js} +1 -1
  36. package/_assets/{biconomy-VIh33SiE.js → biconomy-2kmLuYrH.js} +1 -1
  37. package/_assets/{builder-ENYhtC9A.js → builder-Be5eHY-S.js} +1 -1
  38. package/_assets/{buy-DME37PMo.js → buy-Bm7LPL_y.js} +1 -1
  39. package/_assets/{buy-gasless-CsB_UciL.js → buy-gasless-Cna5Um4K.js} +1 -1
  40. package/_assets/{categories-SI1YlvJt.js → categories-B0u9Kgh7.js} +1 -1
  41. package/_assets/{ccip-r6C5X7kR.js → ccip-Ci5E3IwV.js} +1 -1
  42. package/_assets/{ccip-BWQZvTr_.js → ccip-DGfiuVqj.js} +1 -1
  43. package/_assets/clsx-WwvpwSg0.js +1 -0
  44. package/_assets/{collectionPage.styles-DTQE0MEN.js → collectionPage.styles-zJMtUweU.js} +5 -5
  45. package/_assets/{controller-D4hrVQu3.js → controller-DsSvMbNo.js} +2 -2
  46. package/_assets/{core-CG9Ai3BM.js → core-Cq1jU2ZC.js} +4 -4
  47. package/_assets/{createSvgIcon-BBqN76DB.js → createSvgIcon-WjfcCScq.js} +2 -2
  48. package/_assets/{custom-CoESkeU0.js → custom-C3YA4NkW.js} +1 -1
  49. package/_assets/{data-capture-DsD2q2fn.js → data-capture-CEkcLxes.js} +1 -1
  50. package/_assets/{email-2Crwdpgb.js → email-Dsb8bC4V.js} +1 -1
  51. package/_assets/{embedded-wallet-B5qGTlLf.js → embedded-wallet-DYwTFWHC.js} +1 -1
  52. package/_assets/emotion-styled.browser.esm-CXHuvzN7.js +1 -0
  53. package/_assets/{engine-DMQKkPgK.js → engine-CRG7y_Dc.js} +1 -1
  54. package/_assets/{errors-BNZ7sBF_.js → errors-md0_v65i.js} +1 -1
  55. package/_assets/{estimate-l1-fee-D7epFE-D.js → estimate-l1-fee-pM-7mo0C.js} +1 -1
  56. package/_assets/{execute-DKumTrX9.js → execute-By-QAyMu.js} +2 -2
  57. package/_assets/{features-DI5UMV_W.js → features-CE9fos6_.js} +1 -1
  58. package/_assets/{fetchTokenMetadata-D4n2TjLB.js → fetchTokenMetadata-CCRHppyJ.js} +2 -2
  59. package/_assets/{field.styles-CjeX0pR0.js → field.styles-I7yK67N6.js} +1 -1
  60. package/_assets/{get-ecosystem-wallet-info-b6CDxjL2.js → get-ecosystem-wallet-info-CfkIBkrv.js} +1 -1
  61. package/_assets/{getBalance-k1LJAZwU.js → getBalance-r2d5SR8J.js} +1 -1
  62. package/_assets/{getNFT-B39rY-PL.js → getNFT-CdMO9Qsb.js} +1 -1
  63. package/_assets/{getNFT-BMgMzvsZ.js → getNFT-DJwtmi5E.js} +1 -1
  64. package/_assets/{getThemeProps-CppRRpEN.js → getThemeProps-Dfsert1D.js} +1 -1
  65. package/_assets/{grid.styles-Ckr_d1Os.js → grid.styles-nOJmORwE.js} +1 -1
  66. package/_assets/{hashTypedData-CiesaRhT.js → hashTypedData-BUyuoUS1.js} +1 -1
  67. package/_assets/{hashTypedData-DUwT6kJz.js → hashTypedData-Cn4NLSva.js} +1 -1
  68. package/_assets/{in-app-B5W9FA6J.js → in-app-Bbyp_hac.js} +1 -1
  69. package/_assets/{in-app-wallet-calls--fTMhgRz.js → in-app-wallet-calls-B-gR9DjX.js} +1 -1
  70. package/_assets/{index-COM-LGX-.js → index-2aeigaSb.js} +1 -1
  71. package/_assets/{index-DmlHhfEt.js → index-2hXh3Lug.js} +1 -1
  72. package/_assets/{index-C4Mo9qnf.js → index-40kmd_aK.js} +3 -3
  73. package/_assets/{index-8Gs8aT7x.js → index-42pSYxn6.js} +1 -1
  74. package/_assets/{index-Ct4YR2LP.js → index-7y51FKRL.js} +1 -1
  75. package/_assets/{index-CjmdU7lV.js → index-8KyAMGS-.js} +3 -3
  76. package/_assets/{index-D0JaJVwf.js → index-B-vjn9pq.js} +1 -1
  77. package/_assets/{index-C2R_7cZP.js → index-BF0WiBHh.js} +1 -1
  78. package/_assets/{index-CqYYwjL0.js → index-BF64P65M.js} +1 -1
  79. package/_assets/{index-BwnQwSAu.js → index-BLLKqfcD.js} +2 -2
  80. package/_assets/{index-MSDyZgBz.js → index-BLT6_sje.js} +2 -2
  81. package/_assets/{index-DIYC-eqY.js → index-BRbJkxhy.js} +1 -1
  82. package/_assets/{index-C_8wyBUp.js → index-BRg1smL5.js} +1 -1
  83. package/_assets/{index-CROLwqLK.js → index-BSPthC5D.js} +1 -1
  84. package/_assets/{index-6lOpuU8D.js → index-BVV_fmte.js} +1 -1
  85. package/_assets/{index--5-WNACO.js → index-BmI_VY2L.js} +1 -1
  86. package/_assets/{index-DCUHwzVB.js → index-BmXWASOw.js} +1 -1
  87. package/_assets/{index-BlTW8bE5.js → index-C4paiR8G.js} +1 -1
  88. package/_assets/{index-pzI9SPYg.js → index-C74Kz078.js} +1 -1
  89. package/_assets/index-CFNN4IQh.js +1 -0
  90. package/_assets/{index-CWl1zAsC.js → index-CGvsSnH5.js} +2 -2
  91. package/_assets/{index-7Jx0RbBI.js → index-CHP45HLF.js} +1 -1
  92. package/_assets/{index-r_ie-fYk.js → index-CKh-MxqM.js} +1 -1
  93. package/_assets/{index-D1Kwe229.js → index-CN7oQ8au.js} +1 -1
  94. package/_assets/{index-hzUEG0Wn.js → index-CT-IhRIi.js} +1 -1
  95. package/_assets/{index-D3b-6hLL.js → index-C_2RtD-k.js} +3 -3
  96. package/_assets/{index-DyyMlzME.js → index-Cjv0VYHk.js} +1 -1
  97. package/_assets/{index-BjDpMJu4.js → index-ClooG4VA.js} +1 -1
  98. package/_assets/{index-baUyxxA5.js → index-CoQL2VdI.js} +1 -1
  99. package/_assets/{index-6hXQkpzo.js → index-Cqxr1K7X.js} +1 -1
  100. package/_assets/{index-CnU32wDE.js → index-CrL-oicn.js} +1 -1
  101. package/_assets/{index-BvHiSowo.js → index-CxyxAB7h.js} +1 -1
  102. package/_assets/{index-BPLQs7pP.js → index-CyPEmEh2.js} +1 -1
  103. package/_assets/index-DBKr5jDP.js +3318 -0
  104. package/_assets/{index-DUdz_zrJ.js → index-DD3YA4Xc.js} +1 -1
  105. package/_assets/{index-CMt6SGgd.js → index-DItNTWlM.js} +1 -1
  106. package/_assets/{index-D0VlnNE3.js → index-DVtU3QsJ.js} +1 -1
  107. package/_assets/{index-Cz0mItuU.js → index-DWFeJSdC.js} +1 -1
  108. package/_assets/{index-DIpNccsB.js → index-Dvtk0M13.js} +1 -1
  109. package/_assets/{index-3Gl3qzVg.js → index-Dz2HX_tG.js} +1 -1
  110. package/_assets/{index-CiVLOnq4.js → index-DzE64ywR.js} +1 -1
  111. package/_assets/{index-DN_XFLDI.js → index-M6ot6iel.js} +9 -9
  112. package/_assets/index-T0WMmU10.js +2 -0
  113. package/_assets/{index-CWDp9PWh.js → index-UVas8o3a.js} +1 -1
  114. package/_assets/{index-BH9Lj6j_.js → index-YodNRE0F.js} +1 -1
  115. package/_assets/{index-BSMtncI0.js → index-aPDIsvsp.js} +1 -1
  116. package/_assets/{index-DLJMJNYR.js → index-cNFvNcyv.js} +1 -1
  117. package/_assets/{index-DIGH_-jR.js → index-g_bSpYWE.js} +1 -1
  118. package/_assets/{index-CdMXnYZl.js → index-nD_B3x2a.js} +1 -1
  119. package/_assets/{index-brzaaZ1P.js → index-o26JQUSX.js} +1 -1
  120. package/_assets/{index-DJigbyYH.js → index-wYE8B-zV.js} +1 -1
  121. package/_assets/index-yT06p0hy.js +4 -0
  122. package/_assets/{index.es-BfycRISM.js → index.es-AvY6da-n.js} +1 -1
  123. package/_assets/{index.es-Dz4gJjtG.js → index.es-BjABjHDS.js} +1 -1
  124. package/_assets/{index.es-CEspgBOo.js → index.es-CjrBlA2t.js} +4 -4
  125. package/_assets/{localBatchGatewayRequest-C2ejDWSe.js → localBatchGatewayRequest-DASiMtj6.js} +1 -1
  126. package/_assets/{networks-C8W7qTmi.js → networks-C8ez-bvH.js} +1 -1
  127. package/_assets/{onramp-gMYCcz-L.js → onramp-Mm39n2H9.js} +1 -1
  128. package/_assets/{openzeppelin-DoXqKfoL.js → openzeppelin-DM4th0ON.js} +1 -1
  129. package/_assets/{parseNft-CG6mXwGw.js → parseNft-jU70OzWf.js} +2 -2
  130. package/_assets/{parseSignature-YB0y-EIH.js → parseSignature-DgPEk7JG.js} +3 -3
  131. package/_assets/{parseSignature-BtFyUMyh.js → parseSignature-Vz1kWqBf.js} +1 -1
  132. package/_assets/{passkeys-DMD6dHpE.js → passkeys-DUP0d8Zb.js} +1 -1
  133. package/_assets/{pay-with-exchange-DmOk5KUk.js → pay-with-exchange-bcJ8587x.js} +1 -1
  134. package/_assets/{qr-overlay-BmfI4Van.js → qr-overlay-BgqdrAQN.js} +1 -1
  135. package/_assets/{receive-C8CxHyfZ.js → receive-DLQ1rgxk.js} +1 -1
  136. package/_assets/{resolveImplementation-D10q4uG8.js → resolveImplementation-D5VOTogv.js} +1 -1
  137. package/_assets/{rpc-C6XV-dPj.js → rpc-CZqGf5Pw.js} +1 -1
  138. package/_assets/{secp256k1-BmbnB2T6.js → secp256k1-CeIqoHzM.js} +1 -1
  139. package/_assets/{secp256k1-i1ynB1kh.js → secp256k1-DFodyUE2.js} +1 -1
  140. package/_assets/{secp256k1-CplZyQx1.js → secp256k1-wpoFdYyv.js} +1 -1
  141. package/_assets/{send-r-sbW-NR.js → send-5wSIIKSl.js} +1 -1
  142. package/_assets/{send-batch-transaction-DPGUnjFL.js → send-batch-transaction-BsHJzRR6.js} +1 -1
  143. package/_assets/{send-eip712-transaction-DDBiSwZa.js → send-eip712-transaction-CfdZenAu.js} +2 -2
  144. package/_assets/{send-gasless-transaction-TUww1FFr.js → send-gasless-transaction-DdUHdO7Q.js} +2 -2
  145. package/_assets/{send-transaction-INP2LgJd.js → send-transaction-BI-LBwbQ.js} +2 -2
  146. package/_assets/{sendMetaTransaction-CtlcvZ2u.js → sendMetaTransaction-DZqdC6fw.js} +1 -1
  147. package/_assets/{sendRawTransaction-BiF1pCL3.js → sendRawTransaction-BHUyxFbw.js} +3 -3
  148. package/_assets/{serializeTransaction-_CDXrMP2.js → serializeTransaction-ByXeuyQy.js} +1 -1
  149. package/_assets/{session-proposal-Cyo4-zWW.js → session-proposal-BbxUdmu_.js} +1 -1
  150. package/_assets/{session-request-DhBEeqtM.js → session-request-iIRNVfwz.js} +2 -2
  151. package/_assets/{signing-eZY4IKkr.js → signing-Cnwo6tva.js} +3 -3
  152. package/_assets/{socials-ez11BKnF.js → socials-JesVWt33.js} +1 -1
  153. package/_assets/styled-B0-_jC66.js +9 -0
  154. package/_assets/{swaps-D50dXpS9.js → swaps-DiHFkz3h.js} +1 -1
  155. package/_assets/{thirdweb-DtMwg5nw.js → thirdweb-BgDawyw0.js} +3 -3
  156. package/_assets/{to-serializable-transaction-Bo2k0bHN.js → to-serializable-transaction-Cy2ugr3u.js} +2 -2
  157. package/_assets/{trade-encoding-DBrxq_08.js → trade-encoding-DYGW0EG6.js} +1 -1
  158. package/_assets/{transactionReceipt-D84_cL1Y.js → transactionReceipt-BN5uajuZ.js} +1 -1
  159. package/_assets/{transactions-BxDrgH0T.js → transactions-vLsZNFPY.js} +1 -1
  160. package/_assets/{useCreditPacks-DJGSwrlc.js → useCreditPacks-Bxxs5gPt.js} +1 -1
  161. package/_assets/{useImportable-8-eoe6U0.js → useImportable-DaFCiZt-.js} +1 -1
  162. package/_assets/{useInfiniteGrid-BioQWUj3.js → useInfiniteGrid-aaW1umo4.js} +1 -1
  163. package/_assets/{useTheme-CuHYv3yr.js → useTheme-CWDPVAdC.js} +1 -1
  164. package/_assets/{verifyHash-Dp410C0R.js → verifyHash-Bfqcsnfy.js} +1 -1
  165. package/_assets/{w3m-modal-q1294Ir0.js → w3m-modal-7IzsWep_.js} +1 -1
  166. package/_assets/{w3m-modal-ChBvc6av.js → w3m-modal-dbHO42vZ.js} +1 -1
  167. package/_assets/{wait-for-tx-receipt-GGiAUH7I.js → wait-for-tx-receipt-CNCHrX28.js} +1 -1
  168. package/_assets/{wallets-B8DTTYN0.js → wallets-D-L32AGp.js} +5 -5
  169. package/_assets/{web-connector-CwvhuMom.js → web-connector-PVStra29.js} +3 -3
  170. package/_assets/{writeContract-CsfeVlnc.js → writeContract-znr6ni3L.js} +1 -1
  171. package/_assets/{zoraTestnet-CaYytGcL.js → zoraTestnet-Ux1B_UMW.js} +1 -1
  172. package/index.html +11 -11
  173. package/package.json +2 -2
  174. package/_assets/NotificationsBell-CaKoTXrL.js +0 -34
  175. package/_assets/OutfitDetail-ME6t5FNU.js +0 -326
  176. package/_assets/OutfitPreview-BCoX8M6g.js +0 -6
  177. package/_assets/OutfitStudio-DeiWpnBW.js +0 -500
  178. package/_assets/clsx-Dp2xNKFR.js +0 -9
  179. package/_assets/emotion-styled.browser.esm-Cc0eNU1p.js +0 -1
  180. package/_assets/index-BQADEYsi.js +0 -1
  181. package/_assets/index-BYQ4eOXE.js +0 -2
  182. package/_assets/index-C50bRdDg.js +0 -3318
  183. package/_assets/index-C5xtRArG.js +0 -4
@@ -0,0 +1,537 @@
1
+ import{r as d,j as t,L as A,u as Qt,b as Vt,d as Jt}from"./react-DehiWSvs.js";import{s as o,t as dt,I as K,aA as Yt,d as e,x as st,B as x,ae as kt,l as J,M as Xt,v as Zt,y as Ct,o as Tt,O as te,V as N,aB as Q,aC as ee,aD as ie,aE as V,$ as se,a0 as oe,Y as ae,Z as ne,S as It,a1 as re,aF as ot,aG as de,aH as le,aI as ue,A as F,aJ as Et,aK as Lt,aL as O,D as at,aM as nt,aN as ce,aO as pe,aP as fe,U as me,aQ as he,aR as xe,a8 as ge}from"./index-DBKr5jDP.js";import{E as H}from"./ErrorNotice-B5gvtysl.js";import{L as be}from"./LoadMore-BO9-NgF0.js";import{u as ye}from"./useInfiniteGrid-aaW1umo4.js";import{O as je}from"./OutfitPreview-D4-9krF1.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./disposePreview-DIA1G1eQ.js";const{colors:h,radius:Y,media:ve}=dt,we=o.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 12px;
5
+ `,$e=o.div`
6
+ display: flex;
7
+ align-items: center;
8
+ gap: 8px;
9
+ border: 1px solid ${h.lineStrong};
10
+ border-radius: ${Y.pill};
11
+ padding: 0 14px;
12
+ height: 44px;
13
+
14
+ input {
15
+ flex: 1;
16
+ min-width: 0;
17
+ border: 0;
18
+ outline: 0;
19
+ background: none;
20
+ font: inherit;
21
+ color: ${h.text};
22
+ }
23
+ `,Se=o.div`
24
+ display: flex;
25
+ gap: 8px;
26
+ `,ke=o.button`
27
+ min-height: 44px;
28
+ padding: 0 16px;
29
+ border-radius: ${Y.pill};
30
+ border: 1px solid ${h.lineStrong};
31
+ background: none;
32
+ font: inherit;
33
+ font-weight: 600;
34
+ color: ${h.text};
35
+ cursor: pointer;
36
+
37
+ &[data-selected] {
38
+ border-color: ${h.accent};
39
+ background: ${h.accent};
40
+ color: ${h.white};
41
+ }
42
+ `,jt=o.div`
43
+ display: grid;
44
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
45
+ gap: 10px;
46
+
47
+ ${ve.maxWidth("mobile")} {
48
+ grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
49
+ }
50
+ `,Ce=o.span`
51
+ height: 190px;
52
+ border-radius: ${Y.card};
53
+ `,Te=o.button`
54
+ position: relative;
55
+ display: flex;
56
+ flex-direction: column;
57
+ gap: 6px;
58
+ padding: 8px;
59
+ background: ${h.bg};
60
+ border: 1px solid ${h.line};
61
+ border-radius: ${Y.card};
62
+ text-align: left;
63
+ font: inherit;
64
+ color: ${h.text};
65
+ cursor: pointer;
66
+
67
+ &:hover:not(:disabled) {
68
+ border-color: ${h.magenta};
69
+ }
70
+
71
+ &[data-selected] {
72
+ border-color: ${h.accent};
73
+ box-shadow: 0 0 0 1px ${h.accent};
74
+ }
75
+
76
+ &:disabled {
77
+ opacity: 0.5;
78
+ cursor: default;
79
+ }
80
+ `,Ie=o.img`
81
+ width: 100%;
82
+ aspect-ratio: 1;
83
+ object-fit: cover;
84
+ border-radius: 8px;
85
+ background: ${h.media};
86
+ `,Ee=o.span`
87
+ font-size: 13px;
88
+ font-weight: 600;
89
+ white-space: nowrap;
90
+ overflow: hidden;
91
+ text-overflow: ellipsis;
92
+ `,Le=o.span`
93
+ display: inline-flex;
94
+ align-items: center;
95
+ gap: 4px;
96
+ font-size: 12px;
97
+ color: ${h.muted};
98
+ `,Ne=o(K)`
99
+ position: absolute;
100
+ top: 12px;
101
+ right: 12px;
102
+ color: ${h.accent};
103
+ background: ${h.bg};
104
+ border-radius: 50%;
105
+ `,Re=[{key:"wearable",labelKey:"categories.wearables"},{key:"emote",labelKey:"categories.emotes"}];function ze({selectedKeys:r,onPick:m,canPick:f}){const[c,y]=d.useState("wearable"),[j,b]=d.useState(""),[s,L]=d.useState("");d.useEffect(()=>{const l=setTimeout(()=>L(j.trim()),300);return()=>clearTimeout(l)},[j]);const{items:C,isLoading:T,isPlaceholderData:u,isError:S,hasNextPage:I,isFetchingNextPage:X,fetchNextPage:$}=ye(["outfit-picker",c,s],l=>Yt({search:s||void 0,category:c,onSale:!0,listingType:"primary",first:24,skip:l,sortBy:"cheapest"})),g=e(c==="emote"?"outfits.studio.searchEmotes":"outfits.studio.searchWearables"),_=new Set,M=C.filter(l=>{if(!l.itemId)return!1;const v=`${l.contractAddress.toLowerCase()}-${l.itemId}`;return _.has(v)?!1:(_.add(v),!0)});return t.jsxs(we,{"data-testid":"outfit-picker",children:[t.jsx(Se,{role:"group","aria-label":e("outfits.studio.pickerCategory"),"data-testid":"outfit-picker-category",children:Re.map(({key:l,labelKey:v})=>t.jsx(ke,{type:"button","data-category":l,"data-selected":c===l||void 0,"aria-pressed":c===l,onClick:()=>{y(l),b("")},children:e(v)},l))}),t.jsxs($e,{children:[t.jsx(K,{name:"search",color:dt.colors.muted}),t.jsx("input",{value:j,placeholder:g,"aria-label":g,onChange:l=>b(l.target.value),"data-testid":"outfit-picker-search"})]}),S?t.jsx("p",{className:"muted small",children:e("outfits.errors.generic")}):T||u?t.jsx(jt,{"aria-busy":"true",children:Array.from({length:8},(l,v)=>t.jsx(Ce,{className:"skeleton","aria-hidden":!0},v))}):M.length===0?t.jsx("p",{className:"muted small",children:e("outfits.studio.noResults")}):t.jsx(jt,{children:M.map(l=>{const v=`${l.contractAddress.toLowerCase()}-${l.itemId}`,D=r.has(v);return t.jsxs(Te,{type:"button","data-testid":"outfit-picker-item","data-selected":D||void 0,disabled:!D&&!f(l),onClick:()=>m(l),title:l.name,children:[t.jsx(Ie,{src:l.thumbnail,alt:"",loading:"lazy"}),t.jsx(Ee,{children:l.name}),t.jsxs(Le,{children:[t.jsx(st,{size:12}),l.priceCredits.toLocaleString()]}),D?t.jsx(Ne,{name:"check-rounded",size:18}):null]},v)})}),!S&&!T&&!u?t.jsx(be,{auto:!1,hasNextPage:!!I,isFetching:X,onLoadMore:()=>void $()}):null]})}const{colors:a,radius:w,media:B,z:Pe}=dt,Nt=o.div`
106
+ max-width: 1200px;
107
+ margin: 0 auto;
108
+ display: flex;
109
+ flex-direction: column;
110
+ gap: 20px;
111
+ `,P=o.div`
112
+ min-height: 52vh;
113
+ display: flex;
114
+ flex-direction: column;
115
+ align-items: center;
116
+ justify-content: center;
117
+ text-align: center;
118
+ gap: 14px;
119
+ `,vt=o.h1`
120
+ font-size: 24px;
121
+ `,Rt=o.div`
122
+ display: flex;
123
+ align-items: center;
124
+ gap: 12px;
125
+ `,zt=o.h1`
126
+ font-size: 24px;
127
+ font-weight: 800;
128
+ margin-right: auto;
129
+ `,Oe=o(A)`
130
+ display: inline-flex;
131
+ align-items: center;
132
+ justify-content: center;
133
+ width: 44px;
134
+ height: 44px;
135
+ border-radius: 50%;
136
+ color: ${a.text};
137
+
138
+ &:hover {
139
+ background: ${a.panel};
140
+ }
141
+ `,Pt=o.span`
142
+ font-size: 12px;
143
+ font-weight: 700;
144
+ text-transform: uppercase;
145
+ letter-spacing: 0.03em;
146
+ padding: 3px 10px;
147
+ border-radius: ${w.pill};
148
+ background: ${a.chip};
149
+ color: ${a.muted1};
150
+
151
+ &[data-state='published'] {
152
+ background: rgba(30, 166, 114, 0.14);
153
+ color: ${a.okStrong};
154
+ }
155
+ `,wt=o.div`
156
+ display: flex;
157
+ flex-direction: column;
158
+ gap: 10px;
159
+ `,Ae=o.span`
160
+ height: 76px;
161
+ border-radius: ${w.card};
162
+ `,Fe=o.div`
163
+ display: flex;
164
+ align-items: center;
165
+ gap: 14px;
166
+ padding: 12px;
167
+ border: 1px solid ${a.line};
168
+ border-radius: ${w.card};
169
+
170
+ ${B.maxWidth("mobile")} {
171
+ flex-wrap: wrap;
172
+ }
173
+ `,Ot=kt`
174
+ width: 52px;
175
+ height: 52px;
176
+ border-radius: 8px;
177
+ background: ${a.media};
178
+ flex-shrink: 0;
179
+ `,Be=o.div`
180
+ ${Ot};
181
+ overflow: hidden;
182
+
183
+ img {
184
+ width: 100%;
185
+ height: 100%;
186
+ object-fit: cover;
187
+ display: block;
188
+ }
189
+ `,Me=o.span`
190
+ ${Ot};
191
+ display: inline-block;
192
+ `,De=o.div`
193
+ flex: 1;
194
+ min-width: 0;
195
+ display: flex;
196
+ flex-direction: column;
197
+ gap: 4px;
198
+ `,Ue=o.span`
199
+ font-size: 15px;
200
+ font-weight: 700;
201
+ white-space: nowrap;
202
+ overflow: hidden;
203
+ text-overflow: ellipsis;
204
+ `,He=o.span`
205
+ display: inline-flex;
206
+ align-items: center;
207
+ gap: 8px;
208
+ font-size: 13px;
209
+ color: ${a.muted};
210
+ `,Ke=o.div`
211
+ display: flex;
212
+ align-items: center;
213
+ gap: 8px;
214
+
215
+ ${B.maxWidth("mobile")} {
216
+ width: 100%;
217
+ justify-content: flex-end;
218
+ }
219
+ `,_e=o.button`
220
+ display: inline-flex;
221
+ align-items: center;
222
+ justify-content: center;
223
+ width: 44px;
224
+ height: 44px;
225
+ border: 0;
226
+ background: none;
227
+ border-radius: 50%;
228
+ color: ${a.muted};
229
+ cursor: pointer;
230
+
231
+ &:hover {
232
+ color: ${a.errStrong};
233
+ background: ${a.panel};
234
+ }
235
+
236
+ &:disabled {
237
+ opacity: 0.5;
238
+ cursor: default;
239
+ }
240
+ `,We=o.div`
241
+ position: fixed;
242
+ inset: 0;
243
+ z-index: ${Pe.overlay};
244
+ display: grid;
245
+ place-items: center;
246
+ padding: 16px;
247
+ `,Ge=o.div`
248
+ position: absolute;
249
+ inset: 0;
250
+ background: rgba(22, 21, 24, 0.5);
251
+ `,qe=o.div`
252
+ position: relative;
253
+ background: ${a.bg};
254
+ border-radius: ${w.card};
255
+ padding: 24px;
256
+ max-width: 420px;
257
+ width: 100%;
258
+ display: flex;
259
+ flex-direction: column;
260
+ gap: 12px;
261
+ `,Qe=o.h2`
262
+ font-size: 18px;
263
+ font-weight: 800;
264
+ `,Ve=o.div`
265
+ display: flex;
266
+ flex-wrap: wrap;
267
+ gap: 10px;
268
+ margin-top: 6px;
269
+ `,Je=o.div`
270
+ display: grid;
271
+ grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
272
+ gap: 32px;
273
+ align-items: start;
274
+
275
+ ${B.maxWidth("mobile")} {
276
+ grid-template-columns: 1fr;
277
+ gap: 20px;
278
+ }
279
+ `,Ye=o.div`
280
+ display: flex;
281
+ flex-direction: column;
282
+ gap: 18px;
283
+ `,Xe=o.div`
284
+ display: flex;
285
+ flex-direction: column;
286
+ gap: 18px;
287
+ `,Ze=o.div`
288
+ position: relative;
289
+ aspect-ratio: 3 / 4;
290
+ border-radius: 16px;
291
+ overflow: hidden;
292
+ background: ${a.media};
293
+
294
+ ${B.maxWidth("mobile")} {
295
+ aspect-ratio: 1 / 1;
296
+ }
297
+
298
+ & iframe {
299
+ width: 100%;
300
+ height: 100%;
301
+ border: 0;
302
+ display: block;
303
+ }
304
+
305
+ [data-preview-viewport] {
306
+ position: absolute;
307
+ inset: 0;
308
+ pointer-events: none;
309
+ }
310
+ `,ti=o.p`
311
+ position: absolute;
312
+ inset: 0;
313
+ display: grid;
314
+ place-items: center;
315
+ padding: 24px;
316
+ text-align: center;
317
+ `,R=o.div`
318
+ display: flex;
319
+ flex-direction: column;
320
+ gap: 8px;
321
+ `,z=o.label`
322
+ font-size: 13px;
323
+ font-weight: 700;
324
+ letter-spacing: 0.04em;
325
+ text-transform: uppercase;
326
+ color: ${a.muted1};
327
+ `,ei=o.div`
328
+ display: flex;
329
+ gap: 8px;
330
+ `,ii=o.button`
331
+ min-height: 44px;
332
+ padding: 0 16px;
333
+ border-radius: ${w.pill};
334
+ border: 1px solid ${a.lineStrong};
335
+ background: none;
336
+ font: inherit;
337
+ font-weight: 600;
338
+ color: ${a.text};
339
+ cursor: pointer;
340
+
341
+ &[data-selected] {
342
+ border-color: ${a.accent};
343
+ background: ${a.accent};
344
+ color: ${a.white};
345
+ }
346
+ `,si=o.div`
347
+ width: 240px;
348
+ aspect-ratio: 3 / 4;
349
+ border-radius: ${w.card};
350
+ overflow: hidden;
351
+ background: ${a.media};
352
+
353
+ &[data-busy] {
354
+ opacity: 0.6;
355
+ }
356
+
357
+ img {
358
+ width: 100%;
359
+ height: 100%;
360
+ object-fit: cover;
361
+ display: block;
362
+ }
363
+ `,oi=o.div`
364
+ display: flex;
365
+ align-items: center;
366
+ gap: 12px;
367
+ flex-wrap: wrap;
368
+ `,ai=o.div`
369
+ display: flex;
370
+ align-items: center;
371
+ gap: 8px;
372
+ `,ni=o.input`
373
+ width: 44px;
374
+ height: 44px;
375
+ padding: 2px;
376
+ border: 1px solid ${a.lineStrong};
377
+ border-radius: ${w.btn};
378
+ background: none;
379
+ cursor: pointer;
380
+
381
+ &::-webkit-color-swatch-wrapper {
382
+ padding: 0;
383
+ }
384
+ &::-webkit-color-swatch {
385
+ border: 0;
386
+ border-radius: 4px;
387
+ }
388
+ `,ri=o.div`
389
+ display: flex;
390
+ flex-direction: column;
391
+ gap: 2px;
392
+ font-size: 12px;
393
+ color: ${a.muted};
394
+ `,di=o.input`
395
+ width: 88px;
396
+ height: 26px;
397
+ padding: 0 6px;
398
+ border: 1px solid ${a.line};
399
+ border-radius: ${w.chip};
400
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
401
+ font-size: 12px;
402
+ color: ${a.text};
403
+ text-transform: lowercase;
404
+
405
+ &[data-invalid] {
406
+ border-color: ${a.errStrong};
407
+ }
408
+ `,li=o.div`
409
+ width: 281px;
410
+ max-width: 100%;
411
+ `,ui=o(x)`
412
+ align-self: flex-start;
413
+ `,ci=o.div`
414
+ display: flex;
415
+ align-items: stretch;
416
+ gap: 8px;
417
+
418
+ input {
419
+ flex: 1;
420
+ min-width: 0;
421
+ }
422
+ `,$t=o.input`
423
+ height: 44px;
424
+ padding: 0 14px;
425
+ border: 1px solid ${a.lineStrong};
426
+ border-radius: ${w.btn};
427
+ font: inherit;
428
+ color: ${a.text};
429
+
430
+ &:focus {
431
+ outline: 2px solid ${a.accent};
432
+ outline-offset: -1px;
433
+ }
434
+ `,pi=o.ul`
435
+ list-style: none;
436
+ margin: 0;
437
+ padding: 0;
438
+ display: flex;
439
+ flex-direction: column;
440
+ gap: 6px;
441
+ `,fi=o.li`
442
+ display: flex;
443
+ align-items: center;
444
+ gap: 10px;
445
+ padding: 6px 8px;
446
+ border: 1px solid ${a.line};
447
+ border-radius: ${w.card};
448
+
449
+ ${B.maxWidth("mobile")} {
450
+ flex-wrap: wrap;
451
+ }
452
+
453
+ &[data-missing] {
454
+ opacity: 0.6;
455
+ }
456
+ `,At=kt`
457
+ width: 40px;
458
+ height: 40px;
459
+ border-radius: 8px;
460
+ background: ${a.media};
461
+ flex-shrink: 0;
462
+ `,mi=o.img`
463
+ ${At};
464
+ object-fit: cover;
465
+ `,hi=o.span`
466
+ ${At};
467
+ display: inline-block;
468
+ `,xi=o.span`
469
+ flex: 1;
470
+ min-width: 0;
471
+ font-size: 14px;
472
+ font-weight: 600;
473
+ white-space: nowrap;
474
+ overflow: hidden;
475
+ text-overflow: ellipsis;
476
+ `,gi=o.span`
477
+ flex: none;
478
+ padding: 2px 8px;
479
+ border-radius: ${w.pill};
480
+ border: 1px solid ${a.lineStrong};
481
+ font-size: 11px;
482
+ font-weight: 600;
483
+ color: ${a.muted};
484
+ white-space: nowrap;
485
+
486
+ ${B.maxWidth("mobile")} {
487
+ order: 1;
488
+ margin-left: 50px;
489
+ }
490
+ `,bi=o.span`
491
+ display: inline-flex;
492
+ align-items: center;
493
+ gap: 4px;
494
+ font-size: 13px;
495
+ color: ${a.muted};
496
+ white-space: nowrap;
497
+ `,yi=o.div`
498
+ display: flex;
499
+ align-items: center;
500
+ justify-content: space-between;
501
+ padding-top: 10px;
502
+ border-top: 1px solid ${a.line};
503
+ font-size: 13px;
504
+ font-weight: 700;
505
+ `,ji=o.span`
506
+ display: inline-flex;
507
+ align-items: center;
508
+ gap: 4px;
509
+ font-size: 15px;
510
+ font-weight: 700;
511
+ `,vi=o.button`
512
+ display: inline-flex;
513
+ align-items: center;
514
+ justify-content: center;
515
+ width: 40px;
516
+ height: 40px;
517
+ border: 0;
518
+ background: none;
519
+ border-radius: 50%;
520
+ color: ${a.muted};
521
+ cursor: pointer;
522
+
523
+ &:hover {
524
+ color: ${a.errStrong};
525
+ background: ${a.panel};
526
+ }
527
+ `,wi=o.div`
528
+ display: flex;
529
+ flex-direction: column;
530
+ gap: 8px;
531
+ padding-top: 16px;
532
+ border-top: 1px solid ${a.line};
533
+ `,$i=o.div`
534
+ display: flex;
535
+ flex-wrap: wrap;
536
+ gap: 10px;
537
+ `;function Di(){const{id:r}=Qt(),{pathname:m}=Vt(),f=J(b=>b.session),c=J(b=>b.signIn),y=Xt();Zt({title:e("outfits.studio.title"),noindex:!0});const j=m.endsWith("/new")?"new":r?"edit":"list";return y==="pending"?t.jsx(P,{"aria-busy":"true","data-testid":"outfit-studio-loading",children:t.jsx("span",{className:"spinner","aria-hidden":!0})}):f?y!=="creator"?t.jsxs(P,{"data-testid":"outfit-studio-unavailable",children:[t.jsx(vt,{children:e("outfits.studio.title")}),t.jsx("p",{className:"muted",children:e("outfits.studio.notAvailable")}),t.jsx(x,{as:A,to:"/overview",variant:"purple",children:e("outfits.studio.backToShop")})]}):j==="list"?t.jsx(ki,{}):t.jsx(Ii,{outfitId:j==="edit"?r:null},r??"new"):t.jsxs(P,{"data-testid":"outfit-studio-signin",children:[t.jsx(vt,{children:e("outfits.studio.title")}),t.jsx("p",{className:"muted",children:e("outfits.studio.signInPrompt")}),t.jsx(x,{variant:"purple",onClick:()=>c(),children:e("outfits.studio.signIn")})]})}function Si({outfit:r}){const m=It(r.thumbnailHash);return m?t.jsx(Be,{style:{background:le(r)},children:t.jsx("img",{src:m,alt:"",loading:"lazy"})}):t.jsx(Me,{"aria-hidden":!0})}function ki(){const r=J(u=>u.session),m=Ct(),[f,c]=d.useState(null),[y,j]=d.useState(null),{data:b=[],isLoading:s,isError:L,refetch:C}=Tt({queryKey:["outfits-all"],enabled:!!r,staleTime:3e4,queryFn:()=>xe(r.identity)});async function T(u,S){if(r){j(u.id);try{S==="delete"?(await ue(u.id,r.identity),F.success(e("outfits.studio.deleted"))):(await Et({...rt(u),published:!1},r.identity,"update"),F.success(e("outfits.studio.unpublished"))),Lt(m)}catch(I){I instanceof O||at(I,{flow:`outfit-${S}`}),F.error(e(I instanceof O?nt(I.code):"outfits.errors.generic"))}finally{j(null),c(null)}}}return t.jsxs(Nt,{"data-testid":"outfit-studio-list",children:[t.jsxs(Rt,{children:[t.jsx(zt,{children:e("outfits.studio.myOutfits")}),t.jsx(x,{as:A,to:"/outfits/new",variant:"purple","data-testid":"outfit-studio-new",children:e("outfits.studio.new")})]}),s?t.jsx(wt,{"aria-busy":"true",children:Array.from({length:3},(u,S)=>t.jsx(Ae,{className:"skeleton","aria-hidden":!0},S))}):L?t.jsxs(P,{children:[t.jsx(H,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"purple",onClick:()=>void C(),children:e("outfits.detail.retry")})]}):b.length===0?t.jsx("p",{className:"muted",children:e("outfits.studio.empty")}):t.jsx(wt,{children:b.map(u=>t.jsxs(Fe,{"data-testid":"outfit-studio-row","data-published":u.published||void 0,children:[t.jsx(Si,{outfit:u}),t.jsxs(De,{children:[t.jsx(Ue,{children:u.name||e("outfits.studio.untitled")}),t.jsxs(He,{children:[t.jsx(Pt,{"data-state":u.published?"published":"draft",children:u.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")}),e("outfits.card.items",{count:u.items.length})]})]}),t.jsxs(Ke,{children:[u.published?t.jsx(x,{as:A,to:`/items/outfits/${u.id}`,variant:"ghost",size:"sm",children:e("outfits.studio.view")}):null,t.jsx(x,{as:A,to:`/outfits/${u.id}/edit`,variant:"outline",size:"sm","data-testid":"outfit-studio-edit",children:e("outfits.studio.edit")}),t.jsx(_e,{type:"button","data-testid":"outfit-studio-delete","aria-label":e("outfits.studio.confirmDelete"),disabled:y===u.id,onClick:()=>c(u),children:t.jsx(K,{name:"trash",size:18})})]})]},u.id))}),f?t.jsxs(We,{role:"dialog","aria-modal":"true","aria-label":e("outfits.studio.deleteTitle"),"data-testid":"outfit-studio-confirm",children:[t.jsx(Ge,{onClick:()=>c(null)}),t.jsxs(qe,{children:[t.jsx(Qe,{children:e("outfits.studio.deleteTitle")}),t.jsx("p",{className:"muted",children:e("outfits.studio.deleteBody")}),t.jsxs(Ve,{children:[f.published?t.jsx(x,{variant:"purple","data-testid":"outfit-studio-confirm-unpublish",disabled:y===f.id,onClick:()=>void T(f,"unpublish"),children:e("outfits.studio.unpublish")}):null,t.jsx(x,{variant:f.published?"outline":"purple","data-testid":"outfit-studio-confirm-delete",disabled:y===f.id,onClick:()=>void T(f,"delete"),children:e("outfits.studio.confirmDelete")}),t.jsx(x,{variant:"ghost",onClick:()=>c(null),children:e("outfits.studio.cancel")})]})]})]}):null]})}const St=["image/png","image/jpeg","image/webp"];function Ci(){return{id:crypto.randomUUID(),name:"",thumbnailHash:"",items:[],bodyShape:"unisex",gradientFrom:ot.from,gradientTo:ot.to,published:!1}}function rt(r){return{id:r.id,name:r.name,thumbnailHash:r.thumbnailHash,items:r.items,bodyShape:r.bodyShape,gradientFrom:r.gradientFrom,gradientTo:r.gradientTo,published:r.published}}function Ti(r){try{const m=sessionStorage.getItem(r);return m?JSON.parse(m):null}catch{return null}}function Ii({outfitId:r}){const m=r===null,f=`outfit-draft:${r??"new"}`,c=J(i=>i.session),y=Ct(),j=Jt(),[b]=d.useState(()=>Ti(f)),[s,L]=d.useState(()=>b??(m?Ci():null)),[C,T]=d.useState(!!b),{data:u,isLoading:S,isError:I,refetch:X}=Tt({queryKey:["outfit",r,!0],enabled:!m&&!!c,staleTime:0,queryFn:()=>ge(r,c.identity)});d.useEffect(()=>{u&&L(i=>i??rt(u))},[u]);function $(i){L(n=>n&&{...n,...i}),T(!0)}d.useEffect(()=>{if(!(!s||!C))try{sessionStorage.setItem(f,JSON.stringify(s))}catch{}},[s,C,f]),d.useEffect(()=>{if(!C)return;const i=n=>n.preventDefault();return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[C]),d.useEffect(()=>()=>sessionStorage.removeItem(f),[f]);const g=te(s??void 0),_=d.useMemo(()=>new Set(((s==null?void 0:s.items)??[]).map(N)),[s]),M=i=>he((s==null?void 0:s.items)??[],i,g.byKey),l=i=>!!i.itemId&&M(i).length<=V;function v(i){!s||!l(i)||$({items:M(i)})}const[D,lt]=d.useState(null),E=d.useRef(null),Z=d.useRef(!0);d.useEffect(()=>(Z.current=!0,()=>{Z.current=!1}),[]);const[W,ut]=d.useState(!1),[Ft,G]=d.useState(null),[tt,ct]=d.useState(""),[Bt,pt]=d.useState(null),[k,Mt]=d.useState();d.useEffect(()=>()=>{E.current&&URL.revokeObjectURL(E.current)},[]);function ft(){const i=fe(tt);if(!i){pt(e("outfits.studio.importError"));return}pt(null),ct(""),Mt(i.colors),$({items:i.items,...i.bodyShape?{bodyShape:i.bodyShape}:{}}),F.success(e("outfits.studio.importSuccess",{count:i.items.length}))}async function Dt(i){if(!i||!c)return;if(G(null),!St.includes(i.type)){G(e("outfits.errors.unsupportedType"));return}if(i.size>ce){G(e("outfits.errors.tooLarge"));return}E.current&&URL.revokeObjectURL(E.current);const n=URL.createObjectURL(i);E.current=n,lt(n),ut(!0);try{const p=await pe(i,c.identity);$({thumbnailHash:p})}catch(p){p instanceof O||at(p,{flow:"outfit-thumbnail"}),G(e(p instanceof O?nt(p.code):"outfits.errors.generic")),E.current&&(URL.revokeObjectURL(E.current),E.current=null),lt(null)}finally{ut(!1)}}const[U,mt]=d.useState(!1),[Ut,ht]=d.useState(null),et=!!s&&s.name.trim().length>0&&s.name.length<=60,Ht=!!s&&Q(s.gradientFrom)&&Q(s.gradientTo),xt=!!s&&s.items.some(i=>{const n=g.byKey.get(N(i));return!n||ee(n)}),gt=!!s&&et&&!!s.thumbnailHash&&Ht&&xt&&s.items.length>=ie&&s.items.length<=V;async function it(i){if(!(!c||!s||U)){mt(!0),ht(null);try{const n=await Et({...s,published:i},c.identity,m?"create":"update");if(!Z.current)return;sessionStorage.removeItem(f),L(rt(n)),T(!1),Lt(y),i&&!s.published?(me("Shop Outfit Published",{outfit_id:n.id,item_count:n.items.length}),F.success(e("outfits.studio.publishedToast"))):F.success(e("outfits.studio.saved")),m&&(y.setQueryData(["outfit",n.id,!0],n),j(`/outfits/${n.id}/edit`,{replace:!0}))}catch(n){n instanceof O||at(n,{flow:"outfit-save"}),ht(e(n instanceof O?nt(n.code):"outfits.errors.generic"))}finally{mt(!1)}}}const q=d.useMemo(()=>((s==null?void 0:s.items)??[]).map(i=>g.byKey.get(N(i))).filter(i=>!!i),[s,g.byKey]),bt=d.useMemo(()=>se(q),[q]),Kt=d.useMemo(()=>{const i=oe(q);return i!=null&&i.itemId?N({contractAddress:i.contractAddress,itemId:i.itemId}):null},[q]),_t=(s==null?void 0:s.bodyShape)==="female"?ae:(s==null?void 0:s.bodyShape)==="male"?ne:void 0;if(!c)return null;if(!s)return I?t.jsxs(P,{children:[t.jsx(H,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"purple",onClick:()=>void X(),children:e("outfits.detail.retry")})]}):!S&&u===null?t.jsxs(P,{"data-testid":"outfit-studio-missing",children:[t.jsx("p",{className:"muted",children:e("outfits.errors.notFound")}),t.jsx(x,{as:A,to:"/outfits/manage",variant:"purple",children:e("outfits.studio.myOutfits")})]}):t.jsx(P,{"aria-busy":"true",children:t.jsx("span",{className:"spinner","aria-hidden":!0})});const yt=D??It(s.thumbnailHash),Wt={...s,authorAddress:(c==null?void 0:c.address)??"",createdAt:0,updatedAt:0},Gt=s.items.reduce((i,n)=>{var p;return i+(((p=g.byKey.get(N(n)))==null?void 0:p.priceCredits)??0)},0);return t.jsxs(Nt,{"data-testid":"outfit-studio-editor",children:[t.jsxs(Rt,{children:[t.jsx(Oe,{to:"/outfits/manage","aria-label":e("outfits.studio.myOutfits"),"data-testid":"outfit-studio-back",children:t.jsx(K,{name:"arrow-left",size:18})}),t.jsx(zt,{children:m?e("outfits.studio.new"):e("outfits.studio.editTitle")}),t.jsx(Pt,{"data-state":s.published?"published":"draft",children:s.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")})]}),t.jsxs(Je,{children:[t.jsxs(Ye,{children:[t.jsxs(Ze,{"data-testid":"outfit-studio-preview",style:{background:re(s)},children:[t.jsx(je,{id:"outfit-studio-preview-frame",profile:"default",bodyShape:_t,urns:bt,skin:k==null?void 0:k.skin,hair:k==null?void 0:k.hair,eyes:k==null?void 0:k.eyes,enabled:!g.isLoading}),bt.length===0&&!g.isLoading?t.jsx(ti,{className:"muted",children:e("outfits.studio.previewEmpty")}):null]}),t.jsxs(R,{children:[t.jsx(z,{as:"span",children:e("outfits.studio.bodyShape")}),t.jsx(ei,{role:"group","aria-label":e("outfits.studio.bodyShape"),children:["unisex","male","female"].map(i=>t.jsx(ii,{type:"button","data-selected":s.bodyShape===i||void 0,onClick:()=>$({bodyShape:i}),children:e(`outfits.studio.shape.${i}`)},i))})]}),t.jsxs(R,{children:[t.jsx(z,{as:"span",children:e("outfits.studio.gradient")}),t.jsx(oi,{children:["gradientFrom","gradientTo"].map(i=>t.jsxs(ai,{children:[t.jsx(ni,{type:"color",value:Q(s[i])?s[i]:ot.from,"aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom"),"data-testid":i==="gradientFrom"?"outfit-studio-gradient-from":"outfit-studio-gradient-to",onChange:n=>$({[i]:n.target.value.toLowerCase()})}),t.jsxs(ri,{children:[t.jsx("span",{children:e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom")}),t.jsx(di,{value:s[i],maxLength:7,spellCheck:!1,placeholder:"#000000","aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTopHex":"outfits.studio.gradientBottomHex"),"data-invalid":!Q(s[i])||void 0,onChange:n=>{const p=n.target.value.trim().toLowerCase();$({[i]:p.startsWith("#")||p===""?p:`#${p}`})}})]})]},i))}),t.jsx("p",{className:"muted small",children:e("outfits.studio.gradientHint")})]}),t.jsxs(R,{children:[t.jsx(z,{as:"span",children:e("outfits.studio.thumbnail")}),yt?t.jsx(si,{"data-busy":W||void 0,children:t.jsx("img",{src:yt,alt:""})}):null,t.jsxs(ui,{as:"label",variant:"outline",size:"sm","data-busy":W||void 0,children:[W?e("outfits.studio.uploading"):e("outfits.studio.upload"),t.jsx("input",{type:"file",accept:St.join(","),hidden:!0,disabled:W,onChange:i=>{var n;return void Dt((n=i.target.files)==null?void 0:n[0])},"data-testid":"outfit-studio-thumb-input"})]}),t.jsx("p",{className:"muted small",children:e("outfits.studio.thumbnailHint")}),t.jsx(H,{message:Ft,testId:"outfit-studio-thumb-error"})]}),t.jsxs(R,{children:[t.jsx(z,{as:"span",children:e("outfits.studio.cardPreview")}),t.jsx(li,{"data-testid":"outfit-studio-card-preview",onClickCapture:i=>{i.preventDefault(),i.stopPropagation()},children:t.jsx(de,{outfit:Wt,resolution:g})})]})]}),t.jsxs(Xe,{children:[t.jsxs(R,{children:[t.jsx(z,{htmlFor:"outfit-import",children:e("outfits.studio.import")}),t.jsxs(ci,{children:[t.jsx($t,{id:"outfit-import",value:tt,spellCheck:!1,placeholder:e("outfits.studio.importPlaceholder"),onChange:i=>ct(i.target.value),onKeyDown:i=>{i.key==="Enter"&&ft()},"data-testid":"outfit-studio-import"}),t.jsx(x,{variant:"outline",size:"sm",onClick:ft,disabled:tt.trim()==="","data-testid":"outfit-studio-import-apply",children:e("outfits.studio.importApply")})]}),t.jsx("p",{className:"muted small",children:e("outfits.studio.importHint")}),t.jsx(H,{message:Bt,testId:"outfit-studio-import-error"})]}),t.jsxs(R,{children:[t.jsx(z,{htmlFor:"outfit-name",children:e("outfits.studio.name")}),t.jsx($t,{id:"outfit-name",value:s.name,maxLength:60,placeholder:e("outfits.studio.namePlaceholder"),onChange:i=>$({name:i.target.value}),"data-testid":"outfit-studio-name"})]}),t.jsxs(R,{children:[t.jsxs(z,{as:"span",children:[e("outfits.studio.items")," (",s.items.length,"/",V,")"]}),s.items.length===0?t.jsx("p",{className:"muted small",children:e("outfits.studio.noItems")}):t.jsx(pi,{children:s.items.map(i=>{const n=N(i),p=g.byKey.get(n);return t.jsxs(fi,{"data-testid":"outfit-studio-selected","data-missing":!p||void 0,children:[p?t.jsx(mi,{src:p.thumbnail,alt:""}):t.jsx(hi,{className:g.isLoading?"skeleton":void 0,"aria-hidden":!0}),t.jsx(xi,{className:p?void 0:"muted",children:p?p.name:g.isLoading?"…":e("outfits.card.unavailable")}),n===Kt?t.jsx(gi,{"data-testid":"outfit-studio-plays-in-preview",children:e("outfits.studio.playsInPreview")}):null,p?t.jsxs(bi,{children:[t.jsx(st,{size:12}),p.priceCredits.toLocaleString()]}):null,t.jsx(vi,{type:"button","aria-label":e("outfits.studio.remove"),title:e("outfits.studio.remove"),onClick:()=>$({items:s.items.filter(qt=>N(qt)!==n)}),children:t.jsx(K,{name:"trash",size:16})})]},n)})}),s.items.length>0?t.jsxs(yi,{"data-testid":"outfit-studio-total",children:[t.jsx("span",{children:e("outfits.detail.totalPrice")}),t.jsxs(ji,{children:[t.jsx(st,{size:14}),Gt.toLocaleString()]})]}):null,s.items.length>=V?t.jsx("p",{className:"muted small",children:e("outfits.studio.maxItems")}):null]}),t.jsx(ze,{selectedKeys:_,onPick:v,canPick:l})]})]}),t.jsxs(wi,{"data-testid":"outfit-studio-savebar",children:[t.jsx(H,{message:Ut,testId:"outfit-studio-save-error"}),et?!gt&&!s.published?t.jsx("p",{className:"muted small","data-testid":"outfit-studio-publish-hint",children:!xt&&s.items.length>0?e("outfits.studio.needsWearable"):e("outfits.errors.notPublishable")}):null:t.jsx("p",{className:"muted small",children:e("outfits.studio.needName")}),t.jsxs($i,{children:[t.jsx(x,{variant:"outline","data-testid":"outfit-studio-save",disabled:U||!et,onClick:()=>void it(s.published),children:U?e("outfits.studio.saving"):e("outfits.studio.saveDraft")}),s.published?t.jsx(x,{variant:"purple","data-testid":"outfit-studio-unpublish",disabled:U,onClick:()=>void it(!1),children:e("outfits.studio.unpublish")}):t.jsx(x,{variant:"purple","data-testid":"outfit-studio-publish",disabled:U||!gt,onClick:()=>void it(!0),children:e("outfits.studio.publish")})]})]})]})}export{Di as OutfitStudio,Di as default};
@@ -1,4 +1,4 @@
1
- import{j as t,L as oe,d as le,r as l}from"./react-DehiWSvs.js";import{d as s,t as w,s as a,q as ce,B as Y,v as de,l as pe,y as ue,bi as ge,bn as me,bo as xe,bp as he,bq as A,I as z,br as f,bs as fe,A as F}from"./index-C50bRdDg.js";import{E as M}from"./ErrorNotice-6j32LCd-.js";import{F as j}from"./field.styles-CjeX0pR0.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const ve="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/template-cover-1-BETekfHg.jpeg",be="https://cdn.decentraland.org/@dcl/shop/0.6.1/_assets/template-cover-2-Dni9s0i_.jpeg",je=Object.assign({"../assets/creator-covers/template-cover-1.jpeg":ve,"../assets/creator-covers/template-cover-2.jpeg":be}),v=Object.entries(je).sort(([r],[u])=>r.localeCompare(u)).map(([r,u])=>({name:r.split("/").pop(),url:u})),we=ce`
1
+ import{j as t,L as oe,d as le,r as l}from"./react-DehiWSvs.js";import{d as s,t as w,s as a,q as ce,B as Y,v as de,l as pe,y as ue,bl as ge,bq as me,br as xe,bs as he,bt as A,I as z,bu as f,bv as fe,A as F}from"./index-DBKr5jDP.js";import{E as M}from"./ErrorNotice-B5gvtysl.js";import{F as j}from"./field.styles-I7yK67N6.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const ve="https://cdn.decentraland.org/@dcl/shop/0.6.2-30958394678.commit-3968c2a/_assets/template-cover-1-BETekfHg.jpeg",be="https://cdn.decentraland.org/@dcl/shop/0.6.2-30958394678.commit-3968c2a/_assets/template-cover-2-Dni9s0i_.jpeg",je=Object.assign({"../assets/creator-covers/template-cover-1.jpeg":ve,"../assets/creator-covers/template-cover-2.jpeg":be}),v=Object.entries(je).sort(([r],[u])=>r.localeCompare(u)).map(([r,u])=>({name:r.split("/").pop(),url:u})),we=ce`
2
2
  to {
3
3
  transform: rotate(360deg);
4
4
  }
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-DQ3AciL_.js","_assets/react-DehiWSvs.js"])))=>i.map(i=>d[i]);
2
- import{r as g,j as e,b as P,d as N,N as M}from"./react-DehiWSvs.js";import{s as t,_ as I,t as F,x as _,au as O,ad as W,l as D,v as q,d as n,w as U,e as V,av as H,c as B,B as J,aw as X}from"./index-C50bRdDg.js";import{w as G,S as K}from"./buy-gasless-CsB_UciL.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./authorizations-DOwEBZw0.js";import"./sendMetaTransaction-CtlcvZ2u.js";import"./trade-encoding-DBrxq_08.js";const Q=t.div`
2
+ import{r as g,j as e,b as P,d as N,N as M}from"./react-DehiWSvs.js";import{s as t,_ as I,t as F,x as _,ax as O,ae as W,l as D,v as q,d as n,w as U,e as V,ay as H,c as B,B as J,az as X}from"./index-DBKr5jDP.js";import{w as G,S as K}from"./buy-gasless-Cna5Um4K.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./authorizations-CtiOXVNn.js";import"./sendMetaTransaction-DZqdC6fw.js";import"./trade-encoding-DYGW0EG6.js";const Q=t.div`
3
3
  position: fixed;
4
4
  inset: 0;
5
5
  /**
@@ -43,7 +43,7 @@ import{r as g,j as e,b as P,d as N,N as M}from"./react-DehiWSvs.js";import{s as
43
43
  font-size: 18px;
44
44
  color: #4b4b57;
45
45
  margin: 0 0 22px;
46
- `,v=t.div`
46
+ `,y=t.div`
47
47
  display: flex;
48
48
  gap: 18px;
49
49
  justify-content: center;
@@ -196,12 +196,12 @@ import{r as g,j as e,b as P,d as N,N as M}from"./react-DehiWSvs.js";import{s as
196
196
  ${j} {
197
197
  font-size: 16px;
198
198
  }
199
- `,ve=t.span`
199
+ `,ye=t.span`
200
200
  margin-left: 8px;
201
201
  font-weight: 600;
202
202
  font-size: 13px;
203
203
  color: ${s.muted};
204
- `,ye=t(O)`
204
+ `,ve=t(O)`
205
205
  position: relative;
206
206
  z-index: 1;
207
207
  color: ${s.muted};
@@ -293,4 +293,4 @@ import{r as g,j as e,b as P,d as N,N as M}from"./react-DehiWSvs.js";import{s as
293
293
  `,R=t(J)`
294
294
  min-width: 160px;
295
295
  text-align: center;
296
- `;function Ae(c){return null}const Se=c=>new Promise(r=>setTimeout(r,c));function Ie(c,r){const[i,a]=g.useState(c?"pending":"confirmed"),x=r?`${r.owner}-${r.contractAddress}-${r.itemId}`:"";return g.useEffect(()=>{if(!c)return;let l=!1;return(async()=>{let f=!1;for(let o=0;o<20&&!l;o++)try{await G(c,{timeoutMs:15e3}),f=!0;break}catch(b){if(b instanceof K)continue;l||a("failed");return}if(!l){if(!f){a("timed-out");return}if(!r){a("confirmed");return}a("indexing");for(let o=0;o<40&&!l;o++){if(await X(r.owner,r.contractAddress,r.itemId)){l||a("confirmed");return}await Se(3e3)}l||a("timed-out")}})(),()=>{l=!0}},[c,x]),i}const Le=B.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",Te=B.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function Ue(){var S;const{state:c,search:r}=P(),i=c??Ae(),a=N(),{session:x}=D(),l=i==null?void 0:i.txHash,y=(i==null?void 0:i.items)??[],f=i!=null&&i.creditsAdded&&i.creditsAdded>0?i.creditsAdded:null,o=y[0],b=x!=null&&x.address&&(o!=null&&o.contractAddress)&&(o!=null&&o.itemId)?{owner:x.address,contractAddress:o.contractAddress,itemId:o.itemId}:null,u=Ie(i!=null&&i.settled?void 0:l,b);q({title:n("seo.success.title"),noindex:!0});const p=y;if(p.length===0)return e.jsx(M,{to:"/items",replace:!0});const A=p[0],w=(S=i==null?void 0:i.txHashes)!=null&&S.length?i.txHashes:l?[l]:[],h=w.length>0&&U(x==null?void 0:x.providerType)?w.map((d,k)=>e.jsx(ne,{href:`${Te}${d}`,target:"_blank",rel:"noreferrer",children:w.length>1?n("success.viewTransactionNumbered",{n:k+1,total:w.length}):n("success.viewTransaction")},d)):null;return u!=="confirmed"?e.jsx(L,{children:e.jsx(ee,{children:u==="pending"||u==="indexing"?e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"spinner","aria-hidden":!0}),e.jsx(C,{children:u==="indexing"?n("success.finalizing"):n("success.processing")}),e.jsx(z,{children:u==="indexing"?e.jsxs(e.Fragment,{children:[n("success.indexingBefore")," ",p.length===1?e.jsx("strong",{children:A.name}):n("success.itemCount",{count:p.length})," ",n("success.indexingAfter")]}):e.jsxs(e.Fragment,{children:[n("success.confirmingBefore")," ",p.length===1?e.jsx("strong",{children:A.name}):n("success.itemCount",{count:p.length})," ",n("success.confirmingAfter")]})}),h?e.jsx(v,{children:h}):null]}):u==="timed-out"?e.jsxs(e.Fragment,{children:[e.jsx(C,{children:n("success.stillProcessingTitle")}),e.jsxs(z,{children:[n("success.timedOutBefore")," ",e.jsx("button",{className:"link",onClick:()=>a("/activity"),children:n("nav.activity")})," ",n("success.timedOutAfter")]}),h?e.jsx(v,{children:h}):null,e.jsxs(T,{children:[e.jsx(R,{variant:"purple",onClick:()=>a("/activity"),children:n("success.viewActivity")}),e.jsx(R,{variant:"ghost",onClick:()=>a("/items"),children:n("success.keepShopping")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(C,{children:n("success.failedTitle")}),e.jsx(z,{children:n("success.failedBody")}),h?e.jsx(v,{children:h}):null,e.jsx(T,{children:e.jsx(R,{variant:"purple",onClick:()=>a("/items"),children:n("success.backToShop")})})]})})}):e.jsxs(L,{children:[e.jsx(Z,{}),e.jsxs(ie,{children:[e.jsxs(se,{role:"status",children:[e.jsx(re,{"aria-hidden":!0,children:e.jsxs("svg",{viewBox:"0 0 60 60",width:"60",height:"60",children:[e.jsx("circle",{cx:"30",cy:"30",r:"30",fill:"#34ce77"}),e.jsx("path",{d:"M18 31l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsxs(oe,{children:[e.jsx("b",{children:n("success.bannerTitle")})," ",n("success.bannerBody")]})]}),e.jsxs(ce,{children:[f?e.jsxs(le,{"data-testid":"success-credits",children:[e.jsx(xe,{}),e.jsxs(he,{children:[e.jsx(pe,{children:n("getCredits.creditsAmount",{credits:f,currency:V.name})})," ",e.jsx(ue,{children:n("getCredits.creditsAdded")})]})]}):null,p.map((d,k)=>{const $=d.quantity??1;return e.jsxs(ae,{children:[k>0?e.jsx(de,{"aria-hidden":!0}):null,e.jsxs(fe,{children:[e.jsxs(ge,{children:[d.thumbnail?e.jsx("img",{src:d.thumbnail,alt:""}):null,e.jsx(me,{"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 18 18",width:"12",height:"12",children:e.jsx("path",{d:"M4 9l3.5 3.5L14 5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(je,{children:[e.jsxs(we,{title:d.name,children:[d.name||n("buyModal.itemFallback"),$>1?e.jsx(ve,{children:n("cartCheckout.qty",{count:$})}):null]}),d.creator?e.jsx(ye,{address:d.creator,linkToProfile:!0}):null]}),e.jsxs(be,{children:[e.jsx(ke,{}),e.jsx("span",{children:H(d.priceCredits*$)})]})]})]},d.id)})]}),h?e.jsx(v,{"data-receipt":!0,children:h}):null,e.jsxs($e,{children:[e.jsx(Ce,{"data-variant":"ghost",onClick:()=>a("/my-items"),children:n("success.myAssets")}),e.jsxs(ze,{"data-variant":"ruby",href:Le,target:"_blank",rel:"noreferrer",children:[n("success.tryInWorld"),e.jsx(Re,{"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]})]})}export{Ue as Success,Ue as default};
296
+ `;function Ae(c){return null}const Se=c=>new Promise(r=>setTimeout(r,c));function Ie(c,r){const[i,a]=g.useState(c?"pending":"confirmed"),x=r?`${r.owner}-${r.contractAddress}-${r.itemId}`:"";return g.useEffect(()=>{if(!c)return;let l=!1;return(async()=>{let f=!1;for(let o=0;o<20&&!l;o++)try{await G(c,{timeoutMs:15e3}),f=!0;break}catch(b){if(b instanceof K)continue;l||a("failed");return}if(!l){if(!f){a("timed-out");return}if(!r){a("confirmed");return}a("indexing");for(let o=0;o<40&&!l;o++){if(await X(r.owner,r.contractAddress,r.itemId)){l||a("confirmed");return}await Se(3e3)}l||a("timed-out")}})(),()=>{l=!0}},[c,x]),i}const Le=B.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",Te=B.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function Ue(){var S;const{state:c,search:r}=P(),i=c??Ae(),a=N(),{session:x}=D(),l=i==null?void 0:i.txHash,v=(i==null?void 0:i.items)??[],f=i!=null&&i.creditsAdded&&i.creditsAdded>0?i.creditsAdded:null,o=v[0],b=x!=null&&x.address&&(o!=null&&o.contractAddress)&&(o!=null&&o.itemId)?{owner:x.address,contractAddress:o.contractAddress,itemId:o.itemId}:null,u=Ie(i!=null&&i.settled?void 0:l,b);q({title:n("seo.success.title"),noindex:!0});const p=v;if(p.length===0)return e.jsx(M,{to:"/items",replace:!0});const A=p[0],w=(S=i==null?void 0:i.txHashes)!=null&&S.length?i.txHashes:l?[l]:[],h=w.length>0&&U(x==null?void 0:x.providerType)?w.map((d,k)=>e.jsx(ne,{href:`${Te}${d}`,target:"_blank",rel:"noreferrer",children:w.length>1?n("success.viewTransactionNumbered",{n:k+1,total:w.length}):n("success.viewTransaction")},d)):null;return u!=="confirmed"?e.jsx(L,{children:e.jsx(ee,{children:u==="pending"||u==="indexing"?e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"spinner","aria-hidden":!0}),e.jsx(C,{children:u==="indexing"?n("success.finalizing"):n("success.processing")}),e.jsx(z,{children:u==="indexing"?e.jsxs(e.Fragment,{children:[n("success.indexingBefore")," ",p.length===1?e.jsx("strong",{children:A.name}):n("success.itemCount",{count:p.length})," ",n("success.indexingAfter")]}):e.jsxs(e.Fragment,{children:[n("success.confirmingBefore")," ",p.length===1?e.jsx("strong",{children:A.name}):n("success.itemCount",{count:p.length})," ",n("success.confirmingAfter")]})}),h?e.jsx(y,{children:h}):null]}):u==="timed-out"?e.jsxs(e.Fragment,{children:[e.jsx(C,{children:n("success.stillProcessingTitle")}),e.jsxs(z,{children:[n("success.timedOutBefore")," ",e.jsx("button",{className:"link",onClick:()=>a("/activity"),children:n("nav.activity")})," ",n("success.timedOutAfter")]}),h?e.jsx(y,{children:h}):null,e.jsxs(T,{children:[e.jsx(R,{variant:"purple",onClick:()=>a("/activity"),children:n("success.viewActivity")}),e.jsx(R,{variant:"ghost",onClick:()=>a("/items"),children:n("success.keepShopping")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(C,{children:n("success.failedTitle")}),e.jsx(z,{children:n("success.failedBody")}),h?e.jsx(y,{children:h}):null,e.jsx(T,{children:e.jsx(R,{variant:"purple",onClick:()=>a("/items"),children:n("success.backToShop")})})]})})}):e.jsxs(L,{children:[e.jsx(Z,{}),e.jsxs(ie,{children:[e.jsxs(se,{role:"status",children:[e.jsx(re,{"aria-hidden":!0,children:e.jsxs("svg",{viewBox:"0 0 60 60",width:"60",height:"60",children:[e.jsx("circle",{cx:"30",cy:"30",r:"30",fill:"#34ce77"}),e.jsx("path",{d:"M18 31l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsxs(oe,{children:[e.jsx("b",{children:n("success.bannerTitle")})," ",n("success.bannerBody")]})]}),e.jsxs(ce,{children:[f?e.jsxs(le,{"data-testid":"success-credits",children:[e.jsx(xe,{}),e.jsxs(he,{children:[e.jsx(pe,{children:n("getCredits.creditsAmount",{credits:f,currency:V.name})})," ",e.jsx(ue,{children:n("getCredits.creditsAdded")})]})]}):null,p.map((d,k)=>{const $=d.quantity??1;return e.jsxs(ae,{children:[k>0?e.jsx(de,{"aria-hidden":!0}):null,e.jsxs(fe,{children:[e.jsxs(ge,{children:[d.thumbnail?e.jsx("img",{src:d.thumbnail,alt:""}):null,e.jsx(me,{"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 18 18",width:"12",height:"12",children:e.jsx("path",{d:"M4 9l3.5 3.5L14 5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(je,{children:[e.jsxs(we,{title:d.name,children:[d.name||n("buyModal.itemFallback"),$>1?e.jsx(ye,{children:n("cartCheckout.qty",{count:$})}):null]}),d.creator?e.jsx(ve,{address:d.creator,linkToProfile:!0}):null]}),e.jsxs(be,{children:[e.jsx(ke,{}),e.jsx("span",{children:H(d.priceCredits*$)})]})]})]},d.id)})]}),h?e.jsx(y,{"data-receipt":!0,children:h}):null,e.jsxs($e,{children:[e.jsx(Ce,{"data-variant":"ghost",onClick:()=>a("/my-items"),children:n("success.myAssets")}),e.jsxs(ze,{"data-variant":"ruby",href:Le,target:"_blank",rel:"noreferrer",children:[n("success.tryInWorld"),e.jsx(Re,{"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]})]})}export{Ue as Success,Ue as default};